]> granicus.if.org Git - python/commitdiff
Issue #18743: Fix references to non-existant "StringIO" module
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 29 Aug 2013 08:39:48 +0000 (11:39 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 29 Aug 2013 08:39:48 +0000 (11:39 +0300)
in docstrings and comments.

1  2 
Lib/asynchat.py
Lib/gzip.py
Lib/tempfile.py
Lib/test/pickletester.py
Lib/test/test_httplib.py
Lib/test/test_logging.py
Misc/NEWS
Tools/gdb/libpython.py

diff --cc Lib/asynchat.py
Simple merge
diff --cc Lib/gzip.py
Simple merge
diff --cc Lib/tempfile.py
Simple merge
Simple merge
Simple merge
index 63d49fe5c77dbb32f1bb26fb52fe5678a1de95aa,ae4ca184442c67bc8ca919ec341a1d6dbc09a84f..eed67d09b8bb2c855a270cfc75573bf0eb62b9d3
@@@ -159,16 -155,8 +159,8 @@@ class BaseTest(unittest.TestCase)
          self.expected_log_pat, and compare the extracted group values to
          the expected_values list of tuples."""
          stream = stream or self.stream
 -        pat = re.compile(self.expected_log_pat)
 +        pat = re.compile(pat or self.expected_log_pat)
-         try:
-             if hasattr(stream, 'reset'):
-                 stream.reset()
-             elif hasattr(stream, 'seek'):
-                 stream.seek(0)
-             actual_lines = stream.readlines()
-         except AttributeError:
-             # StringIO.StringIO lacks a reset() method.
-             actual_lines = stream.getvalue().splitlines()
+         actual_lines = stream.getvalue().splitlines()
          self.assertEqual(len(actual_lines), len(expected_values))
          for actual, expected in zip(actual_lines, expected_values):
              match = pat.search(actual)
diff --cc Misc/NEWS
index 3625a38804782555dbeb68a1fd9e568d88a82ad7,be2dc9dde816f04a96f5e65376ba9e55ecd34af5..3870fccfac0c08bb3295e6edaf10fd6c6aea88ae
+++ b/Misc/NEWS
@@@ -138,226 -127,6 +138,228 @@@ Librar
  - Issue #8112: xlmrpc.server's DocXMLRPCServer server no longer raises an error
    if methods have annotations; it now correctly displays the annotations.
  
 +- Issue #18600: Added policy argument to email.message.Message.as_string,
 +  and as_bytes and __bytes__ methods to Message.
 +
 +- Issue #18671: Output more information when logging exceptions occur.
 +
 +- Issue #18621: Prevent the site module's patched builtins from keeping
 +  too many references alive for too long.
 +
 +- Issue #4885: Add weakref support to mmap objects.  Patch by Valerie Lambert.
 +
 +- Issue #8860: Fixed rounding in timedelta constructor.
 +
 +Tests
 +-----
 +
 +- Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as
 +  possible, since "localhost" goes through a DNS lookup under recent Windows
 +  versions.
 +
 +Documentation
 +-------------
 +
++- Issue #18743: Fix references to non-existant "StringIO" module.
++
 +- Issue #18783: Removed existing mentions of Python long type in docstrings,
 +  error messages and comments.
 +
 +
 +What's New in Python 3.4.0 Alpha 1?
 +===================================
 +
 +Release date: 2013-08-03
 +
 +Core and Builtins
 +-----------------
 +
 +- Issue #16741: Fix an error reporting in int().
 +
 +- Issue #17899: Fix rare file descriptor leak in os.listdir().
 +
 +- Issue #10241: Clear extension module dict copies at interpreter shutdown.
 +  Patch by Neil Schemenauer, minimally modified.
 +
 +- Issue #9035: ismount now recognises volumes mounted below a drive root
 +  on Windows. Original patch by Atsuo Ishimoto.
 +
 +- Issue #18214: Improve finalization of Python modules to avoid setting
 +  their globals to None, in most cases.
 +
 +- Issue #18112: PEP 442 implementation (safe object finalization).
 +
 +- Issue #18552: Check return value of PyArena_AddPyObject() in
 +  obj2ast_object().
 +
 +- Issue #18560: Fix potential NULL pointer dereference in sum().
 +
 +- Issue #18520: Add a new PyStructSequence_InitType2() function, same than
 +  PyStructSequence_InitType() except that it has a return value (0 on success,
 +  -1 on error).
 +
 +- Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],
 +  prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
 +
 +- Issue #18408: Fix many various bugs in code handling errors, especially
 +  on memory allocation failure (MemoryError).
 +
 +- Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all().
 +
 +- Issue #18342: Use the repr of a module name when an import fails when using
 +  ``from ... import ...``.
 +
 +- Issue #17872: Fix a segfault in marshal.load() when input stream returns
 +  more bytes than requested.
 +
 +- Issue #18338: `python --version` now prints version string to stdout, and
 +  not to stderr.  Patch by Berker Peksag and Michael Dickens.
 +
 +- Issue #18426: Fix NULL pointer dereference in C extension import when
 +  PyModule_GetDef() returns an error.
 +
 +- Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
 +  a stack overflow in the marshal module (fix a crash in test_marshal).
 +  Patch written by Jeremy Kloth.
 +
 +- Issue #3329: Implement the PEP 445: Add new APIs to customize Python memory
 +  allocators.
 +
 +- Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the
 +  tstate is first removed from TLS and then deallocated.
 +
 +- Issue #13483: Use VirtualAlloc in obmalloc on Windows.
 +
 +- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
 +  OverflowError when an argument of %c format is out of range.
 +
 +- Issue #18111: The min() and max() functions now support a default argument
 +  to be returned instead of raising a ValueError on an empty sequence.
 +  (Contributed by Julian Berman.)
 +
 +- Issue #18137: Detect integer overflow on precision in float.__format__()
 +  and complex.__format__().
 +
 +- Issue #18183: Fix various unicode operations on strings with large unicode
 +  codepoints.
 +
 +- Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows().
 +
 +- Issue #18038: SyntaxError raised during compilation sources with illegal
 +  encoding now always contains an encoding name.
 +
 +- Issue #17931: Resolve confusion on Windows between pids and process
 +  handles.
 +
 +- Tweak the exception message when the magic number or size value in a bytecode
 +  file is truncated.
 +
 +- Issue #17932: Fix an integer overflow issue on Windows 64-bit in iterators:
 +  change the C type of seqiterobject.it_index from long to Py_ssize_t.
 +
 +- Issue #18065: Don't set __path__ to the package name for frozen packages.
 +
 +- Issue #18088: When reloading a module, unconditionally reset all relevant
 +  attributes on the module (e.g. __name__, __loader__, __package__, __file__,
 +  __cached__).
 +
 +- Issue #17937: Try harder to collect cyclic garbage at shutdown.
 +
 +- Issue #12370: Prevent class bodies from interfering with the __class__
 +  closure.
 +
 +- Issue #17644: Fix a crash in str.format when curly braces are used in square
 +  brackets.
 +
 +- Issue #17237: Fix crash in the ASCII decoder on m68k.
 +
 +- Issue #17927: Frame objects kept arguments alive if they had been
 +  copied into a cell, even if the cell was cleared.
 +
 +- Issue #1545463: At shutdown, defer finalization of codec modules so
 +  that stderr remains usable.
 +
 +- Issue #7330: Implement width and precision (ex: "%5.3s") for the format
 +  string of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
 +
 +- Issue #1545463: Global variables caught in reference cycles are now
 +  garbage-collected at shutdown.
 +
 +- Issue #17094: Clear stale thread states after fork().  Note that this
 +  is a potentially disruptive change since it may release some system
 +  resources which would otherwise remain perpetually alive (e.g. database
 +  connections kept in thread-local storage).
 +
 +- Issue #17408: Avoid using an obsolete instance of the copyreg module when
 +  the interpreter is shutdown and then started again.
 +
 +- Issue #5845: Enable tab-completion in the interactive interpreter by
 +  default, thanks to a new sys.__interactivehook__.
 +
 +- Issue #17115,17116: Module initialization now includes setting __package__ and
 +  __loader__ attributes to None.
 +
 +- Issue #17853: Ensure locals of a class that shadow free variables always win
 +  over the closures.
 +
 +- Issue #17863: In the interactive console, don't loop forever if the encoding
 +  can't be fetched from stdin.
 +
 +- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__.
 +
 +- Issue #18698: Ensure importlib.reload() returns the module out of sys.modules.
 +
 +- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
 +  such as was shipped with Centos 5 and Mac OS X 10.4.
 +
 +- Issue #17413: sys.settrace callbacks were being passed a string instead of an
 +  exception instance for the 'value' element of the arg tuple if the exception
 +  originated from C code; now an exception instance is always provided.
 +
 +- Issue #17782: Fix undefined behaviour on platforms where
 +  ``struct timespec``'s "tv_nsec" member is not a C long.
 +
 +- Issue #17722: When looking up __round__, resolve descriptors.
 +
 +- Issue #16061: Speed up str.replace() for replacing 1-character strings.
 +
 +- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__
 +  method.
 +
 +- Issue #17643: Add __callback__ attribute to weakref.ref.
 +
 +- Issue #16447: Fixed potential segmentation fault when setting __name__ on a
 +  class.
 +
 +- Issue #17669: Fix crash involving finalization of generators using yield from.
 +
 +- Issue #14439: Python now prints the traceback on runpy failure at startup.
 +
 +
 +- Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks()
 +  when running on valgrind.
 +
 +- Issue #17619: Make input() check for Ctrl-C correctly on Windows.
 +
 +- Issue #17357: Add missing verbosity messages for -v/-vv that were lost during
 +  the importlib transition.
 +
 +- Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
 +
 +- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been
 +  disabled by default.  It can be re-enabled with the `-X showrefcount` option.
 +
 +Library
 +-------
 +
 +- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
 +  platforms.  Patch by Yogesh Chaudhari.
 +
 +- Issue #18681: Fix a NameError in importlib.reload() (noticed by Weizhao Li).
 +
 +- Issue #14323: Expanded the number of digits in the coefficients for the
 +  RGB -- YIQ conversions so that they match the FCC NTSC versions.
 +
  - Issue #17998: Fix an internal error in regular expression engine.
  
  - Issue #17557: Fix os.getgroups() to work with the modified behavior of
Simple merge