Commit 445d69c2 authored by R David Murray's avatar R David Murray

More additions to whatsnew.

parent 842ca5f1
...@@ -1325,6 +1325,11 @@ way it ought to: your application works with unicode strings, and the email ...@@ -1325,6 +1325,11 @@ way it ought to: your application works with unicode strings, and the email
package transparently encodes and decodes the unicode to and from the RFC package transparently encodes and decodes the unicode to and from the RFC
standard Content Transfer Encodings. standard Content Transfer Encodings.
Other API Changes
~~~~~~~~~~~~~~~~~
Added :class:`email.parser.BytesHeaderParser`.
ftplib ftplib
------ ------
...@@ -1371,6 +1376,16 @@ used by :class:`~html.parser.HTMLParser`. ...@@ -1371,6 +1376,16 @@ used by :class:`~html.parser.HTMLParser`.
(Contributed by Ezio Melotti in :issue:`11113` and :issue:`15156`) (Contributed by Ezio Melotti in :issue:`11113` and :issue:`15156`)
http
----
:class:`http.server.BaseHTTPRequestHandler` now buffers the headers and writes
them all at once when :meth:`~http.server.BaseHTTPRequestHandler.end_headers` is
called. A new method :meth:`~http.server.BaseHTTPRequestHandler.flush_headers`
can be used to directly manage when the accumlated headers are sent.
(Contributed by Andrew Schaaf in :issue:`3709`.)
html.parser html.parser
----------- -----------
...@@ -1385,6 +1400,7 @@ are also available on the latest bug fix releases of Python 2.7/3.2. ...@@ -1385,6 +1400,7 @@ are also available on the latest bug fix releases of Python 2.7/3.2.
:issue:`755670`, :issue:`13357`, :issue:`12629`, :issue:`1200313`, :issue:`755670`, :issue:`13357`, :issue:`12629`, :issue:`1200313`,
:issue:`670664`, :issue:`13273`, :issue:`12888`, :issue:`7311`) :issue:`670664`, :issue:`13273`, :issue:`12888`, :issue:`7311`)
imaplib imaplib
------- -------
...@@ -1427,6 +1443,20 @@ written on the :class:`~io.TextIOWrapper` object is immediately handled to its ...@@ -1427,6 +1443,20 @@ written on the :class:`~io.TextIOWrapper` object is immediately handled to its
underlying binary buffer. underlying binary buffer.
itertools
---------
:func:`~itertools.accumulate` now takes an optional ``func`` argument for
providing a user-supplied binary function.
logging
-------
:func:`~logging.basicConfig` now supports an optional ``handlers`` argument
taking an iterable of handlers to be added to the root logger.
math math
---- ----
...@@ -1775,6 +1805,15 @@ socket ...@@ -1775,6 +1805,15 @@ socket
(Contributed by Ross Lagerwall in :issue:`10866`.) (Contributed by Ross Lagerwall in :issue:`10866`.)
sqlite3
-------
New :class:`sqlite3.Connection` method
:meth:`~sqlite3.Connection.set_trace_callback` can be used to capture a trace of
all sql commands processed by sqlite. (Contributed by Torsten Landschoff
in :issue:`11688`.)
ssl ssl
--- ---
...@@ -1788,41 +1827,37 @@ ssl ...@@ -1788,41 +1827,37 @@ ssl
* The :mod:`ssl` module now exposes a finer-grained exception hierarchy * The :mod:`ssl` module now exposes a finer-grained exception hierarchy
in order to make it easier to inspect the various kinds of errors. in order to make it easier to inspect the various kinds of errors.
(Contributed by Antoine Pitrou in :issue:`11183`) (Contributed by Antoine Pitrou in :issue:`11183`)
* :meth:`~ssl.SSLContext.load_cert_chain` now accepts a *password* argument * :meth:`~ssl.SSLContext.load_cert_chain` now accepts a *password* argument
to be used if the private key is encrypted. to be used if the private key is encrypted.
(Contributed by Adam Simpkins in :issue:`12803`) (Contributed by Adam Simpkins in :issue:`12803`)
* Diffie-Hellman key exchange, both regular and Elliptic Curve-based, is * Diffie-Hellman key exchange, both regular and Elliptic Curve-based, is
now supported through the :meth:`~ssl.SSLContext.load_dh_params` and now supported through the :meth:`~ssl.SSLContext.load_dh_params` and
:meth:`~ssl.SSLContext.set_ecdh_curve` methods. :meth:`~ssl.SSLContext.set_ecdh_curve` methods.
(Contributed by Antoine Pitrou in :issue:`13626` and :issue:`13627`) (Contributed by Antoine Pitrou in :issue:`13626` and :issue:`13627`)
* SSL sockets have a new :meth:`~ssl.SSLSocket.get_channel_binding` method * SSL sockets have a new :meth:`~ssl.SSLSocket.get_channel_binding` method
allowing the implementation of certain authentication mechanisms such as allowing the implementation of certain authentication mechanisms such as
SCRAM-SHA-1-PLUS. SCRAM-SHA-1-PLUS. (Contributed by Jacek Konieczny in :issue:`12551`)
(Contributed by Jacek Konieczny in :issue:`12551`)
* You can query the SSL compression algorithm used by an SSL socket, thanks * You can query the SSL compression algorithm used by an SSL socket, thanks
to its new :meth:`~ssl.SSLSocket.compression` method. to its new :meth:`~ssl.SSLSocket.compression` method.
(Contributed by Antoine Pitrou in :issue:`13634`) (Contributed by Antoine Pitrou in :issue:`13634`)
* Support has been added for the Next Procotol Negotiation extension using * Support has been added for the Next Procotol Negotiation extension using
the :meth:`ssl.SSLContext.set_npn_protocols` method. the :meth:`ssl.SSLContext.set_npn_protocols` method.
(Contributed by Colin Marc in :issue:`14204`) (Contributed by Colin Marc in :issue:`14204`)
* SSL errors can now be introspected more easily thanks to * SSL errors can now be introspected more easily thanks to
:attr:`~ssl.SSLError.library` and :attr:`~ssl.SSLError.reason` attributes. :attr:`~ssl.SSLError.library` and :attr:`~ssl.SSLError.reason` attributes.
(Contributed by Antoine Pitrou in :issue:`14837`) (Contributed by Antoine Pitrou in :issue:`14837`)
* The :func:`~ssl.get_server_certificate` function now supports IPv6.
(Contributed by Charles-François Natali in :issue:`11811`.)
stat stat
---- ----
...@@ -1837,7 +1872,7 @@ subprocess ...@@ -1837,7 +1872,7 @@ subprocess
---------- ----------
Command strings can now be bytes objects on posix platforms. (Contributed by Command strings can now be bytes objects on posix platforms. (Contributed by
Victor Stiner in :issue:`8513`.) Victor Stinner in :issue:`8513`.)
A new constant :data:`~subprocess.DEVNULL` allows suppressing output in a A new constant :data:`~subprocess.DEVNULL` allows suppressing output in a
platform-independent fashion. (Contributed by Ross Lagerwall in platform-independent fashion. (Contributed by Ross Lagerwall in
...@@ -1848,18 +1883,15 @@ sys ...@@ -1848,18 +1883,15 @@ sys
--- ---
The :mod:`sys` module has a new :data:`~sys.thread_info` :term:`struct The :mod:`sys` module has a new :data:`~sys.thread_info` :term:`struct
sequence` holding informations about the thread implementation. sequence` holding informations about the thread implementation
(:issue:`11223`).
(:issue:`11223`)
textwrap textwrap
-------- --------
The :mod:`textwrap` module has a new :func:`~textwrap.indent` that makes The :mod:`textwrap` module has a new :func:`~textwrap.indent` that makes
it straightforward to add a common prefix to selected lines in a block it straightforward to add a common prefix to selected lines in a block
of text. of text (:issue:`13857`).
(:issue:`13857`)
threading threading
...@@ -2222,6 +2254,14 @@ Porting Python code ...@@ -2222,6 +2254,14 @@ Porting Python code
:exc:`poplib.error_proto` errors may need to be changed if errors on ``quit`` :exc:`poplib.error_proto` errors may need to be changed if errors on ``quit``
are encountered by a particular application (:issue:`11291`). are encountered by a particular application (:issue:`11291`).
* The ``strict`` argument to :class:`email.parser.Parser`, deprecated since
Python 2.4, has finally been removed.
* The deprecated method ``unittest.TestCase.assertSameElements`` has been
removed.
* The deprecated variable ``time.accept2dyear`` has been removed.
Porting C code Porting C code
-------------- --------------
......
...@@ -3386,9 +3386,9 @@ Library ...@@ -3386,9 +3386,9 @@ Library
- Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError, - Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError,
instead of a RuntimeError: OSError has an errno attribute. instead of a RuntimeError: OSError has an errno attribute.
- Issue #3709: a flush_headers method to BaseHTTPRequestHandler which manages - Issue #3709: add a flush_headers method to BaseHTTPRequestHandler, which
the sending of headers to output stream and flushing the internal headers manages the sending of headers to output stream and flushing the internal
buffer. Patch contribution by Andrew Schaaf headers buffer. Patch contribution by Andrew Schaaf
- Issue #11743: Rewrite multiprocessing connection classes in pure Python. - Issue #11743: Rewrite multiprocessing connection classes in pure Python.
...@@ -4982,7 +4982,7 @@ Library ...@@ -4982,7 +4982,7 @@ Library
- Issue #3709: BaseHTTPRequestHandler will buffer the headers and write to - Issue #3709: BaseHTTPRequestHandler will buffer the headers and write to
output stream only when end_headers is invoked. This is a speedup and an output stream only when end_headers is invoked. This is a speedup and an
internal optimization. Patch by endian. internal optimization. Patch by Andrew Shaaf.
- Issue #10220: Added inspect.getgeneratorstate. Initial patch by Rodolpho - Issue #10220: Added inspect.getgeneratorstate. Initial patch by Rodolpho
Eckhardt. Eckhardt.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment