diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2022-03-29 22:07:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 22:07:15 (GMT) |
commit | 63f32fae79e16e6dc71777bd3fcb623b2c3ff742 (patch) | |
tree | a3f3dc751d2b8b4baae90919a31dc25be2855474 /Lib/pydoc.py | |
parent | a5ba445322f723e04a3e901365512360a99c54d4 (diff) | |
download | cpython-63f32fae79e16e6dc71777bd3fcb623b2c3ff742.zip cpython-63f32fae79e16e6dc71777bd3fcb623b2c3ff742.tar.gz cpython-63f32fae79e16e6dc71777bd3fcb623b2c3ff742.tar.bz2 |
bpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself (GH-32180)
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-x | Lib/pydoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 7ae3908..18b476e 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -292,7 +292,7 @@ def visiblename(name, all=None, obj=None): if name.startswith('_') and hasattr(obj, '_fields'): return True # Ignore __future__ imports. - if name in _future_feature_names: + if obj is not __future__ and name in _future_feature_names: if isinstance(getattr(obj, name, None), __future__._Feature): return False if all is not None: |