diff options
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 701 |
1 files changed, 531 insertions, 170 deletions
@@ -2,10 +2,10 @@ Python News +++++++++++ -What's New in Python 3.2.1 release candidate 2? -=============================================== +What's New in Python 3.3 Alpha 1? +================================= -*Release date: XX-XXX-2011* +*Release date: XX-XXX-20XX* Core and Builtins ----------------- @@ -14,59 +14,36 @@ Core and Builtins the following case: sys.stdin.read() stopped with CTRL+d (end of file), raw_input() interrupted by CTRL+c. +- Issue #12216: Allow unexpected EOF errors to happen on any line of the file. + +- Issue #12199: The TryExcept and TryFinally and AST nodes have been unified + into a Try node. + - Issue #9670: Increase the default stack size for secondary threads on Mac OS X and FreeBSD to reduce the chances of a crash instead of a "maximum recursion depth" RuntimeError exception. (patch by Ronald Oussoren) -Library -------- +- Issue #12106: The use of the multiple-with shorthand syntax is now reflected + in the AST. -- Issue #985064: Make plistlib more resilient to faulty input plists. - Patch by Mher Movsisyan. - -- Issue #12175: RawIOBase.readall() now returns None if read() returns None. +- Issue #12190: Try to use the same filename object when compiling unmarshalling + a code objects in the same file. -- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError - if the file is closed. - -- Issue #12070: Fix the Makefile parser of the sysconfig module to handle - correctly references to "bogus variable" (e.g. "prefix=$/opt/python"). - -- Issue #12100: Don't reset incremental encoders of CJK codecs at each call to - their encode() method anymore, but continue to call the reset() method if the - final argument is True. +- Issue #12166: Move implementations of dir() specialized for various types into + the __dir__() methods of those types. - Issue #5715: In socketserver, close the server socket in the child process. - Correct lookup of __dir__ on objects. Among other things, this causes errors besides AttributeError found on lookup to be propagated. -- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore - to be able to unload the module. - -- Issue #12065: connect_ex() on an SSL socket now returns the original errno - when the socket's timeout expires (it used to return None). - -Build ------ - -- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds, - ensure "make install" creates symlinks in --prefix bin for the "-32" - files in the framework bin directory like the installer does. - - -What's New in Python 3.2.1 release candidate 1? -=============================================== - -*Release date: 15-May-2011* - -Core and Builtins ------------------ - - Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module. Patch written by Charles-François Natali. +- Added the if_nameindex, if_indextoname, if_nametoindex methods to + the socket module as requested in issue #1746656. + - Issue #12044: Fixed subprocess.Popen when used as a context manager to wait for the process to end when exiting the context to avoid unintentionally leaving zombie processes around. @@ -74,172 +51,309 @@ Core and Builtins - Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, clear the end-of-file indicator after CTRL+d. -Library -------- - -- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX - with Tk 8.5. - -- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET - is set in shell. - -- Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional. - -- Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and - their incremental counterparts now raise OverflowError if given an input - larger than 4GB, instead of silently truncating the input and returning - an incorrect result. - -- Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail - attribute when called without a max_length argument. - -- Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence - on a file opened in read+write mode (namely: reading, seeking a bit forward, - writing, then seeking before the previous write but still within buffered - data, and writing again). - -- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError. - With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused - IDLE to exit. Converted to valid Unicode null in PythonCmd(). - -- Issue #11169: compileall module uses repr() to format filenames and paths to - escape surrogate characters and show spaces. - -- Issue #10419, #6011: build_scripts command of distutils handles correctly - non-ASCII path (path to the Python executable). Open and write the script in - binary mode, but ensure that the shebang is decodable from UTF-8 and from the - encoding of the script. - -- Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in - order to accept exactly one connection. Patch by Daniel Evers. - -- Issue #11164: Stop trying to use _xmlplus in the xml module. - -Build ------ - -- Issue #11347: Use --no-as-needed when linking libpython3.so. - -Tools/Demos ------------ - -- Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and - add a smarter "py-bt" command printing a classic Python traceback. - -Tests ------ - -- Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch - written by Charles-François Natali. - -- Issue #11614: import __hello__ prints "Hello World!". Patch written by - Andreas Stührk. - -- Issue #5723: Improve json tests to be executed with and without accelerations. - -- Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing. - - -What's New in Python 3.2.1 beta 1? -================================== - -*Release date: 08-May-2011* - -Core and Builtins ------------------ - - Issue #1856: Avoid crashes and lockups when daemon threads run while the - interpreter is shutting down; instead, these threads are now killed when they - try to take the GIL. + interpreter is shutting down; instead, these threads are now killed when + they try to take the GIL. + +- Issue #11849: Make it more likely for the system allocator to release + free()d memory arenas on glibc-based systems. Patch by Charles-François + Natali. - Issue #9756: When calling a method descriptor or a slot wrapper descriptor, the check of the object type doesn't read the __class__ attribute anymore. Fix a crash if a class override its __class__ attribute (e.g. a proxy of the str type). Patch written by Andreas Stührk. +- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_* + APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch + by Charles-François Natali. + - Issue #10914: Initialize correctly the filesystem codec when creating a new subinterpreter to fix a bootstrap issue with codecs implemented in Python, as the ISO-8859-15 codec. -- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_* - APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch by - Charles-François Natali. +- Issue #11918: OS/2 and VMS are no more supported because of the lack of + maintainer. - Issue #6780: fix starts/endswith error message to mention that tuples are accepted too. - Issue #5057: fix a bug in the peepholer that led to non-portable pyc files - between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP chars - (e.g. "\U00012345"[0]). + between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP + chars (e.g. "\U00012345"[0]). - Issue #11845: Fix typo in rangeobject.c that caused a crash in compute_slice_indices. Patch by Daniel Urban. +- Issue #5673: Added a `timeout` keyword argument to subprocess.Popen.wait, + subprocess.Popen.communicated, subprocess.call, subprocess.check_call, and + subprocess.check_output. If the blocking operation takes more than `timeout` + seconds, the `subprocess.TimeoutExpired` exception is raised. + - Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch written by Charles-Francois Natali. +- Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error. + +- Issue #10785: Store the filename as Unicode in the Python parser. + +- Issue #11619: _PyImport_LoadDynamicModule() doesn't encode the path to bytes + on Windows. + +- Issue #10998: Remove mentions of -Q, sys.flags.division_warning and + Py_DivisionWarningFlag left over from Python 2. + +- Issue #11244: Remove an unnecessary peepholer check that was preventing + negative zeros from being constant-folded properly. + - Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes on Windows if the file is a TTY to workaround a Windows bug. The Windows console - returns an error (12: not enough space error) on writing into stdout if stdout - mode is binary and the length is greater than 66,000 bytes (or less, depending - on heap usage). + returns an error (12: not enough space error) on writing into stdout if + stdout mode is binary and the length is greater than 66,000 bytes (or less, + depending on heap usage). -- Issue #11320: fix bogus memory management in Modules/getpath.c, leading to a - possible crash when calling Py_SetPath(). +- Issue #11320: fix bogus memory management in Modules/getpath.c, leading to + a possible crash when calling Py_SetPath(). -- Issue #11510: Fixed optimizer bug which turned "a,b={1,1}" into "a,b=(1,1)". +- _ast.__version__ is now a Mercurial integer and hex revision. - Issue #11432: A bug was introduced in subprocess.Popen on posix systems with 3.2.0 where the stdout or stderr file descriptor being the same as the stdin file descriptor would raise an exception. webbrowser.open would fail. fixed. -- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when there - are many tags (e.g. when using mq). Patch by Nadeem Vawda. +- Issue #9856: Change object.__format__ with a non-empty format string + to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning. + In 3.4 it will be a TypeError. + +- Issue #11244: The peephole optimizer is now able to constant-fold + arbitrarily complex expressions. This also fixes a 3.2 regression where + operations involving negative numbers were not constant-folded. + +- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when + there are many tags (e.g. when using mq). Patch by Nadeem Vawda. + +- Issue #11335: Fixed a memory leak in list.sort when the key function + throws an exception. + +- Issue #8923: When a string is encoded to UTF-8 in strict mode, the result is + cached into the object. Examples: str.encode(), str.encode('utf-8'), + PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8", + NULL). + +- Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats. + +- Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse + the format string in the 3 steps, fix crashs on invalid format strings. - Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode). Patch written by Ray Allen. -- Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with a - buffer struct having a NULL data pointer. +- Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with + a buffer struct having a NULL data pointer. - Issue #11272: On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses universal newline (replace '\r\n' by '\n'). -- issue #11828: startswith and endswith don't accept None as slice index. Patch - by Torsten Becker. +- issue #11828: startswith and endswith don't accept None as slice index. + Patch by Torsten Becker. - Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on narrow build. +- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx(). + It encoded the Unicode filename to UTF-8, but the encoding fails on + undecodable filename (on surrogate characters) which raises an unexpected + UnicodeEncodeError on recursion limit. + +- Issue #11187: Remove bootstrap code (use ASCII) of + PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the + locale encoding) in PyUnicode_EncodeFSDefault(). + - Check for NULL result in PyType_FromSpec. +- Issue #10516: New copy() and clear() methods for lists and bytearrays. + - Issue #11386: bytearray.pop() now throws IndexError when the bytearray is empty, instead of OverflowError. Library ------- -- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch by - Kasun Herath. +- Issue #12028: Make threading._get_ident() public, rename it to + threading.get_ident() and document it. This function was already used using + _thread.get_ident(). + +- Issue #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls + encreset() instead of decreset(). + +- Issue #12218: Removed wsgiref.egg-info. + +- Issue #12196: Add pipe2() to the os module. + +- Issue #985064: Make plistlib more resilient to faulty input plists. + Patch by Mher Movsisyan. + +- Issue #1625: BZ2File and bz2.decompress() now support multi-stream files. + Initial patch by Nir Aides. + +- Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available. + +- Issue #12175: FileIO.readall() now only reads the file position and size + once. + +- Issue #12175: RawIOBase.readall() now returns None if read() returns None. + +- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError + if the file is closed. + +- Issue #11109: New service_action method for BaseServer, used by ForkingMixin + class for cleanup. Initial Patch by Justin Wark. + +- Issue #12045: Avoid duplicate execution of command in + ctypes.util._get_soname(). Patch by Sijin Joseph. + +- Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module, + pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web + server. + +- Issue #1441530: In imaplib, read the data in one chunk to speed up large + reads and simplify code. + +- Issue #12070: Fix the Makefile parser of the sysconfig module to handle + correctly references to "bogus variable" (e.g. "prefix=$/opt/python"). + +- Issue #12100: Don't reset incremental encoders of CJK codecs at each call to + their encode() method anymore, but continue to call the reset() method if the + final argument is True. + +- Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl + module. + +- Issue #12125: fixed the failures under Solaris due to improper test cleanup. + +- Issue #6501: os.device_encoding() returns None on Windows if the application + has no console. + +- Issue #12132: Skip test_build_ext in case the xxmodule is not found. + +- Issue #12105: Add O_CLOEXEC to the os module. + +- Issue #12079: Decimal('Infinity').fma(Decimal('0'), (3.91224318126786e+19+0j)) + now raises TypeError (reflecting the invalid type of the 3rd argument) rather + than Decimal.InvalidOperation. + +- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore + to be able to unload the module. + +- Issue #12065: connect_ex() on an SSL socket now returns the original errno + when the socket's timeout expires (it used to return None). + +- Issue #8809: The SMTP_SSL constructor and SMTP.starttls() now support + passing a ``context`` argument pointing to an ssl.SSLContext instance. + Patch by Kasun Herath. + +- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX + with Tk 8.5. + +- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET + is set in shell. + +- Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and + their incremental counterparts now raise OverflowError if given an input + larger than 4GB, instead of silently truncating the input and returning + an incorrect result. + +- Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail + attribute when called without a max_length argument. + +- Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence + on a file opened in read+write mode (namely: reading, seeking a bit forward, + writing, then seeking before the previous write but still within buffered + data, and writing again). + +- Issue #9971: Write an optimized implementation of BufferedReader.readinto(). + Patch by John O'Connor. + +- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError. + With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused + IDLE to exit. Converted to valid Unicode null in PythonCmd(). + +- Issue #11799: urllib.request Authentication Handlers will raise a ValueError + when presented with an unsupported Authentication Scheme. Patch contributed + by Yuval Greenfield. + +- Issue #10419, #6011: build_scripts command of distutils handles correctly + non-ASCII path (path to the Python executable). Open and write the script in + binary mode, but ensure that the shebang is decodable from UTF-8 and from the + encoding of the script. + +- Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in + order to accept exactly one connection. Patch by Daniel Evers. + +- Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError, + instead of a RuntimeError: OSError has an errno attribute. + +- Issue #3709: a flush_headers method to BaseHTTPRequestHandler which manages + the sending of headers to output stream and flushing the internal headers + buffer. Patch contribution by Andrew Schaaf + +- Issue #11743: Rewrite multiprocessing connection classes in pure Python. + +- Issue #11164: Stop trying to use _xmlplus in the xml module. + +- Issue #11888: Add log2 function to math module. Patch written by Mark + Dickinson. + +- Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional. + +- Issue #8407: The signal handler writes the signal number as a single byte + instead of a nul byte into the wakeup file descriptor. So it is possible to + wait more than one signal and know which signals were raised. + +- Issue #8407: Add pthread_kill(), sigpending() and sigwait() functions to the + signal module. + +- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch + by Kasun Herath. - Issue #12002: ftplib's abort() method raises TypeError. +- Issue #11916: Add a number of MacOSX specific definitions to the errno module. + Patch by Pierre Carrier. + - Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to detect mtime changes by comparing to the system clock instead of to the previous value of the mtime. +- Issue #11072: added MLSD command (RFC-3659) support to ftplib. + +- Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext + parameter to control parameters of the secure channel. Patch by Sijin + Joseph. + - ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same file on Windows XP. As noticed in issue #10684. -- Issue #12000: When a SSL certificate has a subjectAltName without any dNSName - entry, ssl.match_hostname() should use the subject's commonName. Patch by - Nicolas Bareil. +- Issue #12000: When a SSL certificate has a subjectAltName without any + dNSName entry, ssl.match_hostname() should use the subject's commonName. + Patch by Nicolas Bareil. + +- Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and + assertWarnsRegex now accept a keyword argument 'msg' when used as context + managers. Initial patch by Winston Ewert. -- Issue #11647: objects created using contextlib.contextmanager now support more - than one call to the function when used as a decorator. Initial patch by Ysj - Ray. +- Issue #10684: shutil.move used to delete a folder on case insensitive + filesystems when the source and destination name where the same except + for the case. + +- Issue #11647: objects created using contextlib.contextmanager now support + more than one call to the function when used as a decorator. Initial patch + by Ysj Ray. + +- Issue #11930: Removed deprecated time.accept2dyear variable. + Removed year >= 1000 restriction from datetime.strftime. - logging: don't define QueueListener if Python has no thread support. @@ -248,16 +362,39 @@ Library - Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso. +- Issue #8407: Add signal.pthread_sigmask() function to fetch and/or change the + signal mask of the calling thread. + - Issue #11858: configparser.ExtendedInterpolation expected lower-case section names. - Issue #11324: ConfigParser(interpolation=None) now works correctly. +- Issue #11811: ssl.get_server_certificate() is now IPv6-compatible. Patch + by Charles-François Natali. + - Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the strings are too long. - Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal. +- Issue #11856: Speed up parsing of JSON numbers. + +- Issue #11005: threading.RLock()._release_save() raises a RuntimeError if the + lock was not acquired. + +- Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor + of 5 to 10. Initial patch by Jonas H. + +- Issue #11382: Trivial system calls, such as dup() or pipe(), needn't + release the GIL. Patch by Charles-François Natali. + +- Issue #11223: Add threading._info() function providing informations about + the thread implementation. + +- Issue #11731: simplify/enhance email parser/generator API by introducing + policy objects. + - Issue #11768: The signal handler of the signal module only calls Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or parallel calls. PyErr_SetInterrupt() writes also into the wake up file. @@ -277,6 +414,10 @@ Library - Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows. Patch by Santoso Wijaya. +- Issue #11684: complete email.parser bytes API by adding BytesHeaderParser. + +- The bz2 module now handles 4GiB+ input buffers correctly. + - Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when _json is not available. @@ -288,17 +429,33 @@ Library - Issue #10019: Fixed regression in json module where an indent of 0 stopped adding newlines and acted instead like 'None'. +- Issue #11186: pydoc ignores a module if its name contains a surrogate + character in the index of modules. + +- Issue #11815: Use a light-weight SimpleQueue for the result queue in + concurrent.futures.ProcessPoolExecutor. + - Issue #5162: Treat services like frozen executables to allow child spawning from multiprocessing.forking on Windows. +- logging.basicConfig now supports an optional 'handlers' argument taking an + iterable of handlers to be added to the root logger. Additional parameter + checks were also added to basicConfig. + - Issue #11814: Fix likely typo in multiprocessing.Pool._terminate(). - Issue #11747: Fix range formatting in difflib.context_diff() and difflib.unified_diff(). - Issue #8428: Fix a race condition in multiprocessing.Pool when terminating - worker processes: new processes would be spawned while the pool is being shut - down. Patch by Charles-François Natali. + worker processes: new processes would be spawned while the pool is being + shut down. Patch by Charles-François Natali. + +- Issue #2650: re.escape() no longer escapes the '_'. + +- Issue #11757: select.select() now raises ValueError when a negative timeout + is passed (previously, a select.error with EINVAL would be raised). Patch + by Charles-François Natali. - Issue #7311: fix html.parser to accept non-ASCII attribute values. @@ -306,21 +463,50 @@ Library multipart subparts with an 8-bit CTE into unicode instead of preserving the bytes. +- Issue #1690608: email.util.formataddr is now RFC 2047 aware: it now has a + charset parameter that defaults to utf-8 and is used as the charset for RFC + 2047 encoding when the realname contains non-ASCII characters. + - Issue #10963: Ensure that subprocess.communicate() never raises EPIPE. +- Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFile + to be wrapped in a TextIOWrapper. Patch by Nadeem Vawda. + +- Issue #11707: Added a fast C version of functools.cmp_to_key(). + Patch by Filip Gruszczyński. + +- Issue #11688: Add sqlite3.Connection.set_trace_callback(). Patch by + Torsten Landschoff. + - Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve private keys. +- Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept + file-like objects using a new ``fileobj`` constructor argument. Patch by + Nadeem Vawda. + +- unittest.TestCase.assertSameElements has been removed. + - sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not called yet: detect bootstrap (startup) issues earlier. +- Issue #11393: Add the new faulthandler module. + - Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows. +- Removed the 'strict' argument to email.parser.Parser, which has been + deprecated since Python 2.4. + - Issue #11256: Fix inspect.getcallargs on functions that take only keyword arguments. - Issue #11696: Fix ID generation in msilib. +- itertools.accumulate now supports an optional *func* argument for + a user-supplied binary function. + +- Issue #11692: Remove unnecessary demo functions in subprocess module. + - Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when trying to pack a negative (in-range) integer. @@ -336,7 +522,26 @@ Library - Issue #11635: Don't use polling in worker threads and processes launched by concurrent.futures. -- Issue #11628: cmp_to_key generated class should use __slots__ +- Issue #6811: Allow importlib to change a code object's co_filename attribute + to match the path to where the source code currently is, not where the code + object originally came from. + +- Issue #8754: Have importlib use the repr of a module name in error messages. + +- Issue #11591: Prevent "import site" from modifying sys.path when python + was started with -S. + +- collections.namedtuple() now adds a _source attribute to the generated + class. This make the source more accessible than the outdated + "verbose" option which prints to stdout but doesn't make the source + string available. + +- Issue #11371: Mark getopt error messages as localizable. Patch by Filip + Gruszczyński. + +- Issue #11333: Add __slots__ to collections ABCs. + +- Issue #11628: cmp_to_key generated class should use __slots__. - Issue #11666: let help() display named tuple attributes and methods that start with a leading underscore. @@ -347,6 +552,10 @@ Library - Issue #5537: Fix time2isoz() and time2netscape() functions of httplib.cookiejar for expiration year greater than 2038 on 32-bit systems. +- Issue #4391: Use proper gettext plural forms in optparse. + +- Issue #11127: Raise a TypeError when trying to pickle a socket object. + - Issue #11563: Connection:close header is sent by requests using URLOpener class which helps in closing of sockets after connection is over. Patch contributions by Jeff McNeil and Nadeem Vawda. @@ -357,6 +566,8 @@ Library - Issue #5421: Fix misleading error message when one of socket.sendto()'s arguments has the wrong type. Patch by Nikita Vetoshkin. +- Issue #10812: Add some extra posix functions to the os module. + - Issue #10979: unittest stdout buffering now works with class and module setup and teardown. @@ -369,75 +580,154 @@ Library relative to Python2 and the result is now the same as it was in Python2. - Issue #9298: base64 bodies weren't being folded to line lengths less than 78, - which was a regression relative to Python2. Unlike Python2, the last line of - the folded body now ends with a carriage return. + which was a regression relative to Python2. Unlike Python2, the last line + of the folded body now ends with a carriage return. - Issue #11560: shutil.unpack_archive now correctly handles the format parameter. Patch by Evan Dandrea. +- Issue #5870: Add `subprocess.DEVNULL` constant. + - Issue #11133: fix two cases where inspect.getattr_static can trigger code execution. Patch by Andreas Stührk. - Issue #11569: use absolute path to the sysctl command in multiprocessing to - ensure that it will be found regardless of the shell PATH. This ensures that - multiprocessing.cpu_count works on default installs of MacOSX. + ensure that it will be found regardless of the shell PATH. This ensures + that multiprocessing.cpu_count works on default installs of MacOSX. - Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is not installed. Instead, the zipfile.ZIP_STORED compression is used to create the ZipFile. Patch by Natalia B. Bidart. +- Issue #11289: `smtp.SMTP` class becomes a context manager so it can be used + in a `with` statement. Contributed by Giampaolo Rodola. + - Issue #11554: Fixed support for Japanese codecs; previously the body output encoding was not done if euc-jp or shift-jis was specified as the charset. -- Issue #11500: Fixed a bug in the os x proxy bypass code for fully qualified IP - addresses in the proxy exception list. +- Issue #11509: Significantly increase test coverage of fileinput. + Patch by Denver Coneybeare at PyCon 2011 Sprints. + +- Issue #11407: `TestCase.run` returns the result object used or created. + Contributed by Janathan Hartley. + +- Issue #11500: Fixed a bug in the os x proxy bypass code for fully qualified + IP addresses in the proxy exception list. + +- Issue #11491: dbm.error is no longer raised when dbm.open is called with + the "n" as the flag argument and the file exists. The behavior matches + the documentation and general logic. + +- Issue #1162477: Postel Principle adjustment to email date parsing: handle the + fact that some non-compliant MUAs use '.' instead of ':' in time specs. -- Issue #11491: dbm.error is no longer raised when dbm.open is called with the - "n" as the flag argument and the file exists. The behavior matches the - documentation and general logic. +- Issue #11131: Fix sign of zero in decimal.Decimal plus and minus + operations when the rounding mode is ROUND_FLOOR. -- Issue #11131: Fix sign of zero in decimal.Decimal plus and minus operations - when the rounding mode is ROUND_FLOOR. +- Issue #9935: Speed up pickling of instances of user-defined classes. - Issue #5622: Fix curses.wrapper to raise correct exception if curses initialization fails. +- Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when + really necessary. Patch by Charles-François Natali. + - Issue #11391: Writing to a mmap object created with ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a TypeError. Patch by Charles-François Natali. -- Issue #11306: mailbox in certain cases adapts to an inability to open certain - files in read-write mode. Previously it detected this by checking for EACCES, - now it also checks for EROFS. +- Issue #9795: add context manager protocol support for nntplib.NNTP class. + +- Issue #11306: mailbox in certain cases adapts to an inability to open + certain files in read-write mode. Previously it detected this by + checking for EACCES, now it also checks for EROFS. + +- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors + on accept(), send() and recv(). + +- Issue #11377: Deprecate platform.popen() and reimplement it with os.popen(). + +- Issue #8513: On UNIX, subprocess supports bytes command string. -- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors on - accept(), send() and recv(). +- Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall. + +- Issue #11140: Lock.release() now raises a RuntimeError when attempting + to release an unacquired lock, as claimed in the threading documentation. + The _thread.error exception is now an alias of RuntimeError. Patch by + Filip Gruszczyński. Patch for _dummy_thread by Aymeric Augustin. + +- Issue #8594: ftplib now provides a source_address parameter to specify which + (address, port) to bind to before connecting. - Issue #11326: Add the missing connect_ex() implementation for SSL sockets, and make it work for non-blocking connects. +- Issue #11297: Add collections.ChainMap(). + +- Issue #10755: Add the posix.fdlistdir() function. Patch by Ross Lagerwall. + +- Issue #4761: Add the *at() family of functions (openat(), etc.) to the posix + module. Patch by Ross Lagerwall. + - Issue #7322: Trying to read from a socket's file-like object after a timeout occurred now raises an error instead of silently losing data. +- Issue #11291: poplib.POP no longer suppresses errors on quit(). + +- Issue #11177: asyncore's create_socket() arguments can now be omitted. + +- Issue #6064: Add a ``daemon`` keyword argument to the threading.Thread + and multiprocessing.Process constructors in order to override the + default behaviour of inheriting the daemonic property from the current + thread/process. + - Issue #10956: Buffered I/O classes retry reading or writing after a signal has arrived and the handler returned successfully. +- Issue #10784: New os.getpriority() and os.setpriority() functions. + +- Issue #11114: Fix catastrophic performance of tell() on text files (up + to 1000x faster in some cases). It is still one to two order of magnitudes + slower than binary tell(). + +- Issue #10882: Add os.sendfile function. + +- Issue #10868: Allow usage of the register method of an ABC as a class + decorator. + - Issue #11224: Fixed a regression in tarfile that affected the file-like objects returned by TarFile.extractfile() regarding performance, memory consumption and failures with the stream interface. +- Issue #10924: Adding salt and Modular Crypt Format to crypt library. + Moved old C wrapper to _crypt, and added a Python wrapper with + enhanced salt generation and simpler API for password generation. + - Issue #11074: Make 'tokenize' so it can be reloaded. +- Issue #11085: Moved collections abstract base classes into a separate + module called collections.abc, following the pattern used by importlib.abc. + For backwards compatibility, the names are imported into the collections + module. + - Issue #4681: Allow mmap() to work on file sizes and offsets larger than 4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for 32-bit Windows. +- Issue #11169: compileall module uses repr() to format filenames and paths to + escape surrogate characters and show spaces. + - Issue #11089: Fix performance issue limiting the use of ConfigParser() with large config files. - Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers larger than 4GB. Patch by Nadeem Vawda. +- Issue #11388: Added a clear() method to MutableSequence + +- Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type names + for the names of optional and positional arguments in help messages. + - Issue #9348: Raise an early error if argparse nargs and metavar don't match. - Issue #8982: Improve the documentation for the argparse Namespace object. @@ -452,20 +742,32 @@ Library Build ----- +- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds, + ensure "make install" creates symlinks in --prefix bin for the "-32" + files in the framework bin directory like the installer does. + +- Issue #11347: Use --no-as-needed when linking libpython3.so. + - Issue #11411: Fix 'make DESTDIR=' with a relative destination. -- Issue #11268: Prevent Mac OS X Installer failure if Documentation package had - previously been installed. +- Issue #11268: Prevent Mac OS X Installer failure if Documentation + package had previously been installed. + +- Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2. + IDLE ---- -- Issue #11718: IDLE's open module dialog couldn't find the __init__.py file in - a package. +- Issue #11718: IDLE's open module dialog couldn't find the __init__.py + file in a package. Tools/Demos ----------- +- Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and + add a smarter "py-bt" command printing a classic Python traceback. + - Issue #11179: Make ccbench work under Python 3.1 and 2.7 again. Extension Modules @@ -483,23 +785,66 @@ Extension Modules Tests ----- +- Issue #12180: Fixed a few remaining errors in test_packaging when no + threading. + +- Issue #12120, #12119: skip a test in packaging and distutils + if sys.dont_write_bytecode is set to True. + +- Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch + written by Charles-François Natali. + +- Issue #11614: import __hello__ prints "Hello World!". Patch written by + Andreas Stührk. + +- Issue #5723: Improve json tests to be executed with and without accelerations. + +- Issue #12041: Make test_wait3 more robust. + - Issue #11873: Change regex in test_compileall to fix occasional failures when when the randomly generated temporary path happened to match the regex. +- Issue #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost". + Patch written by Charles-Francois Natali. + +- Issue #8407, #11859: Fix tests of test_io using threads and an alarm: use + pthread_sigmask() to ensure that the SIGALRM signal is received by the main + thread. + +- Issue #11811: Factor out detection of IPv6 support on the current host + and make it available as ``test.support.IPV6_ENABLED``. Patch by + Charles-François Natali. + - Issue #10914: Add a minimal embedding test to test_capi. -- Issue #11790: Fix sporadic failures in - test_multiprocessing.WithProcessesTestCondition. +- Issue #11223: Skip test_lock_acquire_interruption() and + test_rlock_acquire_interruption() of test_threadsignals if a thread lock is + implemented using a POSIX mutex and a POSIX condition variable. A POSIX + condition variable cannot be interrupted by a signal (e.g. on Linux, the + futex system call is restarted). + +- Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. - Fix possible "file already exists" error when running the tests in parallel. - Issue #11719: Fix message about unexpected test_msilib skip on non-Windows platforms. Patch by Nadeem Vawda. +- Issue #11727: Add a --timeout option to regrtest: if a test takes more than + TIMEOUT seconds, dumps the traceback of all threads and exits. + - Issue #11653: fix -W with -j in regrtest. +- The email test suite now lives in the Lib/test/test_email package. The test + harness code has also been modernized to allow use of new unittest features. + +- regrtest now discovers test packages as well as test modules. + - Issue #11577: improve test coverage of binhex.py. Patch by Arkady Koplyarov. +- New test_crashers added to exercise the scripts in the Lib/test/crashers + directory and confirm they fail as expected + - Issue #11578: added test for the timeit module. Patch by Michael Henry. - Issue #11503: improve test coverage of posixpath.py. Patch by Evan Dandrea. @@ -512,6 +857,9 @@ Tests - Issue #11554: Reactivated test_email_codecs. +- Issue #11505: improves test coverage of string.py. Patch by Alicia + Arlen + - Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a false positive if the last directory in the path is inaccessible. @@ -524,9 +872,24 @@ Tests - Issue #9931: Fix hangs in GUI tests under Windows in certain conditions. Patch by Hirokazu Yamamoto. +- Issue #10512: Properly close sockets under test.test_cgi. + +- Issue #10992: Make tests pass under coverage. + - Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due to open door files. +- Issue #10990: Prevent tests from clobbering a set trace function. + +C-API +----- + +- PY_PATCHLEVEL_REVISION has been removed, since it's meaningless with + Mercurial. + +- Issue #12173: The first argument of PyImport_ImportModuleLevel is now `const + char *` instead of `char *`. + Documentation ------------- @@ -761,10 +1124,6 @@ Library - Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD. -- Issue #10684: shutil.move used to delete a folder on case insensitive - filesystems when the source and destination name where the same except - for the case. - - Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather than the currently problematic Apple-supplied one, when running with the 64-/32-bit installer variant. @@ -972,6 +1331,8 @@ Tools/Demos Tests ----- +- Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing. + - Fix test_startfile to wait for child process to terminate before finishing. - Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch |