"""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)
+ raise ImportError('''\
+No Python documentation found for %r.
+Use help() to get the interactive help utility.
+Use help(str) for help on the str class.''' % thing)
return object, thing
else:
name = getattr(thing, '__name__', None)
helper(C)
expected_text = expected_missingattribute_pattern % __name__
result = output.getvalue().strip()
- if result != expected_text:
- print_diffs(expected_text, result)
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(expected_text, result)
+ 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():
- Issue #24022: Fix tokenizer crash when processing undecodable source code.
+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 when
+ JoinableQueue was merged with Queue).
+
+- Issue #23908: os functions now reject paths with embedded null character
+ on Windows instead of silently truncate them.
+
+- Issue #23728: binascii.crc_hqx() could return an integer outside of the range
+ 0-0xffff for empty data.
+
+
+What's New in Python 3.5.0 alpha 4?
+===================================
+
+Release date: 2015-04-19
+
+Core and Builtins
+-----------------
+
+- Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
+ the architecture triplet in the extension name, to make it easy to test builds
+ for different ABIs in the same working tree. Under OS X, the extension name
+ now includes PEP 3149-style information.
+
+- Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES.
+ Patch courtesy of Joe Jevnik.
+
+- Issue #23731: Implement PEP 488: removal of .pyo files.
+
+- Issue #23726: Don't enable GC for user subclasses of non-GC types that
+ don't add any new fields. Patch by Eugene Toder.
+
- Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
while it is holding a lock to a buffered I/O object, and the main thread
tries to use the same I/O object (typically stdout or stderr). A fatal