Deprecation warnings
Doekeb opened this issue · comments
pytest reveals several deprecation warnings:
.venv/lib/python3.11/site-packages/pypiserver/bottle.py:38
.../.venv/lib/python3.11/site-packages/pypiserver/bottle.py:38: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import base64, cgi, email.utils, functools, hmac, itertools, mimetypes,\
.venv/lib/python3.11/site-packages/pypiserver/config.py:48
.../.venv/lib/python3.11/site-packages/pypiserver/config.py:48: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
.../.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
.../.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
.../.venv/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
.venv/lib/python3.11/site-packages/passlib/utils/__init__.py:854
.../.venv/lib/python3.11/site-packages/passlib/utils/__init__.py:854: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
from crypt import crypt as _crypt
The latter is from the passlib
dependency extra. Are there any plans to address these before the release of Python 3.13?
Thanks for raising this issue @Doekeb! This is an important catch. There's no specific plan for updating yet, but that's definitely worth taking into account. I hope that with the fix by @ghinks in #493 we'll be able to be more aware of these deprecations and then we can come up with a good strategy.
And that's a good catch on using pytest
's output for deprecation warning discovery. I'll keep this in mind and think if there's some nice way to make automated deprecation alerts.
What do you think? Have you discovered this when running the tests locally? Did it have any direct impact on your experience setting pypi-server
up?
Once again, thanks for reporting!
Py3.12 is still in beta so we have at least a full year before Py3.13 is production ready.
Thanks for looking into it @dee-me-tree-or-love! Yes, I noticed these from running tests locally. It seems by default pytest
exits 0 even when there are deprecation warnings so these wouldn't have been very visible from our CI/CD pipelines. No direct impact in my usage of pypi-server
- everything works as expected for now. Thanks for the great tool!
Warnings are warnings, they are not errors so pytest passes.