Repository navigation
build(deps): bump pytest to 9.0.3 across every requirements file to clear 60 security alerts - #5317
Merged
Merged
Conversation
flaky 3.7.0 does `from _pytest.runner import call_runtest_hook`, which pytest removed. Under pytest 9 the import fails and every environment that installs flaky dies at collection. 3.8.1 works under both pytest 7.4.4 and pytest 9.0.3, so the bump is safe ahead of the pytest upgrade and is kept separate from it.
…ackage instrumentation/opentelemetry-instrumentation-grpc/tests/protobuf/test_server_pb2_grpc.py:3 does `from tests.protobuf import test_server_pb2`, an absolute import that only resolves while the package directory is on sys.path and `tests.protobuf` is a real package. The directory had no __init__.py, so resolution depended on pytest inserting the directory itself, which pytest 9 no longer does by default. Adding the missing __init__.py makes the import work without relying on an import-mode default. The grpc suite goes from 12 collection errors to 156 passed.
GHSA-6w46-j5rx-g56g has no fix below pytest 9.0.3 and affects 60 open alerts. The bump has to cover every file at once. The lint environments install dev-requirements.txt and the package's own test-requirements.txt in a single resolution, so any file left on 7.4.4 makes the lint environment for its package unresolvable. 115 files pin pytest, not the 60 that carry an alert. Three things move with pytest because pytest 9 requires them: - pytest-asyncio 0.23.5 to 1.4.1 in the aiohttp-server, asyncio and click test requirements, since 0.23.5 caps pytest below 9. No test or conftest change was needed. The six instrumentation-genai files keep pytest-asyncio 0.21.0, which works unchanged under pytest 9. - The uv-generated requirements files are regenerated rather than hand-edited, because pytest 9 requires packaging>=22.0 and the oldest variants resolved packaging to 18.0 or 21.0, which cannot satisfy it. Regeneration also adds pygments, which pytest 9 depends on and pytest 7.4.4 did not, and drops pyparsing and six, which packaging 22.0 no longer needs. - The pytest floor in each regenerated .in file moves from 7.4 to 9.0. instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.latest.txt is edited by hand instead of regenerated. Regenerating it from the current .in replaces fastapi 0.137.2 with 0.119.1 and starlette 1.3.1 with 0.48.0, because the .in still asks for fastapi~=0.119.1 and fastapi 0.119.1 caps starlette below 0.49.0. Starlette's first fixed release is 0.49.1, so regenerating would reopen six starlette advisories that are currently closed. The .in and the generated file have drifted and need reconciling in their own change.
syrupy 4.6.1 declares pytest>=7.0.0,<9.0.0, so the resourcedetector-gcp environments cannot be installed alongside pytest 9.0.3: Because syrupy==4.6.1 depends on pytest>=7.0.0,<9.0.0 and you require pytest==9.0.3, we can conclude that your requirements and syrupy==4.6.1 are incompatible. syrupy 5.0.0 is the lowest release that permits pytest 9. 6.1.1 is the highest. The 31 stored snapshots under resource/opentelemetry-resourcedetector-gcp/tests/__snapshots__ match unchanged under both, so this takes the highest and keeps the two requirements files identical outside their opentelemetry-api and opentelemetry-sdk pins.
….xfail In pytest 9, pytest.xfail is an instance of _pytest.outcomes._XFail rather than a function. Its __call__ is still annotated -> NoReturn, but pylint does not follow the annotation through __call__, so every variable assigned only in the branches of an if/elif chain whose else branch calls pytest.xfail is reported as possibly-used-before-assignment: tests/test_botocore_bedrock.py:1464:25: E0606: Possibly using variable 'finish_reason' before assignment (possibly-used-before-assignment) That accounts for 27 errors in this file and fails lint-instrumentation-botocore. pytest.xfail.Exception is _pytest.outcomes.XFailed in both pytest 7.4.4 and pytest 9.0.3, and _XFail.__call__ does nothing but raise it, so raising it directly is equivalent and pylint recognises the branch as terminating. Verified against pylint 4.0.9 with both pytest versions.
Pull request dashboard statusMerged · refreshed 2026-11-10 21:04 UTC Status above doesn't look right?
|
… inputs instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in and opamp/opentelemetry-opamp-client/test-requirements.in still carried a pytest 7 floor while their generated outputs were moved to 9.0.3. Both are compiled with -c dev-requirements.txt, which now constrains pytest to 9.0.3, so regenerating either one would fail to resolve rather than reproduce the committed file. opamp also gains a pygments floor. pytest 9 adds pygments as a dependency, opamp is the only package compiled with --resolution lowest rather than --resolution lowest-direct, and that lowers transitive dependencies too, so the first regeneration produced pygments==2.7.2. The lint environment installs dev-requirements.txt alongside that file and sphinx 7.1.2 requires pygments>=2.13, which made lint-opamp-client unresolvable: Because sphinx==7.1.2 depends on pygments>=2.13 and you require sphinx==7.1.2, we can conclude that you require pygments>=2.13. And because you require pygments==2.7.2, we can conclude that your requirements are unsatisfiable. Regenerating the four outputs also drops importlib-metadata, zipp and sniffio from the two starlette files. Those are not pytest dependencies. They disappear because the resolution runs against the current metadata of opentelemetry-api and anyio, which no longer require them.
ocelotl
force-pushed
the
bump_pytest_9
branch
from
November 10, 2026 19:05
2cc4de2 to
5e47ac4
Compare
test_metrics_concurrent_requests issues a 1 second request to /slow and a fast request to /async at the same time, then requires the client-measured and the server-measured duration of each to agree within 10ms and 20ms. Under pytest 9.0.3 the first of those assertions fails on the Python 3.10 runners: AssertionError: 0.020430181503295897 != 0.0 within 0.01 delta tests/test_metrics_instrumentation.py:229 The excess is entirely on the client side. A failing run reported server_ms=1002 against client_s=1.0242199897766113, where a passing run reported server_ms=1003 against client_s=1.005490779876709. The client figure covers connection setup and the event loop dispatch of two concurrent fetches, neither of which the server figure includes, and the server figure is quantised to whole milliseconds on top of that. 10ms of a 1 second measurement is 1 percent, which is below the noise floor of a shared runner. The assertion exists to catch per-request state being mixed between concurrent requests, and mixing per-request state substitutes a 1ms duration for a 1000ms one, which a 50ms tolerance still catches. 50ms is what this same test already allows for PyPy. The PyPy allowance was added in open-telemetry#4665 to close open-telemetry#4664, and the 20ms tolerance was added in open-telemetry#4550 to close open-telemetry#4070, both of them the same assertion flaking for the same reason.
herin049
approved these changes
Nov 10, 2026
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Compatibility of retained plugins with pytest 9, particularly pytest-asyncio 0.21.0 and pytest-aiohttp 1.0.5, requires confirmation across the supported Python/PyPy CI matrix because dependency-backed execution is unavailable in this review.
No open issues 🎉
What changed in this PR
Updates the monorepo’s test dependencies to pytest 9.0.3 to address GHSA-6w46-j5rx-g56g while keeping shared development and package requirements aligned.
Changes:
- Updates pytest pins and requirement inputs, regenerating dependency files where needed.
- Upgrades affected test plugins and adjusts gRPC test packaging and Bedrock expected-failure handling.
- Relaxes Tornado timing assertions to reduce scheduling-related flakes, continuing the adjustments in #4550 and #4665.
| File | Description |
|---|---|
util/opentelemetry-util-http/test-requirements.txt |
Pins pytest 9.0.3. |
util/opentelemetry-util-genai/test-requirements.txt |
Pins pytest 9.0.3. |
tests/opentelemetry-docker-tests/tests/test-requirements.txt |
Updates pytest and flaky. |
sdk-extension/opentelemetry-sdk-extension-aws/test-requirements-1.txt |
Pins pytest 9.0.3. |
sdk-extension/opentelemetry-sdk-extension-aws/test-requirements-0.txt |
Pins pytest 9.0.3. |
resource/opentelemetry-resourcedetector-gcp/requirements.oldest.txt |
Updates pytest and syrupy. |
resource/opentelemetry-resourcedetector-gcp/requirements.latest.txt |
Updates pytest and syrupy. |
resource/opentelemetry-resource-detector-containerid/test-requirements.txt |
Pins pytest 9.0.3. |
resource/opentelemetry-resource-detector-azure/test-requirements-1.txt |
Pins pytest 9.0.3. |
resource/opentelemetry-resource-detector-azure/test-requirements-0.txt |
Pins pytest 9.0.3. |
propagator/opentelemetry-propagator-ot-trace/test-requirements.txt |
Pins pytest 9.0.3. |
propagator/opentelemetry-propagator-aws-xray/test-requirements-1.txt |
Pins pytest 9.0.3. |
propagator/opentelemetry-propagator-aws-xray/test-requirements-0.txt |
Pins pytest 9.0.3. |
processor/opentelemetry-processor-baggage/test-requirements.txt |
Pins pytest 9.0.3. |
opentelemetry-instrumentation/test-requirements.txt |
Pins pytest 9.0.3. |
opentelemetry-distro/test-requirements.txt |
Pins pytest 9.0.3. |
opamp/opentelemetry-opamp-client/test-requirements.lowest.txt |
Updates pytest and adds Pygments. |
opamp/opentelemetry-opamp-client/test-requirements.latest.txt |
Updates pytest and adds Pygments. |
opamp/opentelemetry-opamp-client/test-requirements.in |
Raises pytest minimum and adds Pygments floor. |
instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-tortoiseorm/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-tornado/tests/test_metrics_instrumentation.py |
Raises duration-comparison tolerances to 50 ms. |
instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-threading/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-system-metrics/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-structlog/test-requirements.oldest.txt |
Updates pytest, packaging, and transitive pins. |
instrumentation/opentelemetry-instrumentation-structlog/test-requirements.latest.txt |
Updates pytest and adds Pygments. |
instrumentation/opentelemetry-instrumentation-structlog/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-starlette/test-requirements.oldest.txt |
Updates pytest and refreshes transitive dependencies. |
instrumentation/opentelemetry-instrumentation-starlette/test-requirements.latest.txt |
Updates pytest and refreshes transitive dependencies. |
instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-sqlite3/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements.oldest.txt |
Updates pytest, packaging, and transitive pins. |
instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements.latest.txt |
Updates pytest and adds Pygments. |
instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-remoulade/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymssql/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymongo/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements-binary.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pika/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-pika/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-mysql/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-mysql/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-mysql/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-logging/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.oldest.txt |
Updates pytest, packaging, and transitive pins. |
instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.latest.txt |
Updates pytest and adds Pygments. |
instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-jinja2/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-httpx/test-requirements-3.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-httpx/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-grpc/tests/protobuf/__init__.py |
Makes protobuf test helpers a Python package. |
instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-grpc/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-flask/test-requirements-3.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.oldest.txt |
Updates pytest, packaging, and transitive pins. |
instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.latest.txt |
Updates only the pytest pin. |
instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-falcon/test-requirements-4.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-falcon/test-requirements-3.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-exceptions/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-confluent-kafka/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-click/test-requirements.txt |
Updates pytest and pytest-asyncio. |
instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-cassandra/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-cassandra/test-requirements-scylla.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_bedrock.py |
Raises expected-failure exceptions directly for lint compatibility. |
instrumentation/opentelemetry-instrumentation-botocore/test-requirements-3.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-botocore/test-requirements-2.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-botocore/test-requirements-1.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-botocore/test-requirements-0.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-boto3sqs/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-aws-lambda/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-asyncpg/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt |
Updates pytest and pytest-asyncio. |
instrumentation/opentelemetry-instrumentation-asyncclick/test-requirements.oldest.txt |
Updates pytest, packaging, and transitive pins. |
instrumentation/opentelemetry-instrumentation-asyncclick/test-requirements.latest.txt |
Updates pytest and adds Pygments. |
instrumentation/opentelemetry-instrumentation-asyncclick/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-aiokafka/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt |
Updates pytest and pytest-asyncio. |
instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt |
Pins pytest 9.0.3. |
instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements.in |
Moves pytest requirement to 9.x. |
instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-oldest.txt |
Updates pytest, packaging, and transitive pins. |
instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-latest.txt |
Updates pytest and adds Pygments. |
instrumentation-genai/opentelemetry-instrumentation-vertexai/tests/requirements.oldest.txt |
Pins pytest 9.0.3. |
instrumentation-genai/opentelemetry-instrumentation-vertexai/tests/requirements.latest.txt |
Pins pytest 9.0.3. |
instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/requirements.oldest.txt |
Pins pytest 9.0.3. |
instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/requirements.latest.txt |
Pins pytest 9.0.3. |
instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2/tests/requirements.oldest.txt |
Pins pytest 9.0.3. |
instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2/tests/requirements.latest.txt |
Pins pytest 9.0.3. |
exporter/opentelemetry-exporter-richconsole/test-requirements.txt |
Updates pytest and flaky. |
exporter/opentelemetry-exporter-prometheus-remote-write/test-requirements.txt |
Pins pytest 9.0.3. |
exporter/opentelemetry-exporter-credential-provider-gcp/test-requirements.txt |
Pins pytest 9.0.3. |
dev-requirements.txt |
Aligns shared pytest and flaky versions. |
Review effort: Balanced
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.
Description
Raises
pytestto 9.0.3 in every requirements file in the repository. GHSA-6w46-j5rx-g56g (GHSA-6w46-j5rx-g56g) has a vulnerable range of< 9.0.3, so 9.0.3 is the lowest version that clears the advisory. The bump closes 60 open Dependabot alerts, every one of them an instance of GHSA-6w46-j5rx-g56g.The bump cannot be split across smaller pull requests. A
lint-environment installsdev-requirements.txtand one package'stest-requirements.txtin a single resolution, so as soon as one file disagrees the environment is unresolvable:I tried the split first and it turned every
lint-job red.The remaining commits are what
pytest9 requires, rather than unrelated cleanup:flaky3.7.0 importscall_runtest_hookfrom_pytest.runner, whichpytest9 removed, and collection aborts. 3.8.1 works under both 7.4.4 and 9.0.3.syrupy4.6.1 declarespytest>=7.0.0,<9.0.0, so the tworesourcedetector-gcpenvironments cannot be installed at all. 6.1.1 is the highest release that permitspytest9, and the 31 stored snapshots match unchanged under it.pytest9 defaults to theimportlibimport mode, under whichinstrumentation/opentelemetry-instrumentation-grpc/tests/protobufis not a package, so the absolute import attest_server_pb2_grpc.py:3fails at collection. The commit adds an__init__.pycarrying only the licence header.pytest9,pytest.xfailis an instance of_pytest.outcomes._XFailrather than a function.pylintdoes not follow its-> NoReturnannotation through__call__, which produces 27possibly-used-before-assignmenterrors intests/test_botocore_bedrock.pyand failslint-instrumentation-botocore.pytest.xfail.ExceptionisXFailedin both 7.4.4 and 9.0.3 and_XFail.__call__does nothing but raise it, so raising it directly is equivalent and lint clean.pytest-asyncio0.23.5 declarespytest<9; three files move to 1.4.1.pytest9 requirespackaging>=22.0and severaloldestfiles pinnedpackaging==18.0or21.0, so editing only thepytestline left them uninstallable.Gaps and concerns
instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.latest.txtis edited by hand for thepytestline alone, which is the one deliberate exception to recompiling. Recompiling it movesstarlettefrom 1.3.1 down to 0.48.0, becausetest-requirements.incarriesfastapi~=0.119.1and that range capsstarlettebelow 1.0, which would reopen sixstarletteadvisories. Raising thefastapifloor is a decision about the declaredfastapi ~= 0.92support range atpyproject.toml:37and belongs in its own pull request.One commit is not a dependency bump.
test_metrics_concurrent_requestsintornadorequires the client-measured and the server-measured duration of a 1 second request to agree within 10 ms, and underpytest9.0.3 that assertion fails on the Python 3.10 runners withAssertionError: 0.020430181503295897 != 0.0 within 0.01 delta. I first saw the failure on my fork, so I pushed the branch here without the commit to check the failure reproduces on this repository's CI, and it does. The excess is entirely on the client side: a failing run reportedserver_ms=1002againstclient_s=1.0242199897766113where a passing run reportedserver_ms=1003againstclient_s=1.005490779876709, and the client figure covers connection setup and the event loop dispatch of two concurrent fetches, neither of which the server figure includes. Both tolerances move to 50 ms, which is what the same test already allows for PyPy. The PyPy allowance came from #4665 closing #4664 and the 20 ms tolerance from #4550 closing #4070, both of them the same assertion flaking for the same reason. I could not attribute the change in timing topytest9 itself: a branch carrying only thetornadopytestbump passes with a 2.5 ms gap.Recompiling the two
starlettefiles also dropsimportlib-metadata,zippandsniffio. None of the three is apytestdependency.opentelemetry-apion coremainnow declares onlytyping-extensions, soimportlib-metadatais no longer pulled in, andzippcame in throughimportlib-metadata.anyio4.14.2 declares onlyidna, sosniffiois no longer pulled in either.opampis the only package compiled with--resolution lowestrather than--resolution lowest-direct, so it lowers transitive dependencies too and picked uppygments==2.7.2oncepytest9 pulledpygmentsin.sphinx7.1.2 indev-requirements.txtneedspygments>=2.13, which madelint-opamp-clientunresolvable, so itstest-requirements.ingains apygments>=2.13floor.Type of change
Checklist:
tox -e precommittox -e typecheck