Skip to content

Fix broken CI and update supported Python versions (3.10–3.14) - #125

Open
lionick wants to merge 9 commits into
IdentityPython:mainfrom
lionick:ci-pin-pytest
Open

lionick wants to merge 9 commits into
IdentityPython:mainfrom
lionick:ci-pin-pytest

Conversation

@lionick

@lionick lionick commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What changed:

  • Drop the unused pytest-black dependency — it only checks formatting when --black is passed to pytest, which never happens here, so it's never actually run a single check.

  • Bump the cryptojwt minimum to 1.11.0

  • Drop Python 3.8 and 3.9 from the CI test matrix

  • Add Python 3.12, 3.13 and 3.14 to the CI test matrix (now 3.10, 3.11, 3.12, 3.13, 3.14).

  • Add setuptools to requirements-dev.txt — Python 3.12+ venvs no longer bundle it by default, and the editable install (pip install -e .) needs it present in the target environment directly.

  • Stop using python setup.py install in CI — it invokes easy_install, which in modern setuptools no longer actually fetches install_requires; idpyoidc itself would install but cryptojwt, filelock, etc. silently wouldn't, breaking every test module that imports cryptojwt. Replaced with pip install -r requirements-dev.txt -e ., which resolves and installs the dev requirements and the package's own install_requires together in one pip call.

  • Drop the urllib3<1.27 pin — added in Dec 2022 for a requests/urllib3 incompatibility that predates requests' proper urllib3 2.x support. Current requests (2.32.5) declares Requires-Dist: urllib3<3,>=1.21.1, so nothing in the dependency graph needs the old ceiling anymore.

pytest 9.0.0 removed the deprecated 'path' parameter from
pytest_collect_file (and related hooks). pytest-black's hookimpl still
declares it, so pytest refuses to register the plugin and exits before
collecting any tests on whatever pytest 9.x CI installs.
@lionick
lionick marked this pull request as ready for review September 18, 2026 06:15
Python 3.12+ venvs no longer bundle setuptools by default. The
editable install (pip install -e .) of this setup.py-based project
needs setuptools present in the target environment directly - it's
not satisfied by pyproject.toml's build-system.requires alone, which
only provisions an isolated build environment, not the one -e .
installs into.
python setup.py install invokes easy_install, which in modern
setuptools no longer actually fetches install_requires - idpyoidc
itself gets installed but cryptojwt, filelock, etc. never do,
breaking every test module that imports cryptojwt.

pip install -r requirements-dev.txt -e . resolves and installs both
the dev requirements and the package's own install_requires together
in one pip call.
@lionick lionick changed the title Pin pytest<9 in dev requirements Fix broken CI and update supported Python versions (3.10–3.13) Sep 25, 2026
Added in 4bd3f32 (Dec 2022) for a requests/urllib3 incompatibility
that predates requests' proper urllib3 2.x support. Current requests
(2.32.5) declares Requires-Dist: urllib3<3,>=1.21.1, so nothing in
the dependency graph needs the old ceiling anymore.
@lionick lionick changed the title Fix broken CI and update supported Python versions (3.10–3.13) Fix broken CI and update supported Python versions (3.10–3.14) Sep 25, 2026
@c00kiemon5ter

Copy link
Copy Markdown
Member

We don't seem to use pytest-black anywhere.
It's an old package that doesn't really seem to help with anything.
We can run black directly ourselves if we need to.

pytest-black only runs format checks when --black is passed to
pytest; neither tox.ini's addopts nor the CI workflow's pytest
invocation ever do, so it has never actually checked a single file.
It's also the exact plugin whose broken pytest_collect_file hookimpl
required the pytest<9 pin in the first place (3940636) - dropping the
dead dependency removes the incompatibility instead of working around
it, so the pin comes off too.

Verified: full suite still passes with pytest resolving freely to
9.1.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants