Commit 8f48f1b
authored
Fix
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.--package-root tests for Windows and Python 3.13+ (#19583)1 parent 1c48286 commit 8f48f1b
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
0 commit comments