@@ -1366,6 +1366,16 @@ ftplib
13661366 listing format and deprecates :meth: `ftplib.FTP.nlst ` and
13671367 :meth: `ftplib.FTP.dir `. (Contributed by Giampaolo Rodolà in :issue: `11072 `)
13681368
1369+
1370+ functools
1371+ ---------
1372+
1373+ The :func: `functools.lru_cache ` decorator now accepts a ``typed `` keyword
1374+ argument (that defaults to ``False `` to ensure that it caches values of
1375+ different types that compare equal in separate cache slots. (Contributed
1376+ by Raymond Hettinger in :issue: `13227 `.)
1377+
1378+
13691379gc
13701380--
13711381
@@ -1376,21 +1386,9 @@ before and after collection using the new :data:`~gc.callbacks` list.
13761386hmac
13771387----
13781388
1379- A new :func: `~hmac.compare_digest ` function has been added to prevent
1380- side channel attacks on digests through timing analysis.
1381-
1382- (Contributed by Nick Coghlan and Christian Heimes in issue:`15061 `)
1383-
1384-
1385- html.entities
1386- -------------
1387-
1388- A new :data: `~html.entities.html5 ` dictionary that maps HTML5 named character
1389- references to the equivalent Unicode character(s) (e.g. ``html5['gt;'] == '>' ``)
1390- has been added to the :mod: `html.entities ` module. The dictionary is now also
1391- used by :class: `~html.parser.HTMLParser `.
1392-
1393- (Contributed by Ezio Melotti in :issue: `11113 ` and :issue: `15156 `)
1389+ A new :func: `~hmac.compare_digest ` function has been added to prevent side
1390+ channel attacks on digests through timing analysis. (Contributed by Nick
1391+ Coghlan and Christian Heimes in :issue: `15061 `)
13941392
13951393
13961394http
@@ -1402,21 +1400,29 @@ called. A new method :meth:`~http.server.BaseHTTPRequestHandler.flush_headers`
14021400can be used to directly manage when the accumlated headers are sent.
14031401(Contributed by Andrew Schaaf in :issue: `3709 `.)
14041402
1403+ :class: `http.server ` now produces valid ``HTML 4.01 strict `` output.
1404+ (Contributed by Ezio Melotti in :issue: `13295 `.)
14051405
1406- html.parser
1407- -----------
14081406
1409- :class: `~html.parser.HTMLParser ` is now able to parse broken markup without
1407+ html
1408+ ----
1409+
1410+ :class: `html.parser.HTMLParser ` is now able to parse broken markup without
14101411raising errors, therefore the *strict * argument of the constructor and the
14111412:exc: `~html.parser.HTMLParseError ` exception are now deprecated.
14121413The ability to parse broken markup is the result of a number of bug fixes that
14131414are also available on the latest bug fix releases of Python 2.7/3.2.
1414-
14151415(Contributed by Ezio Melotti in :issue: `15114 `, and :issue: `14538 `,
14161416:issue: `13993 `, :issue: `13960 `, :issue: `13358 `, :issue: `1745761 `,
14171417:issue: `755670 `, :issue: `13357 `, :issue: `12629 `, :issue: `1200313 `,
14181418:issue: `670664 `, :issue: `13273 `, :issue: `12888 `, :issue: `7311 `)
14191419
1420+ A new :data: `~html.entities.html5 ` dictionary that maps HTML5 named character
1421+ references to the equivalent Unicode character(s) (e.g. ``html5['gt;'] ==
1422+ '>' ``) has been added to the :mod: `html.entities ` module. The dictionary is
1423+ now also used by :class: `~html.parser.HTMLParser `. (Contributed by Ezio
1424+ Melotti in :issue: `11113 ` and :issue: `15156 `)
1425+
14201426
14211427imaplib
14221428-------
@@ -1655,6 +1661,14 @@ os
16551661* Some platforms now support additional constants for the :func: `~os.lseek `
16561662 function, such as ``os.SEEK_HOLE `` and ``os.SEEK_DATA ``.
16571663
1664+ * New constants :data: `~os.RTLD_LAZY `, :data: `~os.RTLD_NOW `,
1665+ :data: `~os.RTLD_GLOBAL `, :data: `~os.RTLD_LOCAL `, :data: `~os.RTLD_NODELETE `,
1666+ :data: `~os.RTLD_NOLOAD `, and :data: `~os.RTLD_DEEPBIND ` are available on
1667+ platforms that support them. These are for use with the
1668+ :func: `sys.setdlopenflags ` function, and supersede the similar constants
1669+ defined in :mod: `ctypes ` and :mod: `DLFCN `. (Contributed by Victor Stinner
1670+ in :issue: `13226 `.)
1671+
16581672* :func: `os.symlink ` now accepts (and ignores) the ``target_is_directory ``
16591673 keyword argument on non-Windows platforms, to ease cross-platform support.
16601674
@@ -1727,6 +1741,7 @@ select
17271741
17281742Solaris and derivatives platforms have a new class :class: `select.devpoll `
17291743for high performance asynchronous sockets via :file: `/dev/poll `.
1744+ (Contributed by Jesús Cea Avión in :issue: `6397 `.)
17301745
17311746
17321747shlex
@@ -1922,6 +1937,14 @@ the form '-rwxrwxrwx'.
19221937(Contributed by Giampaolo Rodolà in :issue: `14807 `)
19231938
19241939
1940+ struct
1941+ ------
1942+
1943+ The :mod: `struct ` module now supports ``ssize_t `` and ``size_t `` via the
1944+ new codes ``n `` and ``N ``, respectively. (Contributed by Antoine Pitrou
1945+ in :issue: `3163 `.)
1946+
1947+
19251948subprocess
19261949----------
19271950
@@ -1940,6 +1963,7 @@ The :mod:`sys` module has a new :data:`~sys.thread_info` :term:`struct
19401963sequence ` holding informations about the thread implementation
19411964(:issue: `11223 `).
19421965
1966+
19431967textwrap
19441968--------
19451969
@@ -2014,6 +2038,7 @@ context managers. (Contributed by Ezio Melotti and Winston Ewert in
20142038:meth: `unittest.TestCase.run ` now returns the :class: `~unittest.TestResult `
20152039object.
20162040
2041+
20172042urllib
20182043------
20192044
@@ -2050,6 +2075,18 @@ The module's documentation has also been greatly improved with added examples
20502075and a more detailed reference.
20512076
20522077
2078+ zlib
2079+ ----
2080+
2081+ New attribute :attr: `zlib.Decompress.eof ` makes it possible to distinguish
2082+ between a properly-formed compressed stream and an incomplete or truncated one.
2083+ (Contributed by Nadeem Vawda in :issue: `12646 `.)
2084+
2085+ New attribute :attr: `zlib.ZLIB_RUNTIME_VERSION ` reports the version string of
2086+ the underlying ``zlib `` library that is loaded at runtime. (Contributed by
2087+ Torsten Landschoff in :issue: `12306 `.)
2088+
2089+
20532090Optimizations
20542091=============
20552092
@@ -2332,6 +2369,10 @@ Porting Python code
23322369
23332370* The deprecated variable ``time.accept2dyear `` has been removed.
23342371
2372+ * The deprecated ``Context._clamp `` attribute has been removed from the
2373+ :mod: `decimal ` module. It was previously replaced by the public attribute
2374+ :attr: `~decimal.Context.clamp `. (See :issue: `8540 `.)
2375+
23352376* The undocumented internal helper class ``SSLFakeFile `` has been removed
23362377 from :mod: `smtplib `, since its functionality has long been provided directly
23372378 by :meth: `socket.socket.makefile `.
0 commit comments