From: Benjamin Peterson Date: Mon, 22 Dec 2014 03:00:51 +0000 (-0600) Subject: merge 3.4 (#23093) X-Git-Tag: v3.5.0a1~284 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98beb7599e7b5991f92f1c0bd83ce7e50f1cdc33;p=python merge 3.4 (#23093) --- 98beb7599e7b5991f92f1c0bd83ce7e50f1cdc33 diff --cc Lib/_pyio.py index d507cfed35,01683f8285..3614644937 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@@ -808,14 -790,13 +808,14 @@@ class _BufferedIOMixin(BufferedIOBase) .format(self.__class__.__name__)) def __repr__(self): - clsname = self.__class__.__name__ + modname = self.__class__.__module__ + clsname = self.__class__.__qualname__ try: name = self.name - except AttributeError: + except Exception: - return "<_pyio.{0}>".format(clsname) + return "<{}.{}>".format(modname, clsname) else: - return "<_pyio.{0} name={1!r}>".format(clsname, name) + return "<{}.{} name={!r}>".format(modname, clsname, name) ### Lower-level APIs ### @@@ -1636,11 -1558,10 +1636,11 @@@ class TextIOWrapper(TextIOBase) # - "chars_..." for integer variables that count decoded characters def __repr__(self): - result = "<_pyio.TextIOWrapper" + result = "<{}.{}".format(self.__class__.__module__, + self.__class__.__qualname__) try: name = self.name - except AttributeError: + except Exception: pass else: result += " name={0!r}".format(name) diff --cc Misc/NEWS index d3b1c88bf3,958f28579d..f7b0a29c08 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -196,9 -41,9 +196,12 @@@ Core and Builtin Library ------- + - Issue #23093: In the io, module allow more operations to work on detached + streams. + +- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), + instead of reading /dev/urandom, to get pseudo-random bytes. + - Issue #19104: pprint now produces evaluable output for wrapped strings. - Issue #23071: Added missing names to codecs.__all__. Patch by Martin Panter.