Skip to content

Conversation

@Atry
Copy link

@Atry Atry commented Nov 9, 2025

Description

Relax the wrapt version constraint from < 2.0.0 to < 3.0.0 to allow compatibility with wrapt 2.x.

Background

The current constraint wrapt >= 1.0.0, < 2.0.0 unnecessarily prevents users from using wrapt 2.x. This is an unnecessary limitation because the APIs used by opentelemetry-instrumentation (wrap_function_wrapper and ObjectProxy) remain compatible in wrapt 2.x.

Changes

Updated the wrapt version constraint in the following packages:

  • opentelemetry-instrumentation
  • opentelemetry-processor-baggage
  • 19 instrumentation packages:
    • opentelemetry-instrumentation-aio-pika
    • opentelemetry-instrumentation-aiohttp-client
    • opentelemetry-instrumentation-aiohttp-server
    • opentelemetry-instrumentation-aiopg
    • opentelemetry-instrumentation-asyncio
    • opentelemetry-instrumentation-boto3sqs
    • opentelemetry-instrumentation-cassandra
    • opentelemetry-instrumentation-click
    • opentelemetry-instrumentation-confluent-kafka
    • opentelemetry-instrumentation-dbapi
    • opentelemetry-instrumentation-elasticsearch
    • opentelemetry-instrumentation-grpc
    • opentelemetry-instrumentation-httpx
    • opentelemetry-instrumentation-jinja2
    • opentelemetry-instrumentation-pika
    • opentelemetry-instrumentation-pymemcache
    • opentelemetry-instrumentation-pyramid
    • opentelemetry-instrumentation-threading
    • opentelemetry-instrumentation-urllib3

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Verified that uv lock --check passes (the locked wrapt version in uv.lock remains unchanged)
  • The change only relaxes upper bound constraints, so existing functionality is preserved

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 9, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Atry / name: Yang, Bo (d35bd3d)

@xrmx
Copy link
Contributor

xrmx commented Nov 11, 2025

We have to update all the entries, not just opentelemetry-instrumentation:

git grep wrapt.*2 | grep pyproject.toml
instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml:    "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-boto3sqs/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-cassandra/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-click/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-grpc/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-jinja2/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-pika/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-redis/pyproject.toml:  "wrapt >= 1.12.1",
instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml:  "wrapt >= 1.11.2",
instrumentation/opentelemetry-instrumentation-threading/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
opentelemetry-instrumentation/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",
processor/opentelemetry-processor-baggage/pyproject.toml:  "wrapt >= 1.0.0, < 2.0.0",

@Atry Atry marked this pull request as ready for review December 6, 2025 19:05
@Atry Atry requested a review from a team as a code owner December 6, 2025 19:05
@Atry
Copy link
Author

Atry commented Dec 6, 2025

@xrmx Updated. Would you mind reviewing it again?

Update all pyproject.toml files that had "wrapt >= 1.0.0, < 2.0.0"
constraint to "wrapt >= 1.0.0, < 3.0.0" to allow wrapt 2.x.

Updated packages:
- opentelemetry-instrumentation
- opentelemetry-processor-baggage
- 20 instrumentation packages

Also update uv.lock to use wrapt 2.0.1 for CI testing. This change
only affects the development lockfile used for testing.

End users are not affected as the version constraint allows both
wrapt 1.x and 2.x - users can continue using whichever version
their package manager resolves.
@Atry Atry changed the title build: relief wrapt version constraint in pyproject.toml build: relax wrapt version constraint in pyproject.toml Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants