Closed hroncok closed 9 months ago
Seems like a bug, why is windows running on Linux?
I had the same idea. However, with Python 3.12 it passes.
In Python 3.12, this code:
Checks whether c:/path/to/python/python.exe
is in {PathMock('c:/path/to/python/python.exe')}
In Python 3.13, it checks whether c:\path\to\python\python.exe
is in {PathMock('c:\\path\\to\\python\\python.exe')}
$ python3.12 -c 'import pathlib; print(pathlib.Path()._flavour.altsep)'
None
$ python3.13 -c 'import pathlib; print(pathlib.Path()._flavour.altsep)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
import pathlib; print(pathlib.Path()._flavour.altsep)
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute '_flavour'
https://github.com/python/cpython/commit/c6c5665ee0c0a5ddc96da255c9a62daa332c32b3
This renames _flavour to pathmod.
Python 3.13.0a6 renamed pathmod
to parser
(https://github.com/python/cpython/commit/752e18389ed03087b51b38eac9769ef8dfd167b7) - it's resolvable by a simple string replacement, will post a PR.
Issue
When I try to run the tests with Python 3.13.0a2 on Linux, I see the following 3 failures:
The failures are:
I have no idea why those tests even run on Linux. I suspect this needs some support in
tests/unit/discovery/windows/winreg-mock-values.py
but the values there are cryptic to me.Environment
Provide at least:
pip list
of the host python wherevirtualenv
is installed: