ModuleNotFoundError: No module named 'pkg_resources' in worker defaults on Python 3.13+
@auvipy ya está trabajando en esto.
Desde el 31/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
While testing a fix in celery/celery#10960, the smoke test worker container failed to start when running with Python 3.13+.
The worker crashes immediately on startup with the following traceback:
File "/app/app.py", line 13, in <module>
from pytest_celery.vendors.worker.tasks import *
...
File "/usr/local/lib/python3.13/site-packages/pytest_celery/vendors/worker/defaults.py", line 7, in <module>
from pkg_resources import resource_filename
ModuleNotFoundError: No module named 'pkg_resources'
Root cause:
Starting with Python 3.12 (and continuing in 3.13+), setuptools (which provides the pkg_resources module) is no longer installed by default in official Python Docker images. Since pytest_celery/vendors/worker/defaults.py imports pkg_resources, the worker container fails to boot in modern Python environments.
Suggested fix:
Replace pkg_resources.resource_filename with importlib.resources.files (or importlib_resources for backward compatibility), which is the modern standard for accessing package data in Python.
As requested by @auvipy in celery/celery#10960, I'm opening this issue so you can track the fix here. Let me know if you need any more details!
- Lenguaje dominante
- Python
- Estrellas
- 83
- Forks
- 18
- Merge medio
- 4 h 13 min
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de celery/pytest-celery
-
feature
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
celery/pytest-celery#463 · 1 comentario ·
-
documentation
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
celery/pytest-celery#459 ·
-
`celery_worker` fixture name colides with `celery_worker` fixture from `celery.contrib.pytest`Quizá libre de nuevo @Nusnus la tomó hace 645 días y no hay ningún pull request abierto. Abiertobug
celery/pytest-celery#442 · 7 comentarios · 5 reacciones · 1 asignado ·
-
Missing documentation on how to include source codeQuizá libre de nuevo @Nusnus la tomó hace 328 días y no hay ningún pull request abierto. Abiertodocumentation
celery/pytest-celery#439 · 1 asignado ·
Todos los issues de celery/pytest-celery
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
AI bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AUTO-MAS-Project/AUTO-MAS#1960 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
btclib-org/btclib-wallet#872 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Scheduled returns scan all accepted minion keys causing extreme loadPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
saltstack/salt#70789 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
btclib-org/btclib#3093 ·
Los mantenedores suelen responder en 1 día