-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
5.0.0 is causing problems in Python 3.7. Can't import celery until I downgrade to 4.13.0. #411
Comments
Can confirm this was a very confusing bug that hit us today, and we tracked it down to an update of |
Same issue. |
Yep same here! Breaks Python 3.7 compatibility. |
This broke every single airflow cluster that did a pull :-( |
See celery/celery#7783 where celery has been tracking the issue.
The issue isn't specific to Python 3.7. It will affect any consumers of There are many projects that only rely on That's why I recommend to either:
Other options that I don't recommend include:
A temporary workaround is to pin to I recognize that as consumers of Celery, this issue feels out of your control, which is why I'm glad to see that Celery has addressed the issue (though best I can tell, the fix isn't released yet). Reliance on this deprecated behavior has been marked as Deprecated for over a year. I'm curious to see - is there something unique to celery (or other projects) that made it difficult for these downstream projects to detect and respond to the warnings? I can confirm that in at least one run, celery did emit the warnings:
Things that celery and other projects can do to detect these incoming incompatible changes:
I regret the disruption caused here. If there's something more that importlib_metadata can do, please let me know. |
I looked briefly and I concur - it appears as if no warning was issued for Is it possible that stevedore has updated the underlying usage and that's why the warnings aren't emitted any longer? Are you able to run with |
I suspect the way tavern.run invokes pytest.main directly may be implicated in masking any warnings that occur within that run. |
v5.0.0 causes issues with python 3.7: python/importlib_metadata#411 This was raised in the context of pytorch#2090 This PR pins the version to <5.0 to circumvent this. Maybe a better fix would be to bump the python version in CI to 3.8, but that's something to discuss more broadly.
v5.0.0 causes issues with python 3.7: python/importlib_metadata#411
v5.0.0 causes issues with python 3.7: python/importlib_metadata#411
* update NS for FX tutorial for PyTorch v1.13 Summary: Makes a couple of updates to ensure this tutorial still runs on 1.13: 1. changes the `qconfig_dict` argument of `prepare_fx` to `qconfig_mapping` 2. adds `example_inputs` to `prepare_fx` Test plan: Run the tutorial, it runs without errors on master * Pin importlib_metadata<5.0 for python <= 3.7 in requirements.txt (#2091) v5.0.0 causes issues with python 3.7: python/importlib_metadata#411 * Enable the FX tutorial Co-authored-by: Max Balandat <[email protected]> Co-authored-by: Svetlana Karslioglu <[email protected]>
This is because of python/importlib_metadata#411
This is because of python/importlib_metadata#411
Hi @jaraco I failed to detect this issue with the Chaos Toolkit but an user reported it recently.
This throws an error with importlib_metadata >= 5 So I switched to:
This now works. But I'm confused by your statement above. What's the right path forward? Should I use this fix and force importlib_metadata >= 6 ? Or should I stick to older versions as other projects will likely not accept this newer version when installing? Basically, I'm not clear what's the official position. Cheers, |
As per python/importlib_metadata#411 (comment) Signed-off-by: Sylvain Hellegouarch <[email protected]>
You don't need to force importlib_metadata 6. |
I can't run the import statement
from celery import Celery
in Python 3.7 with importlib-metadata 5.0.0 installed. I get:This makes no sense. That file totally has a
Celery
object in it... kindof. It's brought in by an unusual construction at the bottom of https://github.com/celery/celery/blob/master/celery/__init__.py, which may be what's confusing importlib-metadata 5.Minimally necessary install to trigger this is to make a virtualenv from Python 3.7.10, activate it, and run
pip install celery
. This will automatically install importlib-metadata 5.0.0.Then just start
python
and runfrom celery import Celery
. It'll crash with the above traceback. Downgrade toimportlib-metadata==4.13.0
and it won't crash.This also affects 3.7.13, so it probably affects all other point releases of 3.7. We use 3.7.10 because that's what the AmazonLinux docker image provides.
Oddly enough, installing celery on Python 3.8 doesn't result in importlib-metadata being installed automatically. The import works fine without it installed. And manually installing 5.0 doesn't break the import like it does in 3.7. So this seems to be a Python 3.7-specific issue.
The text was updated successfully, but these errors were encountered: