From: Eli Bendersky Date: Fri, 6 Sep 2013 13:14:16 +0000 (-0700) Subject: Issue #18849: Fixed a Windows-specific tempfile bug where collision with an X-Git-Tag: v3.4.0a2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=309836c5c8a7bf85c666ff913bf903b8f735cfa5;p=thirdparty%2FPython%2Fcpython.git Issue #18849: Fixed a Windows-specific tempfile bug where collision with an existing directory caused mkstemp and related APIs to fail instead of retrying. Report and fix by Vlad Shcherbina. --- 309836c5c8a7bf85c666ff913bf903b8f735cfa5 diff --cc Misc/NEWS index a506960b85b2,1c0f3b23b6a4..c69110f1f827 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -177,509 -144,347 +177,513 @@@ Librar - Issue #8112: xlmrpc.server's DocXMLRPCServer server no longer raises an error if methods have annotations; it now correctly displays the annotations. -- Issue #17998: Fix an internal error in regular expression engine. +- Issue #18600: Added policy argument to email.message.Message.as_string, + and as_bytes and __bytes__ methods to Message. -- Issue #17557: Fix os.getgroups() to work with the modified behavior of - getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik. +- Issue #18671: Output more information when logging exceptions occur. -- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns - 'SHA1' instead of 'SHA'. +- Issue #18621: Prevent the site module's patched builtins from keeping + too many references alive for too long. -- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL. +- Issue #4885: Add weakref support to mmap objects. Patch by Valerie Lambert. -- Issue #18559: Fix NULL pointer dereference error in _pickle module +- Issue #8860: Fixed rounding in timedelta constructor. -- Issue #18556: Check the return value of a PyUnicode_AsWideChar() call in - ctypes' U_set(). ++- Issue #18849: Fixed a Windows-specific tempfile bug where collision with an ++ existing directory caused mkstemp and related APIs to fail instead of ++ retrying. Report and fix by Vlad Shcherbina. + -- Issue #18549: Eliminate dead code in socket_ntohl() +Tests +----- -- Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj() +- Issue #12037: Fix test_email for desktop Windows. -- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 + - gcc. +- Issue #15507: test_subprocess's test_send_signal could fail if the test + runner were run in an environment where the process inherited an ignore + setting for SIGINT. Restore the SIGINT handler to the desired + KeyboardInterrupt raising one during that test. -- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension. +- Issue #16799: Switched from getopt to argparse style in regrtest's argument + parsing. Added more tests for regrtest's argument parsing. -- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by - Zachary Ware.) +- 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. -- Issue #18431: The new email header parser now decodes RFC2047 encoded words - in structured headers. +IDLE +---- -- Issue #18432: The sched module's queue method was incorrectly returning - an iterator instead of a list. +- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster. -- Issue #18044: The new email header parser was mis-parsing encoded words where - an encoded character immediately followed the '?' that follows the CTE - character, resulting in a decoding failure. They are now decoded correctly. +Documentation +------------- -- Issue #18101: Tcl.split() now process strings nested in a tuple as it - do with byte strings. +- Issue #18743: Fix references to non-existant "StringIO" module. -- Issue #17198: Fix a NameError in the dbm module. Patch by Valentina - Mukhamedzhanova. +- Issue #18783: Removed existing mentions of Python long type in docstrings, + error messages and comments. -- Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form. +Build +----- -- Issue #18347: ElementTree's html serializer now preserves the case of - closing tags. +- Issue #1584: Provide configure options to override default search paths for + Tcl and Tk when building _tkinter. -- Issue #17261: Ensure multiprocessing's proxies use proper address. +- Issue #15663: Tcl/Tk 8.5.14 is now included with the OS X 10.6+ 64-/32-bit + installer. It is no longer necessary to install a third-party version of + Tcl/Tk 8.5 to work around the problems in the Apple-supplied Tcl/Tk 8.5 + shipped in OS X 10.6 and later releases. -- Issue #18343: faulthandler.register() now keeps the previous signal handler - when the function is called twice, so faulthandler.unregister() restores - correctly the original signal handler. +Tools/Demos +----------- -- Issue #17097: Make multiprocessing ignore EINTR. +- Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write + their version strings to stdout, and not to sderr. -- Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a - segfault inside the _pickle C extension. -- Issue #18224: Removed pydoc script from created venv, as it causes problems - on Windows and adds no value over and above python -m pydoc ... +What's New in Python 3.4.0 Alpha 1? +=================================== -- Issue #18155: The csv module now correctly handles csv files that use - a delimter character that has a special meaning in regexes, instead of - throwing an exception. +Release date: 2013-08-03 -- Issue #14360: encode_quopri can now be successfully used as an encoder - when constructing a MIMEApplication object. +Core and Builtins +----------------- -- Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input - string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain() - raises a ValueError if the password is longer than 2 gigabytes. The ssl - module does not support partial write. +- Issue #16741: Fix an error reporting in int(). -- Issue #18248: Fix libffi build on AIX. +- Issue #17899: Fix rare file descriptor leak in os.listdir(). -- Issue #18259: Declare sethostname in socketmodule.c for AIX +- Issue #10241: Clear extension module dict copies at interpreter shutdown. + Patch by Neil Schemenauer, minimally modified. -- Issue #18167: cgi.FieldStorage no longer fails to handle multipart/form-data - when \r\n appears at end of 65535 bytes without other newlines. +- Issue #9035: ismount now recognises volumes mounted below a drive root + on Windows. Original patch by Atsuo Ishimoto. -- subprocess: Prevent a possible double close of parent pipe fds when the - subprocess exec runs into an error. Prevent a regular multi-close of the - /dev/null fd when any of stdin, stdout and stderr was set to DEVNULL. +- Issue #18214: Improve finalization of Python modules to avoid setting + their globals to None, in most cases. -- Issue #16102: Make uuid._netbios_getnode() work again on Python 3. +- Issue #18112: PEP 442 implementation (safe object finalization). -- Issue #18109: os.uname() now decodes fields from the locale encoding, and - socket.gethostname() now decodes the hostname from the locale encoding, - instead of using the UTF-8 encoding in strict mode. +- Issue #18552: Check return value of PyArena_AddPyObject() in + obj2ast_object(). -- Issue #17403: urllib.parse.robotparser normalizes the urls before adding to - ruleline. This helps in handling certain types invalid urls in a conservative - manner. +- Issue #18560: Fix potential NULL pointer dereference in sum(). -- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw - stream's read() returns more bytes than requested. +- 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 #18011: base64.b32decode() now raises a binascii.Error if there are - non-alphabet characters present in the input string to conform a docstring. - Updated the module documentation. +- 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 #13772: Restored directory detection of targets in ``os.symlink`` on - Windows, which was temporarily removed in Python 3.2.3 due to an incomplete - implementation. The implementation now works even if the symlink is created - in a location other than the current directory. +- Issue #18408: Fix many various bugs in code handling errors, especially + on memory allocation failure (MemoryError). -- Issue #16986: ElementTree now correctly parses a string input not only when - an internal XML encoding is UTF-8 or US-ASCII. +- Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all(). -- Issue #17812: Fixed quadratic complexity of base64.b32encode(). +- Issue #18342: Use the repr of a module name when an import fails when using + ``from ... import ...``. -- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of - service using certificates with many wildcards (CVE-2013-2099). +- Issue #17872: Fix a segfault in marshal.load() when input stream returns + more bytes than requested. -- Issue #17981: Closed socket on error in SysLogHandler. +- Issue #18338: `python --version` now prints version string to stdout, and + not to stderr. Patch by Berker Peksag and Michael Dickens. -- Fix typos in the multiprocessing module. +- Issue #18426: Fix NULL pointer dereference in C extension import when + PyModule_GetDef() returns an error. -- Issue #17754: Make ctypes.util.find_library() independent of the locale. +- 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 #17968: Fix memory leak in os.listxattr(). +- Issue #3329: Implement the PEP 445: Add new APIs to customize Python memory + allocators. -- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X - with port None or "0" and flags AI_NUMERICSERV. +- Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the + tstate is first removed from TLS and then deallocated. -- Issue #18698: Ensure imp.reload() returns the module out of sys.modules. +- Issue #13483: Use VirtualAlloc in obmalloc on Windows. -- Issue #18080: When building a C extension module on OS X, if the compiler - is overriden with the CC environment variable, use the new compiler as - the default for linking if LDSHARED is not also overriden. This restores - Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0. +- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise + OverflowError when an argument of %c format is out of range. -- Issue #18113: Fixed a refcount leak in the curses.panel module's - set_userptr() method. Reported by Atsuo Ishimoto. +- 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 #18849: Fixed a Windows-specific tempfile bug where collision with an - existing directory caused mkstemp and related APIs to fail instead of - retrying. Report and fix by Vlad Shcherbina. +- Issue #18137: Detect integer overflow on precision in float.__format__() + and complex.__format__(). -C API ------ +- Issue #18183: Fix various unicode operations on strings with large unicode + codepoints. -- Issue #18351: Fix various issues with a helper function in importlib used - by PyImport_ExecCodeModuleWithPathnames() (and thus by extension PyImport_ExecCodeModule() and PyImport_ExecCodeModuleEx()). +- Issue #18180: Fix ref leak in _PyImport_GetDynLoadWindows(). -IDLE ----- +- Issue #18038: SyntaxError raised during compilation sources with illegal + encoding now always contains an encoding name. -- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster. +- Issue #17931: Resolve confusion on Windows between pids and process + handles. -- Issue #18429: Format / Format Paragraph, now works when comment blocks - are selected. As with text blocks, this works best when the selection - only includes complete lines. +- Tweak the exception message when the magic number or size value in a bytecode + file is truncated. -- Issue #18226: Add docstrings and unittests for FormatParagraph.py. - Original patches by Todd Rovito and Phil Webster. +- 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 #18279: Format - Strip trailing whitespace no longer marks a file as - changed when it has not been changed. This fix followed the addition of a - test file originally written by Phil Webster (the issue's main goal). +- Issue #18065: Don't set __path__ to the package name for frozen packages. -- Issue #7136: In the Idle File menu, "New Window" is renamed "New File". - Patch by Tal Einat, Roget Serwy, and Todd Rovito. +- Issue #18088: When reloading a module, unconditionally reset all relevant + attributes on the module (e.g. __name__, __loader__, __package__, __file__, + __cached__). -- Remove dead imports of imp. +- Issue #17937: Try harder to collect cyclic garbage at shutdown. -- Issue #18196: Avoid displaying spurious SystemExit tracebacks. +- Issue #12370: Prevent class bodies from interfering with the __class__ + closure. -- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition. +- Issue #17644: Fix a crash in str.format when curly braces are used in square + brackets. -- Issue #17511: Keep IDLE find dialog open after clicking "Find Next". - Original patch by Sarah K. +- Issue #17237: Fix crash in the ASCII decoder on m68k. -- Issue #18055: Move IDLE off of imp and on to importlib. +- Issue #17927: Frame objects kept arguments alive if they had been + copied into a cell, even if the cell was cleared. -- Issue #15392: Create a unittest framework for IDLE. - Initial patch by Rajagopalasarma Jayakrishnan. - See Lib/idlelib/idle_test/README.txt for how to run Idle tests. +- Issue #1545463: At shutdown, defer finalization of codec modules so + that stderr remains usable. -- Issue #14146: Highlight source line while debugging on Windows. +- Issue #7330: Implement width and precision (ex: "%5.3s") for the format + string of PyUnicode_FromFormat() function, original patch written by Ysj Ray. -- Issue #17532: Always include Options menu for IDLE on OS X. - Patch by Guilherme Simões. +- Issue #1545463: Global variables caught in reference cycles are now + garbage-collected at shutdown. -Tests ------ +- 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 #12037: Fix test_email for desktop Windows. +- Issue #17408: Avoid using an obsolete instance of the copyreg module when + the interpreter is shutdown and then started again. -- Issue #15507: test_subprocess's test_send_signal could fail if the test - runner were run in an environment where the process inherited an ignore - setting for SIGINT. Restore the SIGINT handler to the desired - KeyboardInterrupt raising one during that test. +- Issue #5845: Enable tab-completion in the interactive interpreter by + default, thanks to a new sys.__interactivehook__. -- 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. +- Issue #17115,17116: Module initialization now includes setting __package__ and + __loader__ attributes to None. -- Issue #1666318: Add a test that shutil.copytree() retains directory - permissions. Patch by Catherine Devlin. +- Issue #17853: Ensure locals of a class that shadow free variables always win + over the closures. -- Issue #18357: add tests for dictview set difference. - Patch by Fraser Tweedale. +- Issue #17863: In the interactive console, don't loop forever if the encoding + can't be fetched from stdin. -- Issue #18273: move the tests in Lib/test/json_tests to Lib/test/test_json - and make them discoverable by unittest. Patch by Zachary Ware. +- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__. -- Fix a fcntl test case on KFreeBSD, Debian #708653 (Petr Salinger). +- Issue #18698: Ensure importlib.reload() returns the module out of sys.modules. -- Issue #18396: Fix spurious test failure in test_signal on Windows when - faulthandler is enabled (Patch by Jeremy Kloth) +- 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 #17046: Fix broken test_executable_without_cwd in test_subprocess. +- 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 #15415: Add new temp_dir() and change_cwd() context managers to - test.support, and refactor temp_cwd() to use them. Patch by Chris Jerdonek. +- Issue #17782: Fix undefined behaviour on platforms where + ``struct timespec``'s "tv_nsec" member is not a C long. -- Issue #15494: test.support is now a package rather than a module (Initial - patch by Indra Talip) +- Issue #17722: When looking up __round__, resolve descriptors. -- Issue #17944: test_zipfile now discoverable and uses subclassing to - generate tests for different compression types. Fixed a bug with skipping - some tests due to use of exhausted iterators. +- 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 + getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik. + +- Issue #18608: Avoid keeping a strong reference to the locale module + inside the _io module. + +- Issue #18619: Fix atexit leaking callbacks registered from sub-interpreters, + and make it GC-aware. + +- Issue #15699: The readline module now uses PEP 3121-style module + initialization, so as to reclaim allocated resources (Python callbacks) + at shutdown. Original patch by Robin Schreiber. + +- Issue #17616: wave.open now supports the context manager protocol. + +- Issue #18599: Fix name attribute of _sha1.sha1() object. It now returns + 'SHA1' instead of 'SHA'. + +- Issue #13266: Added inspect.unwrap to easily unravel __wrapped__ chains + (initial patch by Daniel Urban and Aaron Iles) + +- Issue #18561: Skip name in ctypes' _build_callargs() if name is NULL. + +- Issue #18559: Fix NULL pointer dereference error in _pickle module + +- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's + U_set(). + +- Issue #17818: aifc.getparams now returns a namedtuple. + +- Issue #18549: Eliminate dead code in socket_ntohl() + +- Issue #18530: Remove additional stat call from posixpath.ismount. + Patch by Alex Gaynor. + +- Issue #18514: Fix unreachable Py_DECREF() call in PyCData_FromBaseObj() + +- Issue #9177: Calling read() or write() now raises ValueError, not + AttributeError, on a closed SSL socket. Patch by Senko Rasic. + +- Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 + + gcc. + +- Issue #18479: Changed venv Activate.ps1 to make deactivate a function, and + removed Deactivate.ps1. + +- Issue #18480: Add missing call to PyType_Ready to the _elementtree extension. + +- Issue #17778: Fix test discovery for test_multiprocessing. (Patch by + Zachary Ware.) + +- Issue #18393: The private module _gestalt and private functions + platform._mac_ver_gestalt, platform._mac_ver_lookup and + platform._bcd2str have been removed. This does not affect the public + interface of the platform module. + +- Issue #17482: functools.update_wrapper (and functools.wraps) now set the + __wrapped__ attribute correctly even if the underlying function has a + __wrapped__ attribute set. + +- Issue #18431: The new email header parser now decodes RFC2047 encoded words + in structured headers. + +- Issue #18432: The sched module's queue method was incorrectly returning + an iterator instead of a list. + +- Issue #18044: The new email header parser was mis-parsing encoded words where + an encoded character immediately followed the '?' that follows the CTE + character, resulting in a decoding failure. They are now decoded correctly. + +- Issue #18101: Tcl.split() now process strings nested in a tuple as it + do with byte strings. + +- Issue #18116: getpass was always getting an error when testing /dev/tty, + and thus was always falling back to stdin. It also leaked an open file + when it did so. Both of these issues are now fixed. + +- Issue #17198: Fix a NameError in the dbm module. Patch by Valentina + Mukhamedzhanova. + +- Issue #18013: Fix cgi.FieldStorage to parse the W3C sample form. + +- Issue #18020: improve html.escape speed by an order of magnitude. + Patch by Matt Bryant. + +- Issue #18347: ElementTree's html serializer now preserves the case of + closing tags. + +- Issue #17261: Ensure multiprocessing's proxies use proper address. + +- Issue #18343: faulthandler.register() now keeps the previous signal handler + when the function is called twice, so faulthandler.unregister() restores + correctly the original signal handler. + +- Issue #17097: Make multiprocessing ignore EINTR. + +- Issue #18339: Negative ints keys in unpickler.memo dict no longer cause a + segfault inside the _pickle C extension. + +- Issue 18240: The HMAC module is no longer restricted to bytes and accepts + any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström. + +- Issue #18224: Removed pydoc script from created venv, as it causes problems + on Windows and adds no value over and above python -m pydoc ... + +- Issue #18155: The csv module now correctly handles csv files that use + a delimter character that has a special meaning in regexes, instead of + throwing an exception. + +- Issue #14360: encode_quopri can now be successfully used as an encoder + when constructing a MIMEApplication object. + +- Issue #11390: Add -o and -f command line options to the doctest CLI to + specify doctest options (and convert it to using argparse). + +- Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input + string in longer than 2 gigabytes, and ssl.SSLContext.load_cert_chain() + raises a ValueError if the password is longer than 2 gigabytes. The ssl + module does not support partial write. -- Issue #18266: test_largefile now works with unittest test discovery and - supports running only selected tests. Patch by Zachary Ware. +- Issue #11016: Add C implementation of the stat module as _stat. -- Issue #17767: test_locale now works with unittest test discovery. - Original patch by Zachary Ware. +- Issue #18248: Fix libffi build on AIX. -- Issue #18375: Assume --randomize when --randseed is used for running the - testsuite. +- Issue #18259: Declare sethostname in socketmodule.c for AIX -- Issue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé. +- Issue #18147: Add diagnostic functions to ssl.SSLContext(). get_ca_list() + lists all loaded CA certificates and cert_store_stats() returns amount of + loaded X.509 certs, X.509 CA certs and CRLs. -- Issue #17691: test_univnewlines now works with unittest test discovery. - Patch by Zachary Ware. +- Issue #18167: cgi.FieldStorage no longer fails to handle multipart/form-data + when \r\n appears at end of 65535 bytes without other newlines. -- Issue #18094: test_uuid no more reports skipped tests as passed. +- Issue #18076: Introduce importlib.util.decode_source(). +- Issue #18357: add tests for dictview set difference. + Patch by Fraser Tweedale. -- Issue #11995: test_pydoc doesn't import all sys.path modules anymore. -Documentation -------------- +- importlib.abc.SourceLoader.get_source() no longer changes SyntaxError or + UnicodeDecodeError into ImportError. -- Issue #18743: Fix references to non-existant "StringIO" module. +- Issue #18058, 18057: Make the namespace package loader meet the + importlib.abc.InspectLoader ABC, allowing for namespace packages to work with + runpy. -- Issue #18783: Removed existing mentions of Python long type in docstrings, - error messages and comments. +- Issue #17177: The imp module is pending deprecation. -- Issue #17701: Improving strftime documentation. +- subprocess: Prevent a possible double close of parent pipe fds when the + subprocess exec runs into an error. Prevent a regular multi-close of the + /dev/null fd when any of stdin, stdout and stderr was set to DEVNULL. -- Issue #18440: Clarify that `hash()` can truncate the value returned from an - object's custom `__hash__()` method. +- Issue #18194: Introduce importlib.util.cache_from_source() and + source_from_cache() while documenting the equivalent functions in imp as + deprecated. -- Issue #17953: Mention that you shouldn't replace sys.modules and deleting key - items will cause Python to not be happy. +- Issue #17907: Document imp.new_module() as deprecated in favour of + types.ModuleType. -- Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs. +- Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document as deprecated + imp.get_magic(). -- Issue #14097: improve the "introduction" page of the tutorial. +- Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache. + Patch by Mark Levitt -- Issue #17977: The documentation for the cadefault argument's default value - in urllib.request.urlopen() is fixed to match the code. +- Issue #18193: Add importlib.reload(). -Tools/Demos ------------ +- Issue #18157: Stop using imp.load_module() in pydoc. -- Issue #18817: Fix a resource warning in Lib/aifc.py demo. +- Issue #16102: Make uuid._netbios_getnode() work again on Python 3. -- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS. +- Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store. -- Issue #18448: Fix a typo in Tools/demo/eiffel.py. +- Issue #18143: Implement ssl.get_default_verify_paths() in order to debug + the default locations for cafile and capath. -- Issue #18457: Fixed saving of formulas and complex numbers in - Tools/demo/ss1.py. +- Issue #17314: Move multiprocessing.forking over to importlib. -- Issue #18449: Make Tools/demo/ss1.py work again on Python 3. Patch by - Févry Thibault. +- Issue #11959: SMTPServer and SMTPChannel now take an optional map, use of + which avoids affecting global state. -- Issue #15239: Make mkstringprep.py work again on Python 3. +- Issue #18109: os.uname() now decodes fields from the locale encoding, and + socket.gethostname() now decodes the hostname from the locale encoding, + instead of using the UTF-8 encoding in strict mode. -- Issue #12990: The "Python Launcher" on OSX could not launch python scripts - that have paths that include wide characters. +- Issue #18089: Implement importlib.abc.InspectLoader.load_module. -Build ------ +- Issue #18088: Introduce importlib.abc.Loader.init_module_attrs for setting + module attributes. Leads to the pending deprecation of + importlib.util.module_for_loader. -- Issue #16067: Add description into MSI file to replace installer's temporary name. +- Issue #17403: urllib.parse.robotparser normalizes the urls before adding to + ruleline. This helps in handling certain types invalid urls in a conservative + manner. Patch contributed by Mher Movsisyan. -- Issue #18256: Compilation fix for recent AIX releases. Patch by - David Edelsohn. +- Issue #18070: Have importlib.util.module_for_loader() set attributes + unconditionally in order to properly support reloading. -- Issue #15172: Document NASM 2.10+ as requirement for building OpenSSL 1.0.1 - on Windows. +- Added importlib.util.module_to_load to return a context manager to provide the + proper module object to load. -What's New in Python 3.3.2? -=========================== +- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw + stream's read() returns more bytes than requested. -*Release date: 13-May-2013* +- Issue #18011: base64.b32decode() now raises a binascii.Error if there are + non-alphabet characters present in the input string to conform a docstring. + Updated the module documentation. -Core and Builtins ------------------ +- Issue #18072: Implement importlib.abc.InspectLoader.get_code() and + importlib.abc.ExecutionLoader.get_code(). -- Issue #17237: Fix crash in the ASCII decoder on m68k. +- Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL + sockets. -- Issue #17408: Avoid using an obsolete instance of the copyreg module when - the interpreter is shutdown and then started again. +- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X + with port None or "0" and flags AI_NUMERICSERV. -- Issue #17863: In the interactive console, don't loop forever if the encoding - can't be fetched from stdin. +- Issue #16986: ElementTree now correctly parses a string input not only when + an internal XML encoding is UTF-8 or US-ASCII. -- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__. +- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX. -- 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 #17900: Allowed pickling of recursive OrderedDicts. Decreased pickled + size and pickling time. -- 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 #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an + initial patch by Trent Nelson. -- Issue #17782: Fix undefined behaviour on platforms where - ``struct timespec``'s "tv_nsec" member is not a C long. +- Issue #17812: Fixed quadratic complexity of base64.b32encode(). + Optimize base64.b32encode() and base64.b32decode() (speed up to 3x). -- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__ - method. +- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of + service using certificates with many wildcards (CVE-2013-2099). -- Issue #16447: Fixed potential segmentation fault when setting __name__ on a - class. +- Issue #15758: Fix FileIO.readall() so it no longer has O(n**2) complexity. -- Issue #17669: Fix crash involving finalization of generators using yield from. +- Issue #14596: The struct.Struct() objects now use more compact implementation. -- Issue #17619: Make input() check for Ctrl-C correctly on Windows. +- Issue #17981: Closed socket on error in SysLogHandler. -- Issue #17610: Don't rely on non-standard behavior of the C qsort() function. +- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function + is long, not int. + +- Fix typos in the multiprocessing module. -- Issue #17357: Add missing verbosity output when using -v/-vv. +- Issue #17754: Make ctypes.util.find_library() independent of the locale. -Library -------- +- Issue #17968: Fix memory leak in os.listxattr(). - Issue #17606: Fixed support of encoded byte strings in the XMLGenerator characters() and ignorableWhitespace() methods. Original patch by Sebastian