Repository navigation
test: Fix test failures with pytest 9.2.0 - #833
Merged
Merged
Conversation
pytest 9.2.0 applies warning filters while loading entry-point plugins, so dash's deprecated hook marks make pytest -W error fail at startup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ValerianRey
marked this pull request as ready for review
October 28, 2026 08:59
Python 3.10.0 has a dataclass bug (bpo-44649) that makes pytest 9.2.0 crash at startup. 3.10.1 is not provided by uv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ValerianRey
enabled auto-merge (squash)
October 28, 2026 09:03
ValerianRey
disabled auto-merge
October 28, 2026 09:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pytest 9.2.0 (released 2026-10-27) breaks our tests in two independent ways. This PR fixes both.
1. dash plugin fails with `-W error`
```
Error while loading plugin "pytest11".
pytest.PytestRemovedIn10Warning: The hookimpl pytest_addhooks uses old-style configuration options (marks or attributes).
```
dash (from the `plot` group) registers a pytest plugin that configures a hook with the deprecated `@pytest.mark.tryfirst` (plotly/dash#2420). pytest 9.2.0 now applies warning filters while loading entry-point plugins, so `-W error` turns this into a startup failure.
Fix: `addopts = "-p no:dash"` in the pytest config. We don't use that plugin, and the option has no effect when dash isn't installed.
2. Crash on Python 3.10.0 (lower-bounds job)
```
INTERNALERROR> AttributeError: 'NodeId' object has no attribute '_str_cache'
```
pytest 9.2.0's new `NodeId` dataclass uses `slots=True` with an `init=False` field that has a default. CPython 3.10.0 never initializes such fields (bpo-44649, fixed in 3.10.1).
Fix: run the lower-bounds job on Python 3.10.2. 3.10.1 isn't available through uv. `requires-python` stays at `>=3.10`, since TorchJD itself is unaffected.
🤖 Generated with Claude Code