Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b6076fb1
Commit
b6076fb1
authored
Apr 21, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
parent
d73aca76
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
Lib/pydoc.py
Lib/pydoc.py
+1
-1
Lib/test/test_pydoc.py
Lib/test/test_pydoc.py
+8
-0
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/pydoc.py
View file @
b6076fb1
...
...
@@ -1590,7 +1590,7 @@ def resolve(thing, forceload=0):
"""Given an object or a path to an object, get the object and its name."""
if
isinstance
(
thing
,
str
):
object
=
locate
(
thing
,
forceload
)
if
not
object
:
if
object
is
None
:
raise
ImportError
(
'no Python documentation found for %r'
%
thing
)
return
object
,
thing
else
:
...
...
Lib/test/test_pydoc.py
View file @
b6076fb1
...
...
@@ -1029,6 +1029,14 @@ class PydocWithMetaClasses(unittest.TestCase):
print_diffs
(
expected_text
,
result
)
self
.
fail
(
"outputs are not equal, see diff above"
)
def
test_resolve_false
(
self
):
# Issue #23008: pydoc enum.{,Int}Enum failed
# because bool(enum.Enum) is False.
with
captured_stdout
()
as
help_io
:
pydoc
.
help
(
'enum.Enum'
)
helptext
=
help_io
.
getvalue
()
self
.
assertIn
(
'class Enum'
,
helptext
)
@
reap_threads
def
test_main
():
...
...
Misc/NEWS
View file @
b6076fb1
...
...
@@ -31,6 +31,8 @@ Core and Builtins
Library
-------
- Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
- Fix asyncio issue 235: LifoQueue and PriorityQueue'
s
put
didn
't
increment unfinished tasks (this bug was introduced in 3.4.3 when
JoinableQueue was merged with Queue).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment