Documentation
-------------
-- Issue #10299: List the built-in functions in a table in functions.rst.
-
-
-What's New in Python 3.2 Alpha 4?
-=================================
-
-*Release date: 13-Nov-2010*
-
-Core and Builtins
------------------
-
-- Issue #10372: Import the warnings module only after the IO library is
- initialized, so as to avoid bootstrap issues with the '-W' option.
-
-- Issue #10293: Remove obsolete field in the PyMemoryView structure, unused
- undocumented value PyBUF_SHADOW, and strangely-looking code in
- PyMemoryView_GetContiguous.
-
-- Issue #6081: Add str.format_map(), similar to ``str.format(**mapping)``.
-
-- If FileIO.__init__ fails, close the file descriptor.
-
-- Issue #10221: dict.pop(k) now has a key error message that includes the
- missing key (same message d[k] returns for missing keys).
-
-- Issue #5437: A preallocated MemoryError instance should not keep traceback
- data (including local variables caught in the stack trace) alive infinitely.
-
-- Issue #10186: Fix the SyntaxError caret when the offset is equal to the length
- of the offending line.
-
-- Issue #10089: Add support for arbitrary -X options on the command line. They
- can be retrieved through a new attribute ``sys._xoptions``.
-
-- Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead of
- the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment
- variable is not set, the locale encoding is ISO-8859-1, whereas most programs
- (including Python) expect UTF-8. Python already uses UTF-8 for the filesystem
- encoding and to encode command line arguments on this OS.
-
-- Issue #9713, #10114: Parser functions (e.g. PyParser_ASTFromFile) expect
- filenames encoded to the filesystem encoding with the surrogateescape error
- handler (to support undecodable bytes), instead of UTF-8 in strict mode.
-
-- Issue #9997: Don't let the name "top" have special significance in scope
- resolution.
-
-- Issue #9862: Compensate for broken PIPE_BUF in AIX by hard coding its value as
- the default 512 when compiling on AIX.
-
-- Use locale encoding instead of UTF-8 to encode and decode filenames if
- Py_FileSystemDefaultEncoding is not set.
-
-- Issue #10095: fp_setreadl() doesn't reopen the file, instead reuse the file
- descriptor.
-
-- Issue #9418: Moved private string methods ``_formatter_parser`` and
- ``_formatter_field_name_split`` into a new ``_string`` module.
-
-- Issue #9992: Remove PYTHONFSENCODING environment variable.
-
-Library
--------
-
-- Issue #10465: fix broken delegating of attributes by gzip._PaddedFile.
-
-- Issue #10356: Decimal.__hash__(-1) should return -2.
-
-- Issue #1553375: logging: Added stack_info kwarg to display stack information.
-
-- Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru.
-
-- Fix Fraction.__hash__ so that Fraction.__hash__(-1) is -2. (See also issue
- #10356.)
-
-- Issue #4471: Add the IMAP.starttls() method to enable encryption on standard
- IMAP4 connections. Original patch by Lorenzo M. Catucci.
-
-- Issue #1466065: Add 'validate' option to base64.b64decode to raise an error if
- there are non-base64 alphabet characters in the input.
-
-- Issue #10386: Add __all__ to token module; this simplifies importing in
- tokenize module and prevents leaking of private names through ``import *``.
-
-- Issue #4471: Properly shutdown socket in IMAP.shutdown(). Patch by Lorenzo
- M. Catucci.
-
-- Fix IMAP.login() to work properly.
-
-- Issue #9244: multiprocessing pool worker processes could terminate
- unexpectedly if the return value of a task could not be pickled. Only the
- ``repr`` of such errors are now sent back, wrapped in an
- ``MaybeEncodingError`` exception.
-
-- Issue #9244: The ``apply_async()`` and ``map_async()`` methods of
- ``multiprocessing.Pool`` now accepts a ``error_callback`` argument. This can
- be a callback with the signature ``callback(exc)``, which will be called if
- the target raises an exception.
-
-- Issue #10022: The dictionary returned by the ``getpeercert()`` method of SSL
- sockets now has additional items such as ``issuer`` and ``notBefore``.
-
-- ``usenetrc`` is now false by default for NNTP objects.
-
-- Issue #1926: Add support for NNTP over SSL on port 563, as well as STARTTLS.
- Patch by Andrew Vant.
-
-- Issue #10335: Add tokenize.open(), detect the file encoding using
- tokenize.detect_encoding() and open it in read only mode.
-
-- Issue #10321: Add support for binary data to smtplib.SMTP.sendmail, and a new
- method send_message to send an email.message.Message object.
-
-- Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error
- handler to parse the Makefile file. Avoid a UnicodeDecodeError if the source
- code directory name contains a non-ASCII character and the locale encoding is
- ASCII.
-
-- Issue #10329: The trace module writes reports using the input Python script
- encoding, instead of the locale encoding. Patch written by Alexander
- Belopolsky.
-
-- Issue #10126: Fix distutils' test_build when Python was built with
- --enable-shared.
-
-- Issue #9281: Prevent race condition with mkdir in distutils. Patch by
- Arfrever.
-
-- Issue #10229: Fix caching error in gettext.
-
-- Issue #10252: Close file objects in a timely manner in distutils code and
- tests. Patch by Brian Brazil, completed by Éric Araujo.
-
-- Issue #10180: Pickling file objects is now explicitly forbidden, since
- unpickling them produced nonsensical results.
-
-- Issue #10311: The signal module now restores errno before returning from its
- low-level signal handler. Patch by Hallvard B Furuseth.
-
-- Issue #10282: Add a ``nntp_implementation`` attribute to NNTP objects.
-
-- Issue #10283: Add a ``group_pattern`` argument to NNTP.list().
-
-- Issue #10155: Add IISCGIHandler to wsgiref.handlers to support IIS CGI
- environment better, and to correct unicode environment values for WSGI 1.0.1.
-
-- Issue #10281: nntplib now returns None for absent fields in the OVER/XOVER
- response, instead of raising an exception.
-
-- wsgiref now implements and validates PEP 3333, rather than an experimental
- extension of PEP 333. (Note: earlier versions of Python 3.x may have
- incorrectly validated some non-compliant applications as WSGI compliant; if
- your app validates with Python <3.2b1+, but not on this version, it is likely
- the case that your app was not compliant.)
-
-- Issue #10280: NNTP.nntp_version should reflect the highest version advertised
- by the server.
-
-- Issue #10184: Touch directories only once when extracting a tarfile.
-
-- Issue #10199: New package, ``turtledemo`` now contains selected demo scripts
- that were formerly found under Demo/turtle.
-
-- Issue #10265: Close file objects explicitly in sunau. Patch by Brian Brazil.
-
-- Issue #10266: uu.decode didn't close in_file explicitly when it was given as a
- filename. Patch by Brian Brazil.
-
-- Issue #10110: Queue objects didn't recognize full queues when the maxsize
- parameter had been reduced.
-
-- Issue #10160: Speed up operator.attrgetter. Patch by Christos Georgiou.
-
-- logging: Added style option to basicConfig() to allow %, {} or $-formatting.
-
-- Issue #5729: json.dumps() now supports using a string such as '\t' for
- pretty-printing multilevel objects.
-
-- Issue #10253: FileIO leaks a file descriptor when trying to open a file for
- append that isn't seekable. Patch by Brian Brazil.
-
-- Support context manager protocol for file-like objects returned by mailbox
- ``get_file()`` methods.
-
-- Issue #10246: uu.encode didn't close file objects explicitly when filenames
- were given to it. Patch by Brian Brazil.
-
-- Issue #10198: fix duplicate header written to wave files when writeframes() is
- called without data.
-
-- Close file objects in modulefinder in a timely manner.
-
-- Close a io.TextIOWrapper object in email.parser in a timely manner.
-
-- Close a file object in distutils.sysconfig in a timely manner.
-
-- Close a file object in pkgutil in a timely manner.
-
-- Issue #10233: Close file objects in a timely manner in the tarfile module and
- its test suite.
-
-- Issue #10093: ResourceWarnings are now issued when files and sockets are
- deallocated without explicit closing. These warnings are silenced by default,
- except in pydebug mode.
-
-- tarfile.py: Add support for all missing variants of the GNU sparse extensions
- and create files with holes when extracting sparse members.
-
-- Issue #10218: Return timeout status from ``Condition.wait`` in threading.
-
-- Issue #7351: Add ``zipfile.BadZipFile`` spelling of the exception name and
- deprecate the old name ``zipfile.BadZipfile``.
-
-- Issue #5027: The standard ``xml`` namespace is now understood by
- xml.sax.saxutils.XMLGenerator as being bound to
- http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell.
-
-- Issue #5975: Add csv.unix_dialect class.
-
-- Issue #7761: telnetlib.interact failures on Windows fixed.
-
-- logging: Added style option to Formatter to allow %, {} or $-formatting.
-
-- Issue #5178: Added tempfile.TemporaryDirectory class that can be used as a
- context manager.
-
-- Issue #1349106: Generator (and BytesGenerator) flatten method and Header
- encode method now support a 'linesep' argument.
-
-- Issue #5639: Add a *server_hostname* argument to ``SSLContext.wrap_socket`` in
- order to support the TLS SNI extension. ``HTTPSConnection`` and ``urlopen()``
- also use this argument, so that HTTPS virtual hosts are now supported.
-
-- Issue #10166: Avoid recursion in pstats Stats.add() for many stats items.
-
-- Issue #10163: Skip unreadable registry keys during mimetypes initialization.
-
-- logging: Made StreamHandler terminator configurable.
-
-- logging: Allowed filters to be just callables.
-
-- logging: Added tests for _logRecordClass changes.
-
-- Issue #10092: Properly reset locale in calendar.Locale*Calendar classes.
-
-- logging: Added _logRecordClass, getLogRecordClass, setLogRecordClass to
- increase flexibility of LogRecord creation.
-
-- Issue #5117: Case normalization was needed on ntpath.relpath(). Also fixed
- root directory issue on posixpath.relpath(). (Ported working fixes from
- ntpath.)
-
-- Issue #1343: xml.sax.saxutils.XMLGenerator now has an option
- short_empty_elements to direct it to use self-closing tags when appropriate.
-
-- Issue #9807 (part 1): Expose the ABI flags in sys.abiflags. Add --abiflags
- switch to python-config for command line access.
-
-- Issue #6098: Don't claim DOM level 3 conformance in minidom.
-
-- Issue #5762: Fix AttributeError raised by ``xml.dom.minidom`` when an empty
- XML namespace attribute is encountered.
-
-- Issue #2830: Add the ``html.escape()`` function, which quotes all problematic
- characters by default. Deprecate ``cgi.escape()``.
-
-- Issue #9409: Fix the regex to match all kind of filenames, for interactive
- debugging in doctests.
-
-- Issue #9183: ``datetime.timezone(datetime.timedelta(0))`` will now return the
- same instance as ``datetime.timezone.utc``.
-
-- Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module, where
- supported by the system. Patch by Nikita Vetoshkin.
-
-- Issue #10063: file:// scheme will stop accessing remote hosts via ftp
- protocol. file:// urls had fallback to access remote hosts via ftp. This was
- not correct, change is made to raise a URLError when a remote host is tried to
- access via file:// scheme.
-
-- Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is
- created in modes 'a' or 'w' and then closed without adding any files. Raise
- BadZipfile (rather than IOError) when opening small non-ZIP files.
-
-- Issue #10041: The signature of optional arguments in socket.makefile() didn't
- match that of io.open(), and they also didn't get forwarded properly to
- TextIOWrapper in text mode. Patch by Kai Zhu.
-
-- Issue #9003: http.client.HTTPSConnection, urllib.request.HTTPSHandler and
- urllib.request.urlopen now take optional arguments to allow for server
- certificate checking, as recommended in public uses of HTTPS.
-
-- Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the
- current directory was deleted. Patch written by W. Trevor King.
-
-- Issue #3873: Speed up unpickling from file objects that have a peek() method.
-
-- Issue #10075: Add a session_stats() method to SSLContext objects.
-
-- Issue #9948: Fixed problem of losing filename case information.
-
-Extension Modules
------------------
-
-- Issue #5109: array.array constructor will now use fast code when
- initial data is provided in an array object with correct type.
-
-- Issue #6317: Now winsound.PlaySound only accepts unicode.
-
-- Issue #6317: Now winsound.PlaySound can accept non ascii filename.
-
-- Issue #9377: Use Unicode API for gethostname on Windows.
-
-- Issue #10143: Update "os.pathconf" values.
-
-- Issue #6518: Support context manager protcol for ossaudiodev types.
-
-- Issue #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY.
-
-- Issue #9054: Fix a crash occurring when using the pyexpat module with expat
- version 2.0.1.
-
-- Issue #5355: Provide mappings from Expat error numbers to string descriptions
- and backwards, in order to actually make it possible to analyze error codes
- provided by ExpatError.
-
-- The Unicode database was updated to 6.0.0.
-
-C-API
------
-
-- Issue #10288: The deprecated family of "char"-handling macros
- (ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc instead.
-
-- Issue #9778: Hash values are now always the size of pointers. A new Py_hash_t
- type has been introduced.
-
-Tools/Demos
------------
-
-- Issue #10117: Tools/scripts/reindent.py now accepts source files that use
- encoding other than ASCII or UTF-8. Source encoding is preserved when
- reindented code is written to a file.
++- Issue #8040: added a version switcher to the documentation. Patch by
++ Yury Selivanov.
+
-- Issue #7287: Demo/imputil/knee.py was removed.
+- Additional comments and some style changes in the concurrent.futures URL
+ retrieval example
-Tests
------
+- Issue #16115: Improve subprocess.Popen() documentation around args, shell,
+ and executable arguments.
-- Issue #3699: Fix test_bigaddrspace and extend it to test bytestrings as well
- as unicode strings. Initial patch by Sandro Tosi.
+- Issue #15533: Clarify docs and add tests for `subprocess.Popen()`'s cwd
+ argument.
-- Issue #10294: Remove dead code form test_unicode_file.
+- Issue #15979: Improve timeit documentation.
-- Issue #10123: Don't use non-ascii filenames in test_doctest tests. Add a new
- test specific to unicode (non-ascii name and filename).
+- Issue #16036: Improve documentation of built-in `int()`'s signature and
+ arguments.
-Build
------
+- Issue #15935: Clarification of `argparse` docs, re: add_argument() type and
+ default arguments. Patch contributed by Chris Jerdonek.
-- Issue #10268: Add a --enable-loadable-sqlite-extensions option to configure.
+- Issue #11964: Document a change in v3.2 to the behavior of the indent
+ parameter of json encoding operations.
-- Issue #8852: Allow the socket module to build on OpenSolaris.
+Tools/Demos
+-----------
-- Drop -OPT:Olimit compiler option.
+- Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka.
-- Issue #10094: Use versioned .so files on GNU/kfreeBSD and the GNU Hurd.
-- Accept Oracle Berkeley DB 5.0 and 5.1 as backend for the dbm extension.
+What's New in Python 3.3.0?
+===========================
-- Issue #7473: avoid link errors when building a framework with a different set
- of architectures than the one that is currently installed.
+*Release date: 29-Sep-2012*
+Core and Builtins
+-----------------
-What's New in Python 3.2 Alpha 3?
-=================================
+- Issue #16046: Fix loading sourceless legacy .pyo files.
-*Release date: 09-Oct-2010*
+- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
+ `__int__()` gives a non-integer. Patch by Serhiy Storchaka.
-Core and Builtins
+Extension Modules
-----------------
-- Issue #10068: Global objects which have reference cycles with their module's
- dict are now cleared again. This causes issue #7140 to appear again.
+- Issue #16012: Fix a regression in pyexpat. The parser's `UseForeignDTD()`
+ method doesn't require an argument again.
-- Issue #9738: Document PyErr_SetString() and PyErr_SetFromErrnoWithFilename()
- encodings.
-- ast.literal_eval() can now handle negative numbers. It is also a little more
- liberal in what it accepts without compromising the safety of the evaluation.
- For example, 3j+4 and 3+4+5 are both accepted.
+What's New in Python 3.3.0 Release Candidate 3?
+===============================================
-- Issue #10006: type.__abstractmethods__ now raises an AttributeError. As a
- result metaclasses can now be ABCs (see #9533).
+*Release date: 23-Sep-2012*
-- Issue #8670: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t.
+Core and Builtins
+-----------------
-- Issue #8670: PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replace
- UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE and
- 32 bits wchar_t (eg. Linux in narrow build).
+- Issue #15900: Fix reference leak in `PyUnicode_TranslateCharmap()`.
-- Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression
- introduced by issue #9324.
+- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
-- Issue #9979: Create function PyUnicode_AsWideCharString().
+- Issue #15895: Fix FILE pointer leak in one error branch of
+ `PyRun_SimpleFileExFlags()` when filename points to a pyc/pyo file, closeit is
+ false an and set_main_loader() fails.
-- Issue #7397: Mention that importlib.import_module() is probably what someone
- really wants to be using in __import__'s docstring.
+- Fixes for a few crash and memory leak regressions found by Coverity.
-- Issue #8521: Allow CreateKeyEx, OpenKeyEx, and DeleteKeyEx functions of winreg
- to use named arguments.
+Library
+-------
-- Issue #9930: Remove bogus subtype check that was causing (e.g.)
- float.__rdiv__(2.0, 3) to return NotImplemented instead of the expected 1.5.
+- Issue #15882: Change `_decimal` to accept any coefficient tuple when
+ constructing infinities. This is done for backwards compatibility with
+ decimal.py: Infinity coefficients are undefined in _decimal (in accordance
+ with the specification).
-- Issue #9808: Implement os.getlogin for Windows. Patch by Jon Anglin.
+- Issue #15925: Fix a regression in `email.util` where the `parsedate()` and
+ `parsedate_tz()` functions did not return None anymore when the argument could
+ not be parsed.
-- Issue #9901: Destroying the GIL in Py_Finalize() can fail if some other
- threads are still running. Instead, reinitialize the GIL on a second call to
- Py_Initialize().
+Extension Modules
+-----------------
-- All SyntaxErrors now have a column offset and therefore a caret when the error
- is printed.
+- Issue #15973: Fix a segmentation fault when comparing datetime timezone
+ objects.
-- Issue #9252: PyImport_Import no longer uses a fromlist hack to return the
- module that was imported, but instead gets the module from sys.modules.
+- Issue #15977: Fix memory leak in Modules/_ssl.c when the function
+ _set_npn_protocols() is called multiple times, thanks to Daniel Sommermann.
-- Issue #9213: The range type_items now provides index() and count() methods, to
- conform to the Sequence ABC. Patch by Daniel Urban and Daniel Stutzbach.
+- Issue #15969: `faulthandler` module: rename dump_tracebacks_later() to
+ dump_traceback_later() and cancel_dump_tracebacks_later() to
+ cancel_dump_traceback_later().
-- Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called
- with a non-empty format string. This is an effort to future-proof user
- code. If a derived class does not currently implement __format__ but later
- adds its own __format__, it would most likely break user code that had
- supplied a format string. This will be changed to a DeprecationWaring in
- Python 3.3 and it will be an error in Python 3.4.
+- _decimal module: use only C 89 style comments.
-- Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly
- re-created on a subsequent call to Py_Initialize(). The problem (a crash)
- wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
-- Issue #9210: Configure option --with-wctype-functions was removed. Using the
- functions from the libc caused the methods .upper() and lower() to become
- locale aware and created subtly wrong results.
+What's New in Python 3.3.0 Release Candidate 2?
+===============================================
-- Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on a
- non-ASCII byte in the format string.
+*Release date: 09-Sep-2012*
-- Issue #4617: Previously it was illegal to delete a name from the local
- namespace if it occurs as a free variable in a nested block. This limitation
- of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
+Core and Builtins
+-----------------
-- Issue #9804: ascii() now always represents unicode surrogate pairs as a single
- ``\UXXXXXXXX``, regardless of whether the character is printable or not.
- Also, the "backslashreplace" error handler now joins surrogate pairs into a
- single character on UCS-2 builds.
+- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
+ sporadic crashes in multi-thread programs when several long deallocator chains
+ ran concurrently and involved subclasses of built-in container types.
-- Issue #9757: memoryview objects get a release() method to release the
- underlying buffer (previously this was only done when deallocating the
- memoryview), and gain support for the context management protocol.
+- Issue #15784: Modify `OSError`.__str__() to better distinguish between errno
+ error numbers and Windows error numbers.
-- Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid
- thread-local storage key.
+- Issue #15781: Fix two small race conditions in import's module locking.
Library
-------