Skip to content

Commit

Permalink
Make clear which package is calling declare_namespaces (#3827)
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Feb 15, 2023
2 parents a07e918 + 20a701f commit c89c643
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelog.d/3827.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Improve deprecation warning message on ``pkg_resources.declare_namespace``
to display package name.
1 change: 1 addition & 0 deletions pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2289,6 +2289,7 @@ def declare_namespace(packageName):
"""Declare that package 'packageName' is a namespace package"""

msg = (
f"Deprecated call to `pkg_resources.declare_namespace({packageName!r})`.\n"
"Implementing implicit namespace packages (as specified in PEP 420) "
"is preferred to `pkg_resources.declare_namespace`. "
"See https://setuptools.pypa.io/en/latest/references/"
Expand Down

0 comments on commit c89c643

Please sign in to comment.