In case the pytest hypothesis plugin is installed it somehow calls into trio which tries to import various pathlib types. This fails since the meson shim does not expose everything the real pathlib does: File "C:/msys64/ucrt64/lib/python3.11/site-packages/trio/__init__.py", line 76, in <module> from ._path import Path as Path, PosixPath as PosixPath, WindowsPath as WindowsPath File "C:/msys64/ucrt64/lib/python3.11/site-packages/trio/_path.py", line 248, in <module> class PosixPath(Path, pathlib.PurePosixPath): File "C:/msys64/ucrt64/lib/python3.11/site-packages/trio/_path.py", line 253, in PosixPath _wrapped_cls: ClassVar[type[pathlib.Path]] = pathlib.PosixPath ^^^^^^^^^^^^^^^^^ AttributeError: module 'mesonbuild._pathlib' has no attribute 'PosixPath'. Did you mean: 'PurePosixPath'? To avoid needing to keep up with what pathlib exposes just implement __getattr__/__dir__ to forward everything except the replaced class to the original pathlib.pull/13425/head
parent
8e89a38737
commit
ff2241a778
1 changed files with 7 additions and 16 deletions
Loading…
Reference in new issue