You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix --package-root tests for Windows and Python 3.13+ (#19583)
This PR should fix the rest of the test failures in
#19545.
A change to `os.path.relpath` in 3.13 seems to have broken the handling
of Windows paths beginning with `\\`. To resolve this issue, we don't
split the drive letter off of the path and instead verify the path is on
the current drive. If it isn't it will never resolve to the package root
because that must be on the same drive as the CWD:
https://github.com/python/mypy/blob/5b03024e829940cf3c3e3d99fc6625f569d02728/mypy/main.py#L1571-L1572
Keeping the drive letter allows relpath to properly generate a relative
path and make the tests pass.
I need to investigate if the relpath change is a regression in CPython.
0 commit comments