From c6a8cd5dbe01d2c933cfe82c6cc41329f4276b69 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Mon, 27 Mar 2023 17:02:37 +0900 Subject: [PATCH] Imported Upstream version 58.5.1 --- .bumpversion.cfg | 2 +- CHANGES.rst | 9 +++++++++ pkg_resources/__init__.py | 18 +++++++++--------- setup.cfg | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1f0b2d3..492bc2d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 58.5.0 +current_version = 58.5.1 commit = True tag = True diff --git a/CHANGES.rst b/CHANGES.rst index 26b8d67..a058367 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,12 @@ +v58.5.1 +------- + + +Misc +^^^^ +* #2486: Move PkgResourcesDeprecationWarning above implicitly-called function so that it's in the namespace when version warnings are generated in an environment that contains them. + + v58.5.0 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 3aafe65..4aece3c 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -3244,6 +3244,15 @@ def _initialize(g=globals()): ) +class PkgResourcesDeprecationWarning(Warning): + """ + Base class for warning about deprecations in ``pkg_resources`` + + This class is not derived from ``DeprecationWarning``, and as such is + visible by default. + """ + + @_call_aside def _initialize_master_working_set(): """ @@ -3282,12 +3291,3 @@ def _initialize_master_working_set(): # match order list(map(working_set.add_entry, sys.path)) globals().update(locals()) - - -class PkgResourcesDeprecationWarning(Warning): - """ - Base class for warning about deprecations in ``pkg_resources`` - - This class is not derived from ``DeprecationWarning``, and as such is - visible by default. - """ diff --git a/setup.cfg b/setup.cfg index 6ce5448..33fbdb7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = setuptools -version = 58.5.0 +version = 58.5.1 author = Python Packaging Authority author_email = distutils-sig@python.org description = Easily download, build, install, upgrade, and uninstall Python packages -- 2.34.1