-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
importlib-metadata
breaks code
#3234
Comments
importlib-metadata
, even on Python >= 3.10? This change broke my application framework (Asphalt) because it does isinstance(value, EntryPoint)
, checking against importlib.metadata.EntryPoint
, but after importlib_metadata
is imported, iterating entry points (even through the stdlib facilities) yields EntryPoint
instances from that third party library, which are NOT compatible with the stdlib ones!importlib-metadata
breaks code
Given that |
Pinning to 1.16.0 temporarily fixed the issue for us in Python 3.11. |
That makes sense to me 👍 Just to make sure I understand @agronholm, your original description of the issue does not sound like an issue with OpenTelemetry's usage of the library. It kind of sounds like an issue in either Asphalt (you mentioned Is that right? |
Yeah, it was only after upgrading the opentelemetry libs to 0.38b0 that I encountered this issue. Asphalt itself only uses the backport on Python 3.9 and earlier. It's not needed on 3.10 or later, and is just extra baggage there. I don't know if anybody is doing |
At any rate, the latest Asphalt no longer uses the |
@mvilanova did you encounter this outside of Asphalt? If not I think we should close this bug and open a separate one to make it conditional import for |
This api is no longer provisional in 3.10 and this reduces the number of dependencies for any instrumented code on >= 3.10 Fixes open-telemetry#3234
Hi folks! Any update on this? We're still stuck with pinning to 1.16.0 and would love to un-pin. |
There was a pr that was closed so this issue still exists. @ocelotl for visibility. Seems like import-metadata still causing headaches :D |
Can you elaborate if you are experiencing breaking changes? Can you try upgrading to the latest opentelemetry to see if importlib-metadata is causing you issues? |
I'm reaching out internally for the details, but a colleague using one of my python library reported this issue again when I unpinned
My guess is another dependency in their project is pinning to an incompatible version of importlib_metadata? Anyhow, I'm wondering if proactively fixing |
Is there a reason for continuing to support a Python release (3.7) well past its EOL date? |
It would be helpful to figure out what is going on in their dependency tree and what version is actually being installed. We are not pinning to a single version but to 6.x
I don't think dropping Python 3.7 would actually fix things because That said, I just noticed https://pypi.org/project/backports.entry-points-selectable/ which might support the feature set we need and be less invasive. |
I am also experiencing issues with the pinned version of I work with a recent Yocto build with Python 3.11 and I cannot easily use the external The |
@mlasch Is this python/importlib_metadata#489 the issue (fixed in 8.1.0) that wouldn't let you use |
@xrmx No, python/importlib_metadata#489 is not the issue. The problem is not that I am unable to use the backported package |
Actually #4177 could be a solution. I agree it makes the code more complex, but modern Python versions would not have to use |
@mlasch we decided to use |
@xrmx That's unfortunate. However, nice to see that https://github.com/open-telemetry/opentelemetry-python/blob/main/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py is the single place which imports |
EDIT: I see that
importlib.metadata.EntryPoint
is not directly documented in the API docs.Originally posted by @agronholm in #3167 (comment)
The text was updated successfully, but these errors were encountered: