build(deps): update pytest requirement from >=6.0.0 to >=9.1.0 by dependabot[bot] · Pull Request #6591 · getsentry/sentry-python
Conversation
Updates the requirements on pytest to permit the latest version.
Release notes
Sourced from pytest's releases.
9.1.0
pytest 9.1.0 (2026-06-13)
Removals and backward incompatible breaking changes
#14533: When using
--doctest-modules, autouse fixtures withmodule,packageorsessionscope that are defined inline in Python test modules (not plugins or conftests) will now possibly execute twice.If this is undesirable, move the fixture definition to a
conftest.pyfile if possible.Technical explanation for those interested: When using --doctest-modules, pytest possibly collects Python modules twice, once as
pytest.Moduleand once as aDoctestModule(depending on the configuration). Due to improvements in pytest's fixture implementation, if e.g. theDoctestModulecollects a fixture, it is now visible to it only, and not to theModule. This means that both need to register the fixtures independently.Deprecations (removal in next major release)
#10819: Added a deprecation warning for class-scoped fixtures defined as instance methods (without
@classmethod). Such fixtures set attributes on a different instance than the test methods use, leading to unexpected behavior. Use@classmethoddecorator instead -- byyastcher.See
10819and14011.#12882: Calling
request.getfixturevalue() <pytest.FixtureRequest.getfixturevalue>during teardown to request a fixture that was not already requested is now deprecated and will become an error in pytest 10.See
dynamic-fixture-request-during-teardownfor details.#13409: Using non-
~collections.abc.Collectioniterables (such as generators, iterators, or custom iterable objects) for theargvaluesparameter in@pytest.mark.parametrize <pytest.mark.parametrize ref>andmetafunc.parametrize <pytest.Metafunc.parametrize>is now deprecated.These iterables get exhausted after the first iteration, leading to tests getting unexpectedly skipped in cases such as running
pytest.main()multiple times, using class-level parametrize decorators, or collecting tests multiple times.See
parametrize-iteratorsfor details and suggestions.#13946: The private
config.inicfgattribute is now deprecated. Useconfig.getini() <pytest.Config.getini>to access configuration values instead.See
config-inicfgfor more details.#14004: Passing
baseidto~pytest.FixtureDefornodeidstrings to fixture registration APIs is now deprecated. These are internal pytest APIs that are used by some plugins.Use the
nodeparameter instead for fixture scoping. This enables more robust node-based matching instead of string prefix matching. If you've usednodeid=None, passnode=sessioninstead.This will be removed in pytest 10.
#14335: The method of configuring hooks using markers, deprecated since pytest 7.2, is now scheduled to be removed in pytest 10. See
hook-markersfor more details.#14434: The
--pastebinoption is now deprecated.
... (truncated)
Commits
b2522cfPrepare release version 9.1.0368d2fc[refactor] TightenSetComparisonFunctiontoIterator[str](#14587)ff77cd8[refactor] Make base assertion comparisons return an iterator instead of a li...0d8491abuild(deps): Bump actions/stale from 10.2.0 to 10.3.04a809d9Merge pull request #14568 from pytest-dev/register-fixture5dfa385Fix recursion traceback test to cover all styles (#14582)f52ff0cAddpytest.register_fixturea8ac094Merge pull request #14567 from pytest-dev/more-visibility-deprecatee5620cd[pre-commit.ci] pre-commit autoupdate (#14577)2ce9c6dMerge pull request #14540 from minbang930/fix-14533-doctest-module-fixtures- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3c22c9c. Configure here.
| @@ -1,5 +1,5 @@ | |||
| pip | |||
| pytest>=6.0.0 | |||
| pytest>=9.1.0 | |||
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest floor breaks tox
High Severity
Setting pytest>=9.1.0 in requirements-testing.txt cannot be satisfied together with existing tox.ini dependency lines that still cap pytest below 7, 8, or 8.2 for several environments. Pytest 9.1 also requires Python 3.10+, while tox still installs this requirements file for Python 3.8 and 3.9 jobs, so those envs fail at install time.
Reviewed by Cursor Bugbot for commit 3c22c9c. Configure here.
Codecov Results 📊
✅ 62411 passed | ⏭️ 3208 skipped | Total: 65619 | Pass Rate: 95.11% | Execution Time: 230m 34s
📊 Comparison with Base Branch
| Metric | Change |
|---|---|
| Total Tests | 📉 -31398 |
| Passed Tests | 📉 -28569 |
| Failed Tests | — |
| Skipped Tests | 📉 -2829 |
All tests are passing successfully.
✅ Patch coverage is 100.00%. Project has 3015 uncovered lines.
❌ Project coverage is 87.25%. Comparing base (base) to head (head).
Coverage diff
@@ Coverage Diff @@ ## main #PR +/-## ========================================== - Coverage 89.79% 87.25% -2.54% ========================================== Files 192 192 — Lines 23652 23652 — Branches 8154 8154 — ========================================== + Hits 21238 20637 -601 - Misses 2414 3015 +601 - Partials 1344 1381 +37
Generated by Codecov Action
