]> granicus.if.org Git - python/commitdiff
Merge fix for issue #22166 from 3.4
authorNick Coghlan <ncoghlan@gmail.com>
Mon, 15 Sep 2014 11:55:16 +0000 (23:55 +1200)
committerNick Coghlan <ncoghlan@gmail.com>
Mon, 15 Sep 2014 11:55:16 +0000 (23:55 +1200)
1  2 
Lib/test/test_codecs.py
Misc/NEWS
Modules/_codecsmodule.c
Python/codecs.c

Simple merge
diff --cc Misc/NEWS
index 3be837d1136ea8a2eafbdd81efd7afaa1772c334,9ba754a773fa8ef63beb0621752c5de7dde79bf0..d9bac606240c7cc6373f19c7426db86806a9d447
+++ b/Misc/NEWS
@@@ -521,135 -273,281 +521,139 @@@ _ Issue #21597: The separator between t
  - Issue #21538: The plistlib module now supports loading of binary plist files
    when reference or offset size is not a power of two.
  
 -- Issue #21801: Validate that __signature__ is None or an instance of Signature.
 +- Issue #21455: Add a default backlog to socket.listen().
  
 -- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
 -  due to possible uninitialized _config_vars.
 +- Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
  
 -- Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
 -  broken by the fix for security issue #19435.  Patch by Zach Byrne.
++- Issue #22166:  with the assistance of a new internal _codecs._forget_codec
++  helping function, test_codecs now clears the encoding caches to avoid the
++  appearance of a reference leak
 -Extension Modules
 ------------------
 +- Issue #22236: Tkinter tests now don't reuse default root window.  New root
 +  window is created for every test class.
  
 -- Issue #22176: Update the ctypes module's libffi to v3.1.  This release
 -  adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
 -  architectures.
 +- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
 +  shape.
  
 -Build
 ------
 +- Issue #20826: Optimize ipaddress.collapse_addresses().
  
 -- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
 -  above.  Patch by Zachary Turner.
 +- Issue #21487: Optimize ipaddress.summarize_address_range() and
 +  ipaddress.{IPv4Network,IPv6Network}.subnets().
  
 -- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
 -  now display special message when and only when there are failures.
 +- Issue #21486: Optimize parsing of netmasks in ipaddress.IPv4Network and
 +  ipaddress.IPv6Network.
  
 -- Issue #17095: Fix Modules/Setup *shared* support.
 +- Issue #13916: Disallowed the surrogatepass error handler for non UTF-*
 +  encodings.
  
 -- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
 +- Issue #20998: Fixed re.fullmatch() of repeated single character pattern
 +  with ignore case.  Original patch by Matthew Barnett.
  
 -- Issue #21166: Prevent possible segfaults and other random failures of
 -  python --generate-posix-vars in pybuilddir.txt build target.
 +- Issue #21075: fileinput.FileInput now reads bytes from standard stream if
 +  binary mode is specified.  Patch by Sam Kimbrel.
  
 -IDLE
 -----
 +- Issue #19775: Add a samefile() method to pathlib Path objects.  Initial
 +  patch by Vajrasky Kok.
  
 -- Issue #17390: Adjust Editor window title; remove 'Python',
 -  move version to end.
 +- Issue #21226: Set up modules properly in PyImport_ExecCodeModuleObject
 +  (and friends).
  
 -- Issue #14105: Idle debugger breakpoints no longer disappear
 -  when inseting or deleting lines.
 +- Issue #21398: Fix an unicode error in the pydoc pager when the documentation
 +  contains characters not encodable to the stdout encoding.
  
 -- Issue #17172: Turtledemo can now be run from Idle.
 -  Currently, the entry is on the Help menu, but it may move to Run.
 -  Patch by Ramchandra Apt and Lita Cho.
 +- Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept
 +  an (address, netmask) tuple argument, so as to easily construct network
 +  objects from existing addresses.
  
 -- Issue #21765: Add support for non-ascii identifiers to HyperParser.
 +- Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
 +  staticmethod.
  
 -- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
 -  Heblikar.
 +- Issue #21424: Simplified and optimized heaqp.nlargest() and nmsmallest()
 +  to make fewer tuple comparisons.
  
 -- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
 +- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a
 +  flush() on the underlying binary stream.  Patch by akira.
  
 -- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
 +- Issue #18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman
  
 -- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
 -  Heblikar.
 +- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
 +  In porting to Argument Clinic, the first two arguments were reversed.
  
 -- Issue #12387: Add missing upper(lower)case versions of default Windows key
 -  bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
 +- Issue #21407: _decimal: The module now supports function signatures.
  
 -- Issue #21695: Closing a Find-in-files output window while the search is
 -  still in progress no longer closes Idle.
 +- Issue #10650: Remove the non-standard 'watchexp' parameter from the
 +  Decimal.quantize() method in the Python version.  It had never been
 +  present in the C version.
  
 -- Issue #18910: Add unittest for textView. Patch by Phil Webster.
 +- Issue #21469:  Reduced the risk of false positives in robotparser by
 +  checking to make sure that robots.txt has been read or does not exist
 +  prior to returning True in can_fetch().
  
 -- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
 +- Issue #19414: Have the OrderedDict mark deleted links as unusable.
 +  This gives an early failure if the link is deleted during iteration.
  
 -- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
 +- Issue #21421: Add __slots__ to the MappingViews ABC.
 +  Patch by Josh Rosenberg.
  
 -Tests
 ------
 +- Issue #21101: Eliminate double hashing in the C speed-up code for
 +  collections.Counter().
  
 -- Issue #22166:  with the assistance of a new internal _codecs._forget_codec
 -  helping function, test_codecs now clears the encoding caches to avoid the
 -  appearance of a reference leak
 +- Issue #21321: itertools.islice() now releases the reference to the source
 +  iterator when the slice is exhausted.  Patch by Anton Afanasyev.
  
 -- Issue #22236: Tkinter tests now don't reuse default root window.  New root
 -  window is created for every test class.
 +- Issue #21057: TextIOWrapper now allows the underlying binary stream's
 +  read() or read1() method to return an arbitrary bytes-like object
 +  (such as a memoryview).  Patch by Nikolaus Rath.
  
 -- Issue #20746: Fix test_pdb to run in refleak mode (-R).  Patch by Xavier
 -  de Gaye.
 +- Issue #20951: SSLSocket.send() now raises either SSLWantReadError or
 +  SSLWantWriteError on a non-blocking socket if the operation would block.
 +  Previously, it would return 0.  Patch by Nikolaus Rath.
  
 -- Issue #22060: test_ctypes has been somewhat cleaned up and simplified; it
 -  now uses unittest test discovery to find its tests.
 +- Issue #13248: removed previously deprecated asyncore.dispatcher __getattr__
 +  cheap inheritance hack.
  
 -- Issue #22104: regrtest.py no longer holds a reference to the suite of tests
 -  loaded from test modules that don't define test_main().
 +- Issue #9815: assertRaises now tries to clear references to local variables
 +  in the exception's traceback.
  
 -- Issue #22002: Added ``load_package_tests`` function to test.support and used
 -  it to implement/augment test discovery in test_asyncio, test_email,
 -  test_importlib, test_json, and test_tools.
 +- Issue #19940: ssl.cert_time_to_seconds() now interprets the given time
 +  string in the UTC timezone (as specified in RFC 5280), not the local
 +  timezone.
  
 -- Issue #21976: Fix test_ssl to accept LibreSSL version strings.  Thanks
 -  to William Orr.
 +- Issue #13204: Calling sys.flags.__new__ would crash the interpreter,
 +  now it raises a TypeError.
  
 -- Issue #21918: Converted test_tools from a module to a package containing
 -  separate test files for each tested script.
 +- Issue #19385: Make operations on a closed dbm.dumb database always raise the
 +  same exception.
  
 -- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
 -  so that packet filtering software (specifically Windows Base Filtering Engine)
 -  does not interfere with the transaction semantics expected by the tests.
 +- Issue #21207: Detect when the os.urandom cached fd has been closed or
 +  replaced, and open it anew.
  
 -- Issue #19493: Refactored the ctypes test package to skip tests explicitly
 -  rather than silently.
 +- Issue #21291: subprocess's Popen.wait() is now thread safe so that
 +  multiple threads may be calling wait() or poll() on a Popen instance
 +  at the same time without losing the Popen.returncode value.
  
 -- Issue #18492: All resources are now allowed when tests are not run by
 -  regrtest.py.
 +- Issue #21127: Path objects can now be instantiated from str subclass
 +  instances (such as ``numpy.str_``).
  
 -- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true
 -  division to benchmark integers instead of floating point numbers. Set pystone
 -  version to 1.2. Patch written by Lennart Regebro.
 +- Issue #15002: urllib.response object to use _TemporaryFileWrapper (and
 +  _TemporaryFileCloser) facility. Provides a better way to handle file
 +  descriptor close. Patch contributed by Christian Theune.
  
 -- Issue #21605: Added tests for Tkinter images.
 +- Issue #12220: mindom now raises a custom ValueError indicating it doesn't
 +  support spaces in URIs instead of letting a 'split' ValueError bubble up.
  
 -- Issue #21493: Added test for ntpath.expanduser().  Original patch by
 -  Claudiu Popa.
 +- Issue #21068: The ssl.PROTOCOL* constants are now enum members.
  
 -- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
 +- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
  
 -- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
 -  PanedWindow.paneconfigure(), and Menu.entryconfigure().
 +- Issue #21262: New method assert_not_called for Mock.
 +  It raises AssertionError if the mock has been called.
  
 -Documentation
 --------------
 +- Issue #21238: New keyword argument `unsafe` to Mock. It raises
 +  `AttributeError` incase of an attribute startswith assert or assret.
  
 -- Issue #21777: The binary sequence methods on bytes and bytearray are now
 -  documented explicitly, rather than assuming users will be able to derive
 -  the expected behaviour from the behaviour of the corresponding str methods.
 -
 -Windows
 --------
 -
 -- Issue #21671, #22160, CVE-2014-0224: The bundled version of OpenSSL has been
 -  updated to 1.0.1i.
 -
 -- Issue #10747: Use versioned labels in the Windows start menu.
 -  Patch by Olive Kilburn.
 -
 -Tools/Demos
 ------------
 -
 -- Issue #22201: Command-line interface of the zipfile module now correctly
 -  extracts ZIP files with directory entries.  Patch by Ryan Wilson.
 -
 -- Issue #21906: Make Tools/scripts/md5sum.py work in Python 3.
 -  Patch by Zachary Ware.
 -
 -- Issue #21629: Fix Argument Clinic's "--converters" feature.
 -
 -
 -What's New in Python 3.4.1?
 -===========================
 -
 -Release date: 2014-05-18
 -
 -Core and Builtins
 ------------------
 -
 -- Issue #21418: Fix a crash in the builtin function super() when called without
 -  argument and without current frame (ex: embedded Python).
 -
 -- Issue #21425: Fix flushing of standard streams in the interactive
 -  interpreter.
 -
 -- Issue #21435: In rare cases, when running finalizers on objects in cyclic
 -  trash a bad pointer dereference could occur due to a subtle flaw in
 -  internal iteration logic.
 -
 -Library
 --------
 -
 -- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
 -  shape.
 -
 -- Issue #20998: Fixed re.fullmatch() of repeated single character pattern
 -  with ignore case.  Original patch by Matthew Barnett.
 -
 -- Issue #21075: fileinput.FileInput now reads bytes from standard stream if
 -  binary mode is specified.  Patch by Sam Kimbrel.
 -
 -- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a
 -  flush() on the underlying binary stream.  Patch by akira.
 -
 -- Issue #21470: Do a better job seeding the random number generator by
 -  using enough bytes to span the full state space of the Mersenne Twister.
 -
 -- Issue #21398: Fix an unicode error in the pydoc pager when the documentation
 -  contains characters not encodable to the stdout encoding.
 -
 -Tests
 ------
 -
 -- Issue #17756: Fix test_code test when run from the installed location.
 -
 -- Issue #17752: Fix distutils tests when run from the installed location.
 -
 -IDLE
 -----
 -
 -- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
 -  consolidating and improving human-validated tests of Idle. Change other files
 -  as needed to work with htest.  Running the module as __main__ runs all tests.
 -
 -
 -What's New in Python 3.4.1rc1?
 -==============================
 -
 -Release date: 2014-05-05
 -
 -Core and Builtins
 ------------------
 -
 -- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
 -
 -- Issue #21209: Fix sending tuples to custom generator objects with the yield
 -  from syntax.
 -
 -- Issue #21134: Fix segfault when str is called on an uninitialized
 -  UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
 -
 -- Issue #19537: Fix PyUnicode_DATA() alignment under m68k.  Patch by
 -  Andreas Schwab.
 -
 -- Issue #20929: Add a type cast to avoid shifting a negative number.
 -
 -- Issue #20731: Properly position in source code files even if they
 -  are opened in text mode. Patch by Serhiy Storchaka.
 -
 -- Issue #20637: Key-sharing now also works for instance dictionaries of
 -  subclasses.  Patch by Peter Ingebretson.
 -
 -- Issue #12546: Allow \x00 to be used as a fill character when using str, int,
 -  float, and complex __format__ methods.
 -
 -- Issue #13598: Modify string.Formatter to support auto-numbering of
 -  replacement fields. It now matches the behavior of str.format() in
 -  this regard. Patches by Phil Elson and Ramchandra Apte.
 -
 -Library
 --------
 -
 -- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
 -  In porting to Argument Clinic, the first two arguments were reversed.
 -
 -- Issue #21469:  Reduced the risk of false positives in robotparser by
 -  checking to make sure that robots.txt has been read or does not exist
 -  prior to returning True in can_fetch().
 -
 -- Issue #21321: itertools.islice() now releases the reference to the source
 -  iterator when the slice is exhausted.  Patch by Anton Afanasyev.
 -
 -- Issue #9815: assertRaises now tries to clear references to local variables
 -  in the exception's traceback.
 -
 -- Issue #13204: Calling sys.flags.__new__ would crash the interpreter,
 -  now it raises a TypeError.
 -
 -- Issue #19385: Make operations on a closed dbm.dumb database always raise the
 -  same exception.
 -
 -- Issue #21207: Detect when the os.urandom cached fd has been closed or
 -  replaced, and open it anew.
 -
 -- Issue #21291: subprocess's Popen.wait() is now thread safe so that
 -  multiple threads may be calling wait() or poll() on a Popen instance
 -  at the same time without losing the Popen.returncode value.
 -
 -- Issue #21127: Path objects can now be instantiated from str subclass
 -  instances (such as ``numpy.str_``).
 -
 -- Issue #15002: urllib.response object to use _TemporaryFileWrapper (and
 -  _TemporaryFileCloser) facility. Provides a better way to handle file
 -  descriptor close. Patch contributed by Christian Theune.
 -
 -- Issue #12220: mindom now raises a custom ValueError indicating it doesn't
 -  support spaces in URIs instead of letting a 'split' ValueError bubble up.
 +- Issue #20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not
 +  PROTOCOL_SSLv3, for maximum compatibility.
  
  - Issue #21239: patch.stopall() didn't work deterministically when the same
    name was patched more than once.
Simple merge
diff --cc Python/codecs.c
Simple merge