[Docs] How to handle declare_namespace
deprecation for existing packages?
#3943
Labels
declare_namespace
deprecation for existing packages?
#3943
Summary
Since version v67.3.0, setuptools emits a deprecation warning for
pkg_resources.declare_namespace
. The deprecation warning is:The link https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages points to the PyPA packaging guide https://packaging.python.org/en/latest/guides/packaging-namespace-packages/ for guidance. This guide says about pkg_resources-style namespace packages (bold added by me):
So we are left with a deprecation warning, with the deprecation note guiding not to fix it.
Is there a migration path, or is the right thing to do is to ignore the deprecation?
OS / Environment
Linux, python 3.11, setuptools 67.8.0
Additional Information
I do not maintain a namespaced package myself; I use gevent, which imports
zope.interface
, which usesdeclare_namespace
. I've reported the deprecation tozope.interface
at zopefoundation/zope.interface#270, but @cjwatson correctly pointed out this issue.Code of Conduct
The text was updated successfully, but these errors were encountered: