From: Trent Nelson Date: Tue, 21 Aug 2012 01:40:21 +0000 (-0400) Subject: Issue #15285: Refactor connect timeout test in test_timeout. X-Git-Tag: v3.3.0rc1~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=139cd4352f38e3e1d6b1f86033dc86ec61620e72;p=python Issue #15285: Refactor connect timeout test in test_timeout. --- 139cd4352f38e3e1d6b1f86033dc86ec61620e72 diff --cc Misc/NEWS index 666934eabc,02e3ef7585..29d11f3025 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -16,706 -16,545 +16,710 @@@ Core and Builtin - Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly. Patch by Serhiy Storchaka. -- Issue #13119: sys.stdout and sys.stderr are now using "\r\n" newline on - Windows, as Python 2. +- Issue #14846: importlib.FileFinder now handles the case where the + directory being searched is removed after a previous import attempt -- Issue #14579: Fix CVE-2012-2135: vulnerability in the utf-16 decoder after - error handling. Patch by Serhiy Storchaka. +Library +------- -- Issue #15404: Refleak in PyMethodObject repr. +- Issue #15199: Fix JavaScript's default MIME type to application/javascript. + Patch by Bohuslav Kabrda. -- Issue #15394: An issue in PyModule_Create that caused references to - be leaked on some error paths has been fixed. Patch by Julia Lawall. +- Issue #12643: code.InteractiveConsole now respects sys.excepthook when + displaying exceptions (Patch by Aaron Iles) -- Issue #15368: An issue that caused bytecode generation to be - non-deterministic when using randomized hashing (-R) has been fixed. +- Issue #13579: string.Formatter now understands the 'a' conversion specifier. -- Issue #15020: The program name used to search for Python's path is now - "python3" under Unix, not "python". +- Issue #15595: Fix subprocess.Popen(universal_newlines=True) + for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek. -- Issue #15033: Fix the exit status bug when modules invoked using -m swith, - return the proper failure return value (1). Patch contributed by Jeff Knupp. +- Issue #15477: In cmath and math modules, add workaround for platforms whose + system-supplied log1p function doesn't respect signs of zeros. -- Issue #12268: File readline, readlines and read() or readall() methods - no longer lose data when an underlying read system call is interrupted. - IOError is no longer raised due to a read system call returning EINTR - from within these methods. +- Issue #15715: importlib.__import__() will silence an ImportError when the use + of fromlist leads to a failed import. -- Issue #15142: Fix reference leak when deallocating instances of types - created using PyType_FromSpec(). +- Issue #14669: Fix pickling of connections and sockets on MacOSX + by sending/receiving an acknowledgment after file descriptor transfer. + TestPicklingConnection has been reenabled for MacOSX. -- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on - the work by Hirokazu Yamamoto. +- Issue #11062: Fix adding a message from file to Babyl mailbox. -- Issue #14775: Fix a potential quadratic dict build-up due to the garbage - collector repeatedly trying to untrack dicts. +- Issue #15646: Prevent equivalent of a fork bomb when using + multiprocessing on Windows without the "if __name__ == '__main__'" + idiom. -- Issue #14494: Fix __future__.py and its documentation to note that - absolute imports are the default behavior in 3.0 instead of 2.7. - Patch by Sven Marnach. +- Issue #15678: Fix IDLE menus when started from OS X command line + (3.3.0b2 regression). -- Issue #14761: Fix potential leak on an error case in the import machinery. +C API +----- -- Issue #14699: Fix calling the classmethod descriptor directly. +Extension Modules +----------------- -- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin - is closed. +Tools/Demos +----------- -- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError - when repr() or str() is called on such an object. +Documentation +------------- -- Issue #14658: Fix binding a special method to a builtin implementation of a - special method with a different name. +- Create a 'Concurrent Execution' section in the docs, and split up the + 'Optional Operating System Services' section to use a more user-centric + classification scheme (splitting them across the new CE section, IPC and + text processing). Operating system limitatons can be reflected with + the Sphinx :platform: tag, it doesn't make sense as part of the Table of + Contents. -- Issue #14630: Fix a memory access bug for instances of a subclass of int - with value 0. +- Issue #4966: Bring the sequence docs up to date for the Py3k transition + and the many language enhancements since they were original written -- Issue #14612: Fix jumping around with blocks by setting f_lineno. +- The "path importer" misnomer has been replaced with Eric Snow's + more-awkward-but-at-least-not-wrong suggestion of "path based finder" in + the import system reference docs -- Issue #14607: Fix keyword-only arguments which started with ``__``. +- Issue #15640: Document importlib.abc.Finder as deprecated. -- Issue #13889: Check and (if necessary) set FPU control word before calling - any of the dtoa.c string <-> float conversion functions, on MSVC builds of - Python. This fixes issues when embedding Python in a Delphi app. +- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by + Daniel Ellis. -- Issue #14474: Save and restore exception state in thread.start_new_thread() - while writing error message if the thread leaves a unhandled exception. +Tests +----- -- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch - by Suman Saha. ++- Issue #15285: Refactor the approach for testing connect timeouts using ++ two external hosts that have been configured specifically for this type ++ of test. + -- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as - the module name that was not interned. +- Issue #15743: Remove the deprecated method usage in urllib tests. Patch by + Jeff Knupp. -- Issue #14331: Use significantly less stack space when importing modules by - allocating path buffers on the heap instead of the stack. +- Issue #15615: Add some tests for the json module's handling of invalid + input data. Patch by Kushal Das. -- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not - passed strings. -- Issue #1469629: Allow cycles through an object's __dict__ slot to be - collected. (For example if ``x.__dict__ is x``). +What's New in Python 3.3.0 Beta 2? +================================== -- Issue #14172: Fix reference leak when marshalling a buffer-like object - (other than a bytes object). +*Release date: 12-Aug-2012* -- Issue #13521: dict.setdefault() now does only one lookup for the given key, - making it "atomic" for many purposes. Patch by Filip Gruszczyński. +Core and Builtins +----------------- -- Issue #14471: Fix a possible buffer overrun in the winreg module. +- Issue #15568: Fix the return value of "yield from" when StopIteration is + raised by a custom iterator. -Library -------- +- Issue #13119: sys.stdout and sys.stderr are now using "\r\n" newline on + Windows, as Python 2. -- Issue #15199: Fix JavaScript's default MIME type to application/javascript. - Patch by Bohuslav Kabrda. +- Issue #15534: Fix the fast-search function for non-ASCII Unicode strings. -- Issue #13579: string.Formatter now understands the 'a' conversion specifier. +- Issue #15508: Fix the docstring for __import__ to have the proper default + value of 0 for 'level' and to not mention negative levels since they are not + supported. -- Issue #15595: Fix subprocess.Popen(universal_newlines=True) - for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek. +- Issue #15425: Eliminated traceback noise from more situations involving + importlib. -- Issue #15477: In cmath and math modules, add workaround for platforms whose - system-supplied log1p function doesn't respect signs of zeros. +- Issue #14578: Support modules registered in the Windows registry again. -- Issue #11062: Fix adding a message from file to Babyl mailbox. +- Issue #15466: Stop using TYPE_INT64 in marshal, to make importlib.h (and other + byte code files) equal between 32-bit and 64-bit systems. -- Issue #15646: Prevent equivalent of a fork bomb when using - multiprocessing on Windows without the "if __name__ == '__main__'" - idiom. +- Issue #1692335: Move initial exception args assignment to + "BaseException.__new__" to help pickling of naive subclasses. -- Issue #15424: Add a __sizeof__ implementation for array objects. - Patch by Ludwig Hähne. +- Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays. -- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog - ended with '\'. Patch by Roger Serwy. +- Issue #15456: Fix code __sizeof__ after #12399 change. Patch by Serhiy + Storchaka. -- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() - emulation code. Patch by Philipp Hagemeister. +- Issue #15404: Refleak in PyMethodObject repr. -- Issue #9803: Don't close IDLE on saving if breakpoint is open. - Patch by Roger Serwy. +- Issue #15394: An issue in PyModule_Create that caused references to be leaked + on some error paths has been fixed. Patch by Julia Lawall. -- Issue #12288: Consider '0' and '0.0' as valid initialvalue - for tkinter SimpleDialog. +- Issue #15368: An issue that caused bytecode generation to be non-deterministic + has been fixed. -- Issue #15512: Add a __sizeof__ implementation for parser. - Patch by Serhiy Storchaka. +- Issue #15202: Consistently use the name "follow_symlinks" for new parameters + in os and shutil functions. -- Issue #15469: Add a __sizeof__ implementation for deque objects. - Patch by Serhiy Storchaka. +- Issue #15314: __main__.__loader__ is now set correctly during interpreter + startup. -- Issue #15489: Add a __sizeof__ implementation for BytesIO objects. - Patch by Serhiy Storchaka. +- Issue #15111: When a module imported using 'from import' has an ImportError + inside itself, don't mask that fact behind a generic ImportError for the + module itself. -- Issue #15487: Add a __sizeof__ implementation for buffered I/O objects. - Patch by Serhiy Storchaka. +- Issue #15293: Add GC support to the AST base node type. -- Issue #6056: Make multiprocessing use setblocking(True) on the - sockets it uses. Original patch by J Derek Wilson. +- Issue #15291: Fix a memory leak where AST nodes where not properly + deallocated. -- Issue #15041: update "see also" list in tkinter documentation. +- Issue #15110: Fix the tracebacks generated by "import xxx" to not show the + importlib stack frames. -- Issue #15402: An issue in the struct module that caused sys.getsizeof to - return incorrect results for struct.Struct instances has been fixed. - Initial patch by Serhiy Storchaka. +- Issue #15020: The program name used to search for Python's path is now + "python3" under Unix, not "python". -- Issue #15232: when mangle_from is True, email.Generator now correctly mangles - lines that start with 'From ' that occur in a MIME preamble or epilogue. +- Issue #15033: Fix the exit status bug when modules invoked using -m swith, + return the proper failure return value (1). Patch contributed by Jeff Knupp. -- Issue #13922: argparse no longer incorrectly strips '--'s that appear - after the first one. +- Issue #15229: An OSError subclass whose __init__ doesn't call back + OSError.__init__ could produce incomplete instances, leading to crashes when + calling str() on them. -- Issue #12353: argparse now correctly handles null argument values. +- Issue 15307: Virtual environments now use symlinks with framework builds on + Mac OS X, like other POSIX builds. -- Issues #10017 and #14998: Fix TypeError using pprint on dictionaries with - user-defined types as keys or other unorderable keys. +Library +------- -- Issue #14635: telnetlib will use poll() rather than select() when possible - to avoid failing due to the select() file descriptor limit. +- Issue #15424: Add a __sizeof__ implementation for array objects. Patch by + Ludwig Hähne. -- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes +- Issue #15576: Allow extension modules to act as a package's __init__ module. -- Issue #15230: runpy.run_path now correctly sets __package__ as described - in the documentation +- Issue #15502: Have importlib.invalidate_caches() work on sys.meta_path instead + of sys.path_importer_cache. -- Issue #14990: Correctly fail with SyntaxError on invalid encoding - declaration. +- Issue #15163: Pydoc shouldn't list __loader__ as module data. -- Issue #15247: FileIO now raises an error when given a file descriptor - pointing to a directory. +- Issue #15471: Do not use mutable objects as defaults for + importlib.__import__(). -- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox - files on flush(). +- Issue #15559: To avoid a problematic failure mode when passed to the bytes + constructor, objects in the ipaddress module no longer implement __index__ + (they still implement __int__ as appropriate) -- Issue #10571: Fix the "--sign" option of distutils' upload command. - Patch by Jakub Wilk. +- Issue #15546: Fix handling of pathological input data in the peek() and + read1() methods of the BZ2File, GzipFile and LZMAFile classes. -- Issue #9559: If messages were only added, a new file is no longer - created and renamed over the old file when flush() is called on an - mbox, MMDF or Babyl mailbox. +- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog + ended with '\'. Patch by Roger Serwy. -- Issue #14653: email.utils.mktime_tz() no longer relies on system - mktime() when timezone offest is supplied. +- Issue #12655: Instead of requiring a custom type, os.sched_getaffinity and + os.sched_setaffinity now use regular sets of integers to represent the CPUs a + process is restricted to. -- Fix GzipFile's handling of filenames given as bytes objects. +- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation + code. Patch by Philipp Hagemeister. -- Issue #15101: Make pool finalizer avoid joining current thread. +- Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use the + correct term for it). Original patch by Eric Snow. -- Issue #15036: Mailbox no longer throws an error if a flush is done - between operations when removing or changing multiple items in mbox, - MMDF, or Babyl mailboxes. +- Issue #15502: Bring the importlib ABCs into line with the current state of the + import protocols given PEP 420. Original patch by Eric Snow. -- Issue #10133: Make multiprocessing deallocate buffer if socket read - fails. Patch by Hallvard B Furuseth. +- Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds. + Original patch by Anton Barkovsky. -- Issue #13854: Make multiprocessing properly handle non-integer - non-string argument to SystemExit. +- Issue #15463: The faulthandler module truncates strings to 500 characters, + instead of 100, to be able to display long file paths. -- Issue #12157: Make pool.map() empty iterables correctly. Initial - patch by mouad. +- Issue #6056: Make multiprocessing use setblocking(True) on the sockets it + uses. Original patch by J Derek Wilson. -- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError - when the path existed and had the S_ISGID mode bit set when it was - not explicitly asked for. This is no longer an exception as mkdir - cannot control if the OS sets that bit for it or not. +- Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path. -- Issue #14962: Update text coloring in IDLE shell window after changing - options. Patch by Roger Serwy. +- Issue #15041: Update "see also" list in tkinter documentation. -- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu. +- Issue #15413: os.times() had disappeared under Windows. -- Issue #14443: Tell rpmbuild to use the correct version of Python in - bdist_rpm. Initial patch by Ross Lagerwall. +- Issue #15402: An issue in the struct module that caused sys.getsizeof to + return incorrect results for struct.Struct instances has been fixed. Initial + patch by Serhiy Storchaka. -- Issue #14929: Stop Idle 3.x from closing on Unicode decode errors when - grepping. Patch by Roger Serwy. +- Issue #15232: When mangle_from is True, email.Generator now correctly mangles + lines that start with 'From ' that occur in a MIME preamble or epilogue. -- Issue #12510: Attempting to get invalid tooltip no longer closes Idle. - Other tooltipss have been corrected or improved and the number of tests - has been tripled. Original patch by Roger Serwy. +- Issue #15094: Incorrectly placed #endif in _tkinter.c. Patch by Serhiy + Storchaka. -- Issue #10365: File open dialog now works instead of crashing even when - the parent window is closed before the dialog. Patch by Roger Serwy. +- Issue #13922: argparse no longer incorrectly strips '--'s that appear after + the first one. -- Issue #14876: Use user-selected font for highlight configuration. +- Issue #12353: argparse now correctly handles null argument values. -- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals. - Have ascii characters in help. +- Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with + user-defined types as keys or other unorderable keys. -- Issue #14863: Update the documentation of os.fdopen() to reflect the - fact that it's only a thin wrapper around open() anymore. +- Issue #15397: inspect.getmodulename() is now based directly on importlib via a + new importlib.machinery.all_suffixes() API. -- Issue #14036: Add an additional check to validate that port in urlparse does - not go in illegal range and returns None. +- Issue #14635: telnetlib will use poll() rather than select() when possible to + avoid failing due to the select() file descriptor limit. -- Issue #14875: Use float('inf') instead of float('1e66666') in the json module. +- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes. -- Issue #14426: Correct the Date format in Expires attribute of Set-Cookie - Header in Cookie.py. +- Issue #15343: pkgutil now includes an iter_importer_modules implementation for + importlib.machinery.FileFinder (similar to the way it already handled + zipimport.zipimporter). -- Issue #14721: Send the correct 'Content-length: 0' header when the body is an - empty string ''. Initial Patch contributed by Arve Knudsen. +- Issue #15314: runpy now sets __main__.__loader__ correctly. -- Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for - ports stricter. +- Issue #15357: The import emulation in pkgutil is now deprecated. pkgutil uses + importlib internally rather than the emulation. -- Issue #9374: Generic parsing of query and fragment portions of url for any - scheme. Supported both by RFC3986 and RFC2396. +- Issue #15233: Python now guarantees that callables registered with the atexit + module will be called in a deterministic order. -- Issue #14798: Fix the functions in pyclbr to raise an ImportError - when the first part of a dotted name is not a package. Patch by - Xavier de Gaye. +- Issue #15238: shutil.copystat now copies Linux "extended attributes". -- Issue #14829: Fix bisect and range() indexing with large indices - (>= 2 ** 32) under 64-bit Windows. +- Issue #15230: runpy.run_path now correctly sets __package__ as described in + the documentation. -- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when - accessing the Tk clipboard. Modify clipboad_get() to first request type - UTF8_STRING when no specific type is requested in an X11 windowing - environment, falling back to the current default type STRING if that fails. - Original patch by Thomas Kluyver. +- Issue #15315: Support VS 2010 in distutils cygwincompiler. -- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic - Authentation in urllib2. +- Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested + namespace packages. -- Issue #14662: Prevent shutil failures on OS X when destination does not - support chflag operations. Patch by Hynek Schlawack. +- Issue #15056: imp.cache_from_source() and source_from_cache() raise + NotImplementedError when sys.implementation.cache_tag is set to None. -- Issue #14157: Fix time.strptime failing without a year on February 29th. - Patch by Hynek Schlawack. +- Issue #15256: Grammatical mistake in exception raised by imp.find_module(). -- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'. +- Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an + implementation specific term like CPython, Jython instead of generic "Python". -- Issue #14741: Fix missing support for Ellipsis ('...') in parser module. +- Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter and + BufferedRWPair, from the io module. -- Issue #14697: Fix missing support for set displays and set comprehensions in - parser module. +- Issue #13248: Remove obsolete argument "version" of argparse.ArgumentParser. -- Issue #14701: Fix missing support for 'raise ... from' in parser module. +- Issue #14814: Implement more consistent ordering and sorting behaviour for + ipaddress objects. -- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running - step. Patch by Xavier de Gaye. +- Issue #14814: ipaddress network objects correctly return NotImplemented when + compared to arbitrary objects instead of raising TypeError. -- Issue #14696: Fix parser module to understand 'nonlocal' declarations. +- Issue #14990: Correctly fail with SyntaxError on invalid encoding declaration. -- Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near - the DST transition. Patch by Joe Peterson. +- Issue #14814: ipaddress now provides more informative error messages when + constructing instances directly (changes permitted during beta due to + provisional API status). -- Issue #9154: Fix parser module to understand function annotations. +- Issue #15247: FileIO now raises an error when given a file descriptor pointing + to a directory. -- Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a - test class that doesn't inherit from TestCase (i.e. a mixin). +- Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open. -- Issue #14160: TarFile.extractfile() failed to resolve symbolic links when - the links were not located in an archive subdirectory. +- Issue #15166: Implement imp.get_tag() using sys.implementation.cache_tag. -- Issue #14638: pydoc now treats non-string __name__ values as if they - were missing, instead of raising an error. +- Issue #15210: Catch KeyError when importlib.__init__ can't find + _frozen_importlib in sys.modules, not ImportError. -- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites - which send EOF without trailing \r\n. +- Issue #15030: importlib.abc.PyPycLoader now supports the new source size + header field in .pyc files. -- Issue #14629: Raise SyntaxError in tokenizer.detect_encoding if the - first two lines have non-UTF-8 characters without an encoding declaration. +- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on + flush(). -- Issue #14308: Fix an exception when a "dummy" thread is in the threading - module's active list after a fork(). +- Issue #10571: Fix the "--sign" option of distutils' upload command. Patch by + Jakub Wilk. -- Issue #14538: HTMLParser can now parse correctly start tags that contain - a bare '/'. +- Issue #9559: If messages were only added, a new file is no longer created and + renamed over the old file when flush() is called on an mbox, MMDF or Babyl + mailbox. -- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message. +- Issue 10924: Fixed crypt.mksalt() to use a RNG that is suitable for + cryptographic purpose. -- Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied - to a collection of size > sys.maxsize / 2. +- Issue #15184: Ensure consistent results of OS X configuration tailoring for + universal builds by factoring out common OS X-specific customizations from + sysconfig, distutils.sysconfig, distutils.util, and distutils.unixccompiler + into a new module _osx_support. -- Issue #14399: zipfile now recognizes that the archive has been modified even - if only the comment is changed. In addition, the TypeError that results from - trying to set a non-binary value as a comment is now now raised at the time - the comment is set rather than at the time the zipfile is written. +C API +----- -- Issue #7978: socketserver now restarts the select() call when EINTR is - returned. This avoids crashing the server loop when a signal is received. - Patch by Jerzy Kozera. +- Issue #15610: PyImport_ImportModuleEx() now uses a 'level' of 0 instead of -1. -- Issue #14496: Fix wrong name in idlelib/tabbedpages.py. - Patch by Popa Claudiu. +- Issues #15169, #14599: Strip out the C implementation of + imp.source_from_cache() used by PyImport_ExecCodeModuleWithPathnames() and + used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not + try to infer the source path from the bytecode path as + PyImport_ExecCodeModuleWithPathnames() does. -- Issue #14482: Raise a ValueError, not a NameError, when trying to create - a multiprocessing Client or Listener with an AF_UNIX type address under - Windows. Patch by Popa Claudiu. +Extension Modules +----------------- -- Issue #14151: Raise a ValueError, not a NameError, when trying to create - a multiprocessing Client or Listener with an AF_PIPE type address under - non-Windows platforms. Patch by Popa Claudiu. +- Issue #6493: An issue in ctypes on Windows that caused structure bitfields + of type ctypes.c_uint32 and width 32 to incorrectly be set has been fixed. -- Issue #13872: socket.detach() now marks the socket closed (as mirrored - in the socket repr()). Patch by Matt Joiner. +- Issue #15194: Update libffi to the 3.0.11 release. -- Issue #14406: Fix a race condition when using ``concurrent.futures.wait( - return_when=ALL_COMPLETED)``. Patch by Matt Joiner. +Tools/Demos +----------- -- Issue #14409: IDLE now properly executes commands in the Shell window - when it cannot read the normal config files on startup and - has to use the built-in default key bindings. - There was previously a bug in one of the defaults. +- Issue #15458: python-config gets a new option --configdir to print the $LIBPL + value. -- Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on - OSX; avoid to call handle_connect in case of a disconnected socket which - was not meant to connect. +- Move importlib.test.benchmark to Tools/importbench. -- Issue #12757: Fix the skipping of doctests when python is run with -OO so - that it works in unittest's verbose mode as well as non-verbose mode. +- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have been + enhanced to show information on more C frames relevant to CPython within the + "py-bt" and "py-bt-full" commands: + * C frames that are waiting on the GIL + * C frames that are garbage-collecting + * C frames that are due to the invocation of a PyCFunction -- Issue #3573: IDLE hangs when passing invalid command line args - (directory(ies) instead of file(s)) (Patch by Guilherme Polo) +Documentation +------------- -- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr - attribute. +- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch + by Serhiy Storchaka. -- Issue #11686: Added missing entries to email package __all__ lists - (mostly the new Bytes classes). +- Issue #15295: Reorganize and rewrite the documentation on the import system. -- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem. +- Issue #15230: Clearly document some of the limitations of the runpy module and + nudge readers towards importlib when appropriate. -- Issue #11199: Fix the with urllib which hangs on particular ftp urls. +- Issue #15053: Copy Python 3.3 import lock change notice to all relevant + functions in imp instead of just at the top of the relevant section. -- Issue #14062: Header objects now correctly respect the 'linesep' setting - when processed by BytesParser (which smtplib.SMTP.send_message uses). +- Issue #15288: Link to the term "loader" in notes in pkgutil about how things + won't work as expected in Python 3.3 and mark the requisite functions as + "changed" since they will no longer work with modules directly imported by + import itself. -- Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers - instead of raising an error. This fixes a regression relative to 2.7. +- Issue #13557: Clarify effect of giving two different namespaces to exec or + execfile(). -- Issue #5219: Prevent event handler cascade in IDLE. +- Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch + contributed by Chris Jerdonek. -- Issue #14184: Increase the default stack size for secondary threads on - Mac OS X to avoid interpreter crashes when using threads on 10.7. +Tests +----- -- Issue #10543: Fix unittest test discovery with Jython bytecode files. +- Issue #15467: Move helpers for __sizeof__ tests into test_support. Patch by + Serhiy Storchaka. -- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under - Windows when the child process has already exited. +- Issue #15320: Make iterating the list of tests thread-safe when running tests + in multiprocess mode. Patch by Chris Jerdonek. -- Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly - return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been - fixed. +- Issue #15168: Move importlib.test to test.test_importlib. -- Issue #14177: marshal.loads() now raises TypeError when given an unicode - string. Patch by Guilherme Gonçalves. +- Issue #15091: Reactivate a test on UNIX which was failing thanks to a + forgotten importlib.invalidate_caches() call. -- Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, - WeakValueDictionary) to return a better approximation when some objects - are dead or dying. Moreover, the implementation is now O(1) rather than - O(n). +- Issue #15230: Adopted a more systematic approach in the runpy tests. -- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode. - Patch by Mikhail Novikov. +- Issue #15300: Ensure the temporary test working directories are in the same + parent folder when running tests in multiprocess mode from a Python build. + Patch by Chris Jerdonek. -- Issue #13447: Add a test file to host regression tests for bugs in the - scripts found in the Tools directory. +- Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not + enabled. Patch by Brian Brazil. -- Issue #8033: sqlite3: Fix 64-bit integer handling in user functions - on 32-bit architectures. Initial patch by Philippe Devalkeneer. +- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. Patch + by Brian Brazil. -Extension Modules +Build +----- + +- Issue #11715: Fix multiarch detection without having Debian development tools + (dpkg-dev) installed. + +- Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries + to avoid curses.unget_wch bug present in older versions of ncurses such as + those shipped with OS X. + +- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. Also, for + OS X installers, ensure consistent sqlite3 behavior and feature availability + by building a local copy of libsqlite3 rather than depending on the wide range + of versions supplied with various OS X releases. + +- Issue #8847: Disable COMDAT folding in Windows PGO builds. + +- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs. + +- Issue #15431: Add _freeze_importlib project to regenerate importlib.h on + Windows. Patch by Kristján Valur Jónsson. + +- Issue #14197: For OS X framework builds, ensure links to the shared library + are created with the proper ABI suffix. + +- Issue #14330: For cross builds, don't use host python, use host search paths + for host compiler. + +- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module. + +- Issue #15268: Search curses.h in /usr/include/ncursesw. + + +What's New in Python 3.3.0 Beta 1? +================================== + +*Release date: 27-Jun-2012* + +Core and Builtins ----------------- -- Issue #6493: An issue in ctypes on Windows that caused structure bitfields - of type ctypes.c_uint32 and width 32 to incorrectly be set has been fixed. +- Fix a (most likely) very rare memory leak when calling main() and not being + able to decode a command-line argument. -- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c. +- Issue #14815: Use Py_ssize_t instead of long for the object hash, to + preserve all 64 bits of hash on Win64. -- Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and - ctypes.c_float that caused an incorrect exception to be returned in the - case of overflow has been fixed. +- Issue #12268: File readline, readlines and read() or readall() methods + no longer lose data when an underlying read system call is interrupted. + IOError is no longer raised due to a read system call returning EINTR + from within these methods. -- Issue #14212: The re module didn't retain a reference to buffers it was - scanning, resulting in segfaults. +- Issue #11626: Add _SizeT functions to stable ABI. -Tests ------ +- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber. -- Issue #15285: Refactor the approach for testing connect timeouts using - two external hosts that have been configured specifically for this type - of test. +- Issue #15142: Fix reference leak when deallocating instances of types + created using PyType_FromSpec(). -- Issue #15615: Add some tests for the json module's handling of invalid - input data. Patch by Kushal Das. +- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version + guard for Py_LIMITED_API additions. Patch by Robin Schreiber. -- Issue #15496: Add directory removal helpers for tests on Windows. - Patch by Jeremy Kloth. +- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on + the work by Hirokazu Yamamoto. + +- Issue #15096: Removed support for ur'' as the raw notation isn't + compatible with Python 2.x's raw unicode strings. + +- Issue #13783: Generator objects now use the identifier APIs internally -- Issue #15467: Move helpers for __sizeof__ tests into test_support. +- Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. Patch by Serhiy Storchaka. -- Issue #15320: Make iterating the list of tests thread-safe when running - tests in multiprocess mode. Patch by Chris Jerdonek. +- Issue #15026: utf-16 encoding is now significantly faster (up to 10x). + Patch by Serhiy Storchaka. -- Issue #15230: Adopted a more systematic approach in the runpy tests +- Issue #11022: open() and io.TextIOWrapper are now calling + locale.getpreferredencoding(False) instead of locale.getpreferredencoding() + in text mode if the encoding is not specified. Don't change temporary the + locale encoding using locale.setlocale(), use the current locale encoding + instead of the user preferred encoding. -- Issue #15300: Ensure the temporary test working directories are in the same - parent folder when running tests in multiprocess mode from a Python build. - Patch by Chris Jerdonek. +- Issue #14673: Add Eric Snow's sys.implementation implementation. -- test_nntplib now tolerates being run from behind NNTP gateways that add - "X-Antivirus" headers to articles +- Issue #15038: Optimize python Locks on Windows. -- Issue #15043: test_gdb is now skipped entirely if gdb security settings - block loading of the gdb hooks +Library +------- -- Issue #14026: In test_cmd_line_script, check that sys.argv is populated - correctly for the various invocation approaches (Patch by Jason Yeo) +- Issue #9803: Don't close IDLE on saving if breakpoint is open. + Patch by Roger Serwy. -- Issue #14032: Fix incorrect variable name in test_cmd_line_script debugging - message (Patch by Jason Yeo) +- Issue #12288: Consider '0' and '0.0' as valid initialvalue + for tkinter SimpleDialog. -- Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing - a test failure in test_ssl. +- Issue #15512: Add a __sizeof__ implementation for parser. + Patch by Serhiy Storchaka. -Build ------ +- Issue #15469: Add a __sizeof__ implementation for deque objects. + Patch by Serhiy Storchaka. -- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. +- Issue #15489: Add a __sizeof__ implementation for BytesIO objects. + Patch by Serhiy Storchaka. -- Issue #8847: Disable COMDAT folding in Windows PGO builds. +- Issue #15487: Add a __sizeof__ implementation for buffered I/O objects. + Patch by Serhiy Storchaka. -- Issue #14197: For OS X framework builds, ensure links to the shared - library are created with the proper ABI suffix. +- Issue #15514: Correct __sizeof__ support for cpu_set. + Patch by Serhiy Storchaka. -- Issue #14472: Update .gitignore. Patch by Matej Cepl. +- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving + behind. -- The Windows build now uses OpenSSL 1.0.0j and bzip2 1.0.6. +- Issue #15177: Added dir_fd parameter to os.fwalk(). -- Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban. +- Issue #15176: Clarified behavior, documentation, and implementation + of os.listdir(). -- Issue #14437: Fix building the _io module under Cygwin. +- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further + timing analysis and to support all buffer protocol aware objects as well as + ASCII only str instances safely. -- Issue #14387: Do not include accu.h from Python.h. +- Issue #15164: Change return value of platform.uname() from a + plain tuple to a collections.namedtuple. -- Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined. - Based on patch from Hervé Coatanhay. +- Support Mageia Linux in the platform module. -- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs. +- Issue #11678: Support Arch linux in the platform module. -Documentation -------------- +- Issue #15118: Change return value of os.uname() and os.times() from + plain tuples to immutable iterable objects with named attributes + (structseq objects). -- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by - Daniel Ellis. +- Speed up _decimal by another 10-15% by caching the thread local context + that was last accessed. In the pi benchmark (64-bit platform, prec=9), + _decimal is now only 1.5x slower than float. -- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch - by Serhiy Storchaka. +- Remove the packaging module, which is not ready for prime time. -- Issue 15482: Properly document the default 'level' value for __import__() - while warning about using negative values. +- Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir" + parameter from os.remove / os.unlink. -- Issue #15230: Clearly document some of the limitations of the runpy - module and nudge readers towards importlib when appropriate. +- Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks. + It is used automatically on platforms supporting the necessary os.openat() + and os.unlinkat() functions. Main code by Martin von Löwis. -- Issue #13557: Clarify effect of giving two different namespaces to exec or - execfile(). +- Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary. -- Issue #8799: Fix and improve the threading.Condition documentation. +- Issue #11113: add a new "html5" dictionary containing the named character + references defined by the HTML5 standard and the equivalent Unicode + character(s) to the html.entities module. -- Issue #14943: Correct a default argument value for winreg.OpenKey - and correctly list the argument names in the function's explanation. +- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception + are deprecated now that the parser is able to parse invalid markup. -- Issue #14034: added the argparse tutorial. +- Issue #3665: \u and \U escapes are now supported in unicode regular + expressions. Patch by Serhiy Storchaka. -- Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch - contributed by Chris Jerdonek. +- Issue #15153: Added inspect.getgeneratorlocals to simplify white box + testing of generator state updates -Tools/Demos ------------ +- Issue #13062: Added inspect.getclosurevars to simplify testing stateful + closures -- Issue #14695: Fix missing support for starred assignments in - Tools/parser/unparse.py. +- Issue #11024: Fixes and additional tests for Time2Internaldate. +- Issue #14626: Large refactoring of functions / parameters in the os module. + Many functions now support "dir_fd" and "follow_symlinks" parameters; + some also support accepting an open file descriptor in place of of a path + string. Added os.support_* collections as LBYL helpers. Removed many + functions only previously seen in 3.3 alpha releases (often starting with + "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka; + implemented by Larry Hastings. -What's New in Python 3.2.3? -=========================== +- Issue #15008: Implement PEP 362 "Signature Objects". + Patch by Yury Selivanov. -*Release date: 10-Apr-2012* +- Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster. -Build ------ +- Issue #444582: Add shutil.which, for finding programs on the system path. + Original patch by Erik Demaine, with later iterations by Jan Killian + and Brian Curtin. -- Issue #14387: Work around a problem building extension modules under Windows - by undefining ``small`` before use in the Python headers. +- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes + describing precisely what happened and in which OpenSSL submodule. The + str() of a SSLError is also enhanced accordingly. +- Issue #9527: datetime.astimezone() method will now supply a class + timezone instance corresponding to the system local timezone when + called with no arguments. -What's New in Python 3.2.3 release candidate 2? -=============================================== +- Issue #14653: email.utils.mktime_tz() no longer relies on system + mktime() when timezone offest is supplied. -*Release date: 18-Mar-2012* +- Issue #14684: zlib.compressobj() and zlib.decompressobj() now support the use + of predefined compression dictionaries. Original patch by Sam Rushing. -Library -------- +- Fix GzipFile's handling of filenames given as bytes objects. -- Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils - on Windows. +- Issue #14772: Return destination values from some shutil functions. + +- Issue #15064: Implement context manager protocol for multiprocessing types + +- Issue #15101: Make pool finalizer avoid joining current thread. + +- Issue #14657: The frozen instance of importlib used for bootstrap is now + also the module imported as importlib._bootstrap. + +- Issue #14055: Add __sizeof__ support to _elementtree. + +- Issue #15054: A bug in tokenize.tokenize that caused string literals + with 'b' prefixes to be incorrectly tokenized has been fixed. + Patch by Serhiy Storchaka. + +- Issue #15006: Allow equality comparison between naive and aware + time or datetime objects. + +- Issue #14982: Document that pkgutil's iteration functions require the + non-standard iter_modules() method to be defined by an importer (something + the importlib importers do not define). + +- Issue #15036: Mailbox no longer throws an error if a flush is done + between operations when removing or changing multiple items in mbox, + MMDF, or Babyl mailboxes. + +- Issue #14059: Implement multiprocessing.Barrier. + +- Issue #15061: The inappropriately named hmac.secure_compare has been + renamed to hmac.compare_digest, restricted to operating on bytes inputs + only and had its documentation updated to more accurately reflect both its + intent and its limitations + +- Issue #13841: Make child processes exit using sys.exit() on Windows. + +- Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API. + Patch by Robin Schreiber. + +- Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields + in struct tm, time.struct_time objects returned by time.gmtime(), + time.localtime() and time.strptime() functions now have tm_zone and + tm_gmtoff attributes. Original patch by Paul Boddie. + +- Rename adjusted attribute to adjustable in time.get_clock_info() result. + +- Issue #3518: Remove references to non-existent BaseManager.from_address() + method. + +- Issue #13857: Added textwrap.indent() function (initial patch by Ezra + Berch) + +- Issue #2736: Added datetime.timestamp() method. + +- Issue #13854: Make multiprocessing properly handle non-integer + non-string argument to SystemExit. + +- Issue #12157: Make pool.map() empty iterables correctly. Initial + patch by mouad. + +- Issue #11823: disassembly now shows argument counts on calls with keyword args. + +- Issue #14711: os.stat_float_times() has been deprecated. + +- LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a". + +- The bz2 and lzma modules now each contain an open() function, allowing + compressed files to readily be opened in text mode as well as binary mode. + +- BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their + first argument, rather than requiring a separate "fileobj" argument. + +- gzip.open() now accepts file objects as well as filenames. + +- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError + when the path existed and had the S_ISGID mode bit set when it was + not explicitly asked for. This is no longer an exception as mkdir + cannot control if the OS sets that bit for it or not. + +- Issue #14989: Make the CGI enable option to http.server available via command + line. + +- Issue #14987: Add a missing import statement to inspect. + +- Issue #1079: email.header.decode_header now correctly parses all the examples + in RFC2047. There is a necessary visible behavior change: the leading and/or + trailing whitespace on ASCII parts is now preserved. + +- Issue #14969: Better handling of exception chaining in contextlib.ExitStack + +- Issue #14962: Update text coloring in IDLE shell window after changing + options. Patch by Roger Serwy. + +- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative + algorithm (Patch by Alon Horev) + +- Issue #14785: Add sys._debugmallocstats() to help debug low-level memory + allocation issues + +- Issue #14443: Ensure that .py files are byte-compiled with the correct Python + executable within bdist_rpm even on older versions of RPM + +C-API +----- + +- Issue #13783: Inadvertent additions to the public C API in the PEP 380 + implementation have either been removed or marked as private interfaces. Extension Modules -----------------