aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources/__init__.py
diff options
context:
space:
mode:
authorAlex Hirzel <alex@hirzel.us>2018-11-09 20:06:51 -0500
committerAlex Hirzel <alex@hirzel.us>2018-11-09 20:06:51 -0500
commitc9aba4ad1e66ab40ea2f7320c4f9504099b7ac50 (patch)
tree4e38770256d3882d16f511e227021b21cb37bf21 /pkg_resources/__init__.py
parent63185e91406d6ba02fe42c6b7e188111054f1b14 (diff)
parentb0c746640f87ad2719a7ebfbdc226d3fd43296b6 (diff)
downloadexternal_python_setuptools-c9aba4ad1e66ab40ea2f7320c4f9504099b7ac50.tar.gz
external_python_setuptools-c9aba4ad1e66ab40ea2f7320c4f9504099b7ac50.tar.bz2
external_python_setuptools-c9aba4ad1e66ab40ea2f7320c4f9504099b7ac50.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'pkg_resources/__init__.py')
-rw-r--r--pkg_resources/__init__.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 2b8c4430..e6487be0 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -238,6 +238,9 @@ __all__ = [
'register_finder', 'register_namespace_handler', 'register_loader_type',
'fixup_namespace_packages', 'get_importer',
+ # Warnings
+ 'PkgResourcesDeprecationWarning',
+
# Deprecated/backward compatibility only
'run_main', 'AvailableDistributions',
]
@@ -2340,7 +2343,7 @@ class EntryPoint:
warnings.warn(
"Parameters to load are deprecated. Call .resolve and "
".require separately.",
- DeprecationWarning,
+ PkgResourcesDeprecationWarning,
stacklevel=2,
)
if require:
@@ -3163,3 +3166,11 @@ 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.
+ """