chore(deps): update all non-major dependencies by renovate[bot] · Pull Request #3407 · python-gitlab/python-gitlab
ℹ️ Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
| Package | Type | Update | Change | Age | Confidence |
|---|---|---|---|---|---|
| actions/checkout | action | patch | v6.0.2 → v6.0.3 |
||
| anyio (changelog) | minor | ==4.13.0 → ==4.14.0 |
|||
| codecov/codecov-action | action | patch | v6.0.1 → v6.0.2 |
||
| maxbrunet/pre-commit-renovate | repository | minor | 43.205.2 → 43.227.0 |
||
| pycqa/pylint | repository | patch | v4.0.5 → v4.0.6 |
||
| pylint (changelog) | patch | ==4.0.5 → ==4.0.6 |
|||
| pytest (changelog) | minor | ==9.0.3 → ==9.1.0 |
|||
| python | final | minor | 3.12-alpine → 3.14-alpine |
||
| python | stage | minor | 3.12-alpine → 3.14-alpine |
Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.
Release Notes
actions/checkout (actions/checkout)
v6.0.3
- Fix checkout init for SHA-256 repositories by @yaananth in #2439
- fix: expand merge commit SHA regex and add SHA-256 test cases by @yaananth in #2414
agronholm/anyio (anyio)
v4.14.0
-
Added support for Python 3.15
-
Added an asynchronous implementation of the
itertoolsmodule (#998; PR by @11kkw) -
Added the
local_portparameter toconnect_tcp()to allow binding to a specific local port before connecting (#1067; PR by @nullwiz) -
Added support for custom capacity limiters in async path and file I/O functions and classes
-
Added the
create_task()task group method for easier asyncio migration (returns aTaskHandle) (#1098) -
Changed
TaskGroup.start_soon()to return aTaskHandle -
Added an option for
TaskGroup.start()to return aTaskHandle(which then contains the start value in thestart_valueproperty) -
Added the
cancel()convenience method toTaskGroupas a shortcut for cancelling the task group's cancel scope -
Improved the error message when a known backend is not installed to suggest the install command (#1115; PR by @EmmanuelNiyonshuti)
-
Improved
anyio.Pathto preserve subclass types by returningSelfin methods that return path objects (#1130; PR by @EmmanuelNiyonshuti) -
Changed the parameter type annotation in
anyio.Path.write_bytes()to accept anyReadableBuffer, thus allowing it to acceptbytearrayandmemoryviewto matchpathlib.Path.write_bytes()(#1135; PR by @SAY-5) -
Changed several type annotations to only accept callables returning coroutine-like objects instead of arbitrary awaitables:
TaskGroup.start_soon()TaskGroup.start()anyio.from_thread.run()
This reverts an earlier change from v3.7.0 which was made in error. (#1153)
-
Changed
anyio.runto support callables returning arbitrary awaitables at runtime on all backends. Previously, this only worked on asyncio (#1171; PR by @gschaffner) -
Changed several classes (and their subclasses) to have
__slots__(with__weakref__):anyio.CancelScopeanyio.CapacityLimiteranyio.Conditionanyio.Eventanyio.Lockanyio.ResourceGuardanyio.Semaphore
-
Fixed cancellation exception escaping a cancel scope when triggered via
check_cancelled()in a worker thread (#1113) -
Fixed
TaskGroupraisingAttributeErrorinstead of a clear error when entered more than once (#1109; PR by @bahtya) -
Fixed lost type information when passing arguments to
lru_cache(#1104; PR by @Graeme22) -
Fixed test resumption after
KeyboardInterruptin async generator fixtures on the asyncio backend (#1060; PR by @EmmanuelNiyonshuti) -
Fixed import of
__main__into_processworkers when entrypoint script doesn't end in.py, such as when usingconsole_scriptentrypoints. (#1027; PR by @tapetersen) -
Fixed
SocketListener.from_socket()returning a TCP listener forAF_UNIXlistening sockets, causingaccept()to fail withENOTSUP(#1132; PR by @kudato) -
Fixed
UDPSocket.aclose()andConnectedUDPSocket.aclose()on asyncio returning before the underlying socket FD was actually released (#1147; PR by @matias-arrelid) -
Fixed trio backend test runner hanging indefinitely instead of raising an error when dynamically accessing an async fixture via
request.getfixturevalue(#1148; PR by @EmmanuelNiyonshuti) -
Fixed cancelling tasks started through a
BlockingPortalafter the portal has been stopped (#1013; PR by @puneetdixit200) -
Fixed
backend_optionsbeing ignored when running the Trio backend viaanyio.run(); the options are now passed as keyword arguments totrio.run()again, as documented (a regression from AnyIO 3) (#1161; PR by @Zac-HD) -
Fixed asyncio
LockandSemaphoredeadlocks caused by cancelled waiters left queued during release (#1145; PR by @rasmusfaber, @x42005e1f and @agronholm)
maxbrunet/pre-commit-renovate (maxbrunet/pre-commit-renovate)
v43.227.0
See https://github.com/renovatebot/renovate/releases/tag/43.227.0 for more changes
v43.226.2
See https://github.com/renovatebot/renovate/releases/tag/43.226.2 for more changes
v43.226.1
See https://github.com/renovatebot/renovate/releases/tag/43.226.1 for more changes
v43.226.0
See https://github.com/renovatebot/renovate/releases/tag/43.226.0 for more changes
v43.225.0
See https://github.com/renovatebot/renovate/releases/tag/43.225.0 for more changes
v43.224.0
See https://github.com/renovatebot/renovate/releases/tag/43.224.0 for more changes
v43.223.0
See https://github.com/renovatebot/renovate/releases/tag/43.223.0 for more changes
v43.222.1
See https://github.com/renovatebot/renovate/releases/tag/43.222.1 for more changes
v43.222.0
See https://github.com/renovatebot/renovate/releases/tag/43.222.0 for more changes
v43.221.0
See https://github.com/renovatebot/renovate/releases/tag/43.221.0 for more changes
v43.220.0
See https://github.com/renovatebot/renovate/releases/tag/43.220.0 for more changes
v43.218.0
See https://github.com/renovatebot/renovate/releases/tag/43.218.0 for more changes
v43.217.1
See https://github.com/renovatebot/renovate/releases/tag/43.217.1 for more changes
v43.217.0
See https://github.com/renovatebot/renovate/releases/tag/43.217.0 for more changes
v43.216.4
See https://github.com/renovatebot/renovate/releases/tag/43.216.4 for more changes
v43.216.1
See https://github.com/renovatebot/renovate/releases/tag/43.216.1 for more changes
v43.216.0
See https://github.com/renovatebot/renovate/releases/tag/43.216.0 for more changes
v43.214.6
See https://github.com/renovatebot/renovate/releases/tag/43.214.6 for more changes
v43.214.5
See https://github.com/renovatebot/renovate/releases/tag/43.214.5 for more changes
v43.214.4
See https://github.com/renovatebot/renovate/releases/tag/43.214.4 for more changes
v43.214.3
See https://github.com/renovatebot/renovate/releases/tag/43.214.3 for more changes
v43.214.2
See https://github.com/renovatebot/renovate/releases/tag/43.214.2 for more changes
v43.214.1
See https://github.com/renovatebot/renovate/releases/tag/43.214.1 for more changes
v43.214.0
See https://github.com/renovatebot/renovate/releases/tag/43.214.0 for more changes
v43.213.3
See https://github.com/renovatebot/renovate/releases/tag/43.213.3 for more changes
v43.213.2
See https://github.com/renovatebot/renovate/releases/tag/43.213.2 for more changes
v43.213.1
See https://github.com/renovatebot/renovate/releases/tag/43.213.1 for more changes
v43.213.0
See https://github.com/renovatebot/renovate/releases/tag/43.213.0 for more changes
v43.212.4
See https://github.com/renovatebot/renovate/releases/tag/43.212.4 for more changes
v43.212.2
See https://github.com/renovatebot/renovate/releases/tag/43.212.2 for more changes
v43.212.1
See https://github.com/renovatebot/renovate/releases/tag/43.212.1 for more changes
v43.212.0
See https://github.com/renovatebot/renovate/releases/tag/43.212.0 for more changes
v43.211.0
See https://github.com/renovatebot/renovate/releases/tag/43.211.0 for more changes
v43.210.2
See https://github.com/renovatebot/renovate/releases/tag/43.210.2 for more changes
v43.210.1
See https://github.com/renovatebot/renovate/releases/tag/43.210.1 for more changes
v43.209.5
See https://github.com/renovatebot/renovate/releases/tag/43.209.5 for more changes
v43.209.4
See https://github.com/renovatebot/renovate/releases/tag/43.209.4 for more changes
v43.209.3
See https://github.com/renovatebot/renovate/releases/tag/43.209.3 for more changes
v43.209.2
See https://github.com/renovatebot/renovate/releases/tag/43.209.2 for more changes
v43.209.1
See https://github.com/renovatebot/renovate/releases/tag/43.209.1 for more changes
v43.209.0
See https://github.com/renovatebot/renovate/releases/tag/43.209.0 for more changes
v43.208.2
See https://github.com/renovatebot/renovate/releases/tag/43.208.2 for more changes
v43.208.1
See https://github.com/renovatebot/renovate/releases/tag/43.208.1 for more changes
v43.208.0
See https://github.com/renovatebot/renovate/releases/tag/43.208.0 for more changes
v43.207.4
See https://github.com/renovatebot/renovate/releases/tag/43.207.4 for more changes
v43.207.3
See https://github.com/renovatebot/renovate/releases/tag/43.207.3 for more changes
v43.207.2
See https://github.com/renovatebot/renovate/releases/tag/43.207.2 for more changes
v43.207.1
See https://github.com/renovatebot/renovate/releases/tag/43.207.1 for more changes
pycqa/pylint (pycqa/pylint)
v4.0.6
What's new in Pylint 4.0.6?
Release date: 2026-06-14
False Positives Fixed
-
implicit-str-concatis no longer emitted for an implicit concatenation of
a raw string with a non-raw one (e.g.r"\d" "\n"). Such literals cannot be
merged into a single string, so the concatenation is intentional rather than a
forgotten comma.Closes #6663
-
Fix a false positive for
invalid-name(C0103) where the default
typevar-rgxrejectedTypeVarnames containing digits, such as
Ec2T.Closes #8499
-
Fix a false positive for
too-many-argumentsin (non-static) methods and classmethods.Closes #8675
-
Fix a false positive for
no-memberwhen a value is inferred to several
possible types and at least one of them defines a dynamic__getattr__.Closes #9833
-
Fix a false positive for
function-redefined(E0102) when reusing names that
matchdummy-variables-rgx(such as_), which is common for
pytest-bddstep definitions. This restores the behavior from before pylint
4.0.0; as a consequence the false negative fixed in #9894 is reintroduced for
functions whose name matchesdummy-variables-rgx.Closes #10665
-
Fix
undefined-variablefalse positive when a name used as ametaclass
argument in a nested class is referenced again later in the module.Closes #10823
-
Fix a false positive for
unused-variablewhere global variables matching
dummy-variables-rgxwere still reported as unused when
allow-global-unused-variableswas disabled.Closes #10890
-
Fix a false positive for
bad-dunder-namewhen there is a user-defined__suppress_context__attribute on exception subclasses.Closes #10960
-
Fix
used-before-assignmentfalse positive for names bound byfrom X import *in every branch of anif/elif/elsechain.Refs #10980
-
Check for metaclass call signature when evaluating arguments of a class call.
Closes #11032
-
Fix false positive
method-hiddenwhencached_propertyis imported directly withfrom functools import cached_property.Refs #11037
Other Bug Fixes
-
Fix the suggestion of
unnecessary-comprehensionfor a dict comprehension
that iterates a dict directly, e.g.{a: b for a, b in d}. Iterating a dict
yields its keys, so the suggestion is nowdict(d.keys())instead of the
incorrectdict(d), which would simply copyd.Closes #8256
-
Fix a crash in
consider-using-enumeratewhen theforloop target is an attribute (e.g.for self.idx in range(len(x))) rather than a simple variable name.Closes #10099
-
Fix crash when checking
attribute-defined-outside-initon classes that inherit from a base class pylint cannot fully analyze.Closes #10892
-
Fix
add_messagesilently overwriting an explicitcol_offset=0(or any other zero-valuedline/end_lineno/end_col_offset) with the AST node's value. The internal_add_one_messagehelper used a falsey check (if not col_offset:) to detect an omitted argument, which incorrectly treated a legitimate0the same asNone. It now uses an identity check againstNone.Refs #11020
-
Fix a crash in the name checker when a non-constant value is passed as the
covariantorcontravariantargument of aTypeVar.Closes #11022
-
Fix a crash in the variable checker when a name resolves to a dataclass-synthesized
__init__, which has no line number.Closes #11023
-
Fix a crash in the variables checker when
NotImplementedis used as the test of anifstatement, which raised aTypeErrorin a boolean context on Python 3.14.Closes #11025
-
Avoided a crash from the implicit booleaness checker for
len()calls without arguments.Closes #11028
-
Fix a crash in the variables checker when a class declares a metaclass whose
attribute-access chain does not bottom out at a name (e.g.
class C(metaclass=None._)).
Originally reported aspylint-dev/astroid#3066.Refs #11031
-
Fix a crash in the name checker when a chained assignment of a
TypeAlias
value has a non-name target such as aSubscript(for example
a[0] = b = TypeAlias).Closes #11056
-
Fix a crash in the deprecated checker when
__import__is called with a
non-string constant argument (for example__import__(1)).Closes #11059
-
Avoid crashing when enum member inference fails while checking enum subclasses.
Closes #11069
-
Prevent a crash in
unexpected-keyword-arganalysis when
infer_call_result()raisesInferenceErrorwhile inspecting
decorator return signatures.Closes #11070
-
Fix a crash in the typecheck checker when a class uses a non-class object
(for example a function) as itsmetaclass=argument.Closes #11071
-
Allow digits in ParamSpec and TypeVarTuple names for
invalid-namecheck.The default
paramspec-rgxandtypevartuple-rgxpatterns rejected names
containing digits (e.g.Ec2P,S3Ts), emitting a falseinvalid-name
(C0103). Allow digits in the lowercase segments, consistent with the
typevarandtypealiaspatterns.Closes #11090
Performance Improvements
-
The duplicate-code checker no longer runs when its message (R0801) is disabled, even if
reports=yesis set. Previously, the checker's report (RP0801) would cause the expensive similarity computation to run regardless.Closes #3443
pylint-dev/pylint (pylint)
v4.0.6
What's new in Pylint 4.0.6?
Release date: 2026-06-14
False Positives Fixed
-
implicit-str-concatis no longer emitted for an implicit concatenation of
a raw string with a non-raw one (e.g.r"\d" "\n"). Such literals cannot be
merged into a single string, so the concatenation is intentional rather than a
forgotten comma.Closes #6663
-
Fix a false positive for
invalid-name(C0103) where the default
typevar-rgxrejectedTypeVarnames containing digits, such as
Ec2T.Closes #8499
-
Fix a false positive for
too-many-argumentsin (non-static) methods and classmethods.Closes #8675
-
Fix a false positive for
no-memberwhen a value is inferred to several
possible types and at least one of them defines a dynamic__getattr__.Closes #9833
-
Fix a false positive for
function-redefined(E0102) when reusing names that
matchdummy-variables-rgx(such as_), which is common for
pytest-bddstep definitions. This restores the behavior from before pylint
4.0.0; as a consequence the false negative fixed in #9894 is reintroduced for
functions whose name matchesdummy-variables-rgx.Closes #10665
-
Fix
undefined-variablefalse positive when a name used as ametaclass
argument in a nested class is referenced again later in the module.Closes #10823
-
Fix a false positive for
unused-variablewhere global variables matching
dummy-variables-rgxwere still reported as unused when
allow-global-unused-variableswas disabled.Closes #10890
-
Fix a false positive for
bad-dunder-namewhen there is a user-defined__suppress_context__attribute on exception subclasses.Closes #10960
-
Fix
used-before-assignmentfalse positive for names bound byfrom X import *in every branch of anif/elif/elsechain.Refs #10980
-
Check for metaclass call signature when evaluating arguments of a class call.
Closes #11032
-
Fix false positive
method-hiddenwhencached_propertyis imported directly withfrom functools import cached_property.Refs #11037
Other Bug Fixes
-
Fix the suggestion of
unnecessary-comprehensionfor a dict comprehension
that iterates a dict directly, e.g.{a: b for a, b in d}. Iterating a dict
yields its keys, so the suggestion is nowdict(d.keys())instead of the
incorrectdict(d), which would simply copyd.Closes #8256
-
Fix a crash in
consider-using-enumeratewhen theforloop target is an attribute (e.g.for self.idx in range(len(x))) rather than a simple variable name.Closes #10099
-
Fix crash when checking
attribute-defined-outside-initon classes that inherit from a base class pylint cannot fully analyze.Closes #10892
-
Fix
add_messagesilently overwriting an explicitcol_offset=0(or any other zero-valuedline/end_lineno/end_col_offset) with the AST node's value. The internal_add_one_messagehelper used a falsey check (if not col_offset:) to detect an omitted argument, which incorrectly treated a legitimate0the same asNone. It now uses an identity check againstNone.Refs #11020
-
Fix a crash in the name checker when a non-constant value is passed as the
covariantorcontravariantargument of aTypeVar.Closes #11022
-
Fix a crash in the variable checker when a name resolves to a dataclass-synthesized
__init__, which has no line number.Closes #11023
-
Fix a crash in the variables checker when
NotImplementedis used as the test of anifstatement, which raised aTypeErrorin a boolean context on Python 3.14.Closes #11025
-
Avoided a crash from the implicit booleaness checker for
len()calls without arguments.Closes #11028
-
Fix a crash in the variables checker when a class declares a metaclass whose
attribute-access chain does not bottom out at a name (e.g.
class C(metaclass=None._)).
Originally reported aspylint-dev/astroid#3066.Refs #11031
-
Fix a crash in the name checker when a chained assignment of a
TypeAlias
value has a non-name target such as aSubscript(for example
a[0] = b = TypeAlias).Closes #11056
-
Fix a crash in the deprecated checker when
__import__is called with a
non-string constant argument (for example__import__(1)).Closes #11059
-
Avoid crashing when enum member inference fails while checking enum subclasses.
Closes #11069
-
Prevent a crash in
unexpected-keyword-arganalysis when
infer_call_result()raisesInferenceErrorwhile inspecting
decorator return signatures.Closes #11070
-
Fix a crash in the typecheck checker when a class uses a non-class object
(for example a function) as itsmetaclass=argument.Closes #11071
-
Allow digits in ParamSpec and TypeVarTuple names for
invalid-namecheck.The default
paramspec-rgxandtypevartuple-rgxpatterns rejected names
containing digits (e.g.Ec2P,S3Ts), emitting a falseinvalid-name
(C0103). Allow digits in the lowercase segments, consistent with the
typevarandtypealiaspatterns.Closes #11090
Performance Improvements
-
The duplicate-code checker no longer runs when its message (R0801) is disabled, even if
reports=yesis set. Previously, the checker's report (RP0801) would cause the expensive similarity computation to run regardless.Closes #3443
pytest-dev/pytest (pytest)
v9.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 aspytest.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 runningpytest.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.
Seehook-markersfor more details. -
#14434: The
--pastebinoption is now deprecated.
The same functionality is now available in an external plugin,pytest-pastebin.
Seepastebin-deprecatedfor more details. -
#14513: The private
FixtureDef.has_locationattribute is now deprecated and will be removed in pytest 10.
Seefixturedef-has-location-deprecatedfor details. -
#1764:
pytest.console_mainis now deprecated and will be removed in pytest 10.
It was never intended for programmatic use; usepytest.maininstead.
New features
-
#12376: Added
pytest.register_fixture()to register fixtures using an imperative interface.This is an advanced function intended for use by plugins.
Normally, fixtures should be registered declaratively using the
@pytest.fixture <pytest.fixture>decorator.
Pytest looks for these fixture definitions during the collection phase and registers them automatically.
For some plugin usecases the declarative interface can be cumbersome or unviable, in which case this imperative interface can be used. -
#14023: Added --report-chars long CLI option.
-
#14371: Added
--max-warningscommand-line option andmax_warningsconfiguration option to fail the test run when the number of warnings exceeds a given threshold -- bymiketheman. -
#6757: Added the
assertion_text_diff_styleconfiguration option, allowing
string equality failures to be rendered as separateLeft:andRight:
blocks instead ofndiffoutput. -
#8395: Added support for
~datetime.datetimeand~datetime.timedeltacomparisons withpytest.approx. An explicitabsorreltolerance as a~datetime.timedeltais required and relative tolerance is not supported for datetime comparisons -- byhamza-mobeen.
Improvements in existing functionality
-
#11225:
pytest.warnsnow shows "Regex pattern did not match" instead of "DID NOT WARN" when warnings were emitted but thematchpattern did not match. -
#11295: Improved output of
--fixtures-per-testby excluding internal-implementation fixtures generated by@pytest.mark.parametrizeand similar. -
#13241:
pytest.raises,pytest.warnsandpytest.deprecated_callnow usesParamSpecfor the type hint to the (old and not recommended) callable overload, instead ofAny. This allows type checkers to raise errors when passing incorrect function parameters.
funccan now also be passed as a kwarg, which the type hint previously showed as possible but didn't accept. -
#13862: Improved the readability of "DID NOT RAISE" error messages by using the exception type's name instead of its repr.
-
#14026: Added test coverage for compiled regex patterns in
pytest.raisesmatch parameter. -
#14137: pytest.ScopeName is now public to allow using it in function signatures.
-
#14342: Marked
yield_fixtureas deprecated to type checkers using thedeprecateddecorator. Note it
has originally been deprecated <yield-fixture-deprecated>in pytest 6.2 already. -
#14373: Added type annotations for
pytest.approx. -
#14430: When using
--setup-show, a space is now printed after the test name (and possibly used fixtures), to separate it from the test result. -
#14441: Reduced the default number of
gc.collect()passes in theunraisableexceptionplugin from 5 to 1 on CPython, where reference counting makes a single pass sufficient. PyPy retains 5 passes due to object resurrection via__del__. This can noticeably speed up test suites that trigger many pytester runs. -
#14461: Improved assertion failure explanations for equality comparisons between mapping objects that are not
dictinstances. -
#14513: The order in which fixture definitions overriding each other are resolved is now determined first by their visibility in the collection tree rather than by the order in which they are registered.
A fixture defined for a more specific node (e.g. a module or an item) now always takes precedence over one with the same name defined for a more general node (e.g. the session), even when the more general one was registered later.
Fixtures with non-comparable visibility or the same visibility keep the existing behavior of "last registered wins".
This change is supposed to only affect plugins which register multiple fixtures programmatically with the same name. -
#14524: Add official Python 3.15 support.
-
#1764: Improved argparse program name to show
pytest,python -m pytest, orpytest.main()based on how pytest was invoked, making help and error messages clearer. -
#8265: Emit a
PytestCollectionWarningwhen a module-level__getattr__returnsNoneforpytestmarkinstead of raisingAttributeError.Previously this caused a cryptic
TypeError: got None instead of Markerror.
Now pytest issues a helpful warning and continues collecting the module normally.
Bug fixes
-
#13192: Fixed | (pipe) not being treated as a regex meta-character that needs escaping in
pytest.raises(match=...) <pytest.raises>. -
#13484: Fixed
-Woption values being duplicated inConfig.known_args_namespace. -
#13626: Fixed function-scoped fixture values being kept alive after a test was interrupted by
KeyboardInterruptor early exit,
allowing them to potentially be released more promptly. -
#13784: Fixed
capteesysproducing doubled output when used with--capture=no(-s). -
#13817: Fixed a secondary AttributeError masking the original error when an option argument fails to initialize.
-
#13884: Fixed rare internal IndexError caused by builtins.compile being overridden in client code.
-
#13885: Fixed autouse fixtures defined inside a
unittest.TestCaseclass running even when the class is decorated withunittest.skiporunittest.skipIf-- regression since pytest 8.1.0. -
#13917:
unittest.SkipTestis no longer considered an interactive exception, i.e.pytest_exception_interactis no longer called for it. -
#13963: Fixed subtests running with
pytest-xdistwhen their contexts contain objects that are not JSON-serializable.Fixes pytest-dev/pytest-xdist#1273.
-
#14004: Fixed conftest.py fixture scoping when
testpathspoints outside of therootdir <rootdir>.Previously, fixtures from nested conftest.py files would incorrectly leak to sibling directories
when using a relativetestpathslike../tests/sdk.Conftest fixtures are now parsed during
Directory <pytest.Directory>collection, using theDirectorynode for proper scoping. -
#14050: Display dictionary differences in assertion failures using the original key insertion order instead of sorted order.
-
#14080: fix missing type annotations on
Pytester.makepyfileandPytester.maketxtfilemethods. -
#14114: An exception from
pytest_fixture_post_finalizerno longer prevents fixtures from being torn down, causing additional errors in the following tests. -
#14161: Fixed
monkeypatch.setattr() <pytest.MonkeyPatch.setattr>leaving a stale entry on the undo stack when the underlyingsetattr()call fails (e.g. on immutable targets), causing anAttributeErrorcrash during teardown. -
#14214: Fixed
-vhint inpytest.raisesmatch diff not working because assertion verbosity was not propagated. -
#14234: Allow
pytest.HIDDEN_PARAM <hidden-param>in@pytest.mark.parametrize(ids=...) <pytest.mark.parametrize ref>typing. -
#14248: Fixed direct parametrization causing the static fixture closure (as reflected in
request.fixturenames <pytest.FixtureRequest.fixturenames>) to omit fixtures that are requested transitively from overridden fixtures. -
#14263: Unraisable exceptions from finalizers are now collected during
pytest_unconfigure, before pytest tears down the warning filters installed for the session. Previously the collection ran from a cleanup callback whose order relative to other plugins' cleanups was not guaranteed, so an activeerrorfilter could be removed before the exception surfaced and a late resource leak would pass silently. A-W errorfilter, or any filter matchingpytest.PytestUnraisableExceptionWarning, now promotes these exceptions to failures regardless of plugin cleanup order. -
#14377: Fixed crash in Config.get_terminal_writer when an assertion fails with the
terminalreporterplugin disabled. -
#14381: Fixed
-V(short form of--version) to properly display the current version. -
#14389: Improved
pytest.raises(..., match=...) <pytest.raises>failures to suppress the mismatched exception as a cause of the resultingAssertionError. -
#14392: Fixed a bug in
pytest.raises(match=...) <pytest.raises>"fully escaped" detection, causing the regex diff display to be shown in some instances when the raw string diff display should be shown instead. -
#14442: Fixed a regression in pytest 9.0 where
--strict-markersand--strict-configspecified throughaddoptswere silently ignored.Note that when targeting pytest >= 9.0, it's nicer to use
strict_markersandstrict_config, orstrict mode <strict mode>. -
#14456: Fixed
pytest.approxnot recognizing types with__array_interface__as numpy-like arrays. -
#14474: Fixed a regression where
-kand-mexpressions containing both backslash characters in identifiers and string literal arguments would incorrectly raise aSyntaxErrorabout escaping. -
#14483: Fixed JUnit XML report incorrectly escaping high Unicode codepoints (supplementary plane characters like emoji) in test failure messages. -- by
EternalRights -
#14492: Fixed
Code.getargs()incorrectly including local variable names in the returned argument tuple for functions with*argsand/or**kwargs. The method was usingco_flagsbitmask values (4and8) directly as counts instead of converting them to1viabool(), and was not accounting forco_kwonlyargcountwhenvar=True. -
#3697: Logging capture now works for non-propagating loggers.
Previously only logs which reached the root logger were captured.
This includescaplogand the "Captured log calls" test reporting. -
#3850: Fixed JUnit XML report: the
testsattribute of the<testsuite>element now always matches the number of
✂ Note
PR body was truncated to here.
Configuration
📅 Schedule: (UTC)
- Branch creation
- Between 12:00 AM and 03:59 AM, only on Monday (
* 0-3 * * 1)
- Between 12:00 AM and 03:59 AM, only on Monday (
- Automerge
- At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.