summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-06-27 22:19:24 (GMT)
committerGitHub <noreply@github.com>2021-06-27 22:19:24 (GMT)
commitf4b31cdbc043449f3df7d291da67bcb3736be0db (patch)
tree86194aa2e8de9018f0ffe427225776c54fde8c89 /Lib
parentaeb63392e74976b4289b38f32f1d6e7ff2e0a712 (diff)
downloadcpython-f4b31cdbc043449f3df7d291da67bcb3736be0db.zip
cpython-f4b31cdbc043449f3df7d291da67bcb3736be0db.tar.gz
cpython-f4b31cdbc043449f3df7d291da67bcb3736be0db.tar.bz2
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (GH-26807) (GH-26929)
Sync with importlib_metadata 4.6. (cherry picked from commit efe7d08d178a7c09bcca994f2068b019c8633d83) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Diffstat (limited to 'Lib')
-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):