Description
Checklist
- I have verified that the issue exists against the
main
branch of pytest-celery. - This has already been asked to the discussions forum first.
- I have checked the issues list
for similar or identical bug reports. - I have checked the pull requests list
for existing proposed fixes. - I have checked the commit log
to find out if the bug was already fixed in the main branch. - I have included all related issues and possible duplicate issues
in this issue (If there are none, check this box anyway).
Mandatory Debugging Information
- I have verified that the issue exists against the
main
branch of Celery. - I have included the contents of
pip freeze
in the issue. - I have included all the versions of all the external dependencies required
to reproduce this bug.
Related Issues and Possible Duplicates
Related Issues
- None
Possible Duplicates
- None
Environment & Settings
python 3.13.3
Steps to Reproduce
just run pytest with the lib installed
Required Dependencies
Package Version
alembic 1.15.2
amqp 5.3.1
annotated-types 0.7.0
billiard 4.2.1
boto3 1.37.38
botocore 1.37.38
celery 5.5.2
certifi 2025.4.26
charset-normalizer 3.4.2
click 8.2.1
click-didyoumean 0.3.1
click-plugins 1.1.1
click-repl 0.3.0
debugpy 1.8.14
decorator 5.2.1
docker 7.1.0
dogpile.cache 1.4.0
greenlet 3.2.2
idna 3.10
iniconfig 2.1.0
jmespath 1.0.1
kombu 5.5.3
Mako 1.3.10
MarkupSafe 3.0.2
mysql-connector-python 9.2.0
packaging 25.0
pbr 6.1.1
pip 25.0.1
pluggy 1.6.0
prompt_toolkit 3.0.51
psutil 7.0.0
pydantic 2.11.5
pydantic_core 2.33.2
pydantic-settings 2.8.1
pydantic-settings-aws 0.1.0
pydevd-pycharm 251.25410.159
pyee 13.0.0
pytest 8.3.5
pytest-celery 1.2.0
pytest_docker_tools 3.1.9
pytest-mock 3.14.1
python-dateutil 2.9.0.post0
python-dotenv 1.1.0
python-ffmpeg 2.0.12
redis 5.2.1
requests 2.32.3
s3transfer 0.11.5
setuptools 80.9.0
six 1.17.0
smart-open 7.1.0
SQLAlchemy 2.0.41
SQLAlchemy-Utils 0.41.2
stevedore 5.4.1
tenacity 9.1.2
typing_extensions 4.13.2
typing-inspection 0.4.1
tzdata 2025.2
urllib3 2.4.0
valkey 6.1.0
vine 5.1.0
wcwidth 0.2.13
wrapt 1.17.2
Minimally Reproducible Test Case
just have to run pytest with any sample test.
Expected Behavior
No warning is issued. Since it's comign from pytest and the libraries can't ignore it
Actual Behavior
/usr/local/lib/python3.13/site-packages/pytest_celery/vendors/worker/defaults.py:7: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
from pkg_resources import resource_filename