pytest-dev / pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
https://pytest.org
MIT License
11.71k stars 2.6k forks source link

c85fce39b broke importing standard library modules that are "masked" #12303

Open s-t-e-v-e-n-k opened 2 months ago

s-t-e-v-e-n-k commented 2 months ago

As reported in this jaraco.test issue comment, this commit broke the ability to import test.support, which is in the standard library, while testing jaraco.test.

pip list:

abuild@conjecture:/home/abuild> pip list
Package            Version
------------------ -----------------------
annotated-types    0.6.0
attrs              23.2.0
autocommand        2.2.2
backports.tarfile  1.0.0
inflect            7.0.0
iniconfig          2.0.0
jaraco.classes     3.4.0
jaraco.collections 5.0.1
jaraco.context     5.3.0
jaraco.functools   4.0.0
jaraco.text        3.12.0
more-itertools     10.2.0
packaging          24.0
pip                24.0
pluggy             1.5.0
pydantic           2.7.1
pydantic_core      2.18.2
pytest             8.1.0.dev253+gc85fce39b
setuptools         69.0.3
setuptools-scm     8.0.4
toml               0.10.2
typing_extensions  4.11.0
wheel              0.43.0

Operating system: openSUSE Tumbleweed

The minimal example would be running jaraco.test's testsuite under pytest, I guess.

hroncok commented 1 month ago

This is one of the reasons we are reluctant to update pytest from 7 to 8 in Fedora Linux, but I am out of my league here. Could somebody please investigate? I can buy you a beverage at EuroPython if it helps :)