Open
Conversation
|
- 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
5e1c77e to
e1ae527
Compare
Author
|
I believe I signed the CLA properly. I'm not sure if there's something needed to get the check to re-evaluate. |
6 tasks
Contributor
|
We need to test users of ObjectProxy with wrapt>=2,<3 per #3930 (comment) |
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
This PR adds support for wrapt 2.x while maintaining backward compatibility with wrapt 1.x.
Key Changes
Version Constraints
>=1.0.0, <2.0.0to>=1.0.0in:opentelemetry-instrumentationopentelemetry-processor-baggageCode Changes
ObjectProxywithBaseObjectProxywhere iteration support is not neededfrom wrapt import ObjectProxy as BaseObjectProxyObjectProxyusage in classes that implement__iter__()(botocore, aiopg)Background
In wrapt 2.0, the class hierarchy changed:
ObjectProxywas the base classBaseObjectProxyis now the base class,ObjectProxyis a subclass that adds__iter__()supportThis change uses
BaseObjectProxydirectly where iteration is not needed, providing better compatibility and avoiding unnecessary overhead. The fallback import ensures compatibility with wrapt 1.x.Files that keep using
ObjectProxyinstrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock_utils.py- implements__iter__()instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py- implements__aiter__()Type of change
How Has This Been Tested?
BaseObjectProxyfalls back toObjectProxyon wrapt 1.xDoes This PR Require a Core Repo Change?
Checklist:
Fixes #3903
Supersedes #3930
Supersedes #4082