+ All Categories
Home > Documents > pynewNews

pynewNews

Date post: 04-Jun-2018
Category:
Upload: ekmoekmo
View: 219 times
Download: 0 times
Share this document with a friend

of 104

Transcript
  • 8/13/2019 pynewNews

    1/104

    +++++++++++Python News+++++++++++

    (editors: check NEWS.help for information about editing NEWS using ReST.)

    What's New in Python 2.7?=========================

    *Release date: 2010-07-03*

    Core and Builtins-----------------

    - Prevent assignment to set literals.

    Library-------

    - Issue #9125: Add recognition of 'except ... as ...' syntax to parser module.

    Extension Modules-----------------

    - Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module, ensure that the input string length is a multiple of the frame size.

    - Issue #9075: In the ssl module, remove the setting of a ``debug`` flag on an OpenSSL structure.

    What's New in Python 2.7 release candidate 2?=============================================

    *Release date: 2010-06-20*

    Core and Builtins

    ------------------ Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.

    - Issue #8202: Previous change to ``sys.argv[0]`` handling for -m command line option reverted due to unintended side effects on handling of ``sys.path``. See tracker issue for details.

    - Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash the interpreter with characters outside the Basic Multilingual Plane (higher than 0x10000).

    - In the unicode/str.format(), raise a ValueError when indexes to arguments are

    too large.

    Build-----

    - Issue #8854: Fix finding Visual Studio 2008 on Windows x64.

    Library-------

  • 8/13/2019 pynewNews

    2/104

    - Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor raises an exception.

    - Issue #8959: fix regression caused by using unmodified libffi library on Windows. ctypes does now again check the stack before and after calling foreign functions.

    - Issue #8720: fix regression caused by fix for #4050 by making getsourcefile smart enough to find source files in the linecache.

    - Issue #8986: math.erfc was incorrectly raising OverflowError for values between -27.3 and -30.0 on some platforms.

    - Issue #8924: logging: Improved error handling for Unicode in exception text.

    - Issue #8948: cleanup functions and class / module setups and teardowns are now honored in unittest debug methods.

    Documentation-------------

    - Issues #8909: Added the size of the bitmap used in the installer created by distutils' bdist_wininst. Patch by Anatoly Techtonik.

    Misc----

    - Issue #8362: Add maintainers.rst: list of module maintainers

    What's New in Python 2.7 Release Candidate 1?=============================================

    *Release date: 2010-06-05*

    Core and Builtins-----------------

    - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the start byte and the continuation byte(s) are now considered invalid, instead of the number of bytes specified by the start byte. E.g.: '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and replaces with U+FFFD only the start byte ('\xf1') and the continuation byte ('\x80') even if '\xf1' is the start byte of a 4-bytes sequence. Previous versions returned a single u'\ufffd'.

    - Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of __hash__ in 3.x" warning. Also fix "XXX undetected error" that arises from the "Overriding __eq__ blocks inheritance ..." warning when turned into an exception: in this case the exception simply

    gets ignored.

    - Issue #8748: Fix two issues with comparisons between complex and integer objects. (1) The comparison could incorrectly return True in some cases (2**53+1 == complex(2**53) == 2**53), breaking transivity of equality. (2) The comparison raised an OverflowError for large integers, leading to unpredictable exceptions when combining integers and complex objects in sets or dicts.

    - Issue #5211: Implicit coercion for the complex type is now completely

  • 8/13/2019 pynewNews

    3/104

    removed. (Coercion for arithmetic operations was already removed in 2.7 alpha 4, but coercion for rich comparisons was accidentally left in.)

    - Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and error handler, instead of writing to the C stderr file in utf-8

    - Issue #7902: When using explicit relative import syntax, don't try implicit relative import semantics.

    - Issue #7079: Fix a possible crash when closing a file object while using it from another thread. Patch by Daniel Stutzbach.

    - Issue #8868: Fix that ensures that python scripts have access to the Window Server again in a framework build on MacOSX 10.5 or earlier.

    C-API-----

    - Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders of the interpreter to set sys.argv without also modifying sys.path. This helps fix `CVE-2008-5983 `_.

    Library

    -------- Issue #8302: SkipTest in unittest.TestCase.setUpClass or setUpModule is now reported as a skip rather than an error.

    - Issue #8351: Excessively large diffs due to unittest.TestCase.assertSequenceEqual are no longer included in failure reports.

    - Issue #8899: time.struct_time now has class and atribute docstrings.

    - Issue #4487: email now accepts as charset aliases all codec aliases accepted by the codecs module.

    - Issue #6470: Drop UNC prefix in FixTk.

    - Issue #5610: feedparser no longer eats extra characters at the end of a body part if the body part ends with a \r\n.

    - Issue #8833: tarfile created hard link entries with a size field != 0 by mistake.

    - Issue #1368247: set_charset (and therefore MIMEText) now automatically encodes a unicode _payload to the output_charset.

    - Issue #7150: Raise OverflowError if the result of adding or subtracting

    timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.

    - Issue #6662: Fix parsing of malformatted charref (bad;), patch written by Fredrik Hrd

    - Issue #8016: Add the CP858 codec.

    - Issue #3924: Ignore cookies with invalid "version" field in cookielib.

    - Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM

  • 8/13/2019 pynewNews

    4/104

    twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes.

    - Issue #5640: Fix Shift-JIS incremental encoder for error handlers different than 'strict'.

    - Issue #8782: Add a trailing newline in linecache.updatecache to the last line of files without one.

    - Issue #8729: Return NotImplemented from ``collections.Mapping.__eq__()`` when comparing to a non-mapping.

    - Issue #8759: Fix user paths in sysconfig for posix and os2 schemes.

    - Issue #1285086: Speed up ``urllib.quote()`` and urllib.unquote for simple cases.

    - Issue #8688: Distutils now recalculates MANIFEST everytime.

    - Issue #5099: The ``__del__()`` method of ``subprocess.Popen`` (and the methods it calls) referenced global objects, causing errors to pop up during interpreter shutdown.

    Extension Modules

    ------------------ Issue #7384: If the system readline library is linked against ncurses, the curses module must be linked against ncurses as well. Otherwise it is not safe to load both the readline and curses modules in an application.

    - Issue #2810: Fix cases where the Windows registry API returns ERROR_MORE_DATA, requiring a re-try in order to get the complete result.

    - Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing overflow checks in the ``audioop`` module.

    Tests

    ------ Issue #8889: test_support.transient_internet rewritten so that the new checks also work on FreeBSD, which lacks EAI_NODATA.

    - Issue #8835: test_support.transient_internet() catches gaierror(EAI_NONAME) and gaierror(EAI_NODATA)

    - Issue #7449: Skip test_socketserver if threading support is disabled

    - On darwin, ``test_site`` assumed that a framework build was being used, leading to a failure where four directories were expected for site-packages instead of two in a non-framework build.

    Build-----

    - Display installer warning that Windows 2000 won't be supported in future releases.

    - Issues #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for multiprocessing only.

  • 8/13/2019 pynewNews

    5/104

    Tools/Demos-----------

    - Issue #5464: Implement plural forms in msgfmt.py.

    What's New in Python 2.7 beta 2?================================

    *Release date: 2010-05-08*

    Core and Builtins-----------------

    - Run Clang 2.7's static analyzer for ``Objects/`` and ``Python/``.

    - Issue #1533: Fix inconsistency in range function argument processing: any non-float non-integer argument is now converted to an integer (if possible) using its __int__ method. Previously, only small arguments were treated this way; larger arguments (those whose __int__ was outside the range of a C long) would produce a TypeError.

    - Issue #8202: ``sys.argv[0]`` is now set to '-m' instead of '-c' when searching for the module file to be executed with the -m command line option.

    - Issue #7319: When -Q is used, do not silence DeprecationWarning.

    - Issue #7332: Remove the 16KB stack-based buffer in ``PyMarshal_ReadLastObjectFromFile``, which doesn't bring any noticeable benefit compared to the dynamic memory allocation fallback. Patch by Charles-Franois Natali.

    - Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is passed to bytearray.

    - Issue #7072: ``isspace(0xa0)`` is true on Mac OS X.

    - Issue #8404: Fix set operations on dictionary views.- Issue #8084: PEP 370 now conforms to system conventions for framework builds on MacOS X. That is, ``python setup.py install --user`` will install into ``~/Library/Python/2.7`` instead of ``~/.local``.

    Library-------

    - Issue #8681: Make the zlib module's error messages more informative when the zlib itself doesn't give any detailed explanation.

    - Issue #8571: Fix an internal error when compressing or decompressing a chunk

    larger than 1GB with the zlib module's compressor and decompressor objects.

    - Issue #8573: asyncore ``_strerror()`` function might throw ValueError.

    - Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error messages when accessing undefined class attributes because of the cheap inheritance with the underlying socket object. The cheap inheritance has been deprecated.

    - Issue #4265: ``shutil.copyfile()`` was leaking file descriptors when disk

  • 8/13/2019 pynewNews

    6/104

    fills. Patch by Tres Seaver.

    - Issue #7755: Use an unencumbered audio file for tests.

    - Issue #8621: ``uuid.uuid4()`` returned the same sequence of values in the parent and any children created using ``os.fork`` on Mac OS X 10.6.

    - Issue #8313: ``traceback.format_exception_only()`` encodes unicode message to ASCII with backslashreplace error handler if ``str(value)`` failed.

    - Issue #8567: Fix precedence of signals in Decimal module: when a Decimal operation raises multiple signals and more than one of those signals is trapped, the specification determines the order in which the signals should be handled. In many cases this order wasn't being followed, leading to the wrong Python exception being raised.

    - Issue #7865: The close() method of :mod:`io` objects should not swallow exceptions raised by the implicit flush(). Also ensure that calling close() several times is supported. Patch by Pascal Chambon.

    - Issue #8576: logging updated to remove usage of find_unused_port().

    - Issue #4687: Fix accuracy of garbage collection runtimes displayed with gc.DEBUG_STATS.

    - Issue #8354: The siginterrupt setting is now preserved for all signals, not just SIGCHLD.

    - Issue #7192: ``webbrowser.get("firefox")`` now works on Mac OS X, as does ``webbrowser.get("safari")``.

    - Issue #8577: ``distutils.sysconfig.get_python_inc()`` now makes a difference between the build dir and the source dir when looking for "python.h" or "Include".

    - Issue #8464: tarfile no longer creates files with execute permissions set when mode="w|" is used.

    - Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of the Linux kernel. Patch by Yaniv Aknin.

    - Issue #6312: Fix http HEAD request when the transfer encoding is chunked. It should correctly return an empty response now.

    - Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test suites, the ``IGNORE_EXCEPTION_DETAIL`` directive now also ignores the module location of the raised exception. Based on initial patch by Lennart Regebro.

    - Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline before the certificate footer. Patch by Kyle VanderBeek.

    - Issue #8546: Reject None given as the buffering argument to ``_pyio.open()``.

    - Issue #8549: Fix compiling the _ssl extension under AIX. Patch by Sridhar Ratnakumar.

    - Issue #6656: Fix locale.format_string to handle escaped percents and mappings.

    - Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where the method could block indefinitely if called just before the event loop

  • 8/13/2019 pynewNews

    7/104

    started running. This also fixes the occasional freezes witnessed in test_httpservers.

    - Issue #5103: SSL handshake would ignore the socket timeout and block indefinitely if the other end didn't respond.

    - The do_handshake() method of SSL objects now adjusts the blocking mode of the SSL structure if necessary (as other methods already do).

    - Issue #7507: Quote "!" in pipes.quote(); it is special to some shells.

    - Issue #5238: Calling makefile() on an SSL object would prevent the underlying socket from being closed until all objects get truely destroyed.

    - Issue #7943: Fix circular reference created when instantiating an SSL socket. Initial patch by Pter Szab.

    - Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the string "python" as the *ident*. openlog() arguments are all optional and keywords.

    - Issue #8108: Fix the unwrap() method of SSL objects when the socket has a non-infinite timeout. Also make that method friendlier with applications wanting to continue using the socket in clear-text mode, by disabling

    OpenSSL's internal readahead. Thanks to Darryl Miles for guidance.- Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl extension, such that verification of some SSL certificates doesn't fail because of an "unknown algorithm".

    - Issue #8437: Fix test_gdb failures, patch written by Dave Malcolm

    - Issue #4814: The timeout parameter is now applied also for connections resulting from PORT/EPRT commands.

    - Issue #8463: Add missing reference to bztar in shutil's documentation.

    - Issue #8438: Remove reference to the missing "surrogateescape" encoding error handler from the new IO library.

    - Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code as stated in RFC-959 at chapter 5.4.

    - Issue #8279: Fix test_gdb failures.

    - Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the available cipher list. Helps fix test_ssl with OpenSSL 1.0.0.

    - Issue #2987: RFC 2732 support for urlparse (IPv6 addresses). Patch by Tony Locke and Hans Ulrich Niedermann.

    - Issue #7585: difflib context and unified diffs now place a tab between filename and date, conforming to the 'standards' they were originally designed to follow. This improves compatibility with patch tools.

    - Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022 character sets will now consistently use a Content-Transfer-Encoding of 7bit rather than sometimes being marked as 8bit.

    - Issue #8330: Fix expected output in test_gdb.

  • 8/13/2019 pynewNews

    8/104

    - Issue #8374: Update the internal alias table in the :mod:`locale` module to cover recent locale changes and additions.

    Extension Modules-----------------

    - Issue #8644: Improved accuracy of ``timedelta.total_seconds()``.

    - Use Clang 2.7's static analyzer to find places to clean up some code.

    - Build the ossaudio extension on GNU/kFreeBSD.

    - On Windows, ctypes does no longer check the stack before and after calling a foreign function. This allows to use the unmodified libffi library.

    Tests-----

    - Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled by a decompressor object without errors (it returns incomplete uncompressed data).

    - Issue #8490: asyncore now has a more solid test suite which actually tests its

    API.- Issue #8576: Remove use of find_unused_port() in test_smtplib and test_multiprocessing. Patch by Paul Moore.

    - Issue #7449: Fix many tests to support Python compiled without thread support. Patches written by Jerry Seutter.

    - Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of SSL shutdowns.

    Build-----

    - Issue #8625: Turn off optimization in ``--with-pydebug`` builds with gcc. (Optimization was unintentionally turned on in gcc --with-pydebug builds in 2.7 beta1 as a result of the issue #1628484 fix, combined with autoconf's strange choice of default CFLAGS produced by AC_PROG_CC for gcc.)

    - Issue #8509: Fix quoting in help strings and code snippets in configure.in.

    - Issue #3646: It is now easily possible to install a Python framework into your home directory on Mac OS X, see Mac/README for more information.

    - Issue #8510: Update to autoconf 2.65.

    Misc----

    - Update the Vim syntax highlight file.

    What's New in Python 2.7 beta 1?================================

    *Release date: 2010-04-10*

  • 8/13/2019 pynewNews

    9/104

    Core and Builtins-----------------

    - Issue #7301: Add environment variable $PYTHONWARNINGS.

    - Issue #8329: Don't return the same lists from select.select when no fds are changed.

    - Issue #8259: ``1L

  • 8/13/2019 pynewNews

    10/104

    >>> Decimal(1.1) Decimal('1.100000000000000088817841970012523233890533447265625')

    - collections.Counter() now supports a subtract() method.

    - The functools module now has a total_ordering() class decorator to simplify the specification of rich comparisons.

    - The functools module also adds cmp_to_key() as a tool to transition old-style comparison functions to new-style key-functions.

    - Issue #8294: The Fraction constructor now accepts Decimal and float instances directly.

    - Issue #7279: Comparisons involving a Decimal signaling NaN now signal InvalidOperation instead of returning False. (Comparisons involving a quiet NaN are unchanged.) Also, Decimal quiet NaNs are now hashable; Decimal signaling NaNs remain unhashable.

    - Issue #2531: Comparison operations between floats and Decimal instances now return a result based on the numeric values of the operands; previously they returned an arbitrary result based on the relative ordering of id(float) and id(Decimal).

    - Issue #8233: When run as a script, py_compile.py optionally takes a single argument `-` which tells it to read files to compile from stdin. Each line is read on demand and the named file is compiled immediately. (Original patch by Piotr Oarowski).

    - Issue #3135: Add ``inspect.getcallargs()``, which binds arguments to a function like a normal call.

    - Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and form feed (0x0C) are now considered linebreaks, as specified in Unicode Standard Annex #14. See issue #7643. http://www.unicode.org/reports/tr14/

    - Comparisons using one of = between a complex instance and a

    Fractions instance now raise TypeError instead of returning True/False. This makes Fraction complex comparisons consistent with int complex, float complex, and complex complex comparisons.

    - Addition of ``WeakSet`` to the ``weakref`` module.

    - logging: Added LOG_FTP to SysLogHandler and updated documentation.

    - Issue #8205: Remove the "Modules" directory from sys.path when Python is running from the build directory (POSIX only).

    - Issue #7667: Fix doctest failures with non-ASCII paths.

    - Issue #7512: shutil.copystat() could raise an OSError when the filesystem didn't support chflags() (for example ZFS under FreeBSD). The error is now silenced.

    - Issue #7703: ctypes supports both buffer() and memoryview(). The former is deprecated.

    - Issue #7860: platform.uname now reports the correct 'machine' type when Python is running in WOW64 mode on 64 bit Windows.

  • 8/13/2019 pynewNews

    11/104

    - logging: Added getChild utility method to Logger and added isEnabledFor method to LoggerAdapter.

    - Issue #8201: logging: Handle situation of non-ASCII and Unicode logger names existing at the same time, causing a Unicode error when configuration code attempted to sort the existing loggers.

    - Issue #8200: logging: Handle errors when multiprocessing is not fully loaded when logging occurs.

    - Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets. Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking reads and writes are always retried by OpenSSL itself.

    - Issue #8179: Fix macpath.realpath() on a non-existing path.

    - Issue #8024: Update the Unicode database to 5.2.

    - Issue #8104: socket.recv_into() and socket.recvfrom_into() now support writing into objects supporting the new buffer API, for example bytearrays or memoryviews.

    - Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox with Tcl/Tk-8.5.

    - Issue #8140: Extend compileall to compile single files. Add -i option.

    - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the locale.

    - Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been set to an non existent program name and Python is unable to retrieve the real program name.

    - Issue #8117: logging: Improved algorithm for computing initial rollover time for ``TimedRotatingFileHandler`` by using the modification time of an existing log file to compute the next rollover time. If the log file does not exist,

    the current time is used as the basis for the computation.- Issue #6472: The ``xml.etree`` package is updated to ElementTree 1.3. The cElementTree module is updated too.

    - Issue #7880: Fix sysconfig when the python executable is a symbolic link.

    - Issue #7624: Fix ``isinstance(foo(), collections.Callable)`` for old-style classes.

    - Issue #7143: email: ``get_payload()`` used to strip any trailing newline from a base64 transfer-encoded payload *after* decoding it; it no longer does. This is a behavior change, so email's minor version number is now bumped, to

    version 4.0.2, for the 2.7 release.

    - Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is a socket option available on FreeBSD 7.1 and newer.

    - Issue #8038: unittest.TestCase.assertNotRegexpMatches

    - Addition of -b command line option to unittest for buffering stdout / stderr during test runs.

  • 8/13/2019 pynewNews

    12/104

    - Issue #1220212: Added os.kill support for Windows, including support for sending CTRL+C and CTRL+BREAK events to console subprocesses.

    Extension Modules-----------------

    - Issue #8314: Fix unsigned long long bug in libffi on Sparc v8.

    - Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.

    - Issue #8156: bsddb module updated to version 4.8.4. http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.8.4. This update drops support for Berkeley DB 4.0, and adds support for 4.8.

    - Issue #3928: os.mknod() now available in Solaris, also.

    - Issue #8142: Update libffi to the 3.0.9 release.

    - Issue #8300: When passing a non-integer argument to struct.pack with any integer format code, struct.pack first attempts to convert the non-integer using its __index__ method. If that method is non-existent or raises TypeError it goes on to try the __int__ method, as described below.

    - Issue #1530559: When passing a non-integer argument to struct.pack with *any*

    integer format code (one of 'bBhHiIlLqQ'), struct.pack attempts to use the argument's __int__ method to convert to an integer before packing. It also produces a DeprecationWarning in this case. (In Python 2.6, the behaviour was inconsistent: __int__ was used for some integer codes but not for others, and the set of integer codes for which it was used differed between native packing and standard packing.)

    - Issue #7347: _winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in the return value of QueryReflectionKey.

    Tools/Demos-----------

    - Issue #7993: Add a test of IO packet processing bandwidth to ccbench. It measures the number of UDP packets processed per second depending on the number of background CPU-bound Python threads.

    - python-config now supports multiple options on the same command line.

    Build-----

    - Issue #8032: For gdb7, a python-gdb.py file is added to the build, allowing to use advanced gdb features when debugging Python.

    - Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable

    anymore. It also forwards the LDFLAGS settings to the linker when building a shared library.

    - Issue #6716: Quote -x arguments of compileall in MSI installer.

    - Issue #7705: Fix linking on FreeBSD.

    - Make sure that the FreeBSD build of the included libffi uses the proper assembly file.

  • 8/13/2019 pynewNews

    13/104

    C-API-----

    - Issue #8276: PyEval_CallObject() is now only available in macro form. The function declaration, which was kept for backwards compatibility reasons, is now removed (the macro was introduced in 1997!).

    - Issue #7992: A replacement PyCObject API, PyCapsule, has been backported from Python 3.1. All existing Python CObjects in the main distribution have been converted to capsules. To address backwards-compatibility concerns, PyCObject_AsVoidPtr() was changed to understand capsules.

    Tests-----

    - Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any thread was previously started, most likely due to a platform bug.

    - Issue #8348: Fix test ftp url in test_urllib2net.

    - Issue #8204: Fix test_ttk notebook test by forcing focus.

    - Issue #8344: Fix test_ttk bug on FreeBSD.

    - Issue #8193: Fix test_zlib failure with zlib 1.2.4.- Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi.

    - Issue #8263: Now regrtest.py will report a failure if it receives a KeyboardInterrupt (SIGINT).

    - Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special Unicode normalization cases.

    - Issue #7783: test.test_support.open_urlresource invalidates the outdated files from the local cache.

    What's New in Python 2.7 alpha 4?=================================

    *Release date: 2010-03-06*

    Core and Builtins-----------------

    - Issue #7544: Preallocate thread memory before creating the thread to avoid a fatal error in low memory condition.

    - Issue #7820: The parser tokenizer restores all bytes in the right if the BOM

    check fails.

    - Issue #7309: Fix unchecked attribute access when converting UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.

    - Issue #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a UnicodeDecodeError if 'char' is a byte string that can't be decoded using the default encoding.

    - Issue #6902: Fix problem with built-in types format incorrectly with 0

  • 8/13/2019 pynewNews

    14/104

    padding.

    - Issue #2560: Remove an unnecessary 'for' loop from ``my_fgets()`` in Parser/myreadline.c.

    - Issue #7988: Fix default alignment to be right aligned for ``complex.__format__``. Now it matches other numeric types.

    - Issue #5211: The complex type no longer uses implicit coercion in mixed-type binary arithmetic operations.

    Library-------

    - Issue #6906: Tk should not set Unicode environment variables on Windows.

    - Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public Review Issue #29 (http://unicode.org/review/pr-29.html).

    - Issue #7494: Fix a crash in ``_lsprof`` (cProfile) after clearing the profiler, reset also the pointer to the current pointer context.

    - Issue #7232: Add support for the context manager protocol to the

    ``tarfile.TarFile`` class.- Issue #7250: Fix info leak of os.environ across multi-run uses of ``wsgiref.handlers.CGIHandler``.

    - Issue #1729305: Fix doctest to handle encode error with "backslashreplace".

    - Issue #691291: ``codecs.open()`` should not convert end of lines on reading and writing.

    - Issue #7975: Correct regression in dict methods supported by bsddb.dbshelve.

    - Issue #7959: ctypes callback functions are now registered correctly with the

    cycle garbage collector.- Issue #7970: ``email.Generator.flatten`` now correctly flattens message/rfc822 messages parsed by ``email.Parser.HeaderParser``.

    - Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode.

    - Issue #7633: In the decimal module, ``Context`` class methods (with the exception of canonical and is_canonical) now accept instances of int and long wherever a Decimal instance is accepted, and implicitly convert that argument to Decimal. Previously only some arguments were converted.

    - Issue #6003: Add an argument to ``zipfile.Zipfile.writestr`` to specify the

    compression type.

    - Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass`` argument added to the TextTestRunner constructor allowing a different result class to be used without having to subclass.

    - Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test name in failure reports even if the test has a docstring.

    - Issue #5801: Remove spurious empty lines in wsgiref.

  • 8/13/2019 pynewNews

    15/104

    - Issue #1537721: Add a ``writeheader()`` method to ``csv.DictWriter``.

    - Issue #7427: Improve the representation of httplib.BadStatusLine exceptions.

    - Issue #7481: When a ``threading.Thread`` failed to start it would leave the instance stuck in initial state and present in ``threading.enumerate()``.

    - Issue #1068268: The subprocess module now handles EINTR in internal ``os.waitpid()`` and ``os.read()`` system calls where appropriate.

    - Issue #6729: Add ``ctypes.c_ssize_t`` to represent ssize_t.

    - Issue #6247: The argparse module has been added to the standard library.

    Extension Modules-----------------

    - The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure bugs and allows loading SQLite extensions from shared libraries.

    - Issue #7808: Fix reference leaks in _bsddb and related tests.

    - Issue #6544: Fix a reference leak in the kqueue implementation's error

    handling.- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as msvcr100.dll is not a platform assembly anymore.

    - Issue #7242: On Solaris 9 and earlier calling ``os.fork()`` from within a thread could raise an incorrect RuntimeError about not holding the import lock. The import lock is now reinitialized after fork.

    - Issue #7999: ``os.setreuid()`` and ``os.setregid()`` would refuse to accept a -1 parameter on some platforms such as OS X.

    Tests

    ------ Issue #7849: The utility ``test.test_support.check_warnings()`` verifies if warnings are effectively raised. A new utility ``check_py3k_warnings()`` is available.

    - The four path modules (genericpath, macpath, ntpath, posixpath) share a common TestCase for some tests: test_genericpath.CommonTest.

    - Print platform information when running the whole test suite, or using the ``--verbose`` flag.

    - Issue #767675: Enable test_pep277 on POSIX platforms with Unicode-friendly

    filesystem encoding.

    - Issue #6292: For the moment at least, the test suite runs cleanly if python is run with the -OO flag. Tests requiring docstrings are skipped.

    - Issue #7712: test_support gained a new ``temp_cwd`` context manager which is now also used by regrtest to run all the tests in a temporary directory. The original CWD is saved in ``test.test_support.SAVEDCWD``. Thanks to Florent Xicluna who helped with the patch.

  • 8/13/2019 pynewNews

    16/104

    Build-----

    - Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9.

    What's New in Python 2.7 alpha 3?=================================

    *Release date: 2010-02-06*

    Core and Builtins-----------------

    - Issue #5677: Explicitly forbid write operations on read-only file objects, and read operations on write-only file objects. On Windows, the system C library would return a bogus result; on Solaris, it was possible to crash the interpreter. Patch by Stefan Krah.

    - Issue #7853: Normalize exceptions before they are passed to a context manager's ``__exit__()`` method.

    - Issue #7385: Fix a crash in ``PyMemoryView_FromObject()`` when ``PyObject_GetBuffer()`` fails. Patch by Florent Xicluna.

    - Issue #7819: Check ``sys.call_tracing()`` arguments types.

    - Issue #7788: Fix an interpreter crash produced by deleting a list slice with very large step value.

    - Issue #7766: Change ``sys.getwindowsversion()`` return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type.

    - Issue #7561: Operations on empty bytearrays (such as ``int(bytearray())``) could crash in many places because of the ``PyByteArray_AS_STRING()`` macro

    returning NULL. The macro now returns a statically allocated empty string instead.

    - Issue #7622: Improve the split(), rsplit(), splitlines() and replace() methods of bytes, bytearray and unicode objects by using a common implementation based on stringlib's fast search. Patch by Florent Xicluna.

    - Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2, including:

    (1) a serious 'wrong output' bug that could occur for long (> 40 digit) input strings, (2) a crash in dtoa.c that occurred in debug builds when parsing certain long

    numeric strings corresponding to subnormal values, (3) a memory leak for some values large enough to cause overflow, and (4) a number of flaws that could lead to incorrectly rounded results.

    - Issue #7319, #7770: Silence ``DeprecationWarning`` by default when the -3 option is not used.

    - Issue #2335: Backport set literals syntax from Python 3.x.

    - Issue #2333: Backport set and dict comprehensions syntax from Python 3.x.

  • 8/13/2019 pynewNews

    17/104

    - Issue #1967: Backport dictionary views from Python 3.x.

    Library-------

    - Issue #7835: shelve should no longer produce mysterious warnings during interpreter shutdown.

    - Issue #2746: Don't escape ampersands and angle brackets ("&", "") in XML processing instructions and comments. These raw characters are allowed by the XML specification, and are necessary when outputting e.g. PHP code in a processing instruction. Patch by Neil Muller.

    - Issue #7869: logging: Improved diagnostic for format-time errors.

    - Issue #7868: logging: Added loggerClass attribute to Manager.

    - Issue #7851: logging: Clarification on logging configuration files.

    - Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is specified, rather than fall through to AF_PACKET (in the ``socket`` module). Also, raise ValueError rather than TypeError when an unknown TIPC address type is specified. Patch by Brian Curtin.

    - logging: Implemented PEP 391.

    - Issue #6939: Fix file I/O objects in the `io` module to keep the original file position when calling `truncate()`. It would previously change the file position to the given argument, which goes against the tradition of ftruncate() and other truncation APIs. Patch by Pascal Chambon.

    - Issue #7610: Reworked implementation of the internal ``zipfile.ZipExtFile`` class used to represent files stored inside an archive. The new implementation is significantly faster and can be wrapped in a ``io.BufferedReader`` object for more speedups. It also solves an issue where interleaved calls to ``read()`` and ``readline()`` give wrong results.

    Patch by Nir Aides.- Issue #7792: Registering non-classes to ABCs raised an obscure error.

    - Removed the deprecated functions ``verify()`` and ``vereq()`` from Lib/test/test_support.py.

    - Issue #7773: Fix an UnboundLocalError in ``platform.linux_distribution()`` when the release file is empty.

    - Issue #7748: Since unicode values are supported for some metadata options in Distutils, the DistributionMetadata get_* methods will now return an utf-8 encoded string for them. This ensures that the upload and register commands

    send the correct values to PyPI without any error.

    - Issue #1670765: Prevent ``email.generator.Generator`` from re-wrapping headers in multipart/signed MIME parts, which fixes one of the sources of invalid modifications to such parts by Generator.

    - Issue #7701: Fix crash in ``binascii.b2a_uu()`` in debug mode when given a 1-byte argument. Patch by Victor Stinner.

    - Issue #3299: Fix possible crash in the _sre module when given bad argument

  • 8/13/2019 pynewNews

    18/104

    values in debug mode. Patch by Victor Stinner.

    - Issue #7703: Add support for the new buffer API to functions of the binascii module. Backported from py3k by Florent Xicluna, with some additional tests.

    - Issue #2846: Add support for gzip.GzipFile reading zero-padded files. Patch by Brian Curtin.

    - Issue #5827: Make sure that normpath preserves unicode. Initial patch by Matt Giuca.

    - Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since Extension extra options may change the output without changing the .c file). Initial patch by Collin Winter.

    Extension Modules-----------------

    - Expat: Fix DoS via XML document with malformed UTF-8 sequences (CVE_2009_3560).

    Build-----

    - Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the private memory allocation scheme in dtoa.c and use PyMem_Malloc and PyMem_Free instead. Also disable caching of powers of 5.

    - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4

    - Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on MacOSX.

    - Issue #7661: Allow ctypes to be built from a non-ASCII directory path. Patch by Florent Xicluna.

    Tools/Demos

    ------------ iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were added to the ``Tools`` directory. They were previously living in the sandbox.

    Tests-----

    - issue #7728: test_timeout was changed to use ``test_support.bind_port()`` instead of a hard coded port.

    Documentation

    -------------

    - Updated "Using Python" documentation to include description of CPython's -J, -U and -X options.

    - Updated Python manual page (options -B, -O0, -s, environment variables PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE).

    What's New in Python 2.7 alpha 2?

  • 8/13/2019 pynewNews

    19/104

    =================================

    *Release date: 2010-01-09*

    Core and Builtins-----------------

    - The ``__complex__()`` method is now looked up on the class of instances to make it consistent with other special methods.

    - Issue #7462: Implement the stringlib fast search algorithm for the `rfind`, `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.

    - Issue #5080: A number of functions and methods previously produced a DeprecationWarning when passed a float argument where an integer was expected. These functions and methods now raise TypeError instead. The majority of the effects of this change are in the extension modules, but some core functions and methods are affected: notably the 'chr', 'range' and 'xrange' builtins, and many unicode/str methods.

    - Issue #7604: Deleting an unset slotted attribute did not raise an AttributeError.

    - Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero)

    in ** operator. The behaviour now conforms to that described in C99 Annex F.- Issue #7579: The msvcrt module now has docstrings for all its functions.

    - Issue #7413: Passing '\0' as the separator to datetime.datetime.isoformat() used to drop the time part of the result.

    - Issue #1811: Improve accuracy and cross-platform consistency for true division of integers: the result of a/b is now correctly rounded for ints a and b (at least on IEEE 754 platforms), and in particular does not depend on the internal representation of a long.

    - Issue #6108: ``unicode(exception)`` and ``str(exception)`` should return the

    same message when only ``__str__()`` (and not ``__unicode__()``) is overridden in the subclass.

    - Issue #6834: Replace the implementation for the 'python' and 'pythonw' executables on OSX.

    These executables now work properly with the arch(1) command: ``arch -ppc python`` will start a universal binary version of python in PPC mode (unlike previous releases).

    - Issue #1680159: Unicode coercion during an 'in' operation no longer masks the underlying error when the coercion fails for the left hand operand.

    - Issue #7491: Metaclass's __cmp__ method was ignored.

    - Issue #7466: Segmentation fault when the garbage collector is called in the middle of populating a tuple. Patch by Florent Xicluna.

    Library-------

    - Issue #6963: Added "maxtasksperchild" argument to ``multiprocessing.Pool``,

  • 8/13/2019 pynewNews

    20/104

    allowing for a maximum number of tasks within the pool to be completed by the worker before that worker is terminated, and a new one created to replace it.

    - Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc when it has a fully qualified configuration prefix. Initial patch by Arfrever.

    - Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles renaming of `cPickle` to `pickle`. The warning was annoying since there's no alternative to cPickle if you care about performance. Patch by Florent Xicluna.

    - Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Victor Stinner.

    - Issue #7092: Fix the DeprecationWarnings emitted by the standard library when using the -3 flag. Patch by Florent Xicluna.

    - Issue #7471: Improve the performance of GzipFile's buffering mechanism, and make it implement the ``io.BufferedIOBase`` ABC to allow for further speedups by wrapping it in an ``io.BufferedReader``. Patch by Nir Aides.

    - Issue #3972: ``httplib.HTTPConnection`` now accepts an optional source_address parameter to allow specifying where your connections come from.

    - ``socket.create_connection()`` now accepts an optional source_address parameter.

    - Issue #5511: ``zipfile.ZipFile`` can now be used as a context manager. Initial patch by Brian Curtin.

    - Distutils now correctly identifies the build architecture as "x86_64" when building on OSX 10.6 without "-arch" flags.

    - Issue #7556: Distutils' msvc9compiler now opens the MSVC Manifest file in text mode.

    - Issue #7552: Removed line feed in the base64 Authorization header in the Distutils upload command to avoid an error when PyPI reads it. This occurs on long passwords. Initial patch by JP St. Pierre.

    - Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by Tatsuhiro Tsujikawa.

    - Issue #7349: Make methods of file objects in the io module accept None as an argument where file-like objects (ie StringIO and BytesIO) accept them to mean the same as passing no argument.

    - Issue #7348: ``StringIO.StringIO.readline(-1)`` now acts as if it got no argument like other file objects.

    - Issue #7357: tarfile no longer suppresses fatal extraction errors by default.

    - Issue #7470: logging: Fix bug in Unicode encoding fallback.

    - Issue #5949: Fixed IMAP4_SSL hang when the IMAP server response is missing proper end-of-line termination.

    - Issue #7457: Added a read_pkg_file method to ``distutils.dist.DistributionMetadata``.

  • 8/13/2019 pynewNews

    21/104

    - Issue #3745: Undo the 2.7a1 change to have hashlib to reject unicode and non buffer API supporting objects as input. That behavior is for 3.x only.

    C-API-----

    - Issue #7767: New function ``PyLong_AsLongLongAndOverflow()`` added, analogous to ``PyLong_AsLongAndOverflow()``.

    - Issue #5080: The argument parsing functions ``PyArg_ParseTuple()``, ``PyArg_ParseTupleAndKeywords()``, ``PyArg_VaParse()``, ``PyArg_VaParseTupleAndKeywords()`` and ``PyArg_Parse()`` no longer accept float arguments for integer format codes (other than 'L'): previously an attempt to pass a float resulted in a DeprecationWarning; now it gives a TypeError. For the 'L' format code (which previously had no warning) there is now a DeprecationWarning.

    - Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added.

    Build-----

    - Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built.

    - Issue #6943: Use pkg-config to find the libffi headers when the ``--with-system-ffi`` flag is used.

    - Issue #7609: Add a ``--with-system-expat`` option that causes the system's expat library to be used for the pyexpat module instead of the one included with Python.

    - Issue #7589: Only build the nis module when the correct header files are found.

    - Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows.

    - Issue #7541: when using ``python-config`` with a framework install the compiler might use the wrong library.

    Tests-----

    - Issue #7376: Instead of running a self-test (which was failing) when called with no arguments, doctest.py now gives a usage message.

    - Issue #7396: Fix regrtest -s, which was broken by the -j enhancement.

    - Issue #7498: test_multiprocessing now uses test_support.find_unused_port instead of a hardcoded port number in test_rapid_restart.

    What's New in Python 2.7 alpha 1================================

    *Release date: 2009-12-05*

    Core and Builtins-----------------

  • 8/13/2019 pynewNews

    22/104

    - Issue #7419: ``locale.setlocale()`` could crash the interpreter on Windows when called with invalid values.

    - Issue #3382: 'F' formatting for float and complex now convert the result to upper case. This only affects 'inf' and 'nan', since 'f' no longer converts to 'g' for large values.

    - Remove switch from "%f" formatting to "%g" formatting for floats larger than 1e50 in absolute value.

    - Remove restrictions on precision when formatting floats. E.g., "%.120g" % 1e-100 used to raise OverflowError, but now gives the requested 120 significant digits instead.

    - Add Py3k warnings for parameter names in parentheses.

    - Issue #7362: Give a proper error message for ``def f((x)=3): pass``.

    - Issue #7085: Fix crash when importing some extensions in a thread on MacOSX 10.6.

    - Issue #7117: ``repr(x)`` for a float x returns a result based on the shortest decimal string that's guaranteed to round back to x under correct rounding (with round-half-to-even rounding mode). Previously it gave a string based on

    rounding x to 17 decimal digits. repr(x) for a complex number behaves similarly. On platforms where the correctly-rounded strtod and dtoa code is not supported (see below), repr is unchanged.

    - Issue #7117: On almost all platforms: float-to-string and string-to-float conversions within Python are now correctly rounded. Places these conversions occur include: str for floats and complex numbers; the float and complex constructors; old-style and new-style numeric formatting; serialization and deserialization of floats and complex numbers using marshal, pickle and json; parsing of float and imaginary literals in Python code; Decimal-to-float conversion.

    The conversions use a Python-adapted version of David Gay's well-known dtoa.c,

    providing correctly-rounded strtod and dtoa C functions. This code is supported on Windows, and on Unix-like platforms using gcc, icc or suncc as the C compiler. There may be a small number of platforms on which correct operation of this code cannot be guaranteed, so the code is not used: notably, this applies to platforms where the C double format is not IEEE 754 binary64, and to platforms on x86 hardware where the x87 FPU is set to 64-bit precision and Python's configure script is unable to determine how to change the FPU precision. On these platforms conversions use the platform strtod and dtoa, as before.

    - Issue #7117: Backport round implementation from Python 3.x. ``round()`` now uses the correctly-rounded string float conversions described above (when available), and so produces correctly rounded results that will display nicely

    under the float repr. There are two related small changes: (1) round now accepts any class with an ``__index__()`` method for its second argument (but no longer accepts floats for the second argument), and (2) an excessively large second integer argument (e.g., ``round(1.234, 10**100)``) no longer raises an exception.

    - Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding.

    - Fix several issues with ``compile()``. The input can now contain Windows and Mac newlines and is no longer required to end in a newline.

  • 8/13/2019 pynewNews

    23/104

    - Remove length limitation when constructing a complex number from a unicode string.

    - Issue #7244: ``itertools.izip_longest()`` no longer ignores exceptions raised during the formation of an output tuple.

    - Issue #1087418: Boost performance of bitwise operations for longs.

    - Issue #1722344: ``threading._shutdown()`` is now called in ``Py_Finalize()``, which fixes the problem of some exceptions being thrown at shutdown when the interpreter is killed. Patch by Adam Olsen.

    - Issue #7168: Document ``PyFloat_AsString()`` and ``PyFloat_AsReprString()``, and note that they are unsafe and deprecated.

    - Issue #7120: logging: Remove import of multiprocessing which is causing crash in GAE.

    - Issue #7140: The ``__dict__`` of a module should not be cleared unless the module is the only object holding a reference to it.

    - Issue #1754094: Improve the stack depth calculation in the compiler. There should be no other effect than a small decrease in memory use. Patch by

    Christopher Tur Lesniewski-Laas.- Issue #7084: Fix a (very unlikely) crash when printing a list from one thread, and mutating it from another one. Patch by Scott Dial.

    - Issue #1571184: The Unicode database contains properties for more characters. The tables for code points representing numeric values, white spaces or line breaks are now generated from the official Unicode Character Database files, and include information from the Unihan.txt file.

    - Issue #7050: Fix a SystemError when trying to use unpacking and augmented assignment.

    - Issue #5329: Fix ``os.popen*`` regression from 2.5 with commands as a sequence running through the shell. Patch by Jean-Paul Calderone and Jani Hakala.

    - Issue #7019: Raise ValueError when unmarshalling bad long data, instead of producing internally inconsistent Python longs.

    - Issue #6990: Fix ``threading.local`` subclasses leaving old state around after a reference cycle GC which could be recycled by new locals.

    - Issue #6300: unicode.encode, unicode.decode, str.decode, and str.encode now take keyword arguments.

    - Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32

    stream with a non-raising error handler like "replace" or "ignore".

    - Issue #6713: Improve performance of base 10 int -> string and long -> string conversions.

    - Issue #1590864: Fix potential deadlock when mixing threads and fork().

    - Issue #6844: Do not emit DeprecationWarnings when accessing a "message" attribute on exceptions that was set explicitly.

  • 8/13/2019 pynewNews

    24/104

    - Issue #6846: Fix bug where bytearray.pop() returns negative integers.

    - ``classmethod()`` no longer checks if its argument is callable.

    - Issue #6750: A text file opened with ``io.open()`` could duplicate its output when writing from multiple threads at the same time.

    - Issue #6704: Improve the col_offset in AST for "for" statements with a target of tuple unpacking.

    - Issue #6707: ``dir()`` on an uninitialized module caused a crash.

    - Issue #6540: Fixed crash for ``bytearray.translate()`` with invalid parameters.

    - Issue #6573: ``set.union()`` stopped processing inputs if an instance of self occurred in the argument chain.

    - Issue #1616979: Added the cp720 (Arabic DOS) encoding.

    - Issue #6070: On posix platforms import no longer copies the execute bit from the .py file to the .pyc file if it is set. Patch by Marco N.

    - Issue #4618: When unicode arguments are passed to ``print()``, the default

    separator and end should be unicode also.- Issue #6119: Fixed an incorrect Py3k warning about order comparisons of built-in functions and methods.

    - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead of stdint.h on that platform.

    - Issue #4856: Remove checks for win NT.

    - Issue #2016: Fixed a crash in a corner case where the dictionary of keyword arguments could be modified during the function call setup.

    - Removed the ipaddr module.

    - Issue #6329: Fixed iteration for memoryview objects (it was being blocked because it wasn't recognized as a sequence).

    - Issue #6289: Encoding errors from ``compile()`` were being masked.

    - When no module is given in a relative import, the module field of the ImportFrom AST node is now None instead of an empty string.

    - Assignment to None using import statements now raises a SyntaxError.

    - Issue #4547: When debugging a very large function, it was not always possible to update the lineno attribute of the current frame.

    - Issue #5330: C functions called with keyword arguments were not reported by the various profiling modules (profile, cProfile). Patch by Hagen Frstenau.

    - Issue #5982: staticmethod and classmethod now expose the wrapped function with ``__func__``.

    - Added support for multiple context managers in the same with-statement.

  • 8/13/2019 pynewNews

    25/104

    Deprecated ``contextlib.nested()`` which is no longer needed.

    - Issue #6101: A new opcode, SETUP_WITH, has been added to speed up the with statement and correctly lookup the __enter__ and __exit__ special methods.

    - Issue #5829: complex("1e500") no longer raises OverflowError. This makes it consistent with float("1e500") and interpretation of real and imaginary literals.

    - Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.

    - ``__instancecheck__()`` and ``__subclasscheck__()`` are now completely ignored on classic classes and instances.

    - Issue #5994: The marshal module now has docstrings.

    - Issue #5981: Fix three minor inf/nan issues in float.fromhex:

    (1) inf and nan strings with trailing whitespace were incorrectly rejected; (2) parsing of strings representing infinities and nans was locale aware; and (3) the interpretation of fromhex('-nan') didn't match that of float('-nan').

    - Issue #5920: For ``float.__format__()``, change the behavior with the empty presentation type (that is, not one of 'e', 'f', 'g', or 'n') to be like 'g'

    but with at least one decimal point and with a default precision of 12. Previously, the behavior the same but with a default precision of 6. This more closely matches ``str()``, and reduces surprises when adding alignment flags to the empty presentation type. This also affects the new complex.__format__ in the same way.

    - Issue #5890: In subclasses of 'property' the __doc__ attribute was shadowed by classtype's, even if it was None. property now inserts the __doc__ into the subclass instance __dict__.

    - Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal sequences. Patch by Nick Barnes and Victor Stinner.

    - Issue #1588: Add complex.__format__. For example, ``format(complex(1, 2./3), '.5')`` now produces a sensible result.

    - Issue #5864: Fix empty format code formatting for floats so that it never gives more than the requested number of significant digits.

    - Issue #5793: Rationalize isdigit / isalpha / tolower, etc. Includes new Py_ISDIGIT / Py_ISALPHA / Py_TOLOWER, etc. in pctypes.h.

    - Issue #4971: Fix titlecase for characters that are their own titlecase, but not their own uppercase.

    - Issue #5835: Deprecate PyOS_ascii_formatd and replace it with

    _PyOS_double_to_string or PyOS_double_to_string.

    - Issue #5283: Setting __class__ in __del__ caused a segfault.

    - Issue #5816: ``complex(repr(z))`` now recovers z exactly, even when z involves nans, infs or negative zeros.

    - Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints, and longs.

  • 8/13/2019 pynewNews

    26/104

    - Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero formatting poorly.

    - Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent.

    - Issue #3166: Make long -> float (and int -> float) conversions correctly rounded.

    - Issue #5787: ``object.__getattribute__(some_type, "__bases__")`` segfaulted on some built-in types.

    - Issue #1869: Fix a couple of minor round() issues. ``round(5e15+1)`` was giving 5e15+2; ``round(-0.0)`` was losing the sign of the zero.

    - Issue #5759: float() didn't call __float__ on str subclasses.

    - Issue #5704: The "-3" command-line option now implies "-t".

    - Issue #2170: Refactored ``xml.dom.minidom.normalize``, increasing both its clarity and its speed.

    - Issue #2396: The memoryview object was backported from Python 3.1.

    - Fix a problem in PyErr_NormalizeException that leads to "undetected errors" when hitting the recursion limit under certain circumstances.

    - Issue #1665206: Remove the last eager import in _warnings.c and make it lazy.

    - Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to the end sys.path, for compatibility with the system install of Python.

    - Issue #4688: Add a heuristic so that tuples and dicts containing only untrackable objects are not tracked by the garbage collector. This can reduce the size of collections and therefore the garbage collection overhead on long-running programs, depending on their particular use of datatypes.

    - Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to improve its performance. Long divisions and remainder operations are now between 50% and 150% faster.

    - Issue #4258: Make it possible to use base 2**30 instead of base 2**15 for the internal representation of integers, for performance reasons. Base 2**30 is enabled by default on 64-bit machines. Add --enable-big-digits option to configure, which overrides the default. Add sys.long_info structseq to provide information about the internal format.

    - Issue #4034: Fix weird attribute error messages of the traceback object. (As a result traceback.__members__ no longer exists.)

    - Issue #4474: PyUnicode_FromWideChar now converts characters outside the BMP to surrogate pairs, on systems with sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) == 2.

    - Issue #5237: Allow auto-numbered fields in str.format(). For example: ``'{} {}'.format(1, 2) == '1 2'``.

    - Issue #3652: Make the 'line' argument for ``warnings.showwarning()`` a requirement. Means the DeprecationWarning from Python 2.6 can go away.

  • 8/13/2019 pynewNews

    27/104

    - Issue #5247: Improve error message when unknown format codes are used when using ``str.format()`` with str, unicode, long, int, and float arguments.

    - Running Python with the -3 option now also warns about classic division for ints and longs.

    - Issue #5260: Long integers now consume less memory: average saving is 2 bytes per long on a 32-bit system and 6 bytes per long on a 64-bit system.

    - Issue #5186: Reduce hash collisions for objects with no __hash__ method by rotating the object pointer by 4 bits to the right.

    - Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs: it now forces its argument to double before testing for infinity.

    - Issue #4978: Passing keyword arguments as unicode strings is now allowed.

    - Issue #1242657: the __len__() and __length_hint__() calls in several tools were suppressing all exceptions. These include list(), filter(), map(), zip(), and bytearray().

    - os.ftruncate raises OSErrors instead of IOErrors for consistency with other os functions.

    - Issue #4991: Passing invalid file descriptors to io.FileIO now raises an OSError.

    - Issue #4807: Port the _winreg module to Windows CE.

    - Issue #4935: The overflow checking code in the expandtabs() method common to str, bytes and bytearray could be optimized away by the compiler, letting the interpreter segfault instead of raising an error.

    - Issue #3720: Fix a crash when an iterator modifies its class and removes its __next__ method.

    - Issue #4893: Use NT threading on CE.

    - Issue #4915: Port sysmodule to Windows CE.

    - Issue #4074: Change the criteria for doing a full garbage collection (i.e. collecting the oldest generation) so that allocating lots of objects without destroying them does not show quadratic performance. Based on a proposal by Martin von Lwis at http://mail.python.org/pipermail/python-dev/2008-June/080579.html.

    - Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t.

    - Issue #1180193: When importing a module from a .pyc (or .pyo) file with an existing .py counterpart, override the co_filename attributes of all code

    objects if the original filename is obsolete (which can happen if the file has been renamed, moved, or if it is accessed through different paths). Patch by Ziga Seilnacht and Jean-Paul Calderone.

    - Issue #4075: Use ``OutputDebugStringW()`` in Py_FatalError.

    - Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open file with `str' filename on Windows.

    - Issue #3680: Reference cycles created through a dict, set or deque iterator

  • 8/13/2019 pynewNews

    28/104

    did not get collected.

    - Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types where the tp_hash and tp_dict slots are both NULL.

    - Issue #4764: With io.open, IOError.filename is set when trying to open a directory on POSIX systems.

    - Issue #4764: IOError.filename is set when trying to open a directory on POSIX systems.

    - Issue #4759: None is now allowed as the first argument of ``bytearray.translate()``. It was always allowed for ``bytes.translate()``.

    - Added test case to ensure attempts to read from a file opened for writing fail.

    - Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always print elapsed times, not only when some objects are uncollectable/unreachable. Original patch by Neil Schemenauer.

    - Issue #3439: Add a bit_length method to int and long.

    - Issue #2183: Simplify and optimize bytecode for list comprehensions. Original

    patch by Neal Norwitz.- Issue #4597: Fixed exception handling when the __exit__ function of a context manager returns a value that cannot be converted to a bool.

    - Issue #4597: Fixed several opcodes that weren't always propagating exceptions.

    - Issue #4445: Replace ``sizeof(PyStringObject)`` with ``offsetof(PyStringObject, ob_sval) + 1`` when allocating memory for str instances. On a typical machine this saves 3 bytes of memory (on average) per string allocation.

    - Issue #3996: On Windows, the PyOS_CheckStack function would cause the

    interpreter to abort ("Fatal Python error: Could not reset the stack!") instead of throwing a MemoryError.

    - Issue #3689: The list reversed iterator now supports __length_hint__ instead of __len__. Behavior now matches other reversed iterators.

    - Issue #4367: Python would segfault during compiling when the unicodedata module couldn't be imported and \N escapes were present.

    - Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()`` method on file objects with closefd=False. The file descriptor is still kept open but the file object behaves like a closed file. The ``FileIO`` object also got a new readonly attribute ``closefd``.

    - Issue #4348: Some bytearray methods returned that didn't cause any change to the bytearray, returned the same bytearray instead of a copy.

    - Issue #4317: Fixed a crash in the ``imageop.rgb2rgb8()`` function.

    - Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly.

    - Issue #4048: The parser module now correctly validates relative imports.

  • 8/13/2019 pynewNews

    29/104

    - Issue #4225: ``from __future__ import unicode_literals`` didn't work in an exec statement.

    - Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` method does not return iterators for the 4th and 5th items.

    - Issue #4209: Enabling unicode_literals and the print_function in the same __future__ import didn't work.

    - Using ``nonlocal`` as a variable name will now raise a Py3k SyntaxWarning because it is a reserved word in 3.x.

    - On windows, ``os.chdir()`` given unicode was not working if GetCurrentDirectoryW returned a path longer than MAX_PATH. (But It's doubtful this code path is really executed because I cannot move to such directory on win2k)

    - Issue #4069: When ``set.remove(element)`` is used with a set element, the element is temporarily replaced with an equivalent frozenset. But the eventual KeyError would always report the empty ``frozenset()`` as the missing key. Now it correctly refers to the initial element.

    - Issue #4509: Various issues surrounding resize of bytearray objects to which there are buffer exports.

    - Issue #4748: Lambda generators no longer return a value.

    - Issue #3582: Use native TLS functions on Windows

    - The re.sub(), re.subn() and re.split() functions now accept a flags parameter.

    - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short file names.

    - Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add `do { ... } while (0)' to avoid compiler warnings.

    - Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam() returned them on 64bit platforms.

    - Issue #5108: Handle %s like %S and %R in PyUnicode_FromFormatV(): Call PyUnicode_DecodeUTF8() once, remember the result and output it in a second step. This avoids problems with counting UTF-8 bytes that ignores the effect of using the replace error handler in PyUnicode_DecodeUTF8().

    - Issue #3739: The unicode-internal encoder now reports the number of characters consumed like any other encoder (instead of the number of bytes).

    - Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc allocator will be automatically disabled when running under Valgrind. This

    gives improved memory leak detection when running under Valgrind, while taking advantage of pymalloc at other times.

    Library-------

    - Add count() and reverse() methods to collections.deque().

    - Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d

  • 8/13/2019 pynewNews

    30/104

    - Issue #6986: Fix crash in the JSON C accelerator when called with the wrong parameter types. Patch by Victor Stinner.

    - logging: Added optional "secure" parameter to SMTPHandler, to enable use of TLS with authentication credentials.

    - Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated in Distutils. Patch by Stephen Emslie.

    - Issue #4120: Drop reference to CRT from manifest when building extensions with msvc9compiler.

    - Issue #7333: The ``posix`` module gains an ``initgroups()`` function providing access to the initgroups(3) C library call on Unix systems which implement it. Patch by Jean-Paul Calderone.

    - Issue #7408: Fixed distutils.tests.sdist so it doesn't check for group ownership when the group is not forced, because the group may be different from the user's group and inherit from its container when the test is run.

    - Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert Collins.

    - Issue #7403: logging: Fixed possible race condition in lock creation.

    - Issue #6845: Add restart support for binary upload in ftplib. The ``storbinary()`` method of FTP and FTP_TLS objects gains an optional "rest" argument. Patch by Pablo Mouzo.

    - Issue #5788: ``datetime.timedelta`` objects get a new ``total_seconds()`` method returning the total number of seconds in the duration. Patch by Brian Quinlan.

    - Issue #6615: logging: Used weakrefs in internal handler list.

    - Issue #1488943: ``difflib.Differ`` doesn't always add hints for tab characters.

    - Issue #6123: tarfile now opens empty archives correctly and consistently raises ReadError on empty files.

    - Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2.

    - Issue #5037: Proxy the __unicode__ special method to __unicode__ instead of __str__.

    - Issue #7341: Close the internal file object in the TarFile constructor in case of an error.

    - Issue #7293: ``distutils.test_msvc9compiler`` is fixed to work on any fresh

    Windows box. Help provided by David Bolen.

    - Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch.

    - Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS or SSL. Patch by Giampaolo Rodola'.

    - Issue #4969: The mimetypes module now reads the MIME database from the registry under Windows. Patch by Gabriel Genellina.

  • 8/13/2019 pynewNews

    31/104

    - Issue #6816: runpy now provides a run_path function that allows Python code to execute file paths that refer to source or compiled Python files as well as zipfiles, directories and other valid sys.path entries that contain a __main__.py file. This allows applications that run other Python scripts to support the same flexibility as the CPython command line itself.

    - Issue #7318: multiprocessing now uses a timeout when it fails to establish a connection with another process, rather than looping endlessly. The default timeout is 20 seconds, which should be amply sufficient for local connections.

    - Issue #7197: Allow unittest.TextTestRunner objects to be pickled and unpickled. This fixes crashes under Windows when trying to run test_multiprocessing in verbose mode.

    - Issue #7282: Fix a memory leak when an RLock was used in a thread other than those started through ``threading.Thread`` (for example, using ``thread.start_new_thread()``.

    - Issue #7264: Fix a possible deadlock when deallocating thread-local objects which are part of a reference cycle.

    - Issue #7211: Allow 64-bit values for the ``ident`` and ``data`` fields of kevent objects on 64-bit systems. Patch by Michael Broghton.

    - Issue #6896: ``mailbox.Maildir`` now invalidates its internal cache each time a modification is done through it. This fixes inconsistencies and test failures on systems with slightly bogus mtime behaviour.

    - Issue #7246 & Issue #7208: getpass now properly flushes input before reading from stdin so that existing input does not confuse it and lead to incorrect entry or an IOError. It also properly flushes it afterwards to avoid the terminal echoing the input afterwards on OSes such as Solaris.

    - Issue #7233: Fix a number of two-argument Decimal methods to make sure that they accept an int or long as the second argument. Also fix buggy handling of large arguments (those with coefficient longer than the current precision) in shift and rotate.

    - Issue #4750: Store the basename of the original filename in the gzip FNAME header as required by RFC 1952.

    - Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in Distutils.

    - Issue #7218: Fix test_site for win32, the directory comparison was done with an uppercase.

    - Issue #7205: Fix a possible deadlock when using a BZ2File object from several threads at once.

    - Issue #7071: byte-compilation in Distutils is now done with respect to sys.dont_write_bytecode.

    - Issue #7066: archive_util.make_archive now restores the cwd if an error is raised. Initial patch by Ezio Melotti.

    - Issue #6218: io.StringIO and io.BytesIO instances are now picklable with protocol 2.

    - Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.

  • 8/13/2019 pynewNews

    32/104

    - Issue #7099: Decimal.is_normal now returns True for numbers with exponent larger than emax.

    - Issue #5833: Fix extra space character in readline completion with the GNU readline library version 6.0.

    - Issue #7133: SSL objects now support the new buffer API.

    - Issue #7149: urllib fails on OSX in the proxy detection code.

    - Issue #7069: Make inspect.isabstract() return a boolean.

    - Add support to the ``ihooks`` module for relative imports.

    - Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment.

    - Issue #7086: Added TCP support to SysLogHandler, and tidied up some anachronisms in the code which were a relic of 1.5.2 compatibility.

    - Issue #7082: When falling back to the MIME 'name' parameter, the correct place to look for it is the Content-Type header.

    - Issue #7048: Force Decimal.logb to round its result when that result is too

    large to fit in the current precision.- Issue #6516: Added owner/group support when creating tar archives in Distutils.

    - Issue #7031: Add ``TestCase.assert(Not)IsInstance()`` methods.

    - Issue #6790: Make it possible again to pass an ``array.array`` to ``httplib.HTTPConnection.send``. Patch by Kirk McDonald.

    - Issue #6236, #6348: Fix various failures in the `io` module under AIX and other platforms, when using a non-gcc compiler. Patch by egreen.

    - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6

    - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now always result in NULL.

    - Issue #5042: ctypes Structure sub-subclass does now initialize correctly with base class positional arguments.

    - Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug message.

    - Issue #6635: Fix profiler printing usage message.

    - Issue #6856: Add a filter keyword argument to TarFile.add().

    - Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and Michael Haubenwallner.

    - Issue #6857: Default format() alignment should be '>' for Decimal instances.

  • 8/13/2019 pynewNews

    33/104

    - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning NaN or raising InvalidContext. Also, fix infinite recursion in long(Decimal('nan')).

    - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier.

    - Issue #4937: plat-mac/bundlebuilder refers to non-existing version.plist.

    - Issue #6838: Use a list to accumulate the value instead of repeatedly concatenating strings in httplib's HTTPResponse._read_chunked providing a significant speed increase when downloading large files servend with a Transfer-Encoding of 'chunked'.

    - Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented.

    - Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module.

    - Issue #6054: Do not normalize stored pathnames in tarfile.

    - Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN payloads are now ordered by integer value rather than lexicographically.

    - Issue #6693: New functions in site.py to get user/global site packages paths.

    - The thread.lock type now supports weak references.

    - Issue #1356969: Add missing info methods in Tix.HList.

    - Issue #1522587: New constants and methods for the Tix.Grid widget.

    - Issue #1250469: Fix the return value of Tix.PanedWindow.panes.

    - Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText.

    - Issue #6665: Fix fnmatch to properly match filenames with newlines in them.

    - Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview* and yview* methods.

    - Issue #6629: Fix a data corruption issue in the new `io` package, which could occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or "wb+" mode) after having buffered a certain amount of data for reading. This bug was not present in the pure Python implementation.

    - Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was possible to get a spurious 'task_done() called too many times' error.

    - Issue #1628205: Socket file objects returned by socket.socket.makefile() now properly handles EINTR within the read, readline, write & flush methods. The socket.sendall() method now properly handles interrupted system calls.

    - Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal digits in input, as recommended by the standard. Previously it was restricted to accepting [0-9].

    - Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when

  • 8/13/2019 pynewNews

    34/104

    opening an empty or very small file.

    - Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object containing incomplete data.

    - Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O.

    - unittest has been split up into a package. All old names should still work.

    - Issue #6431: Make Fraction type return NotImplemented when it doesn't know how to handle a comparison without loss of precision. Also add correct handling of infinities and nans for comparisons with float.

    - Issue #6415: Fixed warnings.warn segfault on bad formatted string.

    - Issue #6466: Now distutils.cygwinccompiler and distutils.emxccompiler uses the same refactored function to get gcc/ld/dllwrap versions numbers. It's ``distutils.util.get_compiler_versions()``. Added deprecation warnings for the obsolete get_versions() functions.

    - Issue #6433: Fixed issues with multiprocessing.pool.map hanging on empty list.

    - Issue #6314: logging: Extra checks on the "level" argument in more places.

    - Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app.

    - Issue #6455: Fixed test_build_ext under win32.

    - Issue #6377: Enabled the compiler option, and deprecate its usage as an attribute.

    - Issue #6413: Fixed the log level in distutils.dist for announce.

    - Issue #3392: The subprocess communicate() method no longer fails in select() when file descriptors are large; communicate() now uses poll() when possible.

    - Issue #6403: Fixed package path usage in build_ext.

    - Issues #5155, #5313, #5331: multiprocessing.Process._bootstrap was unconditionally calling "os.close(sys.stdin.fileno())" resulting in file descriptor errors.

    - Issue #6365: Distutils build_ext inplace mode was copying the compiled extension in a subdirectory if the extension name had dots.

    - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.

    - Issue #5230: pydoc would report no documentation found if a module generated a

    'not found' import error when loaded; it now reports the import errors. Thanks to Lucas Prado Melo for initial fix and collaboration on the tests.

    - Issue #6314: ``logging.basicConfig()`` performs extra checks on the "level" argument.

    - Issue #6164: Added an AIX specific linker argument in Distutils unixcompiler. Original patch by Sridhar Ratnakumar.

    - Issue #6274: Fixed possible file descriptors leak in subprocess.py.

  • 8/13/2019 pynewNews

    35/104

    - Issue #6189: Restored compatibility of subprocess.py with Python 2.2.

    - Issue #6287: Added the license field in Distutils documentation.

    - Issue #6286: Now Distutils upload command is based on urllib2 instead of httplib, allowing the usage of http_proxy.

    - Issue #6271: mmap tried to close invalid file handle (-1) for anonymous maps on Unix.

    - Issue #6215: All bug fixes and enhancements from the Python 3.1 io library (including the fast C implementation) have been backported to the standard ``io`` module.

    - Issue #6258: Support AMD64 in bdist_msi.

    - Issue #6252: Fixed bug in next rollover time computation in TimedRotatingFileHandler.

    - Issue #6263: Fixed syntax error in distutils.cygwincompiler.

    - Issue #5201: distutils.sysconfig.parse_makefile() now understands ``$$`` in Makefiles. This prevents compile errors when using syntax like:

    ``LDFLAGS='-rpath=\$$LIB:/some/other/path'``. Patch by Floris Bruynooghe.- Issue #5767: Removed sgmlop support from xmlrpclib.

    - Issue #6131: test_modulefinder leaked when run after test_distutils. Patch by Hirokazu Yamamoto.

    - Issue #6048: Now Distutils uses the tarfile module in archive_util.

    - Issue #5150: IDLE's format menu now has an option to strip trailing whitespace.

    - Issue #6121: pydoc now ignores leading and trailing spaces in the argument to

    the 'help' function.- In unittest, using a skipping decorator on a class is now equivalent to skipping every test on the class. The ClassTestSuite class has been removed.

    - Issue #6050: Don't fail extracting a directory from a zipfile if the directory already exists.

    - Issue #5311: bdist_msi can now build packages that do not depend on a specific Python version.

    - Issue #1309352: fcntl now converts its third arguments to a C `long` rather than an int, which makes some operations possible under 64-bit Linux (e.g.

    DN_MULTISHOT with F_NOTIFY).

    - Issue #1424152: Fix for httplib, urllib2 to support SSL while working through proxy. Original patch by Christopher Li, changes made by Senthil Kumaran.

    - Issue #1983: Fix functions taking or returning a process identifier to use the dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have a process identifier type wider than the standard C integer type.

    - Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket.

  • 8/13/2019 pynewNews

    36/104

    Patch by Farhan Ahmad, test by Marcin Bachry.

    - Issue #6062: In distutils, fixed the package option of build_ext. Feedback and tests on pywin32 by Tim Golden.

    - Issue #6053: Fixed distutils tests on win32. Patch by Hirokazu Yamamoto.

    - Issue #6046: Fixed the library extension when distutils build_ext is used in place. Initial patch by Roumen Petrov.

    - Issue #6041: Now distutils `sdist` and `register` commands use `check` as a subcommand.

    - Issue #2116: Weak references and weak dictionaries now support copy()ing and deepcopy()ing.

    - Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr.

    - Issue #5918: Fix a crash in the parser module.

    - Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.

    - Issue #6022: A test file was created in the current working directory by test_get_outputs in Distutils.

    - Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source' file is a binary. Patch by Brodie Rao, tests by Daniel Diniz.

    - Issue #5977: distutils build_ext.get_outputs was not taking into account the inplace option. Initial patch by kxroberto.

    - Issue #5984: distutils.command.build_ext.check_extensions_list checks were broken for old-style extensions.

    - Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when trying to print a traceback.

    - Issue #5976: Fixed Distutils test_check_environ.- Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used. Original patch by Floris Bruynooghe.

    - Issue #5941: Distutils build_clib command was not working anymore because of an incomplete costumization of the archiver command. Added ARFLAGS in the Makefile besides AR and make Distutils use it. Original patch by David Cournapeau.

    - Issue 5955: aifc's close method did not close the file it wrapped, now it does. This also means getfp method now returns the real fp.

    - Issue #4875: On win32, ctypes.util.find_library does no longer return directories.

    - Issue #5142: Add the ability to skip modules while stepping to pdb.

    - Issue #1309567: Fix linecache behavior of stripping subdirectories when looking for files given by a relative filename.

    - Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when extracting a file to the root directory.

  • 8/13/2019 pynewNews

    37/104

    - Issue #5913: ``os.listdir()`` should fail for empty path on windows.

    - Issue #5084: Unpickling now interns the attribute names of pickled objects, saving memory and avoiding growth in size of subsequent pickles. Proposal and original patch by Jake McGuire.

    - Issue #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an error when a named pipe is encountered, rather than blocking infinitely.

    - Issue #3959: The ipaddr module has been added to the standard library. Contributed by Google.

    - Issue #2245: aifc now skips chunk types it doesn't recognize, per spec.

    - Issue #5874: distutils.tests.test_config_cmd is not locale-sensitive anymore.

    - Issue #4305: ctypes should now build again on mipsel-linux-gnu

    - Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the string is already in normalized form, by performing a quick check beforehand. Original patch by Rauli Ruohonen.

    - Issue #5853: Calling a function of the mimetypes module from several threads

    at once could hit the recursion limit if the mimetypes database hadn't been initialized before.

    - Issue #5854: Updated __all__ to include some missing names and remove some names which should not be exported.

    - Issue #5810: Fixed Distutils test_build_scripts so it uses ``sysconfig.get_config_vars()``.

    - Issue #4951: Fixed failure in test_httpservers.

    - Issue #3102: All global symbols that the _ctypes extension defines are now prefixed with 'Py' or '_ctypes'.

    - Issue #5041: ctypes does now allow pickling wide character.

    - Issue #5812: For the two-argument form of the Fraction constructor, ``Fraction(m, n)``, m and n are permitted to be arbitrary Rational instances.

    - Issue #5812: Fraction('1e6') is valid: more generally, any string that's valid for float() is now valid for Fraction(), with the exception of strings representing NaNs and infinities.

    - Issue #5795: Fixed test_distutils failure on Debian ppc.

    - Issue #5768: Fixed bug in Unicode output logic and test case for same.

    - Issue #1161031: Fix readwrite select flag handling: POLLPRI now results in a handle_expt_event call, not handle_read_event, and POLLERR and POLLNVAL now call handle_close, not handle_expt_event. Also, dispatcher now has an 'ignore_log_types' attribute for suppressing log messages, which is set to 'warning' by default.

    - Issue #5607: Fixed Distutils test_get_platform for Mac OS X fat binaries.

    - Issue #5741: Don't disallow "%%" (which is an escape for "%") when setting a

  • 8/13/2019 pynewNews

    38/104

    value in SafeConfigParser.

    - Issue #5732: Added a new command in Distutils: check.

    - Issue #5731: Distutils bdist_wininst no longer worked on non-Windows platforms. Initial patch by Paul Moore.

    - Issue #2254: Fix CGIHTTPServer information disclosure. Relative paths are now collapsed within the url properly before looking in cgi_directories.

    - Issue #5095: Added bdist_msi to the list of bdist suppor