summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-06-27 21:59:18 (GMT)
committerGitHub <noreply@github.com>2021-06-27 21:59:18 (GMT)
commitefe7d08d178a7c09bcca994f2068b019c8633d83 (patch)
tree381bd5c8e8496306646cb2803c7e68dacd12128e /Lib/importlib
parent2f49c9debc2efe010c757be3bdbd6493f1ebc5f6 (diff)
downloadcpython-efe7d08d178a7c09bcca994f2068b019c8633d83.zip
cpython-efe7d08d178a7c09bcca994f2068b019c8633d83.tar.gz
cpython-efe7d08d178a7c09bcca994f2068b019c8633d83.tar.bz2
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (#26807)
Sync with importlib_metadata 4.6.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/metadata/__init__.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py
index d2116cf..f5172ee 100644
--- a/Lib/importlib/metadata/__init__.py
+++ b/Lib/importlib/metadata/__init__.py
@@ -362,14 +362,6 @@ class EntryPoints(DeprecatedList):
)
-def flake8_bypass(func):
- # defer inspect import as performance optimization.
- import inspect
-
- is_flake8 = any('flake8' in str(frame.filename) for frame in inspect.stack()[:5])
- return func if not is_flake8 else lambda: None
-
-
class Deprecated:
"""
Compatibility add-in for mapping to indicate that
@@ -405,7 +397,7 @@ class Deprecated:
return super().__getitem__(name)
def get(self, name, default=None):
- flake8_bypass(self._warn)()
+ self._warn()
return super().get(name, default)
def __iter__(self):