summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2022-03-29 22:07:15 (GMT)
committerGitHub <noreply@github.com>2022-03-29 22:07:15 (GMT)
commit63f32fae79e16e6dc71777bd3fcb623b2c3ff742 (patch)
treea3f3dc751d2b8b4baae90919a31dc25be2855474 /Lib/pydoc.py
parenta5ba445322f723e04a3e901365512360a99c54d4 (diff)
downloadcpython-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-xLib/pydoc.py2
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: