-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pytest==8.1.1
Import regression in some namespace package layouts
#12112
Comments
Thanks @aaraney for the report, I will take a look ASAP. 👍 |
How are you setting up your
One thing you can use to check if your namespace package is working is to import it inside Python directly:
Can you try the above and show what you get? |
I am seeing something similar - I think it is because there is effectively a collision between
Without BTW, @aaraney, there's a typo in the original command above - a missing |
Also, and this may be a different bug, but if I run With |
I suggest to also test using the Python REPL to import the namespace packages, taking pytest out of the picture, to ensure your configuration is correct. |
@nicoddemus, thanks again for looking into this! The example I provided was incomplete. When I adding In the project I thought I discovered this bug in, it turns out there was an erroneous @joshbode, great catch! Just fixed it! |
@aaraney thanks for the clarification! |
@nicoddemus, I think this can be closed unless you feel the need for it to stay open. It seems that it was a false alarm on my part. Thanks again for looking into this! |
If somebody sees this and is not working as expected, please try importing your modules using the Python REPL first, to ensure the configuration is correct. 👍 I'm closing this for now then, with "working as intended". Thanks everyone! |
The REPL tip is a good one - it helped me figure out that my imports were being masked and that it wasn't being treated correctly as a namespace package, even before it hit |
I have encountered a related issue. In this job, the tests are failing with:
The module The problem is that the namespace package
Essentially, #3396 re-emerges with pytest 8.1. |
You can repro the issue by cloning jaraco/jaraco.test@23d6c10 and running tox. Let me know if you need a more minimal reproducer. I'm not doing any path manipulation, but merely running the tests with the package under test installed. |
This reverts commit 25312b5.
Thanks @jaraco, I investigated this a bit and got it to work: https://github.com/nicoddemus/jaraco.test/tree/ns-pytest, but I till need to investigate more in order to understand why your original layout does not work (it is late and I'm out of time to continue on this). I will take another look ASAP. |
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix pytest-dev#12112
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix pytest-dev#12112
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix pytest-dev#12112
Today I also encountered this issue in jaraco.site. Again, this looks to be a case of the stdlib name conflicting with the inner package name. In this case, the pytest collection fails when relative imports within I was able to confirm that the code in #12169 and by adding the consider_namespace_packages setting, the tests now pass. Same for jaraco.test (as you also confirmed). I'm new to the |
As far as we know yes, but we would need to get reports from this in the wild.
Not at this moment; it introduces some performance overhead to import all modules that pytest collects. We need to measure how much impact that is, but to be safe we decided to make it opt-in.
Indeed, however pytest and python/setuptools need to perform different procedures. Python needs to find a file based on a module name, say pytest needs to find a module name from a file, for example find out that Given namespace is not used widely (at least that is our impression), we decided to not enable it by default due to extra cost it would incur for all imports if enabled. We plan to eventually do some profiling and see if the cost is significant to enable it by default in test suites which do not use namespace packages; if so then definitely we can switch it on by default and mark it as obsolete (probably no need to deprecated, just mark as obsolete). |
…sion 25.1.0 Jason R. Coombs (11): Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Replace ExceptionRaisedContext with ExceptionTrap. Remove test skip, no longer relevant with Python 3.8 minimum. Inject the current directory to sys.path in multiprocessing tests. Closes #673. Ref pytest-dev/pytest#12178. Move Python 3.8 compatibility logic into the compat package. When completion is unavailable, exit with non-zero status and emit message to stderr. Finalize Finalize
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix pytest-dev#12112
…to version 5.1.0 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (1): Tweak coverage configuration for type checking (jaraco/skeleton#97) Christian Clauss (2): Upgrade GitHub Actions checkout (jaraco/skeleton#94) GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95) Dimitri Papadopoulos Orfanos (2): Use the ruff formatter (jaraco/skeleton#99) ruff: extended-ignore → ignore (jaraco/skeleton#105) Jason R. Coombs (71): ALLOW_UNICODE no longer needed on Python 3. As a result, ELLIPSES is also now enabled by default. Enable default encoding warning where available. See PEP 597. Suppress EncodingWarning in pytest_black. Workaround for shopkeep/pytest-black#67. Exempt warning. Workaround for realpython/pytest-mypy#152 Add #upstream markers for filtered warnings. Add filter for platform module (ref python/cpython#100750). Remove reference to EncodingWarning as it doesn't exist on some Pythons. Revert "exclude build env from cov reporting (jaraco/skeleton#60)" Disable couldnt-parse warnings. Prescribed workaround for nedbat/coveragepy#1392. Fixes python/importlib_resources#279 and fixes jaraco/skeleton#56. Remove unnecessary and incorrect copyright notice. Fixes jaraco/skeleton#78. Replace flake8 with ruff. Fixes jaraco/skeleton#79 and sheds debt. Make substitution fields more prominent and distinct from true 'skeleton' references. (#71) Suppress EncodingWarning in build.env. Ref pypa/build#615. Remove reference to EncodingWarning as it doesn't exist on some Pythons. Update RTD boilerplate to new issue. Ref readthedocs/readthedocs.org#10401. Add badge for Ruff. Remove inclusion of python version for docs Adopt towncrier for managing changelog. Fixes jaraco/skeleton#83. Replace workaround for actions/setup-python#508 with 'allow-prereleases' Remove tox boilerplate, no longer necessary with later versions of tox. Require Python 3.8 or later. Expand 'finalize' to commit and tag the change. Leverage pytest-enabler 2.2 for the default config. Prefer 3.x for Python version (latest stable). Collapse skeleton history. Workaround for jaraco/skeleton#87. Add links to project home page and pypi. Fixes jaraco/skeleton#77. Replace redundant step names with simple 'Run'. Increase visibility of security policy. (#4) Remove TOX_WORK_DIR workaround, no longer necessary with tox 4. Ref tox-dev/tox#3050. Pin against sphinx 7.2.5 as workaround for sphinx/sphinx-doc#11662. Closes jaraco/skeleton#88. Allow GITHUB_* settings to pass through to tests. Remove spinner disablement. If it's not already fixed upstream, that's where it should be fixed. Clean up 'color' environment variables. Add diff-cover check to Github Actions CI. Closes jaraco/skeleton#90. Add descriptions to the tox environments. Closes jaraco/skeleton#91. Add FORCE_COLOR to the TOX_OVERRIDE for GHA. Requires tox 4.11.1. Closes jaraco/skeleton#89. Prefer ``pass_env`` in tox config. Preferred failure mode for tox-dev/tox#3127 and closes jaraco/skeleton#92. Limit sphinxlint jobs to 1. Workaround for sphinx-contrib/sphinx-lint#83. Remove news fragment after allowing time to be processed downstream. Suppress deprecation warning in dateutil. Workaround for dateutil/dateutil#1284. Update Github Actions badge per actions/starter-workflows#1525. Separate collateral jobs on different lines for easier override/extension. Drop minimum requirement on pytest-mypy as most environments are already running much later. Closes jaraco/skeleton#96. Remove sole entry for branches-ignore. Workaround for and closes jaraco/skeleton#103. Bump year on badge Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224. Exclude docs and tests directories properly per Setuptools behavior. Rely on default discovery for good heuristics for finding packages. Enable preview to enable preserving quotes. Use latest versions in RTD boilerplate. Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Update readme and docs. 👹 Feed the hobgoblins (delint). 👹 Feed the hobgoblins (delint). Removed deprecated 'runner' parameter to tarball_context. Renamed tarball_context to tarball and deprecated tarball_context compatibility shim. Disentangle pushd from tarball. Add a few type hints. Ref #2 Finalize 👹 Feed the hobgoblins (delint). Implement compose for composing context managers. Make the function private for now, available experimentally until there's feedback (or not) on the approach. Deprecate null context. Rely on Python 3.8 syntax. Finalize Joyce (1): Feat: initial permissions to main.yml (jaraco/skeleton#76) Sviatoslav Sydorenko (1): Enable testing merge queues @ GitHub Actions CI/CD (jaraco/skeleton#93)
Previously we used a hand crafted approach to detect namespace packages, however we should rely on ``importlib`` to detect them for us. Fix #12112 --------- Co-authored-by: Ran Benita <[email protected]>
…0.0 to version 5.0.1 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (2): Tweak coverage configuration for type checking (jaraco/skeleton#97) Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Dimitri Papadopoulos Orfanos (2): Use the ruff formatter (jaraco/skeleton#99) ruff: extended-ignore → ignore (jaraco/skeleton#105) Jason R. Coombs (24): Separate collateral jobs on different lines for easier override/extension. Drop minimum requirement on pytest-mypy as most environments are already running much later. Closes jaraco/skeleton#96. Remove sole entry for branches-ignore. Workaround for and closes jaraco/skeleton#103. Bump year on badge Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224. Exclude docs and tests directories properly per Setuptools behavior. Rely on default discovery for good heuristics for finding packages. Enable preview to enable preserving quotes. Use latest versions in RTD boilerplate. Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Declare sort_params as an immutable Mapping. Fixes B006. 👹 Feed the hobgoblins (delint). 👹 Feed the hobgoblins (delint). Ran ruff --select UP Add news fragment. Finalize Restore Python 3.8 compatibility. Sviatoslav Sydorenko (1): Enable testing merge queues @ GitHub Actions CI/CD (jaraco/skeleton#93)
… version 7.0.0 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (1): Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Jason R. Coombs (22): Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Renamed 3.x to cpython for clarity and consistency with other projects. Removed configparser.rst Remove conftest, no longer needed. Renamed sync file. Change the process to match the new expectation that top-level configparser module is only maintained in the main branch. Add shebang to launch the script with pip-run. Fix logic in is_stable (off-by-one is a killer for booleans). Update cpython branch to receive the changed files in the same form as found upstream. Replace now redundant mapping with a sequence of paths. cpython-v3.13.0a6 rev=57aee2a02ce3 Add news fragment. Remove 'configparser' as a top-level name, as it's already masked by the stdlib on all supported Pythons. Removed sections pertaining to Python 2 concerns. Finalize
…version 69.5.0 Anderson Bravalheri (3): Improve test_rfc822_escape, capturing interoperability requirements Improve TestMetadata, capturing interoperability requirements Fix interoperability of rfc822_escape with stblib's email library Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (1): Add link to blog entry from jaraco/skeleton#115 above CI build matrix. DWesl (2): CI: Install git on Cygwin CI runner CI: Try to fix Cygwin tox configuration. Dimitri Papadopoulos (1): Update URLs in documentation: http:// → https:// Dustin Ingram (6): Support PEP 625 Add news fragment Revert changes to distutils Try monkeypatching right before we use it instead Linting Fix canonicalization Harmen Stoppels (1): GNU: use -Wl,-rpath,<dir> instead of -Wl,-R<dir> Jason R. Coombs (96): Copy 'missing_compiler_executable from Python 3.12 and customize it for compatibility with distutils. Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224. Mark this function as uncovered. Also disable the check Remove pin on inflect as it's insufficient to avoid the Rust dependency. Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. 👹 Feed the hobgoblins (delint). Extracted method for resolving python lib dir. 👹 Feed the hobgoblins (delint). Update more tests to match the new expectation. Rely on always_iterable to conditionally extend the lib_opts. Restore integration test with Setuptools Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Extract a method for customizing the compiler for macOS. Convert comment to docstring; update wording. Create a fixture to patch-out compiler customization on macOS. Utilize the fixture for disabling compiler customization on macOS for cxx test. Closes #231. Limit mutating global state and simply rely on functools.lru_cache to limit the behavior to a single invocation. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. In test_build_ext, expose Path objects and use a path builder to build content. Fixes some EncodingWarnings. Ref pypa/distutils#232. In support, specify encoding. Ref pypa/distutils#232. In test_build_py, rely on tree builder to build trees. Ref pypa/distutils#232. Specify encoding in util.byte_compile. Ref pypa/distutils#232. Rely on tree builder in test_build_scripts. Ref pypa/distutils#232. Rely on Path object to replace the suffix, open the file, and count the lines. Ref pypa/distutils#232. Fix EncodingWarnings in test_core. Ref pypa/distutils#232. Ran pyupgrade for Python 3.8+ followed by ruff format. Rely on tree builder in test_dir_util. Ref pypa/distutils#232. Rely on tree builder and path objects. Ref pypa/distutils#232. Remove reliance on TempdirManager in test_file_util. Rely on tmp_path fixture directly. 👹 Feed the hobgoblins (delint). Rely on tree builder. Ref pypa/distutils#232. Specify encoding in test_install. Ref pypa/distutils#232. Re-use write_sample_scripts in test_install_scripts. Ref pypa/distutils#232. Use Path objects in test_register. Ref pypa/distutils#232. Specify encoding in test_sdist. Ref pypa/distutils#232. Fix EncodingWarning in test_spawn. Ref pypa/distutils#232. Fix EncodingWarnings in test_sdist. Ref pypa/distutils#232. Rely on tree builder. Ref pypa/distutils#232. Ran pyupgrade for Python 3.8+ followed by ruff format. Suppress diffcov error. Suppress more diffcov errors. Address EncodingWarning in ccompiler. Ref pypa/distutils#232. Fix EncodingWarnings in distutils/command/config.py. Ref pypa/distutils#232. Fix EncodingWarnings in distutils/config.py. Ref pypa/distutils#232. Fix EncodingWarnings in sdist.py. Ref pypa/distutils#232. Fix EncodingWarnings in text_file.py. Ref pypa/distutils#232. Fix EncodingWarnings in dist.py. Ref pypa/distutils#232. Fix EncodingWarning in cygwinccompiler. Ref pypa/distutils#232. Fix EncodingWarning in file_util. Ref pypa/distutils#232. Suppress EncodingWarnings in pyfakefs. Ref pypa/distutils#232. Workaround for pytest-dev/pyfakefs#957. Replaced deprecated cgi module with email module. Ref pypa/distutils#232. Fix exception reference in missing_compiler_executable. Ref pypa/distutils#225. Closes pypa/distutils#238. Satisfy EncodingWarning by passing the encoding. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Revert "Suppress EncodingWarnings in pyfakefs. Ref pypa/distutils#232. Workaround for pytest-dev/pyfakefs#957." 🧎♀️ Genuflect to the types. Fix ruff.toml syntax and suppress emergent failure. Move implementation to monkey.patch. Update readme to reflect current state. Apply ruff --select UP safe fixes. Apply ruff --select UP unsafe fixes. 👹 Feed the hobgoblins (delint). 👹 Feed the hobgoblins (delint). 👹 Feed the hobgoblins (delint). Remove unreachable branch Extract method for comparing prerelease. Satisfies complexity check. Re-organize for brevity. Rely on None==None and handle two cases together. Refresh RangeMap from jaraco.collections 5.0.1. Ruff fixes B007. 👹 Feed the hobgoblins (delint). Fix B026 by moving star arg ahead of keyword arg. Extract 'make_iterable' for upload and register commands, avoiding masking loop input variable (B020). Fix pointless comparison (B015). Remove Python 3.7 compatibility from build_ext Remove Python 3.7 compatibility from test_sysconfig. Move comment nearer the skip directive. Update wording. Add news fragment. Omit distutils from coverage checks. Fix EncodingWarnings in tools.finalize. Bump version: 69.2.0 → 69.3.0 Refresh unpinned vendored dependencies. Ensure that 'backports' is included on older Pythons Exclude vendored packages and tools from coverage checks. Bump version: 69.3.0 → 69.4.0 Update to packaging 24 Remove attempt to canonicalize the version. It's already canonical enough. Bump version: 69.3.0 → 69.3.1 Bump version: 69.4.0 → 69.4.1 Bump version: 69.4.1 → 69.5.0 Lisandro Dalcin (1): Fix accumulating flags after compile/link Marcel Telka (1): Add mypy.ini to MANIFEST.in Steve Dower (2): Fixes pypa/distutils#219 Use sysconfig.get_config_h_filename() to locate pyconfig.h Also use sysconfig.get_config_h_filename() to implement distutils.sysconfig version Steven Pitman (1): Add support for z/OS compilers; Fixes pypa/distutils#215
…0 to version 4.0.1 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (3): Tweak coverage configuration for type checking (jaraco/skeleton#97) Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Move project metadata to `pyproject.toml` (jaraco/skeleton#122) Christian Clauss (2): Upgrade GitHub Actions checkout (jaraco/skeleton#94) GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95) Dimitri Papadopoulos Orfanos (2): Use the ruff formatter (jaraco/skeleton#99) ruff: extended-ignore → ignore (jaraco/skeleton#105) Jason R. Coombs (24): Limit sphinxlint jobs to 1. Workaround for sphinx-contrib/sphinx-lint#83. Remove news fragment after allowing time to be processed downstream. Suppress deprecation warning in dateutil. Workaround for dateutil/dateutil#1284. Update Github Actions badge per actions/starter-workflows#1525. Separate collateral jobs on different lines for easier override/extension. Drop minimum requirement on pytest-mypy as most environments are already running much later. Closes jaraco/skeleton#96. Remove sole entry for branches-ignore. Workaround for and closes jaraco/skeleton#103. Bump year on badge Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224. Exclude docs and tests directories properly per Setuptools behavior. Rely on default discovery for good heuristics for finding packages. Enable preview to enable preserving quotes. Use latest versions in RTD boilerplate. Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Pin against pytest 8.1.x due to pytest-dev/pytest#12194. Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml. Finalize Sviatoslav Sydorenko (1): Enable testing merge queues @ GitHub Actions CI/CD (jaraco/skeleton#93) bswck (1): Remove deprecated `call_aside` from __init__.pyi
…ion 7.2.1 Bartosz Sławecki (2): Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Move project metadata to `pyproject.toml` (jaraco/skeleton#122) Jason R. Coombs (25): Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Pin against pytest 8.1.x due to pytest-dev/pytest#12194. Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml. Extract _handle_chunk function, one small step toward simplification. Simplify a bit by using booleans instead of ints. Extract _sub_ord function. Re-use _sub_ord where the same pattern appears. Remove unnecessary variable and type assignment Implemented _sub_ord as one regex operation. Prefer expression algebra Remove comment that's redundant to the docstring. Extract _chunk_num and _remove_last_blank functions. Avoid repetition in call and assignment and vary on the parameter. Extract function for _get_sign Prefer None for tri-state variable Remove remnant comment Refactor signout handling to consolidate some behavior and limit interacting branches. Re-write first as a single assignment of a boolean expression. Extract _render method for rendering the chunks. Simplify logic by yielding the comma separately. Consolidate returns across group and non-group. Reformat Add news fragment. Finalize Restore Python 3.8 compatibility in annotations.
…n 3.18.2 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (2): Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Move project metadata to `pyproject.toml` (jaraco/skeleton#122) Jason R. Coombs (13): Update compatibility matrix to reflect changes merged in Python 3.12 and anticipated for 3.13. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Pin against pytest 8.1.x due to pytest-dev/pytest#12194. Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml. Allow macos on Python 3.8 to fail as GitHub CI has dropped support. Move project.urls to appear in the order that ini2toml generates it. Remove project.scripts. Revert "Allow macos on Python 3.8 to fail as GitHub CI has dropped support." Utilize temp_dir from os_helper. Use an overlay object to make tests appear to use zipfile.Path to reduce diff with CPython. Finalize Serhiy Storchaka (1): gh-119064: Use os_helper.FakePath instead of pathlib.Path in tests (python/cpython#119065) Xie Yanbo (1): Fix typo in Lib/zipfile/_path/__init__.py
… version 3.12.1 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (3): Tweak coverage configuration for type checking (jaraco/skeleton#97) Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Move project metadata to `pyproject.toml` (jaraco/skeleton#122) Christian Clauss (2): Upgrade GitHub Actions checkout (jaraco/skeleton#94) GitHub Actions: Combine tox jobs diffcov and docs (jaraco/skeleton#95) Dimitri Papadopoulos Orfanos (2): Use the ruff formatter (jaraco/skeleton#99) ruff: extended-ignore → ignore (jaraco/skeleton#105) Jason R. Coombs (27): Remove news fragment after allowing time to be processed downstream. Suppress deprecation warning in dateutil. Workaround for dateutil/dateutil#1284. Update Github Actions badge per actions/starter-workflows#1525. Separate collateral jobs on different lines for easier override/extension. Drop minimum requirement on pytest-mypy as most environments are already running much later. Closes jaraco/skeleton#96. Remove sole entry for branches-ignore. Workaround for and closes jaraco/skeleton#103. Bump year on badge Remove build and dist from excludes. It appears they are not needed and their presence blocks the names of packages like 'builder' and 'distutils'. Ref pypa/distutils#224. Exclude docs and tests directories properly per Setuptools behavior. Rely on default discovery for good heuristics for finding packages. Enable preview to enable preserving quotes. Use latest versions in RTD boilerplate. Remove Sphinx pin. Ref sphinx-doc/sphinx#11662. Include deps from the base config in diffcov. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Pin against pytest 8.1.x due to pytest-dev/pytest#12194. Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml. Allow macos on Python 3.8 to fail as GitHub CI has dropped support. Move project.urls to appear in the order that ini2toml generates it. Remove project.scripts. Revert "Allow macos on Python 3.8 to fail as GitHub CI has dropped support." Rename extras to align with core metadata spec. Finalize Sviatoslav Sydorenko (1): Enable testing merge queues @ GitHub Actions CI/CD (jaraco/skeleton#93)
…ion 5.6.0 Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (2): Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Move project metadata to `pyproject.toml` (jaraco/skeleton#122) Jason R. Coombs (27): Remove superfluous list comprehension. Enable complexity check and pycodestyle warnings. Closes jaraco/skeleton#110. Use 'extend-select' to avoid disabling the default config. Ref jaraco/skeleton#110. Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Pin against pytest 8.1.x due to pytest-dev/pytest#12194. Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml. Allow macos on Python 3.8 to fail as GitHub CI has dropped support. Move project.urls to appear in the order that ini2toml generates it. Remove project.scripts. Revert "Allow macos on Python 3.8 to fail as GitHub CI has dropped support." Rename extras to align with core metadata spec. 👹 Feed the hobgoblins (delint). Add test capturing missed expectation. In utc.now(), bind late to allow for monkeypatching. Port the functionality from pytz to zoneinfo. Remove assertion that two commands can be compared to determine the delay between each. Capture expectations about commands coming due at a particular time. Remove use of pytz.localize and rely entirely on zoneinfo. Exclude coverage of compatibility logic. Move dependency on zoneinfo into tests only. Include tzdata on Windows Require tzdata unconditionally on windows (tests). Move compatibility logic into its own module. Add news fragment. Finalize
…1.0 to version 8.0.0 Adam Turner (1): GH-109653: Defer import of ``importlib.metadata._adapters`` (python/cpython#109829) Avasam (1): Allow mypy on PyPy (jaraco/skeleton#111) Bartosz Sławecki (2): Add link to blog entry from jaraco/skeleton#115 above CI build matrix. Move project metadata to `pyproject.toml` (jaraco/skeleton#122) Dan Blanchard (4): Add support for egg packages with files outside site-packages Tweak test Update importlib_metadata/__init__.py Fix mypy failure that has nothing to do with this PR Jason R. Coombs (23): Re-enable ignoring of temporary merge queue branches. Closes jaraco/skeleton#103. Fetch unshallow clones in readthedocs. Closes jaraco/skeleton#114. Move Python 3.11 out of the test matrix. Configure pytest to support namespace packages. Ref pytest-dev/pytest#12112. Pin against pytest 8.1.x due to pytest-dev/pytest#12194. Migrated config to pyproject.toml using jaraco.develop.migrate-config and ini2toml. Allow macos on Python 3.8 to fail as GitHub CI has dropped support. Move project.urls to appear in the order that ini2toml generates it. Remove project.scripts. Revert "Allow macos on Python 3.8 to fail as GitHub CI has dropped support." Rename extras to align with core metadata spec. gh-120801: Update fixtures. Finalize Prefer "Source" to "Homepage" for the repository label. Move _relative_to compatibility to a compat module. Update wrapper to rely on 'relative_to(walk_up=True)' on Python 3.12 and compatibility wrapper on Python 3.11 and earlier. Mark compat code as uncovered. Revert "Fix mypy failure that has nothing to do with this PR" Remove additional method in SimplePath. Add news fragment Finalize Removed deprecated support for Distribution subclasses not implementing abstract methods. Message.__getitem__ now raises a KeyError on missing keys. Finalize
As first noted in #12074, below is an example project structure with two packages under the
ns
namespace that now fail to import after the changes introduced in8.1.x
:Below are the contents of
test_foo.py
andfoo.py
.test_bar.py
andbar.py
look nearly identical.In
pytest==8.0.2
,python -m pytest --import-mode=importlib
correctly discovers and runs the tests from the top levelns
directory. Inpytest==8.1.1
,python -m pytest --import-mode=importlib -o "consider_namespace_packages=true"
, results in the following error during collection:To reproduce the issue clone https://github.com/aaraney/pytest-12074, pip install
ns.foo
andns.bar
, pip install the different versions ofpytest
and run with the aforementioned commands.The text was updated successfully, but these errors were encountered: