diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2021-06-27 21:59:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-27 21:59:18 (GMT) |
commit | efe7d08d178a7c09bcca994f2068b019c8633d83 (patch) | |
tree | 381bd5c8e8496306646cb2803c7e68dacd12128e /Lib/importlib | |
parent | 2f49c9debc2efe010c757be3bdbd6493f1ebc5f6 (diff) | |
download | cpython-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__.py | 10 |
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): |