build: relax wrapt version constraint in pyproject.toml#3930
build: relax wrapt version constraint in pyproject.toml#3930Atry wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
|
|
|
We have to update all the entries, not just opentelemetry-instrumentation: |
|
@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.
| - `opentelemetry-instrumentation-redis`: add missing copyright header for opentelemetry-instrumentation-redis | ||
| ([#3976](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3976)) | ||
|
|
||
| ### Changed |
There was a problem hiding this comment.
This should be moved under unreleased and keep it under the Added chapter
xrmx
left a comment
There was a problem hiding this comment.
Please merge main and redo the uv.lock update since there's conflicts there
|
i believe the it would probably be good to adapt some of the test requirements files to run the tests also with wrapt v2 |
|
Indeed it needs fixes: gets 5 test failures. Other users of ObjectProxy other than opentelemetry-instrumentation are:
|
|
What's the status of this work? It is currently a blocker for me being able to use this SDK for one of my applications. |
|
@blarghmatey the status of this work is that we two incomplete PRs open, feel free to open a third one with proper tests |
|
@xrmx thank you for the follow-up. I'll try to get something opened shortly to address the needs. I appreciate all of the hard work from you and the other Python OTel maintainers! |
- Update wrapt version constraint from '>=1.0.0, <2.0.0' to '>=1.0.0' in all affected packages - Replace ObjectProxy with BaseObjectProxy where iteration support is not needed - Add fallback import for wrapt 1.x compatibility (ObjectProxy as BaseObjectProxy) - Keep ObjectProxy usage in classes that implement __iter__ (botocore, aiopg) - Update CHANGELOG.md This change maintains backward compatibility with wrapt 1.x while enabling support for wrapt 2.x. BaseObjectProxy is the new base class in wrapt 2.x, while ObjectProxy is now a subclass that adds __iter__() support. Fixes open-telemetry#3903 Related to open-telemetry#3930 and open-telemetry#4082
- Update wrapt version constraint from '>=1.0.0, <2.0.0' to '>=1.0.0' in all affected packages - Replace ObjectProxy with BaseObjectProxy where iteration support is not needed - Add fallback import for wrapt 1.x compatibility (ObjectProxy as BaseObjectProxy) - Keep ObjectProxy usage in classes that implement __iter__ (botocore, aiopg) - Update CHANGELOG.md This change maintains backward compatibility with wrapt 1.x while enabling support for wrapt 2.x. BaseObjectProxy is the new base class in wrapt 2.x, while ObjectProxy is now a subclass that adds __iter__() support. Fixes open-telemetry#3903 Related to open-telemetry#3930 and open-telemetry#4082
- Update wrapt version constraint from '>=1.0.0, <2.0.0' to '>=1.0.0' in all affected packages - Replace ObjectProxy with BaseObjectProxy where iteration support is not needed - Add fallback import for wrapt 1.x compatibility (ObjectProxy as BaseObjectProxy) - Keep ObjectProxy usage in classes that implement __iter__ (botocore, aiopg) - Update CHANGELOG.md This change maintains backward compatibility with wrapt 1.x while enabling support for wrapt 2.x. BaseObjectProxy is the new base class in wrapt 2.x, while ObjectProxy is now a subclass that adds __iter__() support. Fixes open-telemetry#3903 Related to open-telemetry#3930 and open-telemetry#4082
- Update wrapt version constraint from '>=1.0.0, <2.0.0' to '>=1.0.0' in all affected packages - Replace ObjectProxy with BaseObjectProxy where iteration support is not needed - Add fallback import for wrapt 1.x compatibility (ObjectProxy as BaseObjectProxy) - Keep ObjectProxy usage in classes that implement __iter__ (botocore, aiopg) - Update CHANGELOG.md This change maintains backward compatibility with wrapt 1.x while enabling support for wrapt 2.x. BaseObjectProxy is the new base class in wrapt 2.x, while ObjectProxy is now a subclass that adds __iter__() support. Fixes open-telemetry#3903 Related to open-telemetry#3930 and open-telemetry#4082
- Update wrapt version constraint from '>=1.0.0, <2.0.0' to '>=1.0.0' in all affected packages - Replace ObjectProxy with BaseObjectProxy where iteration support is not needed - Add fallback import for wrapt 1.x compatibility (ObjectProxy as BaseObjectProxy) - Keep ObjectProxy usage in classes that implement __iter__ (botocore, aiopg) - Update CHANGELOG.md This change maintains backward compatibility with wrapt 1.x while enabling support for wrapt 2.x. BaseObjectProxy is the new base class in wrapt 2.x, while ObjectProxy is now a subclass that adds __iter__() support. Fixes open-telemetry#3903 Related to open-telemetry#3930 and open-telemetry#4082
Description
Relax the
wraptversion constraint from< 2.0.0to< 3.0.0to allow compatibility with wrapt 2.x.Fixes #3903
Background
The current constraint
wrapt >= 1.0.0, < 2.0.0unnecessarily prevents users from using wrapt 2.x. This is an unnecessary limitation because the APIs used byopentelemetry-instrumentation(wrap_function_wrapperandObjectProxy) remain compatible in wrapt 2.x.Changes
Updated the wrapt version constraint in the following packages:
opentelemetry-instrumentationopentelemetry-processor-baggageopentelemetry-instrumentation-aio-pikaopentelemetry-instrumentation-aiohttp-clientopentelemetry-instrumentation-aiohttp-serveropentelemetry-instrumentation-aiopgopentelemetry-instrumentation-asyncioopentelemetry-instrumentation-boto3sqsopentelemetry-instrumentation-cassandraopentelemetry-instrumentation-clickopentelemetry-instrumentation-confluent-kafkaopentelemetry-instrumentation-dbapiopentelemetry-instrumentation-elasticsearchopentelemetry-instrumentation-grpcopentelemetry-instrumentation-httpxopentelemetry-instrumentation-jinja2opentelemetry-instrumentation-pikaopentelemetry-instrumentation-pymemcacheopentelemetry-instrumentation-pyramidopentelemetry-instrumentation-threadingopentelemetry-instrumentation-urllib3Type of change
How Has This Been Tested?
uv lock --checkpasses (the locked wrapt version inuv.lockremains unchanged)Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.