Skip to content
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

Closed
aaraney opened this issue Mar 12, 2024 · 16 comments · Fixed by #12169
Closed

pytest==8.1.1 Import regression in some namespace package layouts #12112

aaraney opened this issue Mar 12, 2024 · 16 comments · Fixed by #12169
Assignees
Labels
topic: collection related to the collection phase

Comments

@aaraney
Copy link

aaraney commented Mar 12, 2024

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 in 8.1.x:

ns
└── python
    ├── bar
    │   ├── ns
    │   │   ├── bar
    │   │   └── test
    │   │       ├── __init__.py
    │   │       ├── bar.py
    │   │       └── test_bar.py
    │   └── pyproject.toml
    └── foo
        ├── ns
        │   ├── foo
        │   └── test
        │       ├── __init__.py
        │       ├── foo.py
        │       └── test_foo.py
        └── pyproject.toml

Below are the contents of test_foo.py and foo.py. test_bar.py and bar.py look nearly identical.

# python/foo/ns/test/test_foo.py
from .foo import value

def test_foo():
    assert value == "foo"
# python/foo/ns/test/foo.py
value = "foo"

In pytest==8.0.2, python -m pytest --import-mode=importlib correctly discovers and runs the tests from the top level ns directory. In pytest==8.1.1, python -m pytest --import-mode=importlib -o "consider_namespace_packages=true", results in the following error during collection:

========================== test session starts ===========================
platform darwin -- Python 3.9.16, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/user/pytest-12074
collected 0 items / 2 errors

================================= ERRORS =================================
____________ ERROR collecting python/bar/ns/test/test_bar.py _____________
ImportError while importing test module '/home/user/pytest-12074/python/bar/ns/test/test_bar.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
python/bar/ns/test/test_bar.py:1: in <module>
    from .bar import value
E   ModuleNotFoundError: No module named 'test.bar'
____________ ERROR collecting python/foo/ns/test/test_foo.py _____________
ImportError while importing test module '/home/user/pytest-12074/python/foo/ns/test/test_foo.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
python/foo/ns/test/test_foo.py:1: in <module>
    from .foo import value
E   ModuleNotFoundError: No module named 'test.foo'
======================== short test summary info =========================
ERROR python/bar/ns/test/test_bar.py
ERROR python/foo/ns/test/test_foo.py
!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!
=========================== 2 errors in 0.04s ============================

To reproduce the issue clone https://github.com/aaraney/pytest-12074, pip install ns.foo and ns.bar, pip install the different versions of pytest and run with the aforementioned commands.

@nicoddemus
Copy link
Member

Thanks @aaraney for the report, I will take a look ASAP. 👍

@nicoddemus
Copy link
Member

@aaraney,

How are you setting up your PYTHONPATH? I managed to get your example to work by putting ns/python/bar and ns/python/foo in the PYTHONPATH, which seems to be the recommendation for using namespace packages.

λ python -m pytest .tmp\ns\python --import-mode=importlib -o consider_namespace_packages=true --no-header
======================== test session starts ========================
collected 2 items

.tmp\ns\python\bar\ns\bar\test\test_bar.py .                   [ 50%]
.tmp\ns\python\foo\ns\foo\test\test_foo.py .                   [100%]

========================= 2 passed in 0.05s =========================

λ echo %PYTHONPATH%
e:\projects\pytest\.tmp\ns\python\bar;e:\projects\pytest\.tmp\ns\python\foo

λ cd
e:\projects\pytest

One thing you can use to check if your namespace package is working is to import it inside Python directly:

