From 955a5590b6adca0c4b07ddc4dc9b2d60a7d2d508 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 5 Mar 2023 06:11:04 +0100 Subject: [PATCH] Limit importlib-metadata backwport to < 5.0.0 (#29924) The Importlib-metadata 5 breaks importing Celery < 5.3.0. Until Celery 5.3.0 gets released (it is pre-release/beta now) we should workaround the problem by limiting importlib-metadata to < 5.0.0. (cherry picked from commit 4ea457a5ca694eab150e02a26c0b3ef62858fbca) --- setup.cfg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index a304b641633dc..0e359f66742ad 100644 --- a/setup.cfg +++ b/setup.cfg @@ -99,7 +99,10 @@ install_requires = graphviz>=0.12 gunicorn>=20.1.0 httpx - importlib_metadata>=1.7;python_version<"3.9" + # Importlib-metadata 5 is breaking Celery import due to regression it introduced + # This was tracked and fixed in https://github.com/celery/celery/pull/7785 but it is not released yet + # We can remove the < 5.0.0 limitation hwne Celery 5.3.0 gets released and we bump celeryt o >= 5.3.0 + importlib_metadata>=1.7,<5.0.0;python_version<"3.9" importlib_resources>=5.2;python_version<"3.9" itsdangerous>=2.0 jinja2>=3.0.0