fix(deps): update third party deps#5489
Conversation
|
a55c0ee to
15524b0
Compare
15524b0 to
800d4e1
Compare
800d4e1 to
287fa59
Compare
287fa59 to
260cd4c
Compare
260cd4c to
4398d4b
Compare
4398d4b to
039f7de
Compare
039f7de to
2272d3d
Compare
There was a problem hiding this comment.
π Lock file not regenerated after dependency changes
The uv.lock file was not updated as part of this PR (no diff in uv.lock). This means none of the three dependency changes (opentelemetry bump, onnxruntime constraint change, pytest bump) are reflected in the lock file. At uv.lock:3151, the turn-detector still shows specifier = ">=1.18,<1.24" and the opentelemetry entries will still reference 1.39.x versions. Running uv lock after merging is necessary, but it will fail due to the onnxruntime constraint conflict reported as BUG-0001.
Was this helpful? React with π or π to provide feedback.
| "numpy>=1.26", | ||
| "onnxruntime>=1.18; python_version >= '3.11'", | ||
| "onnxruntime>=1.18,<1.24; python_version < '3.11'", | ||
| "onnxruntime>=1.26,<1.27; python_version < '3.11'", |
There was a problem hiding this comment.
π΄ Workspace dependency resolution fails on Python < 3.11 due to conflicting onnxruntime constraints
The workspace-level constraint caps onnxruntime below 1.24 for Python < 3.11 (pyproject.toml:2), but the turn-detector plugin now requires onnxruntime >=1.27 for the same Python versions (livekit-plugins/livekit-plugins-turn-detector/pyproject.toml:28), so dependency resolution is impossible on Python 3.10.
Impact: Installing or syncing the workspace on Python 3.10 will fail with an unsatisfiable dependency error.
Conflicting constraint-dependencies vs plugin requirement
Root pyproject.toml:2 declares:
constraint-dependencies = ['onnxruntime<1.24; python_version < "3.11"']
The turn-detector plugin at livekit-plugins/livekit-plugins-turn-detector/pyproject.toml:28 now requires:
"onnxruntime>=1.27,<1.28; python_version < '3.11'",
The constraint says onnxruntime must be < 1.24, but the plugin requires >= 1.27. These ranges have no overlap, making resolution impossible. The root constraint was set to match the old requirement (>=1.18,<1.24) but was not updated when the plugin bumped to >=1.27,<1.28.
The fix is to update line 2 of pyproject.toml to something like:
constraint-dependencies = ['onnxruntime<1.28; python_version < "3.11"']
Was this helpful? React with π or π to provide feedback.
2272d3d to
d2aeabd
Compare
d2aeabd to
bf55c9e
Compare
bf55c9e to
7707958
Compare
| "numpy>=1.26", | ||
| "onnxruntime>=1.18; python_version >= '3.11'", | ||
| "onnxruntime>=1.18,<1.24; python_version < '3.11'", | ||
| "onnxruntime>=1.26,<1.27; python_version < '3.11'", |
There was a problem hiding this comment.
π© onnxruntime version bump narrows the window for Python 3.10 significantly
The old constraint >=1.18,<1.24 allowed a wide range of onnxruntime versions for Python 3.10. The new constraint >=1.27,<1.28 pins to a single minor release series. If onnxruntime 1.27.x does not actually publish Python 3.10 wheels (historically onnxruntime dropped 3.10 support around 1.20), this constraint would be unsatisfiable regardless of the workspace cap fix. The PR author should verify that onnxruntime 1.27 actually ships wheels for Python 3.10 on PyPI.
Was this helpful? React with π or π to provide feedback.
7707958 to
c390a7d
Compare
c390a7d to
768ad48
Compare
768ad48 to
bf9e04c
Compare
bf9e04c to
7da2a15
Compare
7da2a15 to
d6b9a2b
Compare
d6b9a2b to
7b1ec50
Compare
| "opentelemetry-api~=1.43.0", | ||
| "opentelemetry-sdk~=1.43.0", | ||
| "opentelemetry-exporter-otlp~=1.43.0", |
There was a problem hiding this comment.
π OpenTelemetry jump spans 4 minor versions β verify API compatibility
The opentelemetry packages were bumped from ~=1.39.0 to ~=1.43.0 at livekit-agents/pyproject.toml:48-50. This skips versions 1.40, 1.41, and 1.42. While the ~= operator constrains to >=1.43.0,<1.44.0, a 4-minor-version jump may include breaking changes in the OpenTelemetry SDK's internal APIs (e.g., changes to exporter configuration, span processor behavior, or metric instrument signatures). The telemetry code in livekit-agents/livekit/agents/telemetry/ should be verified against the 1.43 changelog to ensure no breaking changes affect the codebase.
Was this helpful? React with π or π to provide feedback.
7b1ec50 to
b18fbbf
Compare
4f875f2 to
6e8b62e
Compare
Generated by renovateBot
6e8b62e to
16d110b
Compare
This PR contains the following updates:
==0.60.1β==0.61.2>=1.18,<1.24β>=1.27,<1.28~=1.39.0β~=1.43.0~=1.39.0β~=1.43.0~=1.39.0β~=1.43.0>=9.0.3,<9.1β>=9.1.1,<9.2Release Notes
open-telemetry/opentelemetry-python (opentelemetry-api)
v1.43.0Compare Source
Added
opentelemetry-sdk: addadd_metric_reader/remove_metric_readerpublicAPIs to register / unregister metric readers at runtime.
(#β4863)
opentelemetry-exporter-prometheus: add support for configuring metric scopelabels
(#β5123)
opentelemetry-exporter-otlp-proto-grpc: Add grpc error details to the logmessage that's written when the grpc call fails.
(#β5143)
opentelemetry-exporter-http-transport: add'opentelemetry-exporter-http-transport' package for HTTP exporters
(#β5194)
opentelemetry-sdk: Addcomposite/developmentsamplers support todeclarative file configuration
(#β5201)
opentelemetry-exporter-otlp-json-file: Add OTLP JSON File exporterimplementation
(#β5207)
opentelemetry-sdk: add_resolve_componentshared utility for declarativeconfig plugin loading, reducing boilerplate in exporter factory functions
(#β5215)
opentelemetry-sdk: add pull metric reader support to declarative fileconfiguration, including Prometheus metric reader via the
prometheus_developmentconfig field(#β5216)
opentelemetry-proto-json: update to use opentelemetry-proto v1.10.0(#β5224)
opentelemetry-proto: bump maximum supported protobuf version to 7.x.x(#β5251)
opentelemetry-sdk: addServiceInstanceIdResourceDetectorfor populatingservice.instance.id(#β5259)
opentelemetry-sdk: declarative config loader now recursively convertsparsed dicts into typed dataclass instances, including nested dataclasses,
lists of dataclasses, and enum values. End-to-end YAML/JSON β SDK
configuration now works via the factory functions.
(#β5269)
opentelemetry-sdk: addconfigure_sdk(config)to the declarativeconfiguration API. Single entry point that takes a parsed
OpenTelemetryConfiguration, builds the resource, and applies thetracer/meter/logger providers and propagator globally. Honors the top-level
disabledflag.(#β5270)
opentelemetry-sdk: the SDK configurator now honors theOTEL_CONFIG_FILEenvironment variable. When set, the SDK loads and applies the referenced
declarative configuration file (YAML or JSON) in place of the env-var-based
init path.
(#β5271)
opentelemetry-sdk: update declarative config to useServiceInstanceIdResourceDetector(#β5299)
opentelemetry-exporter-otlp-proto-common,opentelemetry-exporter-otlp-json-common: encoders now always accept null,and encode it as an empty
AnyValuein accordance with the spec.(#β5305)
opentelemetry-sdk: validate the declarative configfile_formatversion βreject an unsupported major version and warn on a newer minor version, per
the configuration spec versioning rules
(#β5315)
opentelemetry-exporter-http-transport: enable entry-point loading oftransport implementations
(#β5320)
Changed
opentelemetry-sdk: introduce experimental entry points for OpAMP agentintegration
(#β4646)
opentelemetry-api: conditionally import entrypoints foropentelemetry_contextonly if theOTEL_PYTHON_CONTEXTenv variable isdefined, return
ContextVarsRuntimeContextotherwise(#β5144)
opentelemetry-sdk: rename "known/unknown" to "built-in/user-defined"terminology in declarative config component loading code
(#β5214)
opentelemetry-proto: regenerate protobuf code from opentelemetry-protov1.10.0
(#β5223)
opentelemetry-sdk: remove unnecessarycopyin Span creation(#β5272)
(#β5274)
opentelemetry-sdk: inline the method_clean_attribute_value(#β5275)
typing.Unionandtyping.Optionalwith|.(#β5277)
(#β5287)
(#β5288)
opentelemetry-api: updateEnvironmentGetterto ignore non-normalizedenvironment variable names
(#β5289)
(#β5297)
(#β5298)
(#β5326)
opentelemetry-api: normalize empty environment propagation names to_inEnvironmentSetterandEnvironmentGetter(#β5328)
Fixed
.rstfiles to Sphinx documentation build for SDK logs,propagators, and exporter submodules.
(#β5017)
setting the random trace id bit depending on the available trace id
generator.
(#β5241)
opentelemetry-api: fix SelectableGroups deprecation warning(#β5250)
opentelemetry-sdk: makeSynchronousMeasurementConsumer.consume_measurementlock free to avoiddeadlocks
(#β5321)
v1.42.1Compare Source
Fixed
setting the random trace id bit depending on the available trace id
generator.
(#β5241)
v1.42.0Compare Source
Added
opentelemetry-api,opentelemetry-sdk: add support for 'random-trace-id'flags in W3C traceparent header trace flags. Implementations of
IdGeneratorthat do randomly generate the 56 least significant bits, should also
implement a
is_trace_id_randommethods that returnsTrue.(#β4854)
(#β4908)
opentelemetry-exporter-otlp-proto-grpc: make retryable gRPC error codesconfigurable for gRPC exporters
(#β4917)
opentelemetry-sdk: Addcreate_logger_provider/configure_logger_providerto declarative file configuration, enabling LoggerProvider instantiation from
config files without reading env vars
(#β4990)
opentelemetry-exporter-otlp-json-common: add'opentelemetry-exporter-otlp-json-common' package for OTLP JSON exporters
(#β4996)
opentelemetry-sdk: Addserviceresource detector support to declarativefile configuration via
detection_development.detectors[].service(#β5003)
opentelemetry-docker-tests: add docker-tests coverage ofopentelemetry-exporter-otlp-proto-grpcandopentelemetry-exporter-otlp-proto-httpmetrics export(#β5030)
registrykeyword argument toPrometheusMetricReaderto allow passinga custom Prometheus registry
(#β5055)
(#β5088)
opentelemetry-sdk: addload_entry_pointshared utility to declarativefile configuration for loading plugins via entry points; refactor propagator
loading to use it
(#β5093)
opentelemetry-sdk: add sampler plugin loading to declarative fileconfiguration via the
opentelemetry_samplerentry point group, matching thespec's PluginComponentProvider mechanism
(#β5095)
opentelemetry-sdk: add propagator plugin loading to declarative fileconfiguration via the
opentelemetry_propagatorentry point group, matchingthe spec's PluginComponentProvider mechanism
(#β5098)
opentelemetry-sdk: add exporter plugin loading to declarative fileconfiguration for all three signals (traces, metrics, logs) via the
opentelemetry_*_exporterentry point groups, matching the spec'sPluginComponentProvider mechanism
(#β5128)
opentelemetry-sdk: add generic resource detector plugin loading todeclarative file configuration via the
opentelemetry_resource_detectorentry point group, matching the spec's PluginComponentProvider mechanism
(#β5129)
opentelemetry-sdk: addadditional_propertiessupport to generated configmodels via custom
datamodel-codegentemplate, enabling plugin/customcomponent names to flow through typed dataclasses
(#β5131)
OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLEDenvironment variable.(#β5151)
Changed
opentelemetry-semantic-conventions: useX | Yunion annotation(#β5096)
opentelemetry-api: updateEnvironmentGetterandEnvironmentSettertouse normalized environment variable names
(#β5119)
UPruff rule(#β5133)
opentelemetry-sdk: only load entrypoints for resource detectors if they areconfigured via
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS(#β5145)
scripts/tracecontext-integration-test.sh(#β5149)
(#β5177)
opentelemetry-semantic-conventions: Bump semantic conventions to 1.41.1,this changes the metrics name of
K8S_CONTAINER_CPU_LIMIT_UTILIZATIONandK8S_CONTAINER_CPU_REQUEST_UTILIZATION.(#β5200)
Removed
opentelemetry-api: remove third-party importlib-metadata in favor ofstandard library since Python >= 3.10 is now required
(#β3234)
(#β5076)
Fixed
opentelemetry-sdk: Allow declarative OTLP HTTP exporters to mapcompression: deflateinstead of rejecting it as unsupported.(#β5075)
create_tracer()docstring(#β5077)
opentelemetry-sdk: FixProcessResourceDetectorto usesys.orig_argvsothat
process.command,process.command_line, andprocess.command_argsreflect the original invocation for
python -m <module>runs (wheresys.argv[0]is rewritten to the module path)(#β5083)
opentelemetry-sdk: fix YAML structure injection via environment variablesubstitution in declarative file configuration; values containing newlines
are now emitted as quoted YAML scalars per spec requirement
(#β5091)
opentelemetry-sdk: Fix mutable attributes reference in metrics, attributespassed to instrument
add/recordare now copied so that subsequentmutations do not affect recorded data points
(#β5106)
opentelemetry-sdk: make resource detector ordering deterministic(#β5120)
detectorsparameter ofget_aggregated_resources(#β5135)
opentelemetry-api: Enforce W3C Baggage size limits on outbound propagationin
W3CBaggagePropagator.inject(). Previously only inbound extractionenforced limits; now inject also caps entries at 180, individual pairs at
4096 bytes, and total header at 8192 bytes per the W3C Baggage spec. The
extract path max_pairs limit now counts all size-valid entries rather than
only successfully parsed ones.
(#β5163)
opentelemetry-sdk: fix multi-processorforce_flushskipping remainingprocessors when one returns
None(#β5179)
opentelemetry-test-utils: fix weaver live check hanging when weaver logoutput fills the pipe buffer
(#β5208)
v1.41.1: Version 1.41.1/0.62b1Compare Source
This is a patch release on the previous 1.41.0/0.62b0 release, fixing the issue(s) below.
v1.41.0Compare Source
opentelemetry-sdk: Addhostresource detector support to declarative file configuration viadetection_development.detectors[].host(#β5002)
opentelemetry-sdk: Addcontainerresource detector support to declarative file configuration viadetection_development.detectors[].container, using entry point loading of theopentelemetry-resource-detector-containeridcontrib package(#β5004)
opentelemetry-sdk: Addcreate_tracer_provider/configure_tracer_providerto declarative file configuration, enabling TracerProvider instantiation from config files without reading env vars(#β4985)
(#β5019)
opentelemetry-sdk: FixAttributeErrorinExplicitBucketHistogramAggregationwhen applied to non-Histogram instruments without explicit boundaries(#β5034)
BatchLogRecordProcessordefaultschedule_delay_millisfrom 5000ms to 1000ms to comply with the OTel specification. Note: logs may be exported 5x more frequently by default (e.g. for users who don't explicitly set theOTEL_BLRP_SCHEDULE_DELAYenv var).(#β4998)
opentelemetry-sdk: Addprocessresource detector support to declarative file configuration viadetection_development.detectors[].process(#β5001)
opentelemetry-sdk: Add shared_parse_headershelper for declarative config OTLP exporters(#β5021)
opentelemetry-api: Replace a broad exception in attribute cleaning tests to satisfy pylint in thelint-opentelemetry-apiCI jobopentelemetry-sdk: Addcreate_meter_provider/configure_meter_providerto declarative file configuration, enabling MeterProvider instantiation from config files without reading env vars(#β4987)
opentelemetry-sdk: Addcreate_resourceandcreate_propagator/configure_propagatorto declarative file configuration, enabling Resource and propagator instantiation from config files without reading env vars(#β4979)
opentelemetry-sdk: Map PythonCRITICALlog level to OTelFATALseverity text per the specification(#β4984)
opentelemetry-sdk: Add file configuration support with YAML/JSON loading, environment variable substitution, and schema validation against the vendored OTel config JSON schema(#β4898)
getting-startedandtracecontextjobs caused by GitHub git CDN SHA propagation lag by installing contrib packages from the already-checked-out local copy instead of a second git clone(#β4958)
opentelemetry-sdk: fix type annotations onMetricReaderand related types(#β4938)
opentelemetry-sdk: implement log creation metric(#β4935)
opentelemetry-sdk: implement metric reader metrics(#β4970)
opentelemetry-sdk: implement processor metrics(#β5012)
opentelemetry-sdk: upgrade vendored OTel configuration schema from v1.0.0-rc.3 to v1.0.0(#β4965)
opentelemetry-sdk: implement exporter metrics(#β4976)
(#β4978)
(#β4973)
opentelemetry-exporter-prometheus: Fix metric name prefix(#β4895)
opentelemetry-api,opentelemetry-sdk: Add deepcopy support forBoundedAttributesandBoundedList(#β4934)
opentelemetry-proto-json,opentelemetry-codegen-json: Implement custom protoc plugin to generate OTLP JSON class definitions(#β4910)
max_export_batch_sizeto OTLP HTTP metrics exporter(#β4576)
opentelemetry-sdk: Implement experimental Meter configurator(#β4966)
opentelemetry-exporter-otlp-proto-http: use consistent protobuf for export request(#β5015)
opentelemetry-sdk: cache TracerConfig into the tracer, this changes an internal interface. Only one Tracer with the same instrumentation scope will be created(#β5007)
max_export_batch_sizeto use realexport(#β5036)
opentelemetry-sdk: Implement experimental Logger configurator(#β4980)
v1.40.0Compare Source
opentelemetry-sdk: deprecateLoggingHandlerin favor ofopentelemetry-instrumentation-logging, seeopentelemetry-instrumentation-loggingdocumentation(#β4919)
opentelemetry-sdk: Clarify log processor error handling expectations in documentation(#β4915)
(#β4941)
(#β4926)
opentelemetry-sdk: Drop unused Jaeger exporter environment variables (exporter removed in 1.22.0)(#β4918)
opentelemetry-sdk: Clarify timeout units in environment variable documentation(#β4906)
opentelemetry-exporter-otlp-proto-grpc: Fix re-initialization of gRPC channel on UNAVAILABLE error(#β4825)
opentelemetry-exporter-prometheus: Fix duplicate HELP/TYPE declarations for metrics with different label sets(#β4868)
OTEL_EXPERIMENTAL_RESOURCE_DETECTORSto*(#β4819)
opentelemetry-sdk: Fix the type hint of the_metrics_dataproperty to allowNone(#β4837).
(#β4840)
(#β4798)
(#β4847)
(#β4806)
SimpleLogRecordProcessor.on_emit,(#β4799) and (#β4867).
(#β4880)
(#β4609)
(#β4882)
(#β4862)
opentelemetry-exporter-otlp-proto-http: fix retry logic and error handling for connection failures in trace, metric, and log exporters(#β4709)
opentelemetry-sdk: avoid RuntimeError during iteration of view instrument match dictionary in MetricReaderStorage.collect()(#β4891)
(#β4861)
opentelemetry-sdk: Fix instrument creation race condition(#β4913)
(#β4914)
opentelemetry-sdk: automatically generate configuration models using OTel config JSON schema(#β4879)
pytest-dev/pytest (pytest)
v9.1.1Compare Source
pytest 9.1.1 (2026-06-19)
Bug fixes
pytest.RaisesGroupwhich would might cause it to display incorrect "It matches FooError() which was paired with BarError" messages.list-itemtyping errors from mypy in@pytest.mark.parametrize <pytest.mark.parametrize ref>argvaluesparameter.conftest.pyfiles located in<invocation dir>/test*were no longer loaded as initial conftests when invoked without arguments.This could cause certain hooks (like
pytest_addoption) in these files to not fire.v9.1.0Compare Source
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. the
DoctestModulecollects 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.Use
config.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-basedmatching instead of string prefix matching.
If you've used
nodeid=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.The same functionality is now available in an external plugin,
pytest-pastebin.See
pastebin-deprecatedfor more details.#β14513: The private
FixtureDef.has_locationattribute is now deprecated and will be removed in pytest 10.See
fixturedef-has-location-deprecatedfor details.#β1764:
pytest.console_mainis now deprecated and will be removed in pytest 10.It was never intended for programmatic use; use
pytest.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, allowingstring equality failures to be rendered as separate
Left:andRight:blocks instead of
ndiffoutput.#β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 ithas 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 relative
testpathslike../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 includes
caplogand the "Captured log calls" test reporting.#β3850: Fixed JUnit XML report: the
testsattribute of the<testsuite>element now always matches the number of<testcase>elements in the file. In some cases (test passes but fails during teardown) thetestsattribute would report an incorrect number of testcases in the XML file.#β5848:
pytest_fixture_post_finalizeris no longer called extra times for the same fixture teardown in some cases.#β719: Fixed
@pytest.mark.parametrize <pytest.mark.parametrize ref>not unpacking single-element tuple values when using a string argnames with a trailing comma (e.g.,"arg,").The trailing comma form now correctly behaves like the tuple form
("arg",), treating argvalues as a list of tuples to unpack.Improved documentation
@pytest.hookimpl(specname=...)only works for function names starting withpytest_.requestfixture provides indirect parametrization values viarequest.param.conftest.pyfiles are not available to other plugins during theirpytest_addoption()execution, as conftest files are discovered and loaded after builtin and third-party plugins have been initialized. However, initial conftest files themselves can implementpytest_addoption()to add their own command-line options.ini options refsection of the API Reference now specified the type and default value of every configuration option.pytestconfig.cacheaccess pattern when thecacheproviderplugin is disabled.newhooks.pyfile inpytest-xdistat tagv3.8.0instead of an unrelated 2017-era commit under the old layout. Pointing at a tag keeps the example in sync with the version users actually install, while remaining stable when the project's main branch moves on.Miscellaneous internal changes
Configuration
π Schedule: (UTC)
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π» Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.