λ python
Python 3.12.2 (tags/v3.12.2:6abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ns.bar.test.test_bar
>>> import ns.foo.test.test_foo
>>> ns
<module 'ns' (namespace) from ['e:\\projects\\pytest\\.tmp\\ns\\python\\bar\\ns', 'e:\\projects\\pytest\\.tmp\\ns\\python\\foo\\ns']>

Can you try the above and show what you get?

@joshbode
Copy link

I am seeing something similar - I think it is because there is effectively a collision between ns.test in each subpackage.
I deleted the __init__.py and following that it ran successfully using:

$ pytest --import-mode=importlib -o "consider_namespace_packages=true"

Without consider_namespace_packages if still failed, though.

BTW, @aaraney, there's a typo in the original command above - a missing g (consider_namespace_packaes), which may help :)

@joshbode
Copy link

Also, and this may be a different bug, but if I run python -m pytest ... instead of the pytest ... command directly then I don't need to delete the __init__.py in the test directories, though either way I do require the consider_namespace_packages option.

With pytest==8.0.2 it works fine either way (with/without running via python -m pytest) but it fails without the __init__.py for a different reason (relative imports within the test directory don't work).

@nicoddemus
Copy link
Member

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.

@aaraney
Copy link
Author

aaraney commented Mar 13, 2024

@nicoddemus, thanks again for looking into this! The example I provided was incomplete. When I adding __init__.py files to python/ns/bar/ns/bar/__init__.py and python/ns/foo/ns/foo/__init__.py, so python / setuptools would recognize them as actual submodules (as you alluded to) pytest ran successfully!

In the project I thought I discovered this bug in, it turns out there was an erroneous __init__.py file at the same level as a submodule's pyproject.toml / setup.py / setup.cfg (e.g. python/ns/bar/__init__.py). For some reason pytest==8.0.2 did not balk at this and collected correctly, however with pytest==8.1.1, I received ImportError: attempted relative import beyond top-level package and ModuleNotFoundError: No module named 'some-module' errors. I think that is the correct behavior per PEP 420.

@joshbode, great catch! Just fixed it!

@nicoddemus
Copy link
Member

@aaraney thanks for the clarification!

@aaraney
Copy link
Author

aaraney commented Mar 13, 2024

@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!

@nicoddemus
Copy link
Member

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!

@nicoddemus nicoddemus closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
@joshbode
Copy link

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 pytest

jaraco added a commit to jaraco/jaraco.test that referenced this issue Mar 20, 2024
jaraco added a commit to jaraco/jaraco.test that referenced this issue Mar 20, 2024
@jaraco
Copy link
Contributor

jaraco commented Mar 20, 2024

I have encountered a related issue.

In this job, the tests are failing with:

ModuleNotFoundError: No module named 'test.support'

The module test.support is part of the standard library, so should be importable. Pinning to pytest < 8.1 works around the issue.

The problem is that the namespace package jaraco is being missed in the doctest discovery, so jaraco.test is being imported as test:

py: commands[0]> pytest --pdb
============================================================== test session starts ===============================================================
platform darwin -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0
cachedir: .tox/py/.pytest_cache
rootdir: /Users/jaraco/code/jaraco/jaraco.test
configfile: pytest.ini
plugins: jaraco.test-5.3.1.dev79+g23d6c10, enabler-3.0.0, checkdocs-2.10.1, ruff-0.3.1, mypy-0.10.3, cov-4.1.0
collected 23 items                                                                                                                               

docs/conf.py ....                                                                                                                          [ 17%]
jaraco/test/__init__.py ....                                                                                                               [ 34%]
jaraco/test/cpython.py ...F
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
001 
002 Compatibility shims for getting stuff from test.support across
003 Python versions (for compatibility with Python 3.9 and earlier).
004 
005 >>> os_helper = try_import('os_helper') or from_test_support('temp_dir')
UNEXPECTED EXCEPTION: ModuleNotFoundError("No module named 'test.support'")
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/doctest.py", line 1361, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest test.cpython[0]>", line 1, in <module>
  File "/Users/jaraco/code/jaraco/jaraco.test/jaraco/test/cpython.py", line 25, in from_test_support
    import test.support
ModuleNotFoundError: No module named 'test.support'
/Users/jaraco/code/jaraco/jaraco.test/jaraco/test/cpython.py:5: UnexpectedException
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /Users/jaraco/code/jaraco/jaraco.test/jaraco/test/cpython.py(25)from_test_support()
-> import test.support
(Pdb) import test
(Pdb) test.__file__
'/Users/jaraco/code/jaraco/jaraco.test/jaraco/test/__init__.py'

Essentially, #3396 re-emerges with pytest 8.1.

@jaraco jaraco reopened this Mar 20, 2024
@jaraco
Copy link
Contributor

jaraco commented Mar 20, 2024

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.

nicoddemus added a commit to nicoddemus/jaraco.test that referenced this issue Mar 21, 2024
@nicoddemus
Copy link
Member

nicoddemus commented Mar 21, 2024

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.

@Zac-HD Zac-HD added the topic: collection related to the collection phase label Mar 23, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Mar 30, 2024
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
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Mar 30, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Mar 30, 2024
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
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Mar 30, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Mar 30, 2024
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
@nicoddemus
Copy link
Member

Thanks again @jaraco for the reproducer. #12169 improves how we handle namespace packages and works for jaraco.test, except you will need to set consider_namespace_packages in your pytest.ini. I will be happy to open a PR when #12169 gets released. 👍

@jaraco
Copy link
Contributor

jaraco commented Mar 30, 2024

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 jaraco.site are unable to find each other.

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 consider_namespace_packages setting. I find it a little annoying that this setting now becomes necessary for some projects but not others. Is it safe to use on other projects (what's the harm for enabling it for packages that aren't namespace packages)? Are there plans for making this setting the default? After all, Python itself and Setuptools both support projects with or without namespace packages without enabling a setting.

@nicoddemus
Copy link
Member

nicoddemus commented Mar 30, 2024

Is it safe to use on other projects (what's the harm for enabling it for packages that aren't namespace packages)?

As far as we know yes, but we would need to get reports from this in the wild.

Are there plans for making this setting the default?

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.

After all, Python itself and Setuptools both support projects with or without namespace packages without enabling a setting.

Indeed, however pytest and python/setuptools need to perform different procedures.

Python needs to find a file based on a module name, say jaraco.test -> /home/jaraco/projects/jaraco.test/jaraco/test, which is easy to do because it can easily lookup jaraco (based on jaraco.test module name) using sys.path.

pytest needs to find a module name from a file, for example find out that /home/jaraco/projects/jaraco.test/jaraco/test belongs to the namespace jaraco.test , because the collection deals with files. This is non-trivial because we need to search upwards the file system from the module we are collecting to see if it is part of a namespace package, and there's little tooling to help with 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).

clrpackages pushed a commit to clearlinux-pkgs/pypi-keyring that referenced this issue Apr 5, 2024
…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
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Apr 7, 2024
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Apr 7, 2024
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
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.context that referenced this issue Apr 9, 2024
…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)
nicoddemus added a commit that referenced this issue Apr 9, 2024
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]>
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.collections that referenced this issue Apr 15, 2024
…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)
clrpackages pushed a commit to clearlinux-pkgs/pypi-configparser that referenced this issue Apr 15, 2024
… 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
clrpackages pushed a commit to clearlinux-pkgs/pypi-setuptools that referenced this issue Apr 15, 2024
…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
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.functools that referenced this issue Apr 22, 2024
…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
clrpackages pushed a commit to clearlinux-pkgs/pypi-inflect that referenced this issue Apr 26, 2024
…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.
clrpackages pushed a commit to clearlinux-pkgs/pypi-zipp that referenced this issue May 17, 2024
…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
clrpackages pushed a commit to clearlinux-pkgs/pypi-jaraco.text that referenced this issue Jun 18, 2024
… 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)
clrpackages pushed a commit to clearlinux-pkgs/pypi-tempora that referenced this issue Jun 20, 2024
…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
clrpackages pushed a commit to clearlinux-pkgs/pypi-importlib_metadata that referenced this issue Jul 16, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: collection related to the collection phase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants