| 1 |
+++++++++++ |
| 2 |
Python News |
| 3 |
+++++++++++ |
| 4 |
|
| 5 |
What's New in Python 3.13.12 final? |
| 6 |
=================================== |
| 7 |
|
| 8 |
*Release date: 2026-02-03* |
| 9 |
|
| 10 |
Windows |
| 11 |
------- |
| 12 |
|
| 13 |
- gh-128067: Fix a bug in PyREPL on Windows where output without a trailing |
| 14 |
newline was overwritten by the next prompt. |
| 15 |
|
| 16 |
Tools/Demos |
| 17 |
----------- |
| 18 |
|
| 19 |
- gh-142095: Make gdb 'py-bt' command use frame from thread local state when |
| 20 |
available. Patch by Sam Gross and Victor Stinner. |
| 21 |
|
| 22 |
Tests |
| 23 |
----- |
| 24 |
|
| 25 |
- gh-144415: The Android testbed now distinguishes between stdout/stderr |
| 26 |
messages which were triggered by a newline, and those triggered by a |
| 27 |
manual call to ``flush``. This fixes logging of progress indicators and |
| 28 |
similar content. |
| 29 |
|
| 30 |
- gh-65784: Add support for parametrized resource ``wantobjects`` in |
| 31 |
regrtests, which allows to run Tkinter tests with the specified value of |
| 32 |
:data:`!tkinter.wantobjects`, for example ``-u wantobjects=0``. |
| 33 |
|
| 34 |
- gh-143553: Add support for parametrized resources, such as ``-u |
| 35 |
xpickle=2.7``. |
| 36 |
|
| 37 |
- gh-142836: Accommodated Solaris in |
| 38 |
``test_pdb.test_script_target_anonymous_pipe``. |
| 39 |
|
| 40 |
- gh-129401: Fix a flaky test in ``test_repr_rlock`` that checks the |
| 41 |
representation of :class:`multiprocessing.RLock`. |
| 42 |
|
| 43 |
- bpo-31391: Forward-port test_xpickle from Python 2 to Python 3 and add the |
| 44 |
resource back to test's command line. |
| 45 |
|
| 46 |
Security |
| 47 |
-------- |
| 48 |
|
| 49 |
- gh-144125: :mod:`~email.generator.BytesGenerator` will now refuse to |
| 50 |
serialize (write) headers that are unsafely folded or delimited; see |
| 51 |
:attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas |
| 52 |
Bloemsaat and Petr Viktorin in :gh:`121650`). |
| 53 |
|
| 54 |
- gh-143935: Fixed a bug in the folding of comments when flattening an email |
| 55 |
message using a modern email policy. Comments consisting of a very long |
| 56 |
sequence of non-foldable characters could trigger a forced line wrap that |
| 57 |
omitted the required leading space on the continuation line, causing the |
| 58 |
remainder of the comment to be interpreted as a new header field. This |
| 59 |
enabled header injection with carefully crafted inputs. |
| 60 |
|
| 61 |
- gh-143925: Reject control characters in ``data:`` URL media types. |
| 62 |
|
| 63 |
- gh-143919: Reject control characters in :class:`http.cookies.Morsel` |
| 64 |
fields and values. |
| 65 |
|
| 66 |
- gh-143916: Reject C0 control characters within wsgiref.headers.Headers |
| 67 |
fields, values, and parameters. |
| 68 |
|
| 69 |
Library |
| 70 |
------- |
| 71 |
|
| 72 |
- gh-144380: Improve performance of :class:`io.BufferedReader` line |
| 73 |
iteration by ~49%. |
| 74 |
|
| 75 |
- gh-144169: Fix three crashes when non-string keyword arguments are |
| 76 |
supplied to objects in the :mod:`ast` module. |
| 77 |
|
| 78 |
- gh-144100: Fixed a crash in ctypes when using a deprecated |
| 79 |
``POINTER(str)`` type in ``argtypes``. Instead of aborting, ctypes now |
| 80 |
raises a proper Python exception when the pointer target type is |
| 81 |
unresolved. |
| 82 |
|
| 83 |
- gh-144050: Fix :func:`stat.filemode` in the pure-Python implementation to |
| 84 |
avoid misclassifying invalid mode values as block devices. |
| 85 |
|
| 86 |
- gh-144023: Fixed validation of file descriptor 0 in posix functions when |
| 87 |
used with follow_symlinks parameter. |
| 88 |
|
| 89 |
- gh-143999: Fix an issue where :func:`inspect.getgeneratorstate` and |
| 90 |
:func:`inspect.getcoroutinestate` could fail for generators wrapped by |
| 91 |
:func:`types.coroutine` in the suspended state. |
| 92 |
|
| 93 |
- gh-143706: Fix :mod:`multiprocessing` forkserver so that :data:`sys.argv` |
| 94 |
is correctly set before ``__main__`` is preloaded. Previously, |
| 95 |
:data:`sys.argv` was empty during main module import in forkserver child |
| 96 |
processes. This fixes a regression introduced in 3.13.8 and 3.14.1. Root |
| 97 |
caused by Aaron Wieczorek, test provided by Thomas Watson, thanks! |
| 98 |
|
| 99 |
- gh-143638: Forbid reentrant calls of the :class:`pickle.Pickler` and |
| 100 |
:class:`pickle.Unpickler` methods for the C implementation. Previously, |
| 101 |
this could cause crash or data corruption, now concurrent calls of methods |
| 102 |
of the same object raise :exc:`RuntimeError`. |
| 103 |
|
| 104 |
- gh-78724: Raise :exc:`RuntimeError`'s when user attempts to call methods |
| 105 |
on half-initialized :class:`~struct.Struct` objects, For example, created |
| 106 |
by ``Struct.__new__(Struct)``. Patch by Sergey B Kirpichev. |
| 107 |
|
| 108 |
- gh-143602: Fix a inconsistency issue in :meth:`~io.RawIOBase.write` that |
| 109 |
leads to unexpected buffer overwrite by deduplicating the buffer exports. |
| 110 |
|
| 111 |
- gh-143547: Fix :func:`sys.unraisablehook` when the hook raises an |
| 112 |
exception and changes :func:`sys.unraisablehook`: hold a strong reference |
| 113 |
to the old hook. Patch by Victor Stinner. |
| 114 |
|
| 115 |
- gh-143378: Fix use-after-free crashes when a :class:`~io.BytesIO` object |
| 116 |
is concurrently mutated during :meth:`~io.RawIOBase.write` or |
| 117 |
:meth:`~io.IOBase.writelines`. |
| 118 |
|
| 119 |
- gh-143346: Fix incorrect wrapping of the Base64 data in |
| 120 |
:class:`!plistlib._PlistWriter` when the indent contains a mix of tabs and |
| 121 |
spaces. |
| 122 |
|
| 123 |
- gh-143310: :mod:`tkinter`: fix a crash when a Python :class:`list` is |
| 124 |
mutated during the conversion to a Tcl object (e.g., when setting a Tcl |
| 125 |
variable). Patch by Bénédikt Tran. |
| 126 |
|
| 127 |
- gh-143309: Fix a crash in :func:`os.execve` on non-Windows platforms when |
| 128 |
given a custom environment mapping which is then mutated during parsing. |
| 129 |
Patch by Bénédikt Tran. |
| 130 |
|
| 131 |
- gh-143308: :mod:`pickle`: fix use-after-free crashes when a |
| 132 |
:class:`~pickle.PickleBuffer` is concurrently mutated by a custom buffer |
| 133 |
callback during pickling. Patch by Bénédikt Tran and Aaron Wieczorek. |
| 134 |
|
| 135 |
- gh-143237: Fix support of named pipes in the rotating :mod:`logging` |
| 136 |
handlers. |
| 137 |
|
| 138 |
- gh-143249: Fix possible buffer leaks in Windows overlapped I/O on error |
| 139 |
handling. |
| 140 |
|
| 141 |
- gh-143241: :mod:`zoneinfo`: fix infinite loop in :meth:`ZoneInfo.from_file |
| 142 |
<zoneinfo.ZoneInfo.from_file>` when parsing a malformed TZif file. Patch |
| 143 |
by Fatih Celik. |
| 144 |
|
| 145 |
- gh-142830: :mod:`sqlite3`: fix use-after-free crashes when the |
| 146 |
connection's callbacks are mutated during a callback execution. Patch by |
| 147 |
Bénédikt Tran. |
| 148 |
|
| 149 |
- gh-143200: :mod:`xml.etree.ElementTree`: fix use-after-free crashes in |
| 150 |
:meth:`~object.__getitem__` and :meth:`~object.__setitem__` methods of |
| 151 |
:class:`~xml.etree.ElementTree.Element` when the element is concurrently |
| 152 |
mutated. Patch by Bénédikt Tran. |
| 153 |
|
| 154 |
- gh-142195: Updated timeout evaluation logic in :mod:`subprocess` to be |
| 155 |
compatible with deterministic environments like Shadow where time moves |
| 156 |
exactly as requested. |
| 157 |
|
| 158 |
- gh-143145: Fixed a possible reference leak in ctypes when constructing |
| 159 |
results with multiple output parameters on error. |
| 160 |
|
| 161 |
- gh-122431: Corrected the error message in |
| 162 |
:func:`readline.append_history_file` to state that ``nelements`` must be |
| 163 |
non-negative instead of positive. |
| 164 |
|
| 165 |
- gh-143004: Fix a potential use-after-free in |
| 166 |
:meth:`collections.Counter.update` when user code mutates the Counter |
| 167 |
during an update. |
| 168 |
|
| 169 |
- gh-143046: The :mod:`asyncio` REPL no longer prints copyright and version |
| 170 |
messages in the quiet mode (:option:`-q`). Patch by Bartosz Sławecki. |
| 171 |
|
| 172 |
- gh-140648: The :mod:`asyncio` REPL now respects the :option:`-I` flag |
| 173 |
(isolated mode). Previously, it would load and execute |
| 174 |
:envvar:`PYTHONSTARTUP` even if the flag was set. Contributed by Bartosz |
| 175 |
Sławecki. |
| 176 |
|
| 177 |
- gh-142991: Fixed socket operations such as recvfrom() and sendto() for |
| 178 |
FreeBSD divert(4) socket. |
| 179 |
|
| 180 |
- gh-143010: Fixed a bug in :mod:`mailbox` where the precise timing of an |
| 181 |
external event could result in the library opening an existing file |
| 182 |
instead of a file it expected to create. |
| 183 |
|
| 184 |
- gh-142881: Fix concurrent and reentrant call of :func:`atexit.unregister`. |
| 185 |
|
| 186 |
- gh-112127: Fix possible use-after-free in :func:`atexit.unregister` when |
| 187 |
the callback is unregistered during comparison. |
| 188 |
|
| 189 |
- gh-142783: Fix zoneinfo use-after-free with descriptor _weak_cache. a |
| 190 |
descriptor as _weak_cache could cause crashes during object creation. The |
| 191 |
fix ensures proper reference counting for descriptor-provided objects. |
| 192 |
|
| 193 |
- gh-142754: Add the *ownerDocument* attribute to :mod:`xml.dom.minidom` |
| 194 |
elements and attributes created by directly instantiating the ``Element`` |
| 195 |
or ``Attr`` class. Note that this way of creating nodes is not supported; |
| 196 |
creator functions like :py:meth:`xml.dom.Document.documentElement` should |
| 197 |
be used instead. |
| 198 |
|
| 199 |
- gh-142784: The :mod:`asyncio` REPL now properly closes the loop upon the |
| 200 |
end of interactive session. Previously, it could cause surprising |
| 201 |
warnings. Contributed by Bartosz Sławecki. |
| 202 |
|
| 203 |
- gh-142555: :mod:`array`: fix a crash in ``a[i] = v`` when converting *i* |
| 204 |
to an index via :meth:`i.__index__ <object.__index__>` or |
| 205 |
:meth:`i.__float__ <object.__float__>` mutates the array. |
| 206 |
|
| 207 |
- gh-142594: Fix crash in ``TextIOWrapper.close()`` when the underlying |
| 208 |
buffer's ``closed`` property calls :meth:`~io.TextIOBase.detach`. |
| 209 |
|
| 210 |
- gh-142451: :mod:`hmac`: Ensure that the :attr:`HMAC.block_size |
| 211 |
<hmac.HMAC.block_size>` attribute is correctly copied by :meth:`HMAC.copy |
| 212 |
<hmac.HMAC.copy>`. Patch by Bénédikt Tran. |
| 213 |
|
| 214 |
- gh-142495: :class:`collections.defaultdict` now prioritizes |
| 215 |
:meth:`~object.__setitem__` when inserting default values from |
| 216 |
``default_factory``. This prevents race conditions where a default value |
| 217 |
would overwrite a value set before ``default_factory`` returns. |
| 218 |
|
| 219 |
- gh-142651: :mod:`unittest.mock`: fix a thread safety issue where |
| 220 |
:attr:`Mock.call_count <unittest.mock.Mock.call_count>` may return |
| 221 |
inaccurate values when the mock is called concurrently from multiple |
| 222 |
threads. |
| 223 |
|
| 224 |
- gh-142595: Added type check during initialization of the :mod:`decimal` |
| 225 |
module to prevent a crash in case of broken stdlib. Patch by Sergey B |
| 226 |
Kirpichev. |
| 227 |
|
| 228 |
- gh-142517: The non-``compat32`` :mod:`email` policies now correctly handle |
| 229 |
refolding encoded words that contain bytes that can not be decoded in |
| 230 |
their specified character set. Previously this resulted in an encoding |
| 231 |
exception during folding. |
| 232 |
|
| 233 |
- gh-112527: The help text for required options in :mod:`argparse` no longer |
| 234 |
extended with " (default: None)". |
| 235 |
|
| 236 |
- gh-142315: Pdb can now run scripts from anonymous pipes used in process |
| 237 |
substitution. Patch by Bartosz Sławecki. |
| 238 |
|
| 239 |
- gh-142282: Fix :func:`winreg.QueryValueEx` to not accidentally read |
| 240 |
garbage buffer under race condition. |
| 241 |
|
| 242 |
- gh-75949: Fix :mod:`argparse` to preserve ``|`` separators in mutually |
| 243 |
exclusive groups when the usage line wraps due to length. |
| 244 |
|
| 245 |
- gh-68552: ``MisplacedEnvelopeHeaderDefect`` and ``Missing header name`` |
| 246 |
defects are now correctly passed to the ``handle_defect`` method of |
| 247 |
``policy`` in :class:`~email.parser.FeedParser`. |
| 248 |
|
| 249 |
- gh-142006: Fix a bug in the :mod:`email.policy.default` folding algorithm |
| 250 |
which incorrectly resulted in a doubled newline when a line ending at |
| 251 |
exactly max_line_length was followed by an unfoldable token. |
| 252 |
|
| 253 |
- gh-105836: Fix :meth:`asyncio.run_coroutine_threadsafe` leaving underlying |
| 254 |
cancelled asyncio task running. |
| 255 |
|
| 256 |
- gh-139971: :mod:`pydoc`: Ensure that the link to the online documentation |
| 257 |
of a :term:`stdlib` module is correct. |
| 258 |
|
| 259 |
- gh-139262: Some keystrokes can be swallowed in the new ``PyREPL`` on |
| 260 |
Windows, especially when used together with the ALT key. Fix by Chris |
| 261 |
Eibl. |
| 262 |
|
| 263 |
- gh-138897: Improved :data:`license`/:data:`copyright`/:data:`credits` |
| 264 |
display in the :term:`REPL`: now uses a pager. |
| 265 |
|
| 266 |
- gh-79986: Add parsing for ``References`` and ``In-Reply-To`` headers to |
| 267 |
the :mod:`email` library that parses the header content as lists of |
| 268 |
message id tokens. This prevents them from being folded incorrectly. |
| 269 |
|
| 270 |
- gh-109263: Starting a process from spawn context in :mod:`multiprocessing` |
| 271 |
no longer sets the start method globally. |
| 272 |
|
| 273 |
- gh-90871: Fixed an off by one error concerning the backlog parameter in |
| 274 |
:meth:`~asyncio.loop.create_unix_server`. Contributed by Christian |
| 275 |
Harries. |
| 276 |
|
| 277 |
- gh-133253: Fix thread-safety issues in :mod:`linecache`. |
| 278 |
|
| 279 |
- gh-132715: Skip writing objects during marshalling once a failure has |
| 280 |
occurred. |
| 281 |
|
| 282 |
- gh-127529: Correct behavior of |
| 283 |
:func:`!asyncio.selector_events.BaseSelectorEventLoop._accept_connection` |
| 284 |
in handling :exc:`ConnectionAbortedError` in a loop. This improves |
| 285 |
performance on OpenBSD. |
| 286 |
|
| 287 |
IDLE |
| 288 |
---- |
| 289 |
|
| 290 |
- gh-143774: Better explain the operation of Format / Format Paragraph. |
| 291 |
|
| 292 |
Documentation |
| 293 |
------------- |
| 294 |
|
| 295 |
- gh-140806: Add documentation for :func:`enum.bin`. |
| 296 |
|
| 297 |
Core and Builtins |
| 298 |
----------------- |
| 299 |
|
| 300 |
- gh-144307: Prevent a reference leak in module teardown at interpreter |
| 301 |
finalization. |
| 302 |
|
| 303 |
- gh-144194: Fix error handling in perf jitdump initialization on memory |
| 304 |
allocation failure. |
| 305 |
|
| 306 |
- gh-141805: Fix crash in :class:`set` when objects with the same hash are |
| 307 |
concurrently added to the set after removing an element with the same hash |
| 308 |
while the set still contains elements with the same hash. |
| 309 |
|
| 310 |
- gh-143670: Fixes a crash in ``ga_repr_items_list`` function. |
| 311 |
|
| 312 |
- gh-143377: Fix a crash in :func:`!_interpreters.capture_exception` when |
| 313 |
the exception is incorrectly formatted. Patch by Bénédikt Tran. |
| 314 |
|
| 315 |
- gh-143189: Fix crash when inserting a non-:class:`str` key into a split |
| 316 |
table dictionary when the key matches an existing key in the split table |
| 317 |
but has no corresponding value in the dict. |
| 318 |
|
| 319 |
- gh-143228: Fix use-after-free in perf trampoline when toggling profiling |
| 320 |
while threads are running or during interpreter finalization with daemon |
| 321 |
threads active. The fix uses reference counting to ensure trampolines are |
| 322 |
not freed while any code object could still reference them. Pach by Pablo |
| 323 |
Galindo |
| 324 |
|
| 325 |
- gh-142664: Fix a use-after-free crash in :meth:`memoryview.__hash__ |
| 326 |
<object.__hash__>` when the ``__hash__`` method of the referenced object |
| 327 |
mutates that object or the view. Patch by Bénédikt Tran. |
| 328 |
|
| 329 |
- gh-142557: Fix a use-after-free crash in :ref:`bytearray.__mod__ |
| 330 |
<bytes-formatting>` when the :class:`!bytearray` is mutated while |
| 331 |
formatting the ``%``-style arguments. Patch by Bénédikt Tran. |
| 332 |
|
| 333 |
- gh-143195: Fix use-after-free crashes in :meth:`bytearray.hex` and |
| 334 |
:meth:`memoryview.hex` when the separator's :meth:`~object.__len__` |
| 335 |
mutates the original object. Patch by Bénédikt Tran. |
| 336 |
|
| 337 |
- gh-143135: Set :data:`sys.flags.inspect` to ``1`` when |
| 338 |
:envvar:`PYTHONINSPECT` is ``0``. Previously, it was set to ``0`` in this |
| 339 |
case. |
| 340 |
|
| 341 |
- gh-143003: Fix an overflow of the shared empty buffer in |
| 342 |
:meth:`bytearray.extend` when ``__length_hint__()`` returns 0 for |
| 343 |
non-empty iterator. |
| 344 |
|
| 345 |
- gh-143006: Fix a possible assertion error when comparing negative |
| 346 |
non-integer ``float`` and ``int`` with the same number of bits in the |
| 347 |
integer part. |
| 348 |
|
| 349 |
- gh-142776: Fix a file descriptor leak in import.c |
| 350 |
|
| 351 |
- gh-142829: Fix a use-after-free crash in :class:`contextvars.Context` |
| 352 |
comparison when a custom ``__eq__`` method modifies the context via |
| 353 |
:meth:`~contextvars.ContextVar.set`. |
| 354 |
|
| 355 |
- gh-142766: Clear the frame of a generator when :meth:`generator.close` is |
| 356 |
called. |
| 357 |
|
| 358 |
- gh-142737: Tracebacks will be displayed in fallback mode even if |
| 359 |
:func:`io.open` is lost. Previously, this would crash the interpreter. |
| 360 |
Patch by Bartosz Sławecki. |
| 361 |
|
| 362 |
- gh-142554: Fix a crash in :func:`divmod` when :func:`!_pylong.int_divmod` |
| 363 |
does not return a tuple of length two exactly. Patch by Bénédikt Tran. |
| 364 |
|
| 365 |
- gh-142560: Fix use-after-free in :class:`bytearray` search-like methods |
| 366 |
(:meth:`~bytearray.find`, :meth:`~bytearray.count`, |
| 367 |
:meth:`~bytearray.index`, :meth:`~bytearray.rindex`, and |
| 368 |
:meth:`~bytearray.rfind`) by marking the storage as exported which causes |
| 369 |
reallocation attempts to raise :exc:`BufferError`. For |
| 370 |
:func:`~operator.contains`, :meth:`~bytearray.split`, and |
| 371 |
:meth:`~bytearray.rsplit` the :ref:`buffer protocol <bufferobjects>` is |
| 372 |
used for this. |
| 373 |
|
| 374 |
- gh-142343: Fix SIGILL crash on m68k due to incorrect assembly constraint. |
| 375 |
|
| 376 |
- gh-141732: Ensure the :meth:`~object.__repr__` for :exc:`ExceptionGroup` |
| 377 |
and :exc:`BaseExceptionGroup` does not change when the exception sequence |
| 378 |
that was original passed in to its constructor is subsequently mutated. |
| 379 |
|
| 380 |
- gh-100964: Fix reference cycle in exhausted generator frames. Patch by |
| 381 |
Savannah Ostrowski. |
| 382 |
|
| 383 |
- gh-140373: Correctly emit ``PY_UNWIND`` event when generator object is |
| 384 |
closed. Patch by Mikhail Efimov. |
| 385 |
|
| 386 |
- gh-138568: Adjusted the built-in :func:`help` function so that empty |
| 387 |
inputs are ignored in interactive mode. |
| 388 |
|
| 389 |
- gh-127773: Do not use the type attribute cache for types with incompatible |
| 390 |
:term:`MRO`. |
| 391 |
|
| 392 |
C API |
| 393 |
----- |
| 394 |
|
| 395 |
- gh-142571: :c:func:`!PyUnstable_CopyPerfMapFile` now checks that opening |
| 396 |
the file succeeded before flushing. |
| 397 |
|
| 398 |
Build |
| 399 |
----- |
| 400 |
|
| 401 |
- gh-142454: When calculating the digest of the JIT stencils input, sort the |
| 402 |
hashed files by filenames before adding their content to the hasher. This |
| 403 |
ensures deterministic hash input and hence deterministic hash, independent |
| 404 |
on filesystem order. |
| 405 |
|
| 406 |
- gh-141808: When running ``make clean-retain-profile``, keep the generated |
| 407 |
JIT stencils. That way, the stencils are not generated twice when |
| 408 |
Profile-guided optimization (PGO) is used. It also allows distributors to |
| 409 |
supply their own pre-built JIT stencils. |
| 410 |
|
| 411 |
- gh-138061: Ensure reproducible builds by making JIT stencil header |
| 412 |
generation deterministic. |
| 413 |
|
| 414 |
|
| 415 |
What's New in Python 3.13.11 final? |
| 416 |
=================================== |
| 417 |
|
| 418 |
*Release date: 2025-12-05* |
| 419 |
|
| 420 |
Security |
| 421 |
-------- |
| 422 |
|
| 423 |
- gh-142145: Remove quadratic behavior in ``xml.minidom`` node ID cache |
| 424 |
clearing. |
| 425 |
|
| 426 |
- gh-119451: Fix a potential memory denial of service in the |
| 427 |
:mod:`http.client` module. When connecting to a malicious server, it could |
| 428 |
cause an arbitrary amount of memory to be allocated. This could have led |
| 429 |
to symptoms including a :exc:`MemoryError`, swapping, out of memory (OOM) |
| 430 |
killed processes or containers, or even system crashes. |
| 431 |
|
| 432 |
- gh-119452: Fix a potential memory denial of service in the |
| 433 |
:mod:`http.server` module. When a malicious user is connected to the CGI |
| 434 |
server on Windows, it could cause an arbitrary amount of memory to be |
| 435 |
allocated. This could have led to symptoms including a :exc:`MemoryError`, |
| 436 |
swapping, out of memory (OOM) killed processes or containers, or even |
| 437 |
system crashes. |
| 438 |
|
| 439 |
Library |
| 440 |
------- |
| 441 |
|
| 442 |
- gh-140797: Revert changes to the undocumented :class:`!re.Scanner` class. |
| 443 |
Capturing groups are still allowed for backward compatibility, although |
| 444 |
using them can lead to incorrect result. They will be forbidden in future |
| 445 |
Python versions. |
| 446 |
|
| 447 |
- gh-142206: The resource tracker in the :mod:`multiprocessing` module now |
| 448 |
uses the original communication protocol, as in Python 3.14.0 and below, |
| 449 |
by default. This avoids issues with upgrading Python while it is running. |
| 450 |
(Note that such 'in-place' upgrades are not tested.) The tracker remains |
| 451 |
compatible with subprocesses that use new protocol (that is, subprocesses |
| 452 |
using Python 3.13.10, 3.14.1 and 3.15). |
| 453 |
|
| 454 |
Core and Builtins |
| 455 |
----------------- |
| 456 |
|
| 457 |
- gh-142218: Fix crash when inserting into a split table dictionary with a |
| 458 |
non :class:`str` key that matches an existing key. |
| 459 |
|
| 460 |
|
| 461 |
What's New in Python 3.13.10 final? |
| 462 |
=================================== |
| 463 |
|
| 464 |
*Release date: 2025-12-02* |
| 465 |
|
| 466 |
Tools/Demos |
| 467 |
----------- |
| 468 |
|
| 469 |
- gh-141442: The iOS testbed now correctly handles test arguments that |
| 470 |
contain spaces. |
| 471 |
|
| 472 |
Tests |
| 473 |
----- |
| 474 |
|
| 475 |
- gh-140482: Preserve and restore the state of ``stty echo`` as part of the |
| 476 |
test environment. |
| 477 |
|
| 478 |
- gh-140082: Update ``python -m test`` to set ``FORCE_COLOR=1`` when being |
| 479 |
run with color enabled so that :mod:`unittest` which is run by it with |
| 480 |
redirected output will output in color. |
| 481 |
|
| 482 |
- gh-136442: Use exitcode ``1`` instead of ``5`` if |
| 483 |
:func:`unittest.TestCase.setUpClass` raises an exception |
| 484 |
|
| 485 |
Security |
| 486 |
-------- |
| 487 |
|
| 488 |
- gh-139700: Check consistency of the zip64 end of central directory record. |
| 489 |
Support records with "zip64 extensible data" if there are no bytes |
| 490 |
prepended to the ZIP file. |
| 491 |
|
| 492 |
- gh-137836: Add support of the "plaintext" element, RAWTEXT elements "xmp", |
| 493 |
"iframe", "noembed" and "noframes", and optionally RAWTEXT element |
| 494 |
"noscript" in :class:`html.parser.HTMLParser`. |
| 495 |
|
| 496 |
- gh-136063: :mod:`email.message`: ensure linear complexity for legacy HTTP |
| 497 |
parameters parsing. Patch by Bénédikt Tran. |
| 498 |
|
| 499 |
- gh-136065: Fix quadratic complexity in :func:`os.path.expandvars`. |
| 500 |
|
| 501 |
- gh-119342: Fix a potential memory denial of service in the :mod:`plistlib` |
| 502 |
module. When reading a Plist file received from untrusted source, it could |
| 503 |
cause an arbitrary amount of memory to be allocated. This could have led |
| 504 |
to symptoms including a :exc:`MemoryError`, swapping, out of memory (OOM) |
| 505 |
killed processes or containers, or even system crashes. |
| 506 |
|
| 507 |
Library |
| 508 |
------- |
| 509 |
|
| 510 |
- gh-74389: When the stdin being used by a :class:`subprocess.Popen` |
| 511 |
instance is closed, this is now ignored in |
| 512 |
:meth:`subprocess.Popen.communicate` instead of leaving the class in an |
| 513 |
inconsistent state. |
| 514 |
|
| 515 |
- gh-87512: Fix :func:`subprocess.Popen.communicate` timeout handling on |
| 516 |
Windows when writing large input. Previously, the timeout was ignored |
| 517 |
during stdin writing, causing the method to block indefinitely if the |
| 518 |
child process did not consume input quickly. The stdin write is now |
| 519 |
performed in a background thread, allowing the timeout to be properly |
| 520 |
enforced. |
| 521 |
|
| 522 |
- gh-141473: When :meth:`subprocess.Popen.communicate` was called with |
| 523 |
*input* and a *timeout* and is called for a second time after a |
| 524 |
:exc:`~subprocess.TimeoutExpired` exception before the process has died, |
| 525 |
it should no longer hang. |
| 526 |
|
| 527 |
- gh-59000: Fix :mod:`pdb` breakpoint resolution for class methods when the |
| 528 |
module defining the class is not imported. |
| 529 |
|
| 530 |
- gh-141570: Support :term:`file-like object` raising :exc:`OSError` from |
| 531 |
:meth:`~io.IOBase.fileno` in color detection |
| 532 |
(``_colorize.can_colorize()``). This can occur when ``sys.stdout`` is |
| 533 |
redirected. |
| 534 |
|
| 535 |
- gh-141659: Fix bad file descriptor errors from ``_posixsubprocess`` on |
| 536 |
AIX. |
| 537 |
|
| 538 |
- gh-141497: :mod:`ipaddress`: ensure that the methods |
| 539 |
:meth:`IPv4Network.hosts() <ipaddress.IPv4Network.hosts>` and |
| 540 |
:meth:`IPv6Network.hosts() <ipaddress.IPv6Network.hosts>` always return an |
| 541 |
iterator. |
| 542 |
|
| 543 |
- gh-140938: The :func:`statistics.stdev` and :func:`statistics.pstdev` |
| 544 |
functions now raise a :exc:`ValueError` when the input contains an |
| 545 |
infinity or a NaN. |
| 546 |
|
| 547 |
- gh-124111: Updated Tcl threading configuration in :mod:`_tkinter` to |
| 548 |
assume that threads are always available in Tcl 9 and later. |
| 549 |
|
| 550 |
- gh-137109: The :mod:`os.fork` and related forking APIs will no longer warn |
| 551 |
in the common case where Linux or macOS platform APIs return the number of |
| 552 |
threads in a process and find the answer to be 1 even when a |
| 553 |
:func:`os.register_at_fork` ``after_in_parent=`` callback (re)starts a |
| 554 |
thread. |
| 555 |
|
| 556 |
- gh-141314: Fix assertion failure in :meth:`io.TextIOWrapper.tell` when |
| 557 |
reading files with standalone carriage return (``\r``) line endings. |
| 558 |
|
| 559 |
- gh-141311: Fix assertion failure in :func:`!io.BytesIO.readinto` and |
| 560 |
undefined behavior arising when read position is above capcity in |
| 561 |
:class:`io.BytesIO`. |
| 562 |
|
| 563 |
- gh-141141: Fix a thread safety issue with :func:`base64.b85decode`. |
| 564 |
Contributed by Benel Tayar. |
| 565 |
|
| 566 |
- gh-140911: :mod:`collections`: Ensure that the methods |
| 567 |
``UserString.rindex()`` and ``UserString.index()`` accept |
| 568 |
:class:`collections.UserString` instances as the sub argument. |
| 569 |
|
| 570 |
- gh-140797: The undocumented :class:`!re.Scanner` class now forbids regular |
| 571 |
expressions containing capturing groups in its lexicon patterns. Patterns |
| 572 |
using capturing groups could previously lead to crashes with segmentation |
| 573 |
fault. Use non-capturing groups (?:...) instead. |
| 574 |
|
| 575 |
- gh-140815: :mod:`faulthandler` now detects if a frame or a code object is |
| 576 |
invalid or freed. Patch by Victor Stinner. |
| 577 |
|
| 578 |
- gh-100218: Correctly set :attr:`~OSError.errno` when |
| 579 |
:func:`socket.if_nametoindex` or :func:`socket.if_indextoname` raise an |
| 580 |
:exc:`OSError`. Patch by Bénédikt Tran. |
| 581 |
|
| 582 |
- gh-140875: Fix handling of unclosed character references (named and |
| 583 |
numerical) followed by the end of file in :class:`html.parser.HTMLParser` |
| 584 |
with ``convert_charrefs=False``. |
| 585 |
|
| 586 |
- gh-140734: :mod:`multiprocessing`: fix off-by-one error when checking the |
| 587 |
length of a temporary socket file path. Patch by Bénédikt Tran. |
| 588 |
|
| 589 |
- gh-140874: Bump the version of pip bundled in :mod:`ensurepip` to version |
| 590 |
25.3 |
| 591 |
|
| 592 |
- gh-140691: In :mod:`urllib.request`, when opening a FTP URL fails because |
| 593 |
a data connection cannot be made, the control connection's socket is now |
| 594 |
closed to avoid a :exc:`ResourceWarning`. |
| 595 |
|
| 596 |
- gh-103847: Fix hang when cancelling process created by |
| 597 |
:func:`asyncio.create_subprocess_exec` or |
| 598 |
:func:`asyncio.create_subprocess_shell`. Patch by Kumar Aditya. |
| 599 |
|
| 600 |
- gh-140590: Fix arguments checking for the |
| 601 |
:meth:`!functools.partial.__setstate__` that may lead to internal state |
| 602 |
corruption and crash. Patch by Sergey Miryanov. |
| 603 |
|
| 604 |
- gh-140634: Fix a reference counting bug in |
| 605 |
:meth:`!os.sched_param.__reduce__`. |
| 606 |
|
| 607 |
- gh-140633: Ignore :exc:`AttributeError` when setting a module's |
| 608 |
``__file__`` attribute when loading an extension module packaged as Apple |
| 609 |
Framework. |
| 610 |
|
| 611 |
- gh-140593: :mod:`xml.parsers.expat`: Fix a memory leak that could affect |
| 612 |
users with :meth:`~xml.parsers.expat.xmlparser.ElementDeclHandler` set to |
| 613 |
a custom element declaration handler. Patch by Sebastian Pipping. |
| 614 |
|
| 615 |
- gh-140607: Inside :meth:`io.RawIOBase.read`, validate that the count of |
| 616 |
bytes returned by :meth:`io.RawIOBase.readinto` is valid (inside the |
| 617 |
provided buffer). |
| 618 |
|
| 619 |
- gh-138162: Fix :class:`logging.LoggerAdapter` with ``merge_extra=True`` |
| 620 |
and without the *extra* argument. |
| 621 |
|
| 622 |
- gh-140474: Fix memory leak in :class:`array.array` when creating arrays |
| 623 |
from an empty :class:`str` and the ``u`` type code. |
| 624 |
|
| 625 |
- gh-140272: Fix memory leak in the :meth:`!clear` method of the |
| 626 |
:mod:`dbm.gnu` database. |
| 627 |
|
| 628 |
- gh-140041: Fix import of :mod:`ctypes` on Android and Cygwin when ABI |
| 629 |
flags are present. |
| 630 |
|
| 631 |
- gh-139905: Add suggestion to error message for :class:`typing.Generic` |
| 632 |
subclasses when ``cls.__parameters__`` is missing due to a parent class |
| 633 |
failing to call :meth:`super().__init_subclass__() |
| 634 |
<object.__init_subclass__>` in its ``__init_subclass__``. |
| 635 |
|
| 636 |
- gh-139845: Fix to not print KeyboardInterrupt twice in default asyncio |
| 637 |
REPL. |
| 638 |
|
| 639 |
- gh-139783: Fix :func:`inspect.getsourcelines` for the case when a |
| 640 |
decorator is followed by a comment or an empty line. |
| 641 |
|
| 642 |
- gh-70765: :mod:`http.server`: fix default handling of HTTP/0.9 requests in |
| 643 |
:class:`~http.server.BaseHTTPRequestHandler`. Previously, |
| 644 |
:meth:`!BaseHTTPRequestHandler.parse_request` incorrectly waited for |
| 645 |
headers in the request although those are not supported in HTTP/0.9. Patch |
| 646 |
by Bénédikt Tran. |
| 647 |
|
| 648 |
- gh-139391: Fix an issue when, on non-Windows platforms, it was not |
| 649 |
possible to gracefully exit a ``python -m asyncio`` process suspended by |
| 650 |
Ctrl+Z and later resumed by :manpage:`fg` other than with :manpage:`kill`. |
| 651 |
|
| 652 |
- gh-101828: Fix ``'shift_jisx0213'``, ``'shift_jis_2004'``, |
| 653 |
``'euc_jisx0213'`` and ``'euc_jis_2004'`` codecs truncating null chars as |
| 654 |
they were treated as part of multi-character sequences. |
| 655 |
|
| 656 |
- gh-139246: fix: paste zero-width in default repl width is wrong. |
| 657 |
|
| 658 |
- gh-90949: Add |
| 659 |
:meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerActivationThreshold` |
| 660 |
and |
| 661 |
:meth:`~xml.parsers.expat.xmlparser.SetAllocTrackerMaximumAmplification` |
| 662 |
to :ref:`xmlparser <xmlparser-objects>` objects to prevent use of |
| 663 |
disproportional amounts of dynamic memory from within an Expat parser. |
| 664 |
Patch by Bénédikt Tran. |
| 665 |
|
| 666 |
- gh-139065: Fix trailing space before a wrapped long word if the line |
| 667 |
length is exactly *width* in :mod:`textwrap`. |
| 668 |
|
| 669 |
- gh-138993: Dedent :data:`credits` text. |
| 670 |
|
| 671 |
- gh-138859: Fix generic type parameterization raising a :exc:`TypeError` |
| 672 |
when omitting a :class:`ParamSpec` that has a default which is not a list |
| 673 |
of types. |
| 674 |
|
| 675 |
- gh-138775: Use of ``python -m`` with :mod:`base64` has been fixed to |
| 676 |
detect input from a terminal so that it properly notices EOF. |
| 677 |
|
| 678 |
- gh-98896: Fix a failure in multiprocessing resource_tracker when |
| 679 |
SharedMemory names contain colons. Patch by Rani Pinchuk. |
| 680 |
|
| 681 |
- gh-75989: :func:`tarfile.TarFile.extractall` and |
| 682 |
:func:`tarfile.TarFile.extract` now overwrite symlinks when extracting |
| 683 |
hardlinks. (Contributed by Alexander Enrique Urieles Nieto in |
| 684 |
:gh:`75989`.) |
| 685 |
|
| 686 |
- gh-83424: Allows creating a :class:`ctypes.CDLL` without name when passing |
| 687 |
a handle as an argument. |
| 688 |
|
| 689 |
- gh-136234: Fix :meth:`asyncio.WriteTransport.writelines` to be robust to |
| 690 |
connection failure, by using the same behavior as |
| 691 |
:meth:`~asyncio.WriteTransport.write`. |
| 692 |
|
| 693 |
- gh-136057: Fixed the bug in :mod:`pdb` and :mod:`bdb` where ``next`` and |
| 694 |
``step`` can't go over the line if a loop exists in the line. |
| 695 |
|
| 696 |
- gh-135307: :mod:`email`: Fix exception in ``set_content()`` when encoding |
| 697 |
text and max_line_length is set to ``0`` or ``None`` (unlimited). |
| 698 |
|
| 699 |
- gh-134453: Fixed :func:`subprocess.Popen.communicate` ``input=`` handling |
| 700 |
of :class:`memoryview` instances that were non-byte shaped on POSIX |
| 701 |
platforms. Those are now properly cast to a byte shaped view instead of |
| 702 |
truncating the input. Windows platforms did not have this bug. |
| 703 |
|
| 704 |
- gh-102431: Clarify constraints for "logical" arguments in methods of |
| 705 |
:class:`decimal.Context`. |
| 706 |
|
| 707 |
IDLE |
| 708 |
---- |
| 709 |
|
| 710 |
- gh-96491: Deduplicate version number in IDLE shell title bar after saving |
| 711 |
to a file. |
| 712 |
|
| 713 |
Documentation |
| 714 |
------------- |
| 715 |
|
| 716 |
- gh-141994: :mod:`xml.sax.handler`: Make Documentation of |
| 717 |
:data:`xml.sax.handler.feature_external_ges` warn of opening up to |
| 718 |
`external entity attacks |
| 719 |
<https://en.wikipedia.org/wiki/XML_external_entity_attack>`_. Patch by |
| 720 |
Sebastian Pipping. |
| 721 |
|
| 722 |
- gh-140578: Remove outdated sencence in the documentation for |
| 723 |
:mod:`multiprocessing`, that implied that |
| 724 |
:class:`concurrent.futures.ThreadPoolExecutor` did not exist. |
| 725 |
|
| 726 |
Core and Builtins |
| 727 |
----------------- |
| 728 |
|
| 729 |
- gh-142048: Fix quadratically increasing garbage collection delays in |
| 730 |
free-threaded build. |
| 731 |
|
| 732 |
- gh-141930: When importing a module, use Python's regular file object to |
| 733 |
ensure that writes to ``.pyc`` files are complete or an appropriate error |
| 734 |
is raised. |
| 735 |
|
| 736 |
- gh-120158: Fix inconsistent state when enabling or disabling monitoring |
| 737 |
events too many times. |
| 738 |
|
| 739 |
- gh-141579: Fix :func:`sys.activate_stack_trampoline` to properly support |
| 740 |
the ``perf_jit`` backend. Patch by Pablo Galindo. |
| 741 |
|
| 742 |
- gh-141312: Fix the assertion failure in the ``__setstate__`` method of the |
| 743 |
range iterator when a non-integer argument is passed. Patch by Sergey |
| 744 |
Miryanov. |
| 745 |
|
| 746 |
- gh-140939: Fix memory leak when :class:`bytearray` or :class:`bytes` is |
| 747 |
formated with the ``%*b`` format with a large width that results in a |
| 748 |
:exc:`MemoryError`. |
| 749 |
|
| 750 |
- gh-140530: Fix a reference leak when ``raise exc from cause`` fails. Patch |
| 751 |
by Bénédikt Tran. |
| 752 |
|
| 753 |
- gh-140576: Fixed crash in :func:`tokenize.generate_tokens` in case of |
| 754 |
specific incorrect input. Patch by Mikhail Efimov. |
| 755 |
|
| 756 |
- gh-140551: Fixed crash in :class:`dict` if :meth:`dict.clear` is called at |
| 757 |
the lookup stage. Patch by Mikhail Efimov and Inada Naoki. |
| 758 |
|
| 759 |
- gh-140471: Fix potential buffer overflow in :class:`ast.AST` node |
| 760 |
initialization when encountering malformed :attr:`~ast.AST._fields` |
| 761 |
containing non-:class:`str`. |
| 762 |
|
| 763 |
- gh-140406: Fix memory leak when an object's :meth:`~object.__hash__` |
| 764 |
method returns an object that isn't an :class:`int`. |
| 765 |
|
| 766 |
- gh-140306: Fix memory leaks in cross-interpreter channel operations and |
| 767 |
shared namespace handling. |
| 768 |
|
| 769 |
- gh-140301: Fix memory leak of ``PyConfig`` in subinterpreters. |
| 770 |
|
| 771 |
- gh-140000: Fix potential memory leak when a reference cycle exists between |
| 772 |
an instance of :class:`typing.TypeAliasType`, :class:`typing.TypeVar`, |
| 773 |
:class:`typing.ParamSpec`, or :class:`typing.TypeVarTuple` and its |
| 774 |
``__name__`` attribute. Patch by Mikhail Efimov. |
| 775 |
|
| 776 |
- gh-139748: Fix reference leaks in error branches of functions accepting |
| 777 |
path strings or bytes such as :func:`compile` and :func:`os.system`. Patch |
| 778 |
by Bénédikt Tran. |
| 779 |
|
| 780 |
- gh-139516: Fix lambda colon erroneously start format spec in f-string in |
| 781 |
tokenizer. |
| 782 |
|
| 783 |
- gh-139640: Fix swallowing some syntax warnings in different modules if |
| 784 |
they accidentally have the same message and are emitted from the same |
| 785 |
line. Fix duplicated warnings in the ``finally`` block. |
| 786 |
|
| 787 |
- gh-137400: Fix a crash in the :term:`free threading` build when disabling |
| 788 |
profiling or tracing across all threads with |
| 789 |
:c:func:`PyEval_SetProfileAllThreads` or |
| 790 |
:c:func:`PyEval_SetTraceAllThreads` or their Python equivalents |
| 791 |
:func:`threading.settrace_all_threads` and |
| 792 |
:func:`threading.setprofile_all_threads`. |
| 793 |
|
| 794 |
- gh-133400: Fixed Ctrl+D (^D) behavior in _pyrepl module to match old |
| 795 |
pre-3.13 REPL behavior. |
| 796 |
|
| 797 |
C API |
| 798 |
----- |
| 799 |
|
| 800 |
- gh-140042: Removed the sqlite3_shutdown call that could cause closing |
| 801 |
connections for sqlite when used with multiple sub interpreters. |
| 802 |
|
| 803 |
- gh-140487: Fix :c:macro:`Py_RETURN_NOTIMPLEMENTED` in limited C API 3.11 |
| 804 |
and older: don't treat ``Py_NotImplemented`` as immortal. Patch by Victor |
| 805 |
Stinner. |
| 806 |
|
| 807 |
|
| 808 |
What's New in Python 3.13.9 final? |
| 809 |
================================== |
| 810 |
|
| 811 |
*Release date: 2025-10-14* |
| 812 |
|
| 813 |
Library |
| 814 |
------- |
| 815 |
|
| 816 |
- gh-139783: Fix :func:`inspect.getsourcelines` for the case when a |
| 817 |
decorator is followed by a comment or an empty line. |
| 818 |
|
| 819 |
|
| 820 |
What's New in Python 3.13.8 final? |
| 821 |
================================== |
| 822 |
|
| 823 |
*Release date: 2025-10-07* |
| 824 |
|
| 825 |
macOS |
| 826 |
----- |
| 827 |
|
| 828 |
- gh-124111: Update macOS installer to use Tcl/Tk 8.6.17. |
| 829 |
|
| 830 |
- gh-139573: Updated bundled version of OpenSSL to 3.0.18. |
| 831 |
|
| 832 |
Windows |
| 833 |
------- |
| 834 |
|
| 835 |
- gh-139573: Updated bundled version of OpenSSL to 3.0.18. |
| 836 |
|
| 837 |
- gh-138896: Fix error installing C runtime on non-updated Windows machines |
| 838 |
|
| 839 |
Tools/Demos |
| 840 |
----------- |
| 841 |
|
| 842 |
- gh-139330: SBOM generation tool didn't cross-check the version and |
| 843 |
checksum values against the ``Modules/expat/refresh.sh`` script, leading |
| 844 |
to the values becoming out-of-date during routine updates. |
| 845 |
|
| 846 |
- gh-137873: The iOS test runner has been simplified, resolving some issues |
| 847 |
that have been observed using the runner in GitHub Actions and Azure |
| 848 |
Pipelines test environments. |
| 849 |
|
| 850 |
Tests |
| 851 |
----- |
| 852 |
|
| 853 |
- gh-139208: Fix regrtest ``--fast-ci --verbose``: don't ignore the |
| 854 |
``--verbose`` option anymore. Patch by Victor Stinner. |
| 855 |
|
| 856 |
Security |
| 857 |
-------- |
| 858 |
|
| 859 |
- gh-139400: :mod:`xml.parsers.expat`: Make sure that parent Expat parsers |
| 860 |
are only garbage-collected once they are no longer referenced by |
| 861 |
subparsers created by |
| 862 |
:meth:`~xml.parsers.expat.xmlparser.ExternalEntityParserCreate`. Patch by |
| 863 |
Sebastian Pipping. |
| 864 |
|
| 865 |
- gh-139283: :mod:`sqlite3`: correctly handle maximum number of rows to |
| 866 |
fetch in :meth:`Cursor.fetchmany <sqlite3.Cursor.fetchmany>` and reject |
| 867 |
negative values for :attr:`Cursor.arraysize <sqlite3.Cursor.arraysize>`. |
| 868 |
Patch by Bénédikt Tran. |
| 869 |
|
| 870 |
- gh-135661: Fix CDATA section parsing in :class:`html.parser.HTMLParser` |
| 871 |
according to the HTML5 standard: ``] ]>`` and ``]] >`` no longer end the |
| 872 |
CDATA section. Add private method ``_set_support_cdata()`` which can be |
| 873 |
used to specify how to parse ``<[CDATA[`` --- as a CDATA section in |
| 874 |
foreign content (SVG or MathML) or as a bogus comment in the HTML |
| 875 |
namespace. |
| 876 |
|
| 877 |
Library |
| 878 |
------- |
| 879 |
|
| 880 |
- gh-139312: Upgrade bundled libexpat to 2.7.3 |
| 881 |
|
| 882 |
- gh-139289: Do a real lazy-import on :mod:`rlcompleter` in :mod:`pdb` and |
| 883 |
restore the existing completer after importing :mod:`rlcompleter`. |
| 884 |
|
| 885 |
- gh-139210: Fix use-after-free when reporting unknown event in |
| 886 |
:func:`xml.etree.ElementTree.iterparse`. Patch by Ken Jin. |
| 887 |
|
| 888 |
- gh-138860: Lazy import :mod:`rlcompleter` in :mod:`pdb` to avoid deadlock |
| 889 |
in subprocess. |
| 890 |
|
| 891 |
- gh-112729: Fix crash when calling ``_interpreters.create`` when the |
| 892 |
process is out of memory. |
| 893 |
|
| 894 |
- gh-139076: Fix a bug in the :mod:`pydoc` module that was hiding functions |
| 895 |
in a Python module if they were implemented in an extension module and the |
| 896 |
module did not have ``__all__``. |
| 897 |
|
| 898 |
- gh-138998: Update bundled libexpat to 2.7.2 |
| 899 |
|
| 900 |
- gh-130567: Fix possible crash in :func:`locale.strxfrm` due to a platform |
| 901 |
bug on macOS. |
| 902 |
|
| 903 |
- gh-138779: Support device numbers larger than ``2**63-1`` for the |
| 904 |
:attr:`~os.stat_result.st_rdev` field of the :class:`os.stat_result` |
| 905 |
structure. |
| 906 |
|
| 907 |
- gh-128636: Fix crash in PyREPL when os.environ is overwritten with an |
| 908 |
invalid value for mac |
| 909 |
|
| 910 |
- gh-88375: Fix normalization of the ``robots.txt`` rules and URLs in the |
| 911 |
:mod:`urllib.robotparser` module. No longer ignore trailing ``?``. |
| 912 |
Distinguish raw special characters ``?``, ``=`` and ``&`` from the |
| 913 |
percent-encoded ones. |
| 914 |
|
| 915 |
- gh-138515: :mod:`email` is added to Emscripten build. |
| 916 |
|
| 917 |
- gh-111788: Fix parsing errors in the :mod:`urllib.robotparser` module. |
| 918 |
Don't fail trying to parse weird paths. Don't fail trying to decode |
| 919 |
non-UTF-8 ``robots.txt`` files. |
| 920 |
|
| 921 |
- gh-138432: :meth:`zoneinfo.reset_tzpath` will now convert any |
| 922 |
:class:`os.PathLike` objects it receives into strings before adding them |
| 923 |
to ``TZPATH``. It will raise ``TypeError`` if anything other than a string |
| 924 |
is found after this conversion. If given an :class:`os.PathLike` object |
| 925 |
that represents a relative path, it will now raise ``ValueError`` instead |
| 926 |
of ``TypeError``, and present a more informative error message. |
| 927 |
|
| 928 |
- gh-138008: Fix segmentation faults in the :mod:`ctypes` module due to |
| 929 |
invalid :attr:`~ctypes._CFuncPtr.argtypes`. Patch by Dung Nguyen. |
| 930 |
|
| 931 |
- gh-60462: Fix :func:`locale.strxfrm` on Solaris (and possibly other |
| 932 |
platforms). |
| 933 |
|
| 934 |
- gh-138204: Forbid expansion of shared anonymous :mod:`memory maps <mmap>` |
| 935 |
on Linux, which caused a bus error. |
| 936 |
|
| 937 |
- gh-138010: Fix an issue where defining a class with a |
| 938 |
:deco:`warnings.deprecated`-decorated base class may not invoke the |
| 939 |
correct :meth:`~object.__init_subclass__` method in cases involving |
| 940 |
multiple inheritance. Patch by Brian Schubert. |
| 941 |
|
| 942 |
- gh-138133: Prevent infinite traceback loop when sending CTRL^C to Python |
| 943 |
through ``strace``. |
| 944 |
|
| 945 |
- gh-134869: Fix an issue where pressing Ctrl+C during tab completion in the |
| 946 |
REPL would leave the autocompletion menu in a corrupted state. |
| 947 |
|
| 948 |
- gh-137317: :func:`inspect.signature` now correctly handles classes that |
| 949 |
use a descriptor on a wrapped :meth:`!__init__` or :meth:`!__new__` |
| 950 |
method. Contributed by Yongyu Yan. |
| 951 |
|
| 952 |
- gh-137754: Fix import of the :mod:`zoneinfo` module if the C |
| 953 |
implementation of the :mod:`datetime` module is not available. |
| 954 |
|
| 955 |
- gh-137490: Handle :data:`~errno.ECANCELED` in the same way as |
| 956 |
:data:`~errno.EINTR` in :func:`signal.sigwaitinfo` on NetBSD. |
| 957 |
|
| 958 |
- gh-137477: Fix :func:`!inspect.getblock`, :func:`inspect.getsourcelines` |
| 959 |
and :func:`inspect.getsource` for generator expressions. |
| 960 |
|
| 961 |
- gh-137017: Fix :obj:`threading.Thread.is_alive` to remain ``True`` until |
| 962 |
the underlying OS thread is fully cleaned up. This avoids false negatives |
| 963 |
in edge cases involving thread monitoring or premature |
| 964 |
:obj:`threading.Thread.is_alive` calls. |
| 965 |
|
| 966 |
- gh-136134: :meth:`!SMTP.auth_cram_md5` now raises an |
| 967 |
:exc:`~smtplib.SMTPException` instead of a :exc:`ValueError` if Python has |
| 968 |
been built without MD5 support. In particular, :class:`~smtplib.SMTP` |
| 969 |
clients will not attempt to use this method even if the remote server is |
| 970 |
assumed to support it. Patch by Bénédikt Tran. |
| 971 |
|
| 972 |
- gh-136134: :meth:`IMAP4.login_cram_md5 <imaplib.IMAP4.login_cram_md5>` now |
| 973 |
raises an :exc:`IMAP4.error <imaplib.IMAP4.error>` if CRAM-MD5 |
| 974 |
authentication is not supported. Patch by Bénédikt Tran. |
| 975 |
|
| 976 |
- gh-135386: Fix opening a :mod:`dbm.sqlite3` database for reading from |
| 977 |
read-only file or directory. |
| 978 |
|
| 979 |
- gh-126631: Fix :mod:`multiprocessing` ``forkserver`` bug which prevented |
| 980 |
``__main__`` from being preloaded. |
| 981 |
|
| 982 |
- gh-123085: In a bare call to :func:`importlib.resources.files`, ensure the |
| 983 |
caller's frame is properly detected when ``importlib.resources`` is itself |
| 984 |
available as a compiled module only (no source). |
| 985 |
|
| 986 |
- gh-118981: Fix potential hang in ``multiprocessing.popen_spawn_posix`` |
| 987 |
that can happen when the child proc dies early by closing the child fds |
| 988 |
right away. |
| 989 |
|
| 990 |
- gh-78319: UTF8 support for the IMAP APPEND command has been made RFC |
| 991 |
compliant. |
| 992 |
|
| 993 |
- bpo-38735: Fix failure when importing a module from the root directory on |
| 994 |
unix-like platforms with sys.pycache_prefix set. |
| 995 |
|
| 996 |
- bpo-41839: Allow negative priority values from |
| 997 |
:func:`os.sched_get_priority_min` and :func:`os.sched_get_priority_max` |
| 998 |
functions. |
| 999 |
|
| 1000 |
Core and Builtins |
| 1001 |
----------------- |
| 1002 |
|
| 1003 |
- gh-134466: Don't run PyREPL in a degraded environment where setting |
| 1004 |
termios attributes is not allowed. |
| 1005 |
|
| 1006 |
- gh-71810: Raise :exc:`OverflowError` for ``(-1).to_bytes()`` for signed |
| 1007 |
conversions when bytes count is zero. Patch by Sergey B Kirpichev. |
| 1008 |
|
| 1009 |
- gh-105487: Remove non-existent :meth:`~object.__copy__`, |
| 1010 |
:meth:`~object.__deepcopy__`, and :attr:`~type.__bases__` from the |
| 1011 |
:meth:`~object.__dir__` entries of :class:`types.GenericAlias`. |
| 1012 |
|
| 1013 |
- gh-134163: Fix a hang when the process is out of memory inside an |
| 1014 |
exception handler. |
| 1015 |
|
| 1016 |
- gh-138479: Fix a crash when a generic object's ``__typing_subst__`` |
| 1017 |
returns an object that isn't a :class:`tuple`. |
| 1018 |
|
| 1019 |
- gh-137576: Fix for incorrect source code being shown in tracebacks from |
| 1020 |
the Basic REPL when :envvar:`PYTHONSTARTUP` is given. Patch by Adam Hartz. |
| 1021 |
|
| 1022 |
- gh-132744: Certain calls now check for runaway recursion and respect the |
| 1023 |
system recursion limit. |
| 1024 |
|
| 1025 |
C API |
| 1026 |
----- |
| 1027 |
|
| 1028 |
- gh-87135: Attempting to acquire the GIL after runtime finalization has |
| 1029 |
begun in a different thread now causes the thread to hang rather than |
| 1030 |
terminate, which avoids potential crashes or memory corruption caused by |
| 1031 |
attempting to terminate a thread that is running code not specifically |
| 1032 |
designed to support termination. In most cases this hanging is harmless |
| 1033 |
since the process will soon exit anyway. |
| 1034 |
|
| 1035 |
While not officially marked deprecated until 3.14, |
| 1036 |
``PyThread_exit_thread`` is no longer called internally and remains solely |
| 1037 |
for interface compatibility. Its behavior is inconsistent across |
| 1038 |
platforms, and it can only be used safely in the unlikely case that every |
| 1039 |
function in the entire call stack has been designed to support the |
| 1040 |
platform-dependent termination mechanism. It is recommended that users of |
| 1041 |
this function change their design to not require thread termination. In |
| 1042 |
the unlikely case that thread termination is needed and can be done |
| 1043 |
safely, users may migrate to calling platform-specific APIs such as |
| 1044 |
``pthread_exit`` (POSIX) or ``_endthreadex`` (Windows) directly. |
| 1045 |
|
| 1046 |
Build |
| 1047 |
----- |
| 1048 |
|
| 1049 |
- gh-135734: Python can correctly be configured and built with ``./configure |
| 1050 |
--enable-optimizations --disable-test-modules``. Previously, the profile |
| 1051 |
data generation step failed due to PGO tests where immortalization |
| 1052 |
couldn't be properly suppressed. Patch by Bénédikt Tran. |
| 1053 |
|
| 1054 |
|
| 1055 |
What's New in Python 3.13.7 final? |
| 1056 |
================================== |
| 1057 |
|
| 1058 |
*Release date: 2025-08-14* |
| 1059 |
|
| 1060 |
Library |
| 1061 |
------- |
| 1062 |
|
| 1063 |
- gh-137583: Fix a deadlock introduced in 3.13.6 when a call to |
| 1064 |
:meth:`ssl.SSLSocket.recv <socket.socket.recv>` was blocked in one thread, |
| 1065 |
and then another method on the object (such as :meth:`ssl.SSLSocket.send |
| 1066 |
<socket.socket.send>`) was subsequently called in another thread. |
| 1067 |
|
| 1068 |
- gh-137044: Return large limit values as positive integers instead of |
| 1069 |
negative integers in :func:`resource.getrlimit`. Accept large values and |
| 1070 |
reject negative values (except :data:`~resource.RLIM_INFINITY`) for limits |
| 1071 |
in :func:`resource.setrlimit`. |
| 1072 |
|
| 1073 |
- gh-136914: Fix retrieval of :attr:`doctest.DocTest.lineno` for objects |
| 1074 |
decorated with :func:`functools.cache` or |
| 1075 |
:class:`functools.cached_property`. |
| 1076 |
|
| 1077 |
- gh-131788: Make ``ResourceTracker.send`` from :mod:`multiprocessing` |
| 1078 |
re-entrant safe |
| 1079 |
|
| 1080 |
Documentation |
| 1081 |
------------- |
| 1082 |
|
| 1083 |
- gh-136155: We are now checking for fatal errors in EPUB builds in CI. |
| 1084 |
|
| 1085 |
Core and Builtins |
| 1086 |
----------------- |
| 1087 |
|
| 1088 |
- gh-137400: Fix a crash in the :term:`free threading` build when disabling |
| 1089 |
profiling or tracing across all threads with |
| 1090 |
:c:func:`PyEval_SetProfileAllThreads` or |
| 1091 |
:c:func:`PyEval_SetTraceAllThreads` or their Python equivalents |
| 1092 |
:func:`threading.settrace_all_threads` and |
| 1093 |
:func:`threading.setprofile_all_threads`. |
| 1094 |
|
| 1095 |
|
| 1096 |
What's New in Python 3.13.6 final? |
| 1097 |
================================== |
| 1098 |
|
| 1099 |
*Release date: 2025-08-06* |
| 1100 |
|
| 1101 |
macOS |
| 1102 |
----- |
| 1103 |
|
| 1104 |
- gh-137450: macOS installer shell path management improvements: separate |
| 1105 |
the installer ``Shell profile updater`` postinstall script from the |
| 1106 |
``Update Shell Profile.command`` to enable more robust error handling. |
| 1107 |
|
| 1108 |
- gh-137134: Update macOS installer to ship with SQLite version 3.50.4. |
| 1109 |
|
| 1110 |
Windows |
| 1111 |
------- |
| 1112 |
|
| 1113 |
- gh-137134: Update Windows installer to ship with SQLite 3.50.4. |
| 1114 |
|
| 1115 |
Tools/Demos |
| 1116 |
----------- |
| 1117 |
|
| 1118 |
- gh-135968: Stubs for ``strip`` are now provided as part of an iOS install. |
| 1119 |
|
| 1120 |
Tests |
| 1121 |
----- |
| 1122 |
|
| 1123 |
- gh-135966: The iOS testbed now handles the ``app_packages`` folder as a |
| 1124 |
site directory. |
| 1125 |
|
| 1126 |
- gh-135494: Fix regrtest to support excluding tests from ``--pgo`` tests. |
| 1127 |
Patch by Victor Stinner. |
| 1128 |
|
| 1129 |
- gh-135489: Show verbose output for failing tests during PGO profiling step |
| 1130 |
with --enable-optimizations. |
| 1131 |
|
| 1132 |
Security |
| 1133 |
-------- |
| 1134 |
|
| 1135 |
- gh-135661: Fix parsing start and end tags in |
| 1136 |
:class:`html.parser.HTMLParser` according to the HTML5 standard. |
| 1137 |
|
| 1138 |
* Whitespaces no longer accepted between ``</`` and the tag name. |
| 1139 |
E.g. ``</ script>`` does not end the script section. |
| 1140 |
|
| 1141 |
* Vertical tabulation (``\v``) and non-ASCII whitespaces no longer recognized |
| 1142 |
as whitespaces. The only whitespaces are ``\t\n\r\f`` and space. |
| 1143 |
|
| 1144 |
* Null character (U+0000) no longer ends the tag name. |
| 1145 |
|
| 1146 |
* Attributes and slashes after the tag name in end tags are now ignored, |
| 1147 |
instead of terminating after the first ``>`` in quoted attribute value. |
| 1148 |
E.g. ``</script/foo=">"/>``. |
| 1149 |
|
| 1150 |
* Multiple slashes and whitespaces between the last attribute and closing ``>`` |
| 1151 |
are now ignored in both start and end tags. E.g. ``<a foo=bar/ //>``. |
| 1152 |
|
| 1153 |
* Multiple ``=`` between attribute name and value are no longer collapsed. |
| 1154 |
E.g. ``<a foo==bar>`` produces attribute "foo" with value "=bar". |
| 1155 |
|
| 1156 |
- gh-102555: Fix comment parsing in :class:`html.parser.HTMLParser` |
| 1157 |
according to the HTML5 standard. ``--!>`` now ends the comment. ``-- >`` |
| 1158 |
no longer ends the comment. Support abnormally ended empty comments |
| 1159 |
``<-->`` and ``<--->``. |
| 1160 |
|
| 1161 |
- gh-135462: Fix quadratic complexity in processing specially crafted input |
| 1162 |
in :class:`html.parser.HTMLParser`. End-of-file errors are now handled |
| 1163 |
according to the HTML5 specs -- comments and declarations are |
| 1164 |
automatically closed, tags are ignored. |
| 1165 |
|
| 1166 |
- gh-118350: Fix support of escapable raw text mode (elements "textarea" and |
| 1167 |
"title") in :class:`html.parser.HTMLParser`. |
| 1168 |
|
| 1169 |
Library |
| 1170 |
------- |
| 1171 |
|
| 1172 |
- gh-132710: If possible, ensure that :func:`uuid.getnode` returns the same |
| 1173 |
result even across different processes. Previously, the result was |
| 1174 |
constant only within the same process. Patch by Bénédikt Tran. |
| 1175 |
|
| 1176 |
- gh-137273: Fix debug assertion failure in :func:`locale.setlocale` on |
| 1177 |
Windows. |
| 1178 |
|
| 1179 |
- gh-137257: Bump the version of pip bundled in ensurepip to version 25.2 |
| 1180 |
|
| 1181 |
- gh-81325: :class:`tarfile.TarFile` now accepts a :term:`path-like |
| 1182 |
<path-like object>` when working on a tar archive. (Contributed by |
| 1183 |
Alexander Enrique Urieles Nieto in :gh:`81325`.) |
| 1184 |
|
| 1185 |
- gh-130522: Fix unraisable :exc:`TypeError` raised during |
| 1186 |
:term:`interpreter shutdown` in the :mod:`threading` module. |
| 1187 |
|
| 1188 |
- gh-130577: :mod:`tarfile` now validates archives to ensure member offsets |
| 1189 |
are non-negative. (Contributed by Alexander Enrique Urieles Nieto in |
| 1190 |
:gh:`130577`.) |
| 1191 |
|
| 1192 |
- gh-136549: Fix signature of :func:`threading.excepthook`. |
| 1193 |
|
| 1194 |
- gh-136523: Fix :class:`wave.Wave_write` emitting an unraisable when open |
| 1195 |
raises. |
| 1196 |
|
| 1197 |
- gh-52876: Add missing ``keepends`` (default ``True``) parameter to |
| 1198 |
:meth:`!codecs.StreamReaderWriter.readline` and |
| 1199 |
:meth:`!codecs.StreamReaderWriter.readlines`. |
| 1200 |
|
| 1201 |
- gh-85702: If ``zoneinfo._common.load_tzdata`` is given a package without a |
| 1202 |
resource a :exc:`zoneinfo.ZoneInfoNotFoundError` is raised rather than a |
| 1203 |
:exc:`PermissionError`. Patch by Victor Stinner. |
| 1204 |
|
| 1205 |
- gh-134759: Fix :exc:`UnboundLocalError` in |
| 1206 |
:func:`email.message.Message.get_payload` when the payload to decode is a |
| 1207 |
:class:`bytes` object. Patch by Kliment Lamonov. |
| 1208 |
|
| 1209 |
- gh-136028: Fix parsing month names containing "İ" (U+0130, LATIN CAPITAL |
| 1210 |
LETTER I WITH DOT ABOVE) in :func:`time.strptime`. This affects locales |
| 1211 |
az_AZ, ber_DZ, ber_MA and crh_UA. |
| 1212 |
|
| 1213 |
- gh-135995: In the palmos encoding, make byte ``0x9b`` decode to ``›`` |
| 1214 |
(U+203A - SINGLE RIGHT-POINTING ANGLE QUOTATION MARK). |
| 1215 |
|
| 1216 |
- gh-53203: Fix :func:`time.strptime` for ``%c`` and ``%x`` formats on |
| 1217 |
locales byn_ER, wal_ET and lzh_TW, and for ``%X`` format on locales ar_SA, |
| 1218 |
bg_BG and lzh_TW. |
| 1219 |
|
| 1220 |
- gh-91555: An earlier change, which was introduced in 3.13.4, has been |
| 1221 |
reverted. It disabled logging for a logger during handling of log messages |
| 1222 |
for that logger. Since the reversion, the behaviour should be as it was |
| 1223 |
before 3.13.4. |
| 1224 |
|
| 1225 |
- gh-135878: Fixes a crash of :class:`types.SimpleNamespace` on :term:`free |
| 1226 |
threading` builds, when several threads were calling its |
| 1227 |
:meth:`~object.__repr__` method at the same time. |
| 1228 |
|
| 1229 |
- gh-135836: Fix :exc:`IndexError` in :meth:`asyncio.loop.create_connection` |
| 1230 |
that could occur when non-\ :exc:`OSError` exception is raised during |
| 1231 |
connection and socket's ``close()`` raises :exc:`!OSError`. |
| 1232 |
|
| 1233 |
- gh-135836: Fix :exc:`IndexError` in :meth:`asyncio.loop.create_connection` |
| 1234 |
that could occur when the Happy Eyeballs algorithm resulted in an empty |
| 1235 |
exceptions list during connection attempts. |
| 1236 |
|
| 1237 |
- gh-135855: Raise :exc:`TypeError` instead of :exc:`SystemError` when |
| 1238 |
:func:`!_interpreters.set___main___attrs` is passed a non-dict object. |
| 1239 |
Patch by Brian Schubert. |
| 1240 |
|
| 1241 |
- gh-135815: :mod:`netrc`: skip security checks if :func:`os.getuid` is |
| 1242 |
missing. Patch by Bénédikt Tran. |
| 1243 |
|
| 1244 |
- gh-135640: Address bug where it was possible to call |
| 1245 |
:func:`xml.etree.ElementTree.ElementTree.write` on an ElementTree object |
| 1246 |
with an invalid root element. This behavior blanked the file passed to |
| 1247 |
``write`` if it already existed. |
| 1248 |
|
| 1249 |
- gh-135444: Fix :meth:`asyncio.DatagramTransport.sendto` to account for |
| 1250 |
datagram header size when data cannot be sent. |
| 1251 |
|
| 1252 |
- gh-135497: Fix :func:`os.getlogin` failing for longer usernames on |
| 1253 |
BSD-based platforms. |
| 1254 |
|
| 1255 |
- gh-135487: Fix :meth:`!reprlib.Repr.repr_int` when given integers with |
| 1256 |
more than :func:`sys.get_int_max_str_digits` digits. Patch by Bénédikt |
| 1257 |
Tran. |
| 1258 |
|
| 1259 |
- gh-135335: :mod:`multiprocessing`: Flush ``stdout`` and ``stderr`` after |
| 1260 |
preloading modules in the ``forkserver``. |
| 1261 |
|
| 1262 |
- gh-135244: :mod:`uuid`: when the MAC address cannot be determined, the |
| 1263 |
48-bit node ID is now generated with a cryptographically-secure |
| 1264 |
pseudo-random number generator (CSPRNG) as per :rfc:`RFC 9562, §6.10.3 |
| 1265 |
<9562#section-6.10-3>`. This affects :func:`~uuid.uuid1`. |
| 1266 |
|
| 1267 |
- gh-135069: Fix the "Invalid error handling" exception in |
| 1268 |
:class:`!encodings.idna.IncrementalDecoder` to correctly replace the |
| 1269 |
'errors' parameter. |
| 1270 |
|
| 1271 |
- gh-134698: Fix a crash when calling methods of :class:`ssl.SSLContext` or |
| 1272 |
:class:`ssl.SSLSocket` across multiple threads. |
| 1273 |
|
| 1274 |
- gh-132124: On POSIX-compliant systems, |
| 1275 |
:func:`!multiprocessing.util.get_temp_dir` now ignores :envvar:`TMPDIR` |
| 1276 |
(and similar environment variables) if the path length of ``AF_UNIX`` |
| 1277 |
socket files exceeds the platform-specific maximum length when using the |
| 1278 |
*forkserver* start method. Patch by Bénédikt Tran. |
| 1279 |
|
| 1280 |
- gh-133439: Fix dot commands with trailing spaces are mistaken for |
| 1281 |
multi-line SQL statements in the sqlite3 command-line interface. |
| 1282 |
|
| 1283 |
- gh-132969: Prevent the :class:`~concurrent.futures.ProcessPoolExecutor` |
| 1284 |
executor thread, which remains running when :meth:`shutdown(wait=False) |
| 1285 |
<concurrent.futures.Executor.shutdown>`, from attempting to adjust the |
| 1286 |
pool's worker processes after the object state has already been reset |
| 1287 |
during shutdown. A combination of conditions, including a worker process |
| 1288 |
having terminated abormally, resulted in an exception and a potential hang |
| 1289 |
when the still-running executor thread attempted to replace dead workers |
| 1290 |
within the pool. |
| 1291 |
|
| 1292 |
- gh-130664: Support the ``'_'`` digit separator in formatting of the |
| 1293 |
integral part of :class:`~decimal.Decimal`'s. Patch by Sergey B |
| 1294 |
Kirpichev. |
| 1295 |
|
| 1296 |
- gh-85702: If ``zoneinfo._common.load_tzdata`` is given a package without a |
| 1297 |
resource a ``ZoneInfoNotFoundError`` is raised rather than a |
| 1298 |
:exc:`IsADirectoryError`. |
| 1299 |
|
| 1300 |
- gh-130664: Handle corner-case for :class:`~fractions.Fraction`'s |
| 1301 |
formatting: treat zero-padding (preceding the width field by a zero |
| 1302 |
(``'0'``) character) as an equivalent to a fill character of ``'0'`` with |
| 1303 |
an alignment type of ``'='``, just as in case of :class:`float`'s. |
| 1304 |
|
| 1305 |
Documentation |
| 1306 |
------------- |
| 1307 |
|
| 1308 |
- gh-135171: Document that the :term:`iterator` for the leftmost |
| 1309 |
:keyword:`!for` clause in the generator expression is created immediately. |
| 1310 |
|
| 1311 |
Core and Builtins |
| 1312 |
----------------- |
| 1313 |
|
| 1314 |
- gh-58124: Fix name of the Python encoding in Unicode errors of the code |
| 1315 |
page codec: use "cp65000" and "cp65001" instead of "CP_UTF7" and "CP_UTF8" |
| 1316 |
which are not valid Python code names. Patch by Victor Stinner. |
| 1317 |
|
| 1318 |
- gh-137314: Fixed a regression where raw f-strings incorrectly interpreted |
| 1319 |
escape sequences in format specifications. Raw f-strings now properly |
| 1320 |
preserve literal backslashes in format specs, matching the behavior from |
| 1321 |
Python 3.11. For example, ``rf"{obj:\xFF}"`` now correctly produces |
| 1322 |
``'\\xFF'`` instead of ``'ÿ'``. Patch by Pablo Galindo. |
| 1323 |
|
| 1324 |
- gh-136541: Fix some issues with the perf trampolines on x86-64 and |
| 1325 |
aarch64. The trampolines were not being generated correctly for some |
| 1326 |
cases, which could lead to the perf integration not working correctly. |
| 1327 |
Patch by Pablo Galindo. |
| 1328 |
|
| 1329 |
- gh-109700: Fix memory error handling in :c:func:`PyDict_SetDefault`. |
| 1330 |
|
| 1331 |
- gh-78465: Fix error message for ``cls.__new__(cls, ...)`` where ``cls`` is |
| 1332 |
not instantiable builtin or extension type (with ``tp_new`` set to |
| 1333 |
``NULL``). |
| 1334 |
|
| 1335 |
- gh-135871: Non-blocking mutex lock attempts now return immediately when |
| 1336 |
the lock is busy instead of briefly spinning in the :term:`free threading` |
| 1337 |
build. |
| 1338 |
|
| 1339 |
- gh-135607: Fix potential :mod:`weakref` races in an object's destructor on |
| 1340 |
the :term:`free threaded <free threading>` build. |
| 1341 |
|
| 1342 |
- gh-135496: Fix typo in the f-string conversion type error ("exclamanation" |
| 1343 |
-> "exclamation"). |
| 1344 |
|
| 1345 |
- gh-130077: Properly raise custom syntax errors when incorrect syntax |
| 1346 |
containing names that are prefixes of soft keywords is encountered. Patch |
| 1347 |
by Pablo Galindo. |
| 1348 |
|
| 1349 |
- gh-135148: Fixed a bug where f-string debug expressions (using =) would |
| 1350 |
incorrectly strip out parts of strings containing escaped quotes and # |
| 1351 |
characters. Patch by Pablo Galindo. |
| 1352 |
|
| 1353 |
- gh-133136: Limit excess memory usage in the :term:`free threading` build |
| 1354 |
when a large dictionary or list is resized and accessed by multiple |
| 1355 |
threads. |
| 1356 |
|
| 1357 |
- gh-132617: Fix :meth:`dict.update` modification check that could |
| 1358 |
incorrectly raise a "dict mutated during update" error when a different |
| 1359 |
dictionary was modified that happens to share the same underlying keys |
| 1360 |
object. |
| 1361 |
|
| 1362 |
- gh-91153: Fix a crash when a :class:`bytearray` is concurrently mutated |
| 1363 |
during item assignment. |
| 1364 |
|
| 1365 |
- gh-127971: Fix off-by-one read beyond the end of a string in string |
| 1366 |
search. |
| 1367 |
|
| 1368 |
- gh-125723: Fix crash with ``gi_frame.f_locals`` when generator frames |
| 1369 |
outlive their generator. Patch by Mikhail Efimov. |
| 1370 |
|
| 1371 |
Build |
| 1372 |
----- |
| 1373 |
|
| 1374 |
- gh-135497: Fix the detection of ``MAXLOGNAME`` in the ``configure.ac`` |
| 1375 |
script. |
| 1376 |
|
| 1377 |
|
| 1378 |
What's New in Python 3.13.5 final? |
| 1379 |
================================== |
| 1380 |
|
| 1381 |
*Release date: 2025-06-11* |
| 1382 |
|
| 1383 |
Windows |
| 1384 |
------- |
| 1385 |
|
| 1386 |
- gh-135151: Avoid distributing modified :file:`pyconfig.h` in the |
| 1387 |
traditional installer. Extension module builds must always specify |
| 1388 |
``Py_GIL_DISABLED`` when targeting the free-threaded runtime. |
| 1389 |
|
| 1390 |
Tests |
| 1391 |
----- |
| 1392 |
|
| 1393 |
- gh-135120: Add :func:`!test.support.subTests`. |
| 1394 |
|
| 1395 |
Library |
| 1396 |
------- |
| 1397 |
|
| 1398 |
- gh-133967: Do not normalize :mod:`locale` name 'C.UTF-8' to 'en_US.UTF-8'. |
| 1399 |
|
| 1400 |
- gh-135326: Restore support of integer-like objects with :meth:`!__index__` |
| 1401 |
in :func:`random.getrandbits`. |
| 1402 |
|
| 1403 |
- gh-135321: Raise a correct exception for values greater than 0x7fffffff |
| 1404 |
for the ``BINSTRING`` opcode in the C implementation of :mod:`pickle`. |
| 1405 |
|
| 1406 |
- gh-135276: Backported bugfixes in zipfile.Path from zipp 3.23. Fixed |
| 1407 |
``.name``, ``.stem`` and other basename-based properties on Windows when |
| 1408 |
working with a zipfile on disk. |
| 1409 |
|
| 1410 |
- gh-134151: :mod:`email`: Fix :exc:`TypeError` in |
| 1411 |
:func:`email.utils.decode_params` when sorting :rfc:`2231` continuations |
| 1412 |
that contain an unnumbered section. |
| 1413 |
|
| 1414 |
- gh-134152: :mod:`email`: Fix parsing of email message ID with invalid |
| 1415 |
domain. |
| 1416 |
|
| 1417 |
- gh-127081: Fix libc thread safety issues with :mod:`os` by replacing |
| 1418 |
``getlogin`` with ``getlogin_r`` re-entrant version. |
| 1419 |
|
| 1420 |
- gh-131884: Fix formatting issues in :func:`json.dump` when both *indent* |
| 1421 |
and *skipkeys* are used. |
| 1422 |
|
| 1423 |
Core and Builtins |
| 1424 |
----------------- |
| 1425 |
|
| 1426 |
- gh-135171: Roll back changes to generator and list comprehensions that |
| 1427 |
went into 3.13.4 to fix GH-127682, but which involved semantic and |
| 1428 |
bytecode changes not appropriate for a bugfix release. |
| 1429 |
|
| 1430 |
C API |
| 1431 |
----- |
| 1432 |
|
| 1433 |
- gh-134989: Fix ``Py_RETURN_NONE``, ``Py_RETURN_TRUE`` and |
| 1434 |
``Py_RETURN_FALSE`` macros in the limited C API 3.11 and older: don't |
| 1435 |
treat ``Py_None``, ``Py_True`` and ``Py_False`` as immortal. Patch by |
| 1436 |
Victor Stinner. |
| 1437 |
|
| 1438 |
- gh-134989: Implement :c:func:`PyObject_DelAttr` and |
| 1439 |
:c:func:`PyObject_DelAttrString` as macros in the limited C API 3.12 and |
| 1440 |
older. Patch by Victor Stinner. |
| 1441 |
|
| 1442 |
|
| 1443 |
What's New in Python 3.13.4 final? |
| 1444 |
================================== |
| 1445 |
|
| 1446 |
*Release date: 2025-06-03* |
| 1447 |
|
| 1448 |
Windows |
| 1449 |
------- |
| 1450 |
|
| 1451 |
- gh-130727: Fix a race in internal calls into WMI that can result in an |
| 1452 |
"invalid handle" exception under high load. Patch by Chris Eibl. |
| 1453 |
|
| 1454 |
- gh-76023: Make :func:`os.path.realpath` ignore Windows error 1005 when in |
| 1455 |
non-strict mode. |
| 1456 |
|
| 1457 |
- gh-133626: Ensures packages are not accidentally bundled into the |
| 1458 |
traditional installer. |
| 1459 |
|
| 1460 |
- gh-133512: Add warnings to :ref:`launcher` about use of subcommands |
| 1461 |
belonging to the Python install manager. |
| 1462 |
|
| 1463 |
Tests |
| 1464 |
----- |
| 1465 |
|
| 1466 |
- gh-133744: Fix multiprocessing interrupt test. Add an event to synchronize |
| 1467 |
the parent process with the child process: wait until the child process |
| 1468 |
starts sleeping. Patch by Victor Stinner. |
| 1469 |
|
| 1470 |
- gh-133639: Fix ``TestPyReplAutoindent.test_auto_indent_default()`` doesn't |
| 1471 |
run ``input_code``. |
| 1472 |
|
| 1473 |
- gh-133131: The iOS testbed will now select the most recently released |
| 1474 |
"SE-class" device for testing if a device isn't explicitly specified. |
| 1475 |
|
| 1476 |
- gh-109981: The test helper that counts the list of open file descriptors |
| 1477 |
now uses the optimised ``/dev/fd`` approach on all Apple platforms, not |
| 1478 |
just macOS. This avoids crashes caused by guarded file descriptors. |
| 1479 |
|
| 1480 |
Security |
| 1481 |
-------- |
| 1482 |
|
| 1483 |
- gh-135034: Fixes multiple issues that allowed ``tarfile`` extraction |
| 1484 |
filters (``filter="data"`` and ``filter="tar"``) to be bypassed using |
| 1485 |
crafted symlinks and hard links. |
| 1486 |
|
| 1487 |
Addresses :cve:`2024-12718`, :cve:`2025-4138`, :cve:`2025-4330`, and |
| 1488 |
:cve:`2025-4517`. |
| 1489 |
|
| 1490 |
- gh-133767: Fix use-after-free in the "unicode-escape" decoder with a |
| 1491 |
non-"strict" error handler. |
| 1492 |
|
| 1493 |
- gh-128840: Short-circuit the processing of long IPv6 addresses early in |
| 1494 |
:mod:`ipaddress` to prevent excessive memory consumption and a minor |
| 1495 |
denial-of-service. |
| 1496 |
|
| 1497 |
Library |
| 1498 |
------- |
| 1499 |
|
| 1500 |
- gh-134718: :func:`ast.dump` now only omits ``None`` and ``[]`` values if |
| 1501 |
they are default values. |
| 1502 |
|
| 1503 |
- gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address. |
| 1504 |
|
| 1505 |
- gh-134696: Built-in HACL* and OpenSSL implementations of hash function |
| 1506 |
constructors now correctly accept the same *documented* named arguments. |
| 1507 |
For instance, :func:`~hashlib.md5` could be previously invoked as |
| 1508 |
``md5(data=data)`` or ``md5(string=string)`` depending on the underlying |
| 1509 |
implementation but these calls were not compatible. Patch by Bénédikt |
| 1510 |
Tran. |
| 1511 |
|
| 1512 |
- gh-134210: :func:`curses.window.getch` now correctly handles signals. |
| 1513 |
Patch by Bénédikt Tran. |
| 1514 |
|
| 1515 |
- gh-80334: :func:`multiprocessing.freeze_support` now checks for work on |
| 1516 |
any "spawn" start method platform rather than only on Windows. |
| 1517 |
|
| 1518 |
- gh-114177: Fix :mod:`asyncio` to not close subprocess pipes which would |
| 1519 |
otherwise error out when the event loop is already closed. |
| 1520 |
|
| 1521 |
- gh-134152: Fixed :exc:`UnboundLocalError` that could occur during |
| 1522 |
:mod:`email` header parsing if an expected trailing delimiter is missing |
| 1523 |
in some contexts. |
| 1524 |
|
| 1525 |
- gh-62184: Remove import of C implementation of :class:`io.FileIO` from |
| 1526 |
Python implementation which has its own implementation |
| 1527 |
|
| 1528 |
- gh-133982: Emit :exc:`RuntimeWarning` in the Python implementation of |
| 1529 |
:mod:`io` when the :term:`file-like object <file object>` is not closed |
| 1530 |
explicitly in the presence of multiple I/O layers. |
| 1531 |
|
| 1532 |
- gh-133890: The :mod:`tarfile` module now handles :exc:`UnicodeEncodeError` |
| 1533 |
in the same way as :exc:`OSError` when cannot extract a member. |
| 1534 |
|
| 1535 |
- gh-134097: Fix interaction of the new :term:`REPL` and :option:`-X |
| 1536 |
showrefcount <-X>` command line option. |
| 1537 |
|
| 1538 |
- gh-133889: The generated directory listing page in |
| 1539 |
:class:`http.server.SimpleHTTPRequestHandler` now only shows the decoded |
| 1540 |
path component of the requested URL, and not the query and fragment. |
| 1541 |
|
| 1542 |
- gh-134098: Fix handling paths that end with a percent-encoded slash |
| 1543 |
(``%2f`` or ``%2F``) in :class:`http.server.SimpleHTTPRequestHandler`. |
| 1544 |
|
| 1545 |
- gh-134062: :mod:`ipaddress`: fix collisions in :meth:`~object.__hash__` |
| 1546 |
for :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` |
| 1547 |
objects. |
| 1548 |
|
| 1549 |
- gh-133745: In 3.13.3 we accidentally changed the signature of the asyncio |
| 1550 |
``create_task()`` family of methods and how it calls a custom task factory |
| 1551 |
in a backwards incompatible way. Since some 3rd party libraries have |
| 1552 |
already made changes to work around the issue that might break if we |
| 1553 |
simply reverted the changes, we're instead changing things to be backwards |
| 1554 |
compatible with 3.13.2 while still supporting those workarounds for |
| 1555 |
3.13.3. In particular, the special-casing of ``name`` and ``context`` is |
| 1556 |
back (until 3.14) and consequently eager tasks may still find that their |
| 1557 |
name hasn't been set before they execute their first yielding await. |
| 1558 |
|
| 1559 |
- gh-71253: Raise :exc:`ValueError` in :func:`open` if *opener* returns a |
| 1560 |
negative file-descriptor in the Python implementation of :mod:`io` to |
| 1561 |
match the C implementation. |
| 1562 |
|
| 1563 |
- gh-77057: Fix handling of invalid markup declarations in |
| 1564 |
:class:`html.parser.HTMLParser`. |
| 1565 |
|
| 1566 |
- gh-133489: :func:`random.getrandbits` can now generate more that 2\ |
| 1567 |
:sup:`31` bits. :func:`random.randbytes` can now generate more that 256 |
| 1568 |
MiB. |
| 1569 |
|
| 1570 |
- gh-133290: Fix attribute caching issue when setting |
| 1571 |
:attr:`ctypes._Pointer._type_` in the undocumented and deprecated |
| 1572 |
:func:`!ctypes.SetPointerType` function and the undocumented |
| 1573 |
:meth:`!set_type` method. |
| 1574 |
|
| 1575 |
- gh-132876: ``ldexp()`` on Windows doesn't round subnormal results before |
| 1576 |
Windows 11, but should. Python's :func:`math.ldexp` wrapper now does |
| 1577 |
round them, so results may change slightly, in rare cases of very small |
| 1578 |
results, on Windows versions before 11. |
| 1579 |
|
| 1580 |
- gh-133089: Use original timeout value for :exc:`subprocess.TimeoutExpired` |
| 1581 |
when the func :meth:`subprocess.run` is called with a timeout instead of |
| 1582 |
sometimes a confusing partial remaining time out value used internally on |
| 1583 |
the final ``wait()``. |
| 1584 |
|
| 1585 |
- gh-133009: :mod:`xml.etree.ElementTree`: Fix a crash in |
| 1586 |
:meth:`Element.__deepcopy__ <object.__deepcopy__>` when the element is |
| 1587 |
concurrently mutated. Patch by Bénédikt Tran. |
| 1588 |
|
| 1589 |
- gh-132995: Bump the version of pip bundled in ensurepip to version 25.1.1 |
| 1590 |
|
| 1591 |
- gh-132017: Fix error when ``pyrepl`` is suspended, then resumed and |
| 1592 |
terminated. |
| 1593 |
|
| 1594 |
- gh-132673: Fix a crash when using ``_align_ = 0`` and ``_fields_ = []`` in |
| 1595 |
a :class:`ctypes.Structure`. |
| 1596 |
|
| 1597 |
- gh-132527: Include the valid typecode 'w' in the error message when an |
| 1598 |
invalid typecode is passed to :class:`array.array`. |
| 1599 |
|
| 1600 |
- gh-132439: Fix ``PyREPL`` on Windows: characters entered via AltGr are |
| 1601 |
swallowed. Patch by Chris Eibl. |
| 1602 |
|
| 1603 |
- gh-132429: Fix support of Bluetooth sockets on NetBSD and DragonFly BSD. |
| 1604 |
|
| 1605 |
- gh-132106: :meth:`QueueListener.start |
| 1606 |
<logging.handlers.QueueListener.start>` now raises a :exc:`RuntimeError` |
| 1607 |
if the listener is already started. |
| 1608 |
|
| 1609 |
- gh-132417: Fix a ``NULL`` pointer dereference when a C function called |
| 1610 |
using :mod:`ctypes` with ``restype`` :class:`~ctypes.py_object` returns |
| 1611 |
``NULL``. |
| 1612 |
|
| 1613 |
- gh-132385: Fix instance error suggestions trigger potential exceptions in |
| 1614 |
:meth:`object.__getattr__` in :mod:`traceback`. |
| 1615 |
|
| 1616 |
- gh-132308: A :class:`traceback.TracebackException` now correctly renders |
| 1617 |
the ``__context__`` and ``__cause__`` attributes from :ref:`falsey |
| 1618 |
<truth>` :class:`Exception`, and the ``exceptions`` attribute from falsey |
| 1619 |
:class:`ExceptionGroup`. |
| 1620 |
|
| 1621 |
- gh-132250: Fixed the :exc:`SystemError` in :mod:`cProfile` when locating |
| 1622 |
the actual C function of a method raises an exception. |
| 1623 |
|
| 1624 |
- gh-132063: Prevent exceptions that evaluate as falsey (namely, when their |
| 1625 |
``__bool__`` method returns ``False`` or their ``__len__`` method returns |
| 1626 |
0) from being ignored by :class:`concurrent.futures.ProcessPoolExecutor` |
| 1627 |
and :class:`concurrent.futures.ThreadPoolExecutor`. |
| 1628 |
|
| 1629 |
- gh-119605: Respect ``follow_wrapped`` for :meth:`!__init__` and |
| 1630 |
:meth:`!__new__` methods when getting the class signature for a class with |
| 1631 |
:func:`inspect.signature`. Preserve class signature after wrapping with |
| 1632 |
:func:`warnings.deprecated`. Patch by Xuehai Pan. |
| 1633 |
|
| 1634 |
- gh-91555: Ignore log messages generated during handling of log messages, |
| 1635 |
to avoid deadlock or infinite recursion. [NOTE: This change has since been |
| 1636 |
reverted.] |
| 1637 |
|
| 1638 |
- gh-131434: Improve error reporting for incorrect format in |
| 1639 |
:func:`time.strptime`. |
| 1640 |
|
| 1641 |
- gh-131127: Systems using LibreSSL now successfully build. |
| 1642 |
|
| 1643 |
- gh-130999: Avoid exiting the new REPL and offer suggestions even if there |
| 1644 |
are non-string candidates when errors occur. |
| 1645 |
|
| 1646 |
- gh-130941: Fix :class:`configparser.ConfigParser` parsing empty |
| 1647 |
interpolation with ``allow_no_value`` set to ``True``. |
| 1648 |
|
| 1649 |
- gh-129098: Fix REPL traceback reporting when using :func:`compile` with an |
| 1650 |
inexisting file. Patch by Bénédikt Tran. |
| 1651 |
|
| 1652 |
- gh-130631: :func:`!http.cookiejar.join_header_words` is now more similar |
| 1653 |
to the original Perl version. It now quotes the same set of characters and |
| 1654 |
always quote values that end with ``"\n"``. |
| 1655 |
|
| 1656 |
- gh-129719: Fix missing :data:`!socket.CAN_RAW_ERR_FILTER` constant in the |
| 1657 |
socket module on Linux systems. It was missing since Python 3.11. |
| 1658 |
|
| 1659 |
- gh-124096: Turn on virtual terminal mode and enable bracketed paste in |
| 1660 |
REPL on Windows console. (If the terminal does not support bracketed |
| 1661 |
paste, enabling it does nothing.) |
| 1662 |
|
| 1663 |
- gh-122559: Remove :meth:`!__reduce__` and :meth:`!__reduce_ex__` methods |
| 1664 |
that always raise :exc:`TypeError` in the C implementation of |
| 1665 |
:class:`io.FileIO`, :class:`io.BufferedReader`, :class:`io.BufferedWriter` |
| 1666 |
and :class:`io.BufferedRandom` and replace them with default |
| 1667 |
:meth:`!__getstate__` methods that raise :exc:`!TypeError`. This restores |
| 1668 |
fine details of behavior of Python 3.11 and older versions. |
| 1669 |
|
| 1670 |
- gh-122179: :func:`hashlib.file_digest` now raises :exc:`BlockingIOError` |
| 1671 |
when no data is available during non-blocking I/O. Before, it added |
| 1672 |
spurious null bytes to the digest. |
| 1673 |
|
| 1674 |
- gh-86155: :meth:`html.parser.HTMLParser.close` no longer loses data when |
| 1675 |
the ``<script>`` tag is not closed. Patch by Waylan Limberg. |
| 1676 |
|
| 1677 |
- gh-69426: Fix :class:`html.parser.HTMLParser` to not unescape character |
| 1678 |
entities in attribute values if they are followed by an ASCII alphanumeric |
| 1679 |
or an equals sign. |
| 1680 |
|
| 1681 |
- bpo-44172: Keep a reference to original :mod:`curses` windows in |
| 1682 |
subwindows so that the original window does not get deleted before |
| 1683 |
subwindows. |
| 1684 |
|
| 1685 |
IDLE |
| 1686 |
---- |
| 1687 |
|
| 1688 |
- gh-112936: fix IDLE: no Shell menu item in single-process mode. |
| 1689 |
|
| 1690 |
Documentation |
| 1691 |
------------- |
| 1692 |
|
| 1693 |
- gh-107006: Move documentation and example code for |
| 1694 |
:class:`threading.local` from its docstring to the official docs. |
| 1695 |
|
| 1696 |
Library |
| 1697 |
------- |
| 1698 |
|
| 1699 |
- gh-134908: Fix crash when iterating over lines in a text file on the |
| 1700 |
:term:`free threaded <free threading>` build. |
| 1701 |
|
| 1702 |
Core and Builtins |
| 1703 |
----------------- |
| 1704 |
|
| 1705 |
- gh-127682: No longer call ``__iter__`` twice in list comprehensions. This |
| 1706 |
brings the behavior of list comprehensions in line with other forms of |
| 1707 |
iteration |
| 1708 |
|
| 1709 |
Library |
| 1710 |
------- |
| 1711 |
|
| 1712 |
- gh-134381: Fix :exc:`RuntimeError` when using a not-started |
| 1713 |
:class:`threading.Thread` after calling :func:`os.fork` |
| 1714 |
|
| 1715 |
Core and Builtins |
| 1716 |
----------------- |
| 1717 |
|
| 1718 |
- gh-128066: Fixes an edge case where PyREPL improperly threw an error when |
| 1719 |
Python is invoked on a read only filesystem while trying to write history |
| 1720 |
file entries. |
| 1721 |
|
| 1722 |
- gh-134100: Fix a use-after-free bug that occurs when an imported module |
| 1723 |
isn't in :data:`sys.modules` after its initial import. Patch by |
| 1724 |
Nico-Posada. |
| 1725 |
|
| 1726 |
- gh-133703: Fix hashtable in dict can be bigger than intended in some |
| 1727 |
situations. |
| 1728 |
|
| 1729 |
- gh-132869: Fix crash in the :term:`free threading` build when accessing an |
| 1730 |
object attribute that may be concurrently inserted or deleted. |
| 1731 |
|
| 1732 |
- gh-132762: :meth:`~dict.fromkeys` no longer loops forever when adding a |
| 1733 |
small set of keys to a large base dict. Patch by Angela Liss. |
| 1734 |
|
| 1735 |
- gh-133543: Fix a possible memory leak that could occur when directly |
| 1736 |
accessing instance dictionaries (``__dict__``) that later become part of a |
| 1737 |
reference cycle. |
| 1738 |
|
| 1739 |
- gh-133516: Raise :exc:`ValueError` when constants ``True``, ``False`` or |
| 1740 |
``None`` are used as an identifier after NFKC normalization. |
| 1741 |
|
| 1742 |
- gh-133441: Fix crash upon setting an attribute with a :class:`dict` |
| 1743 |
subclass. Patch by Victor Stinner. |
| 1744 |
|
| 1745 |
- gh-132942: Fix two races in the type lookup cache. This affected the |
| 1746 |
free-threaded build and could cause crashes (apparently quite difficult to |
| 1747 |
trigger). |
| 1748 |
|
| 1749 |
- gh-132713: Fix ``repr(list)`` race condition: hold a strong reference to |
| 1750 |
the item while calling ``repr(item)``. Patch by Victor Stinner. |
| 1751 |
|
| 1752 |
- gh-132747: Fix a crash when calling :meth:`~object.__get__` of a |
| 1753 |
:term:`method` with a :const:`None` second argument. |
| 1754 |
|
| 1755 |
- gh-132542: Update :attr:`Thread.native_id <threading.Thread.native_id>` |
| 1756 |
after :manpage:`fork(2)` to ensure accuracy. Patch by Noam Cohen. |
| 1757 |
|
| 1758 |
- gh-124476: Fix decoding from the locale encoding in the C.UTF-8 locale. |
| 1759 |
|
| 1760 |
- gh-131927: Compiler warnings originating from the same module and line |
| 1761 |
number are now only emitted once, matching the behaviour of warnings |
| 1762 |
emitted from user code. This can also be configured with :mod:`warnings` |
| 1763 |
filters. |
| 1764 |
|
| 1765 |
- gh-127682: No longer call ``__iter__`` twice when creating and executing a |
| 1766 |
generator expression. Creating a generator expression from a non-interable |
| 1767 |
will raise only when the generator expression is executed. This brings the |
| 1768 |
behavior of generator expressions in line with other generators. |
| 1769 |
|
| 1770 |
- gh-131878: Handle uncaught exceptions in the main input loop for the new |
| 1771 |
REPL. |
| 1772 |
|
| 1773 |
- gh-131878: Fix support of unicode characters with two or more codepoints |
| 1774 |
on Windows in the new REPL. |
| 1775 |
|
| 1776 |
- gh-130804: Fix support of unicode characters on Windows in the new REPL. |
| 1777 |
|
| 1778 |
- gh-130070: Fixed an assertion error for :func:`exec` passed a string |
| 1779 |
``source`` and a non-``None`` ``closure``. Patch by Bartosz Sławecki. |
| 1780 |
|
| 1781 |
- gh-129958: Fix a bug that was allowing newlines inconsitently in format |
| 1782 |
specifiers for single-quoted f-strings. Patch by Pablo Galindo. |
| 1783 |
|
| 1784 |
C API |
| 1785 |
----- |
| 1786 |
|
| 1787 |
- gh-132909: Fix an overflow when handling the :ref:`K |
| 1788 |
<capi-py-buildvalue-format-K>` format in :c:func:`Py_BuildValue`. Patch by |
| 1789 |
Bénédikt Tran. |
| 1790 |
|
| 1791 |
Build |
| 1792 |
----- |
| 1793 |
|
| 1794 |
- gh-134923: Windows builds with profile-guided optimization enabled now use |
| 1795 |
``/GENPROFILE`` and ``/USEPROFILE`` instead of deprecated ``/LTCG:`` |
| 1796 |
options. |
| 1797 |
|
| 1798 |
- gh-133183: iOS compiler shims now include ``IPHONEOS_DEPLOYMENT_TARGET`` |
| 1799 |
in target triples, ensuring that SDK version minimums are honored. |
| 1800 |
|
| 1801 |
- gh-133167: Fix compilation process with ``--enable-optimizations`` and |
| 1802 |
``--without-docstrings``. |
| 1803 |
|
| 1804 |
- gh-132649: The :file:`PC\layout` script now allows passing |
| 1805 |
``--include-tcltk`` on Windows ARM64. |
| 1806 |
|
| 1807 |
- gh-117088: AIX linker don't support -h option, so avoid it through |
| 1808 |
platform check |
| 1809 |
|
| 1810 |
- gh-132026: Fix use of undefined identifiers in platform triplet detection |
| 1811 |
on MIPS Linux platforms. |
| 1812 |
|
| 1813 |
|
| 1814 |
What's New in Python 3.13.3 final? |
| 1815 |
================================== |
| 1816 |
|
| 1817 |
*Release date: 2025-04-08* |
| 1818 |
|
| 1819 |
macOS |
| 1820 |
----- |
| 1821 |
|
| 1822 |
- gh-124111: Update macOS installer to use Tcl/Tk 8.6.16. |
| 1823 |
|
| 1824 |
- gh-131423: Update macOS installer to use OpenSSL 3.0.16. Patch by Bénédikt |
| 1825 |
Tran. |
| 1826 |
|
| 1827 |
- gh-131025: Update macOS installer to ship with SQLite 3.49.1. |
| 1828 |
|
| 1829 |
- gh-91132: Update macOS installer to use ncurses 6.5. |
| 1830 |
|
| 1831 |
Windows |
| 1832 |
------- |
| 1833 |
|
| 1834 |
- gh-131423: Update bundled version of OpenSSL to 3.0.16. The new build also |
| 1835 |
disables uplink support, which may be relevant to embedders but has no |
| 1836 |
impact on normal use. |
| 1837 |
|
| 1838 |
- gh-131025: Update Windows installer to ship with SQLite 3.49.1. |
| 1839 |
|
| 1840 |
- gh-131020: :source:`pylauncher <PC/launcher2.c>` correctly detects a BOM |
| 1841 |
when searching for the shebang. Fix by Chris Eibl. |
| 1842 |
|
| 1843 |
Tools/Demos |
| 1844 |
----------- |
| 1845 |
|
| 1846 |
- gh-131852: :program:`msgfmt` no longer adds the ``POT-Creation-Date`` to |
| 1847 |
generated ``.mo`` files for consistency with GNU ``msgfmt``. |
| 1848 |
|
| 1849 |
- gh-85012: Correctly reset ``msgctxt`` when compiling messages in |
| 1850 |
:program:`msgfmt`. |
| 1851 |
|
| 1852 |
- gh-130025: The iOS testbed now correctly handles symlinks used as Python |
| 1853 |
framework references. |
| 1854 |
|
| 1855 |
Tests |
| 1856 |
----- |
| 1857 |
|
| 1858 |
- gh-131050: ``test_ssl.test_dh_params`` is skipped if the underlying TLS |
| 1859 |
library does not support finite-field ephemeral Diffie-Hellman. |
| 1860 |
|
| 1861 |
- gh-129200: Multiple iOS testbed runners can now be started at the same |
| 1862 |
time without introducing an ambiguity over simulator ownership. |
| 1863 |
|
| 1864 |
- gh-130292: The iOS testbed will now run successfully on a machine that has |
| 1865 |
not previously run Xcode tests (such as CI configurations). |
| 1866 |
|
| 1867 |
- gh-130293: The tests of terminal colorization are no longer sensitive to |
| 1868 |
the value of the ``TERM`` variable in the testing environment. |
| 1869 |
|
| 1870 |
- gh-126332: Add unit tests for pyrepl. |
| 1871 |
|
| 1872 |
Security |
| 1873 |
-------- |
| 1874 |
|
| 1875 |
- gh-131809: Update bundled libexpat to 2.7.1 |
| 1876 |
|
| 1877 |
- gh-131261: Upgrade to libexpat 2.7.0 |
| 1878 |
|
| 1879 |
- gh-127371: Avoid unbounded buffering for |
| 1880 |
:meth:`!tempfile.SpooledTemporaryFile.writelines`. Previously, disk |
| 1881 |
spillover was only checked after the lines iterator had been exhausted. |
| 1882 |
This is now done after each line is written. |
| 1883 |
|
| 1884 |
- gh-121284: Fix bug in the folding of rfc2047 encoded-words when flattening |
| 1885 |
an email message using a modern email policy. Previously when an |
| 1886 |
encoded-word was too long for a line, it would be decoded, split across |
| 1887 |
lines, and re-encoded. But commas and other special characters in the |
| 1888 |
original text could be left unencoded and unquoted. This could |
| 1889 |
theoretically be used to spoof header lines using a carefully constructed |
| 1890 |
encoded-word if the resulting rendered email was transmitted or re-parsed. |
| 1891 |
|
| 1892 |
Library |
| 1893 |
------- |
| 1894 |
|
| 1895 |
- gh-132174: Fix function name in error message of |
| 1896 |
``_interpreters.run_string``. |
| 1897 |
|
| 1898 |
- gh-132171: Fix crash of ``_interpreters.run_string`` on string subclasses. |
| 1899 |
|
| 1900 |
- gh-129204: Introduce new ``_PYTHON_SUBPROCESS_USE_POSIX_SPAWN`` |
| 1901 |
environment variable knob in :mod:`subprocess` to control the use of |
| 1902 |
:func:`os.posix_spawn`. |
| 1903 |
|
| 1904 |
- gh-132159: Do not shadow user arguments in generated :meth:`!__new__` by |
| 1905 |
decorator :class:`warnings.deprecated`. Patch by Xuehai Pan. |
| 1906 |
|
| 1907 |
- gh-132075: Fix possible use of :mod:`socket` address structures with |
| 1908 |
uninitialized members. Now all structure members are initialized with |
| 1909 |
zeroes by default. |
| 1910 |
|
| 1911 |
- gh-132002: Fix crash when deallocating :class:`contextvars.ContextVar` |
| 1912 |
with weird unahashable string names. |
| 1913 |
|
| 1914 |
- gh-131668: :mod:`socket`: Fix code parsing AF_BLUETOOTH socket addresses. |
| 1915 |
|
| 1916 |
- gh-131492: Fix a resource leak when constructing a :class:`gzip.GzipFile` |
| 1917 |
with a filename fails, for example when passing an invalid |
| 1918 |
``compresslevel``. |
| 1919 |
|
| 1920 |
- gh-131325: Fix sendfile fallback implementation to drain data after |
| 1921 |
writing to transport in :mod:`asyncio`. |
| 1922 |
|
| 1923 |
- gh-129843: Fix incorrect argument passing in |
| 1924 |
:func:`warnings.warn_explicit`. |
| 1925 |
|
| 1926 |
- gh-131204: Use monospace font from System Font Stack for cross-platform |
| 1927 |
support in :class:`difflib.HtmlDiff`. |
| 1928 |
|
| 1929 |
- gh-130940: The ``PyConfig.use_system_logger`` attribute, introduced in |
| 1930 |
Python 3.13.2, has been removed. The introduction of this attribute |
| 1931 |
inadvertently introduced an ABI breakage on macOS and iOS. The use of the |
| 1932 |
system logger is now enabled by default on iOS, and disabled by default on |
| 1933 |
macOS. |
| 1934 |
|
| 1935 |
- gh-131045: Fix issue with ``__contains__``, values, and pseudo-members for |
| 1936 |
:class:`enum.Flag`. |
| 1937 |
|
| 1938 |
- gh-130959: Fix pure-Python implementation of |
| 1939 |
:func:`datetime.time.fromisoformat` to reject times with spaces in |
| 1940 |
fractional part (for example, ``12:34:56.400 +02:00``), matching the C |
| 1941 |
implementation. Patch by Michał Gorny. |
| 1942 |
|
| 1943 |
- gh-130637: Add validation for numeric response data in poplib.POP3.stat() |
| 1944 |
method |
| 1945 |
|
| 1946 |
- gh-130461: Remove ``.. index::`` directives from the :mod:`uuid` module |
| 1947 |
documentation. These directives previously created entries in the general |
| 1948 |
index for :func:`~uuid.getnode` as well as the :func:`~uuid.uuid1`, |
| 1949 |
:func:`~uuid.uuid3`, :func:`~uuid.uuid4`, and :func:`~uuid.uuid5` |
| 1950 |
constructor functions. |
| 1951 |
|
| 1952 |
- gh-130379: The zipapp module now calculates the list of files to be added |
| 1953 |
to the archive before creating the archive. This avoids accidentally |
| 1954 |
including the target when it is being created in the source directory. |
| 1955 |
|
| 1956 |
- gh-130285: Fix corner case for :func:`random.sample` allowing the *counts* |
| 1957 |
parameter to specify an empty population. So now, ``sample([], 0, |
| 1958 |
counts=[])`` and ``sample('abc', k=0, counts=[0, 0, 0])`` both give the |
| 1959 |
same result as ``sample([], 0)``. |
| 1960 |
|
| 1961 |
- gh-130250: Fix regression in ``traceback.print_last()``. |
| 1962 |
|
| 1963 |
- gh-130230: Fix crash in :func:`pow` with only :class:`~decimal.Decimal` |
| 1964 |
third argument. |
| 1965 |
|
| 1966 |
- gh-118761: Reverts a change in the previous release attempting to make |
| 1967 |
some stdlib imports used within the :mod:`subprocess` module lazy as this |
| 1968 |
was causing errors during ``__del__`` finalizers calling methods such as |
| 1969 |
``terminate``, or ``kill``, or ``send_signal``. |
| 1970 |
|
| 1971 |
- gh-130164: Fixed failure to raise :exc:`TypeError` in |
| 1972 |
:meth:`inspect.Signature.bind` for positional-only arguments provided by |
| 1973 |
keyword when a variadic keyword argument (e.g. ``**kwargs``) is present. |
| 1974 |
|
| 1975 |
- gh-130151: Fix reference leaks in :func:`!_hashlib.hmac_new` and |
| 1976 |
:func:`!_hashlib.hmac_digest`. Patch by Bénédikt Tran. |
| 1977 |
|
| 1978 |
- gh-130145: Fix :meth:`!asyncio.AbstractEventloop.run_forever` when another |
| 1979 |
loop is already running. |
| 1980 |
|
| 1981 |
- gh-129726: Fix :class:`gzip.GzipFile` raising an unraisable exception |
| 1982 |
during garbage collection when referring to a temporary object by breaking |
| 1983 |
the reference loop with :mod:`weakref`. |
| 1984 |
|
| 1985 |
- gh-127750: Remove broken :func:`functools.singledispatchmethod` caching |
| 1986 |
introduced in :gh:`85160`. |
| 1987 |
|
| 1988 |
- gh-129583: Update bundled pip to 25.0.1 |
| 1989 |
|
| 1990 |
- gh-97850: Update the deprecation warning of |
| 1991 |
:meth:`importlib.abc.Loader.load_module`. |
| 1992 |
|
| 1993 |
- gh-129646: Update the locale alias mapping in the :mod:`locale` module to |
| 1994 |
match the latest X Org locale alias mapping and support new locales in |
| 1995 |
Glibc 2.41. |
| 1996 |
|
| 1997 |
- gh-129603: Fix bugs where :class:`sqlite3.Row` objects could segfault if |
| 1998 |
their inherited :attr:`~sqlite3.Cursor.description` was set to ``None``. |
| 1999 |
Patch by Erlend Aasland. |
| 2000 |
|
| 2001 |
- gh-128231: Execution of multiple statements in the new REPL now stops |
| 2002 |
immediately upon the first exception encountered. Patch by Bartosz |
| 2003 |
Sławecki. |
| 2004 |
|
| 2005 |
- gh-117779: Fix reading duplicated entries in :mod:`zipfile` by name. |
| 2006 |
Reading duplicated entries (except the last one) by ``ZipInfo`` now emits |
| 2007 |
a warning instead of raising an exception. |
| 2008 |
|
| 2009 |
- gh-128772: Fix :mod:`pydoc` for methods with the ``__module__`` attribute |
| 2010 |
equal to ``None``. |
| 2011 |
|
| 2012 |
- gh-92897: Scheduled the deprecation of the ``check_home`` argument of |
| 2013 |
:func:`sysconfig.is_python_build` to Python 3.15. |
| 2014 |
|
| 2015 |
- gh-128657: Fix possible extra reference when using objects returned by |
| 2016 |
:func:`hashlib.sha256` under :term:`free threading`. |
| 2017 |
|
| 2018 |
- gh-128703: Fix :func:`mimetypes.guess_type` to use default mapping for |
| 2019 |
empty ``Content-Type`` in registry. |
| 2020 |
|
| 2021 |
- gh-128308: Support the *name* keyword argument for eager tasks in |
| 2022 |
:func:`asyncio.loop.create_task`, :func:`asyncio.create_task` and |
| 2023 |
:func:`asyncio.TaskGroup.create_task`, by passing on all *kwargs* to the |
| 2024 |
task factory set by :func:`asyncio.loop.set_task_factory`. |
| 2025 |
|
| 2026 |
- gh-128388: Fix ``PyREPL`` on Windows to support more keybindings, like the |
| 2027 |
:kbd:`Control-←` and :kbd:`Control-→` word-skipping keybindings and those |
| 2028 |
with meta (i.e. :kbd:`Alt`), e.g. :kbd:`Alt-d` to ``kill-word`` or |
| 2029 |
:kbd:`Alt-Backspace` ``backward-kill-word``. |
| 2030 |
|
| 2031 |
- gh-126037: :mod:`xml.etree.ElementTree`: Fix a crash in |
| 2032 |
:meth:`Element.find <xml.etree.ElementTree.Element.find>`, |
| 2033 |
:meth:`Element.findtext <xml.etree.ElementTree.Element.findtext>` and |
| 2034 |
:meth:`Element.findall <xml.etree.ElementTree.Element.findall>` when the |
| 2035 |
tag to find implements an :meth:`~object.__eq__` method mutating the |
| 2036 |
element being queried. Patch by Bénédikt Tran. |
| 2037 |
|
| 2038 |
- gh-127712: Fix handling of the ``secure`` argument of |
| 2039 |
:class:`logging.handlers.SMTPHandler`. |
| 2040 |
|
| 2041 |
- gh-126033: :mod:`xml.etree.ElementTree`: Fix a crash in |
| 2042 |
:meth:`Element.remove <xml.etree.ElementTree.Element.remove>` when the |
| 2043 |
element is concurrently mutated. Patch by Bénédikt Tran. |
| 2044 |
|
| 2045 |
- gh-118201: Fixed intermittent failures of :any:`os.confstr`, |
| 2046 |
:any:`os.pathconf` and :any:`os.sysconf` on iOS and Android. |
| 2047 |
|
| 2048 |
- gh-124927: Non-printing characters are now properly handled in the new |
| 2049 |
REPL. |
| 2050 |
|
| 2051 |
IDLE |
| 2052 |
---- |
| 2053 |
|
| 2054 |
- gh-129873: Simplify displaying the IDLE doc by only copying the text |
| 2055 |
section of idle.html to idlelib/help.html. Patch by Stan Ulbrych. |
| 2056 |
|
| 2057 |
Documentation |
| 2058 |
------------- |
| 2059 |
|
| 2060 |
- gh-131417: Mention :class:`asyncio.Future` and :class:`asyncio.Task` in |
| 2061 |
generic classes list. |
| 2062 |
|
| 2063 |
- gh-125722: Require Sphinx 8.2.0 or later to build the Python |
| 2064 |
documentation. Patch by Adam Turner. |
| 2065 |
|
| 2066 |
- gh-129712: The wheel tags supported by each macOS universal SDK option are |
| 2067 |
now documented. |
| 2068 |
|
| 2069 |
- gh-46236: C API: Document :c:func:`PyUnicode_RSplit`, |
| 2070 |
:c:func:`PyUnicode_Partition` and :c:func:`PyUnicode_RPartition`. |
| 2071 |
|
| 2072 |
Core and Builtins |
| 2073 |
----------------- |
| 2074 |
|
| 2075 |
- gh-132011: Fix crash when calling :meth:`!list.append` as an unbound |
| 2076 |
method. |
| 2077 |
|
| 2078 |
- gh-131998: Fix a crash when using an unbound method :term:`descriptor` |
| 2079 |
object in a function where a bound method descriptor was used. |
| 2080 |
|
| 2081 |
- gh-131988: Fix a performance regression that caused scaling bottlenecks in |
| 2082 |
the free threaded build in 3.13.1 and 3.13.2. |
| 2083 |
|
| 2084 |
- gh-131719: Fix missing NULL check in ``_PyMem_FreeDelayed`` in |
| 2085 |
:term:`free-threaded <free threading>` build. |
| 2086 |
|
| 2087 |
- gh-131670: Fix :func:`anext` failing on sync :meth:`~object.__anext__` |
| 2088 |
raising an exception. |
| 2089 |
|
| 2090 |
- gh-131141: Fix data race in :data:`sys.monitoring` instrumentation while |
| 2091 |
registering callback. |
| 2092 |
|
| 2093 |
- gh-130932: Fix incorrect exception handling in |
| 2094 |
``_PyModule_IsPossiblyShadowing`` |
| 2095 |
|
| 2096 |
- gh-130851: Fix a crash in the :term:`free threading` build when |
| 2097 |
constructing a :class:`code` object with :attr:`~codeobject.co_consts` |
| 2098 |
that contains instances of types that are not otherwise generated by the |
| 2099 |
bytecode compiler. |
| 2100 |
|
| 2101 |
- gh-130794: Fix memory leak in the :term:`free threaded <free threading>` |
| 2102 |
build when resizing a shared list or dictionary from multiple short-lived |
| 2103 |
threads. |
| 2104 |
|
| 2105 |
- gh-130775: Do not crash on negative ``column`` and ``end_column`` in |
| 2106 |
:mod:`ast` locations. |
| 2107 |
|
| 2108 |
- gh-130382: Fix ``PyRefTracer_DESTROY`` not being sent from |
| 2109 |
:file:`Python/ceval.c` ``Py_DECREF()``. |
| 2110 |
|
| 2111 |
- gh-130618: Fix a bug that was causing ``UnicodeDecodeError`` or |
| 2112 |
``SystemError`` to be raised when using f-strings with ``lambda`` |
| 2113 |
expressions with non-ASCII characters. Patch by Pablo Galindo |
| 2114 |
|
| 2115 |
- gh-130163: Fix possible crashes related to concurrent change and use of |
| 2116 |
the :mod:`sys` module attributes. |
| 2117 |
|
| 2118 |
- gh-88887: Fixing multiprocessing Resource Tracker process leaking, usually |
| 2119 |
observed when running Python as PID 1. |
| 2120 |
|
| 2121 |
- gh-130115: Fix an issue with thread identifiers being sign-extended on |
| 2122 |
some platforms. |
| 2123 |
|
| 2124 |
- gh-128396: Fix a crash that occurs when calling :func:`locals` inside an |
| 2125 |
inline comprehension that uses the same local variable as the outer frame |
| 2126 |
scope where the variable is a free or cell var. |
| 2127 |
|
| 2128 |
- gh-116042: Fix location for SyntaxErrors of invalid escapes in the |
| 2129 |
tokenizer. Patch by Pablo Galindo |
| 2130 |
|
| 2131 |
Library |
| 2132 |
------- |
| 2133 |
|
| 2134 |
- gh-129983: Fix data race in compile_template in :file:`sre.c`. |
| 2135 |
|
| 2136 |
Core and Builtins |
| 2137 |
----------------- |
| 2138 |
|
| 2139 |
- gh-129967: Fix a race condition in the :term:`free threading` build when |
| 2140 |
``repr(set)`` is called concurrently with ``set.clear()``. |
| 2141 |
|
| 2142 |
- gh-129900: Fix return codes inside :exc:`SystemExit` not getting returned |
| 2143 |
by the REPL. |
| 2144 |
|
| 2145 |
- gh-129732: Fixed a race in ``_Py_qsbr_reserve`` in the free threading |
| 2146 |
build. |
| 2147 |
|
| 2148 |
- gh-129643: Fix thread safety of :c:func:`PyList_Insert` in free-threading |
| 2149 |
builds. |
| 2150 |
|
| 2151 |
- gh-129668: Fix race condition when raising :exc:`MemoryError` in the free |
| 2152 |
threaded build. |
| 2153 |
|
| 2154 |
- gh-129643: Fix thread safety of :c:func:`PyList_SetItem` in free-threading |
| 2155 |
builds. Patch by Kumar Aditya. |
| 2156 |
|
| 2157 |
- gh-128714: Fix the potential races in get/set dunder methods |
| 2158 |
``__annotations__``, ``__annotate__`` and ``__type_params__`` for function |
| 2159 |
object, and add related tests. |
| 2160 |
|
| 2161 |
- gh-128632: Disallow ``__classdict__`` as the name of a type parameter. |
| 2162 |
Using this name would previously crash the interpreter in some |
| 2163 |
circumstances. |
| 2164 |
|
| 2165 |
- gh-127953: The time to handle a ``LINE`` event in sys.monitoring (and |
| 2166 |
sys.settrace) is now independent of the number of lines in the code |
| 2167 |
object. |
| 2168 |
|
| 2169 |
- gh-125331: ``from __future__ import barry_as_FLUFL`` now works in more |
| 2170 |
contexts, including when it is used in files, with the ``-c`` flag, and in |
| 2171 |
the REPL when there are multiple statements on the same line. Previously, |
| 2172 |
it worked only on subsequent lines in the REPL, and when the appropriate |
| 2173 |
flags were passed directly to :func:`compile`. Patch by Pablo Galindo. |
| 2174 |
|
| 2175 |
C API |
| 2176 |
----- |
| 2177 |
|
| 2178 |
- gh-131740: Update PyUnstable_GC_VisitObjects to traverse perm gen. |
| 2179 |
|
| 2180 |
- gh-129533: Update :c:func:`PyGC_Enable()`, :c:func:`PyGC_Disable()`, |
| 2181 |
:c:func:`PyGC_IsEnabled()` to use atomic operation for thread-safety at |
| 2182 |
free-threading build. Patch by Donghee Na. |
| 2183 |
|
| 2184 |
Build |
| 2185 |
----- |
| 2186 |
|
| 2187 |
- gh-131865: The DTrace build now properly passes the ``CC`` and ``CFLAGS`` |
| 2188 |
variables to the ``dtrace`` command when utilizing SystemTap on Linux. |
| 2189 |
|
| 2190 |
- gh-131675: Fix mimalloc library builds for 32-bit ARM targets. |
| 2191 |
|
| 2192 |
- gh-130673: Fix potential ``KeyError`` when handling object sections during |
| 2193 |
JIT building process. |
| 2194 |
|
| 2195 |
- gh-130740: Ensure that ``Python.h`` is included before ``stdbool.h`` |
| 2196 |
unless ``pyconfig.h`` is included before or in some platform-specific |
| 2197 |
contexts. |
| 2198 |
|
| 2199 |
- gh-129838: Don't redefine ``_Py_NO_SANITIZE_UNDEFINED`` when compiling |
| 2200 |
with a recent GCC version and undefined sanitizer enabled. |
| 2201 |
|
| 2202 |
- gh-129660: Drop ``test_embed`` from PGO training, whose contribution in |
| 2203 |
recent versions is considered to be ignorable. |
| 2204 |
|
| 2205 |
|
| 2206 |
What's New in Python 3.13.2 final? |
| 2207 |
================================== |
| 2208 |
|
| 2209 |
*Release date: 2025-02-04* |
| 2210 |
|
| 2211 |
macOS |
| 2212 |
----- |
| 2213 |
|
| 2214 |
- gh-127592: Usage of the unified Apple System Log APIs was disabled when |
| 2215 |
the minimum macOS version is earlier than 10.12. |
| 2216 |
|
| 2217 |
Windows |
| 2218 |
------- |
| 2219 |
|
| 2220 |
- gh-127353: Allow to force color output on Windows using environment |
| 2221 |
variables. Patch by Andrey Efremov. |
| 2222 |
|
| 2223 |
Tools/Demos |
| 2224 |
----------- |
| 2225 |
|
| 2226 |
- gh-129248: The iOS test runner now strips the log prefix from each line |
| 2227 |
output by the test suite. |
| 2228 |
|
| 2229 |
- gh-128152: Fix a bug where Argument Clinic's C pre-processor parser tried |
| 2230 |
to parse pre-processor directives inside C comments. Patch by Erlend |
| 2231 |
Aasland. |
| 2232 |
|
| 2233 |
Tests |
| 2234 |
----- |
| 2235 |
|
| 2236 |
- gh-127906: Test the limited C API in test_cppext. Patch by Victor Stinner. |
| 2237 |
|
| 2238 |
- gh-127637: Add tests for the :mod:`dis` command-line interface. Patch by |
| 2239 |
Bénédikt Tran. |
| 2240 |
|
| 2241 |
- gh-126925: iOS test results are now streamed during test execution, and |
| 2242 |
the deprecated xcresulttool is no longer used. |
| 2243 |
|
| 2244 |
Security |
| 2245 |
-------- |
| 2246 |
|
| 2247 |
- gh-105704: When using :func:`urllib.parse.urlsplit` and |
| 2248 |
:func:`urllib.parse.urlparse` host parsing would not reject domain names |
| 2249 |
containing square brackets (``[`` and ``]``). Square brackets are only |
| 2250 |
valid for IPv6 and IPvFuture hosts according to `RFC 3986 Section 3.2.2 |
| 2251 |
<https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2>`__. |
| 2252 |
|
| 2253 |
- gh-127655: Fixed the |
| 2254 |
:class:`!asyncio.selector_events._SelectorSocketTransport` transport not |
| 2255 |
pausing writes for the protocol when the buffer reaches the high water |
| 2256 |
mark when using :meth:`asyncio.WriteTransport.writelines`. |
| 2257 |
|
| 2258 |
- gh-126108: Fix a possible ``NULL`` pointer dereference in |
| 2259 |
:c:func:`!PySys_AddWarnOptionUnicode`. |
| 2260 |
|
| 2261 |
- gh-80222: Fix bug in the folding of quoted strings when flattening an |
| 2262 |
email message using a modern email policy. Previously when a quoted string |
| 2263 |
was folded so that it spanned more than one line, the surrounding quotes |
| 2264 |
and internal escapes would be omitted. This could theoretically be used to |
| 2265 |
spoof header lines using a carefully constructed quoted string if the |
| 2266 |
resulting rendered email was transmitted or re-parsed. |
| 2267 |
|
| 2268 |
- gh-119511: Fix a potential denial of service in the :mod:`imaplib` module. |
| 2269 |
When connecting to a malicious server, it could cause an arbitrary amount |
| 2270 |
of memory to be allocated. On many systems this is harmless as unused |
| 2271 |
virtual memory is only a mapping, but if this hit a virtual address size |
| 2272 |
limit it could lead to a :exc:`MemoryError` or other process crash. On |
| 2273 |
unusual systems or builds where all allocated memory is touched and backed |
| 2274 |
by actual ram or storage it could've consumed resources doing so until |
| 2275 |
similarly crashing. |
| 2276 |
|
| 2277 |
Library |
| 2278 |
------- |
| 2279 |
|
| 2280 |
- gh-129502: Unlikely errors in preparing arguments for :mod:`ctypes` |
| 2281 |
callback are now handled in the same way as errors raised in the callback |
| 2282 |
of in converting the result of the callback -- using |
| 2283 |
:func:`sys.unraisablehook` instead of :func:`sys.excepthook` and not |
| 2284 |
setting :data:`sys.last_exc` and other variables. |
| 2285 |
|
| 2286 |
- gh-129403: Corrected :exc:`ValueError` message for |
| 2287 |
:class:`asyncio.Barrier` and :class:`threading.Barrier`. |
| 2288 |
|
| 2289 |
- gh-129409: Fix an integer overflow in the :mod:`csv` module when writing a |
| 2290 |
data field larger than 2GB. |
| 2291 |
|
| 2292 |
- gh-118761: Improve import time of :mod:`subprocess` by lazy importing |
| 2293 |
``locale`` and ``signal``. Patch by Taneli Hukkinen. |
| 2294 |
|
| 2295 |
- gh-129346: In :mod:`sqlite3`, handle out-of-memory when creating |
| 2296 |
user-defined SQL functions. |
| 2297 |
|
| 2298 |
- gh-129061: Fix FORCE_COLOR and NO_COLOR when empty strings. Patch by Hugo |
| 2299 |
van Kemenade. |
| 2300 |
|
| 2301 |
- gh-128550: Removed an incorrect optimization relating to eager tasks in |
| 2302 |
:class:`asyncio.TaskGroup` that resulted in cancellations being missed. |
| 2303 |
|
| 2304 |
- gh-128991: Release the enter frame reference within :mod:`bdb` callback |
| 2305 |
|
| 2306 |
- gh-128978: Fix a :exc:`NameError` in |
| 2307 |
:func:`!sysconfig.expand_makefile_vars`. Patch by Bénédikt Tran. |
| 2308 |
|
| 2309 |
- gh-128961: Fix a crash when setting state on an exhausted |
| 2310 |
:class:`array.array` iterator. |
| 2311 |
|
| 2312 |
- gh-128894: Fix ``traceback.TracebackException._format_syntax_error`` not |
| 2313 |
to fail on exceptions with custom metadata. |
| 2314 |
|
| 2315 |
- gh-128916: Do not attempt to set ``SO_REUSEPORT`` on sockets of address |
| 2316 |
families other than ``AF_INET`` and ``AF_INET6``, as it is meaningless |
| 2317 |
with these address families, and the call with fail with Linux kernel |
| 2318 |
6.12.9 and newer. |
| 2319 |
|
| 2320 |
- gh-128679: Fix :func:`tracemalloc.stop` race condition. Fix |
| 2321 |
:mod:`tracemalloc` to support calling :func:`tracemalloc.stop` in one |
| 2322 |
thread, while another thread is tracing memory allocations. Patch by |
| 2323 |
Victor Stinner. |
| 2324 |
|
| 2325 |
- gh-128636: Fix PyREPL failure when :data:`os.environ` is overwritten with |
| 2326 |
an invalid value. |
| 2327 |
|
| 2328 |
- gh-128562: Fix possible conflicts in generated :mod:`tkinter` widget names |
| 2329 |
if the widget class name ends with a digit. |
| 2330 |
|
| 2331 |
- gh-128498: Default to stdout isatty for color detection instead of stderr. |
| 2332 |
Patch by Hugo van Kemenade. |
| 2333 |
|
| 2334 |
- gh-128552: Fix cyclic garbage introduced by |
| 2335 |
:meth:`asyncio.loop.create_task` and :meth:`asyncio.TaskGroup.create_task` |
| 2336 |
holding a reference to the created task if it is eager. |
| 2337 |
|
| 2338 |
- gh-128479: Fix :func:`!asyncio.staggered.staggered_race` leaking tasks and |
| 2339 |
issuing an unhandled exception. |
| 2340 |
|
| 2341 |
- gh-128400: Fix crash when using :func:`faulthandler.dump_traceback` while |
| 2342 |
other threads are active on the :term:`free threaded <free threading>` |
| 2343 |
build. |
| 2344 |
|
| 2345 |
- gh-88834: Unify the instance check for :class:`typing.Union` and |
| 2346 |
:class:`types.UnionType`: :class:`!Union` now uses the instance checks |
| 2347 |
against its parameters instead of the subclass checks. |
| 2348 |
|
| 2349 |
- gh-128302: Fix |
| 2350 |
:meth:`!xml.dom.xmlbuilder.DOMEntityResolver.resolveEntity`, which was |
| 2351 |
broken by the Python 3.0 transition. |
| 2352 |
|
| 2353 |
- gh-128302: Allow :meth:`!xml.dom.xmlbuilder.DOMParser.parse` to correctly |
| 2354 |
handle :class:`!xml.dom.xmlbuilder.DOMInputSource` instances that only |
| 2355 |
have a :attr:`!systemId` attribute set. |
| 2356 |
|
| 2357 |
- gh-112064: Fix incorrect handling of negative read sizes in |
| 2358 |
:meth:`HTTPResponse.read <http.client.HTTPResponse.read>`. Patch by Yury |
| 2359 |
Manushkin. |
| 2360 |
|
| 2361 |
- gh-58956: Fixed a frame reference leak in :mod:`bdb`. |
| 2362 |
|
| 2363 |
- gh-128131: Completely support random access of uncompressed unencrypted |
| 2364 |
read-only zip files obtained by :meth:`ZipFile.open |
| 2365 |
<zipfile.ZipFile.open>`. |
| 2366 |
|
| 2367 |
- gh-112328: :class:`enum.EnumDict` can now be used without resorting to |
| 2368 |
private API. |
| 2369 |
|
| 2370 |
- gh-127975: Avoid reusing quote types in :func:`ast.unparse` if not needed. |
| 2371 |
|
| 2372 |
- gh-128062: Revert the font of :mod:`turtledemo`'s menu bar to its default |
| 2373 |
value and display the shortcut keys in the correct position. |
| 2374 |
|
| 2375 |
- gh-128014: Fix resetting the default window icon by passing ``default=''`` |
| 2376 |
to the :mod:`tkinter` method :meth:`!wm_iconbitmap`. |
| 2377 |
|
| 2378 |
- gh-115514: Fix exceptions and incomplete writes after |
| 2379 |
:class:`!asyncio._SelectorTransport` is closed before writes are |
| 2380 |
completed. |
| 2381 |
|
| 2382 |
- gh-41872: Fix quick extraction of module docstrings from a file in |
| 2383 |
:mod:`pydoc`. It now supports docstrings with single quotes, escape |
| 2384 |
sequences, raw string literals, and other Python syntax. |
| 2385 |
|
| 2386 |
- gh-127060: Set TERM environment variable to "dumb" to disable traceback |
| 2387 |
colors in IDLE, since IDLE doesn't understand ANSI escape sequences. Patch |
| 2388 |
by Victor Stinner. |
| 2389 |
|
| 2390 |
- gh-126742: Fix support of localized error messages reported by |
| 2391 |
:manpage:`dlerror(3)` and :manpage:`gdbm_strerror <gdbm(3)>` in |
| 2392 |
:mod:`ctypes` and :mod:`dbm.gnu` functions respectively. Patch by Bénédikt |
| 2393 |
Tran. |
| 2394 |
|
| 2395 |
- gh-127873: When ``-E`` is set, only ignore ``PYTHON_COLORS`` and not |
| 2396 |
``FORCE_COLOR``/``NO_COLOR``/``TERM`` when colourising output. Patch by |
| 2397 |
Hugo van Kemenade. |
| 2398 |
|
| 2399 |
- gh-127870: Detect recursive calls in ctypes ``_as_parameter_`` handling. |
| 2400 |
Patch by Victor Stinner. |
| 2401 |
|
| 2402 |
- gh-127847: Fix the position when doing interleaved seeks and reads in |
| 2403 |
uncompressed, unencrypted zip files returned by |
| 2404 |
:meth:`zipfile.ZipFile.open`. |
| 2405 |
|
| 2406 |
- gh-127732: The :mod:`platform` module now correctly detects Windows Server |
| 2407 |
2025. |
| 2408 |
|
| 2409 |
- gh-126821: macOS and iOS apps can now choose to redirect stdout and stderr |
| 2410 |
to the system log during interpreter configuration. |
| 2411 |
|
| 2412 |
- gh-93312: Include ``<sys/pidfd.h>`` to get ``os.PIDFD_NONBLOCK`` constant. |
| 2413 |
Patch by Victor Stinner. |
| 2414 |
|
| 2415 |
- gh-83662: Add missing ``__class_getitem__`` method to the Python |
| 2416 |
implementation of :func:`functools.partial`, to make it compatible with |
| 2417 |
the C version. This is mainly relevant for alternative Python |
| 2418 |
implementations like PyPy and GraalPy, because CPython will usually use |
| 2419 |
the C-implementation of that function. |
| 2420 |
|
| 2421 |
- gh-127586: :class:`multiprocessing.pool.Pool` now properly restores |
| 2422 |
blocked signal handlers of the parent thread when creating processes via |
| 2423 |
either *spawn* or *forkserver*. |
| 2424 |
|
| 2425 |
- gh-98188: Fix an issue in :meth:`email.message.Message.get_payload` where |
| 2426 |
data cannot be decoded if the Content Transfer Encoding mechanism contains |
| 2427 |
trailing whitespaces or additional junk text. Patch by Hui Liu. |
| 2428 |
|
| 2429 |
- gh-127257: In :mod:`ssl`, system call failures that OpenSSL reports using |
| 2430 |
``ERR_LIB_SYS`` are now raised as :exc:`OSError`. |
| 2431 |
|
| 2432 |
- gh-127096: Do not recreate unnamed section on every read in |
| 2433 |
:class:`configparser.ConfigParser`. Patch by Andrey Efremov. |
| 2434 |
|
| 2435 |
- gh-127196: Fix crash when dict with keys in invalid encoding were passed |
| 2436 |
to several functions in ``_interpreters`` module. |
| 2437 |
|
| 2438 |
- gh-126775: Make :func:`linecache.checkcache` thread safe and GC |
| 2439 |
re-entrancy safe. |
| 2440 |
|
| 2441 |
- gh-126332: Fix _pyrepl crash when entering a double CTRL-Z on an |
| 2442 |
overflowing line. |
| 2443 |
|
| 2444 |
- gh-126225: :mod:`getopt` and :mod:`optparse` are no longer marked as |
| 2445 |
deprecated. There are legitimate reasons to use one of these modules in |
| 2446 |
preference to :mod:`argparse`, and none of these modules are at risk of |
| 2447 |
being removed from the standard library. Of the three, ``argparse`` |
| 2448 |
remains the recommended default choice, *unless* one of the concerns noted |
| 2449 |
at the top of the ``optparse`` module documentation applies. |
| 2450 |
|
| 2451 |
- gh-125553: Fix round-trip invariance for backslash continuations in |
| 2452 |
:func:`tokenize.untokenize`. |
| 2453 |
|
| 2454 |
- gh-123987: Fixed issue in NamespaceReader where a non-path item in a |
| 2455 |
namespace path, such as a sentinel added by an editable installer, would |
| 2456 |
break resource loading. |
| 2457 |
|
| 2458 |
- gh-123401: The :mod:`http.cookies` module now supports parsing obsolete |
| 2459 |
:rfc:`850` date formats, in accordance with :rfc:`9110` requirements. |
| 2460 |
Patch by Nano Zheng. |
| 2461 |
|
| 2462 |
- gh-122431: :func:`readline.append_history_file` now raises a |
| 2463 |
:exc:`ValueError` when given a negative value. |
| 2464 |
|
| 2465 |
- gh-119257: Show tab completions menu below the current line, which results |
| 2466 |
in less janky behaviour, and fixes a cursor movement bug. Patch by Daniel |
| 2467 |
Hollas |
| 2468 |
|
| 2469 |
Documentation |
| 2470 |
------------- |
| 2471 |
|
| 2472 |
- gh-125722: Require Sphinx 8.1.3 or later to build the Python |
| 2473 |
documentation. Patch by Adam Turner. |
| 2474 |
|
| 2475 |
- gh-67206: Document that :const:`string.printable` is not printable in the |
| 2476 |
POSIX sense. In particular, :meth:`string.printable.isprintable() |
| 2477 |
<str.isprintable>` returns :const:`False`. Patch by Bénédikt Tran. |
| 2478 |
|
| 2479 |
Library |
| 2480 |
------- |
| 2481 |
|
| 2482 |
- gh-129345: Fix null pointer dereference in :func:`syslog.openlog` when an |
| 2483 |
audit hook raises an exception. |
| 2484 |
|
| 2485 |
Core and Builtins |
| 2486 |
----------------- |
| 2487 |
|
| 2488 |
- gh-129093: Fix f-strings such as ``f'{expr=}'`` sometimes not displaying |
| 2489 |
the full expression when the expression contains ``!=``. |
| 2490 |
|
| 2491 |
- gh-124363: Treat debug expressions in f-string as raw strings. Patch by |
| 2492 |
Pablo Galindo |
| 2493 |
|
| 2494 |
- gh-128799: Add frame of ``except*`` to traceback when it wraps a naked |
| 2495 |
exception. |
| 2496 |
|
| 2497 |
- gh-128078: Fix a :exc:`SystemError` when using :func:`anext` with a |
| 2498 |
default tuple value. Patch by Bénédikt Tran. |
| 2499 |
|
| 2500 |
- gh-128717: Fix a crash when setting the recursion limit while other |
| 2501 |
threads are active on the :term:`free threaded <free threading>` build. |
| 2502 |
|
| 2503 |
- gh-128330: Restore terminal control characters on REPL exit. |
| 2504 |
|
| 2505 |
- gh-128079: Fix a bug where :keyword:`except* <except_star>` does not |
| 2506 |
properly check the return value of an :exc:`ExceptionGroup`'s |
| 2507 |
:meth:`~BaseExceptionGroup.split` function, leading to a crash in some |
| 2508 |
cases. Now when :meth:`~BaseExceptionGroup.split` returns an invalid |
| 2509 |
object, :keyword:`except* <except_star>` raises a :exc:`TypeError` with |
| 2510 |
the original raised :exc:`ExceptionGroup` object chained to it. |
| 2511 |
|
| 2512 |
- gh-128030: Avoid error from calling ``PyModule_GetFilenameObject`` on a |
| 2513 |
non-module object when importing a non-existent symbol from a non-module |
| 2514 |
object. |
| 2515 |
|
| 2516 |
- gh-127903: ``Objects/unicodeobject.c``: fix a crash on DEBUG builds in |
| 2517 |
``_copy_characters`` when there is nothing to copy. |
| 2518 |
|
| 2519 |
- gh-127599: Fix statistics for increments of object reference counts (in |
| 2520 |
particular, when a reference count was increased by more than 1 in a |
| 2521 |
single operation). |
| 2522 |
|
| 2523 |
- gh-127651: When raising :exc:`ImportError` for missing symbols in ``from`` |
| 2524 |
imports, use ``__file__`` in the error message if ``__spec__.origin`` is |
| 2525 |
not a location |
| 2526 |
|
| 2527 |
- gh-127582: Fix non-thread-safe object resurrection when calling finalizers |
| 2528 |
and watcher callbacks in the free threading build. |
| 2529 |
|
| 2530 |
- gh-127434: The iOS compiler shims can now accept arguments with spaces. |
| 2531 |
|
| 2532 |
- gh-127536: Add missing locks around some list assignment operations in the |
| 2533 |
free threading build. |
| 2534 |
|
| 2535 |
- gh-126862: Fix a possible overflow when a class inherits from an absurd |
| 2536 |
number of super-classes. Reported by Valery Fedorenko. Patch by Bénédikt |
| 2537 |
Tran. |
| 2538 |
|
| 2539 |
- gh-127349: Fixed the error when resizing terminal in Python REPL. Patch by |
| 2540 |
Semyon Moroz. |
| 2541 |
|
| 2542 |
- gh-126076: Relocated objects such as ``tuple``, ``bytes`` and ``str`` |
| 2543 |
objects are properly tracked by :mod:`tracemalloc` and its associated |
| 2544 |
hooks. Patch by Pablo Galindo. |
| 2545 |
|
| 2546 |
C API |
| 2547 |
----- |
| 2548 |
|
| 2549 |
- gh-127791: Fix loss of callbacks after more than one call to |
| 2550 |
:c:func:`PyUnstable_AtExit`. |
| 2551 |
|
| 2552 |
Build |
| 2553 |
----- |
| 2554 |
|
| 2555 |
- gh-129539: Don't redefine ``EX_OK`` when the system has the ``sysexits.h`` |
| 2556 |
header. |
| 2557 |
|
| 2558 |
- gh-128472: Skip BOLT optimization of functions using computed gotos, |
| 2559 |
fixing errors on build with LLVM 19. |
| 2560 |
|
| 2561 |
- gh-123925: Fix building the :mod:`curses` module on platforms with |
| 2562 |
libncurses but without libncursesw. |
| 2563 |
|
| 2564 |
- gh-128321: Set ``LIBS`` instead of ``LDFLAGS`` when checking if |
| 2565 |
:mod:`sqlite3` library functions are available. This fixes the ordering of |
| 2566 |
linked libraries during checks, which was incorrect when using a |
| 2567 |
statically linked ``libsqlite3``. |
| 2568 |
|
| 2569 |
- gh-127865: Fix build failure on systems without thread-locals support. |
| 2570 |
|
| 2571 |
|
| 2572 |
What's New in Python 3.13.1 final? |
| 2573 |
================================== |
| 2574 |
|
| 2575 |
*Release date: 2024-12-03* |
| 2576 |
|
| 2577 |
macOS |
| 2578 |
----- |
| 2579 |
|
| 2580 |
- gh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. |
| 2581 |
|
| 2582 |
Windows |
| 2583 |
------- |
| 2584 |
|
| 2585 |
- gh-126911: Update credits command output. |
| 2586 |
|
| 2587 |
- gh-118973: Ensures the experimental free-threaded install includes the |
| 2588 |
``_tkinter`` module. The optional Tcl/Tk component must also be installed |
| 2589 |
in order for the module to work. |
| 2590 |
|
| 2591 |
- gh-126497: Fixes venv failure due to missing redirector executables in |
| 2592 |
experimental free-threaded installs. |
| 2593 |
|
| 2594 |
- gh-126074: Removed unnecessary DLLs from Windows embeddable package |
| 2595 |
|
| 2596 |
- gh-125315: Avoid crashing in :mod:`platform` due to slow WMI calls on some |
| 2597 |
Windows machines. |
| 2598 |
|
| 2599 |
- gh-126084: Fix venvwlauncher to launch pythonw instead of python so no |
| 2600 |
extra console window is created. |
| 2601 |
|
| 2602 |
- gh-125842: Fix a :exc:`SystemError` when :func:`sys.exit` is called with |
| 2603 |
``0xffffffff`` on Windows. |
| 2604 |
|
| 2605 |
- gh-125550: Enable the :ref:`launcher` to detect Python 3.14 installs from |
| 2606 |
the Windows Store. |
| 2607 |
|
| 2608 |
- gh-124448: Updated bundled Tcl/Tk to 8.6.15. |
| 2609 |
|
| 2610 |
Tools/Demos |
| 2611 |
----------- |
| 2612 |
|
| 2613 |
- gh-126807: Fix extraction warnings in :program:`pygettext.py` caused by |
| 2614 |
mistaking function definitions for function calls. |
| 2615 |
|
| 2616 |
- gh-126167: The iOS testbed was modified so that it can be used by |
| 2617 |
third-party projects for testing purposes. |
| 2618 |
|
| 2619 |
Tests |
| 2620 |
----- |
| 2621 |
|
| 2622 |
- gh-126909: Fix test_os extended attribute tests to work on filesystems |
| 2623 |
with 1 KiB xattr size limit. |
| 2624 |
|
| 2625 |
- gh-125041: Re-enable skipped tests for :mod:`zlib` on the s390x |
| 2626 |
architecture: only skip checks of the compressed bytes, which can be |
| 2627 |
different between zlib's software implementation and the |
| 2628 |
hardware-accelerated implementation. |
| 2629 |
|
| 2630 |
- gh-124295: Add translation tests to the :mod:`argparse` module. |
| 2631 |
|
| 2632 |
Security |
| 2633 |
-------- |
| 2634 |
|
| 2635 |
- gh-126623: Upgrade libexpat to 2.6.4 |
| 2636 |
|
| 2637 |
- gh-125140: Remove the current directory from ``sys.path`` when using |
| 2638 |
PyREPL. |
| 2639 |
|
| 2640 |
- gh-122792: Changed IPv4-mapped ``ipaddress.IPv6Address`` to consistently |
| 2641 |
use the mapped IPv4 address value for deciding properties. Properties |
| 2642 |
which have their behavior fixed are ``is_multicast``, ``is_reserved``, |
| 2643 |
``is_link_local``, ``is_global``, and ``is_unspecified``. |
| 2644 |
|
| 2645 |
Library |
| 2646 |
------- |
| 2647 |
|
| 2648 |
- gh-127321: :func:`pdb.set_trace` will not stop at an opcode that does not |
| 2649 |
have an associated line number anymore. |
| 2650 |
|
| 2651 |
- gh-127303: Publicly expose :data:`~token.EXACT_TOKEN_TYPES` in |
| 2652 |
:attr:`!token.__all__`. |
| 2653 |
|
| 2654 |
- gh-123967: Fix faulthandler for trampoline frames. If the top-most frame |
| 2655 |
is a trampoline frame, skip it. Patch by Victor Stinner. |
| 2656 |
|
| 2657 |
- gh-127182: Fix :meth:`!io.StringIO.__setstate__` crash, when :const:`None` |
| 2658 |
was passed as the first value. |
| 2659 |
|
| 2660 |
- gh-127217: Fix :func:`urllib.request.pathname2url` for paths starting with |
| 2661 |
multiple slashes on Posix. |
| 2662 |
|
| 2663 |
- gh-127035: Fix :mod:`shutil.which` on Windows. Now it looks at direct |
| 2664 |
match if and only if the command ends with a PATHEXT extension or X_OK is |
| 2665 |
not in mode. Support extensionless files if "." is in PATHEXT. Support |
| 2666 |
PATHEXT extensions that end with a dot. |
| 2667 |
|
| 2668 |
- gh-122273: Support PyREPL history on Windows. Patch by devdanzin and |
| 2669 |
Victor Stinner. |
| 2670 |
|
| 2671 |
- gh-127078: Fix issue where :func:`urllib.request.url2pathname` failed to |
| 2672 |
discard an extra slash before a UNC drive in the URL path on Windows. |
| 2673 |
|
| 2674 |
- gh-126766: Fix issue where :func:`urllib.request.url2pathname` failed to |
| 2675 |
discard any 'localhost' authority present in the URL. |
| 2676 |
|
| 2677 |
- gh-127065: Fix crash when calling a :func:`operator.methodcaller` instance |
| 2678 |
from multiple threads in the free threading build. |
| 2679 |
|
| 2680 |
- gh-126997: Fix support of STRING and GLOBAL opcodes with non-ASCII |
| 2681 |
arguments in :mod:`pickletools`. :func:`pickletools.dis` now outputs |
| 2682 |
non-ASCII bytes in STRING, BINSTRING and SHORT_BINSTRING arguments as |
| 2683 |
escaped (``\xXX``). |
| 2684 |
|
| 2685 |
- gh-126316: :mod:`grp`: Make :func:`grp.getgrall` thread-safe by adding a |
| 2686 |
mutex. Patch by Victor Stinner. |
| 2687 |
|
| 2688 |
- gh-126618: Fix the representation of :class:`itertools.count` objects when |
| 2689 |
the count value is :data:`sys.maxsize`. |
| 2690 |
|
| 2691 |
- gh-85168: Fix issue where :func:`urllib.request.url2pathname` and |
| 2692 |
:func:`~urllib.request.pathname2url` always used UTF-8 when quoting and |
| 2693 |
unquoting file URIs. They now use the :term:`filesystem encoding and error |
| 2694 |
handler`. |
| 2695 |
|
| 2696 |
- gh-67877: Fix memory leaks when :mod:`regular expression <re>` matching |
| 2697 |
terminates abruptly, either because of a signal or because memory |
| 2698 |
allocation fails. |
| 2699 |
|
| 2700 |
- gh-126789: Fixed the values of :py:func:`sysconfig.get_config_vars`, |
| 2701 |
:py:func:`sysconfig.get_paths`, and their siblings when the :py:mod:`site` |
| 2702 |
initialization happens after :py:mod:`sysconfig` has built a cache for |
| 2703 |
:py:func:`sysconfig.get_config_vars`. |
| 2704 |
|
| 2705 |
- gh-126188: Update bundled pip to 24.3.1 |
| 2706 |
|
| 2707 |
- gh-126780: Fix :func:`os.path.normpath` for drive-relative paths on |
| 2708 |
Windows. |
| 2709 |
|
| 2710 |
- gh-126766: Fix issue where :func:`urllib.request.url2pathname` failed to |
| 2711 |
discard two leading slashes introducing an empty authority section. |
| 2712 |
|
| 2713 |
- gh-126727: ``locale.nl_langinfo(locale.ERA)`` now returns multiple era |
| 2714 |
description segments separated by semicolons. Previously it only returned |
| 2715 |
the first segment on platforms with Glibc. |
| 2716 |
|
| 2717 |
- gh-126699: Allow :class:`collections.abc.AsyncIterator` to be a base for |
| 2718 |
Protocols. |
| 2719 |
|
| 2720 |
- gh-126654: Fix crash when non-dict was passed to several functions in |
| 2721 |
``_interpreters`` module. |
| 2722 |
|
| 2723 |
- gh-104745: Limit starting a patcher (from :func:`unittest.mock.patch` or |
| 2724 |
:func:`unittest.mock.patch.object`) more than once without stopping it |
| 2725 |
|
| 2726 |
- gh-126595: Fix a crash when instantiating :class:`itertools.count` with an |
| 2727 |
initial count of :data:`sys.maxsize` on debug builds. Patch by Bénédikt |
| 2728 |
Tran. |
| 2729 |
|
| 2730 |
- gh-120423: Fix issue where :func:`urllib.request.pathname2url` mishandled |
| 2731 |
Windows paths with embedded forward slashes. |
| 2732 |
|
| 2733 |
- gh-126565: Improve performances of :meth:`zipfile.Path.open` for |
| 2734 |
non-reading modes. |
| 2735 |
|
| 2736 |
- gh-126505: Fix bugs in compiling case-insensitive :mod:`regular |
| 2737 |
expressions <re>` with character classes containing non-BMP characters: |
| 2738 |
upper-case non-BMP character did was ignored and the ASCII flag was |
| 2739 |
ignored when matching a character range whose upper bound is beyond the |
| 2740 |
BMP region. |
| 2741 |
|
| 2742 |
- gh-117378: Fixed the :mod:`multiprocessing` ``"forkserver"`` start method |
| 2743 |
forkserver process to correctly inherit the parent's :data:`sys.path` |
| 2744 |
during the importing of :func:`multiprocessing.set_forkserver_preload` |
| 2745 |
modules in the same manner as :data:`sys.path` is configured in workers |
| 2746 |
before executing work items. |
| 2747 |
|
| 2748 |
This bug caused some forkserver module preloading to silently fail to |
| 2749 |
preload. This manifested as a performance degration in child processes |
| 2750 |
when the ``sys.path`` was required due to additional repeated work in |
| 2751 |
every worker. |
| 2752 |
|
| 2753 |
It could also have a side effect of ``""`` remaining in :data:`sys.path` |
| 2754 |
during forkserver preload imports instead of the absolute path from |
| 2755 |
:func:`os.getcwd` at multiprocessing import time used in the worker |
| 2756 |
``sys.path``. |
| 2757 |
|
| 2758 |
The ``sys.path`` differences between phases in the child process could |
| 2759 |
potentially have caused preload to import incorrect things from the wrong |
| 2760 |
location. We are unaware of that actually having happened in practice. |
| 2761 |
|
| 2762 |
- gh-125679: The :class:`multiprocessing.Lock` and |
| 2763 |
:class:`multiprocessing.RLock` ``repr`` values no longer say "unknown" on |
| 2764 |
macOS. |
| 2765 |
|
| 2766 |
- gh-126476: Raise :class:`calendar.IllegalMonthError` (now a subclass of |
| 2767 |
:class:`IndexError`) for :func:`calendar.month` when the input month is |
| 2768 |
not correct. |
| 2769 |
|
| 2770 |
- gh-126489: The Python implementation of :mod:`pickle` no longer calls |
| 2771 |
:meth:`pickle.Pickler.persistent_id` for the result of |
| 2772 |
:meth:`!persistent_id`. |
| 2773 |
|
| 2774 |
- gh-126313: Fix an issue in :func:`curses.napms` when |
| 2775 |
:func:`curses.initscr` has not yet been called. Patch by Bénédikt Tran. |
| 2776 |
|
| 2777 |
- gh-126303: Fix pickling and copying of :class:`os.sched_param` objects. |
| 2778 |
|
| 2779 |
- gh-126138: Fix a use-after-free crash on :class:`asyncio.Task` objects |
| 2780 |
whose underlying coroutine yields an object that implements an evil |
| 2781 |
:meth:`~object.__getattribute__`. Patch by Nico Posada. |
| 2782 |
|
| 2783 |
- gh-126220: Fix crash in :class:`!cProfile.Profile` and |
| 2784 |
:class:`!_lsprof.Profiler` when their callbacks were directly called with |
| 2785 |
0 arguments. |
| 2786 |
|
| 2787 |
- gh-126212: Fix issue where :func:`urllib.request.pathname2url` and |
| 2788 |
:func:`~urllib.request.url2pathname` removed slashes from Windows DOS |
| 2789 |
drive paths and URLs. |
| 2790 |
|
| 2791 |
- gh-126223: Raise a :exc:`UnicodeEncodeError` instead of a |
| 2792 |
:exc:`SystemError` upon calling :func:`!_interpreters.create` with an |
| 2793 |
invalid Unicode character. |
| 2794 |
|
| 2795 |
- gh-126205: Fix issue where :func:`urllib.request.pathname2url` generated |
| 2796 |
URLs beginning with four slashes (rather than two) when given a Windows |
| 2797 |
UNC path. |
| 2798 |
|
| 2799 |
- gh-126105: Fix a crash in :mod:`ast` when the :attr:`ast.AST._fields` |
| 2800 |
attribute is deleted. |
| 2801 |
|
| 2802 |
- gh-126106: Fixes a possible ``NULL`` pointer dereference in :mod:`ssl`. |
| 2803 |
|
| 2804 |
- gh-126080: Fix a use-after-free crash on :class:`asyncio.Task` objects for |
| 2805 |
which the underlying event loop implements an evil |
| 2806 |
:meth:`~object.__getattribute__`. Reported by Nico-Posada. Patch by |
| 2807 |
Bénédikt Tran. |
| 2808 |
|
| 2809 |
- gh-126083: Fixed a reference leak in :class:`asyncio.Task` objects when |
| 2810 |
reinitializing the same object with a non-``None`` context. Patch by Nico |
| 2811 |
Posada. |
| 2812 |
|
| 2813 |
- gh-125984: Fix use-after-free crashes on :class:`asyncio.Future` objects |
| 2814 |
for which the underlying event loop implements an evil |
| 2815 |
:meth:`~object.__getattribute__`. Reported by Nico-Posada. Patch by |
| 2816 |
Bénédikt Tran. |
| 2817 |
|
| 2818 |
- gh-125969: Fix an out-of-bounds crash when an evil |
| 2819 |
:meth:`asyncio.loop.call_soon` mutates the length of the internal |
| 2820 |
callbacks list. Patch by Bénédikt Tran. |
| 2821 |
|
| 2822 |
- gh-125966: Fix a use-after-free crash in |
| 2823 |
:meth:`asyncio.Future.remove_done_callback`. Patch by Bénédikt Tran. |
| 2824 |
|
| 2825 |
- gh-125789: Fix possible crash when mutating list of callbacks returned by |
| 2826 |
:attr:`!asyncio.Future._callbacks`. It now always returns a new copy in C |
| 2827 |
implementation :mod:`!_asyncio`. Patch by Kumar Aditya. |
| 2828 |
|
| 2829 |
- gh-124452: Fix an issue in |
| 2830 |
:meth:`email.policy.EmailPolicy.header_source_parse` and |
| 2831 |
:meth:`email.policy.Compat32.header_source_parse` that introduced spurious |
| 2832 |
leading whitespaces into header values when the header includes a newline |
| 2833 |
character after the header name delimiter (``:``) and before the value. |
| 2834 |
|
| 2835 |
- gh-125884: Fixed the bug for :mod:`pdb` where it can't set breakpoints on |
| 2836 |
functions with certain annotations. |
| 2837 |
|
| 2838 |
- gh-125355: Fix several bugs in |
| 2839 |
:meth:`argparse.ArgumentParser.parse_intermixed_args`. |
| 2840 |
|
| 2841 |
* The parser no longer changes temporarily during parsing. |
| 2842 |
* Default values are not processed twice. |
| 2843 |
* Required mutually exclusive groups containing positional arguments are now supported. |
| 2844 |
* The missing arguments report now includes the names of all required optional and positional arguments. |
| 2845 |
* Unknown options can be intermixed with positional arguments in parse_known_intermixed_args(). |
| 2846 |
|
| 2847 |
- gh-125666: Avoid the exiting the interpreter if a null byte is given as |
| 2848 |
input in the new REPL. |
| 2849 |
|
| 2850 |
- gh-125710: [Enum] fix hashable<->nonhashable comparisons for member values |
| 2851 |
|
| 2852 |
- gh-125631: Restore ability to set :attr:`~pickle.Pickler.persistent_id` |
| 2853 |
and :attr:`~pickle.Unpickler.persistent_load` attributes of instances of |
| 2854 |
the :class:`!Pickler` and :class:`!Unpickler` classes in the :mod:`pickle` |
| 2855 |
module. |
| 2856 |
|
| 2857 |
- gh-125378: Fixed the bug in :mod:`pdb` where after a multi-line command, |
| 2858 |
an empty line repeats the first line of the multi-line command, instead of |
| 2859 |
the full command. |
| 2860 |
|
| 2861 |
- gh-125682: Reject non-ASCII digits in the Python implementation of |
| 2862 |
:func:`json.loads` conforming to the JSON specification. |
| 2863 |
|
| 2864 |
- gh-125660: Reject invalid unicode escapes for Python implementation of |
| 2865 |
:func:`json.loads`. |
| 2866 |
|
| 2867 |
- gh-125259: Fix the notes removal logic for errors thrown in enum |
| 2868 |
initialization. |
| 2869 |
|
| 2870 |
- gh-125590: Allow ``FrameLocalsProxy`` to delete and pop if the key is not |
| 2871 |
a fast variable. |
| 2872 |
|
| 2873 |
- gh-125519: Improve traceback if :func:`importlib.reload` is called with an |
| 2874 |
object that is not a module. Patch by Alex Waygood. |
| 2875 |
|
| 2876 |
- gh-125451: Fix deadlock when |
| 2877 |
:class:`concurrent.futures.ProcessPoolExecutor` shuts down concurrently |
| 2878 |
with an error when feeding a job to a worker process. |
| 2879 |
|
| 2880 |
- gh-125422: Fixed the bug where :mod:`pdb` and :mod:`bdb` can step into the |
| 2881 |
bottom caller frame. |
| 2882 |
|
| 2883 |
- gh-100141: Fixed the bug where :mod:`pdb` will be stuck in an infinite |
| 2884 |
loop when debugging an empty file. |
| 2885 |
|
| 2886 |
- gh-125115: Fixed a bug in :mod:`pdb` where arguments starting with ``-`` |
| 2887 |
can't be passed to the debugged script. |
| 2888 |
|
| 2889 |
- gh-53203: Fix :func:`time.strptime` for ``%c``, ``%x`` and ``%X`` formats |
| 2890 |
in many locales that use non-ASCII digits, like Persian, Burmese, Odia and |
| 2891 |
Shan. |
| 2892 |
|
| 2893 |
- gh-125398: Fix the conversion of the :envvar:`!VIRTUAL_ENV` path in the |
| 2894 |
activate script in :mod:`venv` when running in Git Bash for Windows. |
| 2895 |
|
| 2896 |
- gh-125316: Fix using :func:`functools.partial` as :class:`enum.Enum` |
| 2897 |
member. A FutureWarning with suggestion to use :func:`enum.member` is now |
| 2898 |
emitted when the ``partial`` instance is used as an enum member. |
| 2899 |
|
| 2900 |
- gh-125245: Fix race condition when importing :mod:`collections.abc`, which |
| 2901 |
could incorrectly return an empty module. |
| 2902 |
|
| 2903 |
- gh-125243: Fix data race when creating :class:`zoneinfo.ZoneInfo` objects |
| 2904 |
in the free threading build. |
| 2905 |
|
| 2906 |
- gh-125254: Fix a bug where ArgumentError includes the incorrect ambiguous |
| 2907 |
option in :mod:`argparse`. |
| 2908 |
|
| 2909 |
- gh-125235: Keep :mod:`tkinter` TCL paths in venv pointing to base |
| 2910 |
installation on Windows. |
| 2911 |
|
| 2912 |
- gh-61011: Fix inheritance of nested mutually exclusive groups from parent |
| 2913 |
parser in :class:`argparse.ArgumentParser`. Previously, all nested |
| 2914 |
mutually exclusive groups lost their connection to the group containing |
| 2915 |
them and were displayed as belonging directly to the parser. |
| 2916 |
|
| 2917 |
- gh-52551: Fix encoding issues in :func:`time.strftime`, the |
| 2918 |
:meth:`~datetime.datetime.strftime` method of the :mod:`datetime` classes |
| 2919 |
:class:`~datetime.datetime`, :class:`~datetime.date` and |
| 2920 |
:class:`~datetime.time` and formatting of these classes. Characters not |
| 2921 |
encodable in the current locale are now acceptable in the format string. |
| 2922 |
Surrogate pairs and sequence of surrogatescape-encoded bytes are no longer |
| 2923 |
recombinated. Embedded null character no longer terminates the format |
| 2924 |
string. |
| 2925 |
|
| 2926 |
- gh-125118: Don't copy arbitrary values to :c:expr:`_Bool` in the |
| 2927 |
:mod:`struct` module. |
| 2928 |
|
| 2929 |
- gh-125069: Fix an issue where providing a :class:`pathlib.PurePath` object |
| 2930 |
as an initializer argument to a second :class:`~pathlib.PurePath` object |
| 2931 |
with a different :attr:`~pathlib.PurePath.parser` resulted in arguments to |
| 2932 |
the former object's initializer being joined by the latter object's |
| 2933 |
parser. |
| 2934 |
|
| 2935 |
- gh-125096: If the :envvar:`PYTHON_BASIC_REPL` environment variable is set, |
| 2936 |
the :mod:`site` module no longer imports the :mod:`!_pyrepl` module. |
| 2937 |
Moreover, the :mod:`site` module now respects :option:`-E` and |
| 2938 |
:option:`-I` command line options: ignore :envvar:`PYTHON_BASIC_REPL` in |
| 2939 |
this case. Patch by Victor Stinner. |
| 2940 |
|
| 2941 |
- gh-124969: Fix ``locale.nl_langinfo(locale.ALT_DIGITS)`` on platforms with |
| 2942 |
glibc. Now it returns a string consisting of up to 100 semicolon-separated |
| 2943 |
symbols (an empty string in most locales) on all Posix platforms. |
| 2944 |
Previously it only returned the first symbol or an empty string. |
| 2945 |
|
| 2946 |
- gh-124960: Fix support for the ``barry_as_FLUFL`` future flag in the new |
| 2947 |
REPL. |
| 2948 |
|
| 2949 |
- gh-124984: Fixed thread safety in :mod:`ssl` in the free-threaded build. |
| 2950 |
OpenSSL operations are now protected by a per-object lock. |
| 2951 |
|
| 2952 |
- gh-124958: Fix refcycles in exceptions raised from |
| 2953 |
:class:`asyncio.TaskGroup` and the python implementation of |
| 2954 |
:class:`asyncio.Future` |
| 2955 |
|
| 2956 |
- gh-53203: Fix :func:`time.strptime` for ``%c`` and ``%x`` formats in many |
| 2957 |
locales: Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, |
| 2958 |
French, Irish, Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, |
| 2959 |
Haitian Kreyol, Japanese, Kannada, Korean, Marathi, Malay, Norwegian, |
| 2960 |
Nynorsk, Punjabi, Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon |
| 2961 |
and Chinese. |
| 2962 |
|
| 2963 |
- gh-124917: Allow calling :func:`os.path.exists` and |
| 2964 |
:func:`os.path.lexists` with keyword arguments on Windows. Fixes a |
| 2965 |
regression in 3.13.0. |
| 2966 |
|
| 2967 |
- gh-124653: Fix detection of the minimal Queue API needed by the |
| 2968 |
:mod:`logging` module. Patch by Bénédikt Tran. |
| 2969 |
|
| 2970 |
- gh-124858: Fix reference cycles left in tracebacks in |
| 2971 |
:func:`asyncio.open_connection` when used with ``happy_eyeballs_delay`` |
| 2972 |
|
| 2973 |
- gh-124390: Fixed :exc:`AssertionError` when using |
| 2974 |
:func:`!asyncio.staggered.staggered_race` with |
| 2975 |
:attr:`asyncio.eager_task_factory`. |
| 2976 |
|
| 2977 |
- gh-124651: Properly quote template strings in :mod:`venv` activation |
| 2978 |
scripts. |
| 2979 |
|
| 2980 |
- gh-116850: Fix :mod:`argparse` for namespaces with not directly writable |
| 2981 |
dict (e.g. classes). |
| 2982 |
|
| 2983 |
- gh-58573: Fix conflicts between abbreviated long options in the parent |
| 2984 |
parser and subparsers in :mod:`argparse`. |
| 2985 |
|
| 2986 |
- gh-124594: All :mod:`asyncio` REPL prompts run in the same :class:`context |
| 2987 |
<contextvars.Context>`. Contributed by Bartosz Sławecki. |
| 2988 |
|
| 2989 |
- gh-61181: Fix support of :ref:`choices` with string value in |
| 2990 |
:mod:`argparse`. Substrings of the specified string no longer considered |
| 2991 |
valid values. |
| 2992 |
|
| 2993 |
- gh-80259: Fix :mod:`argparse` support of positional arguments with |
| 2994 |
``nargs='?'``, ``default=argparse.SUPPRESS`` and specified ``type``. |
| 2995 |
|
| 2996 |
- gh-120378: Fix a crash related to an integer overflow in |
| 2997 |
:func:`curses.resizeterm` and :func:`curses.resize_term`. |
| 2998 |
|
| 2999 |
- gh-123884: Fixed bug in itertools.tee() handling of other tee inputs (a |
| 3000 |
tee in a tee). The output now has the promised *n* independent new |
| 3001 |
iterators. Formerly, the first iterator was identical (not independent) |
| 3002 |
to the input iterator. This would sometimes give surprising results. |
| 3003 |
|
| 3004 |
- gh-58956: Fixed a bug in :mod:`pdb` where sometimes the breakpoint won't |
| 3005 |
trigger if it was set on a function which is already in the call stack. |
| 3006 |
|
| 3007 |
- gh-124345: :mod:`argparse` vim supports abbreviated single-dash long |
| 3008 |
options separated by ``=`` from its value. |
| 3009 |
|
| 3010 |
- gh-104860: Fix disallowing abbreviation of single-dash long options in |
| 3011 |
:mod:`argparse` with ``allow_abbrev=False``. |
| 3012 |
|
| 3013 |
- gh-63143: Fix parsing mutually exclusive arguments in :mod:`argparse`. |
| 3014 |
Arguments with the value identical to the default value (e.g. booleans, |
| 3015 |
small integers, empty or 1-character strings) are no longer considered |
| 3016 |
"not present". |
| 3017 |
|
| 3018 |
- gh-72795: Positional arguments with :ref:`nargs` equal to ``'*'`` or |
| 3019 |
:data:`!argparse.REMAINDER` are no longer required. This allows to use |
| 3020 |
positional argument with ``nargs='*'`` and without ``default`` in mutually |
| 3021 |
exclusive group and improves error message about required arguments. |
| 3022 |
|
| 3023 |
- gh-59317: Fix parsing positional argument with :ref:`nargs` equal to |
| 3024 |
``'?'`` or ``'*'`` if it is preceded by an option and another positional |
| 3025 |
argument. |
| 3026 |
|
| 3027 |
- gh-53780: :mod:`argparse` now ignores the first ``"--"`` (double dash) |
| 3028 |
between an option and command. |
| 3029 |
|
| 3030 |
- gh-124217: Add RFC 9637 reserved IPv6 block ``3fff::/20`` in |
| 3031 |
:mod:`ipaddress` module. |
| 3032 |
|
| 3033 |
- gh-81691: Fix handling of multiple ``"--"`` (double dashes) in |
| 3034 |
:mod:`argparse`. Only the first one has now been removed, all subsequent |
| 3035 |
ones are now taken literally. |
| 3036 |
|
| 3037 |
- gh-123978: Remove broken :func:`time.thread_time` and |
| 3038 |
:func:`time.thread_time_ns` on NetBSD. |
| 3039 |
|
| 3040 |
- gh-124008: Fix possible crash (in debug build), incorrect output or |
| 3041 |
returning incorrect value from raw binary ``write()`` when writing to |
| 3042 |
console on Windows. |
| 3043 |
|
| 3044 |
- gh-123935: Fix parent slots detection for dataclasses that inherit from |
| 3045 |
classes with ``__dictoffset__``. |
| 3046 |
|
| 3047 |
- gh-122765: Fix unbalanced quote errors occurring when activate.csh in |
| 3048 |
:mod:`venv` was sourced with a custom prompt containing unpaired quotes or |
| 3049 |
newlines. |
| 3050 |
|
| 3051 |
- gh-123370: Fix the canvas not clearing after running turtledemo clock. |
| 3052 |
|
| 3053 |
- gh-116810: Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` |
| 3054 |
when the :attr:`ssl.SSLSocket.session` property was accessed. Speeds up |
| 3055 |
read and write access to said property by no longer unnecessarily cloning |
| 3056 |
session objects via serialization. |
| 3057 |
|
| 3058 |
- gh-120754: Update unbounded ``read`` calls in :mod:`zipfile` to specify an |
| 3059 |
explicit ``size`` putting a limit on how much data they may read. This |
| 3060 |
also updates handling around ZIP max comment size to match the standard |
| 3061 |
instead of reading comments that are one byte too long. |
| 3062 |
|
| 3063 |
- gh-70764: Fixed an issue where :func:`inspect.getclosurevars` would |
| 3064 |
incorrectly classify an attribute name as a global variable when the name |
| 3065 |
exists both as an attribute name and a global variable. |
| 3066 |
|
| 3067 |
- gh-118289: :func:`!posixpath.realpath` now raises |
| 3068 |
:exc:`NotADirectoryError` when *strict* mode is enabled and a |
| 3069 |
non-directory path with a trailing slash is supplied. |
| 3070 |
|
| 3071 |
- gh-119826: Always return an absolute path for :func:`os.path.abspath` on |
| 3072 |
Windows. |
| 3073 |
|
| 3074 |
- gh-117766: Always use :func:`str` to print ``choices`` in :mod:`argparse`. |
| 3075 |
|
| 3076 |
- gh-101955: Fix SystemError when match regular expression pattern |
| 3077 |
containing some combination of possessive quantifier, alternative and |
| 3078 |
capture group. |
| 3079 |
|
| 3080 |
- gh-88110: Fixed :class:`multiprocessing.Process` reporting a ``.exitcode`` |
| 3081 |
of 1 even on success when using the ``"fork"`` start method while using a |
| 3082 |
:class:`concurrent.futures.ThreadPoolExecutor`. |
| 3083 |
|
| 3084 |
- gh-71936: Fix a race condition in :class:`multiprocessing.pool.Pool`. |
| 3085 |
|
| 3086 |
- bpo-46128: Strip :class:`unittest.IsolatedAsyncioTestCase` stack frames |
| 3087 |
from reported stacktraces. |
| 3088 |
|
| 3089 |
- bpo-14074: Fix :mod:`argparse` metavar processing to allow positional |
| 3090 |
arguments to have a tuple metavar. |
| 3091 |
|
| 3092 |
IDLE |
| 3093 |
---- |
| 3094 |
|
| 3095 |
- gh-122392: Increase currently inadequate vertical spacing for the IDLE |
| 3096 |
browsers (path, module, and stack) on high-resolution monitors. |
| 3097 |
|
| 3098 |
Documentation |
| 3099 |
------------- |
| 3100 |
|
| 3101 |
- gh-126622: Added stub pages for removed modules explaining their removal, |
| 3102 |
where to find replacements, and linking to the last Python version that |
| 3103 |
supported them. Contributed by Ned Batchelder. |
| 3104 |
|
| 3105 |
- gh-125277: Require Sphinx 7.2.6 or later to build the Python |
| 3106 |
documentation. Patch by Adam Turner. |
| 3107 |
|
| 3108 |
- gh-124872: Added definitions for :term:`context`, :term:`current context`, |
| 3109 |
and :term:`context management protocol`, updated related definitions to be |
| 3110 |
consistent, and expanded the documentation for |
| 3111 |
:class:`contextvars.Context`. |
| 3112 |
|
| 3113 |
- gh-125018: The :mod:`importlib.metadata` documentation now includes |
| 3114 |
semantic cross-reference targets for the significant documented APIs. This |
| 3115 |
means intersphinx references like :func:`importlib.metadata.version` will |
| 3116 |
now work as expected. |
| 3117 |
|
| 3118 |
- gh-70870: Clarified the dual usage of the term "free variable" (both the |
| 3119 |
formal meaning of any reference to names defined outside the local scope, |
| 3120 |
and the narrower pragmatic meaning of nonlocal variables named in |
| 3121 |
``co_freevars``). |
| 3122 |
|
| 3123 |
- gh-121277: Writers of CPython's documentation can now use ``next`` as the |
| 3124 |
version for the ``versionchanged``, ``versionadded``, ``deprecated`` |
| 3125 |
directives. |
| 3126 |
|
| 3127 |
- gh-60712: Include the :class:`object` type in the lists of documented |
| 3128 |
types. Change by Furkan Onder and Martin Panter. |
| 3129 |
|
| 3130 |
- bpo-34008: The :c:func:`Py_Main` documentation moved from the "Very High |
| 3131 |
Level API" section to the "Initialization and Finalization" section. |
| 3132 |
|
| 3133 |
Also make it explicit that we expect ``Py_Main`` to typically be called |
| 3134 |
instead of ``Py_Initialize`` rather than after it (since ``Py_Main`` makes |
| 3135 |
its own call to ``Py_Initialize``). Document that calling both is |
| 3136 |
supported but is version dependent on which settings will be applied |
| 3137 |
correctly. |
| 3138 |
|
| 3139 |
Core and Builtins |
| 3140 |
----------------- |
| 3141 |
|
| 3142 |
- gh-113841: Fix possible undefined behavior division by zero in |
| 3143 |
:class:`complex`'s :c:func:`_Py_c_pow`. |
| 3144 |
|
| 3145 |
- gh-127020: Fix a crash in the free threading build when |
| 3146 |
:c:func:`PyCode_GetCode`, :c:func:`PyCode_GetVarnames`, |
| 3147 |
:c:func:`PyCode_GetCellvars`, or :c:func:`PyCode_GetFreevars` were called |
| 3148 |
from multiple threads at the same time. |
| 3149 |
|
| 3150 |
- gh-126980: Fix :meth:`~object.__buffer__` of :class:`bytearray` crashing |
| 3151 |
when :attr:`~inspect.BufferFlags.READ` or |
| 3152 |
:attr:`~inspect.BufferFlags.WRITE` are passed as flags. |
| 3153 |
|
| 3154 |
- gh-126881: Fix crash in finalization of dtoa state. Patch by Kumar Aditya. |
| 3155 |
|
| 3156 |
- gh-126341: Now :exc:`ValueError` is raised instead of :exc:`SystemError` |
| 3157 |
when trying to iterate over a released :class:`memoryview` object. |
| 3158 |
|
| 3159 |
- gh-126688: Fix a crash when calling :func:`os.fork` on some operating |
| 3160 |
systems, including SerenityOS. |
| 3161 |
|
| 3162 |
Library |
| 3163 |
------- |
| 3164 |
|
| 3165 |
- gh-126066: Fix :mod:`importlib` to not write an incomplete .pyc files when |
| 3166 |
a ulimit or some other operating system mechanism is preventing the write |
| 3167 |
to go through fully. |
| 3168 |
|
| 3169 |
Core and Builtins |
| 3170 |
----------------- |
| 3171 |
|
| 3172 |
- gh-126312: Fix crash during garbage collection on an object frozen by |
| 3173 |
:func:`gc.freeze` on the free-threaded build. |
| 3174 |
|
| 3175 |
- gh-126139: Provide better error location when attempting to use a |
| 3176 |
:term:`future statement <__future__>` with an unknown future feature. |
| 3177 |
|
| 3178 |
- gh-126018: Fix a crash in :func:`sys.audit` when passing a non-string as |
| 3179 |
first argument and Python was compiled in debug mode. |
| 3180 |
|
| 3181 |
- gh-125942: On Android, the ``errors`` setting of :any:`sys.stdout` was |
| 3182 |
changed from ``surrogateescape`` to ``backslashreplace``. |
| 3183 |
|
| 3184 |
- gh-125859: Fix a crash in the free threading build when |
| 3185 |
:func:`gc.get_objects` or :func:`gc.get_referrers` is called during an |
| 3186 |
in-progress garbage collection. |
| 3187 |
|
| 3188 |
- gh-125703: Correctly honour :mod:`tracemalloc` hooks in specialized |
| 3189 |
``Py_DECREF`` paths. Patch by Pablo Galindo |
| 3190 |
|
| 3191 |
- gh-125593: Use color to highlight error locations in traceback from |
| 3192 |
exception group |
| 3193 |
|
| 3194 |
- gh-125444: Fix illegal instruction for older Arm architectures. Patch by |
| 3195 |
Diego Russo, testing by Ross Burton. |
| 3196 |
|
| 3197 |
- gh-124375: Fix a crash in the free threading build when the GC runs |
| 3198 |
concurrently with a new thread starting. |
| 3199 |
|
| 3200 |
- gh-125221: Fix possible race condition when calling |
| 3201 |
:meth:`~object.__reduce_ex__` for the first time in the free threading |
| 3202 |
build. |
| 3203 |
|
| 3204 |
- gh-125038: Fix crash when iterating over a generator expression after |
| 3205 |
direct changes on ``gi_frame.f_locals``. Patch by Mikhail Efimov. |
| 3206 |
|
| 3207 |
- gh-123378: Fix a crash in the :meth:`~object.__str__` method of |
| 3208 |
:exc:`UnicodeError` objects when the :attr:`UnicodeError.start` and |
| 3209 |
:attr:`UnicodeError.end` values are invalid or out-of-range. Patch by |
| 3210 |
Bénédikt Tran. |
| 3211 |
|
| 3212 |
- gh-116510: Fix a crash caused by immortal interned strings being shared |
| 3213 |
between sub-interpreters that use basic single-phase init. In that case, |
| 3214 |
the string can be used by an interpreter that outlives the interpreter |
| 3215 |
that created and interned it. For interpreters that share obmalloc state, |
| 3216 |
also share the interned dict with the main interpreter. |
| 3217 |
|
| 3218 |
- gh-122878: Use the ``pager`` binary, if available (e.g. on Debian and |
| 3219 |
derivatives), to display REPL ``help()``. |
| 3220 |
|
| 3221 |
- gh-124188: Fix reading and decoding a line from the source file witn |
| 3222 |
non-UTF-8 encoding for syntax errors raised in the compiler. |
| 3223 |
|
| 3224 |
- gh-123930: Improve the error message when a script shadowing a module from |
| 3225 |
the standard library causes :exc:`ImportError` to be raised during a |
| 3226 |
"from" import. Similarly, improve the error message when a script |
| 3227 |
shadowing a third party module attempts to "from" import an attribute from |
| 3228 |
that third party module while still initialising. |
| 3229 |
|
| 3230 |
- gh-122907: Building with ``HAVE_DYNAMIC_LOADING`` now works as well as it |
| 3231 |
did in 3.12. Existing deficiences will be addressed separately. (See |
| 3232 |
https://github.com/python/cpython/issues/122950.) |
| 3233 |
|
| 3234 |
Library |
| 3235 |
------- |
| 3236 |
|
| 3237 |
- gh-118950: Fix bug where SSLProtocol.connection_lost wasn't getting called |
| 3238 |
when OSError was thrown on writing to socket. |
| 3239 |
|
| 3240 |
- gh-113570: Fixed a bug in ``reprlib.repr`` where it incorrectly called the |
| 3241 |
repr method on shadowed Python built-in types. |
| 3242 |
|
| 3243 |
Core and Builtins |
| 3244 |
----------------- |
| 3245 |
|
| 3246 |
- gh-109746: If :func:`!_thread.start_new_thread` fails to start a new |
| 3247 |
thread, it deletes its state from interpreter and thus avoids its repeated |
| 3248 |
cleanup on finalization. |
| 3249 |
|
| 3250 |
C API |
| 3251 |
----- |
| 3252 |
|
| 3253 |
- gh-126554: Fix error handling in :class:`ctypes.CDLL` objects which could |
| 3254 |
result in a crash in rare situations. |
| 3255 |
|
| 3256 |
- gh-125608: Fix a bug where dictionary watchers (e.g., |
| 3257 |
:c:func:`PyDict_Watch`) on an object's attribute dictionary |
| 3258 |
(:attr:`~object.__dict__`) were not triggered when the object's attributes |
| 3259 |
were modified. |
| 3260 |
|
| 3261 |
- bpo-34008: Added ``Py_IsInitialized`` to the list of APIs that are safe to |
| 3262 |
call before the interpreter is initialized, and updated the embedding |
| 3263 |
tests to cover it. |
| 3264 |
|
| 3265 |
Build |
| 3266 |
----- |
| 3267 |
|
| 3268 |
- gh-123877: Set ``wasm32-wasip1`` as the WASI target. The old |
| 3269 |
``wasm32-wasi`` target is deprecated so it can be used for an eventual |
| 3270 |
WASI 1.0. |
| 3271 |
|
| 3272 |
- gh-89640: Hard-code float word ordering as little endian on WASM. |
| 3273 |
|
| 3274 |
- gh-125940: The Android build now supports `16 KB page sizes |
| 3275 |
<https://developer.android.com/guide/practices/page-sizes>`__. |
| 3276 |
|
| 3277 |
- gh-89640: Improve detection of float word ordering on Linux when link-time |
| 3278 |
optimizations are enabled. |
| 3279 |
|
| 3280 |
- gh-125269: Fix detection of whether ``-latomic`` is needed when |
| 3281 |
cross-compiling CPython using the configure script. |
| 3282 |
|
| 3283 |
- gh-121634: Allow for specifying the target compile triple for WASI. |
| 3284 |
|
| 3285 |
- gh-122578: Use WASI SDK 24 for testing. |
| 3286 |
|
| 3287 |
- gh-115382: Fix cross compile failures when the host and target SOABIs |
| 3288 |
match. |
| 3289 |
|
| 3290 |
|
| 3291 |
What's New in Python 3.13.0 final? |
| 3292 |
================================== |
| 3293 |
|
| 3294 |
*Release date: 2024-10-07* |
| 3295 |
|
| 3296 |
Library |
| 3297 |
------- |
| 3298 |
|
| 3299 |
- gh-125008: Fix :func:`tokenize.untokenize` producing invalid syntax for |
| 3300 |
double braces preceded by certain escape characters. |
| 3301 |
|
| 3302 |
Core and Builtins |
| 3303 |
----------------- |
| 3304 |
|
| 3305 |
- gh-124871: Fix compiler bug (in some versions of 3.13) where an assertion |
| 3306 |
fails during reachability analysis. |
| 3307 |
|
| 3308 |
|
| 3309 |
What's New in Python 3.13.0 release candidate 3? |
| 3310 |
================================================ |
| 3311 |
|
| 3312 |
*Release date: 2024-10-01* |
| 3313 |
|
| 3314 |
macOS |
| 3315 |
----- |
| 3316 |
|
| 3317 |
- gh-123797: Check for runtime availability of ``ptsname_r`` function on |
| 3318 |
macos. |
| 3319 |
|
| 3320 |
Windows |
| 3321 |
------- |
| 3322 |
|
| 3323 |
- gh-124609: Fix ``_Py_ThreadId`` for Windows builds using MinGW. Patch by |
| 3324 |
Tony Roberts. |
| 3325 |
|
| 3326 |
- gh-124254: Ensures experimental free-threaded binaries remain installed |
| 3327 |
when updating. |
| 3328 |
|
| 3329 |
- gh-123915: Ensure that ``Tools\msi\buildrelease.bat`` uses different |
| 3330 |
directories for AMD64 and ARM64 builds. |
| 3331 |
|
| 3332 |
Tests |
| 3333 |
----- |
| 3334 |
|
| 3335 |
- gh-124378: Updated ``test_ttk`` to pass with Tcl/Tk 8.6.15. |
| 3336 |
|
| 3337 |
Library |
| 3338 |
------- |
| 3339 |
|
| 3340 |
- gh-124538: Fixed crash when using :func:`gc.get_referents` on a capsule |
| 3341 |
object. |
| 3342 |
|
| 3343 |
- gh-124498: Fix :class:`typing.TypeAliasType` not to be generic, when |
| 3344 |
``type_params`` is an empty tuple. |
| 3345 |
|
| 3346 |
- gh-123017: Due to unreliable results on some devices, |
| 3347 |
:func:`time.strftime` no longer accepts negative years on Android. |
| 3348 |
|
| 3349 |
- gh-123014: :func:`os.pidfd_open` and :func:`signal.pidfd_send_signal` are |
| 3350 |
now unavailable when building against Android API levels older than 31, |
| 3351 |
since the underlying system calls may cause a crash. |
| 3352 |
|
| 3353 |
- gh-124248: Fixed potential crash when using :mod:`struct` to process |
| 3354 |
zero-width 'Pascal string' fields (``0p``). |
| 3355 |
|
| 3356 |
- gh-87041: Fix a bug in :mod:`argparse` where lengthy subparser argument |
| 3357 |
help is incorrectly indented. |
| 3358 |
|
| 3359 |
- gh-124212: Fix invalid variable in :mod:`venv` handling of failed symlink |
| 3360 |
on Windows |
| 3361 |
|
| 3362 |
- gh-124171: Add workaround for broken :c:func:`!fmod()` implementations on |
| 3363 |
Windows, that loose zero sign (e.g. ``fmod(-10, 1)`` returns ``0.0``). |
| 3364 |
Patch by Sergey B Kirpichev. |
| 3365 |
|
| 3366 |
- gh-123934: Fix :class:`unittest.mock.MagicMock` reseting magic methods |
| 3367 |
return values after ``.reset_mock(return_value=True)`` was called. |
| 3368 |
|
| 3369 |
- gh-123968: Fix the command-line interface for the :mod:`random` module to |
| 3370 |
select floats between 0 and N, not 1 and N. |
| 3371 |
|
| 3372 |
- gh-123892: Add ``"_wmi"`` to :data:`sys.stdlib_module_names`. Patch by |
| 3373 |
Victor Stinner. |
| 3374 |
|
| 3375 |
- gh-123339: Fix :func:`inspect.getsource` for classes in |
| 3376 |
:mod:`collections.abc` and :mod:`decimal` (for pure Python implementation) |
| 3377 |
modules. :func:`inspect.getcomments` now raises OSError instead of |
| 3378 |
IndexError if the ``__firstlineno__`` value for a class is out of bound. |
| 3379 |
|
| 3380 |
- gh-121735: When working with zip archives, importlib.resources now |
| 3381 |
properly honors module-adjacent references (e.g. ``files(pkg.mod)`` and |
| 3382 |
not just ``files(pkg)``). |
| 3383 |
|
| 3384 |
- gh-122145: Fix an issue when reporting tracebacks corresponding to Python |
| 3385 |
code emitting an empty AST body. Patch by Nikita Sobolev and Bénédikt |
| 3386 |
Tran. |
| 3387 |
|
| 3388 |
- gh-119004: Fix a crash in :ref:`OrderedDict.__eq__ |
| 3389 |
<collections_OrderedDict__eq__>` when operands are mutated during the |
| 3390 |
check. Patch by Bénédikt Tran. |
| 3391 |
|
| 3392 |
- bpo-44864: Do not translate user-provided strings in |
| 3393 |
:class:`argparse.ArgumentParser`. |
| 3394 |
|
| 3395 |
IDLE |
| 3396 |
---- |
| 3397 |
|
| 3398 |
- gh-112938: Fix uninteruptable hang when Shell gets rapid continuous |
| 3399 |
output. |
| 3400 |
|
| 3401 |
- gh-120104: Fix padding in config and search dialog windows in IDLE. |
| 3402 |
|
| 3403 |
Documentation |
| 3404 |
------------- |
| 3405 |
|
| 3406 |
- gh-124720: Update "Using Python on a Mac" section of the "Python Setup and |
| 3407 |
Usage" document and include information on installing free-threading |
| 3408 |
support. |
| 3409 |
|
| 3410 |
- gh-116622: Add an Android platform guide, and flag modules not available |
| 3411 |
on Android. |
| 3412 |
|
| 3413 |
Core and Builtins |
| 3414 |
----------------- |
| 3415 |
|
| 3416 |
- gh-124567: Revert the incremental GC (in 3.13), since it's not clear the |
| 3417 |
benefits outweigh the costs at this point. |
| 3418 |
|
| 3419 |
- gh-124642: Fixed scalability issue in free-threaded builds for lock-free |
| 3420 |
reads from dictionaries in multi-threaded scenarios |
| 3421 |
|
| 3422 |
- gh-116510: Fix a bug that can cause a crash when sub-interpreters use |
| 3423 |
"basic" single-phase extension modules. Shared objects could refer to |
| 3424 |
PyGC_Head nodes that had been freed as part of interpreter cleanup. |
| 3425 |
|
| 3426 |
- gh-124547: When deallocating an object with inline values whose |
| 3427 |
``__dict__`` is still live: if memory allocation for the inline values |
| 3428 |
fails, clear the dictionary. Prevents an interpreter crash. |
| 3429 |
|
| 3430 |
- gh-124513: Fix a crash in FrameLocalsProxy constructor: check the number |
| 3431 |
of arguments. Patch by Victor Stinner. |
| 3432 |
|
| 3433 |
- gh-124442: Fix nondeterminism in compilation by sorting the value of |
| 3434 |
:attr:`~type.__static_attributes__`. Patch by kp2pml30. |
| 3435 |
|
| 3436 |
- gh-123856: Fix PyREPL failure when a keyboard interrupt is triggered after |
| 3437 |
using a history search |
| 3438 |
|
| 3439 |
- gh-65961: Document the deprecation of setting and using ``__package__`` |
| 3440 |
and ``__cached__``. |
| 3441 |
|
| 3442 |
- gh-124027: Support ``<page up>``, ``<page down>``, and ``<delete>`` keys |
| 3443 |
in the Python REPL when ``$TERM`` is set to ``vt100``. |
| 3444 |
|
| 3445 |
- gh-77894: Fix possible crash in the garbage collector when it tries to |
| 3446 |
break a reference loop containing a :class:`memoryview` object. Now a |
| 3447 |
:class:`!memoryview` object can only be cleared if there are no buffers |
| 3448 |
that refer it. |
| 3449 |
|
| 3450 |
- gh-123339: Setting the :attr:`!__module__` attribute for a class now |
| 3451 |
removes the ``__firstlineno__`` item from the type's dict, so they will no |
| 3452 |
longer be inconsistent. |
| 3453 |
|
| 3454 |
C API |
| 3455 |
----- |
| 3456 |
|
| 3457 |
- gh-124160: Fix crash when importing modules containing state and |
| 3458 |
single-phase initialization in a subinterpreter. |
| 3459 |
|
| 3460 |
- gh-123880: Fixed a bug that prevented circular imports of extension |
| 3461 |
modules that use single-phase initialization. |
| 3462 |
|
| 3463 |
Build |
| 3464 |
----- |
| 3465 |
|
| 3466 |
- gh-124487: Windows builds now use Windows 8.1 as their API baseline |
| 3467 |
(installation already required Windows 8.1). |
| 3468 |
|
| 3469 |
- gh-124043: Building using :option:`--with-trace-refs` is (temporarily) |
| 3470 |
disallowed when the GIL is disabled. |
| 3471 |
|
| 3472 |
|
| 3473 |
What's New in Python 3.13.0 release candidate 2? |
| 3474 |
================================================ |
| 3475 |
|
| 3476 |
*Release date: 2024-09-06* |
| 3477 |
|
| 3478 |
macOS |
| 3479 |
----- |
| 3480 |
|
| 3481 |
- gh-123418: Updated macOS installer build to use OpenSSL 3.0.15. |
| 3482 |
|
| 3483 |
Windows |
| 3484 |
------- |
| 3485 |
|
| 3486 |
- gh-123418: Updated Windows build to use OpenSSL 3.0.15. |
| 3487 |
|
| 3488 |
- gh-122573: The Windows build of CPython now requires 3.10 or newer. |
| 3489 |
|
| 3490 |
- gh-100256: :mod:`mimetypes` no longer fails when it encounters an |
| 3491 |
inaccessible registry key. |
| 3492 |
|
| 3493 |
- gh-79846: Makes :code:`ssl.create_default_context()` ignore invalid |
| 3494 |
certificates in the Windows certificate store |
| 3495 |
|
| 3496 |
Tools/Demos |
| 3497 |
----------- |
| 3498 |
|
| 3499 |
- gh-123418: Update GitHub CI workflows to use OpenSSL 3.0.15 and |
| 3500 |
multissltests to use 3.0.15, 3.1.7, and 3.2.3. |
| 3501 |
|
| 3502 |
Tests |
| 3503 |
----- |
| 3504 |
|
| 3505 |
- gh-119727: Add ``--single-process`` command line option to Python test |
| 3506 |
runner (regrtest). Patch by Victor Stinner. |
| 3507 |
|
| 3508 |
- gh-101525: Skip ``test_gdb`` if the binary is relocated by BOLT. Patch by |
| 3509 |
Donghee Na. |
| 3510 |
|
| 3511 |
Security |
| 3512 |
-------- |
| 3513 |
|
| 3514 |
- gh-123678: Upgrade libexpat to 2.6.3 |
| 3515 |
|
| 3516 |
- gh-121285: Remove backtracking from tarfile header parsing for |
| 3517 |
``hdrcharset``, PAX, and GNU sparse headers. |
| 3518 |
|
| 3519 |
Library |
| 3520 |
------- |
| 3521 |
|
| 3522 |
- gh-123657: Fix crash and memory leak in :func:`decimal.getcontext`. It |
| 3523 |
crashed when using a thread-local context by |
| 3524 |
``--with-decimal-contextvar=no``. |
| 3525 |
|
| 3526 |
- gh-123448: Fixed memory leak of :class:`typing.NoDefault` by moving it to |
| 3527 |
the static types array. |
| 3528 |
|
| 3529 |
- gh-123409: Fix :attr:`ipaddress.IPv6Address.reverse_pointer` output |
| 3530 |
according to :rfc:`RFC 3596, §2.5 <3596#section-2.5>`. Patch by Bénédikt |
| 3531 |
Tran. |
| 3532 |
|
| 3533 |
- gh-123270: Applied a more surgical fix for malformed payloads in |
| 3534 |
:class:`zipfile.Path` causing infinite loops (gh-122905) without breaking |
| 3535 |
contents using legitimate characters. |
| 3536 |
|
| 3537 |
- gh-123228: Fix return type for |
| 3538 |
:func:`!_pyrepl.readline._ReadlineWrapper.get_line_buffer` to be |
| 3539 |
:func:`str`. Patch by Sergey B Kirpichev. |
| 3540 |
|
| 3541 |
- gh-123240: Raise audit events for the :func:`input` in the new REPL. |
| 3542 |
|
| 3543 |
- gh-123243: Fix memory leak in :mod:`!_decimal`. |
| 3544 |
|
| 3545 |
- gh-122546: Consistently use same file name for different exceptions in the |
| 3546 |
new repl. Patch by Sergey B Kirpichev. |
| 3547 |
|
| 3548 |
- gh-123213: :meth:`xml.etree.ElementTree.Element.extend` and |
| 3549 |
:class:`~xml.etree.ElementTree.Element` assignment no longer hide the |
| 3550 |
internal exception if an erronous generator is passed. Patch by Bar Harel. |
| 3551 |
|
| 3552 |
- gh-85110: Preserve relative path in URL without netloc in |
| 3553 |
:func:`urllib.parse.urlunsplit` and :func:`urllib.parse.urlunparse`. |
| 3554 |
|
| 3555 |
- gh-123067: Fix quadratic complexity in parsing ``"``-quoted cookie values |
| 3556 |
with backslashes by :mod:`http.cookies`. |
| 3557 |
|
| 3558 |
- gh-122981: Fix :func:`inspect.getsource` for generated classes with Python |
| 3559 |
base classes (e.g. enums). |
| 3560 |
|
| 3561 |
- gh-122903: ``zipfile.Path.glob`` now correctly matches directories instead |
| 3562 |
of silently omitting them. |
| 3563 |
|
| 3564 |
- gh-122905: :class:`zipfile.Path` objects now sanitize names from the |
| 3565 |
zipfile. |
| 3566 |
|
| 3567 |
- gh-122695: Fixed double-free when using :func:`gc.get_referents` with a |
| 3568 |
freed :class:`asyncio.Future` iterator. |
| 3569 |
|
| 3570 |
- gh-116263: :class:`logging.handlers.RotatingFileHandler` no longer rolls |
| 3571 |
over empty log files. |
| 3572 |
|
| 3573 |
- gh-105376: Restore the deprecated :mod:`logging` ``warn()`` method. It was |
| 3574 |
removed in Python 3.13 alpha 1. Keep the deprecated ``warn()`` method in |
| 3575 |
Python 3.13. Patch by Victor Stinner. |
| 3576 |
|
| 3577 |
- gh-122744: Bump the version of pip bundled in ensurepip to version 24.2. |
| 3578 |
|
| 3579 |
- gh-118814: Fix the :class:`typing.TypeVar` constructor when name is passed |
| 3580 |
by keyword. |
| 3581 |
|
| 3582 |
- gh-122478: Remove internal frames from tracebacks shown in |
| 3583 |
:class:`code.InteractiveInterpreter` with non-default |
| 3584 |
:func:`sys.excepthook`. Save correct tracebacks in |
| 3585 |
:attr:`sys.last_traceback` and update ``__traceback__`` attribute of |
| 3586 |
:attr:`sys.last_value` and :attr:`sys.last_exc`. |
| 3587 |
|
| 3588 |
- gh-116622: On Android, the ``FICLONE`` and ``FICLONERANGE`` constants are |
| 3589 |
no longer exposed by :mod:`fcntl`, as these ioctls are blocked by SELinux. |
| 3590 |
|
| 3591 |
- gh-82378: Make sure that the new :term:`REPL` interprets |
| 3592 |
:data:`sys.tracebacklimit` in the same way that the classic REPL did. |
| 3593 |
|
| 3594 |
- gh-122334: Fix crash when importing :mod:`ssl` after the main interpreter |
| 3595 |
restarts. |
| 3596 |
|
| 3597 |
- gh-87320: In :class:`code.InteractiveInterpreter`, handle exceptions |
| 3598 |
caused by calling a non-default :func:`sys.excepthook`. Before, the |
| 3599 |
exception bubbled up to the caller, ending the :term:`REPL`. |
| 3600 |
|
| 3601 |
- gh-121650: :mod:`email` headers with embedded newlines are now quoted on |
| 3602 |
output. The :mod:`~email.generator` will now refuse to serialize (write) |
| 3603 |
headers that are unsafely folded or delimited; see |
| 3604 |
:attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas |
| 3605 |
Bloemsaat and Petr Viktorin in :gh:`121650`.) |
| 3606 |
|
| 3607 |
- gh-121723: Make :func:`logging.config.dictConfig` accept any object |
| 3608 |
implementing the Queue public API. See the :ref:`queue configuration |
| 3609 |
<configure-queue>` section for details. Patch by Bénédikt Tran. |
| 3610 |
|
| 3611 |
- gh-122081: Fix a crash in the :func:`!decimal.IEEEContext` optional |
| 3612 |
function available via the ``EXTRA_FUNCTIONALITY`` configuration flag. |
| 3613 |
|
| 3614 |
- gh-121804: Correctly show error locations, when :exc:`SyntaxError` raised |
| 3615 |
in new repl. Patch by Sergey B Kirpichev. |
| 3616 |
|
| 3617 |
- gh-121151: Fix wrapping of long usage text of arguments inside a mutually |
| 3618 |
exclusive group in :mod:`argparse`. |
| 3619 |
|
| 3620 |
- gh-108172: ``webbrowser`` honors OS preferred browser on Linux when its |
| 3621 |
desktop entry name contains the text of a known browser name. |
| 3622 |
|
| 3623 |
- gh-109109: You can now get the raw TLS certificate chains from TLS |
| 3624 |
connections via :meth:`ssl.SSLSocket.get_verified_chain` and |
| 3625 |
:meth:`ssl.SSLSocket.get_unverified_chain` methods. |
| 3626 |
|
| 3627 |
Contributed by Mateusz Nowak. |
| 3628 |
|
| 3629 |
IDLE |
| 3630 |
---- |
| 3631 |
|
| 3632 |
- gh-120083: Add explicit black IDLE Hovertip foreground color needed for |
| 3633 |
recent macOS. Fixes Sonoma showing unreadable white on pale yellow. Patch |
| 3634 |
by John Riggles. |
| 3635 |
|
| 3636 |
Library |
| 3637 |
------- |
| 3638 |
|
| 3639 |
- gh-120221: asyncio REPL is now again properly recognizing |
| 3640 |
KeyboardInterrupts. Display of exceptions raised in secondary threads is |
| 3641 |
fixed. |
| 3642 |
|
| 3643 |
Core and Builtins |
| 3644 |
----------------- |
| 3645 |
|
| 3646 |
- gh-119310: Allow the new interactive shell to read history files written |
| 3647 |
with the editline library that use unicode-escaped entries. Patch by |
| 3648 |
aorcajo and Łukasz Langa. |
| 3649 |
|
| 3650 |
- gh-123572: Fix key mappings for various F-keys in Windows for the new |
| 3651 |
REPL. Patch by devdanzin |
| 3652 |
|
| 3653 |
- gh-119034: Change ``<page up>`` and ``<page down>`` keys of the Python |
| 3654 |
REPL to history search forward/backward. Patch by Victor Stinner. |
| 3655 |
|
| 3656 |
- gh-123545: Fix a double decref in rare cases on experimental JIT builds. |
| 3657 |
|
| 3658 |
- gh-123484: Fix ``_Py_DebugOffsets`` for long objects to be relative to the |
| 3659 |
start of the object rather than the start of a subobject. |
| 3660 |
|
| 3661 |
- gh-123344: Add AST optimizations for type parameter defaults. |
| 3662 |
|
| 3663 |
- gh-123321: Prevent Parser/myreadline race condition from segfaulting on |
| 3664 |
multi-threaded use. Patch by Bar Harel and Amit Wienner. |
| 3665 |
|
| 3666 |
- gh-123177: Fix a bug causing stray prompts to appear in the middle of |
| 3667 |
wrapped lines in the new REPL. |
| 3668 |
|
| 3669 |
- gh-122982: Extend the deprecation period for bool inversion (``~``) by two |
| 3670 |
years. |
| 3671 |
|
| 3672 |
- gh-123275: Support :option:`-X gil=1 <-X>` and :envvar:`PYTHON_GIL=1 |
| 3673 |
<PYTHON_GIL>` on non-free-threaded builds. |
| 3674 |
|
| 3675 |
- gh-123177: Deactivate line wrap in the Apple Terminal via a ANSI escape |
| 3676 |
code. Patch by Pablo Galindo |
| 3677 |
|
| 3678 |
- gh-123229: Fix valgrind warning by initializing the f-string buffers to 0 |
| 3679 |
in the tokenizer. Patch by Pablo Galindo |
| 3680 |
|
| 3681 |
- gh-122298: Restore printout of GC stats when |
| 3682 |
``gc.set_debug(gc.DEBUG_STATS)`` is called. This featue was accidentally |
| 3683 |
removed when implementing incremental GC. |
| 3684 |
|
| 3685 |
- gh-121804: Correctly show error locations when a :exc:`SyntaxError` is |
| 3686 |
raised in the basic REPL. Patch by Sergey B Kirpichev. |
| 3687 |
|
| 3688 |
- gh-123142: Fix too-wide source location in exception tracebacks coming |
| 3689 |
from broken iterables in comprehensions. |
| 3690 |
|
| 3691 |
- gh-123048: Fix a bug where pattern matching code could emit a |
| 3692 |
:opcode:`JUMP_FORWARD` with no source location. |
| 3693 |
|
| 3694 |
- gh-123123: Fix displaying :exc:`SyntaxError` exceptions covering multiple |
| 3695 |
lines. Patch by Pablo Galindo |
| 3696 |
|
| 3697 |
- gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH_HINT``. |
| 3698 |
|
| 3699 |
- gh-123022: Fix crash in free-threaded build when calling |
| 3700 |
:c:func:`Py_Initialize` from a non-main thread. |
| 3701 |
|
| 3702 |
- gh-122888: Fix crash on certain calls to ``str()`` with positional |
| 3703 |
arguments of the wrong type. Patch by Jelle Zijlstra. |
| 3704 |
|
| 3705 |
- gh-116622: Fix Android stdout and stderr messages being truncated or lost. |
| 3706 |
|
| 3707 |
- gh-122527: Fix a crash that occurred when a ``PyStructSequence`` was |
| 3708 |
deallocated after its type's dictionary was cleared by the GC. The type's |
| 3709 |
:c:member:`~PyTypeObject.tp_basicsize` now accounts for non-sequence |
| 3710 |
fields that aren't included in the :c:macro:`Py_SIZE` of the sequence. |
| 3711 |
|
| 3712 |
- gh-122445: Add only fields which are modified via self.* to |
| 3713 |
:attr:`~type.__static_attributes__`. |
| 3714 |
|
| 3715 |
- gh-98442: Fix too wide source locations of the cleanup instructions of a |
| 3716 |
with statement. |
| 3717 |
|
| 3718 |
- gh-93691: Fix source locations of instructions generated for with |
| 3719 |
statements. |
| 3720 |
|
| 3721 |
- gh-120097: ``FrameLocalsProxy`` now subclasses ``collections.abc.Mapping`` |
| 3722 |
and can be matched as a mapping in ``match`` statements |
| 3723 |
|
| 3724 |
C API |
| 3725 |
----- |
| 3726 |
|
| 3727 |
- gh-122728: Fix :c:func:`PyEval_GetLocals` to avoid :exc:`SystemError` |
| 3728 |
("bad argument to internal function"). Patch by Victor Stinner. |
| 3729 |
|
| 3730 |
Build |
| 3731 |
----- |
| 3732 |
|
| 3733 |
- gh-123418: Updated Android build to use OpenSSL 3.0.15. |
| 3734 |
|
| 3735 |
- gh-123297: Propagate the value of ``LDFLAGS`` to ``LDCXXSHARED`` in |
| 3736 |
:mod:`sysconfig`. Patch by Pablo Galindo |
| 3737 |
|
| 3738 |
- gh-116622: Rename build variable ``MODULE_LDFLAGS`` back to ``LIBPYTHON``, |
| 3739 |
as it's used by package build systems (e.g. Meson). |
| 3740 |
|
| 3741 |
- gh-118943: Fix an issue where the experimental JIT could be built several |
| 3742 |
times by the ``make regen-all`` target, leading to possible race |
| 3743 |
conditions on heavily parallelized builds. |
| 3744 |
|
| 3745 |
- gh-118943: Fix a possible race condition affecting parallel builds |
| 3746 |
configured with ``--enable-experimental-jit``, in which |
| 3747 |
:exc:`FileNotFoundError` could be caused by another process already moving |
| 3748 |
``jit_stencils.h.new`` to ``jit_stencils.h``. |
| 3749 |
|
| 3750 |
|
| 3751 |
What's New in Python 3.13.0 release candidate 1? |
| 3752 |
================================================ |
| 3753 |
|
| 3754 |
*Release date: 2024-07-31* |
| 3755 |
|
| 3756 |
Tests |
| 3757 |
----- |
| 3758 |
|
| 3759 |
- gh-59022: Add tests for :func:`pkgutil.extend_path`. Patch by Andreas |
| 3760 |
Stocker. |
| 3761 |
|
| 3762 |
- gh-99242: :func:`os.getloadavg` may throw :exc:`OSError` when running |
| 3763 |
regression tests under certain conditions (e.g. chroot). This error is now |
| 3764 |
caught and ignored, since reporting load average is optional. |
| 3765 |
|
| 3766 |
Security |
| 3767 |
-------- |
| 3768 |
|
| 3769 |
- gh-122133: Authenticate the socket connection for the |
| 3770 |
``socket.socketpair()`` fallback on platforms where ``AF_UNIX`` is not |
| 3771 |
available like Windows. |
| 3772 |
|
| 3773 |
Patch by Gregory P. Smith <[email protected]> and Seth Larson |
| 3774 |
<[email protected]>. Reported by Ellie <[email protected]> |
| 3775 |
|
| 3776 |
- gh-121957: Fixed missing audit events around interactive use of Python, |
| 3777 |
now also properly firing for ``python -i``, as well as for ``python -m |
| 3778 |
asyncio``. The events in question are ``cpython.run_stdin`` and |
| 3779 |
``cpython.run_startup``. |
| 3780 |
|
| 3781 |
Library |
| 3782 |
------- |
| 3783 |
|
| 3784 |
- gh-122400: Handle :exc:`ValueError`\s raised by :func:`os.stat` in |
| 3785 |
:class:`filecmp.dircmp` and :func:`filecmp.cmpfiles`. Patch by Bénédikt |
| 3786 |
Tran. |
| 3787 |
|
| 3788 |
- gh-122311: Fix some error messages in :mod:`pickle`. |
| 3789 |
|
| 3790 |
- gh-122332: Fixed segfault with :meth:`asyncio.Task.get_coro` when using an |
| 3791 |
eager task factory. |
| 3792 |
|
| 3793 |
- gh-105733: :func:`ctypes.ARRAY` is now :term:`soft deprecated`: it no |
| 3794 |
longer emits deprecation warnings and is not scheduled for removal. |
| 3795 |
|
| 3796 |
- gh-122087: Restore :func:`inspect.ismethoddescriptor` and |
| 3797 |
:func:`inspect.isroutine` returning ``False`` for |
| 3798 |
:class:`functools.partial` objects. |
| 3799 |
|
| 3800 |
- gh-122170: Handle :exc:`ValueError`\s raised by :func:`os.stat` in |
| 3801 |
:mod:`linecache`. Patch by Bénédikt Tran. |
| 3802 |
|
| 3803 |
- gh-82951: Serializing objects with complex ``__qualname__`` (such as |
| 3804 |
unbound methods and nested classes) by name no longer involves serializing |
| 3805 |
parent objects by value in pickle protocols < 4. |
| 3806 |
|
| 3807 |
- gh-113785: :mod:`csv` now correctly parses numeric fields (when used with |
| 3808 |
:const:`csv.QUOTE_NONNUMERIC` or :const:`csv.QUOTE_STRINGS`) which start |
| 3809 |
with an escape character. |
| 3810 |
|
| 3811 |
- gh-122088: :func:`@warnings.deprecated <warnings.deprecated>` now copies |
| 3812 |
the coroutine status of functions and methods so that |
| 3813 |
:func:`inspect.iscoroutinefunction` returns the correct result. |
| 3814 |
|
| 3815 |
- gh-120930: Fixed a bug introduced by gh-92081 that added an incorrect |
| 3816 |
extra blank to encoded words occurring in wrapped headers. |
| 3817 |
|
| 3818 |
- gh-121474: Fix missing sanity check for ``parties`` arg in |
| 3819 |
:class:`threading.Barrier` constructor. Patch by Clinton Christian |
| 3820 |
(pygeek). |
| 3821 |
|
| 3822 |
- gh-120289: Fixed the use-after-free issue in :mod:`cProfile` by |
| 3823 |
disallowing ``disable()`` and ``clear()`` in external timers. |
| 3824 |
|
| 3825 |
IDLE |
| 3826 |
---- |
| 3827 |
|
| 3828 |
- gh-122482: Change About IDLE to direct users to discuss.python.org instead |
| 3829 |
of the now unused idle-dev email and mailing list. |
| 3830 |
|
| 3831 |
Core and Builtins |
| 3832 |
----------------- |
| 3833 |
|
| 3834 |
- gh-116090: Fix an issue in JIT builds that prevented some :keyword:`for` |
| 3835 |
loops from correctly firing :monitoring-event:`RAISE` monitoring events. |
| 3836 |
|
| 3837 |
- gh-122208: Dictionary watchers now only deliver the PyDict_EVENT_ADDED |
| 3838 |
event when the insertion is in a known good state to succeed. |
| 3839 |
|
| 3840 |
- gh-122300: Preserve AST nodes for f-string with single-element format |
| 3841 |
specifiers. Patch by Pablo Galindo |
| 3842 |
|
| 3843 |
- gh-120906: :attr:`frame.f_locals` now supports arbitrary hashable objects |
| 3844 |
as keys. |
| 3845 |
|
| 3846 |
- gh-122029: Emit ``c_call`` events in :func:`sys.setprofile` when a |
| 3847 |
``PyMethodObject`` pointing to a ``PyCFunction`` is called. |
| 3848 |
|
| 3849 |
- gh-122026: Fix a bug that caused the tokenizer to not correctly identify |
| 3850 |
mismatched parentheses inside f-strings in some situations. Patch by Pablo |
| 3851 |
Galindo |
| 3852 |
|
| 3853 |
- gh-118934: Make ``PyEval_GetLocals`` return borrowed reference |
| 3854 |
|
| 3855 |
C API |
| 3856 |
----- |
| 3857 |
|
| 3858 |
- gh-116622: Make :any:`PyObject_Print` work around a bug in Android and |
| 3859 |
OpenBSD which prevented it from throwing an exception when trying to write |
| 3860 |
to a read-only stream. |
| 3861 |
|
| 3862 |
- gh-121489: Export private :c:func:`!_PyBytes_Join` again. |
| 3863 |
|
| 3864 |
Build |
| 3865 |
----- |
| 3866 |
|
| 3867 |
- gh-120522: Added a :option:`--with-app-store-compliance` option to patch |
| 3868 |
out known issues with macOS/iOS App Store review processes. |
| 3869 |
|
| 3870 |
|
| 3871 |
What's New in Python 3.13.0 beta 4? |
| 3872 |
=================================== |
| 3873 |
|
| 3874 |
*Release date: 2024-07-18* |
| 3875 |
|
| 3876 |
Tests |
| 3877 |
----- |
| 3878 |
|
| 3879 |
- gh-121084: Fix test_typing random leaks. Clear typing ABC caches when |
| 3880 |
running tests for refleaks (``-R`` option): call ``_abc_caches_clear()`` |
| 3881 |
on typing abstract classes and their subclasses. Patch by Victor Stinner. |
| 3882 |
|
| 3883 |
- gh-121160: Add a test for :func:`readline.set_history_length`. Note that |
| 3884 |
this test may fail on readline libraries. |
| 3885 |
|
| 3886 |
- gh-121200: Fix ``test_expanduser_pwd2()`` of ``test_posixpath``. Call |
| 3887 |
``getpwnam()`` to get ``pw_dir``, since it can be different than |
| 3888 |
``getpwall()`` ``pw_dir``. Patch by Victor Stinner. |
| 3889 |
|
| 3890 |
- gh-121188: When creating the JUnit XML file, regrtest now escapes |
| 3891 |
characters which are invalid in XML, such as the chr(27) control character |
| 3892 |
used in ANSI escape sequences. Patch by Victor Stinner. |
| 3893 |
|
| 3894 |
Library |
| 3895 |
------- |
| 3896 |
|
| 3897 |
- gh-57141: The *shallow* argument to :class:`filecmp.dircmp` (new in Python |
| 3898 |
3.13) is now keyword-only. |
| 3899 |
|
| 3900 |
- gh-121245: Simplify handling of the history file in |
| 3901 |
``site.register_readline()`` helper. The ``CAN_USE_PYREPL`` variable now |
| 3902 |
will be initialized, when imported. Patch by Sergey B Kirpichev. |
| 3903 |
|
| 3904 |
- gh-121332: Fix constructor of :mod:`ast` nodes with custom |
| 3905 |
``_attributes``. Previously, passing custom attributes would raise a |
| 3906 |
:py:exc:`DeprecationWarning`. Passing arguments to the constructor that |
| 3907 |
are not in ``_fields`` or ``_attributes`` remains deprecated. Patch by |
| 3908 |
Jelle Zijlstra. |
| 3909 |
|
| 3910 |
- gh-121279: Avoid :exc:`NameError` for the :mod:`warnings` module when |
| 3911 |
accessing the depracated atributes of the :mod:`importlib.abc` module. |
| 3912 |
|
| 3913 |
- gh-121245: Fix a bug in the handling of the command history of the new |
| 3914 |
:term:`REPL` that caused the history file to be wiped at REPL exit. |
| 3915 |
|
| 3916 |
- gh-87744: Fix waitpid race while calling |
| 3917 |
:meth:`~asyncio.subprocess.Process.send_signal` in asyncio. Patch by Kumar |
| 3918 |
Aditya. |
| 3919 |
|
| 3920 |
- gh-121018: Fixed other issues where :class:`argparse.ArgumentParser` did |
| 3921 |
not honor ``exit_on_error=False``. |
| 3922 |
|
| 3923 |
- gh-120678: Fix regression in the new REPL that meant that globals from |
| 3924 |
files passed using the ``-i`` argument would not be included in the REPL's |
| 3925 |
global namespace. Patch by Alex Waygood. |
| 3926 |
|
| 3927 |
- gh-120782: Fix wrong references of the :mod:`datetime` types after |
| 3928 |
reloading the module. |
| 3929 |
|
| 3930 |
- gh-120713: :meth:`datetime.datetime.strftime` now 0-pads years with less |
| 3931 |
than four digits for the format specifiers ``%Y`` and ``%G`` on Linux. |
| 3932 |
Patch by Ben Hsing |
| 3933 |
|
| 3934 |
- gh-117983: Defer the ``threading`` import in ``importlib.util`` until lazy |
| 3935 |
loading is used. |
| 3936 |
|
| 3937 |
- gh-119189: When using the ``**`` operator or :func:`pow` with |
| 3938 |
:class:`~fractions.Fraction` as the base and an exponent that is not |
| 3939 |
rational, a float, or a complex, the fraction is no longer converted to a |
| 3940 |
float. |
| 3941 |
|
| 3942 |
- gh-118714: Allow ``restart`` in post-mortem debugging of :mod:`pdb`. |
| 3943 |
Removed restart message when the user quits pdb from post-mortem mode. |
| 3944 |
|
| 3945 |
- gh-105623: Fix performance degradation in |
| 3946 |
:class:`logging.handlers.RotatingFileHandler`. Patch by Craig Robson. |
| 3947 |
|
| 3948 |
IDLE |
| 3949 |
---- |
| 3950 |
|
| 3951 |
- gh-78889: Stop Shell freezes by blocking user access to non-method |
| 3952 |
sys.stdout.shell attributes, which are all private. |
| 3953 |
|
| 3954 |
Documentation |
| 3955 |
------------- |
| 3956 |
|
| 3957 |
- gh-121749: Fix documentation for :c:func:`PyModule_AddObjectRef`. |
| 3958 |
|
| 3959 |
- gh-120012: Clarify the behaviours of :meth:`multiprocessing.Queue.empty` |
| 3960 |
and :meth:`multiprocessing.SimpleQueue.empty` on closed queues. Patch by |
| 3961 |
Bénédikt Tran. |
| 3962 |
|
| 3963 |
Core and Builtins |
| 3964 |
----------------- |
| 3965 |
|
| 3966 |
- gh-121860: Fix crash when rematerializing a managed dictionary after it |
| 3967 |
was deleted. |
| 3968 |
|
| 3969 |
- gh-121814: Fixed the SegFault when :c:func:`PyEval_SetTrace` is used with |
| 3970 |
no Python frame on stack. |
| 3971 |
|
| 3972 |
- gh-121295: Fix PyREPL console getting into a blocked state after |
| 3973 |
interrupting a long paste |
| 3974 |
|
| 3975 |
- gh-121794: Fix bug in free-threaded Python where a resurrected object |
| 3976 |
could lead to a negative ref count assertion failure. |
| 3977 |
|
| 3978 |
- gh-121657: Improve the :exc:`SyntaxError` message if the user tries to use |
| 3979 |
:keyword:`yield from <yield>` outside a function. |
| 3980 |
|
| 3981 |
- gh-121609: Fix pasting of characters containing unicode character joiners |
| 3982 |
in the new REPL. Patch by Marta Gomez Macias |
| 3983 |
|
| 3984 |
- gh-117482: Unexpected slot wrappers are no longer created for builtin |
| 3985 |
static types in subinterpreters. |
| 3986 |
|
| 3987 |
- gh-121499: Fix a bug affecting how multi-line history was being rendered |
| 3988 |
in the new REPL after interacting with the new screen cache. Patch by |
| 3989 |
Pablo Galindo |
| 3990 |
|
| 3991 |
- gh-121497: Fix a bug that was preventing the REPL to correctly respect the |
| 3992 |
history when an input hook was set. Patch by Pablo Galindo |
| 3993 |
|
| 3994 |
- gh-121012: Tier 2 execution now ensures that list iterators remain |
| 3995 |
exhausted, once they become exhausted. |
| 3996 |
|
| 3997 |
- gh-121439: Allow tuples of length 20 in the freelist to be reused. |
| 3998 |
|
| 3999 |
- gh-121368: Fix race condition in ``_PyType_Lookup`` in the free-threaded |
| 4000 |
build due to a missing memory fence. This could lead to |
| 4001 |
``_PyType_Lookup`` returning incorrect results on arm64. |
| 4002 |
|
| 4003 |
- gh-121130: Fix f-strings with debug expressions in format specifiers. |
| 4004 |
Patch by Pablo Galindo |
| 4005 |
|
| 4006 |
- gh-121115: :c:func:`PyLong_AsNativeBytes` no longer uses |
| 4007 |
:meth:`~object.__index__` methods by default. The |
| 4008 |
``Py_ASNATIVEBYTES_ALLOW_INDEX`` flag has been added to allow it. |
| 4009 |
|
| 4010 |
C API |
| 4011 |
----- |
| 4012 |
|
| 4013 |
- gh-89364: Export the :c:func:`PySignal_SetWakeupFd` function. Previously, |
| 4014 |
the function was documented but it couldn't be used in 3rd party code. |
| 4015 |
Patch by Victor Stinner. |
| 4016 |
|
| 4017 |
- gh-113993: :c:func:`PyUnicode_InternInPlace` no longer prevents its |
| 4018 |
argument from being garbage collected. |
| 4019 |
|
| 4020 |
Several functions that take ``char *`` are now documented as possibly |
| 4021 |
preventing string objects from being garbage collected; refer to their |
| 4022 |
documentation for details: :c:func:`PyUnicode_InternFromString`, |
| 4023 |
:c:func:`PyDict_SetItemString`, :c:func:`PyObject_SetAttrString`, |
| 4024 |
:c:func:`PyObject_DelAttrString`, :c:func:`PyUnicode_InternFromString`, |
| 4025 |
and ``PyModule_Add*`` convenience functions. |
| 4026 |
|
| 4027 |
- gh-113601: Removed debug build assertions related to interning strings, |
| 4028 |
which were falsely triggered by stable ABI extensions. |
| 4029 |
|
| 4030 |
- gh-112136: Restore the private ``_PyArg_Parser`` structure and the private |
| 4031 |
``_PyArg_ParseTupleAndKeywordsFast()`` function, previously removed in |
| 4032 |
Python 3.13 alpha 1. Patch by Victor Stinner. |
| 4033 |
|
| 4034 |
Build |
| 4035 |
----- |
| 4036 |
|
| 4037 |
- gh-120371: Support WASI SDK 22 by explicitly skipping functions that are |
| 4038 |
just stubs in wasi-libc. |
| 4039 |
|
| 4040 |
- gh-121731: Fix mimalloc compile error on GNU/Hurd |
| 4041 |
|
| 4042 |
- gh-121487: Fix deprecation warning for ATOMIC_VAR_INIT in mimalloc. |
| 4043 |
|
| 4044 |
- gh-121467: Fix a Makefile bug that prevented mimalloc header files from |
| 4045 |
being installed. |
| 4046 |
|
| 4047 |
- gh-121103: On POSIX systems, excluding macOS framework installs, the lib |
| 4048 |
directory for the free-threaded build now includes a "t" suffix to avoid |
| 4049 |
conflicts with a co-located default build installation. |
| 4050 |
|
| 4051 |
- gh-120831: The default minimum iOS version was increased to 13.0. |
| 4052 |
|
| 4053 |
- gh-113565: Improve :mod:`curses` and :mod:`curses.panel` dependency checks |
| 4054 |
in :program:`configure`. |
| 4055 |
|
| 4056 |
|
| 4057 |
What's New in Python 3.13.0 beta 3? |
| 4058 |
=================================== |
| 4059 |
|
| 4060 |
*Release date: 2024-06-27* |
| 4061 |
|
| 4062 |
Core and Builtins |
| 4063 |
----------------- |
| 4064 |
|
| 4065 |
- gh-120838: :c:func:`Py_Finalize()` and :c:func:`Py_FinalizeEx()` now |
| 4066 |
always run with the main interpreter active. |
| 4067 |
|
| 4068 |
- gh-113433: Subinterpreters now get cleaned up automatically during runtime |
| 4069 |
finalization. |
| 4070 |
|
| 4071 |
- gh-119462: Make sure that invariants of type versioning are maintained: * |
| 4072 |
Superclasses always have their version number assigned before subclasses * |
| 4073 |
The version tag is always zero if the tag is not valid. * The version tag |
| 4074 |
is always non-zero if the tag is valid. |
| 4075 |
|
| 4076 |
- gh-120437: Fix ``_CHECK_STACK_SPACE`` optimization problems introduced in |
| 4077 |
:gh:`118322`. |
| 4078 |
|
| 4079 |
- gh-120722: Correctly set the bytecode position on return instructions |
| 4080 |
within lambdas. Patch by Jelle Zijlstra. |
| 4081 |
|
| 4082 |
- gh-120367: Fix bug where compiler creates a redundant jump during |
| 4083 |
pseudo-op replacement. Can only happen with a synthetic AST that has a try |
| 4084 |
on the same line as the instruction following the exception handler. |
| 4085 |
|
| 4086 |
- gh-113993: Strings interned with :func:`sys.intern` are again |
| 4087 |
garbage-collected when no longer used, as per the documentation. Strings |
| 4088 |
interned with the C function :c:func:`PyUnicode_InternInPlace` are still |
| 4089 |
immortal. Internals of the string interning mechanism have been changed. |
| 4090 |
This may affect performance and identities of :class:`str` objects. |
| 4091 |
|
| 4092 |
- gh-120384: Fix an array out of bounds crash in ``list_ass_subscript``, |
| 4093 |
which could be invoked via some specificly tailored input: including |
| 4094 |
concurrent modification of a list object, where one thread assigns a slice |
| 4095 |
and another clears it. |
| 4096 |
|
| 4097 |
- gh-120367: Fix crash in compiler on code with redundant NOPs and JUMPs |
| 4098 |
which show up after exception handlers are moved to the end of the code. |
| 4099 |
|
| 4100 |
Library |
| 4101 |
------- |
| 4102 |
|
| 4103 |
- gh-120380: Fix Python implementation of :class:`pickle.Pickler` for |
| 4104 |
:class:`bytes` and :class:`bytearray` objects when using protocol version |
| 4105 |
5. Patch by Bénédikt Tran. |
| 4106 |
|
| 4107 |
Core and Builtins |
| 4108 |
----------------- |
| 4109 |
|
| 4110 |
- gh-120400: Support Linux perf profiler to see Python calls on RISC-V |
| 4111 |
architecture. |
| 4112 |
|
| 4113 |
- gh-120221: Deliver real signals on Ctrl-C and Ctrl-Z in the new REPL. |
| 4114 |
Patch by Pablo Galindo |
| 4115 |
|
| 4116 |
- gh-120346: Respect :envvar:`PYTHON_BASIC_REPL` when running in interative |
| 4117 |
inspect mode (``python -i``). Patch by Pablo Galindo |
| 4118 |
|
| 4119 |
- gh-93691: Fix source locations of instructions generated for the iterator |
| 4120 |
of a for statement. |
| 4121 |
|
| 4122 |
- gh-120198: Fix a crash when multiple threads read and write to the same |
| 4123 |
``__class__`` of an object concurrently. |
| 4124 |
|
| 4125 |
- gh-120298: Fix use-after free in ``list_richcompare_impl`` which can be |
| 4126 |
invoked via some specificly tailored evil input. |
| 4127 |
|
| 4128 |
- gh-119666: Fix a compiler crash in the case where two comprehensions in |
| 4129 |
class scope both reference ``__class__``. |
| 4130 |
|
| 4131 |
- gh-120225: Fix crash in compiler on empty block at end of exception |
| 4132 |
handler. |
| 4133 |
|
| 4134 |
- gh-119933: Improve :exc:`SyntaxError` messages for invalid expressions in |
| 4135 |
a type parameters bound, a type parameter constraint tuple or a default |
| 4136 |
type parameter. Patch by Bénédikt Tran. |
| 4137 |
|
| 4138 |
- bpo-24766: Fix handling of ``doc`` argument to subclasses of ``property``. |
| 4139 |
|
| 4140 |
Library |
| 4141 |
------- |
| 4142 |
|
| 4143 |
- gh-121027: Add a future warning in :meth:`!functools.partial.__get__`. In |
| 4144 |
future Python versions :class:`functools.partial` will be a method |
| 4145 |
descriptor. |
| 4146 |
|
| 4147 |
- gh-121025: Improve the :meth:`~object.__repr__` of |
| 4148 |
:class:`functools.partialmethod`. Patch by Bénédikt Tran. |
| 4149 |
|
| 4150 |
- gh-121018: Fixed an issue where |
| 4151 |
:meth:`!argparse.ArgumentParser.parses_args` did not honor |
| 4152 |
``exit_on_error=False`` when given unrecognized arguments. Patch by Ben |
| 4153 |
Hsing. |
| 4154 |
|
| 4155 |
- gh-119614: Fix truncation of strings with embedded null characters in some |
| 4156 |
internal operations in :mod:`tkinter`. |
| 4157 |
|
| 4158 |
- gh-120910: When reading installed files from an egg, use |
| 4159 |
``relative_to(walk_up=True)`` to honor files installed outside of the |
| 4160 |
installation root. |
| 4161 |
|
| 4162 |
- gh-120888: Upgrade pip wheel bundled with ensurepip (pip 24.1.1) |
| 4163 |
|
| 4164 |
- gh-101830: Accessing the :mod:`tkinter` object's string representation no |
| 4165 |
longer converts the underlying Tcl object to a string on Windows. |
| 4166 |
|
| 4167 |
- gh-120811: Fix possible memory leak in :meth:`contextvars.Context.run`. |
| 4168 |
|
| 4169 |
- gh-120769: Make empty line in :mod:`pdb` repeats the last command even |
| 4170 |
when the command is from ``cmdqueue``. |
| 4171 |
|
| 4172 |
- gh-120732: Fix ``name`` passing to :class:`unittest.mock.Mock` object when |
| 4173 |
using :func:`unittest.mock.create_autospec`. |
| 4174 |
|
| 4175 |
- gh-120683: Fix an error in :class:`logging.LogRecord`, when the integer |
| 4176 |
part of the timestamp is rounded up, while the millisecond calculation |
| 4177 |
truncates, causing the log timestamp to be wrong by up to 999 ms (affected |
| 4178 |
roughly 1 in 8 million timestamps). |
| 4179 |
|
| 4180 |
- gh-120633: Move scrollbar and remove tear-off menus in turtledemo. |
| 4181 |
|
| 4182 |
- gh-120541: Improve the prompt in the "less" pager when :func:`help` is |
| 4183 |
called with non-string argument. |
| 4184 |
|
| 4185 |
- gh-120495: Fix incorrect exception handling in Tab Nanny. Patch by |
| 4186 |
Wulian233. |
| 4187 |
|
| 4188 |
- gh-120381: Correct :func:`inspect.ismethoddescriptor` to check also for |
| 4189 |
the lack of :meth:`~object.__delete__`. Patch by Jan Kaliszewski. |
| 4190 |
|
| 4191 |
- gh-90425: The OS byte in gzip headers is now always set to 255 when using |
| 4192 |
:func:`gzip.compress`. |
| 4193 |
|
| 4194 |
- gh-120343: Fix column offset reporting for tokens that come after |
| 4195 |
multiline f-strings in the :mod:`tokenize` module. |
| 4196 |
|
| 4197 |
- gh-119600: Fix :func:`unittest.mock.patch` to not read attributes of the |
| 4198 |
target when ``new_callable`` is set. Patch by Robert Collins. |
| 4199 |
|
| 4200 |
- gh-114053: Fix edge-case bug where :func:`typing.get_type_hints` would |
| 4201 |
produce incorrect results if type parameters in a class scope were |
| 4202 |
overridden by assignments in a class scope and ``from __future__ import |
| 4203 |
annotations`` semantics were enabled. Patch by Alex Waygood. |
| 4204 |
|
| 4205 |
- gh-114053: Fix erroneous :exc:`NameError` when calling |
| 4206 |
:func:`inspect.get_annotations` with ``eval_str=True``` on a class that |
| 4207 |
made use of :pep:`695` type parameters in a module that had ``from |
| 4208 |
__future__ import annotations`` at the top of the file. Patch by Alex |
| 4209 |
Waygood. |
| 4210 |
|
| 4211 |
- gh-120268: Prohibit passing ``None`` to pure-Python |
| 4212 |
:meth:`datetime.date.fromtimestamp` to achieve consistency with |
| 4213 |
C-extension implementation. |
| 4214 |
|
| 4215 |
- gh-120244: Fix memory leak in :func:`re.sub` when the replacement string |
| 4216 |
contains backreferences. |
| 4217 |
|
| 4218 |
- gh-120211: Fix :mod:`tkinter.ttk` with Tcl/Tk 9.0. |
| 4219 |
|
| 4220 |
- gh-71587: Fix crash in C version of :meth:`datetime.datetime.strptime` |
| 4221 |
when called again on the restarted interpreter. |
| 4222 |
|
| 4223 |
- gh-120161: :mod:`datetime` no longer crashes in certain complex reference |
| 4224 |
cycle situations. |
| 4225 |
|
| 4226 |
- gh-119698: Fix :meth:`symtable.Class.get_methods` and document its |
| 4227 |
behaviour. Patch by Bénédikt Tran. |
| 4228 |
|
| 4229 |
- gh-120121: Add :exc:`concurrent.futures.InvalidStateError` to module's |
| 4230 |
``__all__``. |
| 4231 |
|
| 4232 |
- gh-119933: Add the :class:`symtable.SymbolTableType` enumeration to |
| 4233 |
represent the possible outputs of the |
| 4234 |
:class:`symtable.SymbolTable.get_type` method. Patch by Bénédikt Tran. |
| 4235 |
|
| 4236 |
- gh-120108: Fix calling :func:`copy.deepcopy` on :mod:`ast` trees that have |
| 4237 |
been modified to have references to parent nodes. Patch by Jelle Zijlstra. |
| 4238 |
|
| 4239 |
- gh-112672: Support building :mod:`tkinter` with Tcl 9.0. |
| 4240 |
|
| 4241 |
- gh-65454: :func:`unittest.mock.Mock.attach_mock` no longer triggers a call |
| 4242 |
to a ``PropertyMock`` being attached. |
| 4243 |
|
| 4244 |
- gh-81936: :meth:`!help` and :meth:`!showtopic` methods now respect a |
| 4245 |
configured *output* argument to :class:`!pydoc.Helper` and not use the |
| 4246 |
pager in such cases. Patch by Enrico Tröger. |
| 4247 |
|
| 4248 |
- gh-119577: The :exc:`DeprecationWarning` emitted when testing the truth |
| 4249 |
value of an :class:`xml.etree.ElementTree.Element` now describes |
| 4250 |
unconditionally returning ``True`` in a future version rather than raising |
| 4251 |
an exception in Python 3.14. |
| 4252 |
|
| 4253 |
- gh-118908: Limit exposed globals from internal imports and definitions on |
| 4254 |
new REPL startup. Patch by Eugene Triguba and Pablo Galindo. |
| 4255 |
|
| 4256 |
- gh-119506: Fix :meth:`!io.TextIOWrapper.write` method breaks internal |
| 4257 |
buffer when the method is called again during flushing internal buffer. |
| 4258 |
|
| 4259 |
Build |
| 4260 |
----- |
| 4261 |
|
| 4262 |
- gh-120671: Fix failing configure tests due to a missing space when |
| 4263 |
appending to CFLAGS. |
| 4264 |
|
| 4265 |
- gh-120602: Correctly handle LLVM installs with ``LLVM_VERSION_SUFFIX`` |
| 4266 |
when building with ``--enable-experimental-jit``. |
| 4267 |
|
| 4268 |
- gh-120326: On Windows, fix build error when ``--disable-gil`` and |
| 4269 |
``--experimental-jit`` options are combined. |
| 4270 |
|
| 4271 |
- gh-120291: Make the ``python-config`` shell script compatible with |
| 4272 |
non-bash shells. |
| 4273 |
|
| 4274 |
C API |
| 4275 |
----- |
| 4276 |
|
| 4277 |
- gh-120642: Remove the private ``_Py_CODEUNIT`` type from the public C API. |
| 4278 |
The internal ``pycore_code.h`` header should now be used to get this |
| 4279 |
internal type. Patch by Victor Stinner. |
| 4280 |
|
| 4281 |
- gh-120858: :c:func:`PyDict_Next` no longer locks the dictionary in the |
| 4282 |
free-threaded build. The locking needs to be done by the caller around |
| 4283 |
the entire iteration loop. |
| 4284 |
|
| 4285 |
- gh-120642: Remove the following unstable functions: |
| 4286 |
|
| 4287 |
* ``PyUnstable_Replace_Executor()`` |
| 4288 |
* ``PyUnstable_SetOptimizer()`` |
| 4289 |
* ``PyUnstable_GetOptimizer()`` |
| 4290 |
* ``PyUnstable_GetExecutor()`` |
| 4291 |
* ``PyUnstable_Optimizer_NewCounter()`` |
| 4292 |
* ``PyUnstable_Optimizer_NewUOpOptimizer()`` |
| 4293 |
|
| 4294 |
Patch by Victor Stinner. |
| 4295 |
|
| 4296 |
- gh-119344: The critical section API is now public as part of the |
| 4297 |
non-limited C API. |
| 4298 |
|
| 4299 |
- gh-118789: Add :c:func:`PyUnstable_Object_ClearWeakRefsNoCallbacks`, which |
| 4300 |
clears weakrefs without calling their callbacks. |
| 4301 |
|
| 4302 |
- gh-117511: Make the :c:type:`PyMutex` public in the non-limited C API. |
| 4303 |
|
| 4304 |
|
| 4305 |
What's New in Python 3.13.0 beta 2? |
| 4306 |
=================================== |
| 4307 |
|
| 4308 |
*Release date: 2024-06-05* |
| 4309 |
|
| 4310 |
Security |
| 4311 |
-------- |
| 4312 |
|
| 4313 |
- gh-118773: Fixes creation of ACLs in :func:`os.mkdir` on Windows to work |
| 4314 |
correctly on non-English machines. |
| 4315 |
|
| 4316 |
- gh-118486: :func:`os.mkdir` on Windows now accepts *mode* of ``0o700`` to |
| 4317 |
restrict the new directory to the current user. This fixes |
| 4318 |
:cve:`2024-4030` affecting :func:`tempfile.mkdtemp` in scenarios where the |
| 4319 |
base temporary directory is more permissive than the default. |
| 4320 |
|
| 4321 |
Core and Builtins |
| 4322 |
----------------- |
| 4323 |
|
| 4324 |
- gh-119724: Reverted improvements to error messages for ``elif``/``else`` |
| 4325 |
statements not matching any valid statements, which made in hard to locate |
| 4326 |
the syntax errors inside those ``elif``/``else`` blocks. |
| 4327 |
|
| 4328 |
- gh-119842: Honor :c:func:`PyOS_InputHook` in the new REPL. Patch by Pablo |
| 4329 |
Galindo |
| 4330 |
|
| 4331 |
- gh-119821: Fix execution of :ref:`annotation scopes <annotation-scopes>` |
| 4332 |
within classes when ``globals`` is set to a non-dict. Patch by Jelle |
| 4333 |
Zijlstra. |
| 4334 |
|
| 4335 |
- gh-119548: Add a ``clear`` command to the REPL. Patch by Pablo Galindo |
| 4336 |
|
| 4337 |
- gh-111999: Fix the signature of :meth:`str.format_map`. |
| 4338 |
|
| 4339 |
- gh-119560: An invalid assert in beta 1 has been removed. The assert would |
| 4340 |
fail if ``PyState_FindModule()`` was used in an extension module's init |
| 4341 |
function before the module def had been initialized. |
| 4342 |
|
| 4343 |
- gh-119369: Fix deadlock during thread deletion in free-threaded build, |
| 4344 |
which could occur when the GIL was enabled at runtime. |
| 4345 |
|
| 4346 |
- gh-119525: Fix deadlock involving ``_PyType_Lookup()`` cache in the |
| 4347 |
free-threaded build when the GIL is dynamically enabled at runtime. |
| 4348 |
|
| 4349 |
- gh-119311: Fix bug where names are unexpectedly mangled in the bases of |
| 4350 |
generic classes. |
| 4351 |
|
| 4352 |
- gh-119395: Fix bug where names appearing after a generic class are mangled |
| 4353 |
as if they are in the generic class. |
| 4354 |
|
| 4355 |
- gh-119213: Non-builtin modules built with argument clinic were crashing if |
| 4356 |
used in a subinterpreter before the main interpreter. The objects that |
| 4357 |
were causing the problem by leaking between interpreters carelessly have |
| 4358 |
been fixed. |
| 4359 |
|
| 4360 |
- gh-119011: Fixes ``type.__type_params__`` to return an empty tuple instead |
| 4361 |
of a descriptor. |
| 4362 |
|
| 4363 |
- gh-118692: Avoid creating unnecessary :exc:`StopIteration` instances for |
| 4364 |
monitoring. |
| 4365 |
|
| 4366 |
- gh-119049: Fix displaying the source line for warnings created by the C |
| 4367 |
API if the :mod:`warnings` module had not yet been imported. |
| 4368 |
|
| 4369 |
- gh-118844: Fix build failures when configuring with both ``--disable-gil`` |
| 4370 |
and ``--enable-experimental-jit``. |
| 4371 |
|
| 4372 |
- gh-118921: Add ``copy()`` method for ``FrameLocalsProxy`` which returns a |
| 4373 |
snapshot ``dict`` for local variables. |
| 4374 |
|
| 4375 |
- gh-117657: Fix data races on the field that stores a pointer to the |
| 4376 |
interpreter's main thread that occur in free-threaded builds. |
| 4377 |
|
| 4378 |
- gh-118561: Fix race condition in free-threaded build where |
| 4379 |
:meth:`!list.extend` could expose uninitialised memory to concurrent |
| 4380 |
readers. |
| 4381 |
|
| 4382 |
- gh-117195: Avoid assertion failure for debug builds when calling |
| 4383 |
``object.__sizeof__(1)`` |
| 4384 |
|
| 4385 |
Library |
| 4386 |
------- |
| 4387 |
|
| 4388 |
- gh-119819: Fix regression to allow logging configuration with |
| 4389 |
multiprocessing queue types. |
| 4390 |
|
| 4391 |
- gh-117142: The :mod:`ctypes` module may now be imported in all |
| 4392 |
subinterpreters, including those that have their own GIL. |
| 4393 |
|
| 4394 |
- gh-118835: Fix _pyrepl crash when using custom prompt with ANSI escape |
| 4395 |
codes. |
| 4396 |
|
| 4397 |
- gh-117398: The ``_datetime`` module (C implementation for :mod:`datetime`) |
| 4398 |
now supports being imported in multiple interpreters. |
| 4399 |
|
| 4400 |
- gh-89727: Fix issue with :func:`shutil.rmtree` where a |
| 4401 |
:exc:`RecursionError` is raised on deep directory trees. |
| 4402 |
|
| 4403 |
- gh-89727: Partially fix issue with :func:`shutil.rmtree` where a |
| 4404 |
:exc:`RecursionError` is raised on deep directory trees. A recursion error |
| 4405 |
is no longer raised when :data:`!rmtree.avoids_symlink_attacks` is false. |
| 4406 |
|
| 4407 |
- gh-119118: Fix performance regression in the :mod:`tokenize` module by |
| 4408 |
caching the ``line`` token attribute and calculating the column offset |
| 4409 |
more efficiently. |
| 4410 |
|
| 4411 |
- gh-89727: Fix issue with :func:`os.fwalk` where a :exc:`RecursionError` |
| 4412 |
was raised on deep directory trees by adjusting the implementation to be |
| 4413 |
iterative instead of recursive. |
| 4414 |
|
| 4415 |
- gh-119588: ``zipfile.Path.is_symlink`` now assesses if the given path is a |
| 4416 |
symlink. |
| 4417 |
|
| 4418 |
- gh-119555: Catch :exc:`SyntaxError` from :func:`compile` in the |
| 4419 |
runsource() method of the InteractiveColoredConsole. Patch by Sergey B |
| 4420 |
Kirpichev. |
| 4421 |
|
| 4422 |
- gh-113892: Now, the method ``sock_connect`` of |
| 4423 |
:class:`asyncio.ProactorEventLoop` raises a :exc:`ValueError` if given |
| 4424 |
socket is not in non-blocking mode, as well as in other loop |
| 4425 |
implementations. |
| 4426 |
|
| 4427 |
- gh-119443: The interactive REPL no longer runs with ``from __future__ |
| 4428 |
import annotations`` enabled. Patch by Jelle Zijlstra. |
| 4429 |
|
| 4430 |
- gh-117398: Objects in the datetime C-API are now all statically allocated, |
| 4431 |
which means better memory safety, especially when the module is reloaded. |
| 4432 |
This should be transparent to users. |
| 4433 |
|
| 4434 |
- gh-118894: :mod:`asyncio` REPL now has the same capabilities as PyREPL. |
| 4435 |
|
| 4436 |
- gh-118911: In PyREPL, updated ``maybe-accept``'s logic so that if the user |
| 4437 |
hits :kbd:`Enter` twice, they are able to terminate the block even if |
| 4438 |
there's trailing whitespace. Also, now when the user hits arrow up, the |
| 4439 |
cursor is on the last functional line. This matches IPython's behavior. |
| 4440 |
Patch by Aya Elsayed. |
| 4441 |
|
| 4442 |
- gh-111201: Remove dependency to :mod:`readline` from the new Python REPL. |
| 4443 |
|
| 4444 |
- gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) |
| 4445 |
windows blurry Patch by Wulian233 and Terry Jan Reedy |
| 4446 |
|
| 4447 |
- gh-119121: Fix a NameError happening in |
| 4448 |
``asyncio.staggered.staggered_race``. This function is now tested. |
| 4449 |
|
| 4450 |
- gh-119113: Fix issue where :meth:`pathlib.PurePath.with_suffix` didn't |
| 4451 |
raise :exc:`TypeError` when given ``None`` as a suffix. |
| 4452 |
|
| 4453 |
- gh-118643: Fix an AttributeError in the :mod:`email` module when re-fold a |
| 4454 |
long address list. Also fix more cases of incorrect encoding of the |
| 4455 |
address separator in the address list. |
| 4456 |
|
| 4457 |
- gh-58933: Make :mod:`pdb` return to caller frame correctly when |
| 4458 |
``f_trace`` of the caller frame is not set |
| 4459 |
|
| 4460 |
- gh-118895: Setting attributes on :data:`typing.NoDefault` now raises |
| 4461 |
:exc:`AttributeError` instead of :exc:`TypeError`. |
| 4462 |
|
| 4463 |
- gh-118868: Fixed issue where kwargs were no longer passed to the logging |
| 4464 |
handler QueueHandler |
| 4465 |
|
| 4466 |
- gh-118851: ``ctx`` arguments to the constructors of :mod:`ast` node |
| 4467 |
classes now default to :class:`ast.Load() <ast.Load>`. Patch by Jelle |
| 4468 |
Zijlstra. |
| 4469 |
|
| 4470 |
- gh-118760: Restore the default value of ``tkiter.wantobjects`` to ``1``. |
| 4471 |
|
| 4472 |
- gh-118760: Fix errors in calling Tkinter bindings on Windows. |
| 4473 |
|
| 4474 |
- gh-118507: Fix :func:`os.path.isfile` on Windows for pipes. Speedup |
| 4475 |
:func:`os.path.isjunction` and :func:`os.path.lexists` on Windows with a |
| 4476 |
native implementation. |
| 4477 |
|
| 4478 |
- gh-118772: Allow :class:`typing.TypeVar` instances without a default to |
| 4479 |
follow instances without a default in some cases. Patch by Jelle Zijlstra. |
| 4480 |
|
| 4481 |
- gh-110863: :func:`os.path.realpath` now suppresses any :exc:`OSError` from |
| 4482 |
:func:`os.readlink` when *strict* mode is disabled (the default). |
| 4483 |
|
| 4484 |
- gh-118263: Speed up :func:`os.path.splitroot` & :func:`os.path.normpath` |
| 4485 |
with a direct C call. |
| 4486 |
|
| 4487 |
- gh-118033: Fix :func:`dataclasses.dataclass` not creating a |
| 4488 |
``__weakref__`` slot when subclassing :class:`typing.Generic`. |
| 4489 |
|
| 4490 |
- gh-106531: In :mod:`importlib.resources`, sync with `importlib_resources |
| 4491 |
6.3.2 |
| 4492 |
<https://importlib-resources.readthedocs.io/en/latest/history.html#v6-3-2>`_, |
| 4493 |
including: ``MultiplexedPath`` now expects ``Traversable`` paths, |
| 4494 |
deprecating string arguments to ``MultiplexedPath``; Enabled support for |
| 4495 |
resources in namespace packages in zip files; Fixed ``NotADirectoryError`` |
| 4496 |
when calling files on a subdirectory of a namespace package. |
| 4497 |
|
| 4498 |
- gh-113978: Ignore warnings on text completion inside REPL. |
| 4499 |
|
| 4500 |
- gh-103956: Fix lack of newline characters in :mod:`trace` module output |
| 4501 |
when line tracing is enabled but source code line for current frame is not |
| 4502 |
available. |
| 4503 |
|
| 4504 |
- gh-92081: Fix missing spaces in email headers when the spaces are mixed |
| 4505 |
with encoded 8-bit characters. |
| 4506 |
|
| 4507 |
- gh-103194: Prepare Tkinter for C API changes in Tcl 8.7/9.0 to avoid |
| 4508 |
:class:`!_tkinter.Tcl_Obj` being unexpectedly returned instead of |
| 4509 |
:class:`bool`, :class:`str`, :class:`bytearray`, or :class:`int`. |
| 4510 |
|
| 4511 |
- gh-87106: Fixed handling in :meth:`inspect.Signature.bind` of keyword |
| 4512 |
arguments having the same name as positional-only arguments when a |
| 4513 |
variadic keyword argument (e.g. ``**kwargs``) is present. |
| 4514 |
|
| 4515 |
- bpo-45767: Fix integer conversion in :func:`os.major`, :func:`os.minor`, |
| 4516 |
and :func:`os.makedev`. Support device numbers larger than ``2**63-1``. |
| 4517 |
Support non-existent device number (``NODEV``). |
| 4518 |
|
| 4519 |
- gh-67693: Fix :func:`urllib.parse.urlunparse` and |
| 4520 |
:func:`urllib.parse.urlunsplit` for URIs with path starting with multiple |
| 4521 |
slashes and no authority. Based on patch by Ashwin Ramaswami. |
| 4522 |
|
| 4523 |
Tests |
| 4524 |
----- |
| 4525 |
|
| 4526 |
- gh-119050: regrtest test runner: Add XML support to the refleak checker |
| 4527 |
(-R option). Patch by Victor Stinner. |
| 4528 |
|
| 4529 |
Build |
| 4530 |
----- |
| 4531 |
|
| 4532 |
- gh-119729: On POSIX systems, the pkg-config (``.pc``) filenames now |
| 4533 |
include the ABI flags, which may include debug ("d") and free-threaded |
| 4534 |
("t"). For example: * ``python-3.14.pc`` (default, non-debug build) * |
| 4535 |
``python-3.14d.pc`` (default, debug build) * ``python-3.14t.pc`` |
| 4536 |
(free-threaded build) |
| 4537 |
|
| 4538 |
- gh-115119: Fall back to the bundled libmpdec if a system version cannot be |
| 4539 |
found. |
| 4540 |
|
| 4541 |
- gh-119132: Update :data:`sys.version` to identify whether the build is |
| 4542 |
default build or free-threading build. Patch By Donghee Na. |
| 4543 |
|
| 4544 |
- gh-118836: Fix an ``AssertionError`` when building with |
| 4545 |
``--enable-experimental-jit`` and the compiler emits a ``SHT_NOTE`` |
| 4546 |
section. |
| 4547 |
|
| 4548 |
- gh-118943: Fix a possible race condition affecting parallel builds |
| 4549 |
configured with ``--enable-experimental-jit``, in which compilation errors |
| 4550 |
could be caused by an incompletely-generated header file. |
| 4551 |
|
| 4552 |
Windows |
| 4553 |
------- |
| 4554 |
|
| 4555 |
- gh-119679: Ensures correct import libraries are included in Windows |
| 4556 |
installs. |
| 4557 |
|
| 4558 |
- gh-119690: Adds Unicode support and fixes audit events for |
| 4559 |
``_winapi.CreateNamedPipe``. |
| 4560 |
|
| 4561 |
- gh-111201: Add support for new pyrepl on Windows |
| 4562 |
|
| 4563 |
- gh-119070: Fixes ``py.exe`` handling of shebangs like ``/usr/bin/env |
| 4564 |
python3.12``, which were previously interpreted as ``python3.exe`` instead |
| 4565 |
of ``python3.12.exe``. |
| 4566 |
|
| 4567 |
- gh-117505: Fixes an issue with the Windows installer not running ensurepip |
| 4568 |
in a fully isolated environment. This could cause unexpected interactions |
| 4569 |
with the user site-packages. |
| 4570 |
|
| 4571 |
- gh-118209: Avoid crashing in :mod:`mmap` on Windows when the mapped memory |
| 4572 |
is inaccessible due to file system errors or access violations. |
| 4573 |
|
| 4574 |
- gh-116145: Updated bundled Tcl/Tk to 8.6.14. |
| 4575 |
|
| 4576 |
C API |
| 4577 |
----- |
| 4578 |
|
| 4579 |
- gh-119585: Fix crash when a thread state that was created by |
| 4580 |
:c:func:`PyGILState_Ensure` calls a destructor that during |
| 4581 |
:c:func:`PyThreadState_Clear` that calls back into |
| 4582 |
:c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`. This might |
| 4583 |
occur when in the free-threaded build or when using thread-local variables |
| 4584 |
whose destructors call :c:func:`PyGILState_Ensure`. |
| 4585 |
|
| 4586 |
- gh-119336: Restore the removed ``_PyLong_NumBits()`` function. It is used |
| 4587 |
by the pywin32 project. Patch by Ethan Smith |
| 4588 |
|
| 4589 |
- gh-119247: Added ``Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST`` and |
| 4590 |
``Py_END_CRITICAL_SECTION_SEQUENCE_FAST`` macros to make it possible to |
| 4591 |
use PySequence_Fast APIs safely when free-threaded, and update str.join to |
| 4592 |
work without the GIL using them. |
| 4593 |
|
| 4594 |
- gh-111389: Add :c:macro:`PyHASH_MULTIPLIER` constant: prime multiplier |
| 4595 |
used in string and various other hashes. Patch by Victor Stinner. |
| 4596 |
|
| 4597 |
- gh-116984: Make mimalloc includes relative to the current file to avoid |
| 4598 |
embedders or extensions needing to include ``Internal/mimalloc`` if they |
| 4599 |
are already including internal CPython headers. |
| 4600 |
|
| 4601 |
- gh-118789: Restore ``_PyWeakref_ClearRef`` that was previously removed in |
| 4602 |
Python 3.13 alpha 1. |
| 4603 |
|
| 4604 |
|
| 4605 |
What's New in Python 3.13.0 beta 1? |
| 4606 |
=================================== |
| 4607 |
|
| 4608 |
*Release date: 2024-05-08* |
| 4609 |
|
| 4610 |
Security |
| 4611 |
-------- |
| 4612 |
|
| 4613 |
- gh-116741: Update bundled libexpat to 2.6.2 |
| 4614 |
|
| 4615 |
- gh-117233: Detect BLAKE2, SHA3, Shake, & truncated SHA512 support in the |
| 4616 |
OpenSSL-ish libcrypto library at build time. This allows :mod:`hashlib` |
| 4617 |
to be used with libraries that do not to support every algorithm that |
| 4618 |
upstream OpenSSL does. |
| 4619 |
|
| 4620 |
Core and Builtins |
| 4621 |
----------------- |
| 4622 |
|
| 4623 |
- gh-118414: Add instrumented opcodes to YIELD_VALUE assertion for tracing |
| 4624 |
cases. |
| 4625 |
|
| 4626 |
- gh-117953: When a builtin or extension module is imported for the first |
| 4627 |
time, while a subinterpreter is active, the module's init function is now |
| 4628 |
run by the main interpreter first before import continues in the |
| 4629 |
subinterpreter. Consequently, single-phase init modules now fail in an |
| 4630 |
isolated subinterpreter without the init function running under that |
| 4631 |
interpreter, whereas before it would run under the subinterpreter *before* |
| 4632 |
failing, potentially leaving behind global state and callbacks and |
| 4633 |
otherwise leaving the module in an inconsistent state. |
| 4634 |
|
| 4635 |
- gh-117549: Don't use designated initializer syntax in inline functions in |
| 4636 |
internal headers. They cause problems for C++ or MSVC users who aren't yet |
| 4637 |
using the latest C++ standard (C++20). While internal, pycore_backoff.h, |
| 4638 |
is included (indirectly, via pycore_code.h) by some key 3rd party software |
| 4639 |
that does so for speed. |
| 4640 |
|
| 4641 |
Library |
| 4642 |
------- |
| 4643 |
|
| 4644 |
- gh-95382: Improve performance of :func:`json.dumps` and :func:`json.dump` |
| 4645 |
when using the argument *indent*. Depending on the data the encoding using |
| 4646 |
:func:`json.dumps` with *indent* can be up to 2 to 3 times faster. |
| 4647 |
|
| 4648 |
Core and Builtins |
| 4649 |
----------------- |
| 4650 |
|
| 4651 |
- gh-116322: In ``--disable-gil`` builds, the GIL will be enabled while |
| 4652 |
loading C extension modules. If the module indicates that it supports |
| 4653 |
running without the GIL, the GIL will be disabled once loading is |
| 4654 |
complete. Otherwise, the GIL will remain enabled for the remainder of the |
| 4655 |
interpreter's lifetime. This behavior does not apply if the GIL has been |
| 4656 |
explicitly enabled or disabled with ``PYTHON_GIL`` or ``-Xgil``. |
| 4657 |
|
| 4658 |
- gh-118513: Fix incorrect :exc:`UnboundLocalError` when two comprehensions |
| 4659 |
in the same function both reference the same name, and in one |
| 4660 |
comprehension the name is bound while in the other it's an implicit |
| 4661 |
global. |
| 4662 |
|
| 4663 |
- gh-118518: Allow the Linux perf support to work without frame pointers |
| 4664 |
using perf's advanced JIT support. The feature is activated when using the |
| 4665 |
``PYTHON_PERF_JIT_SUPPORT`` environment variable or when running Python |
| 4666 |
with ``-Xperf_jit``. Patch by Pablo Galindo. |
| 4667 |
|
| 4668 |
- gh-117514: Add ``sys._is_gil_enabled()`` function that returns whether the |
| 4669 |
GIL is currently enabled. In the default build it always returns ``True`` |
| 4670 |
because the GIL is always enabled. In the free-threaded build, it may |
| 4671 |
return ``True`` or ``False``. |
| 4672 |
|
| 4673 |
- gh-118164: Break a loop between the Python implementation of the |
| 4674 |
:mod:`decimal` module and the Python code for integer to string |
| 4675 |
conversion. Also optimize integer to string conversion for values in the |
| 4676 |
range from 9_000 to 135_000 decimal digits. |
| 4677 |
|
| 4678 |
- gh-118473: Fix :func:`sys.set_asyncgen_hooks` not to be partially set when |
| 4679 |
raising :exc:`TypeError`. |
| 4680 |
|
| 4681 |
- gh-118465: Compiler populates the new ``__firstlineno__`` field on a class |
| 4682 |
with the line number of the first line of the class definition. |
| 4683 |
|
| 4684 |
- gh-118492: Fix an issue where the type cache can expose a previously |
| 4685 |
accessed attribute when a finalizer is run. |
| 4686 |
|
| 4687 |
- gh-117714: update ``async_generator.athrow().close()`` and |
| 4688 |
``async_generator.asend().close()`` to close their section of the |
| 4689 |
underlying async generator |
| 4690 |
|
| 4691 |
- gh-111201: The :term:`interactive` interpreter is now implemented in |
| 4692 |
Python, which allows for a number of new features like colors, multiline |
| 4693 |
input, history viewing, and paste mode. Contributed by Pablo Galindo, |
| 4694 |
Łukasz Langa and Lysandros Nikolaou based on code from the PyPy project. |
| 4695 |
|
| 4696 |
- gh-74929: Implement PEP 667: converted :attr:`FrameType.f_locals |
| 4697 |
<frame.f_locals>` and :c:func:`PyFrame_GetLocals` to return a |
| 4698 |
write-through proxy object when the frame refers to a function or |
| 4699 |
comprehension. |
| 4700 |
|
| 4701 |
- gh-116767: Fix crash in compiler on 'async with' that has many context |
| 4702 |
managers. |
| 4703 |
|
| 4704 |
- gh-118335: Change how to use the tier 2 interpreter. Instead of running |
| 4705 |
Python with ``-X uops`` or setting the environment variable |
| 4706 |
``PYTHON_UOPS=1``, this choice is now made at build time by configuring |
| 4707 |
with ``--enable-experimental-jit=interpreter``. |
| 4708 |
|
| 4709 |
**Beware!** This changes the environment variable to enable or disable |
| 4710 |
micro-ops to ``PYTHON_JIT``. The old ``PYTHON_UOPS`` is no longer used. |
| 4711 |
|
| 4712 |
- gh-118306: Update JIT compilation to use LLVM 18 |
| 4713 |
|
| 4714 |
- gh-118160: :ref:`Annotation scopes <annotation-scopes>` within classes can |
| 4715 |
now contain comprehensions. However, such comprehensions are not inlined |
| 4716 |
into their parent scope at runtime. Patch by Jelle Zijlstra. |
| 4717 |
|
| 4718 |
- gh-118272: Fix bug where ``generator.close`` does not free the generator |
| 4719 |
frame's locals. |
| 4720 |
|
| 4721 |
- gh-118216: Don't consider :mod:`__future__` imports with dots before the |
| 4722 |
module name. |
| 4723 |
|
| 4724 |
- gh-118074: Make sure that the Executor objects in the COLD_EXITS array |
| 4725 |
aren't assumed to be GC-able (which would access bytes outside the |
| 4726 |
object). |
| 4727 |
|
| 4728 |
- gh-107674: Lazy load frame line number to improve performance of tracing |
| 4729 |
|
| 4730 |
- gh-118082: Improve :exc:`SyntaxError` message for imports without names, |
| 4731 |
like in ``from x import`` and ``import`` cases. It now points out to users |
| 4732 |
that :keyword:`import` expects at least one name after it. |
| 4733 |
|
| 4734 |
- gh-118090: Improve :exc:`SyntaxError` message for empty type param |
| 4735 |
brackets. |
| 4736 |
|
| 4737 |
- gh-117958: Added a ``get_jit_code()`` method to access JIT compiled |
| 4738 |
machine code from the UOp Executor when the experimental JIT is enabled. |
| 4739 |
Patch by Anthony Shaw. |
| 4740 |
|
| 4741 |
- gh-117901: Add option for compiler's codegen to save nested instruction |
| 4742 |
sequences for introspection. |
| 4743 |
|
| 4744 |
- gh-116622: Redirect stdout and stderr to system log when embedded in an |
| 4745 |
Android app. |
| 4746 |
|
| 4747 |
- gh-109118: :ref:`annotation scope <annotation-scopes>` within class scopes |
| 4748 |
can now contain lambdas. |
| 4749 |
|
| 4750 |
- gh-117894: Prevent ``agen.aclose()`` objects being re-used after |
| 4751 |
``.throw()``. |
| 4752 |
|
| 4753 |
- gh-117881: prevent concurrent access to an async generator via |
| 4754 |
athrow().throw() or asend().throw() |
| 4755 |
|
| 4756 |
- gh-117536: Fix a :exc:`RuntimeWarning` when calling |
| 4757 |
``agen.aclose().throw(Exception)``. |
| 4758 |
|
| 4759 |
- gh-117755: Fix mimalloc allocator for huge memory allocation (around |
| 4760 |
8,589,934,592 GiB) on s390x. Patch by Victor Stinner. |
| 4761 |
|
| 4762 |
- gh-117750: Fix issue where an object's dict would get out of sync with the |
| 4763 |
object's internal values when being cleared. ``obj.__dict__.clear()`` now |
| 4764 |
clears the internal values, but leaves the dict attached to the object. |
| 4765 |
|
| 4766 |
- gh-117431: Improve the performance of the following :class:`bytes` and |
| 4767 |
:class:`bytearray` methods by adapting them to the |
| 4768 |
:c:macro:`METH_FASTCALL` calling convention: |
| 4769 |
|
| 4770 |
* :meth:`!count` |
| 4771 |
* :meth:`!find` |
| 4772 |
* :meth:`!index` |
| 4773 |
* :meth:`!rfind` |
| 4774 |
* :meth:`!rindex` |
| 4775 |
|
| 4776 |
- gh-117709: Speed up calls to :func:`str` with positional-only argument, by |
| 4777 |
using the :pep:`590` ``vectorcall`` calling convention. Patch by Erlend |
| 4778 |
Aasland. |
| 4779 |
|
| 4780 |
- gh-117680: Give ``_PyInstructionSequence`` a Python interface and use it |
| 4781 |
in tests. |
| 4782 |
|
| 4783 |
- gh-115776: Statically allocated objects are, by definition, immortal so |
| 4784 |
must be marked as such regardless of whether they are in extension modules |
| 4785 |
or not. |
| 4786 |
|
| 4787 |
- gh-117385: Remove unhandled ``PY_MONITORING_EVENT_BRANCH`` and |
| 4788 |
``PY_MONITORING_EVENT_EXCEPTION_HANDLED`` events from |
| 4789 |
:func:`sys.settrace`. |
| 4790 |
|
| 4791 |
- gh-116322: Extension modules may indicate to the runtime that they can run |
| 4792 |
without the GIL. Multi-phase init modules do so by calling providing |
| 4793 |
``Py_MOD_GIL_NOT_USED`` for the ``Py_mod_gil`` slot, while single-phase |
| 4794 |
init modules call ``PyUnstable_Module_SetGIL(mod, Py_MOD_GIL_NOT_USED)`` |
| 4795 |
from their init function. |
| 4796 |
|
| 4797 |
- gh-116129: Implement :pep:`696`, adding support for defaults on type |
| 4798 |
parameters. Patch by Jelle Zijlstra. |
| 4799 |
|
| 4800 |
- gh-93502: Add two new functions to the C-API, |
| 4801 |
:c:func:`PyRefTracer_SetTracer` and :c:func:`PyRefTracer_GetTracer`, that |
| 4802 |
allows to track object creation and destruction the same way the |
| 4803 |
:mod:`tracemalloc` module does. Patch by Pablo Galindo |
| 4804 |
|
| 4805 |
- gh-107674: Improved the performance of :func:`sys.settrace` significantly |
| 4806 |
|
| 4807 |
- gh-95754: Improve the error message when a script shadowing a module from |
| 4808 |
the standard library causes :exc:`AttributeError` to be raised. Similarly, |
| 4809 |
improve the error message when a script shadowing a third party module |
| 4810 |
attempts to access an attribute from that third party module while still |
| 4811 |
initialising. |
| 4812 |
|
| 4813 |
- gh-99180: Elide uninformative traceback indicators in ``return`` and |
| 4814 |
simple ``assignment`` statements. Patch by Pablo Galindo. |
| 4815 |
|
| 4816 |
- gh-105879: Allow the *globals* and *locals* arguments to :func:`exec` and |
| 4817 |
:func:`eval` to be passed as keywords. |
| 4818 |
|
| 4819 |
Library |
| 4820 |
------- |
| 4821 |
|
| 4822 |
- gh-118418: A :exc:`DeprecationWarning` is now emitted if you fail to pass |
| 4823 |
a value to the new *type_params* parameter of ``typing._eval_type()`` or |
| 4824 |
``typing.ForwardRef._evaluate()``. (Using either of these private and |
| 4825 |
undocumented functions is discouraged to begin with, but failing to pass a |
| 4826 |
value to the ``type_params`` parameter may lead to incorrect behaviour on |
| 4827 |
Python 3.12 or newer.) |
| 4828 |
|
| 4829 |
- gh-118660: Add an optional second type parameter to |
| 4830 |
:class:`typing.ContextManager` and :class:`typing.AsyncContextManager`, |
| 4831 |
representing the return types of :meth:`~object.__exit__` and |
| 4832 |
:meth:`~object.__aexit__` respectively. This parameter defaults to ``bool |
| 4833 |
| None``. |
| 4834 |
|
| 4835 |
- gh-118650: The ``enum`` module allows method named ``_repr_*`` to be |
| 4836 |
defined on ``Enum`` types. |
| 4837 |
|
| 4838 |
- gh-118648: Add type parameter defaults to :class:`typing.Generator` and |
| 4839 |
:class:`typing.AsyncGenerator`. |
| 4840 |
|
| 4841 |
- gh-101137: Mime type ``text/x-rst`` is now supported by :mod:`mimetypes`. |
| 4842 |
|
| 4843 |
- gh-118164: The Python implementation of the ``decimal`` module could |
| 4844 |
appear to hang in relatively small power cases (like ``2**117``) if |
| 4845 |
context precision was set to a very high value. A different method to |
| 4846 |
check for exactly representable results is used now that doesn't rely on |
| 4847 |
computing ``10**precision`` (which could be effectively too large to |
| 4848 |
compute). |
| 4849 |
|
| 4850 |
- gh-111744: ``breakpoint()`` and ``pdb.set_trace()`` now enter the debugger |
| 4851 |
immediately after the call rather than before the next line is executed. |
| 4852 |
|
| 4853 |
- gh-118500: Add :mod:`pdb` support for zipapps |
| 4854 |
|
| 4855 |
- gh-118406: Add signature for :class:`sqlite3.Connection` objects. |
| 4856 |
|
| 4857 |
- gh-101732: Use a Y2038 compatible openssl time function when available. |
| 4858 |
|
| 4859 |
- gh-118404: Fix :func:`inspect.signature` for non-comparable callables. |
| 4860 |
|
| 4861 |
- gh-118402: Fix :func:`inspect.signature` for the result of the |
| 4862 |
:func:`functools.cmp_to_key` call. |
| 4863 |
|
| 4864 |
- gh-116622: On Android, :any:`sysconfig.get_platform` now returns the |
| 4865 |
format specified by :pep:`738`. |
| 4866 |
|
| 4867 |
- gh-118285: Allow to specify the signature of custom callable instances of |
| 4868 |
extension type by the ``__text_signature__`` attribute. Specify signatures |
| 4869 |
of :class:`operator.attrgetter`, :class:`operator.itemgetter`, and |
| 4870 |
:class:`operator.methodcaller` instances. |
| 4871 |
|
| 4872 |
- gh-118314: Fix an edge case in :func:`binascii.a2b_base64` strict mode, |
| 4873 |
where excessive padding is not detected when no padding is necessary. |
| 4874 |
|
| 4875 |
- gh-118271: Add the :class:`!PhotoImage` methods :meth:`!read` to read an |
| 4876 |
image from a file and :meth:`!data` to get the image data. Add |
| 4877 |
*background* and *grayscale* parameters to :class:`!PhotoImage` method |
| 4878 |
:meth:`!write`. |
| 4879 |
|
| 4880 |
- gh-118225: Add the :class:`!PhotoImage` method :meth:`!copy_replace` to |
| 4881 |
copy a region from one image to other image, possibly with pixel zooming |
| 4882 |
and/or subsampling. Add *from_coords* parameter to :class:`!PhotoImage` |
| 4883 |
methods :meth:`!copy`, :meth:`!zoom` and :meth:`!subsample`. Add *zoom* |
| 4884 |
and *subsample* parameters to :class:`!PhotoImage` method :meth:`!copy`. |
| 4885 |
|
| 4886 |
- gh-118221: Fix a bug where :meth:`sqlite3.Connection.iterdump` could fail |
| 4887 |
if a custom :attr:`row factory <sqlite3.Connection.row_factory>` was used. |
| 4888 |
Patch by Erlend Aasland. |
| 4889 |
|
| 4890 |
- gh-118013: Fix regression introduced in gh-103193 that meant that calling |
| 4891 |
:func:`inspect.getattr_static` on an instance would cause a strong |
| 4892 |
reference to that instance's class to persist in an internal cache in the |
| 4893 |
:mod:`inspect` module. This caused unexpected memory consumption if the |
| 4894 |
class was dynamically created, the class held strong references to other |
| 4895 |
objects which took up a significant amount of memory, and the cache |
| 4896 |
contained the sole strong reference to the class. The fix for the |
| 4897 |
regression leads to a slowdown in :func:`!getattr_static`, but the |
| 4898 |
function should still be significantly faster than it was in Python 3.11. |
| 4899 |
Patch by Alex Waygood. |
| 4900 |
|
| 4901 |
- gh-118218: Speed up :func:`itertools.pairwise` in the common case by up to |
| 4902 |
1.8x. |
| 4903 |
|
| 4904 |
- gh-117486: Improve the behavior of user-defined subclasses of |
| 4905 |
:class:`ast.AST`. Such classes will now require no changes in the usual |
| 4906 |
case to conform with the behavior changes of the :mod:`ast` module in |
| 4907 |
Python 3.13. Patch by Jelle Zijlstra. |
| 4908 |
|
| 4909 |
- gh-90848: Fixed :func:`unittest.mock.create_autospec` to configure parent |
| 4910 |
mock with keyword arguments. |
| 4911 |
|
| 4912 |
- gh-118168: Fix incorrect argument substitution when :data:`typing.Unpack` |
| 4913 |
is used with the builtin :class:`tuple`. :data:`!typing.Unpack` now raises |
| 4914 |
:exc:`TypeError` when used with certain invalid types. Patch by Jelle |
| 4915 |
Zijlstra. |
| 4916 |
|
| 4917 |
- gh-118131: Add command-line interface for the :mod:`random` module. Patch |
| 4918 |
by Hugo van Kemenade. |
| 4919 |
|
| 4920 |
- gh-118107: Fix :mod:`zipimport` reading of ZIP64 files with file entries |
| 4921 |
that are too big or offset too far. |
| 4922 |
|
| 4923 |
- gh-102511: Fix :func:`os.path.normpath` for UNC paths on Windows. Speed up |
| 4924 |
:func:`os.path.splitroot` with a native implementation. |
| 4925 |
|
| 4926 |
- gh-117535: Change the unknown filename of :mod:`warnings` from ``sys`` to |
| 4927 |
``<sys>`` to clarify that it's not a real filename. |
| 4928 |
|
| 4929 |
- gh-114053: Fix erroneous :exc:`NameError` when calling |
| 4930 |
:func:`typing.get_type_hints` on a class that made use of :pep:`695` type |
| 4931 |
parameters in a module that had ``from __future__ import annotations`` at |
| 4932 |
the top of the file. Patch by Alex Waygood. |
| 4933 |
|
| 4934 |
- gh-116931: Add parameter *fileobj* check for |
| 4935 |
:func:`tarfile.TarFile.addfile` |
| 4936 |
|
| 4937 |
- gh-117995: Don't raise :exc:`DeprecationWarning` when a :term:`sequence` |
| 4938 |
of parameters is used to bind indexed, nameless placeholders. See also |
| 4939 |
:gh:`100668`. |
| 4940 |
|
| 4941 |
- gh-80361: Fix TypeError in :func:`email.message.Message.get_payload` when |
| 4942 |
the charset is :rfc:`2231` encoded. |
| 4943 |
|
| 4944 |
- gh-86650: Fix IndexError when parse some emails with invalid Message-ID |
| 4945 |
(including one-off addresses generated by Microsoft Outlook). |
| 4946 |
|
| 4947 |
- gh-117691: Improve the error messages emitted by :mod:`tarfile` |
| 4948 |
deprecation warnings relating to PEP 706. If a ``filter`` argument is not |
| 4949 |
provided to ``extract()`` or ``extractall``, the deprecation warning now |
| 4950 |
points to the line in the user's code where the relevant function was |
| 4951 |
called. Patch by Alex Waygood. |
| 4952 |
|
| 4953 |
- gh-115874: Fixed a possible segfault during garbage collection of |
| 4954 |
``_asyncio.FutureIter`` objects. Patch by Savannah Ostrowski. |
| 4955 |
|
| 4956 |
- gh-115060: Speed up :meth:`pathlib.Path.glob` by omitting an initial |
| 4957 |
:meth:`~pathlib.Path.is_dir` call. As a result of this change, |
| 4958 |
:meth:`~pathlib.Path.glob` can no longer raise :exc:`OSError`. |
| 4959 |
|
| 4960 |
- gh-77102: :mod:`site` module now parses ``.pth`` file with UTF-8 first, |
| 4961 |
and :term:`locale encoding` if ``UnicodeDecodeError`` happened. It |
| 4962 |
supported only locale encoding before. |
| 4963 |
|
| 4964 |
- gh-76785: We've exposed the low-level :mod:`!_interpreters` module for the |
| 4965 |
sake of the PyPI implementation of :pep:`734`. It was sometimes available |
| 4966 |
as the :mod:`!_xxsubinterpreters` module and was formerly used only for |
| 4967 |
testing. For the most part, it should be considered an internal module, |
| 4968 |
like :mod:`!_thread` and :mod:`!_imp`. See |
| 4969 |
https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26. |
| 4970 |
|
| 4971 |
- gh-115060: Speed up :meth:`pathlib.Path.glob` by not scanning directories |
| 4972 |
for non-wildcard pattern segments. |
| 4973 |
|
| 4974 |
- gh-117727: Speed up :meth:`pathlib.Path.iterdir` by using |
| 4975 |
:func:`os.scandir` internally. |
| 4976 |
|
| 4977 |
- gh-117586: Speed up :meth:`pathlib.Path.walk` by working with strings |
| 4978 |
internally. |
| 4979 |
|
| 4980 |
- gh-117722: Change the new multi-separator support in |
| 4981 |
:meth:`asyncio.StreamReader.readuntil` to only accept tuples of separators |
| 4982 |
rather than arbitrary iterables. |
| 4983 |
|
| 4984 |
- gh-117692: Fixes a bug when :class:`doctest.DocTestFinder` was failing on |
| 4985 |
wrapped ``builtin_function_or_method``. |
| 4986 |
|
| 4987 |
- gh-117348: Largely restored import time performance of configparser by |
| 4988 |
avoiding dataclasses. |
| 4989 |
|
| 4990 |
- gh-117641: Speedup :func:`os.path.commonpath` on Unix. |
| 4991 |
|
| 4992 |
- gh-117663: Fix ``_simple_enum`` to detect aliases when multiple arguments |
| 4993 |
are present but only one is the member value. |
| 4994 |
|
| 4995 |
- gh-117636: Speedup :func:`os.path.join`. |
| 4996 |
|
| 4997 |
- gh-117618: Support ``package.module`` as ``filename`` for ``break`` |
| 4998 |
command of :mod:`pdb` |
| 4999 |
|
| 5000 |
- gh-102247: the status codes enum with constants in http.HTTPStatus are |
| 5001 |
updated to include the names from RFC9110. This RFC includes some HTTP |
| 5002 |
statuses previously only used for WEBDAV and assigns more generic names to |
| 5003 |
them. |
| 5004 |
|
| 5005 |
The old constants are preserved for backwards compatibility. |
| 5006 |
|
| 5007 |
- gh-117607: Speedup :func:`os.path.relpath`. |
| 5008 |
|
| 5009 |
- gh-117586: Speed up :meth:`pathlib.Path.glob` by working with strings |
| 5010 |
internally. |
| 5011 |
|
| 5012 |
- gh-117225: Add colour to doctest output. Patch by Hugo van Kemenade. |
| 5013 |
|
| 5014 |
- gh-117566: :meth:`ipaddress.IPv6Address.is_loopback` will now return |
| 5015 |
``True`` for IPv4-mapped loopback addresses, i.e. addresses in the |
| 5016 |
``::ffff:127.0.0.0/104`` address space. |
| 5017 |
|
| 5018 |
- gh-117546: Fix issue where :func:`os.path.realpath` stopped resolving |
| 5019 |
symlinks after encountering a symlink loop on POSIX. |
| 5020 |
|
| 5021 |
- gh-116720: Improved behavior of :class:`asyncio.TaskGroup` when an |
| 5022 |
external cancellation collides with an internal cancellation. For example, |
| 5023 |
when two task groups are nested and both experience an exception in a |
| 5024 |
child task simultaneously, it was possible that the outer task group would |
| 5025 |
misbehave, because its internal cancellation was swallowed by the inner |
| 5026 |
task group. |
| 5027 |
|
| 5028 |
In the case where a task group is cancelled externally and also must raise |
| 5029 |
an :exc:`ExceptionGroup`, it will now call the parent task's |
| 5030 |
:meth:`~asyncio.Task.cancel` method. This ensures that a |
| 5031 |
:exc:`asyncio.CancelledError` will be raised at the next :keyword:`await`, |
| 5032 |
so the cancellation is not lost. |
| 5033 |
|
| 5034 |
An added benefit of these changes is that task groups now preserve the |
| 5035 |
cancellation count (:meth:`asyncio.Task.cancelling`). |
| 5036 |
|
| 5037 |
In order to handle some corner cases, :meth:`asyncio.Task.uncancel` may |
| 5038 |
now reset the undocumented ``_must_cancel`` flag when the cancellation |
| 5039 |
count reaches zero. |
| 5040 |
|
| 5041 |
- gh-117516: Add :data:`typing.TypeIs`, implementing :pep:`742`. Patch by |
| 5042 |
Jelle Zijlstra. |
| 5043 |
|
| 5044 |
- gh-117503: Fix support of non-ASCII user names in bytes paths in |
| 5045 |
:func:`os.path.expanduser` on Posix. |
| 5046 |
|
| 5047 |
- gh-117394: :func:`os.path.ismount` is now 2-3 times faster if the user has |
| 5048 |
permissions. |
| 5049 |
|
| 5050 |
- gh-117313: Only treat ``'\n'``, ``'\r'`` and ``'\r\n'`` as line separators |
| 5051 |
in re-folding the :mod:`email` messages. Preserve control characters |
| 5052 |
``'\v'``, ``'\f'``, ``'\x1c'``, ``'\x1d'`` and ``'\x1e'`` and Unicode line |
| 5053 |
separators ``'\x85'``, ``'\u2028'`` and ``'\u2029'`` as is. |
| 5054 |
|
| 5055 |
- gh-117142: Convert :mod:`!_ctypes` to multi-phase initialisation |
| 5056 |
(:pep:`489`). |
| 5057 |
|
| 5058 |
- gh-66543: Add the :func:`mimetypes.guess_file_type` function which works |
| 5059 |
with file path. Passing file path instead of URL in |
| 5060 |
:func:`~mimetypes.guess_type` is :term:`soft deprecated`. |
| 5061 |
|
| 5062 |
- gh-68583: webbrowser CLI: replace getopt with argparse, add long options. |
| 5063 |
Patch by Hugo van Kemenade. |
| 5064 |
|
| 5065 |
- gh-116871: Name suggestions for :exc:`AttributeError` and |
| 5066 |
:exc:`ImportError` now only include underscored names if the original name |
| 5067 |
was underscored. |
| 5068 |
|
| 5069 |
- gh-116023: Don't show empty fields (value ``None`` or ``[]``) in |
| 5070 |
:func:`ast.dump` by default. Add ``show_empty=False`` parameter to |
| 5071 |
optionally show them. |
| 5072 |
|
| 5073 |
- gh-115961: Added :attr:`!name` and :attr:`!mode` attributes for compressed |
| 5074 |
and archived file-like objects in modules :mod:`bz2`, :mod:`lzma`, |
| 5075 |
:mod:`tarfile` and :mod:`zipfile`. The value of the :attr:`!mode` |
| 5076 |
attribute of :class:`gzip.GzipFile` was changed from integer (``1`` or |
| 5077 |
``2``) to string (``'rb'`` or ``'wb'``). The value of the :attr:`!mode` |
| 5078 |
attribute of the readable file-like object returned by |
| 5079 |
:meth:`zipfile.ZipFile.open` was changed from ``'r'`` to ``'rb'``. |
| 5080 |
|
| 5081 |
- gh-82062: Fix :func:`inspect.signature` to correctly handle parameter |
| 5082 |
defaults on methods in extension modules that use names defined in the |
| 5083 |
module namespace. |
| 5084 |
|
| 5085 |
- gh-83856: Honor :mod:`atexit` for all :mod:`multiprocessing` start methods |
| 5086 |
|
| 5087 |
- gh-113081: Print colorized exception just like built-in traceback in |
| 5088 |
:mod:`pdb` |
| 5089 |
|
| 5090 |
- gh-112855: Speed up pickling of :class:`pathlib.PurePath` objects. Patch |
| 5091 |
by Barney Gale. |
| 5092 |
|
| 5093 |
- gh-111744: Support opcode events in :mod:`bdb` |
| 5094 |
|
| 5095 |
- gh-109617: :mod:`!ncurses`: fixed a crash that could occur on macOS 13 or |
| 5096 |
earlier when Python was built with Apple Xcode 15's SDK. |
| 5097 |
|
| 5098 |
- gh-83151: Enabled arbitrary statements and evaluations in :mod:`pdb` shell |
| 5099 |
to access the local variables of the current frame, which made it possible |
| 5100 |
for multi-scope code like generators or nested function to work. |
| 5101 |
|
| 5102 |
- gh-110209: Add :meth:`~object.__class_getitem__` to |
| 5103 |
:class:`types.GeneratorType` and :class:`types.CoroutineType` for type |
| 5104 |
hinting purposes. Patch by James Hilton-Balfe. |
| 5105 |
|
| 5106 |
- gh-108191: The :class:`types.SimpleNamespace` now accepts an optional |
| 5107 |
positional argument which specifies initial values of attributes as a dict |
| 5108 |
or an iterable of key-value pairs. |
| 5109 |
|
| 5110 |
- gh-62090: Fix assertion errors caused by whitespace in metavars or |
| 5111 |
``SUPPRESS``-ed groups in :mod:`argparse` by simplifying usage formatting. |
| 5112 |
Patch by Ali Hamdan. |
| 5113 |
|
| 5114 |
- gh-102402: Adjust ``logging.LogRecord`` to use ``time.time_ns()`` and fix |
| 5115 |
minor bug related to floating-point math. |
| 5116 |
|
| 5117 |
- gh-100242: Bring pure Python implementation ``functools.partial.__new__`` |
| 5118 |
more in line with the C-implementation by not just always checking for the |
| 5119 |
presence of the attribute ``'func'`` on the first argument of ``partial``. |
| 5120 |
Instead, both the Python version and the C version perform an |
| 5121 |
``isinstance(func, partial)`` check on the first argument of ``partial``. |
| 5122 |
|
| 5123 |
- gh-99730: HEAD requests are no longer upgraded to GET request during |
| 5124 |
redirects in urllib. |
| 5125 |
|
| 5126 |
- gh-66410: Setting the :mod:`!tkinter` module global :data:`!wantobjects` |
| 5127 |
to ``2`` before creating the :class:`~tkinter.Tk` object or call the |
| 5128 |
:meth:`!wantobjects` method of the :class:`!Tk` object with argument ``2`` |
| 5129 |
makes now arguments to callbacks registered in the :mod:`tkinter` module |
| 5130 |
to be passed as various Python objects (``int``, ``float``, ``bytes``, |
| 5131 |
``tuple``), depending on their internal representation in Tcl, instead of |
| 5132 |
always ``str``. :data:`!tkinter.wantobjects` is now set to ``2`` by |
| 5133 |
default. |
| 5134 |
|
| 5135 |
- bpo-40943: Fix several IndexError when parse emails with truncated |
| 5136 |
Message-ID, address, routes, etc, e.g. ``example@``. |
| 5137 |
|
| 5138 |
- bpo-39324: Add mime type mapping for .md <-> text/markdown |
| 5139 |
|
| 5140 |
- bpo-18108: :func:`shutil.chown` now supports *dir_fd* and |
| 5141 |
*follow_symlinks* keyword arguments. |
| 5142 |
|
| 5143 |
- bpo-30988: Fix parsing of emails with invalid address headers having a |
| 5144 |
leading or trailing dot. Patch by tsufeki. |
| 5145 |
|
| 5146 |
- bpo-32839: Add the :meth:`!after_info` method for Tkinter widgets. |
| 5147 |
|
| 5148 |
Documentation |
| 5149 |
------------- |
| 5150 |
|
| 5151 |
- gh-117928: The minimum Sphinx version required for the documentation is |
| 5152 |
now 6.2.1. |
| 5153 |
|
| 5154 |
Build |
| 5155 |
----- |
| 5156 |
|
| 5157 |
- gh-118734: Fixes Windows build when invoked directly (not through the |
| 5158 |
:file:`build.bat` script) without specifying a value for ``UseTIER2``. |
| 5159 |
|
| 5160 |
- gh-115119: The :file:`configure` option :option:`--with-system-libmpdec` |
| 5161 |
now defaults to ``yes``. The bundled copy of ``libmpdecimal`` will be |
| 5162 |
removed in Python 3.15. |
| 5163 |
|
| 5164 |
- gh-117845: Fix building against recent libedit versions by detecting |
| 5165 |
readline hook signatures in :program:`configure`. |
| 5166 |
|
| 5167 |
- gh-116622: A testbed project was added to run the test suite on Android. |
| 5168 |
|
| 5169 |
- gh-117645: Increase WASI stack size from 512 KiB to 8 MiB and the initial |
| 5170 |
memory from 10 MiB to 20 MiB. Patch by Victor Stinner. |
| 5171 |
|
| 5172 |
- gh-115119: :program:`configure` now uses :program:`pkg-config` to detect |
| 5173 |
:mod:`decimal` dependencies if the :option:`--with-system-libmpdec` option |
| 5174 |
is given. |
| 5175 |
|
| 5176 |
Windows |
| 5177 |
------- |
| 5178 |
|
| 5179 |
- gh-115119: Update Windows installer to use libmpdecimal 4.0.0. |
| 5180 |
|
| 5181 |
- gh-118486: :func:`os.mkdir` now accepts *mode* of ``0o700`` to restrict |
| 5182 |
the new directory to the current user. |
| 5183 |
|
| 5184 |
- gh-118347: Fixes launcher updates not being installed. |
| 5185 |
|
| 5186 |
- gh-118293: The ``multiprocessing`` module now passes the |
| 5187 |
``STARTF_FORCEOFFFEEDBACK`` flag when spawning processes to tell Windows |
| 5188 |
not to change the mouse cursor. |
| 5189 |
|
| 5190 |
- gh-115009: Update Windows installer to use SQLite 3.45.3. |
| 5191 |
|
| 5192 |
- gh-90329: Suppress the warning displayed on virtual environment creation |
| 5193 |
when the requested and created paths differ only by a short (8.3 style) |
| 5194 |
name. Warnings will continue to be shown if a junction or symlink in the |
| 5195 |
path caused the venv to be created in a different location than originally |
| 5196 |
requested. |
| 5197 |
|
| 5198 |
- gh-117786: Fixes virtual environments not correctly launching when created |
| 5199 |
from a Store install. |
| 5200 |
|
| 5201 |
macOS |
| 5202 |
----- |
| 5203 |
|
| 5204 |
- gh-115119: Update macOS installer to use libmpdecimal 4.0.0. |
| 5205 |
|
| 5206 |
- gh-114099: iOS preprocessor symbol usage was made compatible with older |
| 5207 |
macOS SDKs. |
| 5208 |
|
| 5209 |
- gh-115009: Update macOS installer to use SQLite 3.45.3. |
| 5210 |
|
| 5211 |
- gh-91629: Use :file:`~/.config/fish/conf.d` configs and |
| 5212 |
:program:`fish_add_path` to set :envvar:`PATH` when installing for the |
| 5213 |
Fish shell. |
| 5214 |
|
| 5215 |
IDLE |
| 5216 |
---- |
| 5217 |
|
| 5218 |
- bpo-34774: Use user-selected color theme for Help => IDLE Doc. |
| 5219 |
|
| 5220 |
C API |
| 5221 |
----- |
| 5222 |
|
| 5223 |
- gh-118124: Fix :c:macro:`Py_BUILD_ASSERT` and |
| 5224 |
:c:macro:`Py_BUILD_ASSERT_EXPR` for non-constant expressions: use |
| 5225 |
``static_assert()`` on C11 and newer. Patch by Victor Stinner. |
| 5226 |
|
| 5227 |
- gh-110850: Add "Raw" variant of PyTime functions |
| 5228 |
|
| 5229 |
* :c:func:`PyTime_MonotonicRaw` |
| 5230 |
* :c:func:`PyTime_PerfCounterRaw` |
| 5231 |
* :c:func:`PyTime_TimeRaw` |
| 5232 |
|
| 5233 |
Patch by Victor Stinner. |
| 5234 |
|
| 5235 |
- gh-117987: Restore functions removed in Python 3.13 alpha 1: |
| 5236 |
|
| 5237 |
* :c:func:`Py_SetPythonHome` |
| 5238 |
* :c:func:`Py_SetProgramName` |
| 5239 |
* :c:func:`PySys_SetArgvEx` |
| 5240 |
* :c:func:`PySys_SetArgv` |
| 5241 |
|
| 5242 |
Patch by Victor Stinner. |
| 5243 |
|
| 5244 |
- gh-117929: Restore removed :c:func:`PyEval_InitThreads` function. Patch by |
| 5245 |
Victor Stinner. |
| 5246 |
|
| 5247 |
- gh-117534: Improve validation logic in the C implementation of |
| 5248 |
:meth:`datetime.datetime.fromisoformat` to better handle invalid years. |
| 5249 |
Patch by Vlad Efanov. |
| 5250 |
|
| 5251 |
- gh-68114: Fixed skipitem()'s handling of the old 'w' and 'w#' formatters. |
| 5252 |
These are no longer supported and now raise an exception if used. |
| 5253 |
|
| 5254 |
- gh-111997: Add a C-API for firing monitoring events. |
| 5255 |
|
| 5256 |
|
| 5257 |
What's New in Python 3.13.0 alpha 6? |
| 5258 |
==================================== |
| 5259 |
|
| 5260 |
*Release date: 2024-04-09* |
| 5261 |
|
| 5262 |
Core and Builtins |
| 5263 |
----------------- |
| 5264 |
|
| 5265 |
- gh-117494: Refactored the instruction sequence data structure out of |
| 5266 |
compile.c into instruction_sequence.c. |
| 5267 |
|
| 5268 |
- gh-116968: Introduce a unified 16-bit backoff counter type |
| 5269 |
(``_Py_BackoffCounter``), shared between the Tier 1 adaptive specializer |
| 5270 |
and the Tier 2 optimizer. The API used for adaptive specialization |
| 5271 |
counters is changed but the behavior is (supposed to be) identical. |
| 5272 |
|
| 5273 |
The behavior of the Tier 2 counters is changed: |
| 5274 |
|
| 5275 |
* There are no longer dynamic thresholds (we never varied these). |
| 5276 |
* All counters now use the same exponential backoff. |
| 5277 |
* The counter for ``JUMP_BACKWARD`` starts counting down from 16. |
| 5278 |
* The ``temperature`` in side exits starts counting down from 64. |
| 5279 |
|
| 5280 |
- gh-117431: Improve the performance of the following :class:`bytes` and |
| 5281 |
:class:`bytearray` methods by adapting them to the |
| 5282 |
:c:macro:`METH_FASTCALL` calling convention: |
| 5283 |
|
| 5284 |
* :meth:`!endswith` |
| 5285 |
* :meth:`!startswith` |
| 5286 |
|
| 5287 |
- gh-117431: Improve the performance of the following :class:`str` methods |
| 5288 |
by adapting them to the :c:macro:`METH_FASTCALL` calling convention: |
| 5289 |
|
| 5290 |
* :meth:`~str.count` |
| 5291 |
* :meth:`~str.endswith` |
| 5292 |
* :meth:`~str.find` |
| 5293 |
* :meth:`~str.index` |
| 5294 |
* :meth:`~str.rfind` |
| 5295 |
* :meth:`~str.rindex` |
| 5296 |
* :meth:`~str.startswith` |
| 5297 |
|
| 5298 |
- gh-117411: Move ``PyFutureFeatures`` to an internal header and make it |
| 5299 |
private. |
| 5300 |
|
| 5301 |
- gh-109120: Added handle of incorrect star expressions, e.g ``f(3, *)``. |
| 5302 |
Patch by Grigoryev Semyon |
| 5303 |
|
| 5304 |
- gh-117266: Fix crashes for certain user-created subclasses of |
| 5305 |
:class:`ast.AST`. Such classes are now expected to set the |
| 5306 |
``_field_types`` attribute. |
| 5307 |
|
| 5308 |
- gh-99108: Updated the :mod:`hashlib` built-in `HACL\* project`_ C code |
| 5309 |
from upstream that we use for many implementations when they are not |
| 5310 |
present via OpenSSL in a given build. This also avoids the rare potential |
| 5311 |
for a C symbol name one definition rule linking issue. |
| 5312 |
|
| 5313 |
.. _HACL\* project: https://github.com/hacl-star/hacl-star |
| 5314 |
|
| 5315 |
- gh-117108: Change the old space bit of objects in the young generation |
| 5316 |
from 0 to gcstate->visited, so that any objects created during GC will |
| 5317 |
have the old bit set correctly if they get moved into the old generation. |
| 5318 |
|
| 5319 |
- gh-117108: The cycle GC now chooses the size of increments based on the |
| 5320 |
total heap size, instead of the rate of object creation. This ensures that |
| 5321 |
it can keep up with growing heaps. |
| 5322 |
|
| 5323 |
- gh-116735: For ``INSTRUMENTED_CALL_FUNCTION_EX``, set ``arg0`` to |
| 5324 |
``sys.monitoring.MISSING`` instead of ``None`` for |
| 5325 |
:monitoring-event:`CALL` event. |
| 5326 |
|
| 5327 |
- gh-113964: Starting new threads and process creation through |
| 5328 |
:func:`os.fork` are now only prevented once all non-daemon threads exit. |
| 5329 |
|
| 5330 |
- gh-116626: Ensure ``INSTRUMENTED_CALL_FUNCTION_EX`` always emits |
| 5331 |
:monitoring-event:`CALL` |
| 5332 |
|
| 5333 |
- gh-116554: ``list.sort()`` now exploits more cases of partial ordering, |
| 5334 |
particularly those with long descending runs with sub-runs of equal |
| 5335 |
values. Those are recognized as single runs now (previously, each block of |
| 5336 |
repeated values caused a new run to be created). |
| 5337 |
|
| 5338 |
- gh-114099: Added a Loader that can discover extension modules in an |
| 5339 |
iOS-style Frameworks folder. |
| 5340 |
|
| 5341 |
- gh-115775: Compiler populates the new ``__static_attributes__`` field on a |
| 5342 |
class with the names of attributes of this class which are accessed |
| 5343 |
through self.X from any function in its body. |
| 5344 |
|
| 5345 |
- gh-115776: The array of values, the ``PyDictValues`` struct is now |
| 5346 |
embedded in the object during allocation. This provides better performance |
| 5347 |
in the common case, and does not degrade as much when the object's |
| 5348 |
``__dict__`` is materialized. |
| 5349 |
|
| 5350 |
- gh-108362: Implement an incremental cyclic garbage collector. By |
| 5351 |
collecting the old generation in increments, there is no need for a full |
| 5352 |
heap scan. This can hugely reduce maximum pause time for programs with |
| 5353 |
large heaps. |
| 5354 |
|
| 5355 |
Reduce the number of generations from three to two. The old generation is |
| 5356 |
split into two spaces, "visited" and "pending". |
| 5357 |
|
| 5358 |
Collection happens in two steps:: * An increment is formed from the young |
| 5359 |
generation and a small part of the pending space. * This increment is |
| 5360 |
scanned and the survivors moved to the end of the visited space. |
| 5361 |
|
| 5362 |
When the collecting space becomes empty, the two spaces are swapped. |
| 5363 |
|
| 5364 |
Library |
| 5365 |
------- |
| 5366 |
|
| 5367 |
- gh-109870: Dataclasses now calls :func:`exec` once per dataclass, instead |
| 5368 |
of once per method being added. This can speed up dataclass creation by |
| 5369 |
up to 20%. |
| 5370 |
|
| 5371 |
- gh-97901: Mime type ``text/rtf`` is now supported by :mod:`mimetypes`. |
| 5372 |
|
| 5373 |
Core and Builtins |
| 5374 |
----------------- |
| 5375 |
|
| 5376 |
- bpo-24612: Improve the :exc:`SyntaxError` that happens when 'not' appears |
| 5377 |
after an operator. Patch by Pablo Galindo |
| 5378 |
|
| 5379 |
Library |
| 5380 |
------- |
| 5381 |
|
| 5382 |
- gh-117648: Improve performance of :func:`os.path.join` and |
| 5383 |
:func:`os.path.expanduser`. |
| 5384 |
|
| 5385 |
- gh-117584: Raise :exc:`TypeError` for non-paths in |
| 5386 |
:func:`posixpath.relpath <os.path.relpath>`. |
| 5387 |
|
| 5388 |
- gh-117467: Preserve mailbox ownership when rewriting in |
| 5389 |
:func:`mailbox.mbox.flush <mailbox.Mailbox.flush>`. Patch by Tony |
| 5390 |
Mountifield. |
| 5391 |
|
| 5392 |
- gh-114848: Raise :exc:`FileNotFoundError` when ``getcwd()`` returns |
| 5393 |
'(unreachable)', which can happen on Linux >= 2.6.36 with glibc < 2.27. |
| 5394 |
|
| 5395 |
- gh-117459: :meth:`asyncio.asyncio.run_coroutine_threadsafe` now keeps the |
| 5396 |
traceback of :class:`CancelledError`, :class:`TimeoutError` and |
| 5397 |
:class:`InvalidStateError` which are raised in the coroutine. |
| 5398 |
|
| 5399 |
- gh-117381: Fix error message for :func:`ntpath.commonpath`. |
| 5400 |
|
| 5401 |
- gh-117337: Deprecate undocumented :func:`!glob.glob0` and |
| 5402 |
:func:`!glob.glob1` functions. Use :func:`glob.glob` and pass a directory |
| 5403 |
to its *root_dir* argument instead. |
| 5404 |
|
| 5405 |
- gh-117349: Optimise several functions in :mod:`os.path`. |
| 5406 |
|
| 5407 |
- gh-117348: Refactored :meth:`configparser.RawConfigParser._read` to reduce |
| 5408 |
cyclometric complexity and improve comprehensibility. |
| 5409 |
|
| 5410 |
- gh-117335: Raise TypeError for non-sequences for |
| 5411 |
:func:`ntpath.commonpath`. |
| 5412 |
|
| 5413 |
- gh-66449: :class:`configparser.ConfigParser` now accepts unnamed sections |
| 5414 |
before named ones, if configured to do so. |
| 5415 |
|
| 5416 |
- gh-88014: In documentation of :class:`gzip.GzipFile` in module gzip, |
| 5417 |
explain data type of optional constructor argument *mtime*, and recommend |
| 5418 |
``mtime = 0`` for generating deterministic streams. |
| 5419 |
|
| 5420 |
- gh-117310: Fixed an unlikely early & extra ``Py_DECREF`` triggered crash |
| 5421 |
in :mod:`ssl` when creating a new ``_ssl._SSLContext`` if CPython was |
| 5422 |
built implausibly such that the default cipher list is empty **or** the |
| 5423 |
SSL library it was linked against reports a failure from its C |
| 5424 |
``SSL_CTX_set_cipher_list()`` API. |
| 5425 |
|
| 5426 |
- gh-117294: A ``DocTestCase`` now reports as skipped if all examples in the |
| 5427 |
doctest are skipped. |
| 5428 |
|
| 5429 |
- gh-98966: In :mod:`subprocess`, raise a more informative message when |
| 5430 |
``stdout=STDOUT``. |
| 5431 |
|
| 5432 |
- gh-117225: doctest: only print "and X failed" when non-zero, don't |
| 5433 |
pluralise "1 items". Patch by Hugo van Kemenade. |
| 5434 |
|
| 5435 |
- gh-117205: Speed up :func:`compileall.compile_dir` by 20% when using |
| 5436 |
multiprocessing by increasing ``chunksize``. |
| 5437 |
|
| 5438 |
- gh-117178: Fix regression in lazy loading of self-referential modules, |
| 5439 |
introduced in gh-114781. |
| 5440 |
|
| 5441 |
- gh-112383: Fix :mod:`dis` module's handling of ``ENTER_EXECUTOR`` |
| 5442 |
instructions. |
| 5443 |
|
| 5444 |
- gh-117182: Lazy-loading of modules that modify their own ``__class__`` no |
| 5445 |
longer reverts the ``__class__`` to :class:`types.ModuleType`. |
| 5446 |
|
| 5447 |
- gh-117084: Fix :mod:`zipfile` extraction for directory entries with the |
| 5448 |
name containing backslashes on Windows. |
| 5449 |
|
| 5450 |
- gh-117114: Make :func:`os.path.isdevdrive` available on all platforms. For |
| 5451 |
those that do not offer Dev Drives, it will always return ``False``. |
| 5452 |
|
| 5453 |
- gh-117110: Fix a bug that prevents subclasses of :class:`typing.Any` to be |
| 5454 |
instantiated with arguments. Patch by Chris Fu. |
| 5455 |
|
| 5456 |
- gh-109653: Deferred select imports in importlib.metadata and |
| 5457 |
importlib.resources for a 14% speedup. |
| 5458 |
|
| 5459 |
- gh-70647: Start the deprecation period for the current behavior of |
| 5460 |
:func:`datetime.datetime.strptime` and :func:`time.strptime` which always |
| 5461 |
fails to parse a date string with a :exc:`ValueError` involving a day of |
| 5462 |
month such as ``strptime("02-29", "%m-%d")`` when a year is **not** |
| 5463 |
specified and the date happen to be February 29th. This should help avoid |
| 5464 |
users finding new bugs every four years due to a natural mistaken |
| 5465 |
assumption about the API when parsing partial date values. |
| 5466 |
|
| 5467 |
- gh-116987: Fixed :func:`inspect.findsource` for class code objects. |
| 5468 |
|
| 5469 |
- gh-114099: Modify standard library to allow for iOS platform differences. |
| 5470 |
|
| 5471 |
- gh-90872: On Windows, :meth:`subprocess.Popen.wait` no longer calls |
| 5472 |
``WaitForSingleObject()`` with a negative timeout: pass ``0`` ms if the |
| 5473 |
timeout is negative. Patch by Victor Stinner. |
| 5474 |
|
| 5475 |
- gh-116957: configparser: Don't leave ConfigParser values in an invalid |
| 5476 |
state (stored as a list instead of a str) after an earlier read raised |
| 5477 |
DuplicateSectionError or DuplicateOptionError. |
| 5478 |
|
| 5479 |
- gh-115538: :class:`!_io.WindowsConsoleIO` now emit a warning if a boolean |
| 5480 |
value is passed as a filedescriptor argument. |
| 5481 |
|
| 5482 |
- gh-90095: Ignore empty lines and comments in ``.pdbrc`` |
| 5483 |
|
| 5484 |
- gh-106531: Refreshed zipfile._path from `zipp 3.18 |
| 5485 |
<https://zipp.readthedocs.io/en/latest/history.html#v3-18-0>`_, providing |
| 5486 |
better compatibility for PyPy, better glob performance for deeply nested |
| 5487 |
zipfiles, and providing internal access to ``CompleteDirs.inject`` for use |
| 5488 |
in other tests (like importlib.resources). |
| 5489 |
|
| 5490 |
- gh-63207: On Windows, :func:`time.time` now uses the |
| 5491 |
``GetSystemTimePreciseAsFileTime()`` clock to have a resolution better |
| 5492 |
than 1 us, instead of the ``GetSystemTimeAsFileTime()`` clock which has a |
| 5493 |
resolution of 15.6 ms. Patch by Victor Stinner. |
| 5494 |
|
| 5495 |
- gh-116764: Restore support of ``None`` and other false values in |
| 5496 |
:mod:`urllib.parse` functions :func:`~urllib.parse.parse_qs` and |
| 5497 |
:func:`~urllib.parse.parse_qsl`. Also, they now raise a TypeError for |
| 5498 |
non-zero integers and non-empty sequences. |
| 5499 |
|
| 5500 |
- gh-116811: In ``PathFinder.invalidate_caches``, delegate to |
| 5501 |
``MetadataPathFinder.invalidate_caches``. |
| 5502 |
|
| 5503 |
- gh-116647: Fix recursive child in dataclasses |
| 5504 |
|
| 5505 |
- gh-113171: Fixed various false positives and false negatives in |
| 5506 |
|
| 5507 |
* :attr:`ipaddress.IPv4Address.is_private` (see these docs for details) |
| 5508 |
* :attr:`ipaddress.IPv4Address.is_global` |
| 5509 |
* :attr:`ipaddress.IPv6Address.is_private` |
| 5510 |
* :attr:`ipaddress.IPv6Address.is_global` |
| 5511 |
|
| 5512 |
Also in the corresponding :class:`ipaddress.IPv4Network` and |
| 5513 |
:class:`ipaddress.IPv6Network` attributes. |
| 5514 |
|
| 5515 |
- gh-63283: In :mod:`encodings.idna`, any capitalization of the ACE prefix |
| 5516 |
(``xn--``) is now acceptable. Patch by Pepijn de Vos and Zackery Spytz. |
| 5517 |
|
| 5518 |
- gh-71042: Add :func:`platform.android_ver`, which provides device and OS |
| 5519 |
information on Android. |
| 5520 |
|
| 5521 |
- gh-73468: Added new :func:`math.fma` function, wrapping C99's ``fma()`` |
| 5522 |
operation: fused multiply-add function. Patch by Mark Dickinson and Victor |
| 5523 |
Stinner. |
| 5524 |
|
| 5525 |
- gh-116608: The :mod:`importlib.resources` functions |
| 5526 |
:func:`~importlib.resources.is_resource`, |
| 5527 |
:func:`~importlib.resources.open_binary`, |
| 5528 |
:func:`~importlib.resources.open_text`, :func:`~importlib.resources.path`, |
| 5529 |
:func:`~importlib.resources.read_binary`, and |
| 5530 |
:func:`~importlib.resources.read_text` are un-deprecated, and support |
| 5531 |
subdirectories via multiple positional arguments. The |
| 5532 |
:func:`~importlib.resources.contents` function also allows subdirectories, |
| 5533 |
but remains deprecated. |
| 5534 |
|
| 5535 |
- gh-116484: Change automatically generated :class:`tkinter.Checkbutton` |
| 5536 |
widget names to avoid collisions with automatically generated |
| 5537 |
:class:`tkinter.ttk.Checkbutton` widget names within the same parent |
| 5538 |
widget. |
| 5539 |
|
| 5540 |
- gh-114314: In :mod:`ctypes`, ctype data is now stored in type objects |
| 5541 |
directly rather than in a dict subclass. This is an internal change that |
| 5542 |
should not affect usage. |
| 5543 |
|
| 5544 |
- gh-116401: Fix blocking :func:`os.fwalk` and :func:`shutil.rmtree` on |
| 5545 |
opening named pipe. |
| 5546 |
|
| 5547 |
- gh-71052: Implement :func:`ctypes.util.find_library` on Android. |
| 5548 |
|
| 5549 |
- gh-90535: Fix support of *interval* values > 1 in |
| 5550 |
:class:`logging.TimedRotatingFileHandler` for ``when='MIDNIGHT'`` and |
| 5551 |
``when='Wx'``. |
| 5552 |
|
| 5553 |
- gh-113308: Remove some internal protected parts from :mod:`uuid`: |
| 5554 |
``_has_uuid_generate_time_safe``, ``_netbios_getnode``, |
| 5555 |
``_ipconfig_getnode``, and ``_load_system_functions``. They were unused. |
| 5556 |
|
| 5557 |
- gh-115627: Fix the :mod:`ssl` module error handling of connection |
| 5558 |
terminate by peer. It now throws an OSError with the appropriate error |
| 5559 |
code instead of an EOFError. |
| 5560 |
|
| 5561 |
- gh-114847: Speed up :func:`os.path.realpath` on non-Windows platforms. |
| 5562 |
|
| 5563 |
- gh-114271: Fix a race in ``threading.Thread.join()``. |
| 5564 |
|
| 5565 |
``threading._MainThread`` now always represents the main thread of the |
| 5566 |
main interpreter. |
| 5567 |
|
| 5568 |
``PyThreadState.on_delete`` and ``PyThreadState.on_delete_data`` have been |
| 5569 |
removed. |
| 5570 |
|
| 5571 |
- gh-113538: Add :meth:`asyncio.Server.close_clients` and |
| 5572 |
:meth:`asyncio.Server.abort_clients` methods which allow to more |
| 5573 |
forcefully close an asyncio server. |
| 5574 |
|
| 5575 |
- gh-85287: Changes Unicode codecs to return UnicodeEncodeError or |
| 5576 |
UnicodeDecodeError, rather than just UnicodeError. |
| 5577 |
|
| 5578 |
- gh-113548: :mod:`pdb` now allows CLI arguments to ``pdb -m``. |
| 5579 |
|
| 5580 |
- gh-112948: Make completion of :mod:`pdb` similar to Python REPL |
| 5581 |
|
| 5582 |
- gh-105866: Fixed ``_get_slots`` bug which caused error when defining |
| 5583 |
dataclasses with slots and a weakref_slot. |
| 5584 |
|
| 5585 |
- gh-96471: Add :py:class:`asyncio.Queue` termination with |
| 5586 |
:py:meth:`~asyncio.Queue.shutdown` method. |
| 5587 |
|
| 5588 |
- gh-89739: The :mod:`zipimport` module can now read ZIP64 files. |
| 5589 |
|
| 5590 |
- bpo-33533: :func:`asyncio.as_completed` now returns an object that is both |
| 5591 |
an asynchronous iterator and plain iterator. The new asynchronous |
| 5592 |
iteration pattern allows for easier correlation between prior tasks and |
| 5593 |
their completed results. This is a closer match to |
| 5594 |
:func:`concurrent.futures.as_completed`'s iteration pattern. Patch by |
| 5595 |
Justin Arthur. |
| 5596 |
|
| 5597 |
- bpo-27578: :func:`inspect.getsource` (and related functions) work with |
| 5598 |
empty module files, returning ``'\n'`` (or reasonable equivalent) instead |
| 5599 |
of raising ``OSError``. Patch by Kernc. |
| 5600 |
|
| 5601 |
- bpo-37141: Accept an iterable of separators in |
| 5602 |
:meth:`asyncio.StreamReader.readuntil`, stopping when one of them is |
| 5603 |
encountered. |
| 5604 |
|
| 5605 |
- gh-66543: Make :func:`mimetypes.guess_type` properly parsing of URLs with |
| 5606 |
only a host name, URLs containing fragment or query, and filenames with |
| 5607 |
only a UNC sharepoint on Windows. Based on patch by Dong-hee Na. |
| 5608 |
|
| 5609 |
- bpo-15010: :meth:`unittest.TestLoader.discover` now saves the original |
| 5610 |
value of ``unittest.TestLoader._top_level_dir`` and restores it at the end |
| 5611 |
of the call. |
| 5612 |
|
| 5613 |
Documentation |
| 5614 |
------------- |
| 5615 |
|
| 5616 |
- gh-115977: Remove compatibility references to Emscripten. |
| 5617 |
|
| 5618 |
- gh-114099: Add an iOS platform guide, and flag modules not available on |
| 5619 |
iOS. |
| 5620 |
|
| 5621 |
- gh-91565: Changes to documentation files and config outputs to reflect the |
| 5622 |
new location for reporting bugs - i.e. GitHub rather than bugs.python.org. |
| 5623 |
|
| 5624 |
Tests |
| 5625 |
----- |
| 5626 |
|
| 5627 |
- gh-83434: Disable JUnit XML output (``--junit-xml=FILE`` command line |
| 5628 |
option) in regrtest when hunting for reference leaks (``-R`` option). |
| 5629 |
Patch by Victor Stinner. |
| 5630 |
|
| 5631 |
- gh-117187: Fix XML tests for vanilla Expat <2.6.0. |
| 5632 |
|
| 5633 |
- gh-116333: Tests of TLS related things (error codes, etc) were updated to |
| 5634 |
be more lenient about specific error message strings and behaviors as seen |
| 5635 |
in the BoringSSL and AWS-LC forks of OpenSSL. |
| 5636 |
|
| 5637 |
- gh-117089: Consolidated tests for importlib.metadata in their own |
| 5638 |
``metadata`` package. |
| 5639 |
|
| 5640 |
- gh-115979: Update test_importlib so that it passes under WASI SDK 21. |
| 5641 |
|
| 5642 |
- gh-112536: Add --tsan to test.regrtest for running TSAN tests in |
| 5643 |
reasonable execution times. Patch by Donghee Na. |
| 5644 |
|
| 5645 |
- gh-116307: Added import helper ``isolated_modules`` as ``CleanImport`` |
| 5646 |
does not remove modules imported during the context. Use it in |
| 5647 |
importlib.resources tests to avoid leaving ``mod`` around to impede |
| 5648 |
importlib.metadata tests. |
| 5649 |
|
| 5650 |
Build |
| 5651 |
----- |
| 5652 |
|
| 5653 |
- gh-114736: Have WASI builds use WASI SDK 21. |
| 5654 |
|
| 5655 |
- gh-115983: Skip building test modules that must be built as shared under |
| 5656 |
WASI. |
| 5657 |
|
| 5658 |
- gh-71052: Add Android build script and instructions. |
| 5659 |
|
| 5660 |
Windows |
| 5661 |
------- |
| 5662 |
|
| 5663 |
- gh-117267: Ensure ``DirEntry.stat().st_ctime`` behaves consistently with |
| 5664 |
:func:`os.stat` during the deprecation period of ``st_ctime`` by |
| 5665 |
containing the same value as ``st_birthtime``. After the deprecation |
| 5666 |
period, ``st_ctime`` will be the metadata change time (or unavailable |
| 5667 |
through ``DirEntry``), and only ``st_birthtime`` will contain the creation |
| 5668 |
time. |
| 5669 |
|
| 5670 |
- gh-116195: Improves performance of :func:`os.getppid` by using an |
| 5671 |
alternate system API when available. Contributed by vxiiduu. |
| 5672 |
|
| 5673 |
- gh-88494: On Windows, :func:`time.monotonic` now uses the |
| 5674 |
``QueryPerformanceCounter()`` clock to have a resolution better than 1 us, |
| 5675 |
instead of the ``GetTickCount64()`` clock which has a resolution of 15.6 |
| 5676 |
ms. Patch by Victor Stinner. |
| 5677 |
|
| 5678 |
- gh-116773: Fix instances of ``<_overlapped.Overlapped object at 0xXXX> |
| 5679 |
still has pending operation at deallocation, the process may crash``. |
| 5680 |
|
| 5681 |
- gh-91227: Fix the asyncio ProactorEventLoop implementation so that sending |
| 5682 |
a datagram to an address that is not listening does not prevent receiving |
| 5683 |
any more datagrams. |
| 5684 |
|
| 5685 |
- gh-115119: Switched from vendored ``libmpdecimal`` code to a |
| 5686 |
separately-hosted external package in the ``cpython-source-deps`` |
| 5687 |
repository when building the ``_decimal`` module. |
| 5688 |
|
| 5689 |
C API |
| 5690 |
----- |
| 5691 |
|
| 5692 |
- gh-117642: Fix :pep:`737` implementation for ``%#T`` and ``%#N``. |
| 5693 |
|
| 5694 |
- gh-87193: :c:func:`_PyBytes_Resize` can now be called for bytes objects |
| 5695 |
with reference count > 1, including 1-byte bytes objects. It creates a new |
| 5696 |
bytes object and destroys the old one if it has reference count > 1. |
| 5697 |
|
| 5698 |
- gh-117021: Fix integer overflow in :c:func:`PyLong_AsPid` on non-Windows |
| 5699 |
64-bit platforms. |
| 5700 |
|
| 5701 |
- gh-115756: :c:func:`!PyCode_GetFirstFree` is an ustable API now and has |
| 5702 |
been renamed to :c:func:`PyUnstable_Code_GetFirstFree`. (Contributed by |
| 5703 |
Bogdan Romanyuk in :gh:`115781`) |
| 5704 |
|
| 5705 |
- gh-116869: Add ``test_cext`` test: build a C extension to check if the |
| 5706 |
Python C API emits C compiler warnings. Patch by Victor Stinner. |
| 5707 |
|
| 5708 |
- gh-116869: Make the C API compatible with |
| 5709 |
``-Werror=declaration-after-statement`` compiler flag again. Patch by |
| 5710 |
Victor Stinner. |
| 5711 |
|
| 5712 |
- gh-116936: Add :c:func:`PyType_GetModuleByDef` to the limited C API. Patch |
| 5713 |
by Victor Stinner. |
| 5714 |
|
| 5715 |
- gh-116809: Restore removed private ``_PyErr_ChainExceptions1()`` function. |
| 5716 |
Patch by Victor Stinner. |
| 5717 |
|
| 5718 |
- gh-115754: In the limited C API version 3.13, getting ``Py_None``, |
| 5719 |
``Py_False``, ``Py_True``, ``Py_Ellipsis`` and ``Py_NotImplemented`` |
| 5720 |
singletons is now implemented as function calls at the stable ABI level to |
| 5721 |
hide implementation details. Getting these constants still return borrowed |
| 5722 |
references. Patch by Victor Stinner. |
| 5723 |
|
| 5724 |
- gh-115754: Add :c:func:`Py_GetConstant` and |
| 5725 |
:c:func:`Py_GetConstantBorrowed` functions to get constants. For example, |
| 5726 |
``Py_GetConstant(Py_CONSTANT_ZERO)`` returns a :term:`strong reference` to |
| 5727 |
the constant zero. Patch by Victor Stinner. |
| 5728 |
|
| 5729 |
- gh-111696: Add support for ``%T``, ``%T#``, ``%N`` and ``%N#`` formats to |
| 5730 |
:c:func:`PyUnicode_FromFormat`: format the fully qualified name of an |
| 5731 |
object type and of a type: call :c:func:`PyType_GetModuleName`. See |
| 5732 |
:pep:`737` for more information. Patch by Victor Stinner. |
| 5733 |
|
| 5734 |
- gh-111696: Add :c:func:`PyType_GetModuleName` function to get the type's |
| 5735 |
module name. Equivalent to getting the ``type.__module__`` attribute. |
| 5736 |
Patch by Eric Snow and Victor Stinner. |
| 5737 |
|
| 5738 |
- gh-111696: Add :c:func:`PyType_GetFullyQualifiedName` function to get the |
| 5739 |
type's fully qualified name. Equivalent to |
| 5740 |
``f"{type.__module__}.{type.__qualname__}"``, or ``type.__qualname__`` if |
| 5741 |
``type.__module__`` is not a string or is equal to ``"builtins"``. Patch |
| 5742 |
by Victor Stinner. |
| 5743 |
|
| 5744 |
- gh-85283: The ``fcntl``, ``grp``, ``pwd``, ``termios``, ``_statistics`` |
| 5745 |
and ``_testconsole`` C extensions are now built with the :ref:`limited C |
| 5746 |
API <limited-c-api>`. Patch by Victor Stinner. |
| 5747 |
|
| 5748 |
- gh-111140: Add additional flags to :c:func:`PyLong_AsNativeBytes` and |
| 5749 |
:c:func:`PyLong_FromNativeBytes` to allow the caller to determine how to |
| 5750 |
handle edge cases around values that fill the entire buffer. |
| 5751 |
|
| 5752 |
- gh-113024: Add :c:func:`PyObject_GenericHash` function. |
| 5753 |
|
| 5754 |
|
| 5755 |
What's New in Python 3.13.0 alpha 5? |
| 5756 |
==================================== |
| 5757 |
|
| 5758 |
*Release date: 2024-03-12* |
| 5759 |
|
| 5760 |
Security |
| 5761 |
-------- |
| 5762 |
|
| 5763 |
- gh-115398: Allow controlling Expat >=2.6.0 reparse deferral |
| 5764 |
(:cve:`2023-52425`) by adding five new methods: |
| 5765 |
|
| 5766 |
* :meth:`xml.etree.ElementTree.XMLParser.flush` |
| 5767 |
* :meth:`xml.etree.ElementTree.XMLPullParser.flush` |
| 5768 |
* :meth:`xml.parsers.expat.xmlparser.GetReparseDeferralEnabled` |
| 5769 |
* :meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled` |
| 5770 |
* :meth:`xml.sax.expatreader.ExpatParser.flush` |
| 5771 |
|
| 5772 |
- gh-114572: :meth:`ssl.SSLContext.cert_store_stats` and |
| 5773 |
:meth:`ssl.SSLContext.get_ca_certs` now correctly lock access to the |
| 5774 |
certificate store, when the :class:`ssl.SSLContext` is shared across |
| 5775 |
multiple threads. |
| 5776 |
|
| 5777 |
Core and Builtins |
| 5778 |
----------------- |
| 5779 |
|
| 5780 |
- gh-116604: Respect the status of the garbage collector when indirect calls |
| 5781 |
are made via :c:func:`PyErr_CheckSignals` and the evaluation breaker. |
| 5782 |
Patch by Pablo Galindo |
| 5783 |
|
| 5784 |
- gh-112087: :class:`list` is now compatible with the implementation of |
| 5785 |
:pep:`703`. |
| 5786 |
|
| 5787 |
- gh-116381: Add specialization for ``CONTAINS_OP``. |
| 5788 |
|
| 5789 |
- gh-116296: Fix possible refleak in :meth:`!object.__reduce__` internal |
| 5790 |
error handling. |
| 5791 |
|
| 5792 |
- gh-115823: Properly calculate error ranges in the parser when raising |
| 5793 |
:exc:`SyntaxError` exceptions caused by invalid byte sequences. Patch by |
| 5794 |
Pablo Galindo |
| 5795 |
|
| 5796 |
- gh-115778: Add ``tierN`` annotation for instruction definition in |
| 5797 |
interpreter DSL. |
| 5798 |
|
| 5799 |
- gh-115733: Fix crash when calling ``next()`` on exhausted list iterators. |
| 5800 |
|
| 5801 |
- gh-115700: The regen-cases build stage now works on Windows. |
| 5802 |
|
| 5803 |
- gh-115347: Fix bug where docstring was replaced by a redundant NOP when |
| 5804 |
Python is run with ``-OO``. |
| 5805 |
|
| 5806 |
- gh-115323: Make error message more meaningful for when |
| 5807 |
:meth:`bytearray.extend` is called with a :class:`str` object. |
| 5808 |
|
| 5809 |
- gh-112175: Every ``PyThreadState`` now has its own ``eval_breaker``, |
| 5810 |
allowing specific threads to be interrupted. |
| 5811 |
|
| 5812 |
Library |
| 5813 |
------- |
| 5814 |
|
| 5815 |
- gh-115154: Fix a bug that was causing the :func:`tokenize.untokenize` |
| 5816 |
function to handle unicode named literals incorrectly. Patch by Pablo |
| 5817 |
Galindo |
| 5818 |
|
| 5819 |
Core and Builtins |
| 5820 |
----------------- |
| 5821 |
|
| 5822 |
- gh-112433: Add ability to force alignment of :mod:`ctypes.Structure` by |
| 5823 |
way of the new ``_align_`` attribute on the class. |
| 5824 |
|
| 5825 |
Library |
| 5826 |
------- |
| 5827 |
|
| 5828 |
- gh-104090: The multiprocessing resource tracker now exits with non-zero |
| 5829 |
status code if a resource leak was detected. It still exits with status |
| 5830 |
code 0 otherwise. |
| 5831 |
|
| 5832 |
Core and Builtins |
| 5833 |
----------------- |
| 5834 |
|
| 5835 |
- gh-105858: Improve the constructors for :mod:`ast` nodes. Arguments of |
| 5836 |
list types now default to an empty list if omitted, and optional fields |
| 5837 |
default to ``None``. AST nodes now have an ``__annotations__`` attribute |
| 5838 |
with the expected types of their attributes. Passing unrecognized extra |
| 5839 |
arguments to AST nodes is deprecated and will become an error in Python |
| 5840 |
3.15. Omitting a required argument to an AST node is deprecated and will |
| 5841 |
become an error in Python 3.15. Patch by Jelle Zijlstra. |
| 5842 |
|
| 5843 |
- gh-101860: Expose ``__name__`` attribute on property. |
| 5844 |
|
| 5845 |
- gh-96497: Fix incorrect resolution of mangled class variables used in |
| 5846 |
assignment expressions in comprehensions. |
| 5847 |
|
| 5848 |
Library |
| 5849 |
------- |
| 5850 |
|
| 5851 |
- gh-116600: Fix :func:`repr` for global :class:`~enum.Flag` members. |
| 5852 |
|
| 5853 |
- gh-116349: :func:`platform.java_ver` is deprecated and will be removed in |
| 5854 |
3.15. It was largely untested, had a confusing API, and was only useful |
| 5855 |
for Jython support. |
| 5856 |
|
| 5857 |
- gh-116143: Fix a race in pydoc ``_start_server``, eliminating a window in |
| 5858 |
which ``_start_server`` can return a thread that is "serving" but without |
| 5859 |
a ``docserver`` set. |
| 5860 |
|
| 5861 |
- gh-116127: :mod:`typing`: implement :pep:`705` which adds |
| 5862 |
:data:`typing.ReadOnly` support to :class:`typing.TypedDict`. |
| 5863 |
|
| 5864 |
- gh-116325: :mod:`typing`: raise :exc:`SyntaxError` instead of |
| 5865 |
:exc:`AttributeError` on forward references as empty strings. |
| 5866 |
|
| 5867 |
- gh-115957: When ``asyncio.TaskGroup.create_task`` is called on an inactive |
| 5868 |
``asyncio.TaskGroup``, the given coroutine will be closed (which prevents |
| 5869 |
a ``RuntimeWarning``). |
| 5870 |
|
| 5871 |
- gh-115978: Disable preadv(), readv(), pwritev(), and writev() on WASI. |
| 5872 |
|
| 5873 |
Under wasmtime for WASI 0.2, these functions don't pass test_posix |
| 5874 |
(https://github.com/bytecodealliance/wasmtime/issues/7830). |
| 5875 |
|
| 5876 |
- gh-88352: Fix the computation of the next rollover time in the |
| 5877 |
:class:`logging.TimedRotatingFileHandler` handler. |
| 5878 |
:meth:`!computeRollover` now always returns a timestamp larger than the |
| 5879 |
specified time and works correctly during the DST change. |
| 5880 |
:meth:`!doRollover` no longer overwrite the already rolled over file, |
| 5881 |
saving from data loss when run at midnight or during repeated time at the |
| 5882 |
DST change. |
| 5883 |
|
| 5884 |
- gh-87115: Set ``__main__.__spec__`` to ``None`` when running a script with |
| 5885 |
:mod:`pdb` |
| 5886 |
|
| 5887 |
- gh-76511: Fix UnicodeEncodeError in :meth:`email.Message.as_string` that |
| 5888 |
results when a message that claims to be in the ascii character set |
| 5889 |
actually has non-ascii characters. Non-ascii characters are now replaced |
| 5890 |
with the U+FFFD replacement character, like in the ``replace`` error |
| 5891 |
handler. |
| 5892 |
|
| 5893 |
- gh-89547: Add support for nested typing special forms like |
| 5894 |
Final[ClassVar[int]]. |
| 5895 |
|
| 5896 |
- gh-65824: Improve the ``less`` prompt in :mod:`pydoc`. |
| 5897 |
|
| 5898 |
- gh-116040: [Enum] fix by-value calls when second value is falsey; e.g. |
| 5899 |
Cardinal(1, 0) |
| 5900 |
|
| 5901 |
- gh-115821: [Enum] Improve error message when calling super().__new__() in |
| 5902 |
custom __new__. |
| 5903 |
|
| 5904 |
- gh-85644: Use the ``XDG_CURRENT_DESKTOP`` environment variable in |
| 5905 |
:mod:`webbrowser` to check desktop. Prefer it to the deprecated |
| 5906 |
``GNOME_DESKTOP_SESSION_ID`` for GNOME detection. |
| 5907 |
|
| 5908 |
- gh-75988: Fixed :func:`unittest.mock.create_autospec` to pass the call |
| 5909 |
through to the wrapped object to return the real result. |
| 5910 |
|
| 5911 |
- gh-115881: Fix issue where :func:`ast.parse` would incorrectly flag |
| 5912 |
conditional context managers (such as ``with (x() if y else z()): ...``) |
| 5913 |
as invalid syntax if ``feature_version=(3, 8)`` was passed. This reverts |
| 5914 |
changes to the grammar made as part of gh-94949. |
| 5915 |
|
| 5916 |
- gh-115886: Fix silent truncation of the name with an embedded null |
| 5917 |
character in :class:`multiprocessing.shared_memory.SharedMemory`. |
| 5918 |
|
| 5919 |
- gh-115532: Add kernel density estimation to the statistics module. |
| 5920 |
|
| 5921 |
- gh-115714: On WASI, the :mod:`time` module no longer get process time |
| 5922 |
using ``times()`` or ``CLOCK_PROCESS_CPUTIME_ID``, system API is that is |
| 5923 |
unreliable and is likely to be removed from WASI. The affected clock |
| 5924 |
functions fall back to calling ``clock()``. |
| 5925 |
|
| 5926 |
- gh-115809: Improve algorithm for computing which rolled-over log files to |
| 5927 |
delete in :class:`logging.TimedRotatingFileHandler`. It is now reliable |
| 5928 |
for handlers without ``namer`` and with arbitrary deterministic ``namer`` |
| 5929 |
that leaves the datetime part in the file name unmodified. |
| 5930 |
|
| 5931 |
- gh-74668: :mod:`urllib.parse` functions :func:`~urllib.parse.parse_qs` and |
| 5932 |
:func:`~urllib.parse.parse_qsl` now support bytes arguments containing raw |
| 5933 |
and percent-encoded non-ASCII data. |
| 5934 |
|
| 5935 |
- gh-67044: :func:`csv.writer` now always quotes or escapes ``'\r'`` and |
| 5936 |
``'\n'``, regardless of *lineterminator* value. |
| 5937 |
|
| 5938 |
- gh-115712: Restore support of space delimiter with |
| 5939 |
``skipinitialspace=True`` in :mod:`csv`. :func:`csv.writer` now quotes |
| 5940 |
empty fields if delimiter is a space and skipinitialspace is true and |
| 5941 |
raises exception if quoting is not possible. |
| 5942 |
|
| 5943 |
- gh-112364: Fixed :func:`ast.unparse` to handle format_spec with ``"``, |
| 5944 |
``'`` or ``\\``. Patched by Frank Hoffmann. |
| 5945 |
|
| 5946 |
- gh-112997: Stop logging potentially sensitive callback arguments in |
| 5947 |
:mod:`asyncio` unless debug mode is active. |
| 5948 |
|
| 5949 |
- gh-114914: Fix an issue where an abandoned :class:`StreamWriter` would not |
| 5950 |
be garbage collected. |
| 5951 |
|
| 5952 |
- gh-111358: Fix a bug in |
| 5953 |
:meth:`asyncio.BaseEventLoop.shutdown_default_executor` to ensure the |
| 5954 |
timeout passed to the coroutine behaves as expected. |
| 5955 |
|
| 5956 |
- gh-115618: Fix improper decreasing the reference count for ``None`` |
| 5957 |
argument in :class:`property` methods :meth:`~property.getter`, |
| 5958 |
:meth:`~property.setter` and :meth:`~property.deleter`. |
| 5959 |
|
| 5960 |
- gh-112720: Refactor :class:`dis.ArgResolver` to make it possible to |
| 5961 |
subclass and change the way jump args are interpreted. |
| 5962 |
|
| 5963 |
- gh-112006: Fix :func:`inspect.unwrap` for types with the ``__wrapper__`` |
| 5964 |
data descriptor. Fix :meth:`inspect.Signature.from_callable` for builtins |
| 5965 |
:func:`classmethod` and :func:`staticmethod`. |
| 5966 |
|
| 5967 |
- gh-101293: Support callables with the ``__call__()`` method and types with |
| 5968 |
``__new__()`` and ``__init__()`` methods set to class methods, static |
| 5969 |
methods, bound methods, partial functions, and other types of methods and |
| 5970 |
descriptors in :meth:`inspect.Signature.from_callable`. |
| 5971 |
|
| 5972 |
- gh-103092: Isolate :mod:`!_lsprof` (apply :pep:`687`). |
| 5973 |
|
| 5974 |
- gh-113942: :mod:`pydoc` no longer skips global functions implemented as |
| 5975 |
builtin methods, such as :class:`~type.MethodDescriptorType` and |
| 5976 |
:class:`~type.WrapperDescriptorType`. |
| 5977 |
|
| 5978 |
- gh-115256: Added DeprecationWarning when accessing the tarfile attribute |
| 5979 |
of TarInfo objects. The attribute is never used internally and is only |
| 5980 |
attached to TarInfos when the tarfile is opened in write-mode, not |
| 5981 |
read-mode. The attribute creates an unnecessary reference cycle which may |
| 5982 |
cause corruption when not closing the handle after writing a tarfile. |
| 5983 |
|
| 5984 |
- gh-115197: ``urllib.request`` no longer resolves the hostname before |
| 5985 |
checking it against the system's proxy bypass list on macOS and Windows. |
| 5986 |
|
| 5987 |
- gh-113812: :meth:`DatagramTransport.sendto` will now send zero-length |
| 5988 |
datagrams if called with an empty bytes object. The transport flow control |
| 5989 |
also now accounts for the datagram header when calculating the buffer |
| 5990 |
size. |
| 5991 |
|
| 5992 |
- gh-114763: Protect modules loaded with :class:`importlib.util.LazyLoader` |
| 5993 |
from race conditions when multiple threads try to access attributes before |
| 5994 |
the loading is complete. |
| 5995 |
|
| 5996 |
- gh-114709: :func:`posixpath.commonpath` now raises a :exc:`ValueError` |
| 5997 |
exception when passed an empty iterable. Previously, :exc:`IndexError` was |
| 5998 |
raised. |
| 5999 |
|
| 6000 |
:func:`posixpath.commonpath` now raises a :exc:`TypeError` exception when |
| 6001 |
passed ``None``. Previously, :exc:`ValueError` was raised. |
| 6002 |
|
| 6003 |
- gh-114610: Fix bug where :meth:`pathlib.PurePath.with_stem` converted a |
| 6004 |
non-empty path suffix to a stem when given an empty *stem* argument. It |
| 6005 |
now raises :exc:`ValueError`, just like |
| 6006 |
:meth:`pathlib.PurePath.with_suffix` does when called on a path with an |
| 6007 |
empty stem, given a non-empty *suffix* argument. |
| 6008 |
|
| 6009 |
- gh-107361: Add :data:`ssl.VERIFY_X509_PARTIAL_CHAIN` and |
| 6010 |
:data:`VERIFY_X509_STRICT` to the default SSL context created with |
| 6011 |
:func:`ssl.create_default_context`. |
| 6012 |
|
| 6013 |
- gh-112281: Allow creating :ref:`union of types<types-union>` for |
| 6014 |
:class:`typing.Annotated` with unhashable metadata. |
| 6015 |
|
| 6016 |
- gh-111775: Fix :meth:`importlib.resources.simple.ResourceHandle.open` for |
| 6017 |
text mode, added missed ``stream`` argument. |
| 6018 |
|
| 6019 |
- gh-90095: Make .pdbrc and -c work with any valid pdb commands. |
| 6020 |
|
| 6021 |
- gh-107625: Raise :exc:`configparser.ParsingError` from |
| 6022 |
:meth:`~configparser.ConfigParser.read` and |
| 6023 |
:meth:`~configparser.ConfigParser.read_file` methods of |
| 6024 |
:class:`configparser.ConfigParser` if a key without a corresponding value |
| 6025 |
is continued (that is, followed by an indented line). |
| 6026 |
|
| 6027 |
- gh-107155: Fix incorrect output of ``help(x)`` where ``x`` is a |
| 6028 |
:keyword:`lambda` function, which has an ``__annotations__`` dictionary |
| 6029 |
attribute with a ``"return"`` key. |
| 6030 |
|
| 6031 |
- gh-57141: Add option for *non-shallow* comparisons to |
| 6032 |
:class:`filecmp.dircmp` like :func:`filecmp.cmp`. Original patch by Steven |
| 6033 |
Ward. Enhanced by Tobias Rautenkranz |
| 6034 |
|
| 6035 |
- gh-69990: :meth:`Profile.print_stats` has been improved to accept multiple |
| 6036 |
sort arguments. Patched by Chiu-Hsiang Hsu and Furkan Onder. |
| 6037 |
|
| 6038 |
- gh-104061: Add :data:`socket.SO_BINDTOIFINDEX` constant. |
| 6039 |
|
| 6040 |
- gh-60346: Fix ArgumentParser inconsistent with parse_known_args. |
| 6041 |
|
| 6042 |
- gh-102389: Add ``windows_31j`` to aliases for ``cp932`` codec |
| 6043 |
|
| 6044 |
- gh-72249: Always include the :term:`module` name in the :func:`repr` of |
| 6045 |
:func:`functools.partial` objects. Patch by Furkan Onder and Anilyka |
| 6046 |
Barry. |
| 6047 |
|
| 6048 |
- gh-100985: Update HTTPSConnection to consistently wrap IPv6 Addresses when |
| 6049 |
using a proxy. |
| 6050 |
|
| 6051 |
- gh-100884: email: fix misfolding of comma in address-lists over multiple |
| 6052 |
lines in combination with unicode encoding. |
| 6053 |
|
| 6054 |
- gh-95782: Fix :func:`io.BufferedReader.tell`, |
| 6055 |
:func:`io.BufferedReader.seek`, :func:`!_pyio.BufferedReader.tell`, |
| 6056 |
:func:`io.BufferedRandom.tell`, :func:`io.BufferedRandom.seek` and |
| 6057 |
:func:`!_pyio.BufferedRandom.tell` being able to return negative offsets. |
| 6058 |
|
| 6059 |
- gh-96310: Fix a traceback in :mod:`argparse` when all options in a |
| 6060 |
mutually exclusive group are suppressed. |
| 6061 |
|
| 6062 |
- gh-93205: Fixed a bug in |
| 6063 |
:class:`logging.handlers.TimedRotatingFileHandler` where multiple rotating |
| 6064 |
handler instances pointing to files with the same name but different |
| 6065 |
extensions would conflict and not delete the correct files. |
| 6066 |
|
| 6067 |
- bpo-31116: Add Z85 encoding to ``base64``. |
| 6068 |
|
| 6069 |
- bpo-44865: Add missing call to localization function in :mod:`argparse`. |
| 6070 |
|
| 6071 |
- bpo-43952: Fix :meth:`multiprocessing.connection.Listener.accept` to |
| 6072 |
accept empty bytes as authkey. Not accepting empty bytes as key causes it |
| 6073 |
to hang indefinitely. |
| 6074 |
|
| 6075 |
- bpo-42125: linecache: get module name from ``__spec__`` if available. This |
| 6076 |
allows getting source code for the ``__main__`` module when a custom |
| 6077 |
loader is used. |
| 6078 |
|
| 6079 |
- bpo-41122: Failing to pass arguments properly to |
| 6080 |
:func:`functools.singledispatchmethod` now throws a TypeError instead of |
| 6081 |
hitting an index out of bounds internally. |
| 6082 |
|
| 6083 |
- bpo-40818: The asyncio REPL now runs :data:`sys.__interactivehook__` on |
| 6084 |
startup. The default implementation of :data:`sys.__interactivehook__` |
| 6085 |
provides auto-completion to the asyncio REPL. Patch contributed by Rémi |
| 6086 |
Lapeyre. |
| 6087 |
|
| 6088 |
- bpo-33775: Add 'default' and 'version' help text for localization in |
| 6089 |
argparse. |
| 6090 |
|
| 6091 |
Documentation |
| 6092 |
------------- |
| 6093 |
|
| 6094 |
- gh-115399: Document :cve:`2023-52425` of Expat <2.6.0 under "XML |
| 6095 |
vulnerabilities". |
| 6096 |
|
| 6097 |
- gh-109653: Improve import time of :mod:`uuid` on Linux. |
| 6098 |
|
| 6099 |
Tests |
| 6100 |
----- |
| 6101 |
|
| 6102 |
- gh-71052: Add test exclusions to support running the test suite on |
| 6103 |
Android. |
| 6104 |
|
| 6105 |
- gh-71052: Enable ``test_concurrent_futures`` on platforms that support |
| 6106 |
threading but not multiprocessing. |
| 6107 |
|
| 6108 |
- gh-115796: Make '_testinternalcapi.assemble_code_object' construct the |
| 6109 |
exception table for the code object. |
| 6110 |
|
| 6111 |
- gh-115720: Leak tests (``-R``, ``--huntrleaks``) now show a summary of the |
| 6112 |
number of leaks found in each iteration. |
| 6113 |
|
| 6114 |
- gh-115122: Add ``--bisect`` option to regrtest test runner: run failed |
| 6115 |
tests with ``test.bisect_cmd`` to identify failing tests. Patch by Victor |
| 6116 |
Stinner. |
| 6117 |
|
| 6118 |
- gh-115596: Fix ``ProgramPriorityTests`` in ``test_os`` permanently |
| 6119 |
changing the process priority. |
| 6120 |
|
| 6121 |
- gh-115556: On Windows, commas passed in arguments to |
| 6122 |
``Tools\buildbot\test.bat`` and ``PCbuild\\rt.bat`` are now properly |
| 6123 |
handled. |
| 6124 |
|
| 6125 |
- gh-115420: Fix translation of exception handler targets by |
| 6126 |
``_testinternalcapi.optimize_cfg``. |
| 6127 |
|
| 6128 |
- gh-115376: Fix segfault in ``_testinternalcapi.compiler_codegen`` on bad |
| 6129 |
input. |
| 6130 |
|
| 6131 |
Build |
| 6132 |
----- |
| 6133 |
|
| 6134 |
- gh-116313: Get WASI builds to work under wasmtime 18 w/ WASI 0.2/preview2 |
| 6135 |
primitives. |
| 6136 |
|
| 6137 |
- gh-71052: Change Android's :data:`sys.platform` from ``"linux"`` to |
| 6138 |
``"android"``. |
| 6139 |
|
| 6140 |
- gh-116117: Backport ``libb2``'s PR #42 to fix compiling CPython on 32-bit |
| 6141 |
Windows with ``clang-cl``. |
| 6142 |
|
| 6143 |
- gh-71052: Fix several Android build issues |
| 6144 |
|
| 6145 |
- gh-114099: A testbed project was added to run the test suite on iOS. |
| 6146 |
|
| 6147 |
- gh-115350: Fix building ctypes module with -DWIN32_LEAN_AND_MEAN defined |
| 6148 |
|
| 6149 |
- gh-111225: Link extension modules against libpython on Android. |
| 6150 |
|
| 6151 |
- gh-115737: The install name for libPython is now correctly set for |
| 6152 |
non-framework macOS builds. |
| 6153 |
|
| 6154 |
- gh-114099: Makefile targets were added to support compiling an |
| 6155 |
iOS-compatible framework build. |
| 6156 |
|
| 6157 |
Windows |
| 6158 |
------- |
| 6159 |
|
| 6160 |
- gh-116012: Ensure the value of ``GetLastError()`` is preserved across GIL |
| 6161 |
operations. |
| 6162 |
|
| 6163 |
- gh-115582: Building extensions intended for free-threaded builds of |
| 6164 |
CPython now require compiling with ``/DPy_GIL_DISABLED`` manually when |
| 6165 |
using a regular install. This is expected to change in future releases. |
| 6166 |
|
| 6167 |
- gh-115554: The installer now has more strict rules about updating the |
| 6168 |
:ref:`launcher`. In general, most users only have a single launcher |
| 6169 |
installed and will see no difference. When multiple launchers have been |
| 6170 |
installed, the option to install the launcher is disabled until all but |
| 6171 |
one have been removed. Downgrading the launcher (which was never allowed) |
| 6172 |
is now more obviously blocked. |
| 6173 |
|
| 6174 |
- gh-115543: :ref:`launcher` can now detect Python 3.13 when installed from |
| 6175 |
the Microsoft Store, and will install Python 3.12 by default when |
| 6176 |
:envvar:`PYLAUNCHER_ALLOW_INSTALL` is set. |
| 6177 |
|
| 6178 |
macOS |
| 6179 |
----- |
| 6180 |
|
| 6181 |
- gh-116145: Update macOS installer to Tcl/Tk 8.6.14. |
| 6182 |
|
| 6183 |
IDLE |
| 6184 |
---- |
| 6185 |
|
| 6186 |
- gh-88516: On macOS show a proxy icon in the title bar of editor windows to |
| 6187 |
match platform behaviour. |
| 6188 |
|
| 6189 |
Tools/Demos |
| 6190 |
----------- |
| 6191 |
|
| 6192 |
- gh-100176: Remove outdated Tools/{io,cc,string}bench |
| 6193 |
|
| 6194 |
- bpo-45101: Add consistency in usage message IO between 2 versions of |
| 6195 |
python-config. |
| 6196 |
|
| 6197 |
C API |
| 6198 |
----- |
| 6199 |
|
| 6200 |
- gh-114626: Add again ``_PyCFunctionFastWithKeywords`` name, removed in |
| 6201 |
Python 3.13 alpha 4 by mistake. Keep the old private |
| 6202 |
``_PyCFunctionFastWithKeywords`` name (Python 3.7) as an alias to the new |
| 6203 |
public name ``PyCFunctionFastWithKeywords`` (Python 3.13a4). Patch by |
| 6204 |
Victor Stinner. |
| 6205 |
|
| 6206 |
- gh-111418: Add :c:macro:`PyHASH_MODULUS`, :c:macro:`PyHASH_BITS`, |
| 6207 |
:c:macro:`PyHASH_INF` and :c:macro:`PyHASH_IMAG` C macros. Patch by |
| 6208 |
Sergey B Kirpichev. |
| 6209 |
|
| 6210 |
|
| 6211 |
What's New in Python 3.13.0 alpha 4? |
| 6212 |
==================================== |
| 6213 |
|
| 6214 |
*Release date: 2024-02-15* |
| 6215 |
|
| 6216 |
Security |
| 6217 |
-------- |
| 6218 |
|
| 6219 |
- gh-115399: Update bundled libexpat to 2.6.0 |
| 6220 |
|
| 6221 |
- gh-115243: Fix possible crashes in :meth:`collections.deque.index` when |
| 6222 |
the deque is concurrently modified. |
| 6223 |
|
| 6224 |
Core and Builtins |
| 6225 |
----------------- |
| 6226 |
|
| 6227 |
- gh-112087: For an empty reverse iterator for list will be reduced to |
| 6228 |
:func:`reversed`. Patch by Donghee Na |
| 6229 |
|
| 6230 |
- gh-114570: Add :exc:`PythonFinalizationError` exception. This exception |
| 6231 |
derived from :exc:`RuntimeError` is raised when an operation is blocked |
| 6232 |
during the :term:`Python finalization <interpreter shutdown>`. Patch by |
| 6233 |
Victor Stinner. |
| 6234 |
|
| 6235 |
- gh-114695: Add :func:`sys._clear_internal_caches`, which clears all |
| 6236 |
internal performance-related caches (and deprecate the less-general |
| 6237 |
:func:`sys._clear_type_cache` function). |
| 6238 |
|
| 6239 |
- gh-114828: Fix compilation crashes in uncommon code examples using |
| 6240 |
:func:`super` inside a comprehension in a class body. |
| 6241 |
|
| 6242 |
- gh-112069: Adapt :class:`set` and :class:`frozenset` methods to Argument |
| 6243 |
Clinic. |
| 6244 |
|
| 6245 |
- gh-115011: Setters for members with an unsigned integer type now support |
| 6246 |
the same range of valid values for objects that has a |
| 6247 |
:meth:`~object.__index__` method as for :class:`int`. |
| 6248 |
|
| 6249 |
- gh-114887: Changed socket type validation in |
| 6250 |
:meth:`~asyncio.loop.create_datagram_endpoint` to accept all non-stream |
| 6251 |
sockets. This fixes a regression in compatibility with raw sockets. |
| 6252 |
|
| 6253 |
- gh-114944: Fixes a race between ``PyParkingLot_Park`` and |
| 6254 |
``_PyParkingLot_UnparkAll``. |
| 6255 |
|
| 6256 |
- gh-113462: Limit the number of versions that a single class can use. |
| 6257 |
Prevents a few wayward classes using up all the version numbers. |
| 6258 |
|
| 6259 |
- gh-76763: The :func:`chr` builtin function now always raises |
| 6260 |
:exc:`ValueError` for values outside the valid range. Previously it raised |
| 6261 |
:exc:`OverflowError` for very large or small values. |
| 6262 |
|
| 6263 |
- gh-114806: No longer specialize calls to classes, if those classes have |
| 6264 |
metaclasses. Fixes bug where the ``__call__`` method of the metaclass was |
| 6265 |
not being called. |
| 6266 |
|
| 6267 |
- gh-107944: Improve error message for function calls with bad keyword |
| 6268 |
arguments via getargs |
| 6269 |
|
| 6270 |
- gh-112529: The free-threaded build no longer allocates space for the |
| 6271 |
``PyGC_Head`` structure in objects that support cyclic garbage collection. |
| 6272 |
A number of other fields and data structures are used as replacements, |
| 6273 |
including ``ob_gc_bits``, ``ob_tid``, and mimalloc internal data |
| 6274 |
structures. |
| 6275 |
|
| 6276 |
- gh-114456: Lower the recursion limit under a debug build of WASI. |
| 6277 |
|
| 6278 |
- gh-114083: Compiler applies folding of LOAD_CONST with following |
| 6279 |
instruction in a separate pass before other optimisations. This enables |
| 6280 |
jump threading in certain circumstances. |
| 6281 |
|
| 6282 |
- gh-114388: Fix a :exc:`RuntimeWarning` emitted when assign an integer-like |
| 6283 |
value that is not an instance of :class:`int` to an attribute that |
| 6284 |
corresponds to a C struct member of :ref:`type <PyMemberDef-types>` T_UINT |
| 6285 |
and T_ULONG. Fix a double :exc:`RuntimeWarning` emitted when assign a |
| 6286 |
negative integer value to an attribute that corresponds to a C struct |
| 6287 |
member of type T_UINT. |
| 6288 |
|
| 6289 |
- gh-114265: Compiler propagates line numbers before optimization, leading |
| 6290 |
to more optimization opportunities and removing the need for the |
| 6291 |
``guarantee_lineno_for_exits`` hack. |
| 6292 |
|
| 6293 |
- gh-112529: The free-threaded build now has its own thread-safe GC |
| 6294 |
implementation that uses mimalloc to find GC tracked objects. It is |
| 6295 |
non-generational, unlike the existing GC implementation. |
| 6296 |
|
| 6297 |
- gh-114050: Fix segmentation fault caused by an incorrect format string in |
| 6298 |
``TypeError`` exception when more than two arguments are passed to |
| 6299 |
``int``. |
| 6300 |
|
| 6301 |
- gh-112354: The ``END_FOR`` instruction now pops only one value. This is to |
| 6302 |
better support side exits in loops. |
| 6303 |
|
| 6304 |
- gh-113884: Make :class:`queue.SimpleQueue` thread safe when the GIL is |
| 6305 |
disabled. |
| 6306 |
|
| 6307 |
- gh-114058: Implement the foundations of the Tier 2 redundancy eliminator. |
| 6308 |
|
| 6309 |
- gh-113939: frame.clear(): Clear frame.f_locals as well, and not only the |
| 6310 |
fast locals. This is relevant once frame.f_locals was accessed, which |
| 6311 |
would contain also references to all the locals. |
| 6312 |
|
| 6313 |
- gh-112050: Convert :class:`collections.deque` to use Argument Clinic. |
| 6314 |
|
| 6315 |
- gh-112050: Make methods on :class:`collections.deque` thread-safe when the |
| 6316 |
GIL is disabled. |
| 6317 |
|
| 6318 |
- gh-113464: Add an option (``--enable-experimental-jit`` for |
| 6319 |
``configure``-based builds or ``--experimental-jit`` for ``PCbuild``-based |
| 6320 |
ones) to build an *experimental* just-in-time compiler, based on |
| 6321 |
`copy-and-patch <https://fredrikbk.com/publications/copy-and-patch.pdf>`_ |
| 6322 |
|
| 6323 |
- gh-113055: Make interp->obmalloc a pointer. For interpreters that share |
| 6324 |
state with the main interpreter, this points to the same static memory |
| 6325 |
structure. For interpreters with their own obmalloc state, it is heap |
| 6326 |
allocated. Add free_obmalloc_arenas() which will free the obmalloc arenas |
| 6327 |
and radix tree structures for interpreters with their own obmalloc state. |
| 6328 |
|
| 6329 |
- gh-55664: Add warning when creating :class:`type` using a namespace |
| 6330 |
dictionary with non-string keys. Patched by Daniel Urban and Furkan Onder. |
| 6331 |
|
| 6332 |
- gh-104530: Use native Win32 condition variables. |
| 6333 |
|
| 6334 |
Library |
| 6335 |
------- |
| 6336 |
|
| 6337 |
- gh-115392: Fix a bug in :mod:`doctest` where incorrect line numbers would |
| 6338 |
be reported for decorated functions. |
| 6339 |
|
| 6340 |
- gh-114563: Fix several :func:`format` bugs when using the C implementation |
| 6341 |
of :class:`~decimal.Decimal`: * memory leak in some rare cases when using |
| 6342 |
the ``z`` format option (coerce negative 0) * incorrect output when |
| 6343 |
applying the ``z`` format option to type ``F`` (fixed-point with capital |
| 6344 |
``NAN`` / ``INF``) * incorrect output when applying the ``#`` format |
| 6345 |
option (alternate form) |
| 6346 |
|
| 6347 |
- gh-102840: Fix confused traceback when floordiv, mod, or divmod operations |
| 6348 |
happens between instances of :class:`fractions.Fraction` and |
| 6349 |
:class:`complex`. |
| 6350 |
|
| 6351 |
- gh-115165: Most exceptions are now ignored when attempting to set the |
| 6352 |
``__orig_class__`` attribute on objects returned when calling |
| 6353 |
:mod:`typing` generic aliases (including generic aliases created using |
| 6354 |
:data:`typing.Annotated`). Previously only :exc:`AttributeError` was |
| 6355 |
ignored. Patch by Dave Shawley. |
| 6356 |
|
| 6357 |
- gh-112903: Fix "issubclass() arg 1 must be a class" errors in certain |
| 6358 |
cases of multiple inheritance with generic aliases (regression in early |
| 6359 |
3.13 alpha releases). |
| 6360 |
|
| 6361 |
- gh-115133: Fix tests for :class:`~xml.etree.ElementTree.XMLPullParser` |
| 6362 |
with Expat 2.6.0. |
| 6363 |
|
| 6364 |
- gh-115059: :meth:`io.BufferedRandom.read1` now flushes the underlying |
| 6365 |
write buffer. |
| 6366 |
|
| 6367 |
- gh-79382: Trailing ``**`` no longer allows to match files and non-existing |
| 6368 |
paths in recursive :func:`~glob.glob`. |
| 6369 |
|
| 6370 |
- gh-67837: Avoid race conditions in the creation of directories during |
| 6371 |
concurrent extraction in :mod:`tarfile` and :mod:`zipfile`. |
| 6372 |
|
| 6373 |
- gh-115060: Speed up :meth:`pathlib.Path.glob` by removing redundant regex |
| 6374 |
matching. |
| 6375 |
|
| 6376 |
- gh-97928: Partially revert the behavior of :meth:`tkinter.Text.count`. By |
| 6377 |
default it preserves the behavior of older Python versions, except that |
| 6378 |
setting ``wantobjects`` to 0 no longer has effect. Add a new parameter |
| 6379 |
*return_ints*: specifying ``return_ints=True`` makes ``Text.count()`` |
| 6380 |
always returning the single count as an integer instead of a 1-tuple or |
| 6381 |
``None``. |
| 6382 |
|
| 6383 |
- gh-114628: When csv.Error is raised when handling TypeError, do not print |
| 6384 |
the TypeError traceback. |
| 6385 |
|
| 6386 |
- gh-85984: Added ``_POSIX_VDISABLE`` from C's ``<unistd.h>`` to |
| 6387 |
:mod:`termios`. |
| 6388 |
|
| 6389 |
- gh-114965: Update bundled pip to 24.0 |
| 6390 |
|
| 6391 |
- gh-114959: :mod:`tarfile` no longer ignores errors when trying to extract |
| 6392 |
a directory on top of a file. |
| 6393 |
|
| 6394 |
- gh-114894: Add :meth:`array.array.clear`. |
| 6395 |
|
| 6396 |
- gh-114071: Support tuple subclasses using auto() for enum member value. |
| 6397 |
|
| 6398 |
- gh-109475: Fix support of explicit option value "--" in :mod:`argparse` |
| 6399 |
(e.g. ``--option=--``). |
| 6400 |
|
| 6401 |
- gh-49766: Fix :class:`~datetime.date`-:class:`~datetime.datetime` |
| 6402 |
comparison. Now the special comparison methods like ``__eq__`` and |
| 6403 |
``__lt__`` return :data:`NotImplemented` if one of comparands is |
| 6404 |
:class:`!date` and other is :class:`!datetime` instead of ignoring the |
| 6405 |
time part and the time zone or forcefully return "not equal" or raise |
| 6406 |
:exc:`TypeError`. It makes comparison of :class:`!date` and |
| 6407 |
:class:`!datetime` subclasses more symmetric and allows to change the |
| 6408 |
default behavior by overriding the special comparison methods in |
| 6409 |
subclasses. |
| 6410 |
|
| 6411 |
- gh-110190: Fix ctypes structs with array on Windows ARM64 platform by |
| 6412 |
setting ``MAX_STRUCT_SIZE`` to 32 in stgdict. Patch by Diego Russo |
| 6413 |
|
| 6414 |
- gh-114678: Ensure that deprecation warning for 'N' specifier in |
| 6415 |
:class:`~decimal.Decimal` format is not raised for cases where 'N' appears |
| 6416 |
in other places in the format specifier. Based on patch by Stefan Krah. |
| 6417 |
|
| 6418 |
- gh-70303: Return both files and directories from :meth:`pathlib.Path.glob` |
| 6419 |
if a pattern ends with "``**``". Previously only directories were |
| 6420 |
returned. |
| 6421 |
|
| 6422 |
- gh-109653: Improve import time of :mod:`importlib.metadata` and |
| 6423 |
:mod:`email.utils`. |
| 6424 |
|
| 6425 |
- gh-113280: Fix a leak of open socket in rare cases when error occurred in |
| 6426 |
:class:`ssl.SSLSocket` creation. |
| 6427 |
|
| 6428 |
- gh-77749: :meth:`email.policy.EmailPolicy.fold` now always encodes |
| 6429 |
non-ASCII characters in headers if :attr:`~email.policy.EmailPolicy.utf8` |
| 6430 |
is false. |
| 6431 |
|
| 6432 |
- gh-83383: Synchronization of the :mod:`dbm.dumb` database is now no-op if |
| 6433 |
there was no modification since opening or last synchronization. The |
| 6434 |
directory file for a newly created empty :mod:`dbm.dumb` database is now |
| 6435 |
created immediately after opening instead of deferring this until |
| 6436 |
synchronizing or closing. |
| 6437 |
|
| 6438 |
- gh-91602: Add *filter* keyword-only parameter to |
| 6439 |
:meth:`sqlite3.Connection.iterdump` for filtering database objects to |
| 6440 |
dump. Patch by Mariusz Felisiak. |
| 6441 |
|
| 6442 |
- gh-112451: Prohibit subclassing pure-Python :class:`datetime.timezone`. |
| 6443 |
This is consistent with C-extension implementation. Patch by Mariusz |
| 6444 |
Felisiak. |
| 6445 |
|
| 6446 |
- gh-69893: Add the :meth:`!close` method for the iterator returned by |
| 6447 |
:func:`xml.etree.ElementTree.iterparse`. |
| 6448 |
|
| 6449 |
- gh-109653: Reduce the import time of :mod:`threading` module by ~50%. |
| 6450 |
Patch by Daniel Hollas. |
| 6451 |
|
| 6452 |
- gh-114492: Make the result of :func:`termios.tcgetattr` reproducible on |
| 6453 |
Alpine Linux. Previously it could leave a random garbage in some fields. |
| 6454 |
|
| 6455 |
- gh-114315: Make :class:`threading.Lock` a real class, not a factory |
| 6456 |
function. Add ``__new__`` to ``_thread.lock`` type. |
| 6457 |
|
| 6458 |
- gh-100414: Add :mod:`dbm.sqlite3` as a backend to :mod:`dbm`, and make it |
| 6459 |
the new default :mod:`!dbm` backend. Patch by Raymond Hettinger and Erlend |
| 6460 |
E. Aasland. |
| 6461 |
|
| 6462 |
- gh-113267: Revert changes in :gh:`106584` which made calls of |
| 6463 |
``TestResult`` methods ``startTest()`` and ``stopTest()`` unbalanced. |
| 6464 |
|
| 6465 |
- gh-75128: Ignore an :exc:`OSError` in |
| 6466 |
:meth:`asyncio.BaseEventLoop.create_server` when IPv6 is available but the |
| 6467 |
interface cannot actually support it. |
| 6468 |
|
| 6469 |
- gh-114423: ``_DummyThread`` entries in ``threading._active`` are now |
| 6470 |
automatically removed when the related thread dies. |
| 6471 |
|
| 6472 |
- gh-114257: Dismiss the :exc:`FileNotFound` error in |
| 6473 |
:func:`ctypes.util.find_library` and just return ``None`` on Linux. |
| 6474 |
|
| 6475 |
- gh-114321: Expose more platform specific constants in the :mod:`fcntl` |
| 6476 |
module on Linux, macOS, FreeBSD and NetBSD. |
| 6477 |
|
| 6478 |
- gh-114328: The :func:`tty.setcbreak` and new :func:`tty.cfmakecbreak` no |
| 6479 |
longer clears the terminal input ICRLF flag. This fixes a regression |
| 6480 |
introduced in 3.12 that no longer matched how OSes define cbreak mode in |
| 6481 |
their ``stty(1)`` manual pages. |
| 6482 |
|
| 6483 |
- gh-114281: Remove type hints from ``Lib/asyncio/staggered.py``. The |
| 6484 |
annotations in the `typeshed <https://github.com/python/typeshed>`__ |
| 6485 |
project should be used instead. |
| 6486 |
|
| 6487 |
- gh-101438: Avoid reference cycle in ElementTree.iterparse. The iterator |
| 6488 |
returned by ``ElementTree.iterparse`` may hold on to a file descriptor. |
| 6489 |
The reference cycle prevented prompt clean-up of the file descriptor if |
| 6490 |
the returned iterator was not exhausted. |
| 6491 |
|
| 6492 |
- gh-114198: The signature for the ``__replace__`` method on |
| 6493 |
:mod:`dataclasses` now has the first argument named ``self``, rather than |
| 6494 |
``obj``. |
| 6495 |
|
| 6496 |
- gh-104522: :exc:`OSError` raised when run a subprocess now only has |
| 6497 |
*filename* attribute set to *cwd* if the error was caused by a failed |
| 6498 |
attempt to change the current directory. |
| 6499 |
|
| 6500 |
- gh-114149: Enum: correctly handle tuple subclasses in custom ``__new__``. |
| 6501 |
|
| 6502 |
- gh-83648: Support deprecation of options, positional arguments and |
| 6503 |
subcommands in :mod:`argparse`. |
| 6504 |
|
| 6505 |
- gh-114087: Speed up ``dataclasses.asdict`` up to 1.35x. |
| 6506 |
|
| 6507 |
- gh-109534: Fix a reference leak in |
| 6508 |
:class:`asyncio.selector_events.BaseSelectorEventLoop` when SSL handshakes |
| 6509 |
fail. Patch contributed by Jamie Phan. |
| 6510 |
|
| 6511 |
- gh-79634: Accept :term:`path-like objects <path-like object>` as patterns |
| 6512 |
in :meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob`. |
| 6513 |
|
| 6514 |
- gh-112202: Ensure that a :func:`asyncio.Condition.notify` call does not |
| 6515 |
get lost if the awakened ``Task`` is simultaneously cancelled or |
| 6516 |
encounters any other error. |
| 6517 |
|
| 6518 |
- gh-113951: Fix the behavior of ``tag_unbind()`` methods of |
| 6519 |
:class:`tkinter.Text` and :class:`tkinter.Canvas` classes with three |
| 6520 |
arguments. Previously, ``widget.tag_unbind(tag, sequence, funcid)`` |
| 6521 |
destroyed the current binding for *sequence*, leaving *sequence* unbound, |
| 6522 |
and deleted the *funcid* command. Now it removes only *funcid* from the |
| 6523 |
binding for *sequence*, keeping other commands, and deletes the *funcid* |
| 6524 |
command. It leaves *sequence* unbound only if *funcid* was the last bound |
| 6525 |
command. |
| 6526 |
|
| 6527 |
- gh-97959: Fix rendering class methods, bound methods, method and function |
| 6528 |
aliases in :mod:`pydoc`. Class methods no longer have "method of |
| 6529 |
builtins.type instance" note. Corresponding notes are now added for class |
| 6530 |
and unbound methods. Method and function aliases now have references to |
| 6531 |
the module or the class where the origin was defined if it differs from |
| 6532 |
the current. Bound methods are now listed in the static methods section. |
| 6533 |
Methods of builtin classes are now supported as well as methods of Python |
| 6534 |
classes. |
| 6535 |
|
| 6536 |
- gh-113796: Add more validation checks in the :class:`csv.Dialect` |
| 6537 |
constructor. :exc:`ValueError` is now raised if the same character is used |
| 6538 |
in different roles. |
| 6539 |
|
| 6540 |
- gh-113732: Fix support of :data:`~csv.QUOTE_NOTNULL` and |
| 6541 |
:data:`~csv.QUOTE_STRINGS` in :func:`csv.reader`. |
| 6542 |
|
| 6543 |
- gh-113225: Speed up :meth:`pathlib.Path.walk` by using |
| 6544 |
:attr:`os.DirEntry.path` where possible. |
| 6545 |
|
| 6546 |
- gh-89039: When replace() method is called on a subclass of datetime, date |
| 6547 |
or time, properly call derived constructor. Previously, only the base |
| 6548 |
class's constructor was called. |
| 6549 |
|
| 6550 |
Also, make sure to pass non-zero fold values when creating subclasses in |
| 6551 |
various methods. Previously, fold was silently ignored. |
| 6552 |
|
| 6553 |
- gh-112919: Speed-up :func:`datetime.datetime.replace`, |
| 6554 |
:func:`datetime.date.replace` and :func:`datetime.time.replace`. |
| 6555 |
|
| 6556 |
- gh-59013: Set breakpoint on the first executable line of the function, |
| 6557 |
instead of the line of function definition when the user do ``break func`` |
| 6558 |
using :mod:`pdb` |
| 6559 |
|
| 6560 |
- gh-112343: Improve handling of pdb convenience variables to avoid |
| 6561 |
replacing string contents. |
| 6562 |
|
| 6563 |
- gh-112240: Add option to calendar module CLI to specify the weekday to |
| 6564 |
start each week. Patch by Steven Ward. |
| 6565 |
|
| 6566 |
- gh-111741: Recognise ``image/webp`` as a standard format in the |
| 6567 |
:mod:`mimetypes` module. |
| 6568 |
|
| 6569 |
- gh-43457: Fix the :mod:`tkinter` widget method :meth:`!wm_attributes`. It |
| 6570 |
now accepts the attribute name without the minus prefix to get window |
| 6571 |
attributes and allows to specify attributes and values to set as keyword |
| 6572 |
arguments. Add new optional keyword argument *return_python_dict*: calling |
| 6573 |
``w.wm_attributes(return_python_dict=True)`` returns the attributes as a |
| 6574 |
dict instead of a tuple. Calling ``w.wm_attributes()`` now returns a tuple |
| 6575 |
instead of string if *wantobjects* was set to 0. |
| 6576 |
|
| 6577 |
- gh-82626: Many functions now emit a warning if a boolean value is passed |
| 6578 |
as a file descriptor argument. |
| 6579 |
|
| 6580 |
- gh-111051: Added check for file modification during debugging with |
| 6581 |
:mod:`pdb` |
| 6582 |
|
| 6583 |
- gh-110345: Show the Tcl/Tk patchlevel (rather than version) in |
| 6584 |
:meth:`tkinter._test`. |
| 6585 |
|
| 6586 |
- gh-38807: Fix race condition in :mod:`trace`. Instead of checking if a |
| 6587 |
directory exists and creating it, directly call :func:`os.makedirs` with |
| 6588 |
the kwarg ``exist_ok=True``. |
| 6589 |
|
| 6590 |
- gh-75705: Set unixfrom envelope in :class:`mailbox.mbox` and |
| 6591 |
:class:`mailbox.MMDF`. |
| 6592 |
|
| 6593 |
- gh-106233: Fix stacklevel in ``InvalidTZPathWarning`` during |
| 6594 |
:mod:`zoneinfo` module import. |
| 6595 |
|
| 6596 |
- gh-105102: Allow :class:`ctypes.Union` to be nested in |
| 6597 |
:class:`ctypes.Structure` when the system endianness is the opposite of |
| 6598 |
the classes. |
| 6599 |
|
| 6600 |
- gh-104282: Fix null pointer dereference in |
| 6601 |
:func:`lzma._decode_filter_properties` due to improper handling of BCJ |
| 6602 |
filters with properties of zero length. Patch by Radislav Chugunov. |
| 6603 |
|
| 6604 |
- gh-96471: Add :py:class:`queue.Queue` termination with |
| 6605 |
:py:meth:`~queue.Queue.shutdown`. |
| 6606 |
|
| 6607 |
- gh-101599: Changed argparse flag options formatting to remove redundancy. |
| 6608 |
|
| 6609 |
- gh-85984: Add POSIX pseudo-terminal functions :func:`os.posix_openpt`, |
| 6610 |
:func:`os.grantpt`, :func:`os.unlockpt`, and :func:`os.ptsname`. |
| 6611 |
|
| 6612 |
- gh-102512: When :func:`os.fork` is called from a foreign thread (aka |
| 6613 |
``_DummyThread``), the type of the thread in a child process is changed to |
| 6614 |
``_MainThread``. Also changed its name and daemonic status, it can be now |
| 6615 |
joined. |
| 6616 |
|
| 6617 |
- gh-88569: Add :func:`os.path.isreserved`, which identifies reserved |
| 6618 |
pathnames such as "NUL", "AUX" and "CON". This function is only available |
| 6619 |
on Windows. |
| 6620 |
|
| 6621 |
Deprecate :meth:`pathlib.PurePath.is_reserved`. |
| 6622 |
|
| 6623 |
- bpo-38364: The ``inspect`` functions ``isgeneratorfunction``, |
| 6624 |
``iscoroutinefunction``, ``isasyncgenfunction`` now support |
| 6625 |
``functools.partialmethod`` wrapped functions the same way they support |
| 6626 |
``functools.partial``. |
| 6627 |
|
| 6628 |
Documentation |
| 6629 |
------------- |
| 6630 |
|
| 6631 |
- gh-115233: Fix an example for :class:`~logging.LoggerAdapter` in the |
| 6632 |
Logging Cookbook. |
| 6633 |
|
| 6634 |
- gh-114123: Move the :mod:`csv` module docstring to the :mod:`!csv` module |
| 6635 |
instead of reexporting it from the internal :mod:`!_csv` module, and |
| 6636 |
remove ``__doc__`` from ``csv.__all__``. |
| 6637 |
|
| 6638 |
Move :attr:`!csv.__version__` to the :mod:`!csv` module instead of |
| 6639 |
reexporting it from the internal :mod:`!_csv` module, and remove |
| 6640 |
``__version__`` from ``csv.__all__``. |
| 6641 |
|
| 6642 |
Tests |
| 6643 |
----- |
| 6644 |
|
| 6645 |
- gh-114099: Added test exclusions required to run the test suite on iOS. |
| 6646 |
|
| 6647 |
- gh-105089: Fix |
| 6648 |
``test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write`` |
| 6649 |
test in AIX by doing a bitwise AND of 0xFFFF on mode , so that it will be |
| 6650 |
in sync with ``zinfo.external_attr`` |
| 6651 |
|
| 6652 |
Build |
| 6653 |
----- |
| 6654 |
|
| 6655 |
- gh-115167: Avoid vendoring ``vcruntime140_threads.dll`` when building with |
| 6656 |
Visual Studio 2022 version 17.8. |
| 6657 |
|
| 6658 |
- gh-113632: Promote WASI to a tier 2 platform and drop Emscripten from tier |
| 6659 |
3 in configure.ac. |
| 6660 |
|
| 6661 |
- gh-114099: configure and Makefile were refactored to accommodate framework |
| 6662 |
builds on Apple platforms other than macOS. |
| 6663 |
|
| 6664 |
- gh-114875: Add :c:func:`!getgrent` as a prerequisite for building the |
| 6665 |
:mod:`grp` module. |
| 6666 |
|
| 6667 |
Windows |
| 6668 |
------- |
| 6669 |
|
| 6670 |
- gh-115049: Fixes ``py.exe`` launcher failing when run as users without |
| 6671 |
user profiles. |
| 6672 |
|
| 6673 |
- gh-115009: Update Windows installer to use SQLite 3.45.1. |
| 6674 |
|
| 6675 |
- gh-109991: Update Windows build to use OpenSSL 3.0.13. |
| 6676 |
|
| 6677 |
- gh-111239: Update Windows builds to use zlib v1.3.1. |
| 6678 |
|
| 6679 |
- gh-100107: The ``py.exe`` launcher will no longer attempt to run the |
| 6680 |
Microsoft Store redirector when launching a script containing a |
| 6681 |
``/usr/bin/env`` shebang |
| 6682 |
|
| 6683 |
- gh-112984: Adds free-threaded binaries to Windows installer as an optional |
| 6684 |
component. |
| 6685 |
|
| 6686 |
- gh-89240: Allows :mod:`multiprocessing` to create pools of greater than 62 |
| 6687 |
processes. |
| 6688 |
|
| 6689 |
macOS |
| 6690 |
----- |
| 6691 |
|
| 6692 |
- gh-115009: Update macOS installer to use SQLite 3.45.1. |
| 6693 |
|
| 6694 |
- gh-109991: Update macOS installer to use OpenSSL 3.0.13. |
| 6695 |
|
| 6696 |
- gh-114490: Add Mach-O linkage support for :func:`platform.architecture`. |
| 6697 |
|
| 6698 |
- gh-87804: On macOS the result of ``os.statvfs`` and ``os.fstatvfs`` now |
| 6699 |
correctly report the size of very large disks, in previous versions the |
| 6700 |
reported number of blocks was wrong for disks with at least 2**32 blocks. |
| 6701 |
|
| 6702 |
IDLE |
| 6703 |
---- |
| 6704 |
|
| 6705 |
- gh-96905: In idlelib code, stop redefining built-ins 'dict' and 'object'. |
| 6706 |
|
| 6707 |
- gh-103820: Revise IDLE bindings so that events from mouse button 4/5 on |
| 6708 |
non-X11 windowing systems (i.e. Win32 and Aqua) are not mistaken for |
| 6709 |
scrolling. |
| 6710 |
|
| 6711 |
Tools/Demos |
| 6712 |
----------- |
| 6713 |
|
| 6714 |
- gh-113516: Don't set ``LDSHARED`` when building for WASI. |
| 6715 |
|
| 6716 |
- gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.13 and |
| 6717 |
multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1. |
| 6718 |
|
| 6719 |
- gh-115015: Fix a bug in Argument Clinic that generated incorrect code for |
| 6720 |
methods with no parameters that use the :ref:`METH_METHOD | METH_FASTCALL |
| 6721 |
| METH_KEYWORDS <METH_METHOD-METH_FASTCALL-METH_KEYWORDS>` calling |
| 6722 |
convention. Only the positional parameter count was checked; any keyword |
| 6723 |
argument passed would be silently accepted. |
| 6724 |
|
| 6725 |
C API |
| 6726 |
----- |
| 6727 |
|
| 6728 |
- gh-111140: Adds :c:func:`PyLong_AsNativeBytes`, |
| 6729 |
:c:func:`PyLong_FromNativeBytes` and |
| 6730 |
:c:func:`PyLong_FromUnsignedNativeBytes` functions. |
| 6731 |
|
| 6732 |
- gh-114685: :c:func:`PyBuffer_FillInfo` now raises a :exc:`SystemError` if |
| 6733 |
called with :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE` as flags. |
| 6734 |
These flags should only be used with the ``PyMemoryView_*`` C API. |
| 6735 |
|
| 6736 |
- gh-114685: :c:func:`PyObject_GetBuffer` now raises a :exc:`SystemError` if |
| 6737 |
called with :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE` as flags. |
| 6738 |
These flags should only be used with the ``PyMemoryView_*`` C API. |
| 6739 |
|
| 6740 |
- gh-114626: Add ``PyCFunctionFast`` and ``PyCFunctionFastWithKeywords`` |
| 6741 |
typedefs (identical to the existing ``_PyCFunctionFast`` and |
| 6742 |
``_PyCFunctionFastWithKeywords`` typedefs, just without a leading ``_`` |
| 6743 |
prefix). |
| 6744 |
|
| 6745 |
- gh-114329: Add :c:func:`PyList_GetItemRef`, which is similar to |
| 6746 |
:c:func:`PyList_GetItem` but returns a :term:`strong reference` instead of |
| 6747 |
a :term:`borrowed reference`. |
| 6748 |
|
| 6749 |
- gh-110850: Add PyTime C API: |
| 6750 |
|
| 6751 |
* :c:type:`PyTime_t` type. |
| 6752 |
* :c:var:`PyTime_MIN` and :c:var:`PyTime_MAX` constants. |
| 6753 |
* :c:func:`PyTime_AsSecondsDouble`, |
| 6754 |
:c:func:`PyTime_Monotonic`, :c:func:`PyTime_PerfCounter`, and |
| 6755 |
:c:func:`PyTime_Time` functions. |
| 6756 |
|
| 6757 |
Patch by Victor Stinner. |
| 6758 |
|
| 6759 |
- gh-112066: Add :c:func:`PyDict_SetDefaultRef`: insert a key and value into |
| 6760 |
a dictionary if the key is not already present. This is similar to |
| 6761 |
:meth:`dict.setdefault`, but returns an integer value indicating if the |
| 6762 |
key was already present. It is also similar to |
| 6763 |
:c:func:`PyDict_SetDefault`, but returns a strong reference instead of a |
| 6764 |
borrowed reference. |
| 6765 |
|
| 6766 |
|
| 6767 |
What's New in Python 3.13.0 alpha 3? |
| 6768 |
==================================== |
| 6769 |
|
| 6770 |
*Release date: 2024-01-17* |
| 6771 |
|
| 6772 |
Security |
| 6773 |
-------- |
| 6774 |
|
| 6775 |
- gh-113659: Skip ``.pth`` files with names starting with a dot or hidden |
| 6776 |
file attribute. |
| 6777 |
|
| 6778 |
- gh-112302: Created a Software Bill-of-Materials document and tooling for |
| 6779 |
tracking dependencies. |
| 6780 |
|
| 6781 |
Core and Builtins |
| 6782 |
----------------- |
| 6783 |
|
| 6784 |
- gh-107901: Compiler duplicates basic blocks that have an eval breaker |
| 6785 |
check, no line number, and multiple predecessors. |
| 6786 |
|
| 6787 |
- gh-107901: A jump leaving an exception handler back to normal code no |
| 6788 |
longer checks the eval breaker. |
| 6789 |
|
| 6790 |
- gh-113655: Set the C recursion limit to 4000 on Windows, and 10000 on |
| 6791 |
Linux/OSX. This seems to be near the sweet spot to maintain safety, but |
| 6792 |
not compromise backwards compatibility. |
| 6793 |
|
| 6794 |
- gh-113710: Add typed stack effects to the interpreter DSL, along with |
| 6795 |
various instruction annotations. |
| 6796 |
|
| 6797 |
- gh-77046: On Windows, file descriptors wrapping Windows handles are now |
| 6798 |
created non inheritable by default (:pep:`446`). Patch by Zackery Spytz |
| 6799 |
and Victor Stinner. |
| 6800 |
|
| 6801 |
- gh-113853: Guarantee that all executors make progress. This then |
| 6802 |
guarantees that tier 2 execution always makes progress. |
| 6803 |
|
| 6804 |
- gh-113753: Fix an issue where the finalizer of ``PyAsyncGenASend`` objects |
| 6805 |
might not be called if they were allocated from a free list. |
| 6806 |
|
| 6807 |
- gh-107901: Compiler changed so that synthetic jumps which are not at loop |
| 6808 |
end no longer check the eval breaker. |
| 6809 |
|
| 6810 |
- gh-113703: Fix a regression in the :mod:`codeop` module that was causing |
| 6811 |
it to incorrectly identify incomplete f-strings. Patch by Pablo Galindo |
| 6812 |
|
| 6813 |
- gh-89811: Check for a valid ``tp_version_tag`` before performing bytecode |
| 6814 |
specializations that rely on this value being usable. |
| 6815 |
|
| 6816 |
- gh-111488: Changed error message in case of no 'in' keyword after 'for' in |
| 6817 |
list comprehensions |
| 6818 |
|
| 6819 |
- gh-113657: Fix an issue that caused important instruction pointer updates |
| 6820 |
to be optimized out of tier two traces. |
| 6821 |
|
| 6822 |
- gh-113603: Fixed bug where a redundant NOP is not removed, causing an |
| 6823 |
assertion to fail in the compiler in debug mode. |
| 6824 |
|
| 6825 |
- gh-113602: Fix an error that was causing the parser to try to overwrite |
| 6826 |
existing errors and crashing in the process. Patch by Pablo Galindo |
| 6827 |
|
| 6828 |
- gh-113486: No longer issue spurious ``PY_UNWIND`` events for optimized |
| 6829 |
calls to classes. |
| 6830 |
|
| 6831 |
- gh-113297: Fix segfault in the compiler on with statement with 19 context |
| 6832 |
managers. |
| 6833 |
|
| 6834 |
- gh-113212: Improve :py:class:`super` error messages. |
| 6835 |
|
| 6836 |
- gh-111375: Only use ``NULL`` in the exception stack to indicate an |
| 6837 |
exception was handled. Patch by Carey Metcalfe. |
| 6838 |
|
| 6839 |
- gh-112215: Increase the C recursion limit by a factor of 3 for non-debug |
| 6840 |
builds, except for webassembly and s390 platforms which are unchanged. |
| 6841 |
This mitigates some regressions in 3.12 with deep recursion mixing builtin |
| 6842 |
(C) and Python code. |
| 6843 |
|
| 6844 |
- gh-113054: Fixed bug where a redundant NOP is not removed, causing an |
| 6845 |
assertion to fail in the compiler in debug mode. |
| 6846 |
|
| 6847 |
- gh-106905: Use per AST-parser state rather than global state to track |
| 6848 |
recursion depth within the AST parser to prevent potential race condition |
| 6849 |
due to simultaneous parsing. |
| 6850 |
|
| 6851 |
The issue primarily showed up in 3.11 by multithreaded users of |
| 6852 |
:func:`ast.parse`. In 3.12 a change to when garbage collection can be |
| 6853 |
triggered prevented the race condition from occurring. |
| 6854 |
|
| 6855 |
- gh-108866: Change the API and contract of ``_PyExecutorObject`` to return |
| 6856 |
the next_instr pointer, instead of the frame, and to always execute at |
| 6857 |
least one instruction. |
| 6858 |
|
| 6859 |
- gh-90350: Optimize builtin functions :func:`min` and :func:`max`. |
| 6860 |
|
| 6861 |
- gh-112943: Correctly compute end column offsets for multiline tokens in |
| 6862 |
the :mod:`tokenize` module. Patch by Pablo Galindo |
| 6863 |
|
| 6864 |
- gh-112125: Fix ``None.__ne__(None)`` returning ``NotImplemented`` instead |
| 6865 |
of ``False``. |
| 6866 |
|
| 6867 |
- gh-74616: :func:`input` now raises a ValueError when output on the |
| 6868 |
terminal if the prompt contains embedded null characters instead of |
| 6869 |
silently truncating it. |
| 6870 |
|
| 6871 |
- gh-112716: Fix SystemError in the ``import`` statement and in |
| 6872 |
``__reduce__()`` methods of builtin types when ``__builtins__`` is not a |
| 6873 |
dict. |
| 6874 |
|
| 6875 |
- gh-112730: Use color to highlight error locations in tracebacks. Patch by |
| 6876 |
Pablo Galindo |
| 6877 |
|
| 6878 |
- gh-112625: Fixes a bug where a bytearray object could be cleared while |
| 6879 |
iterating over an argument in the ``bytearray.join()`` method that could |
| 6880 |
result in reading memory after it was freed. |
| 6881 |
|
| 6882 |
- gh-112660: Do not clear unexpected errors during formatting error messages |
| 6883 |
for ImportError and AttributeError for modules. |
| 6884 |
|
| 6885 |
- gh-105967: Workaround a bug in Apple's macOS platform zlib library where |
| 6886 |
:func:`zlib.crc32` and :func:`binascii.crc32` could produce incorrect |
| 6887 |
results on multi-gigabyte inputs. Including when using :mod:`zipfile` on |
| 6888 |
zips containing large data. |
| 6889 |
|
| 6890 |
- gh-95754: Provide a better error message when accessing invalid attributes |
| 6891 |
on partially initialized modules. The origin of the module being accessed |
| 6892 |
is now included in the message to help with the common issue of shadowing |
| 6893 |
other modules. |
| 6894 |
|
| 6895 |
- gh-112217: Add check for the type of ``__cause__`` returned from calling |
| 6896 |
the type ``T`` in ``raise from T``. |
| 6897 |
|
| 6898 |
- gh-111058: Change coro.cr_frame/gen.gi_frame to return ``None`` after the |
| 6899 |
coroutine/generator has been closed. This fixes a bug where |
| 6900 |
:func:`~inspect.getcoroutinestate` and :func:`~inspect.getgeneratorstate` |
| 6901 |
return the wrong state for a closed coroutine/generator. |
| 6902 |
|
| 6903 |
- gh-112388: Fix an error that was causing the parser to try to overwrite |
| 6904 |
tokenizer errors. Patch by pablo Galindo |
| 6905 |
|
| 6906 |
- gh-112387: Fix error positions for decoded strings with backwards tokenize |
| 6907 |
errors. Patch by Pablo Galindo |
| 6908 |
|
| 6909 |
- gh-99606: Make code generated for an empty f-string identical to the code |
| 6910 |
of an empty normal string. |
| 6911 |
|
| 6912 |
- gh-112367: Avoid undefined behaviour when using the perf trampolines by |
| 6913 |
not freeing the code arenas until shutdown. Patch by Pablo Galindo |
| 6914 |
|
| 6915 |
- gh-112320: The Tier 2 translator now tracks the confidence level for |
| 6916 |
staying "on trace" (i.e. not exiting back to the Tier 1 interpreter) for |
| 6917 |
branch instructions based on the number of bits set in the branch |
| 6918 |
"counter". Trace translation ends when the confidence drops below 1/3rd. |
| 6919 |
|
| 6920 |
- gh-109598: |
| 6921 |
:c:func:`PyComplex_RealAsDouble`/:c:func:`PyComplex_ImagAsDouble` now |
| 6922 |
tries to convert an object to a :class:`complex` instance using its |
| 6923 |
``__complex__()`` method before falling back to the ``__float__()`` |
| 6924 |
method. Patch by Sergey B Kirpichev. |
| 6925 |
|
| 6926 |
- gh-94606: Fix UnicodeEncodeError when :func:`email.message.get_payload` |
| 6927 |
reads a message with a Unicode surrogate character and the message content |
| 6928 |
is not well-formed for surrogateescape encoding. Patch by Sidney |
| 6929 |
Markowitz. |
| 6930 |
|
| 6931 |
- bpo-21861: Use the object's actual class name in |
| 6932 |
:meth:`!_io.FileIO.__repr__`, :meth:`!_io._WindowsConsoleIO` and |
| 6933 |
:meth:`!_io.TextIOWrapper.__repr__`, to make these methods subclass |
| 6934 |
friendly. |
| 6935 |
|
| 6936 |
- bpo-45369: Remove LibreSSL workarounds as per :pep:`644`. |
| 6937 |
|
| 6938 |
- bpo-34392: Added :func:`sys._is_interned`. |
| 6939 |
|
| 6940 |
Library |
| 6941 |
------- |
| 6942 |
|
| 6943 |
- gh-114077: Fix possible :exc:`OverflowError` in |
| 6944 |
:meth:`socket.socket.sendfile` when pass *count* larger than 2 GiB on |
| 6945 |
32-bit platform. |
| 6946 |
|
| 6947 |
- gh-111803: :mod:`plistlib` now supports loading more deeply nested lists |
| 6948 |
in binary format. |
| 6949 |
|
| 6950 |
- gh-114014: Fixed a bug in :class:`fractions.Fraction` where an invalid |
| 6951 |
string using ``d`` in the decimals part creates a different error compared |
| 6952 |
to other invalid letters/characters. Patch by Jeremiah Gabriel Pascual. |
| 6953 |
|
| 6954 |
- gh-108364: :meth:`sqlite3.Connection.iterdump` now ensures that foreign |
| 6955 |
key support is disabled before dumping the database schema, if there is |
| 6956 |
any foreign key violation. Patch by Erlend E. Aasland and Mariusz |
| 6957 |
Felisiak. |
| 6958 |
|
| 6959 |
- gh-113971: The :class:`zipfile.ZipInfo` previously protected |
| 6960 |
``._compresslevel`` attribute has been made public as ``.compress_level`` |
| 6961 |
with the old ``_compresslevel`` name remaining available as a property to |
| 6962 |
retain compatibility. |
| 6963 |
|
| 6964 |
- gh-113877: Fix :mod:`tkinter` method ``winfo_pathname()`` on 64-bit |
| 6965 |
Windows. |
| 6966 |
|
| 6967 |
- gh-113868: Added :data:`mmap.MAP_NORESERVE`, :data:`mmap.MAP_NOEXTEND`, |
| 6968 |
:data:`mmap.MAP_HASSEMAPHORE`, :data:`mmap.MAP_NOCACHE`, |
| 6969 |
:data:`mmap.MAP_JIT`, :data:`mmap.MAP_RESILIENT_CODESIGN`, |
| 6970 |
:data:`mmap.MAP_RESILIENT_MEDIA`, :data:`mmap.MAP_32BIT`, |
| 6971 |
:data:`mmap.MAP_TRANSLATED_ALLOW_EXECUTE`, :data:`mmap.MAP_UNIX03` and |
| 6972 |
:data:`mmap.MAP_TPRO`. All of them are ``mmap(2)`` flags on macOS. |
| 6973 |
|
| 6974 |
- gh-113848: :func:`asyncio.TaskGroup` and :func:`asyncio.timeout` context |
| 6975 |
managers now handle :exc:`~asyncio.CancelledError` subclasses as well as |
| 6976 |
exact :exc:`!CancelledError`. |
| 6977 |
|
| 6978 |
- gh-113661: unittest runner: Don't exit 5 if tests were skipped. The |
| 6979 |
intention of exiting 5 was to detect issues where the test suite wasn't |
| 6980 |
discovered at all. If we skipped tests, it was correctly discovered. |
| 6981 |
|
| 6982 |
- gh-96037: Insert :exc:`TimeoutError` in the context of the exception that |
| 6983 |
was raised during exiting an expired :func:`asyncio.timeout` block. |
| 6984 |
|
| 6985 |
- gh-113781: Silence unraisable AttributeError when warnings are emitted |
| 6986 |
during Python finalization. |
| 6987 |
|
| 6988 |
- gh-113238: Add ``Anchor`` to ``importlib.resources`` (in order for the |
| 6989 |
code to comply with the documentation) |
| 6990 |
|
| 6991 |
- gh-111693: :func:`asyncio.Condition.wait` now re-raises the same |
| 6992 |
:exc:`CancelledError` instance that may have caused it to be interrupted. |
| 6993 |
Fixed race condition in :func:`asyncio.Semaphore.acquire` when interrupted |
| 6994 |
with a :exc:`CancelledError`. |
| 6995 |
|
| 6996 |
- gh-113791: Add ``CLOCK_MONOTONIC_RAW_APPROX`` and |
| 6997 |
``CLOCK_UPTIME_RAW_APPROX`` to :mod:`time` on macOS. These are clocks |
| 6998 |
available on macOS 10.12 or later. |
| 6999 |
|
| 7000 |
- gh-112932: Restore the ability for :mod:`zipfile` to ``extractall`` from |
| 7001 |
zip files with a "/" directory entry in them as is commonly added to zips |
| 7002 |
by some wiki or bug tracker data exporters. |
| 7003 |
|
| 7004 |
- gh-113568: Raise deprecation warnings from :class:`pathlib.PurePath` and |
| 7005 |
not its private base class ``PurePathBase``. |
| 7006 |
|
| 7007 |
- gh-113594: Fix :exc:`UnicodeEncodeError` in :mod:`email` when re-fold |
| 7008 |
lines that contain unknown-8bit encoded part followed by non-unknown-8bit |
| 7009 |
encoded part. |
| 7010 |
|
| 7011 |
- gh-113538: In :meth:`asyncio.StreamReaderProtocol.connection_made`, there |
| 7012 |
is callback that logs an error if the task wrapping the "connected |
| 7013 |
callback" fails. This callback would itself fail if the task was |
| 7014 |
cancelled. Prevent this by checking whether the task was cancelled first. |
| 7015 |
If so, close the transport but don't log an error. |
| 7016 |
|
| 7017 |
- gh-113626: Add support for the *allow_code* argument in the :mod:`marshal` |
| 7018 |
module. Passing ``allow_code=False`` prevents serialization and |
| 7019 |
de-serialization of code objects which is incompatible between Python |
| 7020 |
versions. |
| 7021 |
|
| 7022 |
- gh-85567: Fix resource warnings for unclosed files in :mod:`pickle` and |
| 7023 |
:mod:`pickletools` command line interfaces. |
| 7024 |
|
| 7025 |
- gh-113537: Support loads ``str`` in :func:`plistlib.loads`. |
| 7026 |
|
| 7027 |
- gh-89850: Add default implementations of |
| 7028 |
:meth:`pickle.Pickler.persistent_id` and |
| 7029 |
:meth:`pickle.Unpickler.persistent_load` methods in the C implementation. |
| 7030 |
Calling ``super().persistent_id()`` and ``super().persistent_load()`` in |
| 7031 |
subclasses of the C implementation of :class:`pickle.Pickler` and |
| 7032 |
:class:`pickle.Unpickler` classes no longer causes infinite recursion. |
| 7033 |
|
| 7034 |
- gh-113569: Indicate if there were no actual calls in unittest |
| 7035 |
:meth:`~unittest.mock.Mock.assert_has_calls` failure. |
| 7036 |
|
| 7037 |
- gh-101225: Increase the backlog for |
| 7038 |
:class:`multiprocessing.connection.Listener` objects created by |
| 7039 |
:mod:`multiprocessing.manager` and :mod:`multiprocessing.resource_sharer` |
| 7040 |
to significantly reduce the risk of getting a connection refused error |
| 7041 |
when creating a :class:`multiprocessing.connection.Connection` to them. |
| 7042 |
|
| 7043 |
- gh-113568: Raise audit events from :class:`pathlib.Path` and not its |
| 7044 |
private base class ``PathBase``. |
| 7045 |
|
| 7046 |
- gh-113543: Make sure that ``webbrowser.MacOSXOSAScript`` sends |
| 7047 |
``webbrowser.open`` audit event. |
| 7048 |
|
| 7049 |
- gh-113028: When a second reference to a string appears in the input to |
| 7050 |
:mod:`pickle`, and the Python implementation is in use, we are guaranteed |
| 7051 |
that a single copy gets pickled and a single object is shared when |
| 7052 |
reloaded. Previously, in protocol 0, when a string contained certain |
| 7053 |
characters (e.g. newline) it resulted in duplicate objects. |
| 7054 |
|
| 7055 |
- gh-113421: Fix multiprocessing logger for ``%(filename)s``. |
| 7056 |
|
| 7057 |
- gh-111784: Fix segfaults in the ``_elementtree`` module. Fix first |
| 7058 |
segfault during deallocation of ``_elementtree.XMLParser`` instances by |
| 7059 |
keeping strong reference to ``pyexpat`` module in module state for capsule |
| 7060 |
lifetime. Fix second segfault which happens in the same deallocation |
| 7061 |
process by keeping strong reference to ``_elementtree`` module in |
| 7062 |
``XMLParser`` structure for ``_elementtree`` module lifetime. |
| 7063 |
|
| 7064 |
- gh-113407: Fix import of :mod:`unittest.mock` when CPython is built |
| 7065 |
without docstrings. |
| 7066 |
|
| 7067 |
- gh-113320: Fix regression in Python 3.12 where :class:`~typing.Protocol` |
| 7068 |
classes that were not marked as :func:`runtime-checkable |
| 7069 |
<typing.runtime_checkable>` would be unnecessarily introspected, |
| 7070 |
potentially causing exceptions to be raised if the protocol had |
| 7071 |
problematic members. Patch by Alex Waygood. |
| 7072 |
|
| 7073 |
- gh-53502: Add a new option ``aware_datetime`` in :mod:`plistlib` to loads |
| 7074 |
or dumps aware datetime. |
| 7075 |
|
| 7076 |
- gh-113358: Fix rendering tracebacks with exceptions with a broken |
| 7077 |
__getattr__ |
| 7078 |
|
| 7079 |
- gh-113214: Fix an ``AttributeError`` during asyncio SSL protocol aborts in |
| 7080 |
SSL-over-SSL scenarios. |
| 7081 |
|
| 7082 |
- gh-113246: Update bundled pip to 23.3.2. |
| 7083 |
|
| 7084 |
- gh-87264: Fixed tarfile list() method to show file type. |
| 7085 |
|
| 7086 |
- gh-112182: :meth:`asyncio.futures.Future.set_exception` now transforms |
| 7087 |
:exc:`StopIteration` into :exc:`RuntimeError` instead of hanging or other |
| 7088 |
misbehavior. Patch contributed by Jamie Phan. |
| 7089 |
|
| 7090 |
- gh-113225: Speed up :meth:`pathlib.Path.glob` by using |
| 7091 |
:attr:`os.DirEntry.path` where possible. |
| 7092 |
|
| 7093 |
- gh-113149: Improve error message when a JSON array or object contains a |
| 7094 |
trailing comma. Patch by Carson Radtke. |
| 7095 |
|
| 7096 |
- gh-113117: The :mod:`subprocess` module can now use the |
| 7097 |
:func:`os.posix_spawn` function with ``close_fds=True`` on platforms where |
| 7098 |
``posix_spawn_file_actions_addclosefrom_np`` is available. Patch by Jakub |
| 7099 |
Kulik. |
| 7100 |
|
| 7101 |
- gh-113199: Make ``http.client.HTTPResponse.read1`` and |
| 7102 |
``http.client.HTTPResponse.readline`` close IO after reading all data when |
| 7103 |
content length is known. Patch by Illia Volochii. |
| 7104 |
|
| 7105 |
- gh-113191: Add support of :func:`os.fchmod` and a file descriptor in |
| 7106 |
:func:`os.chmod` on Windows. |
| 7107 |
|
| 7108 |
- gh-113188: Fix :func:`shutil.copymode` and :func:`shutil.copystat` on |
| 7109 |
Windows. Previously they worked differently if *dst* is a symbolic link: |
| 7110 |
they modified the permission bits of *dst* itself rather than the file it |
| 7111 |
points to if *follow_symlinks* is true or *src* is not a symbolic link, |
| 7112 |
and did not modify the permission bits if *follow_symlinks* is false and |
| 7113 |
*src* is a symbolic link. |
| 7114 |
|
| 7115 |
- gh-113119: :func:`os.posix_spawn` now accepts ``env=None``, which makes |
| 7116 |
the newly spawned process use the current process environment. Patch by |
| 7117 |
Jakub Kulik. |
| 7118 |
|
| 7119 |
- gh-113202: Add a ``strict`` option to ``batched()`` in the ``itertools`` |
| 7120 |
module. |
| 7121 |
|
| 7122 |
- gh-61648: Detect line numbers of properties in doctests. |
| 7123 |
|
| 7124 |
- gh-113175: Sync with importlib_metadata 7.0, including improved type |
| 7125 |
annotations, fixed issue with symlinked packages in |
| 7126 |
``package_distributions``, added ``EntryPoints.__repr__``, introduced the |
| 7127 |
``diagnose`` script, added ``Distribution.origin`` property, and removed |
| 7128 |
deprecated ``EntryPoint`` access by numeric index (tuple behavior). |
| 7129 |
|
| 7130 |
- gh-59616: Add support of :func:`os.lchmod` and the *follow_symlinks* |
| 7131 |
argument in :func:`os.chmod` on Windows. Note that the default value of |
| 7132 |
*follow_symlinks* in :func:`!os.lchmod` is ``False`` on Windows. |
| 7133 |
|
| 7134 |
- gh-112559: :func:`signal.signal` and :func:`signal.getsignal` no longer |
| 7135 |
call ``repr`` on callable handlers. :func:`asyncio.run` and |
| 7136 |
:meth:`asyncio.Runner.run` no longer call ``repr`` on the task results. |
| 7137 |
Patch by Yilei Yang. |
| 7138 |
|
| 7139 |
- gh-112962: :mod:`dis` module functions add cache information to the |
| 7140 |
:class:`~dis.Instruction` instance rather than creating fake |
| 7141 |
:class:`~dis.Instruction` instances to represent the cache entries. |
| 7142 |
|
| 7143 |
- gh-112989: Reduce overhead to connect sockets with :mod:`asyncio` |
| 7144 |
SelectorEventLoop. |
| 7145 |
|
| 7146 |
- gh-112970: Use :c:func:`!closefrom` on Linux where available (e.g. |
| 7147 |
glibc-2.34), rather than only FreeBSD. |
| 7148 |
|
| 7149 |
- gh-110190: Fix ctypes structs with array on PPC64LE platform by setting |
| 7150 |
``MAX_STRUCT_SIZE`` to 64 in stgdict. Patch by Diego Russo. |
| 7151 |
|
| 7152 |
- gh-112540: The statistics.geometric_mean() function now returns zero for |
| 7153 |
datasets containing a zero. Formerly, it would raise an exception. |
| 7154 |
|
| 7155 |
- gh-87286: Added :const:`LOG_FTP`, :const:`LOG_NETINFO`, |
| 7156 |
:const:`LOG_REMOTEAUTH`, :const:`LOG_INSTALL`, :const:`LOG_RAS`, and |
| 7157 |
:const:`LOG_LAUNCHD` tot the :mod:`syslog` module, all of them constants |
| 7158 |
on used on macOS. |
| 7159 |
|
| 7160 |
- gh-112800: Fix :mod:`asyncio` ``SubprocessTransport.close()`` not to throw |
| 7161 |
``PermissionError`` when used with setuid executables. |
| 7162 |
|
| 7163 |
- gh-51944: Add the following constants to the :mod:`termios` module. These |
| 7164 |
values are present in macOS system headers: ``ALTWERASE``, ``B14400``, |
| 7165 |
``B28800``, ``B7200``, ``B76800``, ``CCAR_OFLOW``, ``CCTS_OFLOW``, |
| 7166 |
``CDSR_OFLOW``, ``CDTR_IFLOW``, ``CIGNORE``, ``CRTS_IFLOW``, ``EXTPROC``, |
| 7167 |
``IUTF8``, ``MDMBUF``, ``NL2``, ``NL3``, ``NOKERNINFO``, ``ONOEOT``, |
| 7168 |
``OXTABS``, ``VDSUSP``, ``VSTATUS``. |
| 7169 |
|
| 7170 |
- gh-79325: Fix an infinite recursion error in |
| 7171 |
:func:`tempfile.TemporaryDirectory` cleanup on Windows. |
| 7172 |
|
| 7173 |
- gh-94692: :func:`shutil.rmtree` now only catches OSError exceptions. |
| 7174 |
Previously a symlink attack resistant version of ``shutil.rmtree()`` could |
| 7175 |
ignore or pass to the error handler arbitrary exception when invalid |
| 7176 |
arguments were provided. |
| 7177 |
|
| 7178 |
- gh-112736: The use of del-safe symbols in ``subprocess`` was refactored to |
| 7179 |
allow for use in cross-platform build environments. |
| 7180 |
|
| 7181 |
- gh-112727: Speed up :meth:`pathlib.Path.absolute`. Patch by Barney Gale. |
| 7182 |
|
| 7183 |
- gh-74690: Speedup :func:`issubclass` checks against simple |
| 7184 |
:func:`runtime-checkable protocols <typing.runtime_checkable>` by around |
| 7185 |
6%. Patch by Alex Waygood. |
| 7186 |
|
| 7187 |
- gh-74690: Speedup :func:`isinstance` checks by roughly 20% for |
| 7188 |
:func:`runtime-checkable protocols <typing.runtime_checkable>` that only |
| 7189 |
have one callable member. Speedup :func:`issubclass` checks for these |
| 7190 |
protocols by roughly 10%. Patch by Alex Waygood. |
| 7191 |
|
| 7192 |
- gh-112645: Remove deprecation error on passing ``onerror`` to |
| 7193 |
:func:`shutil.rmtree`. |
| 7194 |
|
| 7195 |
- gh-112640: Add ``kwdefaults`` parameter to :data:`types.FunctionType` to |
| 7196 |
set default keyword argument values. |
| 7197 |
|
| 7198 |
- gh-112622: Ensure ``name`` parameter is passed to event loop in |
| 7199 |
:func:`asyncio.create_task`. |
| 7200 |
|
| 7201 |
- gh-112618: Fix a caching bug relating to :data:`typing.Annotated`. |
| 7202 |
``Annotated[str, True]`` is no longer identical to ``Annotated[str, 1]``. |
| 7203 |
|
| 7204 |
- gh-112334: Fixed a performance regression in 3.12's :mod:`subprocess` on |
| 7205 |
Linux where it would no longer use the fast-path ``vfork()`` system call |
| 7206 |
when it could have due to a logic bug, instead falling back to the safe |
| 7207 |
but slower ``fork()``. |
| 7208 |
|
| 7209 |
Also fixed a second 3.12.0 potential security bug. If a value of |
| 7210 |
``extra_groups=[]`` was passed to :mod:`subprocess.Popen` or related APIs, |
| 7211 |
the underlying ``setgroups(0, NULL)`` system call to clear the groups list |
| 7212 |
would not be made in the child process prior to ``exec()``. |
| 7213 |
|
| 7214 |
This was identified via code inspection in the process of fixing the first |
| 7215 |
bug. |
| 7216 |
|
| 7217 |
- gh-110190: Fix ctypes structs with array on Arm platform by setting |
| 7218 |
``MAX_STRUCT_SIZE`` to 32 in stgdict. Patch by Diego Russo. |
| 7219 |
|
| 7220 |
- gh-81194: Fix a crash in :func:`socket.if_indextoname` with specific value |
| 7221 |
(UINT_MAX). Fix an integer overflow in :func:`socket.if_indextoname` on |
| 7222 |
64-bit non-Windows platforms. |
| 7223 |
|
| 7224 |
- gh-112578: Fix a spurious :exc:`RuntimeWarning` when executing the |
| 7225 |
:mod:`zipfile` module. |
| 7226 |
|
| 7227 |
- gh-112516: Update the bundled copy of pip to version 23.3.1. |
| 7228 |
|
| 7229 |
- gh-112510: Add :data:`readline.backend` for the backend readline uses |
| 7230 |
(``editline`` or ``readline``) |
| 7231 |
|
| 7232 |
- gh-112328: [Enum] Make ``EnumDict``, ``EnumDict.member_names``, |
| 7233 |
``EnumType._add_alias_`` and ``EnumType._add_value_alias_`` public. |
| 7234 |
|
| 7235 |
- gh-112509: Fix edge cases that could cause a key to be present in both the |
| 7236 |
``__required_keys__`` and ``__optional_keys__`` attributes of a |
| 7237 |
:class:`typing.TypedDict`. Patch by Jelle Zijlstra. |
| 7238 |
|
| 7239 |
- gh-101336: Add ``keep_alive`` keyword parameter for |
| 7240 |
:meth:`AbstractEventLoop.create_server` and |
| 7241 |
:meth:`BaseEventLoop.create_server`. |
| 7242 |
|
| 7243 |
- gh-63284: Added support for TLS-PSK (pre-shared key) mode to the |
| 7244 |
:mod:`ssl` module. |
| 7245 |
|
| 7246 |
- gh-112414: Fix regression in Python 3.12 where calling :func:`repr` on a |
| 7247 |
module that had been imported using a custom :term:`loader` could fail |
| 7248 |
with :exc:`AttributeError`. Patch by Alex Waygood. |
| 7249 |
|
| 7250 |
- gh-112358: Revert change to :class:`struct.Struct` initialization that |
| 7251 |
broke some cases of subclassing. |
| 7252 |
|
| 7253 |
- gh-112405: Optimize :meth:`pathlib.PurePath.relative_to`. Patch by Alex |
| 7254 |
Waygood. |
| 7255 |
|
| 7256 |
- gh-94722: Fix bug where comparison between instances of |
| 7257 |
:class:`~doctest.DocTest` fails if one of them has ``None`` as its lineno. |
| 7258 |
|
| 7259 |
- gh-112361: Speed up a small handful of :mod:`pathlib` methods by removing |
| 7260 |
some temporary objects. |
| 7261 |
|
| 7262 |
- gh-112345: Improve error message when trying to call :func:`issubclass` |
| 7263 |
against a :class:`typing.Protocol` that has non-method members. Patch by |
| 7264 |
Randolf Scholz. |
| 7265 |
|
| 7266 |
- gh-112137: Change :mod:`dis` output to display no-lineno as "--" instead |
| 7267 |
of "None". |
| 7268 |
|
| 7269 |
- gh-112332: Deprecate the ``exc_type`` field of |
| 7270 |
:class:`traceback.TracebackException`. Add ``exc_type_str`` to replace it. |
| 7271 |
|
| 7272 |
- gh-81620: Add extra tests for :func:`random.binomialvariate` |
| 7273 |
|
| 7274 |
- gh-112292: Fix a crash in :mod:`readline` when imported from a sub |
| 7275 |
interpreter. Patch by Anthony Shaw |
| 7276 |
|
| 7277 |
- gh-77621: Slightly improve the import time of the :mod:`pathlib` module by |
| 7278 |
deferring some imports. Patch by Barney Gale. |
| 7279 |
|
| 7280 |
- gh-112137: Change :mod:`dis` output to display logical labels for jump |
| 7281 |
targets instead of offsets. |
| 7282 |
|
| 7283 |
- gh-112139: Add :meth:`Signature.format` to format signatures to string |
| 7284 |
with extra options. And use it in :mod:`pydoc` to render more readable |
| 7285 |
signatures that have new lines between parameters. |
| 7286 |
|
| 7287 |
- gh-112105: Make :func:`readline.set_completer_delims` work with libedit |
| 7288 |
|
| 7289 |
- gh-106922: Display multiple lines with ``traceback`` when errors span |
| 7290 |
multiple lines. |
| 7291 |
|
| 7292 |
- gh-111874: When creating a :class:`typing.NamedTuple` class, ensure |
| 7293 |
:func:`~object.__set_name__` is called on all objects that define |
| 7294 |
``__set_name__`` and exist in the values of the ``NamedTuple`` class's |
| 7295 |
class dictionary. Patch by Alex Waygood. |
| 7296 |
|
| 7297 |
- gh-68166: Add support of the "vsapi" element type in |
| 7298 |
:meth:`tkinter.ttk.Style.element_create`. |
| 7299 |
|
| 7300 |
- gh-110275: Named tuple's methods ``_replace()`` and ``__replace__()`` now |
| 7301 |
raise TypeError instead of ValueError for invalid keyword arguments. |
| 7302 |
|
| 7303 |
- gh-99367: Do not mangle ``sys.path[0]`` in :mod:`pdb` if safe_path is set |
| 7304 |
|
| 7305 |
- gh-111615: Fix a regression caused by a fix to gh-93162 whereby you |
| 7306 |
couldn't configure a :class:`QueueHandler` without specifying handlers. |
| 7307 |
|
| 7308 |
- gh-75666: Fix the behavior of :mod:`tkinter` widget's ``unbind()`` method |
| 7309 |
with two arguments. Previously, ``widget.unbind(sequence, funcid)`` |
| 7310 |
destroyed the current binding for *sequence*, leaving *sequence* unbound, |
| 7311 |
and deleted the *funcid* command. Now it removes only *funcid* from the |
| 7312 |
binding for *sequence*, keeping other commands, and deletes the *funcid* |
| 7313 |
command. It leaves *sequence* unbound only if *funcid* was the last bound |
| 7314 |
command. |
| 7315 |
|
| 7316 |
- gh-67790: Implement basic formatting support (minimum width, alignment, |
| 7317 |
fill) for :class:`fractions.Fraction`. |
| 7318 |
|
| 7319 |
- gh-111049: Fix crash during garbage collection of the :class:`io.BytesIO` |
| 7320 |
buffer object. |
| 7321 |
|
| 7322 |
- gh-102980: Redirect the output of ``interact`` command of :mod:`pdb` to |
| 7323 |
the same channel as the debugger. Add tests and improve docs. |
| 7324 |
|
| 7325 |
- gh-102988: :func:`email.utils.getaddresses` and |
| 7326 |
:func:`email.utils.parseaddr` now return ``('', '')`` 2-tuples in more |
| 7327 |
situations where invalid email addresses are encountered instead of |
| 7328 |
potentially inaccurate values. Add optional *strict* parameter to these |
| 7329 |
two functions: use ``strict=False`` to get the old behavior, accept |
| 7330 |
malformed inputs. ``getattr(email.utils, 'supports_strict_parsing', |
| 7331 |
False)`` can be use to check if the *strict* parameter is available. Patch |
| 7332 |
by Thomas Dwyer and Victor Stinner to improve the :cve:`2023-27043` fix. |
| 7333 |
|
| 7334 |
- gh-52161: :meth:`cmd.Cmd.do_help` now cleans docstrings with |
| 7335 |
:func:`inspect.cleandoc` before writing them. Patch by Filip Łapkiewicz. |
| 7336 |
|
| 7337 |
- gh-82300: Add ``track`` parameter to |
| 7338 |
:class:`multiprocessing.shared_memory.SharedMemory` that allows using |
| 7339 |
shared memory blocks without having to register with the POSIX resource |
| 7340 |
tracker that automatically releases them upon process exit. |
| 7341 |
|
| 7342 |
- gh-110109: Add private ``pathlib._PurePathBase`` class: a base class for |
| 7343 |
:class:`pathlib.PurePath` that omits certain magic methods. It may be made |
| 7344 |
public (along with ``_PathBase``) in future. |
| 7345 |
|
| 7346 |
- gh-109858: Protect :mod:`zipfile` from "quoted-overlap" zipbomb. It now |
| 7347 |
raises BadZipFile when try to read an entry that overlaps with other entry |
| 7348 |
or central directory. |
| 7349 |
|
| 7350 |
- gh-109786: Fix possible reference leaks and crash when re-enter the |
| 7351 |
``__next__()`` method of :class:`itertools.pairwise`. |
| 7352 |
|
| 7353 |
- gh-91539: Small (10 - 20%) and trivial performance improvement of |
| 7354 |
:func:`urllib.request.getproxies_environment`, typically useful when there |
| 7355 |
are many environment variables to go over. |
| 7356 |
|
| 7357 |
- gh-103363: Add *follow_symlinks* keyword-only argument to |
| 7358 |
:meth:`pathlib.Path.owner` and :meth:`~pathlib.Path.group`, defaulting to |
| 7359 |
``True``. |
| 7360 |
|
| 7361 |
- gh-102130: Support tab completion in :mod:`cmd` for ``editline``. |
| 7362 |
|
| 7363 |
- gh-99437: :func:`runpy.run_path` now decodes path-like objects, making |
| 7364 |
sure __file__ and sys.argv[0] of the module being run are always strings. |
| 7365 |
|
| 7366 |
- gh-104003: Add :func:`warnings.deprecated`, a decorator to mark deprecated |
| 7367 |
functions to static type checkers and to warn on usage of deprecated |
| 7368 |
classes and functions. See :pep:`702`. Patch by Jelle Zijlstra. |
| 7369 |
|
| 7370 |
- gh-103708: Make hardcoded python name, a configurable parameter so that |
| 7371 |
different implementations of python can override it instead of making huge |
| 7372 |
diffs in sysconfig.py |
| 7373 |
|
| 7374 |
- gh-66515: :class:`mailbox.MH` now supports folders that do not contain a |
| 7375 |
``.mh_sequences`` file (e.g. Claws Mail IMAP-cache folders). Patch by |
| 7376 |
Serhiy Storchaka. |
| 7377 |
|
| 7378 |
- gh-83162: Renamed :exc:`!re.error` to :exc:`PatternError` for clarity, and |
| 7379 |
kept :exc:`!re.error` for backward compatibility. Patch by Matthias |
| 7380 |
Bussonnier and Adam Chhina. |
| 7381 |
|
| 7382 |
- gh-91133: Fix a bug in :class:`tempfile.TemporaryDirectory` cleanup, which |
| 7383 |
now no longer dereferences symlinks when working around file system |
| 7384 |
permission errors. |
| 7385 |
|
| 7386 |
- bpo-43153: On Windows, ``tempfile.TemporaryDirectory`` previously masked a |
| 7387 |
``PermissionError`` with ``NotADirectoryError`` during directory cleanup. |
| 7388 |
It now correctly raises ``PermissionError`` if errors are not ignored. |
| 7389 |
Patch by Andrei Kulakov and Ken Jin. |
| 7390 |
|
| 7391 |
- bpo-32731: :func:`getpass.getuser` now raises :exc:`OSError` for all |
| 7392 |
failures rather than :exc:`ImportError` on systems lacking the :mod:`pwd` |
| 7393 |
module or :exc:`KeyError` if the password database is empty. |
| 7394 |
|
| 7395 |
- bpo-34321: :class:`mmap.mmap` now has a *trackfd* parameter on Unix; if it |
| 7396 |
is ``False``, the file descriptor specified by *fileno* will not be |
| 7397 |
duplicated. |
| 7398 |
|
| 7399 |
- bpo-35332: The :func:`shutil.rmtree` function now ignores errors when |
| 7400 |
calling :func:`os.close` when *ignore_errors* is ``True``, and |
| 7401 |
:func:`os.close` no longer retried after error. |
| 7402 |
|
| 7403 |
- bpo-35928: :class:`io.TextIOWrapper` now correctly handles the decoding |
| 7404 |
buffer after ``read()`` and ``write()``. |
| 7405 |
|
| 7406 |
- bpo-26791: :func:`shutil.move` now moves a symlink into a directory when |
| 7407 |
that directory is the target of the symlink. This provides the same |
| 7408 |
behavior as the mv shell command. The previous behavior raised an |
| 7409 |
exception. Patch by Jeffrey Kintscher. |
| 7410 |
|
| 7411 |
- bpo-41422: Fixed memory leaks of :class:`pickle.Pickler` and |
| 7412 |
:class:`pickle.Unpickler` involving cyclic references via the internal |
| 7413 |
memo mapping. |
| 7414 |
|
| 7415 |
- bpo-19821: The :func:`!pydoc.ispackage` function has been deprecated. |
| 7416 |
|
| 7417 |
- bpo-40262: The :meth:`ssl.SSLSocket.recv_into` method no longer requires |
| 7418 |
the *buffer* argument to implement ``__len__`` and supports buffers with |
| 7419 |
arbitrary item size. |
| 7420 |
|
| 7421 |
- bpo-39912: :func:`warnings.filterwarnings` and |
| 7422 |
:func:`warnings.simplefilter` now raise appropriate exceptions instead of |
| 7423 |
``AssertionError``. Patch contributed by Rémi Lapeyre. |
| 7424 |
|
| 7425 |
- bpo-37260: Fixed a race condition in :func:`shutil.rmtree` in which |
| 7426 |
directory entries removed by another process or thread while |
| 7427 |
``shutil.rmtree()`` is running can cause it to raise FileNotFoundError. |
| 7428 |
Patch by Jeffrey Kintscher. |
| 7429 |
|
| 7430 |
- bpo-36959: Fix some error messages for invalid ISO format string |
| 7431 |
combinations in ``strptime()`` that referred to directives not contained |
| 7432 |
in the format string. Patch by Gordon P. Hemsley. |
| 7433 |
|
| 7434 |
- bpo-18060: Fixed a class inheritance issue that can cause segfaults when |
| 7435 |
deriving two or more levels of subclasses from a base class of Structure |
| 7436 |
or Union. |
| 7437 |
|
| 7438 |
- bpo-29779: Add a new :envvar:`PYTHON_HISTORY` environment variable to set |
| 7439 |
the location of a ``.python_history`` file. |
| 7440 |
|
| 7441 |
- bpo-21360: :class:`mailbox.Maildir` now ignores files with a leading dot. |
| 7442 |
|
| 7443 |
Documentation |
| 7444 |
------------- |
| 7445 |
|
| 7446 |
- gh-111699: Relocate ``smtpd`` deprecation notice to its own section rather |
| 7447 |
than under ``locale`` in What's New in Python 3.12 document |
| 7448 |
|
| 7449 |
- gh-110746: Improved markup for valid options/values for methods |
| 7450 |
ttk.treeview.column and ttk.treeview.heading, and for Layouts. |
| 7451 |
|
| 7452 |
- gh-95649: Document that the :mod:`asyncio` module contains code taken from |
| 7453 |
`v0.16.0 of the uvloop project |
| 7454 |
<https://github.com/MagicStack/uvloop/tree/v0.16.0>`_, as well as the |
| 7455 |
required MIT licensing information. |
| 7456 |
|
| 7457 |
Tests |
| 7458 |
----- |
| 7459 |
|
| 7460 |
- gh-111798: Disable ``test_super_deep()`` from ``test_call`` under pydebug |
| 7461 |
builds on WASI; the stack depth is too small to make the test useful. |
| 7462 |
|
| 7463 |
- gh-111801: Lower the recursion limit in ``test_isinstance`` for |
| 7464 |
``test_infinitely_many_bases()``. This prevents a stack overflow on a |
| 7465 |
pydebug build of WASI. |
| 7466 |
|
| 7467 |
- gh-111802: Specify a low recursion depth for ``test_bad_getattr()`` in |
| 7468 |
``test.pickletester`` to avoid exhausting the stack under a pydebug build |
| 7469 |
for WASI. |
| 7470 |
|
| 7471 |
- gh-44626: Fix :func:`os.path.isabs` incorrectly returning ``True`` when |
| 7472 |
given a path that starts with exactly one (back)slash on Windows. |
| 7473 |
|
| 7474 |
Fix :meth:`pathlib.PureWindowsPath.is_absolute` incorrectly returning |
| 7475 |
``False`` for some paths beginning with two (back)slashes. |
| 7476 |
|
| 7477 |
- gh-113633: Use module state for the _testcapi extension module. |
| 7478 |
|
| 7479 |
- gh-109980: Fix ``test_tarfile_vs_tar`` in ``test_shutil`` for macOS, where |
| 7480 |
system tar can include more information in the archive than |
| 7481 |
:mod:`shutil.make_archive`. |
| 7482 |
|
| 7483 |
- gh-112769: The tests now correctly compare zlib version when |
| 7484 |
:const:`zlib.ZLIB_RUNTIME_VERSION` contains non-integer suffixes. For |
| 7485 |
example zlib-ng defines the version as ``1.3.0.zlib-ng``. |
| 7486 |
|
| 7487 |
- gh-112334: Adds a regression test to verify that ``vfork()`` is used when |
| 7488 |
expected by :mod:`subprocess` on vfork enabled POSIX systems (Linux). |
| 7489 |
|
| 7490 |
- gh-108927: Fixed order dependence in running tests in the same process |
| 7491 |
when a test that has submodules (e.g. test_importlib) follows a test that |
| 7492 |
imports its submodule (e.g. test_importlib.util) and precedes a test (e.g. |
| 7493 |
test_unittest or test_compileall) that uses that submodule. |
| 7494 |
|
| 7495 |
- bpo-40648: Test modes that file can get with chmod() on Windows. |
| 7496 |
|
| 7497 |
Build |
| 7498 |
----- |
| 7499 |
|
| 7500 |
- gh-114013: Fix ``Tools/wasm/wasi.py`` to not include the path to |
| 7501 |
``python.wasm`` as part of ``HOSTRUNNER``. The environment variable is |
| 7502 |
meant to specify how to run the WASI host only, having ``python.wasm`` and |
| 7503 |
relevant flags appended to the ``HOSTRUNNER``. This fixes ``make test`` |
| 7504 |
work. |
| 7505 |
|
| 7506 |
- gh-113258: Changed the Windows build to write out generated frozen modules |
| 7507 |
into the build tree instead of the source tree. |
| 7508 |
|
| 7509 |
- gh-112305: Fixed the ``check-clean-src`` step performed on out of tree |
| 7510 |
builds to detect errant ``$(srcdir)/Python/frozen_modules/*.h`` files and |
| 7511 |
recommend appropriate source tree cleanup steps to get a working build |
| 7512 |
again. |
| 7513 |
|
| 7514 |
- gh-112536: Add support for thread sanitizer (TSAN) |
| 7515 |
|
| 7516 |
- gh-112867: Fix the build for the case that WITH_PYMALLOC_RADIX_TREE=0 set. |
| 7517 |
|
| 7518 |
- gh-103065: Introduce ``Tools/wasm/wasi.py`` to simplify doing a WASI |
| 7519 |
build. |
| 7520 |
|
| 7521 |
- bpo-11102: The :func:`os.major`, :func:`os.makedev`, and :func:`os.minor` |
| 7522 |
functions are now available on HP-UX v3. |
| 7523 |
|
| 7524 |
- bpo-36351: Do not set ipv6type when cross-compiling. |
| 7525 |
|
| 7526 |
Windows |
| 7527 |
------- |
| 7528 |
|
| 7529 |
- gh-114096: Process privileges that are activated for creating directory |
| 7530 |
junctions are now restored afterwards, avoiding behaviour changes in other |
| 7531 |
parts of the program. |
| 7532 |
|
| 7533 |
- gh-111877: :func:`os.stat` calls were returning incorrect time values for |
| 7534 |
files that could not be accessed directly. |
| 7535 |
|
| 7536 |
- gh-111973: Update Windows installer to use SQLite 3.44.2. |
| 7537 |
|
| 7538 |
- gh-113009: :mod:`multiprocessing`: On Windows, fix a race condition in |
| 7539 |
``Process.terminate()``: no longer set the ``returncode`` attribute to |
| 7540 |
always call ``WaitForSingleObject()`` in ``Process.wait()``. Previously, |
| 7541 |
sometimes the process was still running after ``TerminateProcess()`` even |
| 7542 |
if ``GetExitCodeProcess()`` is not ``STILL_ACTIVE``. Patch by Victor |
| 7543 |
Stinner. |
| 7544 |
|
| 7545 |
- gh-86179: Fixes path calculations when launching Python on Windows through |
| 7546 |
a symlink. |
| 7547 |
|
| 7548 |
- gh-71383: Update Tcl/Tk in Windows installer to 8.6.13 with a patch to |
| 7549 |
suppress incorrect ThemeChanged warnings. |
| 7550 |
|
| 7551 |
- gh-111650: Ensures the ``Py_GIL_DISABLED`` preprocessor variable is |
| 7552 |
defined in :file:`pyconfig.h` so that extension modules written in C are |
| 7553 |
able to use it. |
| 7554 |
|
| 7555 |
- gh-112278: Reduce the time cost for some functions in :mod:`platform` on |
| 7556 |
Windows if current user has no permission to the WMI. |
| 7557 |
|
| 7558 |
- gh-73427: Deprecate :func:`sys._enablelegacywindowsfsencoding`. Use |
| 7559 |
:envvar:`PYTHONLEGACYWINDOWSFSENCODING` instead. Patch by Inada Naoki. |
| 7560 |
|
| 7561 |
- gh-87868: Correctly sort and remove duplicate environment variables in |
| 7562 |
:py:func:`!_winapi.CreateProcess`. |
| 7563 |
|
| 7564 |
- bpo-37308: Fix mojibake in :class:`mmap.mmap` when using a non-ASCII |
| 7565 |
*tagname* argument on Windows. |
| 7566 |
|
| 7567 |
macOS |
| 7568 |
----- |
| 7569 |
|
| 7570 |
- gh-113666: Add the following constants to module :mod:`stat`: |
| 7571 |
``UF_SETTABLE``, ``UF_TRACKED``, ``UF_DATAVAULT``, ``SF_SUPPORTED``, |
| 7572 |
``SF_SETTABLE``, ``SF_SYNTHETIC``, ``SF_RESTRICTED``, ``SF_FIRMLINK`` and |
| 7573 |
``SF_DATALESS``. The values ``UF_SETTABLE``, ``SF_SUPPORTED``, |
| 7574 |
``SF_SETTABLE`` and ``SF_SYNTHETIC`` are only available on macOS. |
| 7575 |
|
| 7576 |
- gh-113536: :func:`os.waitid` is now available on macOS |
| 7577 |
|
| 7578 |
- gh-110459: Running ``configure ... --with-openssl-rpath=X/Y/Z`` no longer |
| 7579 |
fails to detect OpenSSL on macOS. |
| 7580 |
|
| 7581 |
- gh-74573: Document that :mod:`dbm.ndbm` can silently corrupt DBM files on |
| 7582 |
updates when exceeding undocumented platform limits, and can crash |
| 7583 |
(segmentation fault) when reading such a corrupted file. (FB8919203) |
| 7584 |
|
| 7585 |
- gh-65701: The :program:`freeze` tool doesn't work with framework builds of |
| 7586 |
Python. Document this and bail out early when running the tool with such a |
| 7587 |
build. |
| 7588 |
|
| 7589 |
- gh-87277: webbrowser: Don't look for X11 browsers on macOS. Those are |
| 7590 |
generally not used and probing for them can result in starting XQuartz |
| 7591 |
even if it isn't used otherwise. |
| 7592 |
|
| 7593 |
- gh-111973: Update macOS installer to use SQLite 3.44.2. |
| 7594 |
|
| 7595 |
- gh-108269: Set ``CFBundleAllowMixedLocalizations`` to true in the |
| 7596 |
Info.plist for the framework, embedded Python.app and IDLE.app with |
| 7597 |
framework installs on macOS. This allows applications to pick up the |
| 7598 |
user's preferred locale when that's different from english. |
| 7599 |
|
| 7600 |
- gh-102362: Make sure the result of :func:`sysconfig.get_plaform` includes |
| 7601 |
at least a major and minor versions, even if ``MACOSX_DEPLOYMENT_TARGET`` |
| 7602 |
is set to only a major version during build to match the format expected |
| 7603 |
by pip. |
| 7604 |
|
| 7605 |
- gh-110017: Disable a signal handling stress test on macOS due to a bug in |
| 7606 |
macOS (FB13453490). |
| 7607 |
|
| 7608 |
- gh-110820: Make sure the preprocessor definitions for |
| 7609 |
``ALIGNOF_MAX_ALIGN_T``, ``SIZEOF_LONG_DOUBLE`` and |
| 7610 |
``HAVE_GCC_ASM_FOR_X64`` are correct for Universal 2 builds on macOS. |
| 7611 |
|
| 7612 |
- gh-109981: Use ``/dev/fd`` on macOS to determine the number of open files |
| 7613 |
in ``test.support.os_helper.fd_count`` to avoid a crash with "guarded" |
| 7614 |
file descriptors when probing for open files. |
| 7615 |
|
| 7616 |
IDLE |
| 7617 |
---- |
| 7618 |
|
| 7619 |
- gh-72284: Improve the lists of features, editor key bindings, and shell |
| 7620 |
key bingings in the IDLE doc. |
| 7621 |
|
| 7622 |
- gh-113903: Fix rare failure of test.test_idle, in test_configdialog. |
| 7623 |
|
| 7624 |
- gh-113729: Fix the "Help -> IDLE Doc" menu bug in 3.11.7 and 3.12.1. |
| 7625 |
|
| 7626 |
- gh-113269: Fix test_editor hang on macOS Catalina. |
| 7627 |
|
| 7628 |
- gh-112898: Fix processing unsaved files when quitting IDLE on macOS. |
| 7629 |
|
| 7630 |
- bpo-13586: Enter the selected text when opening the "Replace" dialog. |
| 7631 |
|
| 7632 |
C API |
| 7633 |
----- |
| 7634 |
|
| 7635 |
- gh-106560: Fix redundant declarations in the public C API. Declare |
| 7636 |
PyBool_Type, PyLong_Type and PySys_Audit() only once. Patch by Victor |
| 7637 |
Stinner. |
| 7638 |
|
| 7639 |
- gh-112438: Fix support of format units "es", "et", "es#", and "et#" in |
| 7640 |
nested tuples in :c:func:`PyArg_ParseTuple`-like functions. |
| 7641 |
|
| 7642 |
- gh-111545: Add :c:func:`Py_HashPointer` function to hash a pointer. Patch |
| 7643 |
by Victor Stinner. |
| 7644 |
|
| 7645 |
- gh-65210: Change the declaration of the *keywords* parameter of |
| 7646 |
:c:func:`PyArg_ParseTupleAndKeywords` and |
| 7647 |
:c:func:`PyArg_VaParseTupleAndKeywords` for better compatibility with C++. |
| 7648 |
|
| 7649 |
|
| 7650 |
What's New in Python 3.13.0 alpha 2? |
| 7651 |
==================================== |
| 7652 |
|
| 7653 |
*Release date: 2023-11-22* |
| 7654 |
|
| 7655 |
Core and Builtins |
| 7656 |
----------------- |
| 7657 |
|
| 7658 |
- gh-112243: Don't include comments in f-string debug expressions. Patch by |
| 7659 |
Pablo Galindo |
| 7660 |
|
| 7661 |
- gh-112287: Slightly optimize the Tier 2 (uop) interpreter by only loading |
| 7662 |
``oparg`` and ``operand`` when needed. Also double the trace size limit |
| 7663 |
again, to 512 this time. |
| 7664 |
|
| 7665 |
- gh-112266: Change docstrings of :attr:`~object.__dict__` and |
| 7666 |
:attr:`~object.__weakref__`. |
| 7667 |
|
| 7668 |
- gh-111807: Lower the max parser stack depth to 1000 under WASI debug |
| 7669 |
builds. |
| 7670 |
|
| 7671 |
- gh-111798: When Python is built in debug mode, set the C recursion limit |
| 7672 |
to 500 instead of 1500. A debug build is likely built with low |
| 7673 |
optimization level which implies higher stack memory usage than a release |
| 7674 |
build. Patch by Victor Stinner. |
| 7675 |
|
| 7676 |
- gh-106529: Enable translating unspecialized ``FOR_ITER`` to Tier 2. |
| 7677 |
|
| 7678 |
- gh-111916: Make hashlib related modules thread-safe without the GIL |
| 7679 |
|
| 7680 |
- gh-81137: Deprecate assignment to a function's ``__code__`` field when the |
| 7681 |
new code object is of a mismatched type (e.g., from a generator to a plain |
| 7682 |
function). |
| 7683 |
|
| 7684 |
- gh-79932: Raise exception if :meth:`frame.clear` is called on a suspended |
| 7685 |
frame. |
| 7686 |
|
| 7687 |
- gh-81925: Implement native thread ids for GNU KFreeBSD. |
| 7688 |
|
| 7689 |
- gh-111843: Use exponential backoff to reduce the number of failed tier 2 |
| 7690 |
optimization attempts by over 99%. |
| 7691 |
|
| 7692 |
- gh-110829: Joining a thread now ensures the underlying OS thread has |
| 7693 |
exited. This is required for safer fork() in multi-threaded processes. |
| 7694 |
|
| 7695 |
- gh-109369: Make sure that tier 2 traces are de-optimized if the code is |
| 7696 |
instrumented |
| 7697 |
|
| 7698 |
- gh-111772: Specialize slot loads and stores for _Py_T_OBJECT as well as |
| 7699 |
Py_T_OBJECT_EX |
| 7700 |
|
| 7701 |
- gh-111666: Speed up :meth:`BaseExceptionGroup.derive`, |
| 7702 |
:meth:`BaseExceptionGroup.subgroup`, and :meth:`BaseExceptionGroup.split` |
| 7703 |
by changing how they parse passed arguments. |
| 7704 |
|
| 7705 |
- gh-111654: Fix runtime crash when some error happens in opcode |
| 7706 |
``LOAD_FROM_DICT_OR_DEREF``. |
| 7707 |
|
| 7708 |
- gh-111623: Add support for sharing tuples between interpreters using the |
| 7709 |
cross-interpreter API. Patch by Anthony Shaw. |
| 7710 |
|
| 7711 |
- gh-111354: The oparg of :opcode:`YIELD_VALUE` is now ``1`` if the |
| 7712 |
instruction is part of a yield-from or await, and ``0`` otherwise. |
| 7713 |
|
| 7714 |
The SUSPENDED frame state is now split into ``SUSPENDED`` and |
| 7715 |
``SUSPENDED_YIELD_FROM``. This simplifies the code in ``_PyGen_yf``. |
| 7716 |
|
| 7717 |
- gh-111520: Merge the Tier 1 (bytecode) and Tier 2 (micro-ops) interpreters |
| 7718 |
together, moving the Tier 2 interpreter loop and switch into |
| 7719 |
``_PyEval_EvalFrameDefault()`` in ``Python/ceval.c``. The |
| 7720 |
``Python/executor.c`` file is gone. Also the ``TIER_ONE`` and ``TIER_TWO`` |
| 7721 |
macros are now handled by the code generator. |
| 7722 |
|
| 7723 |
**Beware!** This changes the environment variables to enable micro-ops and |
| 7724 |
their debugging to ``PYTHON_UOPS`` and ``PYTHON_LLTRACE``. |
| 7725 |
|
| 7726 |
- gh-109181: Speed up :class:`Traceback` object creation by lazily compute |
| 7727 |
the line number. Patch by Pablo Galindo |
| 7728 |
|
| 7729 |
- gh-111420: Allow type comments in parenthesized ``with`` statements |
| 7730 |
|
| 7731 |
- gh-111438: Add support for sharing floats between interpreters using the |
| 7732 |
cross-interpreter API. Patch by Anthony Shaw. |
| 7733 |
|
| 7734 |
- gh-111435: Add support for sharing of ``True`` and ``False`` between |
| 7735 |
interpreters using the cross-interpreter API. Patch by Anthony Shaw. |
| 7736 |
|
| 7737 |
- gh-102388: Fix a bug where ``iso2022_jp_3`` and ``iso2022_jp_2004`` codecs |
| 7738 |
read out of bounds |
| 7739 |
|
| 7740 |
- gh-111366: Fix an issue in the :mod:`codeop` that was causing |
| 7741 |
:exc:`SyntaxError` exceptions raised in the presence of invalid syntax to |
| 7742 |
not contain precise error messages. Patch by Pablo Galindo |
| 7743 |
|
| 7744 |
- gh-111380: Fix a bug that was causing :exc:`SyntaxWarning` to appear twice |
| 7745 |
when parsing if invalid syntax is encountered later. Patch by Pablo |
| 7746 |
galindo |
| 7747 |
|
| 7748 |
- gh-111374: Added a new environment variable |
| 7749 |
:envvar:`PYTHON_FROZEN_MODULES`. It determines whether or not frozen |
| 7750 |
modules are ignored by the import machinery, equivalent of the :option:`-X |
| 7751 |
frozen_modules <-X>` command-line option. |
| 7752 |
|
| 7753 |
- gh-111354: Remove ``oparg`` from :opcode:`YIELD_VALUE`. Change ``oparg`` |
| 7754 |
of :opcode:`RESUME` to include information about the except-depth. These |
| 7755 |
changes make it possible to simplify the code in generator close. |
| 7756 |
|
| 7757 |
- gh-94438: Fix a regression that prevented jumping across ``is None`` and |
| 7758 |
``is not None`` when debugging. Patch by Savannah Ostrowski. |
| 7759 |
|
| 7760 |
- gh-67224: Show source lines in tracebacks when using the ``-c`` option |
| 7761 |
when running Python. Patch by Pablo Galindo |
| 7762 |
|
| 7763 |
- gh-111123: Fix a bug where a :keyword:`global` declaration in an |
| 7764 |
:keyword:`except` block is rejected when the global is used in the |
| 7765 |
:keyword:`else` block. |
| 7766 |
|
| 7767 |
- gh-110938: Fix error messages for indented blocks with functions and |
| 7768 |
classes with generic type parameters. Patch by Pablo Galindo |
| 7769 |
|
| 7770 |
- gh-109214: Remove unnecessary instruction pointer updates before returning |
| 7771 |
from frames. |
| 7772 |
|
| 7773 |
- gh-110912: Correctly display the traceback for :exc:`MemoryError` |
| 7774 |
exceptions using the :mod:`traceback` module. Patch by Pablo Galindo |
| 7775 |
|
| 7776 |
- gh-109894: Fixed crash due to improperly initialized static |
| 7777 |
:exc:`MemoryError` in subinterpreter. |
| 7778 |
|
| 7779 |
- gh-110892: Return ``NULL`` for ``PyTrace_RETURN`` events caused by an |
| 7780 |
exception |
| 7781 |
|
| 7782 |
- gh-110864: Fix argument parsing by ``_PyArg_UnpackKeywordsWithVararg`` for |
| 7783 |
functions defining pos-or-keyword, vararg, and kw-only parameters. |
| 7784 |
|
| 7785 |
- gh-109094: Replace ``prev_instr`` on the interpreter frame by |
| 7786 |
``instr_ptr`` which points to the beginning of the instruction that is |
| 7787 |
currently executing (or will execute once the frame resumes). |
| 7788 |
|
| 7789 |
- gh-110805: Allow the repl to show source code and complete tracebacks. |
| 7790 |
Patch by Pablo Galindo |
| 7791 |
|
| 7792 |
- gh-110722: Add :envvar:`PYTHON_PRESITE=package.module` to import a module |
| 7793 |
early in the interpreter lifecycle before ``site.py`` is executed. Python |
| 7794 |
needs to be :ref:`built in debug mode <debug-build>` for this option to |
| 7795 |
exist. |
| 7796 |
|
| 7797 |
- gh-110481: Implement biased reference counting in ``--disable-gil`` |
| 7798 |
builds. |
| 7799 |
|
| 7800 |
- gh-110543: Fix regression in Python 3.12 where |
| 7801 |
:meth:`types.CodeType.replace` would produce a broken code object if |
| 7802 |
called on a module or class code object that contains a comprehension. |
| 7803 |
Patch by Jelle Zijlstra. |
| 7804 |
|
| 7805 |
- gh-89519: Removed chained :class:`classmethod` descriptors (introduced in |
| 7806 |
:issue:`19072`). This can no longer be used to wrap other descriptors |
| 7807 |
such as :class:`property`. The core design of this feature was flawed and |
| 7808 |
caused a number of downstream problems. To "pass-through" a |
| 7809 |
:class:`classmethod`, consider using the :attr:`!__wrapped__` attribute |
| 7810 |
that was added in Python 3.10. |
| 7811 |
|
| 7812 |
- gh-103615: Use local events for opcode tracing |
| 7813 |
|
| 7814 |
- bpo-46657: Add mimalloc memory allocator support. |
| 7815 |
|
| 7816 |
- gh-106718: When PyConfig.stdlib_dir is explicitly set, it's now respected |
| 7817 |
and won't be overridden by PyConfig.home. |
| 7818 |
|
| 7819 |
- gh-106905: Fix incorrect SystemError about AST constructor recursion depth |
| 7820 |
mismatch. |
| 7821 |
|
| 7822 |
- gh-100445: Improve error message for unterminated strings with escapes. |
| 7823 |
|
| 7824 |
- bpo-45759: Improved error messages for ``elif``/``else`` statements not |
| 7825 |
matching any valid statements. Patch by Jeremiah Vivian. |
| 7826 |
|
| 7827 |
Library |
| 7828 |
------- |
| 7829 |
|
| 7830 |
- gh-111942: Fix SystemError in the TextIOWrapper constructor with |
| 7831 |
non-encodable "errors" argument in non-debug mode. |
| 7832 |
|
| 7833 |
- gh-111995: Added the ``NI_IDN`` constant to the :mod:`socket` module when |
| 7834 |
present in C at build time for use with :func:`socket.getnameinfo`. |
| 7835 |
|
| 7836 |
- gh-109538: Issue warning message instead of having :class:`RuntimeError` |
| 7837 |
be displayed when event loop has already been closed at |
| 7838 |
:meth:`StreamWriter.__del__`. |
| 7839 |
|
| 7840 |
- gh-111942: Fix crashes in :meth:`io.TextIOWrapper.reconfigure` when pass |
| 7841 |
invalid arguments, e.g. non-string encoding. |
| 7842 |
|
| 7843 |
- gh-111460: :mod:`curses`: restore wide character support (including |
| 7844 |
:func:`curses.unget_wch` and :meth:`~curses.window.get_wch`) on macOS, |
| 7845 |
which was unavailable due to a regression in Python 3.12. |
| 7846 |
|
| 7847 |
- gh-103791: :class:`contextlib.suppress` now supports suppressing |
| 7848 |
exceptions raised as part of a :exc:`BaseExceptionGroup`, in addition to |
| 7849 |
the recent support for :exc:`ExceptionGroup`. |
| 7850 |
|
| 7851 |
- gh-111835: The :class:`mmap.mmap` class now has an |
| 7852 |
:meth:`~mmap.mmap.seekable` method that can be used when a seekable |
| 7853 |
file-like object is required. The :meth:`~mmap.mmap.seek` method now |
| 7854 |
returns the new absolute position. Patch by Donghee Na. |
| 7855 |
|
| 7856 |
- gh-111804: Remove posix.fallocate() under WASI as the underlying |
| 7857 |
posix_fallocate() is not available in WASI preview2. |
| 7858 |
|
| 7859 |
- gh-111841: Fix truncating arguments on an embedded null character in |
| 7860 |
:meth:`os.putenv` and :meth:`os.unsetenv` on Windows. |
| 7861 |
|
| 7862 |
- gh-111768: :func:`wsgiref.util.is_hop_by_hop` is now exposed correctly in |
| 7863 |
``__all__``. |
| 7864 |
|
| 7865 |
- gh-80731: Avoid executing the default function in :class:`cmd.Cmd` in an |
| 7866 |
except block |
| 7867 |
|
| 7868 |
- gh-111541: Fix :mod:`doctest` for :exc:`SyntaxError` not-builtin |
| 7869 |
subclasses. |
| 7870 |
|
| 7871 |
- gh-111719: Add extra argument validation for ``alias`` command in |
| 7872 |
:mod:`pdb` |
| 7873 |
|
| 7874 |
- gh-111482: :mod:`time`: Make :func:`time.clock_gettime` and |
| 7875 |
:func:`time.clock_gettime_ns` functions up to 2x faster by faster calling |
| 7876 |
convention. Patch by Victor Stinner. |
| 7877 |
|
| 7878 |
- gh-110894: Call loop exception handler for exceptions in |
| 7879 |
``client_connected_cb`` of :func:`asyncio.start_server` so that |
| 7880 |
applications can handle it. Patch by Kumar Aditya. |
| 7881 |
|
| 7882 |
- gh-111531: Fix reference leaks in ``bind_class()`` and ``bind_all()`` |
| 7883 |
methods of :mod:`tkinter` widgets. |
| 7884 |
|
| 7885 |
- gh-111246: :meth:`asyncio.loop.create_unix_server` will now automatically |
| 7886 |
remove the Unix socket when the server is closed. |
| 7887 |
|
| 7888 |
- gh-111356: Added :func:`io.text_encoding`, :data:`io.DEFAULT_BUFFER_SIZE`, |
| 7889 |
and :class:`io.IncrementalNewlineDecoder` to ``io.__all__``. |
| 7890 |
|
| 7891 |
- gh-66425: Remove the code to set the REMOTE_HOST header from wsgiref |
| 7892 |
module, as it is unreachable. This header is used for performance reasons, |
| 7893 |
which is not necessary in the wsgiref module. |
| 7894 |
|
| 7895 |
- gh-111429: Speed up :meth:`pathlib.PurePath.relative_to` and |
| 7896 |
:meth:`~pathlib.PurePath.is_relative_to`. |
| 7897 |
|
| 7898 |
- gh-111342: Fixed typo in :func:`math.sumprod`. |
| 7899 |
|
| 7900 |
- gh-68166: Remove mention of not supported "vsapi" element type in |
| 7901 |
:meth:`tkinter.ttk.Style.element_create`. Add tests for |
| 7902 |
``element_create()`` and other ``ttk.Style`` methods. Add examples for |
| 7903 |
``element_create()`` in the documentation. |
| 7904 |
|
| 7905 |
- gh-111388: Add ``show_group`` parameter to |
| 7906 |
:func:`traceback.format_exception_only`, which allows to format |
| 7907 |
:exc:`ExceptionGroup` instances. |
| 7908 |
|
| 7909 |
- gh-79033: Another attempt at fixing :func:`asyncio.Server.wait_closed`. It |
| 7910 |
now blocks until both conditions are true: the server is closed, *and* |
| 7911 |
there are no more active connections. (This means that in some cases where |
| 7912 |
in 3.12.0 this function would *incorrectly* have returned immediately, it |
| 7913 |
will now block; in particular, when there are no active connections but |
| 7914 |
the server hasn't been closed yet.) |
| 7915 |
|
| 7916 |
- gh-111259: Optimize recursive wildcards in :mod:`pathlib`. |
| 7917 |
|
| 7918 |
- gh-111295: Fix :mod:`time` not checking for errors when initializing. |
| 7919 |
|
| 7920 |
- gh-111253: Add error checking during :mod:`!_socket` module init. |
| 7921 |
|
| 7922 |
- gh-111251: Fix :mod:`!_blake2` not checking for errors when initializing. |
| 7923 |
|
| 7924 |
- gh-111233: Fix :mod:`select` not checking for errors when initializing. |
| 7925 |
|
| 7926 |
- gh-111230: Fix :mod:`ssl` not checking for errors when initializing. |
| 7927 |
|
| 7928 |
- gh-111174: Fix crash in :meth:`io.BytesIO.getbuffer` called repeatedly for |
| 7929 |
empty BytesIO. |
| 7930 |
|
| 7931 |
- gh-111187: Postpone removal version for locale.getdefaultlocale() to |
| 7932 |
Python 3.15. |
| 7933 |
|
| 7934 |
- gh-111159: Fix :mod:`doctest` output comparison for exceptions with notes. |
| 7935 |
|
| 7936 |
- gh-110910: Fix invalid state handling in :class:`asyncio.TaskGroup` and |
| 7937 |
:class:`asyncio.Timeout`. They now raise proper RuntimeError if they are |
| 7938 |
improperly used and are left in consistent state after this. |
| 7939 |
|
| 7940 |
- gh-111092: Make turtledemo run without default root enabled. |
| 7941 |
|
| 7942 |
- gh-110944: Support alias and convenience vars for :mod:`pdb` completion |
| 7943 |
|
| 7944 |
- gh-110745: Added *newline* parameter to :meth:`pathlib.Path.read_text`. |
| 7945 |
Patch by Junya Okabe. |
| 7946 |
|
| 7947 |
- gh-84583: Make :mod:`pdb` enter post-mortem mode even for |
| 7948 |
:exc:`SyntaxError` |
| 7949 |
|
| 7950 |
- gh-80675: Set ``f_trace_lines = True`` on all frames upon |
| 7951 |
:func:`pdb.set_trace` |
| 7952 |
|
| 7953 |
- gh-110771: Expose the setup and cleanup portions of |
| 7954 |
``asyncio.run_forever()`` as the standalone methods |
| 7955 |
``asyncio.run_forever_setup()`` and ``asyncio.run_forever_cleanup()``. |
| 7956 |
This allows for tighter integration with GUI event loops. |
| 7957 |
|
| 7958 |
- gh-110774: Support setting the :class:`asyncio.Runner` loop_factory kwarg |
| 7959 |
in :class:`unittest.IsolatedAsyncioTestCase` |
| 7960 |
|
| 7961 |
- gh-110392: Fix :func:`tty.setraw` and :func:`tty.setcbreak`: previously |
| 7962 |
they returned partially modified list of the original tty attributes. |
| 7963 |
:func:`tty.cfmakeraw` and :func:`tty.cfmakecbreak` now make a copy of the |
| 7964 |
list of special characters before modifying it. |
| 7965 |
|
| 7966 |
- gh-59013: Make line number of function breakpoint more precise in |
| 7967 |
:mod:`pdb` |
| 7968 |
|
| 7969 |
- gh-88434: Emit deprecation warning for non-integer numbers in |
| 7970 |
:mod:`gettext` functions and methods that consider plural forms even if |
| 7971 |
the translation was not found. |
| 7972 |
|
| 7973 |
- gh-110395: Ensure that :func:`select.kqueue` objects correctly appear as |
| 7974 |
closed in forked children, to prevent operations on an invalid file |
| 7975 |
descriptor. |
| 7976 |
|
| 7977 |
- gh-110196: Add ``__reduce__`` method to :class:`IPv6Address` in order to |
| 7978 |
keep ``scope_id`` |
| 7979 |
|
| 7980 |
- gh-109747: Improve errors for unsupported look-behind patterns. Now |
| 7981 |
re.error is raised instead of OverflowError or RuntimeError for too large |
| 7982 |
width of look-behind pattern. |
| 7983 |
|
| 7984 |
- gh-109466: Add the :attr:`ipaddress.IPv4Address.ipv6_mapped` property, |
| 7985 |
which returns the IPv4-mapped IPv6 address. |
| 7986 |
|
| 7987 |
- gh-85098: Implement the CLI of the :mod:`symtable` module and improve the |
| 7988 |
repr of :class:`~symtable.Symbol`. |
| 7989 |
|
| 7990 |
- gh-108791: Improved error handling in :mod:`pdb` command line interface, |
| 7991 |
making it produce more concise error messages. |
| 7992 |
|
| 7993 |
- gh-105931: Change :mod:`compileall` to only strip the stripdir prefix from |
| 7994 |
the full path recorded in the compiled ``.pyc`` file, when the prefix |
| 7995 |
matches the start of the full path in its entirety. When the prefix does |
| 7996 |
not match, no stripping is performed and a warning to this effect is |
| 7997 |
displayed. |
| 7998 |
|
| 7999 |
Previously all path components of the stripdir prefix that matched the |
| 8000 |
full path were removed, while those that did not match were left alone |
| 8001 |
(including ones interspersed between matching components). |
| 8002 |
|
| 8003 |
- gh-107431: Make the ``DictProxy`` and ``ListProxy`` types in |
| 8004 |
:mod:`multiprocessing.managers` :ref:`Generic Alias |
| 8005 |
Types<types-genericalias>` for ``[]`` use in typing contexts. |
| 8006 |
|
| 8007 |
- gh-72904: Add :func:`glob.translate`. This function converts a pathname |
| 8008 |
with shell-style wildcards to a regular expression. |
| 8009 |
|
| 8010 |
- gh-90026: Define ``USE_XATTRS`` on Cygwin so that XATTR-related functions |
| 8011 |
in the :mod:`os` module become available. |
| 8012 |
|
| 8013 |
- gh-90890: New methods :meth:`mailbox.Maildir.get_info`, |
| 8014 |
:meth:`mailbox.Maildir.set_info`, :meth:`mailbox.Maildir.get_flags`, |
| 8015 |
:meth:`mailbox.Maildir.set_flags`, :meth:`mailbox.Maildir.add_flag`, |
| 8016 |
:meth:`mailbox.Maildir.remove_flag`. These methods speed up accessing a |
| 8017 |
message's info and/or flags and are useful when it is not necessary to |
| 8018 |
access the message's contents, as when iterating over a Maildir to find |
| 8019 |
messages with specific flags. |
| 8020 |
|
| 8021 |
- gh-102956: Fix returning of empty byte strings after seek in zipfile |
| 8022 |
module |
| 8023 |
|
| 8024 |
- gh-102895: Added a parameter ``local_exit`` for :func:`code.interact` to |
| 8025 |
prevent ``exit()`` and ``quit`` from closing ``sys.stdin`` and raise |
| 8026 |
``SystemExit``. |
| 8027 |
|
| 8028 |
- gh-97928: Change the behavior of :meth:`tkinter.Text.count`. It now always |
| 8029 |
returns an integer if one or less counting options are specified. |
| 8030 |
Previously it could return a single count as a 1-tuple, an integer (only |
| 8031 |
if option ``"update"`` was specified) or ``None`` if no items found. The |
| 8032 |
result is now the same if ``wantobjects`` is set to ``0``. |
| 8033 |
|
| 8034 |
- gh-96954: Switch the storage of the unicode codepoint names to use a |
| 8035 |
different data-structure, a `directed acyclic word graph |
| 8036 |
<https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton>`_. |
| 8037 |
This makes the unicodedata shared library about 440 KiB smaller. |
| 8038 |
Contributed by Carl Friedrich Bolz-Tereick using code from the PyPy |
| 8039 |
project. |
| 8040 |
|
| 8041 |
- gh-73561: Omit the interface scope from an IPv6 address when used as Host |
| 8042 |
header by :mod:`http.client`. |
| 8043 |
|
| 8044 |
- gh-86826: :mod:`zipinfo` now supports the full range of values in the TZ |
| 8045 |
string determined by RFC 8536 and detects all invalid formats. Both Python |
| 8046 |
and C implementations now raise exceptions of the same type on invalid |
| 8047 |
data. |
| 8048 |
|
| 8049 |
Tests |
| 8050 |
----- |
| 8051 |
|
| 8052 |
- gh-111808: Make the default value of ``test.support.infinite_recursion()`` |
| 8053 |
to be conditional based on whether optimizations were used when compiling |
| 8054 |
the interpreter. This helps with platforms like WASI whose stack size is |
| 8055 |
greatly restricted in debug builds. |
| 8056 |
|
| 8057 |
- gh-110722: Gathering line coverage of standard libraries within the |
| 8058 |
regression test suite is now precise, as well as much faster. Patch by |
| 8059 |
Łukasz Langa. |
| 8060 |
|
| 8061 |
- gh-110367: Make regrtest ``--verbose3`` option compatible with |
| 8062 |
``--huntrleaks -jN`` options. The ``./python -m test -j1 -R 3:3 |
| 8063 |
--verbose3`` command now works as expected. Patch by Victor Stinner. |
| 8064 |
|
| 8065 |
- gh-111165: Remove no longer used functions ``run_unittest()`` and |
| 8066 |
``run_doctest()`` from the :mod:`test.support` module. |
| 8067 |
|
| 8068 |
- gh-110932: Fix regrtest if the ``SOURCE_DATE_EPOCH`` environment variable |
| 8069 |
is defined: use the variable value as the random seed. Patch by Victor |
| 8070 |
Stinner. |
| 8071 |
|
| 8072 |
- gh-110995: test_gdb: Fix detection of gdb built without Python scripting |
| 8073 |
support. Patch by Victor Stinner. |
| 8074 |
|
| 8075 |
- gh-110918: Test case matching patterns specified by options ``--match``, |
| 8076 |
``--ignore``, ``--matchfile`` and ``--ignorefile`` are now tested in the |
| 8077 |
order of specification, and the last match determines whether the test |
| 8078 |
case be run or ignored. |
| 8079 |
|
| 8080 |
- gh-108747: Add unit test for ``usercustomize`` and ``sitecustomize`` hooks |
| 8081 |
from :class:`site`. |
| 8082 |
|
| 8083 |
Build |
| 8084 |
----- |
| 8085 |
|
| 8086 |
- gh-96954: Make ``make regen-unicodedata`` work for out-of-tree builds of |
| 8087 |
CPython. |
| 8088 |
|
| 8089 |
- gh-112088: Add ``Tools/build/regen-configure.sh`` script to regenerate the |
| 8090 |
``configure`` with an Ubuntu container image. The |
| 8091 |
``quay.io/tiran/cpython_autoconf:271`` container image |
| 8092 |
(`tiran/cpython_autoconf <https://github.com/tiran/cpython_autoconf>`_) is |
| 8093 |
no longer used. Patch by Victor Stinner. |
| 8094 |
|
| 8095 |
- gh-111046: For wasi-threads, memory is now exported to fix compatibility |
| 8096 |
issues with some wasm runtimes. |
| 8097 |
|
| 8098 |
- gh-110828: AIX 32bit needs ``-latomic`` to build the :mod:`!_testcapi` |
| 8099 |
extension module. |
| 8100 |
|
| 8101 |
- gh-85283: The ``errno``, ``md5``, ``resource``, ``winsound``, |
| 8102 |
``_ctypes_test``, ``_multiprocessing.posixshmem``, ``_scproxy``, |
| 8103 |
``_stat``, ``_testimportmultiple`` and ``_uuid`` C extensions are now |
| 8104 |
built with the :ref:`limited C API <limited-c-api>`. Patch by Victor |
| 8105 |
Stinner. |
| 8106 |
|
| 8107 |
Windows |
| 8108 |
------- |
| 8109 |
|
| 8110 |
- gh-111856: Fixes :func:`~os.fstat` on file systems that do not support |
| 8111 |
file ID requests. This includes FAT32 and exFAT. |
| 8112 |
|
| 8113 |
- gh-111293: Fix :data:`os.DirEntry.inode` dropping higher 64 bits of a file |
| 8114 |
id on some filesystems on Windows. |
| 8115 |
|
| 8116 |
- gh-110913: WindowsConsoleIO now correctly chunks large buffers without |
| 8117 |
splitting up UTF-8 sequences. |
| 8118 |
|
| 8119 |
macOS |
| 8120 |
----- |
| 8121 |
|
| 8122 |
- gh-59703: For macOS framework builds, in ``getpath.c`` use the system |
| 8123 |
``dladdr`` function to find the path to the shared library rather than |
| 8124 |
depending on deprecated macOS APIs. |
| 8125 |
|
| 8126 |
- gh-110950: Update macOS installer to include an upstream Tcl/Tk fix for |
| 8127 |
the ``Secure coding is not enabled for restorable state!`` warning |
| 8128 |
encountered in Tkinter on macOS 14 Sonoma. |
| 8129 |
|
| 8130 |
- gh-111015: Ensure that IDLE.app and Python Launcher.app are installed with |
| 8131 |
appropriate permissions on macOS builds. |
| 8132 |
|
| 8133 |
- gh-71383: Update macOS installer to include an upstream Tcl/Tk fix for the |
| 8134 |
``ttk::ThemeChanged`` error encountered in Tkinter. |
| 8135 |
|
| 8136 |
- gh-92603: Update macOS installer to include a fix accepted by upstream |
| 8137 |
Tcl/Tk for a crash encountered after the first :meth:`tkinter.Tk` instance |
| 8138 |
is destroyed. |
| 8139 |
|
| 8140 |
IDLE |
| 8141 |
---- |
| 8142 |
|
| 8143 |
- bpo-35668: Add docstrings to the IDLE debugger module. Fix two bugs: |
| 8144 |
initialize ``Idb.botframe`` (should be in Bdb); in ``Idb.in_rpc_code``, |
| 8145 |
check whether ``prev_frame`` is ``None`` before trying to use it. Greatly |
| 8146 |
expand test_debugger. |
| 8147 |
|
| 8148 |
Tools/Demos |
| 8149 |
----------- |
| 8150 |
|
| 8151 |
- gh-111903: Argument Clinic now supports the ``@critical_section`` |
| 8152 |
directive that instructs Argument Clinic to generate a critical section |
| 8153 |
around the function call, which locks the ``self`` object in |
| 8154 |
``--disable-gil`` builds. Patch by Sam Gross. |
| 8155 |
|
| 8156 |
C API |
| 8157 |
----- |
| 8158 |
|
| 8159 |
- gh-112026: Add again the private ``_PyThreadState_UncheckedGet()`` |
| 8160 |
function as an alias to the new public |
| 8161 |
:c:func:`PyThreadState_GetUnchecked` function. Patch by Victor Stinner. |
| 8162 |
|
| 8163 |
- gh-112026: Restore the removed ``_PyDict_GetItemStringWithError()`` |
| 8164 |
function. It is used by numpy. Patch by Victor Stinner. |
| 8165 |
|
| 8166 |
- gh-112026: Restore removed private C API functions, macros and structures |
| 8167 |
which have no simple replacement for now: |
| 8168 |
|
| 8169 |
* _PyDict_GetItem_KnownHash() |
| 8170 |
* _PyDict_NewPresized() |
| 8171 |
* _PyHASH_BITS |
| 8172 |
* _PyHASH_IMAG |
| 8173 |
* _PyHASH_INF |
| 8174 |
* _PyHASH_MODULUS |
| 8175 |
* _PyHASH_MULTIPLIER |
| 8176 |
* _PyLong_Copy() |
| 8177 |
* _PyLong_FromDigits() |
| 8178 |
* _PyLong_New() |
| 8179 |
* _PyLong_Sign() |
| 8180 |
* _PyObject_CallMethodId() |
| 8181 |
* _PyObject_CallMethodNoArgs() |
| 8182 |
* _PyObject_CallMethodOneArg() |
| 8183 |
* _PyObject_CallOneArg() |
| 8184 |
* _PyObject_EXTRA_INIT |
| 8185 |
* _PyObject_FastCallDict() |
| 8186 |
* _PyObject_GetAttrId() |
| 8187 |
* _PyObject_Vectorcall() |
| 8188 |
* _PyObject_VectorcallMethod() |
| 8189 |
* _PyStack_AsDict() |
| 8190 |
* _PyThread_CurrentFrames() |
| 8191 |
* _PyUnicodeWriter structure |
| 8192 |
* _PyUnicodeWriter_Dealloc() |
| 8193 |
* _PyUnicodeWriter_Finish() |
| 8194 |
* _PyUnicodeWriter_Init() |
| 8195 |
* _PyUnicodeWriter_Prepare() |
| 8196 |
* _PyUnicodeWriter_PrepareKind() |
| 8197 |
* _PyUnicodeWriter_WriteASCIIString() |
| 8198 |
* _PyUnicodeWriter_WriteChar() |
| 8199 |
* _PyUnicodeWriter_WriteLatin1String() |
| 8200 |
* _PyUnicodeWriter_WriteStr() |
| 8201 |
* _PyUnicodeWriter_WriteSubstring() |
| 8202 |
* _PyUnicode_AsString() |
| 8203 |
* _PyUnicode_FromId() |
| 8204 |
* _PyVectorcall_Function() |
| 8205 |
* _Py_IDENTIFIER() |
| 8206 |
* _Py_c_abs() |
| 8207 |
* _Py_c_diff() |
| 8208 |
* _Py_c_neg() |
| 8209 |
* _Py_c_pow() |
| 8210 |
* _Py_c_prod() |
| 8211 |
* _Py_c_quot() |
| 8212 |
* _Py_c_sum() |
| 8213 |
* _Py_static_string() |
| 8214 |
* _Py_static_string_init() |
| 8215 |
|
| 8216 |
Patch by Victor Stinner. |
| 8217 |
|
| 8218 |
- gh-112026: Add again ``<ctype.h>`` and ``<unistd.h>`` includes in |
| 8219 |
``Python.h``, but don't include them in the limited C API version 3.13 and |
| 8220 |
newer. Patch by Victor Stinner. |
| 8221 |
|
| 8222 |
- gh-111956: Add internal-only one-time initialization API: ``_PyOnceFlag`` |
| 8223 |
and ``_PyOnceFlag_CallOnce``. |
| 8224 |
|
| 8225 |
- gh-111262: Add :c:func:`PyDict_Pop` and :c:func:`PyDict_PopString` |
| 8226 |
functions: remove a key from a dictionary and optionally return the |
| 8227 |
removed value. This is similar to :meth:`dict.pop`, but without the |
| 8228 |
default value and not raising :exc:`KeyError` if the key missing. Patch by |
| 8229 |
Stefan Behnel and Victor Stinner. |
| 8230 |
|
| 8231 |
- gh-111863: Rename ``Py_NOGIL`` to ``Py_GIL_DISABLED``. Patch by Hugo van |
| 8232 |
Kemenade. |
| 8233 |
|
| 8234 |
- gh-111138: Add :c:func:`PyList_Extend` and :c:func:`PyList_Clear` |
| 8235 |
functions: similar to Python ``list.extend()`` and ``list.clear()`` |
| 8236 |
methods. Patch by Victor Stinner. |
| 8237 |
|
| 8238 |
- gh-108765: On Windows, ``Python.h`` no longer includes the ``<stddef.h>`` |
| 8239 |
standard header file. If needed, it should now be included explicitly. |
| 8240 |
Patch by Victor Stinner. |
| 8241 |
|
| 8242 |
- gh-111569: Implement "Python Critical Sections" from :pep:`703`. These are |
| 8243 |
macros to help replace the GIL with per-object locks in the |
| 8244 |
``--disable-gil`` build of CPython. The macros are no-ops in the default |
| 8245 |
build. |
| 8246 |
|
| 8247 |
- gh-111506: In the limited C API version 3.13, :c:func:`Py_SET_REFCNT` |
| 8248 |
function is now implemented as an opaque function call. Patch by Victor |
| 8249 |
Stinner. |
| 8250 |
|
| 8251 |
- gh-108082: Add :c:func:`PyErr_FormatUnraisable` function. |
| 8252 |
|
| 8253 |
- gh-110964: Move the undocumented private _PyArg functions and |
| 8254 |
_PyArg_Parser structure to internal C API (``pycore_modsupport.h``). Patch |
| 8255 |
by Victor Stinner. |
| 8256 |
|
| 8257 |
- gh-110815: Support non-ASCII keyword names in |
| 8258 |
:c:func:`PyArg_ParseTupleAndKeywords`. |
| 8259 |
|
| 8260 |
- gh-109587: Introduced :c:func:`PyUnstable_PerfTrampoline_CompileCode`, |
| 8261 |
:c:func:`PyUnstable_PerfTrampoline_SetPersistAfterFork` and |
| 8262 |
:c:func:`PyUnstable_CopyPerfMapFile`. These functions allow extension |
| 8263 |
modules to initialize trampolines eagerly, after the application is |
| 8264 |
"warmed up". This makes it possible to have perf-trampolines running in an |
| 8265 |
always-enabled fashion. |
| 8266 |
|
| 8267 |
- gh-85283: Add the :c:func:`PySys_Audit` function to the limited C API. |
| 8268 |
Patch by Victor Stinner. |
| 8269 |
|
| 8270 |
- gh-85283: Add :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawCalloc`, |
| 8271 |
:c:func:`PyMem_RawRealloc` and :c:func:`PyMem_RawFree` to the limited C |
| 8272 |
API. Patch by Victor Stinner. |
| 8273 |
|
| 8274 |
- gh-106672: Functions :c:func:`PyDict_GetItem`, |
| 8275 |
:c:func:`PyDict_GetItemString`, :c:func:`PyMapping_HasKey`, |
| 8276 |
:c:func:`PyMapping_HasKeyString`, :c:func:`PyObject_HasAttr`, |
| 8277 |
:c:func:`PyObject_HasAttrString`, and :c:func:`PySys_GetObject`, which |
| 8278 |
clear all errors occurred during calling the function, report now them |
| 8279 |
using :func:`sys.unraisablehook`. |
| 8280 |
|
| 8281 |
- gh-67565: Remove redundant C-contiguity check in :file:`getargs.c`, |
| 8282 |
:mod:`binascii`, :mod:`ssl` and Argument Clinic. Patched by Stefan Krah |
| 8283 |
and Furkan Onder |
| 8284 |
|
| 8285 |
|
| 8286 |
What's New in Python 3.13.0 alpha 1? |
| 8287 |
==================================== |
| 8288 |
|
| 8289 |
*Release date: 2023-10-13* |
| 8290 |
|
| 8291 |
Security |
| 8292 |
-------- |
| 8293 |
|
| 8294 |
- gh-108310: Fixed an issue where instances of :class:`ssl.SSLSocket` were |
| 8295 |
vulnerable to a bypass of the TLS handshake and included protections (like |
| 8296 |
certificate verification) and treating sent unencrypted data as if it were |
| 8297 |
post-handshake TLS encrypted data. Security issue reported as |
| 8298 |
:cve:`2023-40217` by Aapo Oksman. Patch by Gregory P. Smith. |
| 8299 |
|
| 8300 |
- gh-107774: PEP 669 specifies that ``sys.monitoring.register_callback`` |
| 8301 |
will generate an audit event. Pre-releases of Python 3.12 did not generate |
| 8302 |
the audit event. This is now fixed. |
| 8303 |
|
| 8304 |
- gh-102988: Reverted the :mod:`email.utils` security improvement change |
| 8305 |
released in 3.12beta4 that unintentionally caused |
| 8306 |
:mod:`email.utils.getaddresses` to fail to parse email addresses with a |
| 8307 |
comma in the quoted name field. See :gh:`106669`. |
| 8308 |
|
| 8309 |
- gh-99108: Refresh our new HACL* built-in :mod:`hashlib` code from |
| 8310 |
upstream. Built-in SHA2 should be faster and an issue with SHA3 on 32-bit |
| 8311 |
platforms is fixed. |
| 8312 |
|
| 8313 |
- gh-102509: Start initializing ``ob_digit`` during creation of |
| 8314 |
:c:type:`PyLongObject` objects. Patch by Illia Volochii. |
| 8315 |
|
| 8316 |
Core and Builtins |
| 8317 |
----------------- |
| 8318 |
|
| 8319 |
- gh-110782: Fix crash when :class:`typing.TypeVar` is constructed with a |
| 8320 |
keyword argument. Patch by Jelle Zijlstra. |
| 8321 |
|
| 8322 |
- gh-110752: Reset ``ceval.eval_breaker`` in :func:`interpreter_clear` |
| 8323 |
|
| 8324 |
- gh-110721: Use the :mod:`traceback` implementation for the default |
| 8325 |
:c:func:`PyErr_Display` functionality. Patch by Pablo Galindo |
| 8326 |
|
| 8327 |
- gh-110696: Fix incorrect error message for invalid argument unpacking. |
| 8328 |
Patch by Pablo Galindo |
| 8329 |
|
| 8330 |
- gh-104169: Split the tokenizer into two separate directories: - One part |
| 8331 |
includes the actual lexeme producing logic and lives in ``Parser/lexer``. |
| 8332 |
- The second part wraps the lexer according to the different tokenization |
| 8333 |
modes we have (string, utf-8, file, interactive, readline) and lives in |
| 8334 |
``Parser/tokenizer``. |
| 8335 |
|
| 8336 |
- gh-110688: Remove undocumented ``test_c_api`` method from :class:`set`, |
| 8337 |
which was only defined for testing purposes under ``Py_DEBUG``. Now we |
| 8338 |
have proper CAPI tests. |
| 8339 |
|
| 8340 |
- gh-104584: Fix a reference leak when running with :envvar:`PYTHONUOPS` or |
| 8341 |
:option:`-X uops <-X>` enabled. |
| 8342 |
|
| 8343 |
- gh-110514: Add ``PY_THROW`` to :func:`sys.setprofile` events |
| 8344 |
|
| 8345 |
- gh-110489: Optimise :func:`math.ceil` when the input is exactly a float, |
| 8346 |
resulting in about a 10% improvement. |
| 8347 |
|
| 8348 |
- gh-110455: Guard ``assert(tstate->thread_id > 0)`` with ``#ifndef |
| 8349 |
HAVE_PTHREAD_STUBS``. This allows for for pydebug builds to work under |
| 8350 |
WASI which (currently) lacks thread support. |
| 8351 |
|
| 8352 |
- gh-110309: Remove unnecessary empty constant nodes in the ast of f-string |
| 8353 |
specs. |
| 8354 |
|
| 8355 |
- gh-110259: Correctly identify the format spec in f-strings (with single or |
| 8356 |
triple quotes) that have multiple lines in the expression part and include |
| 8357 |
a formatting spec. Patch by Pablo Galindo |
| 8358 |
|
| 8359 |
- gh-110237: Fix missing error checks for calls to ``PyList_Append`` in |
| 8360 |
``_PyEval_MatchClass``. |
| 8361 |
|
| 8362 |
- gh-110164: regrtest: If the ``SOURCE_DATE_EPOCH`` environment variable is |
| 8363 |
defined, regrtest now disables tests randomization. Patch by Victor |
| 8364 |
Stinner. |
| 8365 |
|
| 8366 |
- gh-109889: Fix the compiler's redundant NOP detection algorithm to skip |
| 8367 |
over NOPs with no line number when looking for the next instruction's |
| 8368 |
lineno. |
| 8369 |
|
| 8370 |
- gh-109853: ``sys.path[0]`` is now set correctly for subinterpreters. |
| 8371 |
|
| 8372 |
- gh-109923: Set line number on the ``POP_TOP`` that follows a |
| 8373 |
``RETURN_GENERATOR``. |
| 8374 |
|
| 8375 |
- gh-105716: Subinterpreters now correctly handle the case where they have |
| 8376 |
threads running in the background. Before, such threads would interfere |
| 8377 |
with cleaning up and destroying them, as well as prevent running another |
| 8378 |
script. |
| 8379 |
|
| 8380 |
- gh-109369: The internal eval_breaker and supporting flags, plus the |
| 8381 |
monitoring version have been merged into a single atomic integer to speed |
| 8382 |
up checks. |
| 8383 |
|
| 8384 |
- gh-109823: Fix bug where compiler does not adjust labels when removing an |
| 8385 |
empty basic block which is a jump target. |
| 8386 |
|
| 8387 |
- gh-109793: The main thread no longer exits prematurely when a |
| 8388 |
subinterpreter is cleaned up during runtime finalization. The bug was a |
| 8389 |
problem particularly because, when triggered, the Python process would |
| 8390 |
always return with a 0 exitcode, even if it failed. |
| 8391 |
|
| 8392 |
- gh-109719: Fix missing jump target labels when compiler reorders cold/warm |
| 8393 |
blocks. |
| 8394 |
|
| 8395 |
- gh-109595: Add :option:`-X cpu_count <-X>` command line option to |
| 8396 |
override return results of :func:`os.cpu_count` and |
| 8397 |
:func:`os.process_cpu_count`. This option is useful for users who need to |
| 8398 |
limit CPU resources of a container system without having to modify the |
| 8399 |
container (application code). Patch by Donghee Na. |
| 8400 |
|
| 8401 |
- gh-109627: Fix bug where the compiler does not assign a new jump target |
| 8402 |
label to a duplicated small exit block. |
| 8403 |
|
| 8404 |
- gh-109596: Fix some tokens in the grammar that were incorrectly marked as |
| 8405 |
soft keywords. Also fix some repeated rule names and ensure that repeated |
| 8406 |
rules are not allowed. Patch by Pablo Galindo |
| 8407 |
|
| 8408 |
- gh-109496: On a Python built in debug mode, :c:func:`Py_DECREF()` now |
| 8409 |
calls ``_Py_NegativeRefcount()`` if the object is a dangling pointer to |
| 8410 |
deallocated memory: memory filled with ``0xDD`` "dead byte" by the debug |
| 8411 |
hook on memory allocators. The fix is to check the reference count |
| 8412 |
*before* checking for ``_Py_IsImmortal()``. Patch by Victor Stinner. |
| 8413 |
|
| 8414 |
- gh-107265: Deopt opcodes hidden by the executor when base opcode is needed |
| 8415 |
|
| 8416 |
- gh-109371: Deopted instructions correctly for tool initialization and |
| 8417 |
modified the incorrect assertion in instrumentation, when a previous tool |
| 8418 |
already sets INSTRUCTION events |
| 8419 |
|
| 8420 |
- gh-105658: Fix bug where the line trace of an except block ending with a |
| 8421 |
conditional includes an excess event with the line of the conditional |
| 8422 |
expression. |
| 8423 |
|
| 8424 |
- gh-109219: Fix compiling type param scopes that use a name which is also |
| 8425 |
free in an inner scope. |
| 8426 |
|
| 8427 |
- gh-109351: Fix crash when compiling an invalid AST involving a named |
| 8428 |
(walrus) expression. |
| 8429 |
|
| 8430 |
- gh-109341: Fix crash when compiling an invalid AST involving a |
| 8431 |
:class:`ast.TypeAlias`. |
| 8432 |
|
| 8433 |
- gh-109195: Fix source location for the ``LOAD_*`` instruction preceding a |
| 8434 |
``LOAD_SUPER_ATTR`` to load the ``super`` global (or shadowing variable) |
| 8435 |
so that it encompasses only the name ``super`` and not the following |
| 8436 |
parentheses. |
| 8437 |
|
| 8438 |
- gh-109256: Opcode IDs for specialized opcodes are allocated in their own |
| 8439 |
range to improve stability of the IDs for the 'real' opcodes. |
| 8440 |
|
| 8441 |
- gh-109216: Fix possible memory leak in :opcode:`BUILD_MAP`. |
| 8442 |
|
| 8443 |
- gh-109207: Fix a SystemError in ``__repr__`` of symtable entry object. |
| 8444 |
|
| 8445 |
- gh-109179: Fix bug where the C traceback display drops notes from |
| 8446 |
:exc:`SyntaxError`. |
| 8447 |
|
| 8448 |
- gh-109118: Disallow nested scopes (lambdas, generator expressions, and |
| 8449 |
comprehensions) within PEP 695 annotation scopes that are nested within |
| 8450 |
classes. |
| 8451 |
|
| 8452 |
- gh-109156: Add tests for de-instrumenting instructions while keeping the |
| 8453 |
instrumentation for lines |
| 8454 |
|
| 8455 |
- gh-109114: Relax the detection of the error message for invalid lambdas |
| 8456 |
inside f-strings to not search for arbitrary replacement fields to avoid |
| 8457 |
false positives. Patch by Pablo Galindo |
| 8458 |
|
| 8459 |
- gh-105848: Add a new :opcode:`CALL_KW` opcode, used for calls containing |
| 8460 |
keyword arguments. Also, fix a possible crash when jumping over method |
| 8461 |
calls in a debugger. |
| 8462 |
|
| 8463 |
- gh-109052: Use the base opcode when comparing code objects to avoid |
| 8464 |
interference from instrumentation |
| 8465 |
|
| 8466 |
- gh-109118: Fix interpreter crash when a NameError is raised inside the |
| 8467 |
type parameters of a generic class. |
| 8468 |
|
| 8469 |
- gh-88943: Improve syntax error for non-ASCII character that follows a |
| 8470 |
numerical literal. It now points on the invalid non-ASCII character, not |
| 8471 |
on the valid numerical literal. |
| 8472 |
|
| 8473 |
- gh-108976: Fix crash that occurs after de-instrumenting a code object in a |
| 8474 |
monitoring callback. |
| 8475 |
|
| 8476 |
- gh-108732: Make iteration variables of module- and class-scoped |
| 8477 |
comprehensions visible to pdb and other tools that use ``frame.f_locals`` |
| 8478 |
again. |
| 8479 |
|
| 8480 |
- gh-108959: Fix caret placement for error locations for subscript and |
| 8481 |
binary operations that involve non-semantic parentheses and spaces. Patch |
| 8482 |
by Pablo Galindo |
| 8483 |
|
| 8484 |
- gh-104584: Fix a crash when running with :envvar:`PYTHONUOPS` or |
| 8485 |
:option:`-X uops <-X>` enabled and an error occurs during optimization. |
| 8486 |
|
| 8487 |
- gh-108727: Define ``tp_dealloc`` for ``CounterOptimizer_Type``. This fixes |
| 8488 |
a segfault on deallocation. |
| 8489 |
|
| 8490 |
- gh-108520: Fix :meth:`multiprocessing.synchronize.SemLock.__setstate__` to |
| 8491 |
properly initialize |
| 8492 |
:attr:`multiprocessing.synchronize.SemLock._is_fork_ctx`. This fixes a |
| 8493 |
regression when passing a SemLock across nested processes. |
| 8494 |
|
| 8495 |
Rename :attr:`multiprocessing.synchronize.SemLock.is_fork_ctx` to |
| 8496 |
:attr:`multiprocessing.synchronize.SemLock._is_fork_ctx` to avoid exposing |
| 8497 |
it as public API. |
| 8498 |
|
| 8499 |
- gh-108654: Restore locals shadowed by an inlined comprehension if the |
| 8500 |
comprehension raises an exception. |
| 8501 |
|
| 8502 |
- gh-108488: Change the initialization of inline cache entries so that the |
| 8503 |
cache entry for ``JUMP_BACKWARD`` is initialized to zero, instead of the |
| 8504 |
``adaptive_counter_warmup()`` value used for all other instructions. This |
| 8505 |
counter, unique among instructions, counts up from zero. |
| 8506 |
|
| 8507 |
- gh-108716: Turn off deep-freezing of code objects. Modules are still |
| 8508 |
frozen, so that a file system search is not needed for common modules. |
| 8509 |
|
| 8510 |
- gh-108614: Add RESUME_CHECK instruction, to avoid having to handle |
| 8511 |
instrumentation, signals, and contexts switches in the tier 2 execution |
| 8512 |
engine. |
| 8513 |
|
| 8514 |
- gh-108487: Move an assert that would cause a spurious crash in a devious |
| 8515 |
case that should only trigger deoptimization. |
| 8516 |
|
| 8517 |
- gh-106176: Use a ``WeakValueDictionary`` to track the lists containing the |
| 8518 |
modules each thread is currently importing. This helps avoid a reference |
| 8519 |
leak from keeping the list around longer than necessary. Weakrefs are used |
| 8520 |
as GC can't interrupt the cleanup. |
| 8521 |
|
| 8522 |
- gh-105481: The regen-opcode build stage was removed and its work is now |
| 8523 |
done in regen-cases. |
| 8524 |
|
| 8525 |
- gh-107901: Fix missing line number on :opcode:`JUMP_BACKWARD` at the end |
| 8526 |
of a for loop. |
| 8527 |
|
| 8528 |
- gh-108113: The :func:`compile` built-in can now accept a new flag, |
| 8529 |
``ast.PyCF_OPTIMIZED_AST``, which is similar to ``ast.PyCF_ONLY_AST`` |
| 8530 |
except that the returned ``AST`` is optimized according to the value of |
| 8531 |
the ``optimize`` argument. |
| 8532 |
|
| 8533 |
:func:`ast.parse` now accepts an optional argument ``optimize`` which is |
| 8534 |
passed on to the :func:`compile` built-in. This makes it possible to |
| 8535 |
obtain an optimized ``AST``. |
| 8536 |
|
| 8537 |
- gh-107971: Opcode IDs are generated from bytecodes.c instead of being hard |
| 8538 |
coded in opcode.py. |
| 8539 |
|
| 8540 |
- gh-107944: Improve error message for function calls with bad keyword |
| 8541 |
arguments. Patch by Pablo Galindo |
| 8542 |
|
| 8543 |
- gh-108390: Raise an exception when setting a non-local event (``RAISE``, |
| 8544 |
``EXCEPTION_HANDLED``, etc.) in ``sys.monitoring.set_local_events``. |
| 8545 |
|
| 8546 |
Fixes crash when tracing in recursive calls to Python classes. |
| 8547 |
|
| 8548 |
- gh-108035: Remove the ``_PyCFrame`` struct, moving the pointer to the |
| 8549 |
current interpreter frame back to the threadstate, as it was for 3.10 and |
| 8550 |
earlier. The ``_PyCFrame`` existed as a performance optimization for |
| 8551 |
tracing. Since PEP 669 has been implemented, this optimization no longer |
| 8552 |
applies. |
| 8553 |
|
| 8554 |
- gh-91051: Fix abort / segfault when using all eight type watcher slots, on |
| 8555 |
platforms where ``char`` is signed by default. |
| 8556 |
|
| 8557 |
- gh-106581: Fix possible assertion failures and missing instrumentation |
| 8558 |
events when :envvar:`PYTHONUOPS` or :option:`-X uops <-X>` is enabled. |
| 8559 |
|
| 8560 |
- gh-107526: Revert converting ``vars``, ``dir``, ``next``, ``getattr``, and |
| 8561 |
``iter`` to argument clinic. |
| 8562 |
|
| 8563 |
- gh-84805: Autogenerate signature for :c:macro:`METH_NOARGS` and |
| 8564 |
:c:macro:`METH_O` extension functions. |
| 8565 |
|
| 8566 |
- gh-107758: Make the ``dump_stack()`` routine used by the ``lltrace`` |
| 8567 |
feature (low-level interpreter debugging) robust against recursion by |
| 8568 |
ensuring that it never calls a ``__repr__`` method implemented in Python. |
| 8569 |
Also make the similar output for Tier-2 uops appear on ``stdout`` (instead |
| 8570 |
of ``stderr``), to match the ``lltrace`` code in ceval.c. |
| 8571 |
|
| 8572 |
- gh-107659: Add docstrings for :func:`ctypes.pointer` and |
| 8573 |
:func:`ctypes.POINTER`. |
| 8574 |
|
| 8575 |
- gh-105848: Modify the bytecode so that the actual callable for a |
| 8576 |
:opcode:`CALL` is at a consistent position on the stack (regardless of |
| 8577 |
whether or not bound-method-calling optimizations are active). |
| 8578 |
|
| 8579 |
- gh-107674: Fixed performance regression in ``sys.settrace``. |
| 8580 |
|
| 8581 |
- gh-107724: In pre-release versions of 3.12, up to rc1, the sys.monitoring |
| 8582 |
callback function for the ``PY_THROW`` event was missing the third, |
| 8583 |
exception argument. That is now fixed. |
| 8584 |
|
| 8585 |
- gh-84436: Skip reference count modifications for many known immortal |
| 8586 |
objects. |
| 8587 |
|
| 8588 |
- gh-107596: Specialize subscripting :class:`str` objects by :class:`int` |
| 8589 |
indexes. |
| 8590 |
|
| 8591 |
- gh-107080: Trace refs builds (``--with-trace-refs``) were crashing when |
| 8592 |
used with isolated subinterpreters. The problematic global state has been |
| 8593 |
isolated to each interpreter. Other fixing the crashes, this change does |
| 8594 |
not affect users. |
| 8595 |
|
| 8596 |
- gh-107557: Generate the cases needed for the barebones tier 2 abstract |
| 8597 |
interpreter for optimization passes in CPython. |
| 8598 |
|
| 8599 |
- gh-106608: Make ``_PyUOpExecutorObject`` variable length. |
| 8600 |
|
| 8601 |
- gh-100964: Clear generators' exception state after ``return`` to break |
| 8602 |
reference cycles. |
| 8603 |
|
| 8604 |
- gh-107455: Improve error messages when converting an incompatible type to |
| 8605 |
:class:`ctypes.c_char_p`, :class:`ctypes.c_wchar_p` and |
| 8606 |
:class:`ctypes.c_void_p`. |
| 8607 |
|
| 8608 |
- gh-107263: Increase C recursion limit for functions other than the main |
| 8609 |
interpreter from 800 to 1500. This should allow functions like |
| 8610 |
``list.__repr__`` and ``json.dumps`` to handle all the inputs that they |
| 8611 |
could prior to 3.12 |
| 8612 |
|
| 8613 |
- gh-104584: Fix an issue which caused incorrect inline caches to be read |
| 8614 |
when running with :envvar:`PYTHONUOPS` or :option:`-X uops <-X>` enabled. |
| 8615 |
|
| 8616 |
- gh-104432: Fix potential unaligned memory access on C APIs involving |
| 8617 |
returned sequences of ``char *`` pointers within the :mod:`grp` and |
| 8618 |
:mod:`socket` modules. These were revealed using a |
| 8619 |
``-fsaniziter=alignment`` build on ARM macOS. Patch by Christopher Chavez. |
| 8620 |
|
| 8621 |
- gh-106078: Isolate :mod:`!_decimal` (apply :pep:`687`). Patch by Charlie |
| 8622 |
Zhao. |
| 8623 |
|
| 8624 |
- gh-106898: Add the exception as the third argument to ``PY_UNIND`` |
| 8625 |
callbacks in ``sys.monitoring``. This makes the ``PY_UNWIND`` callback |
| 8626 |
consistent with the other exception handling callbacks. |
| 8627 |
|
| 8628 |
- gh-106895: Raise a ``ValueError`` when a monitoring callback function |
| 8629 |
returns ``DISABLE`` for events that cannot be disabled locally. |
| 8630 |
|
| 8631 |
- gh-106897: Add a ``RERAISE`` event to ``sys.monitoring``, which occurs |
| 8632 |
when an exception is reraise, either explicitly by a plain ``raise`` |
| 8633 |
statement, or implicitly in an ``except`` or ``finally`` block. |
| 8634 |
|
| 8635 |
- gh-77377: Ensure that multiprocessing synchronization objects created in a |
| 8636 |
fork context are not sent to a different process created in a spawn |
| 8637 |
context. This changes a segfault into an actionable RuntimeError in the |
| 8638 |
parent process. |
| 8639 |
|
| 8640 |
- gh-106931: Statically allocated string objects are now interned globally |
| 8641 |
instead of per-interpreter. This fixes a situation where such a string |
| 8642 |
would only be interned in a single interpreter. Normal string objects are |
| 8643 |
unaffected. |
| 8644 |
|
| 8645 |
- gh-104621: Unsupported modules now always fail to be imported. |
| 8646 |
|
| 8647 |
- gh-107122: Add :meth:`dbm.ndbm.ndbm.clear` to :mod:`dbm.ndbm`. Patch By |
| 8648 |
Donghee Na. |
| 8649 |
|
| 8650 |
- gh-107122: Add :meth:`dbm.gnu.gdbm.clear` to :mod:`dbm.gnu`. Patch By |
| 8651 |
Donghee Na. |
| 8652 |
|
| 8653 |
- gh-107015: The ASYNC and AWAIT tokens are removed from the Grammar, which |
| 8654 |
removes the possibility of making ``async`` and ``await`` soft keywords |
| 8655 |
when using ``feature_version<7`` in :func:`ast.parse`. |
| 8656 |
|
| 8657 |
- gh-106917: Fix classmethod-style :func:`super` method calls (i.e., where |
| 8658 |
the second argument to :func:`super`, or the implied second argument drawn |
| 8659 |
from ``self/cls`` in the case of zero-arg super, is a type) when the |
| 8660 |
target of the call is not a classmethod. |
| 8661 |
|
| 8662 |
- gh-105699: Python no longer crashes due an infrequent race when |
| 8663 |
initializing per-interpreter interned strings. The crash would manifest |
| 8664 |
when the interpreter was finalized. |
| 8665 |
|
| 8666 |
- gh-105699: Python no longer crashes due to an infrequent race in setting |
| 8667 |
``Py_FileSystemDefaultEncoding`` and ``Py_FileSystemDefaultEncodeErrors`` |
| 8668 |
(both deprecated), when simultaneously initializing two isolated |
| 8669 |
subinterpreters. Now they are only set during runtime initialization. |
| 8670 |
|
| 8671 |
- gh-106908: Fix various hangs, reference leaks, test failures, and |
| 8672 |
tracing/introspection bugs when running with :envvar:`PYTHONUOPS` or |
| 8673 |
:option:`-X uops <-X>` enabled. |
| 8674 |
|
| 8675 |
- gh-106092: Fix a segmentation fault caused by a use-after-free bug in |
| 8676 |
``frame_dealloc`` when the trashcan delays the deallocation of a |
| 8677 |
``PyFrameObject``. |
| 8678 |
|
| 8679 |
- gh-106485: Reduce the number of materialized instances dictionaries by |
| 8680 |
dematerializing them when possible. |
| 8681 |
|
| 8682 |
- gh-106719: No longer suppress arbitrary errors in the ``__annotations__`` |
| 8683 |
getter and setter in the type and module types. |
| 8684 |
|
| 8685 |
- gh-106723: Propagate ``frozen_modules`` to multiprocessing spawned process |
| 8686 |
interpreters. |
| 8687 |
|
| 8688 |
- gh-104909: Split :opcode:`LOAD_ATTR_INSTANCE_VALUE` into micro-ops. |
| 8689 |
|
| 8690 |
- gh-104909: Split :opcode:`LOAD_GLOBAL` specializations into micro-ops. |
| 8691 |
|
| 8692 |
- gh-106597: A new debug structure of offsets has been added to the |
| 8693 |
``_PyRuntimeState`` that will help out-of-process debuggers and profilers |
| 8694 |
to obtain the offsets to relevant interpreter structures in a way that is |
| 8695 |
agnostic of how Python was compiled and that doesn't require copying the |
| 8696 |
headers. Patch by Pablo Galindo |
| 8697 |
|
| 8698 |
- gh-106487: Allow the *count* argument of :meth:`str.replace` to be a |
| 8699 |
keyword. Patch by Hugo van Kemenade. |
| 8700 |
|
| 8701 |
- gh-96844: Improve error message of :meth:`list.remove`. Patch by Donghee |
| 8702 |
Na. |
| 8703 |
|
| 8704 |
- gh-81283: Compiler now strips indents from docstrings. It reduces ``pyc`` |
| 8705 |
file size 5% when the module is heavily documented. This change affects to |
| 8706 |
``__doc__`` so tools like doctest will be affected. |
| 8707 |
|
| 8708 |
- gh-106396: When the format specification of an f-string expression is |
| 8709 |
empty, the parser now generates an empty :class:`ast.JoinedStr` node for |
| 8710 |
it instead of an one-element :class:`ast.JoinedStr` with an empty string |
| 8711 |
:class:`ast.Constant`. |
| 8712 |
|
| 8713 |
- gh-100288: Specialize :opcode:`LOAD_ATTR` for non-descriptors on the |
| 8714 |
class. Adds :opcode:`LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES` and |
| 8715 |
:opcode:`LOAD_ATTR_NONDESCRIPTOR_NO_DICT`. |
| 8716 |
|
| 8717 |
- gh-106008: Fix possible reference leaks when failing to optimize |
| 8718 |
comparisons with :const:`None` in the bytecode compiler. |
| 8719 |
|
| 8720 |
- gh-106145: Make ``end_lineno`` and ``end_col_offset`` required on |
| 8721 |
``type_param`` ast nodes. |
| 8722 |
|
| 8723 |
- gh-106213: Changed the way that Emscripten call trampolines work for |
| 8724 |
compatibility with Wasm/JS Promise integration. |
| 8725 |
|
| 8726 |
- gh-106182: :func:`sys.getfilesystemencoding` and |
| 8727 |
:mod:`sys.getfilesystemencodeerrors` now return interned Unicode object. |
| 8728 |
|
| 8729 |
- gh-106210: Removed Emscripten import trampoline as it was no longer |
| 8730 |
necessary for Pyodide. |
| 8731 |
|
| 8732 |
- gh-104584: Added a new, experimental, tracing optimizer and interpreter |
| 8733 |
(a.k.a. "tier 2"). This currently pessimizes, so don't use yet -- this is |
| 8734 |
infrastructure so we can experiment with optimizing passes. To enable it, |
| 8735 |
pass ``-Xuops`` or set ``PYTHONUOPS=1``. To get debug output, set |
| 8736 |
``PYTHONUOPSDEBUG=N`` where ``N`` is a debug level (0-4, where 0 is no |
| 8737 |
debug output and 4 is excessively verbose). |
| 8738 |
|
| 8739 |
- gh-105775: :opcode:`LOAD_CLOSURE` is now a pseudo-op. |
| 8740 |
|
| 8741 |
- gh-105730: Allow any callable other than type objects as the condition |
| 8742 |
predicate in :meth:`BaseExceptionGroup.split` and |
| 8743 |
:meth:`BaseExceptionGroup.subgroup`. |
| 8744 |
|
| 8745 |
- gh-105979: Fix crash in :func:`!_imp.get_frozen_object` due to improper |
| 8746 |
exception handling. |
| 8747 |
|
| 8748 |
- gh-106003: Add a new :opcode:`TO_BOOL` instruction, which performs boolean |
| 8749 |
conversions for :opcode:`POP_JUMP_IF_TRUE`, :opcode:`POP_JUMP_IF_FALSE`, |
| 8750 |
and :opcode:`UNARY_NOT` (which all expect exact :class:`bool` values now). |
| 8751 |
Also, modify the oparg of :opcode:`COMPARE_OP` to include an optional |
| 8752 |
"boolean conversion" flag. |
| 8753 |
|
| 8754 |
- gh-98931: Ensure custom :exc:`SyntaxError` error messages are raised for |
| 8755 |
invalid imports with multiple targets. Patch by Pablo Galindo |
| 8756 |
|
| 8757 |
- gh-105724: Improve ``assert`` error messages by providing exact error |
| 8758 |
range. |
| 8759 |
|
| 8760 |
- gh-105908: Fixed bug where :gh:`99111` breaks future import |
| 8761 |
``barry_as_FLUFL`` in the Python REPL. |
| 8762 |
|
| 8763 |
- gh-105840: Fix possible crashes when specializing function calls with too |
| 8764 |
many ``__defaults__``. |
| 8765 |
|
| 8766 |
- gh-105831: Fix an f-string bug, where using a debug expression (the ``=`` |
| 8767 |
sign) that appears in the last line of a file results to the debug buffer |
| 8768 |
that holds the expression text being one character too small. |
| 8769 |
|
| 8770 |
- gh-105800: Correctly issue :exc:`SyntaxWarning` in f-strings if invalid |
| 8771 |
sequences are used. Patch by Pablo Galindo |
| 8772 |
|
| 8773 |
- gh-105340: Include the comprehension iteration variable in ``locals()`` |
| 8774 |
inside a module- or class-scope comprehension. |
| 8775 |
|
| 8776 |
- gh-105331: Raise :exc:`ValueError` if the ``delay`` argument to |
| 8777 |
:func:`asyncio.sleep` is a NaN (matching :func:`time.sleep`). |
| 8778 |
|
| 8779 |
- gh-105587: The runtime can't guarantee that immortal objects will not be |
| 8780 |
mutated by Extensions. Thus, this modifies _PyStaticObject_CheckRefcnt to |
| 8781 |
warn instead of asserting. |
| 8782 |
|
| 8783 |
- gh-105564: Don't include artificil newlines in the ``line`` attribute of |
| 8784 |
tokens in the APIs of the :mod:`tokenize` module. Patch by Pablo Galindo |
| 8785 |
|
| 8786 |
- gh-105549: Tokenize separately ``NUMBER`` and ``NAME`` tokens that are not |
| 8787 |
ambiguous. Patch by Pablo Galindo. |
| 8788 |
|
| 8789 |
- gh-105588: Fix an issue that could result in crashes when compiling |
| 8790 |
malformed :mod:`ast` nodes. |
| 8791 |
|
| 8792 |
- gh-100987: Allow objects other than code objects as the "executable" in |
| 8793 |
internal frames. In the long term, this can help tools like Cython and |
| 8794 |
PySpy interact more efficiently. In the shorter term, it allows us to |
| 8795 |
perform some optimizations more simply. |
| 8796 |
|
| 8797 |
- gh-105375: Fix bugs in the :mod:`builtins` module where exceptions could |
| 8798 |
end up being overwritten. |
| 8799 |
|
| 8800 |
- gh-105375: Fix bug in the compiler where an exception could end up being |
| 8801 |
overwritten. |
| 8802 |
|
| 8803 |
- gh-105375: Improve error handling in :c:func:`PyUnicode_BuildEncodingMap` |
| 8804 |
where an exception could end up being overwritten. |
| 8805 |
|
| 8806 |
- gh-105486: Change the repr of ``ParamSpec`` list of args in |
| 8807 |
``types.GenericAlias``. |
| 8808 |
|
| 8809 |
- gh-105678: Break the ``MAKE_FUNCTION`` instruction into two parts, |
| 8810 |
``MAKE_FUNCTION`` which makes the function and ``SET_FUNCTION_ATTRIBUTE`` |
| 8811 |
which sets the attributes on the function. This makes the stack effect of |
| 8812 |
``MAKE_FUNCTION`` regular to ease optimization and code generation. |
| 8813 |
|
| 8814 |
- gh-105435: Fix spurious newline character if file ends on a comment |
| 8815 |
without a newline. Patch by Pablo Galindo |
| 8816 |
|
| 8817 |
- gh-105390: Correctly raise :exc:`tokenize.TokenError` exceptions instead |
| 8818 |
of :exc:`SyntaxError` for tokenize errors such as incomplete input. Patch |
| 8819 |
by Pablo Galindo |
| 8820 |
|
| 8821 |
- gh-105259: Don't include newline character for trailing ``NEWLINE`` tokens |
| 8822 |
emitted in the :mod:`tokenize` module. Patch by Pablo Galindo |
| 8823 |
|
| 8824 |
- gh-104635: Eliminate redundant :opcode:`STORE_FAST` instructions in the |
| 8825 |
compiler. Patch by Donghee Na and Carl Meyer. |
| 8826 |
|
| 8827 |
- gh-105324: Fix the main function of the :mod:`tokenize` module when |
| 8828 |
reading from ``sys.stdin``. Patch by Pablo Galindo |
| 8829 |
|
| 8830 |
- gh-33092: Simplify and speed up interpreter for f-strings. Removes |
| 8831 |
``FORMAT_VALUE`` opcode. Add ``CONVERT_VALUE``, ``FORMAT_SIMPLE`` and |
| 8832 |
``FORMAT_WITH_SPEC`` opcode. Compiler emits more efficient sequence for |
| 8833 |
each format expression. |
| 8834 |
|
| 8835 |
- gh-105229: Remove remaining two-codeunit superinstructions. All remaining |
| 8836 |
superinstructions only take a single codeunit, simplifying instrumentation |
| 8837 |
and quickening. |
| 8838 |
|
| 8839 |
- gh-105235: Prevent out-of-bounds memory access during ``mmap.find()`` |
| 8840 |
calls. |
| 8841 |
|
| 8842 |
- gh-98963: Restore the ability for a subclass of :class:`property` to |
| 8843 |
define ``__slots__`` or otherwise be dict-less by ignoring failures to set |
| 8844 |
a docstring on such a class. This behavior had regressed in 3.12beta1. |
| 8845 |
An :exc:`AttributeError` where there had not previously been one was |
| 8846 |
disruptive to existing code. |
| 8847 |
|
| 8848 |
- gh-104812: The "pending call" machinery now works for all interpreters, |
| 8849 |
not just the main interpreter, and runs in all threads, not just the main |
| 8850 |
thread. Some calls are still only done in the main thread, ergo in the |
| 8851 |
main interpreter. This change does not affect signal handling nor the |
| 8852 |
existing public C-API (``Py_AddPendingCall()``), which both still only |
| 8853 |
target the main thread. The new functionality is meant strictly for |
| 8854 |
internal use for now, since consequences of its use are not well |
| 8855 |
understood yet outside some very restricted cases. This change brings the |
| 8856 |
capability in line with the intention when the state was made |
| 8857 |
per-interpreter several years ago. |
| 8858 |
|
| 8859 |
- gh-105194: Do not escape with backslashes f-string format specifiers. |
| 8860 |
Patch by Pablo Galindo |
| 8861 |
|
| 8862 |
- gh-105229: Replace some dynamic superinstructions with single instruction |
| 8863 |
equivalents. |
| 8864 |
|
| 8865 |
- gh-105162: Fixed bug in generator.close()/throw() where an inner iterator |
| 8866 |
would be ignored when the outer iterator was instrumented. |
| 8867 |
|
| 8868 |
- gh-105164: Ensure annotations are set up correctly if the only annotation |
| 8869 |
in a block is within a :keyword:`match` block. Patch by Jelle Zijlstra. |
| 8870 |
|
| 8871 |
- gh-105148: Make ``_PyASTOptimizeState`` internal to ast_opt.c. Make |
| 8872 |
``_PyAST_Optimize`` take two integers instead of a pointer to this struct. |
| 8873 |
This avoids the need to include pycore_compile.h in ast_opt.c. |
| 8874 |
|
| 8875 |
- gh-104799: Attributes of :mod:`ast` nodes that are lists now default to |
| 8876 |
the empty list if omitted. This means that some code that previously |
| 8877 |
raised :exc:`TypeError` when the AST node was used will now proceed with |
| 8878 |
the empty list instead. Patch by Jelle Zijlstra. |
| 8879 |
|
| 8880 |
- gh-105111: Remove the old trashcan macros ``Py_TRASHCAN_SAFE_BEGIN`` and |
| 8881 |
``Py_TRASHCAN_SAFE_END``. They should be replaced by the new macros |
| 8882 |
``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``. |
| 8883 |
|
| 8884 |
- gh-105035: Fix :func:`super` calls on types with custom |
| 8885 |
:c:member:`~PyTypeObject.tp_getattro` implementation (e.g. meta-types.) |
| 8886 |
|
| 8887 |
- gh-105017: Show CRLF lines in the tokenize string attribute in both NL and |
| 8888 |
NEWLINE tokens. Patch by Marta Gómez. |
| 8889 |
|
| 8890 |
- gh-105013: Fix handling of multiline parenthesized lambdas in |
| 8891 |
:func:`inspect.getsource`. Patch by Pablo Galindo |
| 8892 |
|
| 8893 |
- gh-105017: Do not include an additional final ``NL`` token when parsing |
| 8894 |
files having CRLF lines. Patch by Marta Gómez. |
| 8895 |
|
| 8896 |
- gh-104976: Ensure that trailing ``DEDENT`` :class:`tokenize.TokenInfo` |
| 8897 |
objects emitted by the :mod:`tokenize` module are reported as in Python |
| 8898 |
3.11. Patch by Pablo Galindo |
| 8899 |
|
| 8900 |
- gh-104972: Ensure that the ``line`` attribute in |
| 8901 |
:class:`tokenize.TokenInfo` objects in the :mod:`tokenize` module are |
| 8902 |
always correct. Patch by Pablo Galindo |
| 8903 |
|
| 8904 |
- gh-104955: Fix signature for the new :meth:`~object.__release_buffer__` |
| 8905 |
slot. Patch by Jelle Zijlstra. |
| 8906 |
|
| 8907 |
- gh-104690: Starting new threads and process creation through |
| 8908 |
:func:`os.fork` during interpreter shutdown (such as from :mod:`atexit` |
| 8909 |
handlers) is no longer supported. It can lead to race condition between |
| 8910 |
the main Python runtime thread freeing thread states while internal |
| 8911 |
:mod:`threading` routines are trying to allocate and use the state of just |
| 8912 |
created threads. Or forked children trying to use the mid-shutdown runtime |
| 8913 |
and thread state in the child process. |
| 8914 |
|
| 8915 |
- gh-104879: Fix crash when accessing the ``__module__`` attribute of type |
| 8916 |
aliases defined outside a module. Patch by Jelle Zijlstra. |
| 8917 |
|
| 8918 |
- gh-104825: Tokens emitted by the :mod:`tokenize` module do not include an |
| 8919 |
implicit ``\n`` character in the ``line`` attribute anymore. Patch by |
| 8920 |
Pablo Galindo |
| 8921 |
|
| 8922 |
- gh-104770: If a generator returns a value upon being closed, the value is |
| 8923 |
now returned by :meth:`generator.close`. |
| 8924 |
|
| 8925 |
- gh-89091: Raise :exc:`RuntimeWarning` for unawaited async generator |
| 8926 |
methods like :meth:`~agen.asend`, :meth:`~agen.athrow` and |
| 8927 |
:meth:`~agen.aclose`. Patch by Kumar Aditya. |
| 8928 |
|
| 8929 |
- gh-96663: Add a better, more introspect-able error message when setting |
| 8930 |
attributes on classes without a ``__dict__`` and no slot member for the |
| 8931 |
attribute. |
| 8932 |
|
| 8933 |
- gh-93627: Update the Python pickle module implementation to match the C |
| 8934 |
implementation of the pickle module. For objects setting reduction methods |
| 8935 |
like :meth:`~object.__reduce_ex__` or :meth:`~object.__reduce__` to |
| 8936 |
``None``, pickling will result in a :exc:`TypeError`. |
| 8937 |
|
| 8938 |
- gh-101006: Improve error handling when read :mod:`marshal` data. |
| 8939 |
|
| 8940 |
- gh-91095: Specializes calls to most Python classes. Specifically, any |
| 8941 |
class that inherits from ``object``, or another Python class, and does not |
| 8942 |
override ``__new__``. |
| 8943 |
|
| 8944 |
The specialized instruction does the following: |
| 8945 |
|
| 8946 |
1. Creates the object (by calling ``object.__new__``) |
| 8947 |
2. Pushes a shim frame to the frame stack (to cleanup after ``__init__``) |
| 8948 |
3. Pushes the frame for ``__init__`` to the frame stack |
| 8949 |
|
| 8950 |
Speeds up the instantiation of most Python classes. |
| 8951 |
|
| 8952 |
Library |
| 8953 |
------- |
| 8954 |
|
| 8955 |
- gh-110786: :mod:`sysconfig`'s CLI now ignores :exc:`BrokenPipeError`, |
| 8956 |
making it exit normally if its output is being piped and the pipe closes. |
| 8957 |
|
| 8958 |
- gh-103480: The :mod:`sysconfig` module is now a package, instead of a |
| 8959 |
single-file module. |
| 8960 |
|
| 8961 |
- gh-110733: Micro-optimization: Avoid calling ``min()``, ``max()`` in |
| 8962 |
:meth:`BaseEventLoop._run_once`. |
| 8963 |
|
| 8964 |
- gh-94597: Added :class:`asyncio.EventLoop` for use with the |
| 8965 |
:func:`asyncio.run` *loop_factory* kwarg to avoid calling the asyncio |
| 8966 |
policy system. |
| 8967 |
|
| 8968 |
- gh-110682: :func:`runtime-checkable protocols <typing.runtime_checkable>` |
| 8969 |
used to consider ``__match_args__`` a protocol member in |
| 8970 |
``__instancecheck__`` if it was present on the protocol. Now, this |
| 8971 |
attribute is ignored if it is present. |
| 8972 |
|
| 8973 |
- gh-110488: Fix a couple of issues in :meth:`pathlib.PurePath.with_name`: a |
| 8974 |
single dot was incorrectly considered a valid name, and in |
| 8975 |
:class:`PureWindowsPath`, a name with an NTFS alternate data stream, like |
| 8976 |
``a:b``, was incorrectly considered invalid. |
| 8977 |
|
| 8978 |
- gh-110590: Fix a bug in :meth:`!_sre.compile` where :exc:`TypeError` would |
| 8979 |
be overwritten by :exc:`OverflowError` when the *code* argument was a list |
| 8980 |
of non-ints. |
| 8981 |
|
| 8982 |
- gh-65052: Prevent :mod:`pdb` from crashing when trying to display |
| 8983 |
undisplayable objects |
| 8984 |
|
| 8985 |
- gh-110519: Deprecation warning about non-integer number in :mod:`gettext` |
| 8986 |
now always refers to the line in the user code where gettext function or |
| 8987 |
method is used. Previously it could refer to a line in ``gettext`` code. |
| 8988 |
|
| 8989 |
- gh-89902: Deprecate non-standard format specifier "N" for |
| 8990 |
:class:`decimal.Decimal`. It was not documented and only supported in the |
| 8991 |
C implementation. |
| 8992 |
|
| 8993 |
- gh-110378: :func:`~contextlib.contextmanager` and |
| 8994 |
:func:`~contextlib.asynccontextmanager` context managers now close an |
| 8995 |
invalid underlying generator object that yields more then one value. |
| 8996 |
|
| 8997 |
- gh-106670: In :mod:`pdb`, set convenience variable ``$_exception`` for |
| 8998 |
post mortem debugging. |
| 8999 |
|
| 9000 |
- gh-110365: Fix :func:`termios.tcsetattr` bug that was overwriting existing |
| 9001 |
errors during parsing integers from ``term`` list. |
| 9002 |
|
| 9003 |
- gh-109653: Slightly improve the import time of several standard-library |
| 9004 |
modules by deferring imports of :mod:`warnings` within those modules. |
| 9005 |
Patch by Alex Waygood. |
| 9006 |
|
| 9007 |
- gh-110273: :func:`dataclasses.replace` now raises TypeError instead of |
| 9008 |
ValueError if specify keyword argument for a field declared with |
| 9009 |
init=False or miss keyword argument for required InitVar field. |
| 9010 |
|
| 9011 |
- gh-110249: Add ``--inline-caches`` flag to ``dis`` command line. |
| 9012 |
|
| 9013 |
- gh-109653: Fix a Python 3.12 regression in the import time of |
| 9014 |
:mod:`random`. Patch by Alex Waygood. |
| 9015 |
|
| 9016 |
- gh-110222: Add support of struct sequence objects in :func:`copy.replace`. |
| 9017 |
Patched by Xuehai Pan. |
| 9018 |
|
| 9019 |
- gh-109649: :mod:`multiprocessing`, :mod:`concurrent.futures`, |
| 9020 |
:mod:`compileall`: Replace :func:`os.cpu_count` with |
| 9021 |
:func:`os.process_cpu_count` to select the default number of worker |
| 9022 |
threads and processes. Get the CPU affinity if supported. Patch by Victor |
| 9023 |
Stinner. |
| 9024 |
|
| 9025 |
- gh-110150: Fix base case handling in statistics.quantiles. Now allows a |
| 9026 |
single data point. |
| 9027 |
|
| 9028 |
- gh-110036: On Windows, multiprocessing ``Popen.terminate()`` now catches |
| 9029 |
:exc:`PermissionError` and get the process exit code. If the process is |
| 9030 |
still running, raise again the :exc:`PermissionError`. Otherwise, the |
| 9031 |
process terminated as expected: store its exit code. Patch by Victor |
| 9032 |
Stinner. |
| 9033 |
|
| 9034 |
- gh-110038: Fixed an issue that caused :meth:`KqueueSelector.select` to not |
| 9035 |
return all the ready events in some cases when a file descriptor is |
| 9036 |
registered for both read and write. |
| 9037 |
|
| 9038 |
- gh-110045: Update the :mod:`symtable` module to support the new scopes |
| 9039 |
introduced by :pep:`695`. |
| 9040 |
|
| 9041 |
- gh-88402: Add new variables to :py:meth:`sysconfig.get_config_vars` on |
| 9042 |
Windows: ``LIBRARY``, ``LDLIBRARY``, ``LIBDIR``, ``SOABI``, and |
| 9043 |
``Py_NOGIL``. |
| 9044 |
|
| 9045 |
- gh-109631: :mod:`re` functions such as :func:`re.findall`, |
| 9046 |
:func:`re.split`, :func:`re.search` and :func:`re.sub` which perform short |
| 9047 |
repeated matches can now be interrupted by user. |
| 9048 |
|
| 9049 |
- gh-109653: Reduce the import time of :mod:`email.utils` by around 43%. |
| 9050 |
This results in the import time of :mod:`email.message` falling by around |
| 9051 |
18%, which in turn reduces the import time of :mod:`importlib.metadata` by |
| 9052 |
around 6%. Patch by Alex Waygood. |
| 9053 |
|
| 9054 |
- gh-109818: Fix :func:`reprlib.recursive_repr` not copying |
| 9055 |
``__type_params__`` from decorated function. |
| 9056 |
|
| 9057 |
- gh-109047: :mod:`concurrent.futures`: The *executor manager thread* now |
| 9058 |
catches exceptions when adding an item to the *call queue*. During Python |
| 9059 |
finalization, creating a new thread can now raise :exc:`RuntimeError`. |
| 9060 |
Catch the exception and call ``terminate_broken()`` in this case. Patch by |
| 9061 |
Victor Stinner. |
| 9062 |
|
| 9063 |
- gh-109782: Ensure the signature of :func:`os.path.isdir` is identical on |
| 9064 |
all platforms. Patch by Amin Alaee. |
| 9065 |
|
| 9066 |
- gh-109653: Improve import time of :mod:`functools` by around 13%. Patch by |
| 9067 |
Alex Waygood. |
| 9068 |
|
| 9069 |
- gh-109590: :func:`shutil.which` will prefer files with an extension in |
| 9070 |
``PATHEXT`` if the given mode includes ``os.X_OK`` on win32. If no |
| 9071 |
``PATHEXT`` match is found, a file without an extension in ``PATHEXT`` can |
| 9072 |
be returned. This change will have :func:`shutil.which` act more similarly |
| 9073 |
to previous behavior in Python 3.11. |
| 9074 |
|
| 9075 |
- gh-109653: Reduce the import time of :mod:`enum` by over 50%. Patch by |
| 9076 |
Alex Waygood. |
| 9077 |
|
| 9078 |
- gh-109593: Avoid deadlocking on a reentrant call to the multiprocessing |
| 9079 |
resource tracker. Such a reentrant call, though unlikely, can happen if a |
| 9080 |
GC pass invokes the finalizer for a multiprocessing object such as |
| 9081 |
SemLock. |
| 9082 |
|
| 9083 |
- gh-109653: Reduce the import time of :mod:`typing` by around a third. |
| 9084 |
Patch by Alex Waygood. |
| 9085 |
|
| 9086 |
- gh-109649: Add :func:`os.process_cpu_count` function to get the number of |
| 9087 |
logical CPUs usable by the calling thread of the current process. Patch by |
| 9088 |
Victor Stinner. |
| 9089 |
|
| 9090 |
- gh-74481: Add ``set_error_mode`` related constants in ``msvcrt`` module in |
| 9091 |
Python debug build. |
| 9092 |
|
| 9093 |
- gh-109613: Fix :func:`os.stat` and :meth:`os.DirEntry.stat`: check for |
| 9094 |
exceptions. Previously, on Python built in debug mode, these functions |
| 9095 |
could trigger a fatal Python error (and abort the process) when a function |
| 9096 |
succeeded with an exception set. Patch by Victor Stinner. |
| 9097 |
|
| 9098 |
- gh-109599: Expose the type of PyCapsule objects as ``types.CapsuleType``. |
| 9099 |
|
| 9100 |
- gh-109109: You can now get the raw TLS certificate chains from TLS |
| 9101 |
connections via :meth:`ssl.SSLSocket.get_verified_chain` and |
| 9102 |
:meth:`ssl.SSLSocket.get_unverified_chain` methods. |
| 9103 |
|
| 9104 |
Contributed by Mateusz Nowak. |
| 9105 |
|
| 9106 |
- gh-109559: Update :mod:`unicodedata` database to Unicode 15.1.0. |
| 9107 |
|
| 9108 |
- gh-109543: Remove unnecessary :func:`hasattr` check during |
| 9109 |
:data:`typing.TypedDict` creation. |
| 9110 |
|
| 9111 |
- gh-109495: Remove unnecessary extra ``__slots__`` in |
| 9112 |
:class:`~datetime.datetime`\'s pure python implementation to reduce memory |
| 9113 |
size, as they are defined in the superclass. Patch by James Hilton-Balfe |
| 9114 |
|
| 9115 |
- gh-109461: :mod:`logging`: Use a context manager for lock acquisition. |
| 9116 |
|
| 9117 |
- gh-109096: :class:`http.server.CGIHTTPRequestHandler` has been deprecated |
| 9118 |
for removal in 3.15. Its design is old and the web world has long since |
| 9119 |
moved beyond CGI. |
| 9120 |
|
| 9121 |
- gh-109409: Fix error when it was possible to inherit a frozen dataclass |
| 9122 |
from multiple parents some of which were possibly not frozen. |
| 9123 |
|
| 9124 |
- gh-109375: The :mod:`pdb` ``alias`` command now prevents registering |
| 9125 |
aliases without arguments. |
| 9126 |
|
| 9127 |
- gh-109319: Deprecate the ``dis.HAVE_ARGUMENT`` field in favour of |
| 9128 |
``dis.hasarg``. |
| 9129 |
|
| 9130 |
- gh-107219: Fix a race condition in ``concurrent.futures``. When a process |
| 9131 |
in the process pool was terminated abruptly (while the future was running |
| 9132 |
or pending), close the connection write end. If the call queue is blocked |
| 9133 |
on sending bytes to a worker process, closing the connection write end |
| 9134 |
interrupts the send, so the queue can be closed. Patch by Victor Stinner. |
| 9135 |
|
| 9136 |
- gh-66143: The :class:`codecs.CodecInfo` object has been made copyable and |
| 9137 |
pickleable. Patched by Robert Lehmann and Furkan Onder. |
| 9138 |
|
| 9139 |
- gh-109187: :meth:`pathlib.Path.resolve` now treats symlink loops like |
| 9140 |
other errors: in strict mode, :exc:`OSError` is raised, and in non-strict |
| 9141 |
mode, no exception is raised. |
| 9142 |
|
| 9143 |
- gh-50644: Attempts to pickle or create a shallow or deep copy of |
| 9144 |
:mod:`codecs` streams now raise a TypeError. Previously, copying failed |
| 9145 |
with a RecursionError, while pickling produced wrong results that |
| 9146 |
eventually caused unpickling to fail with a RecursionError. |
| 9147 |
|
| 9148 |
- gh-109174: Add support of :class:`types.SimpleNamespace` in |
| 9149 |
:func:`copy.replace`. |
| 9150 |
|
| 9151 |
- gh-109164: :mod:`pdb`: Replace :mod:`getopt` with :mod:`argparse` for |
| 9152 |
parsing command line arguments. |
| 9153 |
|
| 9154 |
- gh-109151: Enable ``readline`` editing features in the :ref:`sqlite3 |
| 9155 |
command-line interface <sqlite3-cli>` (``python -m sqlite3``). |
| 9156 |
|
| 9157 |
- gh-108987: Fix :func:`_thread.start_new_thread` race condition. If a |
| 9158 |
thread is created during Python finalization, the newly spawned thread now |
| 9159 |
exits immediately instead of trying to access freed memory and lead to a |
| 9160 |
crash. Patch by Victor Stinner. |
| 9161 |
|
| 9162 |
- gh-108682: Enum: require ``names=()`` or ``type=...`` to create an empty |
| 9163 |
enum using the functional syntax. |
| 9164 |
|
| 9165 |
- gh-109033: Exceptions raised by os.utime builtin function now include the |
| 9166 |
related filename |
| 9167 |
|
| 9168 |
- gh-108843: Fix an issue in :func:`ast.unparse` when unparsing f-strings |
| 9169 |
containing many quote types. |
| 9170 |
|
| 9171 |
- gh-108469: :func:`ast.unparse` now supports new :term:`f-string` syntax |
| 9172 |
introduced in Python 3.12. Note that the :term:`f-string` quotes are |
| 9173 |
reselected for simplicity under the new syntax. (Patch by Steven Sun) |
| 9174 |
|
| 9175 |
- gh-108751: Add :func:`copy.replace` function which allows to create a |
| 9176 |
modified copy of an object. It supports named tuples, dataclasses, and |
| 9177 |
many other objects. |
| 9178 |
|
| 9179 |
- gh-108682: Enum: raise :exc:`TypeError` if ``super().__new__()`` is called |
| 9180 |
from a custom ``__new__``. |
| 9181 |
|
| 9182 |
- gh-108278: Deprecate passing the callback callable by keyword for the |
| 9183 |
following :class:`sqlite3.Connection` APIs: |
| 9184 |
|
| 9185 |
* :meth:`~sqlite3.Connection.set_authorizer` |
| 9186 |
* :meth:`~sqlite3.Connection.set_progress_handler` |
| 9187 |
* :meth:`~sqlite3.Connection.set_trace_callback` |
| 9188 |
|
| 9189 |
The affected parameters will become positional-only in Python 3.15. |
| 9190 |
|
| 9191 |
Patch by Erlend E. Aasland. |
| 9192 |
|
| 9193 |
- gh-105829: Fix concurrent.futures.ProcessPoolExecutor deadlock |
| 9194 |
|
| 9195 |
- gh-108295: Fix crashes related to use of weakrefs on |
| 9196 |
:data:`typing.TypeVar`. |
| 9197 |
|
| 9198 |
- gh-108463: Make expressions/statements work as expected in pdb |
| 9199 |
|
| 9200 |
- gh-108277: Add :func:`os.timerfd_create`, :func:`os.timerfd_settime`, |
| 9201 |
:func:`os.timerfd_gettime`, :func:`os.timerfd_settime_ns`, and |
| 9202 |
:func:`os.timerfd_gettime_ns` to provide a low level interface for Linux's |
| 9203 |
timer notification file descriptor. |
| 9204 |
|
| 9205 |
- gh-107811: :mod:`tarfile`: extraction of members with overly large UID or |
| 9206 |
GID (e.g. on an OS with 32-bit :c:type:`!id_t`) now fails in the same way |
| 9207 |
as failing to set the ID. |
| 9208 |
|
| 9209 |
- gh-64662: Fix support for virtual tables in |
| 9210 |
:meth:`sqlite3.Connection.iterdump`. Patch by Aviv Palivoda. |
| 9211 |
|
| 9212 |
- gh-108111: Fix a regression introduced in GH-101251 for 3.12, resulting in |
| 9213 |
an incorrect offset calculation in :meth:`gzip.GzipFile.seek`. |
| 9214 |
|
| 9215 |
- gh-108294: :func:`time.sleep` now raises an auditing event. |
| 9216 |
|
| 9217 |
- gh-108278: Deprecate passing name, number of arguments, and the callable |
| 9218 |
as keyword arguments, for the following :class:`sqlite3.Connection` APIs: |
| 9219 |
|
| 9220 |
* :meth:`~sqlite3.Connection.create_function` |
| 9221 |
* :meth:`~sqlite3.Connection.create_aggregate` |
| 9222 |
|
| 9223 |
The affected parameters will become positional-only in Python 3.15. |
| 9224 |
|
| 9225 |
Patch by Erlend E. Aasland. |
| 9226 |
|
| 9227 |
- gh-108322: Speed-up NormalDist.samples() by using the inverse CDF method |
| 9228 |
instead of calling random.gauss(). |
| 9229 |
|
| 9230 |
- gh-83417: Add the ability for venv to create a ``.gitignore`` file which |
| 9231 |
causes the created environment to be ignored by Git. It is on by default |
| 9232 |
when venv is called via its CLI. |
| 9233 |
|
| 9234 |
- gh-105736: Harmonized the pure Python version of |
| 9235 |
:class:`~collections.OrderedDict` with the C version. Now, both versions |
| 9236 |
set up their internal state in ``__new__``. Formerly, the pure Python |
| 9237 |
version did the set up in ``__init__``. |
| 9238 |
|
| 9239 |
- gh-108083: Fix bugs in the constructor of :mod:`sqlite3.Connection` and |
| 9240 |
:meth:`sqlite3.Connection.close` where exceptions could be leaked. Patch |
| 9241 |
by Erlend E. Aasland. |
| 9242 |
|
| 9243 |
- gh-107932: Fix ``dis`` module to properly report and display bytecode that |
| 9244 |
do not have source lines. |
| 9245 |
|
| 9246 |
- gh-105539: :mod:`sqlite3` now emits an :exc:`ResourceWarning` if a |
| 9247 |
:class:`sqlite3.Connection` object is not :meth:`closed |
| 9248 |
<sqlite3.connection.close>` explicitly. Patch by Erlend E. Aasland. |
| 9249 |
|
| 9250 |
- gh-107995: The ``__module__`` attribute on instances of |
| 9251 |
:class:`functools.cached_property` is now set to the name of the module in |
| 9252 |
which the cached_property is defined, rather than "functools". This means |
| 9253 |
that doctests in ``cached_property`` docstrings are now properly collected |
| 9254 |
by the :mod:`doctest` module. Patch by Tyler Smart. |
| 9255 |
|
| 9256 |
- gh-107963: Fix :func:`multiprocessing.set_forkserver_preload` to check the |
| 9257 |
given list of modules names. Patch by Donghee Na. |
| 9258 |
|
| 9259 |
- gh-106242: Fixes :func:`os.path.normpath` to handle embedded null |
| 9260 |
characters without truncating the path. |
| 9261 |
|
| 9262 |
- gh-81555: :mod:`xml.dom.minidom` now only quotes ``"`` in attributes. |
| 9263 |
|
| 9264 |
- gh-50002: :mod:`xml.dom.minidom` now preserves whitespaces in attributes. |
| 9265 |
|
| 9266 |
- gh-93057: Passing more than one positional argument to |
| 9267 |
:func:`sqlite3.connect` and the :class:`sqlite3.Connection` constructor is |
| 9268 |
deprecated. The remaining parameters will become keyword-only in Python |
| 9269 |
3.15. Patch by Erlend E. Aasland. |
| 9270 |
|
| 9271 |
- gh-76913: Add *merge_extra* parameter/feature to |
| 9272 |
:class:`logging.LoggerAdapter` |
| 9273 |
|
| 9274 |
- gh-107913: Fix possible losses of ``errno`` and ``winerror`` values in |
| 9275 |
:exc:`OSError` exceptions if they were cleared or modified by the cleanup |
| 9276 |
code before creating the exception object. |
| 9277 |
|
| 9278 |
- gh-107845: :func:`tarfile.data_filter` now takes the location of symlinks |
| 9279 |
into account when determining their target, so it will no longer reject |
| 9280 |
some valid tarballs with ``LinkOutsideDestinationError``. |
| 9281 |
|
| 9282 |
- gh-107812: Extend socket's netlink support to the FreeBSD platform. |
| 9283 |
|
| 9284 |
- gh-107805: Fix signatures of module-level generated functions in |
| 9285 |
:mod:`turtle`. |
| 9286 |
|
| 9287 |
- gh-107782: :mod:`pydoc` is now able to show signatures which are not |
| 9288 |
representable in Python, e.g. for ``getattr`` and ``dict.pop``. |
| 9289 |
|
| 9290 |
- gh-56166: Deprecate passing optional arguments *maxsplit*, *count* and |
| 9291 |
*flags* in module-level functions :func:`re.split`, :func:`re.sub` and |
| 9292 |
:func:`re.subn` as positional. They should only be passed by keyword. |
| 9293 |
|
| 9294 |
- gh-107710: Speed up :func:`logging.getHandlerNames`. |
| 9295 |
|
| 9296 |
- gh-107715: Fix :meth:`doctest.DocTestFinder.find` in presence of class |
| 9297 |
names with special characters. Patch by Gertjan van Zwieten. |
| 9298 |
|
| 9299 |
- gh-100814: Passing a callable object as an option value to a Tkinter image |
| 9300 |
now raises the expected TclError instead of an AttributeError. |
| 9301 |
|
| 9302 |
- gh-72684: Add :mod:`tkinter` widget methods: :meth:`!tk_busy_hold`, |
| 9303 |
:meth:`!tk_busy_configure`, :meth:`!tk_busy_cget`, |
| 9304 |
:meth:`!tk_busy_forget`, :meth:`!tk_busy_current`, and |
| 9305 |
:meth:`!tk_busy_status`. |
| 9306 |
|
| 9307 |
- gh-106684: Raise :exc:`ResourceWarning` when :class:`asyncio.StreamWriter` |
| 9308 |
is not closed leading to memory leaks. Patch by Kumar Aditya. |
| 9309 |
|
| 9310 |
- gh-107465: Add :meth:`pathlib.Path.from_uri` classmethod. |
| 9311 |
|
| 9312 |
- gh-107077: Seems that in some conditions, OpenSSL will return |
| 9313 |
``SSL_ERROR_SYSCALL`` instead of ``SSL_ERROR_SSL`` when a certification |
| 9314 |
verification has failed, but the error parameters will still contain |
| 9315 |
``ERR_LIB_SSL`` and ``SSL_R_CERTIFICATE_VERIFY_FAILED``. We are now |
| 9316 |
detecting this situation and raising the appropriate |
| 9317 |
``ssl.SSLCertVerificationError``. Patch by Pablo Galindo |
| 9318 |
|
| 9319 |
- gh-107576: Fix :func:`types.get_original_bases` to only return |
| 9320 |
:attr:`!__orig_bases__` if it is present on ``cls`` directly. Patch by |
| 9321 |
James Hilton-Balfe. |
| 9322 |
|
| 9323 |
- gh-105481: Remove ``opcode.is_pseudo``, ``opcode.MIN_PSEUDO_OPCODE`` and |
| 9324 |
``opcode.MAX_PSEUDO_OPCODE``, which were added in 3.12, were never |
| 9325 |
documented and were not intended to be used externally. |
| 9326 |
|
| 9327 |
- gh-105481: :data:`!opcode.ENABLE_SPECIALIZATION` (which was added in 3.12 |
| 9328 |
but never documented or intended for external usage) is moved to |
| 9329 |
:data:`!_opcode.ENABLE_SPECIALIZATION` where tests can access it. |
| 9330 |
|
| 9331 |
- gh-107396: tarfiles; Fixed use before assignment of self.exception for |
| 9332 |
gzip decompression |
| 9333 |
|
| 9334 |
- gh-107409: Set :attr:`!__wrapped__` attribute in |
| 9335 |
:func:`reprlib.recursive_repr`. |
| 9336 |
|
| 9337 |
- gh-107406: Implement new :meth:`__repr__` method for |
| 9338 |
:class:`struct.Struct`. Now it returns ``Struct(<format repr>)``. |
| 9339 |
|
| 9340 |
- gh-107369: Optimize :func:`textwrap.indent`. It is ~30% faster for large |
| 9341 |
input. Patch by Inada Naoki. |
| 9342 |
|
| 9343 |
- gh-78722: Fix issue where :meth:`pathlib.Path.iterdir` did not raise |
| 9344 |
:exc:`OSError` until iterated. |
| 9345 |
|
| 9346 |
- gh-105578: Deprecate :class:`typing.AnyStr` in favor of the new Type |
| 9347 |
Parameter syntax. See PEP 695. |
| 9348 |
|
| 9349 |
- gh-62519: Make :func:`gettext.pgettext` search plural definitions when |
| 9350 |
translation is not found. |
| 9351 |
|
| 9352 |
- gh-107089: Shelves opened with :func:`shelve.open` have a much faster |
| 9353 |
:meth:`clear` method. Patch by James Cave. |
| 9354 |
|
| 9355 |
- gh-82500: Fix overflow on 32-bit systems with :mod:`asyncio` |
| 9356 |
:func:`os.sendfile` implementation. |
| 9357 |
|
| 9358 |
- gh-83006: Document behavior of :func:`shutil.disk_usage` for non-mounted |
| 9359 |
filesystems on Unix. |
| 9360 |
|
| 9361 |
- gh-65495: Use lowercase ``mail from`` and ``rcpt to`` in |
| 9362 |
:class:`smptlib.SMTP`. |
| 9363 |
|
| 9364 |
- gh-106186: Do not report ``MultipartInvariantViolationDefect`` defect when |
| 9365 |
the :class:`email.parser.Parser` class is used to parse emails with |
| 9366 |
``headersonly=True``. |
| 9367 |
|
| 9368 |
- gh-105002: Fix invalid result from :meth:`PurePath.relative_to` method |
| 9369 |
when attempting to walk a "``..``" segment in *other* with *walk_up* |
| 9370 |
enabled. A :exc:`ValueError` exception is now raised in this case. |
| 9371 |
|
| 9372 |
- gh-106739: Add the ``rtype_cache`` to the warning message (as an addition |
| 9373 |
to the type of leaked objects and the number of leaked objects already |
| 9374 |
included in the message) to make debugging leaked objects easier when the |
| 9375 |
multiprocessing resource tracker process finds leaked objects at shutdown. |
| 9376 |
This helps more quickly identify what was leaked and/or why the leaked |
| 9377 |
object was not properly cleaned up. |
| 9378 |
|
| 9379 |
- gh-106751: Optimize :meth:`SelectSelector.select` for many iteration case. |
| 9380 |
Patch By Donghee Na. |
| 9381 |
|
| 9382 |
- gh-106751: Optimize :meth:`!_PollLikeSelector.select` for many iteration |
| 9383 |
case. |
| 9384 |
|
| 9385 |
- gh-106751: Optimize :meth:`KqueueSelector.select` for many iteration case. |
| 9386 |
Patch By Donghee Na. |
| 9387 |
|
| 9388 |
- gh-106831: Fix potential missing ``NULL`` check of ``d2i_SSL_SESSION`` |
| 9389 |
result in ``_ssl.c``. |
| 9390 |
|
| 9391 |
- gh-105481: The various opcode lists in the :mod:`dis` module are now |
| 9392 |
generated from bytecodes.c instead of explicitly constructed in opcode.py. |
| 9393 |
|
| 9394 |
- gh-106727: Make :func:`inspect.getsource` smarter for class for same name |
| 9395 |
definitions |
| 9396 |
|
| 9397 |
- gh-106789: Remove import of :mod:`pprint` from :mod:`sysconfig`. |
| 9398 |
|
| 9399 |
- gh-105726: Added ``__slots__`` to |
| 9400 |
:class:`contextlib.AbstractContextManager` and |
| 9401 |
:class:`contextlib.AbstractAsyncContextManager` so that child classes can |
| 9402 |
use ``__slots__``. |
| 9403 |
|
| 9404 |
- gh-106774: Update the bundled copy of pip to version 23.2.1. |
| 9405 |
|
| 9406 |
- gh-106751: :mod:`selectors`: Optimize ``EpollSelector.select()`` code by |
| 9407 |
moving some code outside of the loop. |
| 9408 |
|
| 9409 |
- gh-106752: Fixed several bugs in zipfile.Path, including: in |
| 9410 |
:meth:`zipfile.Path.match`, Windows separators are no longer honored (and |
| 9411 |
never were meant to be); Fixed ``name``/``suffix``/``suffixes``/``stem`` |
| 9412 |
operations when no filename is present and the Path is not at the root of |
| 9413 |
the zipfile; Reworked glob for performance and more correct matching |
| 9414 |
behavior. |
| 9415 |
|
| 9416 |
- gh-105293: Remove call to ``SSL_CTX_set_session_id_context`` during client |
| 9417 |
side context creation in the :mod:`ssl` module. |
| 9418 |
|
| 9419 |
- gh-106734: Disable tab completion in multiline mode of :mod:`pdb` |
| 9420 |
|
| 9421 |
- gh-105481: Expose opcode metadata through :mod:`!_opcode`. |
| 9422 |
|
| 9423 |
- gh-106670: Add the new ``exceptions`` command to the Pdb debugger. It |
| 9424 |
makes it possible to move between chained exceptions when using post |
| 9425 |
mortem debugging. |
| 9426 |
|
| 9427 |
- gh-106602: Add __copy__ and __deepcopy__ in :mod:`enum` |
| 9428 |
|
| 9429 |
- gh-106664: :mod:`selectors`: Add ``_SelectorMapping.get()`` method and |
| 9430 |
optimize ``_SelectorMapping.__getitem__()``. |
| 9431 |
|
| 9432 |
- gh-106628: Speed up parsing of emails by about 20% by not compiling a new |
| 9433 |
regular expression for every single email. |
| 9434 |
|
| 9435 |
- gh-89427: Set the environment variable ``VIRTUAL_ENV_PROMPT`` at |
| 9436 |
:mod:`venv` activation, even when ``VIRTUAL_ENV_DISABLE_PROMPT`` is set. |
| 9437 |
|
| 9438 |
- gh-106530: Revert a change to :func:`colorsys.rgb_to_hls` that caused |
| 9439 |
division by zero for certain almost-white inputs. Patch by Terry Jan |
| 9440 |
Reedy. |
| 9441 |
|
| 9442 |
- gh-106584: Fix exit code for ``unittest`` if all tests are skipped. Patch |
| 9443 |
by Egor Eliseev. |
| 9444 |
|
| 9445 |
- gh-106566: Optimize ``(?!)`` (pattern which always fails) in regular |
| 9446 |
expressions. |
| 9447 |
|
| 9448 |
- gh-106554: :mod:`selectors`: Reduce Selector overhead by using a |
| 9449 |
``dict.get()`` to lookup file descriptors. |
| 9450 |
|
| 9451 |
- gh-106558: Remove ref cycle in callers of |
| 9452 |
:func:`~multiprocessing.managers.convert_to_error` by deleting ``result`` |
| 9453 |
from scope in a ``finally`` block. |
| 9454 |
|
| 9455 |
- gh-100502: Add :attr:`pathlib.PurePath.pathmod` class attribute that |
| 9456 |
stores the implementation of :mod:`os.path` used for low-level path |
| 9457 |
operations: either ``posixpath`` or ``ntpath``. |
| 9458 |
|
| 9459 |
- gh-106527: Reduce overhead to add and remove :mod:`asyncio` readers and |
| 9460 |
writers. |
| 9461 |
|
| 9462 |
- gh-106524: Fix crash in :func:`!_sre.template` with templates containing |
| 9463 |
invalid group indices. |
| 9464 |
|
| 9465 |
- gh-106531: Removed ``_legacy`` and the names it provided from |
| 9466 |
``importlib.resources``: ``Resource``, ``contents``, ``is_resource``, |
| 9467 |
``open_binary``, ``open_text``, ``path``, ``read_binary``, and |
| 9468 |
``read_text``. |
| 9469 |
|
| 9470 |
- gh-106052: :mod:`re` module: fix the matching of possessive quantifiers in |
| 9471 |
the case of a subpattern containing backtracking. |
| 9472 |
|
| 9473 |
- gh-106510: Improve debug output for atomic groups in regular expressions. |
| 9474 |
|
| 9475 |
- gh-106503: Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by |
| 9476 |
removing ``_write_ready`` in ``close``. |
| 9477 |
|
| 9478 |
- gh-105497: Fix flag mask inversion when unnamed flags exist. |
| 9479 |
|
| 9480 |
- gh-90876: Prevent :mod:`multiprocessing.spawn` from failing to *import* in |
| 9481 |
environments where ``sys.executable`` is ``None``. This regressed in 3.11 |
| 9482 |
with the addition of support for path-like objects in multiprocessing. |
| 9483 |
|
| 9484 |
- gh-106403: Instances of :class:`typing.TypeVar`, |
| 9485 |
:class:`typing.ParamSpec`, :class:`typing.ParamSpecArgs`, |
| 9486 |
:class:`typing.ParamSpecKwargs`, and :class:`typing.TypeVarTuple` once |
| 9487 |
again support weak references, fixing a regression introduced in Python |
| 9488 |
3.12.0 beta 1. Patch by Jelle Zijlstra. |
| 9489 |
|
| 9490 |
- gh-89812: Add private ``pathlib._PathBase`` class, which provides |
| 9491 |
experimental support for virtual filesystems, and may be made public in a |
| 9492 |
future version of Python. |
| 9493 |
|
| 9494 |
- gh-106292: Check for an instance-dict cached value in the :meth:`__get__` |
| 9495 |
method of :func:`functools.cached_property`. This better matches the |
| 9496 |
pre-3.12 behavior and improves compatibility for users subclassing |
| 9497 |
:func:`functools.cached_property` and adding a :meth:`__set__` method. |
| 9498 |
|
| 9499 |
- gh-106350: Detect possible memory allocation failure in the libtommath |
| 9500 |
function :c:func:`mp_init` used by the ``_tkinter`` module. |
| 9501 |
|
| 9502 |
- gh-106330: Fix incorrect matching of empty paths in |
| 9503 |
:meth:`pathlib.PurePath.match`. This bug was introduced in Python 3.12.0 |
| 9504 |
beta 1. |
| 9505 |
|
| 9506 |
- gh-106309: Deprecate :func:`typing.no_type_check_decorator`. No major type |
| 9507 |
checker ever added support for this decorator. Patch by Alex Waygood. |
| 9508 |
|
| 9509 |
- gh-102541: Make :func:`pydoc.doc` catch bad module :exc:`ImportError` when |
| 9510 |
output stream is not ``None``. |
| 9511 |
|
| 9512 |
- gh-106263: Fix crash when calling ``repr`` with a manually constructed |
| 9513 |
SignalDict object. Patch by Charlie Zhao. |
| 9514 |
|
| 9515 |
- gh-106236: Replace ``assert`` statements with ``raise RuntimeError`` in |
| 9516 |
:mod:`threading`, so that ``_DummyThread`` cannot be joined even with |
| 9517 |
``-OO``. |
| 9518 |
|
| 9519 |
- gh-106238: Fix rare concurrency bug in lock acquisition by the logging |
| 9520 |
package. |
| 9521 |
|
| 9522 |
- gh-106152: Added PY_THROW event hook for :mod:`cProfile` for generators |
| 9523 |
|
| 9524 |
- gh-106075: Added ``asyncio.taskgroups.__all__`` to ``asyncio.__all__`` for |
| 9525 |
export in star imports. |
| 9526 |
|
| 9527 |
- gh-104527: Zipapp will now skip over appending an archive to itself. |
| 9528 |
|
| 9529 |
- gh-106046: Improve the error message from :func:`os.fspath` if called on |
| 9530 |
an object where ``__fspath__`` is set to ``None``. Patch by Alex Waygood. |
| 9531 |
|
| 9532 |
- gh-105987: Fix crash due to improper reference counting in :mod:`asyncio` |
| 9533 |
eager task factory internal routines. |
| 9534 |
|
| 9535 |
- gh-105974: Fix bug where a :class:`typing.Protocol` class that had one or |
| 9536 |
more non-callable members would raise :exc:`TypeError` when |
| 9537 |
:func:`issubclass` was called against it, even if it defined a custom |
| 9538 |
``__subclasshook__`` method. The behaviour in Python 3.11 and lower -- |
| 9539 |
which has now been restored -- was not to raise :exc:`TypeError` in these |
| 9540 |
situations if a custom ``__subclasshook__`` method was defined. Patch by |
| 9541 |
Alex Waygood. |
| 9542 |
|
| 9543 |
- gh-96145: Reverted addition of ``json.AttrDict``. |
| 9544 |
|
| 9545 |
- gh-89812: Add :exc:`pathlib.UnsupportedOperation`, which is raised instead |
| 9546 |
of :exc:`NotImplementedError` when a path operation isn't supported. |
| 9547 |
|
| 9548 |
- gh-105808: Fix a regression introduced in GH-101251 for 3.12, causing |
| 9549 |
:meth:`gzip.GzipFile.flush` to not flush the compressor (nor pass along |
| 9550 |
the ``zip_mode`` argument). |
| 9551 |
|
| 9552 |
- gh-105481: :func:`~dis.stack_effect` no longer raises an exception if an |
| 9553 |
``oparg`` is provided for an ``opcode`` that doesn't use its arg, or when |
| 9554 |
it is not provided for an ``opcode`` that does use it. In the latter case, |
| 9555 |
the stack effect is returned for ``oparg=0``. |
| 9556 |
|
| 9557 |
- gh-104799: Enable :func:`ast.unparse` to unparse function and class |
| 9558 |
definitions created without the new ``type_params`` field from :pep:`695`. |
| 9559 |
Patch by Jelle Zijlstra. |
| 9560 |
|
| 9561 |
- gh-105793: Add *follow_symlinks* keyword-only argument to |
| 9562 |
:meth:`pathlib.Path.is_dir` and :meth:`~pathlib.Path.is_file`, defaulting |
| 9563 |
to ``True``. |
| 9564 |
|
| 9565 |
- gh-105570: Deprecate two methods of creating :class:`typing.TypedDict` |
| 9566 |
classes with 0 fields using the functional syntax: ``TD = |
| 9567 |
TypedDict("TD")`` and ``TD = TypedDict("TD", None)``. Both will be |
| 9568 |
disallowed in Python 3.15. To create a ``TypedDict`` class with 0 fields, |
| 9569 |
either use ``class TD(TypedDict): pass`` or ``TD = TypedDict("TD", {})``. |
| 9570 |
|
| 9571 |
- gh-105745: Fix ``webbrowser.Konqueror.open`` method. |
| 9572 |
|
| 9573 |
- gh-105733: :mod:`ctypes`: Deprecate undocumented |
| 9574 |
:func:`!ctypes.SetPointerType` and :func:`!ctypes.ARRAY` functions. Patch |
| 9575 |
by Victor Stinner. |
| 9576 |
|
| 9577 |
- gh-105687: Remove deprecated ``re.template``, ``re.T``, ``re.TEMPLATE``, |
| 9578 |
``sre_constans.SRE_FLAG_TEMPLATE``. |
| 9579 |
|
| 9580 |
- gh-105684: Supporting :meth:`asyncio.Task.set_name` is now mandatory for |
| 9581 |
third party task implementations. The undocumented :func:`!_set_task_name` |
| 9582 |
function (deprecated since 3.8) has been removed. Patch by Kumar Aditya. |
| 9583 |
|
| 9584 |
- gh-105375: Fix a bug in :c:func:`!_Unpickler_SetInputStream` where an |
| 9585 |
exception could end up being overwritten in case of failure. |
| 9586 |
|
| 9587 |
- gh-105626: Change the default return value of |
| 9588 |
:meth:`http.client.HTTPConnection.get_proxy_response_headers` to be |
| 9589 |
``None`` and not ``{}``. |
| 9590 |
|
| 9591 |
- gh-105375: Fix bugs in :mod:`sys` where exceptions could end up being |
| 9592 |
overwritten because of deferred error handling. |
| 9593 |
|
| 9594 |
- gh-105605: Harden :mod:`pyexpat` error handling during module |
| 9595 |
initialisation to prevent exceptions from possibly being overwritten, and |
| 9596 |
objects from being dereferenced twice. |
| 9597 |
|
| 9598 |
- gh-105375: Fix bug in :mod:`decimal` where an exception could end up being |
| 9599 |
overwritten. |
| 9600 |
|
| 9601 |
- gh-105375: Fix bugs in :mod:`!_datetime` where exceptions could be |
| 9602 |
overwritten in case of module initialisation failure. |
| 9603 |
|
| 9604 |
- gh-105375: Fix bugs in :mod:`!_ssl` initialisation which could lead to |
| 9605 |
leaked references and overwritten exceptions. |
| 9606 |
|
| 9607 |
- gh-105375: Fix a bug in :class:`array.array` where an exception could end |
| 9608 |
up being overwritten. |
| 9609 |
|
| 9610 |
- gh-105375: Fix bugs in :mod:`!_ctypes` where exceptions could end up being |
| 9611 |
overwritten. |
| 9612 |
|
| 9613 |
- gh-105375: Fix a bug in the :mod:`posix` module where an exception could |
| 9614 |
be overwritten. |
| 9615 |
|
| 9616 |
- gh-105375: Fix bugs in :mod:`!_elementtree` where exceptions could be |
| 9617 |
overwritten. |
| 9618 |
|
| 9619 |
- gh-105375: Fix bugs in :mod:`zoneinfo` where exceptions could be |
| 9620 |
overwritten. |
| 9621 |
|
| 9622 |
- gh-105375: Fix bugs in :mod:`errno` where exceptions could be overwritten. |
| 9623 |
|
| 9624 |
- gh-105566: Deprecate creating a :class:`typing.NamedTuple` class using |
| 9625 |
keyword arguments to denote the fields (``NT = NamedTuple("NT", x=int, |
| 9626 |
y=str)``). This will be disallowed in Python 3.15. Use the class-based |
| 9627 |
syntax or the functional syntax instead. |
| 9628 |
|
| 9629 |
Two methods of creating ``NamedTuple`` classes with 0 fields using the |
| 9630 |
functional syntax are also deprecated, and will be disallowed in Python |
| 9631 |
3.15: ``NT = NamedTuple("NT")`` and ``NT = NamedTuple("NT", None)``. To |
| 9632 |
create a ``NamedTuple`` class with 0 fields, either use ``class |
| 9633 |
NT(NamedTuple): pass`` or ``NT = NamedTuple("NT", [])``. |
| 9634 |
|
| 9635 |
- gh-105545: Remove deprecated in 3.11 ``webbrowser.MacOSXOSAScript._name`` |
| 9636 |
attribute. |
| 9637 |
|
| 9638 |
- gh-105497: Fix flag inversion when alias/mask members exist. |
| 9639 |
|
| 9640 |
- gh-105509: :data:`typing.Annotated` is now implemented as an instance of |
| 9641 |
``typing._SpecialForm`` rather than a class. This should have no |
| 9642 |
user-facing impact for users of the :mod:`typing` module public API. |
| 9643 |
|
| 9644 |
- gh-105375: Fix bugs in :mod:`pickle` where exceptions could be |
| 9645 |
overwritten. |
| 9646 |
|
| 9647 |
- gh-70303: Emit :exc:`FutureWarning` from :meth:`pathlib.Path.glob` and |
| 9648 |
:meth:`~pathlib.Path.rglob` if the given pattern ends with "``**``". In a |
| 9649 |
future Python release, patterns with this ending will match both files and |
| 9650 |
directories. Add a trailing slash to only match directories. |
| 9651 |
|
| 9652 |
- gh-105375: Fix a bug in :mod:`sqlite3` where an exception could be |
| 9653 |
overwritten in the :meth:`collation <sqlite3.Connection.create_collation>` |
| 9654 |
callback. |
| 9655 |
|
| 9656 |
- gh-105382: Remove *cafile*, *capath* and *cadefault* parameters of the |
| 9657 |
:func:`urllib.request.urlopen` function, deprecated in Python 3.6. Patch |
| 9658 |
by Victor Stinner. |
| 9659 |
|
| 9660 |
- gh-105376: :mod:`logging`: Remove undocumented and untested |
| 9661 |
``Logger.warn()`` and ``LoggerAdapter.warn()`` methods and |
| 9662 |
``logging.warn()`` function. Deprecated since Python 3.3, they were |
| 9663 |
aliases to the :meth:`logging.Logger.warning` method, |
| 9664 |
:meth:`!logging.LoggerAdapter.warning` method and :func:`logging.warning` |
| 9665 |
function. Patch by Victor Stinner. |
| 9666 |
|
| 9667 |
- gh-105332: Revert pickling method from by-name back to by-value. |
| 9668 |
|
| 9669 |
- gh-104554: Add RTSPS scheme support in urllib.parse |
| 9670 |
|
| 9671 |
- gh-105292: Add option to :func:`traceback.format_exception_only` to |
| 9672 |
recurse into the nested exception of a :exc:`BaseExceptionGroup`. |
| 9673 |
|
| 9674 |
- gh-105280: Fix bug where ``isinstance([], collections.abc.Mapping)`` could |
| 9675 |
evaluate to ``True`` if garbage collection happened at the wrong time. The |
| 9676 |
bug was caused by changes to the implementation of |
| 9677 |
:class:`typing.Protocol` in Python 3.12. |
| 9678 |
|
| 9679 |
- gh-80480: :mod:`array`: Add ``'w'`` typecode that represents ``Py_UCS4``. |
| 9680 |
|
| 9681 |
- gh-105239: Fix longstanding bug where ``issubclass(object, |
| 9682 |
typing.Protocol)`` would evaluate to ``True`` in some edge cases. Patch by |
| 9683 |
Alex Waygood. |
| 9684 |
|
| 9685 |
- gh-104310: In the beta 1 release we added a utility function for extension |
| 9686 |
module authors, to use when testing their module for support in multiple |
| 9687 |
interpreters or under a per-interpreter GIL. The name of that function |
| 9688 |
has changed from ``allowing_all_extensions`` to |
| 9689 |
``_incompatible_extension_module_restrictions``. The default for the |
| 9690 |
"disable_check" argument has change from ``True`` to ``False``, to better |
| 9691 |
match the new function name. |
| 9692 |
|
| 9693 |
- gh-105080: Fixed inconsistent signature on derived classes for |
| 9694 |
:func:`inspect.signature` |
| 9695 |
|
| 9696 |
- gh-105144: Fix a recent regression in the :mod:`typing` module. The |
| 9697 |
regression meant that doing ``class Foo(X, typing.Protocol)``, where ``X`` |
| 9698 |
was a class that had :class:`abc.ABCMeta` as its metaclass, would then |
| 9699 |
cause subsequent ``isinstance(1, X)`` calls to erroneously raise |
| 9700 |
:exc:`TypeError`. Patch by Alex Waygood. |
| 9701 |
|
| 9702 |
- gh-62948: The :class:`io.IOBase` finalizer now logs the ``close()`` method |
| 9703 |
errors with :data:`sys.unraisablehook`. Previously, errors were ignored |
| 9704 |
silently by default, and only logged in :ref:`Python Development Mode |
| 9705 |
<devmode>` or on :ref:`Python built on debug mode <debug-build>`. Patch |
| 9706 |
by Victor Stinner. |
| 9707 |
|
| 9708 |
- gh-105096: :mod:`wave`: Deprecate the ``getmark()``, ``setmark()`` and |
| 9709 |
``getmarkers()`` methods of the :class:`wave.Wave_read` and |
| 9710 |
:class:`wave.Wave_write` classes. They will be removed in Python 3.15. |
| 9711 |
Patch by Victor Stinner. |
| 9712 |
|
| 9713 |
- gh-104992: Remove the untested and undocumented |
| 9714 |
:meth:`!unittest.TestProgram.usageExit` method, deprecated in Python 3.11. |
| 9715 |
Patch by Hugo van Kemenade. |
| 9716 |
|
| 9717 |
- gh-104996: Improve performance of :class:`pathlib.PurePath` initialisation |
| 9718 |
by deferring joining of paths when multiple arguments are given. |
| 9719 |
|
| 9720 |
- gh-101588: Deprecate undocumented copy/deepcopy/pickle support for |
| 9721 |
itertools. |
| 9722 |
|
| 9723 |
- gh-103631: Fix ``pathlib.PurePosixPath(pathlib.PureWindowsPath(...))`` not |
| 9724 |
converting path separators to restore 3.11 compatible behavior. |
| 9725 |
|
| 9726 |
- gh-104947: Make comparisons between :class:`pathlib.PureWindowsPath` |
| 9727 |
objects consistent across Windows and Posix to match 3.11 behavior. |
| 9728 |
|
| 9729 |
- gh-104773: :pep:`594`: Remove the :mod:`!audioop` module, deprecated in |
| 9730 |
Python 3.11. Patch by Victor Stinner. |
| 9731 |
|
| 9732 |
- gh-104773: :pep:`594`: Remove the :mod:`!aifc` module, deprecated in |
| 9733 |
Python 3.11. Patch by Victor Stinner. |
| 9734 |
|
| 9735 |
- gh-104773: :pep:`594`: Remove the :mod:`!uu` module, deprecated in Python |
| 9736 |
3.11. Patch by Victor Stinner. |
| 9737 |
|
| 9738 |
- gh-104935: Fix bugs with the interaction between |
| 9739 |
:func:`typing.runtime_checkable` and :class:`typing.Generic` that were |
| 9740 |
introduced by the :pep:`695` implementation. Patch by Jelle Zijlstra. |
| 9741 |
|
| 9742 |
- gh-104773: :pep:`594`: Remove the :mod:`!crypt` module and its private |
| 9743 |
:mod:`!_crypt` extension, deprecated in Python 3.11. Patch by Victor |
| 9744 |
Stinner. |
| 9745 |
|
| 9746 |
- gh-104773: :pep:`594`: Remove the :mod:`!nis` module, deprecated in Python |
| 9747 |
3.11. Patch by Victor Stinner. |
| 9748 |
|
| 9749 |
- gh-104898: Add missing :attr:`~object.__slots__` to :class:`os.PathLike`. |
| 9750 |
|
| 9751 |
- gh-104773: :pep:`594`: Remove the :mod:`!xdrlib` module, deprecated in |
| 9752 |
Python 3.11. Patch by Victor Stinner. |
| 9753 |
|
| 9754 |
- gh-104773: :pep:`594`: Remove the :mod:`!nntplib` module, deprecated in |
| 9755 |
Python 3.11. Patch by Victor Stinner. |
| 9756 |
|
| 9757 |
- gh-104886: Remove the undocumented |
| 9758 |
:class:`!configparser.LegacyInterpolation` class, deprecated in the |
| 9759 |
docstring since Python 3.2, and with a deprecation warning since Python |
| 9760 |
3.11. Patch by Hugo van Kemenade. |
| 9761 |
|
| 9762 |
- gh-104786: Remove kwargs-based :class:`typing.TypedDict` creation |
| 9763 |
|
| 9764 |
- gh-104876: Remove the :meth:`!turtle.RawTurtle.settiltangle` method, |
| 9765 |
deprecated in docs since Python 3.1 and with a deprecation warning since |
| 9766 |
Python 3.11. Patch by Hugo van Kemenade. |
| 9767 |
|
| 9768 |
- gh-104773: :pep:`594`: Removed the :mod:`!msilib` package, deprecated in |
| 9769 |
Python 3.11. |
| 9770 |
|
| 9771 |
- gh-104773: :pep:`594`: Remove the :mod:`!spwd` module, deprecated in |
| 9772 |
Python 3.11: the :pypi:`python-pam` project can be used instead. Patch by |
| 9773 |
Victor Stinner. |
| 9774 |
|
| 9775 |
- gh-75552: Removed the ``tkinter.tix`` module, deprecated since Python 3.6. |
| 9776 |
|
| 9777 |
- gh-104773: :pep:`594`: Remove the :mod:`!chunk` module, deprecated in |
| 9778 |
Python 3.11. Patch by Victor Stinner. |
| 9779 |
|
| 9780 |
- gh-104773: :pep:`594`: Remove the :mod:`!mailcap` module, deprecated in |
| 9781 |
Python 3.11. Patch by Victor Stinner. |
| 9782 |
|
| 9783 |
- gh-104773: :pep:`594`: Remove the :mod:`!sunau` module, deprecated in |
| 9784 |
Python 3.11. Patch by Victor Stinner. |
| 9785 |
|
| 9786 |
- gh-104780: :pep:`594`: Remove the :mod:`!ossaudiodev` module, deprecated |
| 9787 |
in Python 3.11. Patch Victor Stinner. |
| 9788 |
|
| 9789 |
- gh-104773: :pep:`594`: Remove the :mod:`!pipes` module, deprecated in |
| 9790 |
Python 3.11. Patch by Victor Stinner. |
| 9791 |
|
| 9792 |
- gh-104873: Add :func:`typing.get_protocol_members` to return the set of |
| 9793 |
members defining a :class:`typing.Protocol`. Add |
| 9794 |
:func:`typing.is_protocol` to check whether a class is a |
| 9795 |
:class:`typing.Protocol`. Patch by Jelle Zijlstra. |
| 9796 |
|
| 9797 |
- gh-104874: Document the ``__name__`` and ``__supertype__`` attributes of |
| 9798 |
:class:`typing.NewType`. Patch by Jelle Zijlstra. |
| 9799 |
|
| 9800 |
- gh-104835: Removed the following :mod:`unittest` functions, deprecated in |
| 9801 |
Python 3.11: |
| 9802 |
|
| 9803 |
* :func:`!unittest.findTestCases` |
| 9804 |
* :func:`!unittest.makeSuite` |
| 9805 |
* :func:`!unittest.getTestCaseNames` |
| 9806 |
|
| 9807 |
Use :class:`~unittest.TestLoader` methods instead: |
| 9808 |
|
| 9809 |
* :meth:`unittest.TestLoader.loadTestsFromModule` |
| 9810 |
* :meth:`unittest.TestLoader.loadTestsFromTestCase` |
| 9811 |
* :meth:`unittest.TestLoader.getTestCaseNames` |
| 9812 |
|
| 9813 |
Patch by Hugo van Kemenade. |
| 9814 |
|
| 9815 |
- gh-104804: Remove the untested and undocumented :mod:`webbrowser` |
| 9816 |
:class:`!MacOSX` class, deprecated in Python 3.11. Patch by Hugo van |
| 9817 |
Kemenade. |
| 9818 |
|
| 9819 |
- gh-83863: Support for using :class:`pathlib.Path` objects as context |
| 9820 |
managers has been removed. Before Python 3.9, exiting the context manager |
| 9821 |
marked a path as "closed", which caused some (but not all!) methods to |
| 9822 |
raise when called. Since Python 3.9, using a path as a context manager |
| 9823 |
does nothing. |
| 9824 |
|
| 9825 |
- gh-104799: Adjust the location of the (see :pep:`695`) ``type_params`` |
| 9826 |
field on :class:`ast.ClassDef`, :class:`ast.AsyncFunctionDef`, and |
| 9827 |
:class:`ast.FunctionDef` to better preserve backward compatibility. Patch |
| 9828 |
by Jelle Zijlstra |
| 9829 |
|
| 9830 |
- gh-104797: Allow :class:`typing.Protocol` classes to inherit from |
| 9831 |
:class:`collections.abc.Buffer`. Patch by Jelle Zijlstra. |
| 9832 |
|
| 9833 |
- gh-104783: Remove ``locale.resetlocale()`` function deprecated in Python |
| 9834 |
3.11. Patch by Victor Stinner. |
| 9835 |
|
| 9836 |
- gh-104780: Remove the ``2to3`` program and the :mod:`!lib2to3` module, |
| 9837 |
deprecated in Python 3.11. Patch by Victor Stinner. |
| 9838 |
|
| 9839 |
- gh-104773: :pep:`594`: Remove the :mod:`!telnetlib` module, deprecated in |
| 9840 |
Python 3.11. Patch by Victor Stinner. |
| 9841 |
|
| 9842 |
- gh-104773: :pep:`594`: Remove the :mod:`!imghdr` module, deprecated in |
| 9843 |
Python 3.11. Patch by Victor Stinner. |
| 9844 |
|
| 9845 |
- gh-104773: :pep:`594`: Remove the :mod:`!cgi` and :mod:`!cgitb` modules, |
| 9846 |
deprecated in Python 3.11. Patch by Victor Stinner. |
| 9847 |
|
| 9848 |
- gh-104773: :pep:`594`: Remove the :mod:`!sndhdr` module, deprecated in |
| 9849 |
Python 3.11. Patch by Victor Stinner. |
| 9850 |
|
| 9851 |
- gh-104372: On Linux where :mod:`subprocess` can use the ``vfork()`` |
| 9852 |
syscall for faster spawning, prevent the parent process from blocking |
| 9853 |
other threads by dropping the GIL while it waits for the vfork'ed child |
| 9854 |
process ``exec()`` outcome. This prevents spawning a binary from a slow |
| 9855 |
filesystem from blocking the rest of the application. |
| 9856 |
|
| 9857 |
- gh-99108: We now release the GIL around built-in :mod:`hashlib` |
| 9858 |
computations of reasonable size for the SHA families and MD5 hash |
| 9859 |
functions, matching what our OpenSSL backed hash computations already |
| 9860 |
does. |
| 9861 |
|
| 9862 |
- gh-102613: Improve performance of :meth:`pathlib.Path.glob` when expanding |
| 9863 |
a pattern with a non-terminal "``**``" component by filtering walked paths |
| 9864 |
through a regular expression, rather than calling :func:`os.scandir` more |
| 9865 |
than once on each directory. |
| 9866 |
|
| 9867 |
- gh-104399: Prepare the ``_tkinter`` module for building with Tcl 9.0 and |
| 9868 |
future libtommath by replacing usage of deprecated functions |
| 9869 |
:c:func:`mp_to_unsigned_bin_n` and :c:func:`mp_unsigned_bin_size` when |
| 9870 |
necessary. |
| 9871 |
|
| 9872 |
- gh-102676: Add fields ``start_offset``, ``cache_offset``, ``end_offset``, |
| 9873 |
``baseopname``, ``baseopcode``, ``jump_target`` and ``oparg`` to |
| 9874 |
:class:`dis.Instruction`. |
| 9875 |
|
| 9876 |
- gh-103558: Fixed ``parent`` argument validation mechanism of |
| 9877 |
:mod:`argparse`. Improved test coverage. |
| 9878 |
|
| 9879 |
- gh-103464: Provide helpful usage messages when parsing incorrect |
| 9880 |
:mod:`pdb` commands. |
| 9881 |
|
| 9882 |
- gh-103384: Generalize the regex pattern ``BaseConfigurator.INDEX_PATTERN`` |
| 9883 |
to allow spaces and non-alphanumeric characters in keys. |
| 9884 |
|
| 9885 |
- gh-103124: Added multiline statement support for :mod:`pdb` |
| 9886 |
|
| 9887 |
- gh-101162: Forbid using :func:`builtins.issubclass` with |
| 9888 |
:class:`types.GenericAlias` as the first argument. |
| 9889 |
|
| 9890 |
- gh-103200: Fix cache repopulation semantics of |
| 9891 |
zipimport.invalidate_caches(). The cache is now repopulated upon |
| 9892 |
retrieving files with an invalid cache, not when the cache is invalidated. |
| 9893 |
|
| 9894 |
- gh-100061: Fix a bug that causes wrong matches for regular expressions |
| 9895 |
with possessive qualifier. |
| 9896 |
|
| 9897 |
- gh-77609: Add *follow_symlinks* argument to :meth:`pathlib.Path.glob` and |
| 9898 |
:meth:`~pathlib.Path.rglob`, defaulting to false. |
| 9899 |
|
| 9900 |
- gh-102541: Hide traceback in :func:`help` prompt, when import failed. |
| 9901 |
|
| 9902 |
- gh-102120: Added a stream mode to ``tarfile`` that allows for reading |
| 9903 |
archives without caching info about the inner files. |
| 9904 |
|
| 9905 |
- gh-102029: Deprecate passing any arguments to :func:`threading.RLock`. |
| 9906 |
|
| 9907 |
- gh-88233: Refactored ``zipfile._strip_extra`` to use higher level |
| 9908 |
abstractions for extras instead of a heavy-state loop. |
| 9909 |
|
| 9910 |
- gh-102024: Reduce calls of ``_idle_semaphore.release()`` in |
| 9911 |
:func:`concurrent.futures.thread._worker`. |
| 9912 |
|
| 9913 |
- gh-73435: Add support for recursive wildcards in |
| 9914 |
:meth:`pathlib.PurePath.match`. |
| 9915 |
|
| 9916 |
- gh-84867: :class:`unittest.TestLoader` no longer loads test cases from |
| 9917 |
exact :class:`unittest.TestCase` and :class:`unittest.FunctionTestCase` |
| 9918 |
classes. |
| 9919 |
|
| 9920 |
- gh-99203: Restore following CPython <= 3.10.5 behavior of |
| 9921 |
:func:`shutil.make_archive`: do not create an empty archive if |
| 9922 |
``root_dir`` is not a directory, and, in that case, raise |
| 9923 |
:class:`FileNotFoundError` or :class:`NotADirectoryError` regardless of |
| 9924 |
``format`` choice. Beyond the brought-back behavior, the function may now |
| 9925 |
also raise these exceptions in ``dry_run`` mode. |
| 9926 |
|
| 9927 |
- gh-80480: Emit :exc:`DeprecationWarning` for :mod:`array`'s ``'u'`` type |
| 9928 |
code, deprecated in docs since Python 3.3. |
| 9929 |
|
| 9930 |
- gh-94924: :func:`unittest.mock.create_autospec` now properly returns |
| 9931 |
coroutine functions compatible with :func:`inspect.iscoroutinefunction` |
| 9932 |
|
| 9933 |
- gh-94777: Fix hanging :mod:`multiprocessing` ``ProcessPoolExecutor`` when |
| 9934 |
a child process crashes while data is being written in the call queue. |
| 9935 |
|
| 9936 |
- gh-92871: Remove the ``typing.io`` and ``typing.re`` namespaces, |
| 9937 |
deprecated since Python 3.8. All items are still available from the main |
| 9938 |
:mod:`typing` module. |
| 9939 |
|
| 9940 |
- bpo-43633: Improve the textual representation of IPv4-mapped IPv6 |
| 9941 |
addresses (:rfc:`4291` Sections 2.2, 2.5.5.2) in :mod:`ipaddress`. Patch |
| 9942 |
by Oleksandr Pavliuk. |
| 9943 |
|
| 9944 |
- bpo-44850: Improve performance of :func:`operator.methodcaller` using the |
| 9945 |
:pep:`590` ``vectorcall`` convention. Patch by Anthony Lee and Pieter |
| 9946 |
Eendebak. |
| 9947 |
|
| 9948 |
- bpo-44185: :func:`unittest.mock.mock_open` will call the :func:`close` |
| 9949 |
method of the file handle mock when it is exiting from the context |
| 9950 |
manager. Patch by Samet Yaslan. |
| 9951 |
|
| 9952 |
- bpo-40988: Improve performance of :class:`functools.singledispatchmethod` |
| 9953 |
by caching the generated dispatch wrapper. Optimization suggested by |
| 9954 |
frederico. Patch by @mental32, Alex Waygood and Pieter Eendebak. |
| 9955 |
|
| 9956 |
- bpo-41768: :mod:`unittest.mock` speccing no longer calls class properties. |
| 9957 |
Patch by Melanie Witt. |
| 9958 |
|
| 9959 |
- bpo-18319: Ensure ``gettext(msg)`` retrieve translations even if a plural |
| 9960 |
form exists. In other words: ``gettext(msg) == ngettext(msg, '', 1)``. |
| 9961 |
|
| 9962 |
- bpo-17013: Add ``ThreadingMock`` to :mod:`unittest.mock` that can be used |
| 9963 |
to create Mock objects that can wait until they are called. Patch by |
| 9964 |
Karthikeyan Singaravelan and Mario Corchero. |
| 9965 |
|
| 9966 |
Documentation |
| 9967 |
------------- |
| 9968 |
|
| 9969 |
- gh-109209: The minimum Sphinx version required for the documentation is |
| 9970 |
now 4.2. |
| 9971 |
|
| 9972 |
- gh-108826: :mod:`dis` module command-line interface is now mentioned in |
| 9973 |
documentation. |
| 9974 |
|
| 9975 |
- gh-107305: Add documentation for :c:type:`PyInterpreterConfig` and |
| 9976 |
:c:func:`Py_NewInterpreterFromConfig`. Also clarify some of the nearby |
| 9977 |
docs relative to per-interpreter GIL. |
| 9978 |
|
| 9979 |
- gh-107008: Document the :mod:`curses` module variables |
| 9980 |
:const:`~curses.LINES` and :const:`~curses.COLS`. |
| 9981 |
|
| 9982 |
- gh-106948: Add a number of standard external names to ``nitpick_ignore``. |
| 9983 |
|
| 9984 |
- gh-106232: Make timeit doc command lines compatible with Windows by using |
| 9985 |
double quotes for arguments. This works on linux and macOS also. |
| 9986 |
|
| 9987 |
- gh-105172: Fixed :func:`functools.lru_cache` docstring accounting for |
| 9988 |
``typed`` argument's different handling of str and int. Patch by Bar |
| 9989 |
Harel. |
| 9990 |
|
| 9991 |
- gh-105052: Update ``timeit`` doc to specify that time in seconds is just |
| 9992 |
the default. |
| 9993 |
|
| 9994 |
- gh-89455: Add missing documentation for the ``max_group_depth`` and |
| 9995 |
``max_group_width`` parameters and the ``exceptions`` attribute of the |
| 9996 |
:class:`traceback.TracebackException` class. |
| 9997 |
|
| 9998 |
- gh-89412: Add missing documentation for the ``end_lineno`` and |
| 9999 |
``end_offset`` attributes of the :class:`traceback.TracebackException` |
| 10000 |
class. |
| 10001 |
|
| 10002 |
- gh-104943: Remove mentions of old Python versions in |
| 10003 |
:class:`typing.NamedTuple`. |
| 10004 |
|
| 10005 |
- gh-54738: Add documentation on how to localize the :mod:`argparse` module. |
| 10006 |
|
| 10007 |
- gh-102823: Document the return type of ``x // y`` when ``x`` and ``y`` |
| 10008 |
have type :class:`float`. |
| 10009 |
|
| 10010 |
- gh-102759: Align function signature for ``functools.reduce`` in |
| 10011 |
documentation and docstring with the C implementation. |
| 10012 |
|
| 10013 |
Tests |
| 10014 |
----- |
| 10015 |
|
| 10016 |
- gh-110647: Fix test_stress_modifying_handlers() of test_signal. Patch by |
| 10017 |
Victor Stinner. |
| 10018 |
|
| 10019 |
- gh-103053: Fix test_tools.test_freeze on FreeBSD: run "make distclean" |
| 10020 |
instead of "make clean" in the copied source directory to remove also the |
| 10021 |
"python" program. Patch by Victor Stinner. |
| 10022 |
|
| 10023 |
- gh-110167: Fix a deadlock in test_socket when server fails with a timeout |
| 10024 |
but the client is still running in its thread. Don't hold a lock to call |
| 10025 |
cleanup functions in doCleanups(). One of the cleanup function waits until |
| 10026 |
the client completes, whereas the client could deadlock if it called |
| 10027 |
addCleanup() in such situation. Patch by Victor Stinner. |
| 10028 |
|
| 10029 |
- gh-110388: Add tests for :mod:`tty`. |
| 10030 |
|
| 10031 |
- gh-81002: Add tests for :mod:`termios`. |
| 10032 |
|
| 10033 |
- gh-110367: regrtest: When using worker processes (-jN) with --verbose3 |
| 10034 |
option, regrtest can now display the worker output even if a worker |
| 10035 |
process does crash. Previously, sys.stdout and sys.stderr were replaced |
| 10036 |
and so the worker output was lost on a crash. Patch by Victor Stinner. |
| 10037 |
|
| 10038 |
- gh-110267: Add tests for pickling and copying PyStructSequence objects. |
| 10039 |
Patched by Xuehai Pan. |
| 10040 |
|
| 10041 |
- gh-110171: ``libregrtest`` now always sets and shows ``random.seed``, so |
| 10042 |
tests are more reproducible. Use ``--randseed`` flag to pass the explicit |
| 10043 |
random seed for tests. |
| 10044 |
|
| 10045 |
- gh-110152: Remove ``Tools/scripts/run_tests.py`` and ``make |
| 10046 |
hostrunnertest``. Just run ``./python -m test --slow-ci``, ``make |
| 10047 |
buildbottest`` or ``make test`` instead. Python test runner (regrtest) now |
| 10048 |
handles cross-compilation and HOSTRUNNER. It also adds options to Python |
| 10049 |
such fast ``-u -E -W default -bb`` when ``--fast-ci`` or ``--slow-ci`` |
| 10050 |
option is used. Patch by Victor Stinner. |
| 10051 |
|
| 10052 |
- gh-110031: Skip test_threading tests using thread+fork if Python is built |
| 10053 |
with Address Sanitizer (ASAN). Patch by Victor Stinner. |
| 10054 |
|
| 10055 |
- gh-110088: Fix test_asyncio timeouts: don't measure the maximum duration, |
| 10056 |
a test should not measure a CI performance. Only measure the minimum |
| 10057 |
duration when a task has a timeout or delay. Add ``CLOCK_RES`` to |
| 10058 |
``test_asyncio.utils``. Patch by Victor Stinner. |
| 10059 |
|
| 10060 |
- gh-109974: Fix race conditions in test_threading lock tests. Wait until a |
| 10061 |
condition is met rather than using :func:`time.sleep` with a hardcoded |
| 10062 |
number of seconds. Patch by Victor Stinner. |
| 10063 |
|
| 10064 |
- gh-110033: Fix ``test_interprocess_signal()`` of ``test_signal``. Make |
| 10065 |
sure that the ``subprocess.Popen`` object is deleted before the test |
| 10066 |
raising an exception in a signal handler. Otherwise, ``Popen.__del__()`` |
| 10067 |
can get the exception which is logged as ``Exception ignored in: ...`` and |
| 10068 |
the test fails. Patch by Victor Stinner. |
| 10069 |
|
| 10070 |
- gh-109594: Fix test_timeout() of test_concurrent_futures.test_wait. Remove |
| 10071 |
the future which may or may not complete depending if it takes longer than |
| 10072 |
the timeout or not. Keep the second future which does not complete before |
| 10073 |
wait() timeout. Patch by Victor Stinner. |
| 10074 |
|
| 10075 |
- gh-109972: Split test_gdb.py file into a test_gdb package made of multiple |
| 10076 |
tests, so tests can now be run in parallel. Patch by Victor Stinner. |
| 10077 |
|
| 10078 |
- gh-109566: regrtest: When ``--fast-ci`` or ``--slow-ci`` option is used, |
| 10079 |
regrtest now replaces the current process with a new process to add ``-u |
| 10080 |
-W default -bb -E`` options to Python. Patch by Victor Stinner. |
| 10081 |
|
| 10082 |
- gh-109748: Fix ``test_zippath_from_non_installed_posix()`` of test_venv: |
| 10083 |
don't copy ``__pycache__/`` sub-directories, because they can be modified |
| 10084 |
by other Python tests running in parallel. Patch by Victor Stinner. |
| 10085 |
|
| 10086 |
- gh-109739: regrtest: Fix reference leak check on Windows. Disable the load |
| 10087 |
tracker on Windows in the reference leak check mode (-R option). Patch by |
| 10088 |
Victor Stinner. |
| 10089 |
|
| 10090 |
- gh-109276: regrtest: When a test fails with "env changed" and the --rerun |
| 10091 |
option is used, the test is now re-run in verbose mode in a fresh process. |
| 10092 |
Patch by Victor Stinner. |
| 10093 |
|
| 10094 |
- gh-103053: Skip test_freeze_simple_script() of test_tools.test_freeze if |
| 10095 |
Python is built with ``./configure --enable-optimizations``, which means |
| 10096 |
with Profile Guided Optimization (PGO): it just makes the test too slow. |
| 10097 |
The freeze tool is tested by many other CIs with other (faster) compiler |
| 10098 |
flags. Patch by Victor Stinner. |
| 10099 |
|
| 10100 |
- gh-109580: Skip ``test_perf_profiler`` if Python is built with ASAN, MSAN |
| 10101 |
or UBSAN sanitizer. Python does crash randomly in this test on such build. |
| 10102 |
Patch by Victor Stinner. |
| 10103 |
|
| 10104 |
- gh-109566: regrtest: Add ``--fast-ci`` and ``--slow-ci`` options. |
| 10105 |
``--fast-ci`` uses a default timeout of 10 minutes and ``-u all,-cpu`` |
| 10106 |
(skip slowest tests). ``--slow-ci`` uses a default timeout of 20 minutes |
| 10107 |
and ``-u all`` (run all tests). Patch by Victor Stinner. |
| 10108 |
|
| 10109 |
- gh-109425: libregrtest now decodes stdout of test worker processes with |
| 10110 |
the "backslashreplace" error handler to log corrupted stdout, instead of |
| 10111 |
failing with an error and not logging the stdout. Patch by Victor Stinner. |
| 10112 |
|
| 10113 |
- gh-109396: Fix ``test_socket.test_hmac_sha1()`` in FIPS mode. Use a longer |
| 10114 |
key: FIPS mode requires at least of at least 112 bits. The previous key |
| 10115 |
was only 32 bits. Patch by Victor Stinner. |
| 10116 |
|
| 10117 |
- gh-104736: Fix test_gdb on Python built with LLVM clang 16 on Linux |
| 10118 |
ppc64le (ex: Fedora 38). Search patterns in gdb "bt" command output to |
| 10119 |
detect when gdb fails to retrieve the traceback. For example, skip a test |
| 10120 |
if ``Backtrace stopped: frame did not save the PC`` is found. Patch by |
| 10121 |
Victor Stinner. |
| 10122 |
|
| 10123 |
- gh-109276: libregrtest now calls :func:`random.seed` before running each |
| 10124 |
test file when ``-r/--randomize`` command line option is used. Moreover, |
| 10125 |
it's also called in worker processes. It should help to make tests more |
| 10126 |
deterministic. Previously, it was only called once in the main process |
| 10127 |
before running all test files and it was not called in worker processes. |
| 10128 |
Patch by Victor Stinner. |
| 10129 |
|
| 10130 |
- gh-109276: libregrtest now uses a separated file descriptor to write test |
| 10131 |
result as JSON. Previously, if a test wrote debug messages late around the |
| 10132 |
JSON, the main test process failed to parse JSON. Patch by Victor Stinner. |
| 10133 |
|
| 10134 |
- gh-108996: Fix and enable ``test_msvcrt``. |
| 10135 |
|
| 10136 |
- gh-109237: Fix ``test_site.test_underpth_basic()`` when the working |
| 10137 |
directory contains at least one non-ASCII character: encode the ``._pth`` |
| 10138 |
file to UTF-8 and enable the UTF-8 Mode to use UTF-8 for the child process |
| 10139 |
stdout. Patch by Victor Stinner. |
| 10140 |
|
| 10141 |
- gh-109230: Fix ``test_pyexpat.test_exception()``: it can now be run from a |
| 10142 |
directory different than Python source code directory. Before, the test |
| 10143 |
failed in this case. Skip the test if Modules/pyexpat.c source is not |
| 10144 |
available. Skip also the test on Python implementations other than |
| 10145 |
CPython. Patch by Victor Stinner. |
| 10146 |
|
| 10147 |
- gh-108996: Add tests for ``msvcrt``. |
| 10148 |
|
| 10149 |
- gh-109015: Fix test_asyncio, test_imaplib and test_socket tests on FreeBSD |
| 10150 |
if the TCP blackhole is enabled (``sysctl net.inet.tcp.blackhole``). Skip |
| 10151 |
the few tests which failed with ``ETIMEDOUT`` which such non standard |
| 10152 |
configuration. Currently, the `FreeBSD GCP image enables TCP and UDP |
| 10153 |
blackhole <https://reviews.freebsd.org/D41751>`_ (``sysctl |
| 10154 |
net.inet.tcp.blackhole=2`` and ``sysctl net.inet.udp.blackhole=1``). |
| 10155 |
Patch by Victor Stinner. |
| 10156 |
|
| 10157 |
- gh-91960: Skip ``test_gdb`` if gdb is unable to retrieve Python frame |
| 10158 |
objects: if a frame is ``<optimized out>``. When Python is built with |
| 10159 |
"clang -Og", gdb can fail to retrieve the *frame* parameter of |
| 10160 |
``_PyEval_EvalFrameDefault()``. In this case, tests like ``py_bt()`` are |
| 10161 |
likely to fail. Without getting access to Python frames, ``python-gdb.py`` |
| 10162 |
is mostly clueless on retrieving the Python traceback. Moreover, |
| 10163 |
``test_gdb`` is no longer skipped on macOS if Python is built with Clang. |
| 10164 |
Patch by Victor Stinner. |
| 10165 |
|
| 10166 |
- gh-108962: Skip ``test_tempfile.test_flags()`` if ``chflags()`` fails with |
| 10167 |
"OSError: [Errno 45] Operation not supported" (ex: on FreeBSD 13). Patch |
| 10168 |
by Victor Stinner. |
| 10169 |
|
| 10170 |
- gh-91960: FreeBSD 13.2 CI coverage for pull requests is now provided by |
| 10171 |
Cirrus-CI (a hosted CI service that supports Linux, macOS, Windows, and |
| 10172 |
FreeBSD). |
| 10173 |
|
| 10174 |
- gh-89392: Removed support of ``test_main()`` function in tests. They now |
| 10175 |
always use normal unittest test runner. |
| 10176 |
|
| 10177 |
- gh-108851: Fix ``test_tomllib`` recursion tests for WASI buildbots: reduce |
| 10178 |
the recursion limit and compute the maximum nested array/dict depending on |
| 10179 |
the current available recursion limit. Patch by Victor Stinner. |
| 10180 |
|
| 10181 |
- gh-108851: Add ``get_recursion_available()`` and ``get_recursion_depth()`` |
| 10182 |
functions to the :mod:`test.support` module. Patch by Victor Stinner. |
| 10183 |
|
| 10184 |
- gh-108834: Add ``--fail-rerun option`` option to regrtest: if a test |
| 10185 |
failed when then passed when rerun in verbose mode, exit the process with |
| 10186 |
exit code 2 (error), instead of exit code 0 (success). Patch by Victor |
| 10187 |
Stinner. |
| 10188 |
|
| 10189 |
- gh-108834: Rename regrtest ``--verbose2`` option (``-w``) to ``--rerun``. |
| 10190 |
Keep ``--verbose2`` as a deprecated alias. Patch by Victor Stinner. |
| 10191 |
|
| 10192 |
- gh-108834: When regrtest reruns failed tests in verbose mode (``./python |
| 10193 |
-m test --rerun``), tests are now rerun in fresh worker processes rather |
| 10194 |
than being executed in the main process. If a test does crash or is killed |
| 10195 |
by a timeout, the main process can detect and handle the killed worker |
| 10196 |
process. Tests are rerun in parallel if the ``-jN`` option is used to run |
| 10197 |
tests in parallel. Patch by Victor Stinner. |
| 10198 |
|
| 10199 |
- gh-108822: ``regrtest`` now computes statistics on all tests: successes, |
| 10200 |
failures and skipped. ``test_netrc``, ``test_pep646_syntax`` and |
| 10201 |
``test_xml_etree`` now return results in their ``test_main()`` function. |
| 10202 |
Patch by Victor Stinner and Alex Waygood. |
| 10203 |
|
| 10204 |
- gh-108794: The :meth:`doctest.DocTestRunner.run` method now counts the |
| 10205 |
number of skipped tests. Add :attr:`doctest.DocTestRunner.skips` and |
| 10206 |
:attr:`doctest.TestResults.skipped` attributes. Patch by Victor Stinner. |
| 10207 |
|
| 10208 |
- gh-108388: Convert test_concurrent_futures to a package of 7 sub-tests. |
| 10209 |
Patch by Victor Stinner. |
| 10210 |
|
| 10211 |
- gh-108388: Split test_multiprocessing_fork, |
| 10212 |
test_multiprocessing_forkserver and test_multiprocessing_spawn into test |
| 10213 |
packages. Each package is made of 4 sub-tests: processes, threads, manager |
| 10214 |
and misc. It allows running more tests in parallel and so reduce the total |
| 10215 |
test duration. Patch by Victor Stinner. |
| 10216 |
|
| 10217 |
- gh-105776: Fix test_cppext when the C compiler command ``-std=c11`` |
| 10218 |
option: remove ``-std=`` options from the compiler command. Patch by |
| 10219 |
Victor Stinner. |
| 10220 |
|
| 10221 |
- gh-107652: Set up CIFuzz to run fuzz targets in GitHub Actions. Patch by |
| 10222 |
Illia Volochii. |
| 10223 |
|
| 10224 |
- gh-107237: ``test_logging``: Fix ``test_udp_reconnection()`` by increasing |
| 10225 |
the timeout from 100 ms to 5 minutes (LONG_TIMEOUT). Patch by Victor |
| 10226 |
Stinner. |
| 10227 |
|
| 10228 |
- gh-107178: Add the C API test for functions in the Mapping Protocol, the |
| 10229 |
Sequence Protocol and some functions in the Object Protocol. |
| 10230 |
|
| 10231 |
- gh-106714: test_capi: Fix test_no_FatalError_infinite_loop() to no longer |
| 10232 |
write a coredump, by using test.support.SuppressCrashReport. Patch by |
| 10233 |
Victor Stinner. |
| 10234 |
|
| 10235 |
- gh-104090: Avoid creating a reference to the test object in |
| 10236 |
:meth:`~unittest.TestResult.collectedDurations`. |
| 10237 |
|
| 10238 |
- gh-106752: Moved tests for ``zipfile.Path`` into |
| 10239 |
``Lib/test/test_zipfile/_path``. Made ``zipfile._path`` a package. |
| 10240 |
|
| 10241 |
- gh-106690: Add .coveragerc to cpython repository for use with coverage |
| 10242 |
package. |
| 10243 |
|
| 10244 |
- gh-101634: When running the Python test suite with ``-jN`` option, if a |
| 10245 |
worker stdout cannot be decoded from the locale encoding report a failed |
| 10246 |
testn so the exitcode is non-zero. Patch by Victor Stinner. |
| 10247 |
|
| 10248 |
- gh-105084: When the Python build is configured ``--with-wheel-pkg-dir``, |
| 10249 |
tests requiring the ``setuptools`` and ``wheel`` wheels will search for |
| 10250 |
the wheels in ``WHEEL_PKG_DIR``. |
| 10251 |
|
| 10252 |
- gh-81005: String tests are modified to reflect that ``str`` and |
| 10253 |
``unicode`` are merged in Python 3. Patch by Daniel Fortunov. |
| 10254 |
|
| 10255 |
- gh-103186: Suppress and assert expected RuntimeWarnings in |
| 10256 |
test_sys_settrace.py |
| 10257 |
|
| 10258 |
- gh-69714: Add additional tests to :mod:`calendar` to achieve full test |
| 10259 |
coverage. |
| 10260 |
|
| 10261 |
Build |
| 10262 |
----- |
| 10263 |
|
| 10264 |
- gh-103053: "make check-clean-src" now also checks if the "python" program |
| 10265 |
is found in the source directory: fail with an error if it does exist. |
| 10266 |
Patch by Victor Stinner. |
| 10267 |
|
| 10268 |
- gh-109191: Fix compile error when building with recent versions of |
| 10269 |
libedit. |
| 10270 |
|
| 10271 |
- gh-110276: No longer ignore :envvar:`PROFILE_TASK` failure silently: |
| 10272 |
command used by Profile Guided Optimization (PGO). Patch by Victor |
| 10273 |
Stinner. |
| 10274 |
|
| 10275 |
- gh-109566: Remove ``make testall`` target: use ``make buildbottest`` |
| 10276 |
instead. Patch by Victor Stinner. |
| 10277 |
|
| 10278 |
- gh-109740: The experimental ``--disable-gil`` configure flag now includes |
| 10279 |
"t" (for "threaded") in extension ABI tags. |
| 10280 |
|
| 10281 |
- gh-109054: Fix building the ``_testcapi`` extension on Linux AArch64 which |
| 10282 |
requires linking to libatomic when ``<cpython/pyatomic.h>`` is used: the |
| 10283 |
``_Py_atomic_or_uint64()`` function requires libatomic |
| 10284 |
``__atomic_fetch_or_8()`` on this platform. The configure script now |
| 10285 |
checks if linking to libatomic is needed and generates a new LIBATOMIC |
| 10286 |
variable used to build the _testcapi extension. Patch by Victor Stinner. |
| 10287 |
|
| 10288 |
- gh-63760: Fix Solaris build: no longer redefine the ``gethostname()`` |
| 10289 |
function. Solaris defines the function since 2005. Patch by Victor |
| 10290 |
Stinner, original patch by Jakub Kulík. |
| 10291 |
|
| 10292 |
- gh-108740: Fix a race condition in ``make regen-all``. The |
| 10293 |
``deepfreeze.c`` source and files generated by Argument Clinic are now |
| 10294 |
generated or updated before generating "global objects". Previously, some |
| 10295 |
identifiers may miss depending on the order in which these files were |
| 10296 |
generated. Patch by Victor Stinner. |
| 10297 |
|
| 10298 |
- gh-108634: Python built with :file:`configure` :option:`--with-trace-refs` |
| 10299 |
(tracing references) is now ABI compatible with Python release build and |
| 10300 |
:ref:`debug build <debug-build>`. Patch by Victor Stinner. |
| 10301 |
|
| 10302 |
- gh-85283: The ``_stat`` C extension is now built with the :ref:`limited C |
| 10303 |
API <limited-c-api>`. Patch by Victor Stinner. |
| 10304 |
|
| 10305 |
- gh-108447: Fix x86_64 GNU/Hurd build |
| 10306 |
|
| 10307 |
- gh-107814: When calling ``find_python.bat`` with ``-q`` it did not |
| 10308 |
properly silence the output of nuget. That is now fixed. |
| 10309 |
|
| 10310 |
- gh-105481: Remove the make target ``regen-opcode-targets``, merge its work |
| 10311 |
into ``regen-opcode`` which repeats most of the calculation. This |
| 10312 |
simplifies the code for the build and reduces code duplication. |
| 10313 |
|
| 10314 |
- gh-106881: Check for ``linux/limits.h`` before including it in |
| 10315 |
``Modules/posixmodule.c``. |
| 10316 |
|
| 10317 |
- gh-95855: Refactor platform triplet detection code and add detection for |
| 10318 |
MIPS soft float and musl libc. |
| 10319 |
|
| 10320 |
- gh-106962: Detect MPI compilers in :file:`configure`. |
| 10321 |
|
| 10322 |
- gh-106118: Fix compilation for platforms without :data:`!O_CLOEXEC`. The |
| 10323 |
issue was introduced with Python 3.12b1 in :gh:`103295`. Patch by Erlend |
| 10324 |
Aasland. |
| 10325 |
|
| 10326 |
- gh-105875: SQLite 3.15.2 or newer is required to build the :mod:`sqlite3` |
| 10327 |
extension module. Patch by Erlend Aasland. |
| 10328 |
|
| 10329 |
- gh-90005: Fix a regression in :file:`configure` where we could end up |
| 10330 |
unintentionally linking with ``libbsd``. |
| 10331 |
|
| 10332 |
- gh-102404: Document how to perform a WASI build on Linux. Also add |
| 10333 |
Tools/wasm/build_wasi.sh as a reference implementation of the docs. |
| 10334 |
|
| 10335 |
- gh-89886: Autoconf 2.71 and aclocal 1.16.4 is now required to regenerate |
| 10336 |
:file:`!configure`. |
| 10337 |
|
| 10338 |
- gh-104692: Include ``commoninstall`` as a prerequisite for ``bininstall`` |
| 10339 |
|
| 10340 |
This ensures that ``commoninstall`` is completed before ``bininstall`` is |
| 10341 |
started when parallel builds are used (``make -j install``), and so the |
| 10342 |
``python3`` symlink is only installed after all standard library modules |
| 10343 |
are installed. |
| 10344 |
|
| 10345 |
- gh-101538: Add experimental wasi-threads support. Patch by Takashi |
| 10346 |
Yamamoto. |
| 10347 |
|
| 10348 |
Windows |
| 10349 |
------- |
| 10350 |
|
| 10351 |
- gh-110437: Allows overriding the source of VC redistributables so that |
| 10352 |
releases can be guaranteed to never downgrade between updates. |
| 10353 |
|
| 10354 |
- gh-109286: Update Windows installer to use SQLite 3.43.1. |
| 10355 |
|
| 10356 |
- gh-82367: :func:`os.path.realpath` now resolves MS-DOS style file names |
| 10357 |
even if the file is not accessible. Patch by Moonsik Park. |
| 10358 |
|
| 10359 |
- gh-109991: Update Windows build to use OpenSSL 3.0.11. |
| 10360 |
|
| 10361 |
- gh-106242: Fixes :func:`~os.path.realpath` to behave consistently when |
| 10362 |
passed a path containing an embedded null character on Windows. In strict |
| 10363 |
mode, it now raises :exc:`OSError` instead of the unexpected |
| 10364 |
:exc:`ValueError`, and in non-strict mode will make the path absolute. |
| 10365 |
|
| 10366 |
- gh-83180: Changes the :ref:`launcher` to prefer an active virtual |
| 10367 |
environment when the launched script has a shebang line using a Unix-like |
| 10368 |
virtual command, even if the command requests a specific version of |
| 10369 |
Python. |
| 10370 |
|
| 10371 |
- gh-106844: Fix integer overflow and truncating by the null character in |
| 10372 |
:func:`!_winapi.LCMapStringEx` which affects :func:`ntpath.normcase`. |
| 10373 |
|
| 10374 |
- gh-105436: Ensure that an empty environment block is terminated by two |
| 10375 |
null characters, as is required by Windows. |
| 10376 |
|
| 10377 |
- gh-105146: Updated the links at the end of the installer to point to |
| 10378 |
Discourse rather than the mailing lists. |
| 10379 |
|
| 10380 |
- gh-103646: When installed from the Microsoft Store, ``pip`` no longer |
| 10381 |
defaults to per-user installs. However, as the install directory is |
| 10382 |
unwritable, it should automatically decide to do a per-user install |
| 10383 |
anyway. This should resolve issues when ``pip`` is passed an option that |
| 10384 |
conflicts with ``--user``. |
| 10385 |
|
| 10386 |
- gh-88745: Improve performance of :func:`shutil.copy2` by using the |
| 10387 |
operating system's ``CopyFile2`` function. This may result in subtle |
| 10388 |
changes to metadata copied along with some files, bringing them in line |
| 10389 |
with normal OS behavior. |
| 10390 |
|
| 10391 |
- gh-104820: Fixes :func:`~os.stat` and related functions on file systems |
| 10392 |
that do not support file ID requests. This includes FAT32 and exFAT. |
| 10393 |
|
| 10394 |
- gh-104803: Add :func:`os.path.isdevdrive` to detect whether a path is on a |
| 10395 |
Windows Dev Drive. Returns ``False`` on platforms that do not support Dev |
| 10396 |
Drive, and is absent on non-Windows platforms. |
| 10397 |
|
| 10398 |
macOS |
| 10399 |
----- |
| 10400 |
|
| 10401 |
- gh-109286: Update macOS installer to use SQLite 3.43.1. |
| 10402 |
|
| 10403 |
- gh-109991: Update macOS installer to use OpenSSL 3.0.11. |
| 10404 |
|
| 10405 |
- gh-99079: Update macOS installer to use OpenSSL 3.0.9. |
| 10406 |
|
| 10407 |
IDLE |
| 10408 |
---- |
| 10409 |
|
| 10410 |
- gh-104719: Remove IDLE's modification of tokenize.tabsize and test other |
| 10411 |
uses of tokenize data and methods. |
| 10412 |
|
| 10413 |
Tools/Demos |
| 10414 |
----------- |
| 10415 |
|
| 10416 |
- gh-109991: Update GitHub CI workflows to use OpenSSL 3.0.11 and |
| 10417 |
multissltests to use 1.1.1w, 3.0.11, and 3.1.3. |
| 10418 |
|
| 10419 |
- gh-108494: `Argument Clinic |
| 10420 |
<https://devguide.python.org/development-tools/clinic/>`__ now has a |
| 10421 |
partial support of the :ref:`Limited API <limited-c-api>`: see |
| 10422 |
`documentation in the Python Developer's Guide |
| 10423 |
<https://devguide.python.org/development-tools/clinic/#clinic-howto-limited-capi>`__ |
| 10424 |
Patch by Victor Stinner. |
| 10425 |
|
| 10426 |
- gh-107704: It is now possible to deprecate passing keyword arguments for |
| 10427 |
keyword-or-positional parameters with Argument Clinic, using the new ``/ |
| 10428 |
[from X.Y]`` syntax. (To be read as *"positional-only from Python version |
| 10429 |
X.Y"*.) See `documentation in the Python Developer's Guide |
| 10430 |
<https://devguide.python.org/development-tools/clinic/#clinic-howto-deprecate-keyword>`__ |
| 10431 |
for more information. |
| 10432 |
|
| 10433 |
- gh-107880: Argument Clinic can now clone :meth:`!__init__` and |
| 10434 |
:meth:`!__new__` methods. |
| 10435 |
|
| 10436 |
- gh-104683: Add ``--exclude`` option to Argument Clinic CLI. |
| 10437 |
|
| 10438 |
- gh-95065: Argument Clinic now supports overriding automatically generated |
| 10439 |
signature by using directive ``@text_signature``. See `documentation in |
| 10440 |
the Python Developer's Guide |
| 10441 |
<https://devguide.python.org/development-tools/clinic/#clinic-howto-override-signature>`__ |
| 10442 |
|
| 10443 |
- gh-107609: Fix duplicate module check in Argument Clinic. Previously, a |
| 10444 |
duplicate definition would incorrectly be silently accepted. Patch by |
| 10445 |
Erlend E. Aasland. |
| 10446 |
|
| 10447 |
- gh-107467: The Argument Clinic command-line tool now prints to stderr |
| 10448 |
instead of stdout on failure. |
| 10449 |
|
| 10450 |
- gh-106970: Fix bugs in the Argument Clinic ``destination <name> clear`` |
| 10451 |
command; the destination buffers would never be cleared, and the |
| 10452 |
``destination`` directive parser would simply continue to the fault |
| 10453 |
handler after processing the command. Patch by Erlend E. Aasland. |
| 10454 |
|
| 10455 |
- gh-106706: Change bytecode syntax for families to remove redundant name |
| 10456 |
matching pseudo syntax. |
| 10457 |
|
| 10458 |
- gh-106359: Argument Clinic now explicitly forbids "kwarg splats" in |
| 10459 |
function calls used as annotations. |
| 10460 |
|
| 10461 |
- gh-103186: ``freeze`` now fetches ``CONFIG_ARGS`` from the original |
| 10462 |
CPython instance the Makefile uses to call utility scripts. Patch by |
| 10463 |
Ijtaba Hussain. |
| 10464 |
|
| 10465 |
- gh-95065: It is now possible to deprecate passing parameters positionally |
| 10466 |
with Argument Clinic, using the new ``* [from X.Y]`` syntax. (To be read |
| 10467 |
as *"keyword-only from Python version X.Y"*.) See `documentation in the |
| 10468 |
Python Developer's Guide |
| 10469 |
<https://devguide.python.org/development-tools/clinic/#clinic-howto-deprecate-positional>`__ |
| 10470 |
for more information. Patch by Erlend E. Aasland with help from Alex |
| 10471 |
Waygood, Nikita Sobolev, and Serhiy Storchaka. |
| 10472 |
|
| 10473 |
C API |
| 10474 |
----- |
| 10475 |
|
| 10476 |
- gh-85283: If the :c:macro:`Py_LIMITED_API` macro is defined, |
| 10477 |
:c:macro:`!Py_BUILD_CORE`, :c:macro:`!Py_BUILD_CORE_BUILTIN` and |
| 10478 |
:c:macro:`!Py_BUILD_CORE_MODULE` macros are now undefined by |
| 10479 |
``<Python.h>``. Patch by Victor Stinner. |
| 10480 |
|
| 10481 |
- gh-110289: Add :c:func:`PyUnicode_EqualToUTF8AndSize` and |
| 10482 |
:c:func:`PyUnicode_EqualToUTF8` functions. |
| 10483 |
|
| 10484 |
- gh-110235: Raise :exc:`TypeError` for duplicate/unknown fields in |
| 10485 |
``PyStructSequence`` constructor. Patched by Xuehai Pan. |
| 10486 |
|
| 10487 |
- gh-110014: Remove undocumented ``PY_TIMEOUT_MAX`` constant from the |
| 10488 |
limited C API. Patch by Victor Stinner. |
| 10489 |
|
| 10490 |
- gh-109521: :c:func:`PyImport_GetImporter` now sets RuntimeError if it |
| 10491 |
fails to get :data:`sys.path_hooks` or :data:`sys.path_importer_cache` or |
| 10492 |
they are not list and dict correspondingly. Previously it could return |
| 10493 |
NULL without setting error in obscure cases, crash or raise SystemError if |
| 10494 |
these attributes have wrong type. |
| 10495 |
|
| 10496 |
- gh-108724: Add :c:type:`PyMutex` internal-only lightweight locking API. |
| 10497 |
|
| 10498 |
- gh-85283: Add :c:func:`PySys_AuditTuple` function: similar to |
| 10499 |
:c:func:`PySys_Audit`, but pass event arguments as a Python :class:`tuple` |
| 10500 |
object. Patch by Victor Stinner. |
| 10501 |
|
| 10502 |
- gh-108867: Add :c:func:`PyThreadState_GetUnchecked()` function: similar to |
| 10503 |
:c:func:`PyThreadState_Get()`, but don't kill the process with a fatal |
| 10504 |
error if it is NULL. The caller is responsible to check if the result is |
| 10505 |
NULL. Previously, the function was private and known as |
| 10506 |
``_PyThreadState_UncheckedGet()``. Patch by Victor Stinner. |
| 10507 |
|
| 10508 |
- gh-108765: ``Python.h`` no longer includes the ``<ctype.h>`` standard |
| 10509 |
header file. If needed, it should now be included explicitly. For example, |
| 10510 |
it provides ``isalpha()`` and ``tolower()`` functions which are locale |
| 10511 |
dependent. Python provides locale independent functions, like |
| 10512 |
:c:func:`!Py_ISALPHA` and :c:func:`!Py_TOLOWER`. Patch by Victor Stinner. |
| 10513 |
|
| 10514 |
- gh-108765: ``Python.h`` no longer includes the ``<unistd.h>`` standard |
| 10515 |
header file. If needed, it should now be included explicitly. For example, |
| 10516 |
it provides the functions: ``close()``, ``getpagesize()``, ``getpid()`` |
| 10517 |
and ``sysconf()``. Patch by Victor Stinner. |
| 10518 |
|
| 10519 |
- gh-108765: ``Python.h`` no longer includes the ``<ieeefp.h>`` standard |
| 10520 |
header. It was included for the ``finite()`` function which is now |
| 10521 |
provided by the ``<math.h>`` header. It should now be included explicitly |
| 10522 |
if needed. Remove also the ``HAVE_IEEEFP_H`` macro. Patch by Victor |
| 10523 |
Stinner. |
| 10524 |
|
| 10525 |
- gh-108765: ``Python.h`` no longer includes these standard header files: |
| 10526 |
``<time.h>``, ``<sys/select.h>`` and ``<sys/time.h>``. If needed, they |
| 10527 |
should now be included explicitly. For example, ``<time.h>`` provides the |
| 10528 |
``clock()`` and ``gmtime()`` functions, ``<sys/select.h>`` provides the |
| 10529 |
``select()`` function, and ``<sys/time.h>`` provides the ``futimes()``, |
| 10530 |
``gettimeofday()`` and ``setitimer()`` functions. Patch by Victor Stinner. |
| 10531 |
|
| 10532 |
- gh-108511: Add functions :c:func:`PyObject_HasAttrWithError`, |
| 10533 |
:c:func:`PyObject_HasAttrStringWithError`, |
| 10534 |
:c:func:`PyMapping_HasKeyWithError` and |
| 10535 |
:c:func:`PyMapping_HasKeyStringWithError`. |
| 10536 |
|
| 10537 |
- gh-107073: Add :c:func:`PyObject_VisitManagedDict` and |
| 10538 |
:c:func:`PyObject_ClearManagedDict` functions which must be called by the |
| 10539 |
traverse and clear functions of a type using |
| 10540 |
:c:macro:`Py_TPFLAGS_MANAGED_DICT` flag. Patch by Victor Stinner. |
| 10541 |
|
| 10542 |
- gh-108634: Python built with :file:`configure` :option:`--with-trace-refs` |
| 10543 |
(tracing references) now supports the :ref:`Limited API <limited-c-api>`. |
| 10544 |
Patch by Victor Stinner. |
| 10545 |
|
| 10546 |
- gh-108014: Add :c:func:`PyLong_AsInt` function: similar to |
| 10547 |
:c:func:`PyLong_AsLong`, but store the result in a C :c:expr:`int` instead |
| 10548 |
of a C :c:expr:`long`. Previously, it was known as the private function |
| 10549 |
:c:func:`!_PyLong_AsInt` (with an underscore prefix). Patch by Victor |
| 10550 |
Stinner. |
| 10551 |
|
| 10552 |
- gh-108314: Add :c:func:`PyDict_ContainsString` function: same as |
| 10553 |
:c:func:`PyDict_Contains`, but *key* is specified as a :c:expr:`const |
| 10554 |
char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`. |
| 10555 |
Patch by Victor Stinner. |
| 10556 |
|
| 10557 |
- gh-108337: Add atomic operations on additional data types in pyatomic.h. |
| 10558 |
|
| 10559 |
- gh-108014: Add :c:func:`Py_IsFinalizing` function: check if the main |
| 10560 |
Python interpreter is :term:`shutting down <interpreter shutdown>`. Patch |
| 10561 |
by Victor Stinner. |
| 10562 |
|
| 10563 |
- gh-107916: C API functions :c:func:`PyErr_SetFromErrnoWithFilename`, |
| 10564 |
:c:func:`PyErr_SetExcFromWindowsErrWithFilename` and |
| 10565 |
:c:func:`PyErr_SetFromWindowsErrWithFilename` save now the error code |
| 10566 |
before calling :c:func:`PyUnicode_DecodeFSDefault`. |
| 10567 |
|
| 10568 |
- gh-107915: Such C API functions as ``PyErr_SetString()``, |
| 10569 |
``PyErr_Format()``, ``PyErr_SetFromErrnoWithFilename()`` and many others |
| 10570 |
no longer crash or ignore errors if it failed to format the error message |
| 10571 |
or decode the filename. Instead, they keep a corresponding error. |
| 10572 |
|
| 10573 |
- gh-107810: Improve :exc:`DeprecationWarning` for uses of |
| 10574 |
:c:type:`PyType_Spec` with metaclasses that have custom ``tp_new``. |
| 10575 |
|
| 10576 |
- gh-107249: Implement the :c:macro:`Py_UNUSED` macro for Windows MSVC |
| 10577 |
compiler. Patch by Victor Stinner. |
| 10578 |
|
| 10579 |
- gh-107226: :c:func:`PyModule_AddObjectRef` is now only available in the |
| 10580 |
limited API version 3.10 or later. |
| 10581 |
|
| 10582 |
- gh-106320: Remove private ``_PyUnicode_AsString()`` alias to |
| 10583 |
:c:func:`PyUnicode_AsUTF8`. It was kept for backward compatibility with |
| 10584 |
Python 3.0 - 3.2. The :c:func:`PyUnicode_AsUTF8` is available since Python |
| 10585 |
3.3. The :c:func:`PyUnicode_AsUTF8String` function can be used to keep |
| 10586 |
compatibility with Python 3.2 and older. Patch by Victor Stinner. |
| 10587 |
|
| 10588 |
- gh-106572: Convert :c:func:`PyObject_DelAttr` and |
| 10589 |
:c:func:`PyObject_DelAttrString` macros to functions. Patch by Victor |
| 10590 |
Stinner. |
| 10591 |
|
| 10592 |
- gh-106307: Add :c:func:`PyMapping_GetOptionalItem` function. |
| 10593 |
|
| 10594 |
- gh-106521: Add :c:func:`PyObject_GetOptionalAttr` and |
| 10595 |
:c:func:`PyObject_GetOptionalAttrString` functions. |
| 10596 |
|
| 10597 |
- gh-106320: Remove ``_PyInterpreterState_Get()`` alias to |
| 10598 |
:c:func:`PyInterpreterState_Get()` which was kept for backward |
| 10599 |
compatibility with Python 3.8. Patch by Victor Stinner. |
| 10600 |
|
| 10601 |
- gh-106316: Remove ``cpython/pytime.h`` header file: it only contained |
| 10602 |
private functions. Patch by Victor Stinner. |
| 10603 |
|
| 10604 |
- gh-106023: Remove private ``_PyObject_FastCall()`` function: use |
| 10605 |
``PyObject_Vectorcall()`` which is available since Python 3.8 |
| 10606 |
(:pep:`590`). Patch by Victor Stinner. |
| 10607 |
|
| 10608 |
- gh-106168: If Python is built in :ref:`debug mode <debug-build>` or |
| 10609 |
:option:`with assertions <--with-assertions>`, :c:func:`PyTuple_SET_ITEM` |
| 10610 |
and :c:func:`PyList_SET_ITEM` now check the index argument with an |
| 10611 |
assertion. If the assertion fails, make sure that the size is set before. |
| 10612 |
Patch by Victor Stinner. |
| 10613 |
|
| 10614 |
- gh-106084: Remove the old aliases to functions calling functions which |
| 10615 |
were kept for backward compatibility with Python 3.8 provisional API: |
| 10616 |
|
| 10617 |
* ``_PyObject_CallMethodNoArgs()``: use ``PyObject_CallMethodNoArgs()`` |
| 10618 |
* ``_PyObject_CallMethodOneArg()``: use ``PyObject_CallMethodOneArg()`` |
| 10619 |
* ``_PyObject_CallOneArg()``: use ``PyObject_CallOneArg()`` |
| 10620 |
* ``_PyObject_FastCallDict()``: use ``PyObject_VectorcallDict()`` |
| 10621 |
* ``_PyObject_Vectorcall()``: use ``PyObject_Vectorcall()`` |
| 10622 |
* ``_PyObject_VectorcallMethod()``: use ``PyObject_VectorcallMethod()`` |
| 10623 |
* ``_PyVectorcall_Function()``: use ``PyVectorcall_Function()`` |
| 10624 |
|
| 10625 |
Just remove the underscore prefix to update your code. Patch by Victor |
| 10626 |
Stinner. |
| 10627 |
|
| 10628 |
- gh-106004: Adds :c:func:`PyDict_GetItemRef` and |
| 10629 |
:c:func:`PyDict_GetItemStringRef` functions: similar to |
| 10630 |
:c:func:`PyDict_GetItemWithError` but returning a :term:`strong reference` |
| 10631 |
instead of a :term:`borrowed reference`. Patch by Victor Stinner. |
| 10632 |
|
| 10633 |
- gh-105927: Deprecate the :c:func:`PyWeakref_GetObject` and |
| 10634 |
:c:func:`PyWeakref_GET_OBJECT` functions: use the new |
| 10635 |
:c:func:`PyWeakref_GetRef` function instead. Patch by Victor Stinner. |
| 10636 |
|
| 10637 |
- gh-105927: Add :c:func:`PyWeakref_GetRef` function: similar to |
| 10638 |
:c:func:`PyWeakref_GetObject` but returns a :term:`strong reference`, or |
| 10639 |
``NULL`` if the referent is no longer live. Patch by Victor Stinner. |
| 10640 |
|
| 10641 |
- gh-105922: Add :c:func:`PyImport_AddModuleRef`: similar to |
| 10642 |
:c:func:`PyImport_AddModule`, but return a :term:`strong reference` |
| 10643 |
instead of a :term:`borrowed reference`. Patch by Victor Stinner. |
| 10644 |
|
| 10645 |
- gh-105227: The new :c:func:`PyType_GetDict` provides the dictionary for |
| 10646 |
the given type object that is normally exposed by ``cls.__dict__``. |
| 10647 |
Normally it's sufficient to use :c:member:`~PyTypeObject.tp_dict`, but for |
| 10648 |
the static builtin types :c:member:`!tp_dict` is now always ``NULL``. |
| 10649 |
:c:func:`!PyType_GetDict()` provides the correct dict object instead. |
| 10650 |
|
| 10651 |
- gh-105375: Fix a bug in :c:func:`PyErr_WarnExplicit` where an exception |
| 10652 |
could end up being overwritten if the API failed internally. |
| 10653 |
|
| 10654 |
- gh-105603: We've renamed the new (in 3.12) ``PyInterpreterConfig.own_gil`` |
| 10655 |
to ``PyInterpreterConfig.gil`` and changed the meaning of the value from |
| 10656 |
"bool" to an integer with supported values of |
| 10657 |
``PyInterpreterConfig_DEFAULT_GIL``, ``PyInterpreterConfig_SHARED_GIL``, |
| 10658 |
and ``PyInterpreterConfig_OWN_GIL``. The default is "shared". |
| 10659 |
|
| 10660 |
- gh-105387: In the limited C API version 3.12, :c:func:`Py_INCREF` and |
| 10661 |
:c:func:`Py_DECREF` functions are now implemented as opaque function calls |
| 10662 |
to hide implementation details. Patch by Victor Stinner. |
| 10663 |
|
| 10664 |
- gh-105396: Deprecate the :c:func:`PyImport_ImportModuleNoBlock` function |
| 10665 |
which is just an alias to :c:func:`PyImport_ImportModule` since Python |
| 10666 |
3.3. Patch by Victor Stinner. |
| 10667 |
|
| 10668 |
- gh-103968: :c:func:`PyType_FromMetaclass` now allows metaclasses with |
| 10669 |
``tp_new`` set to ``NULL``. |
| 10670 |
|
| 10671 |
- gh-105268: Remove the old private, undocumented and untested |
| 10672 |
``_PyGC_FINALIZED()`` macro which was kept for backward compatibility with |
| 10673 |
Python 3.8 and older. Patch by Victor Stinner. |
| 10674 |
|
| 10675 |
- gh-105182: Remove ``PyEval_AcquireLock()`` and ``PyEval_ReleaseLock()`` |
| 10676 |
functions, deprecated in Python 3.2. Patch by Victor Stinner. |
| 10677 |
|
| 10678 |
- gh-105182: Remove ``PyEval_InitThreads()`` and |
| 10679 |
``PyEval_ThreadsInitialized()`` functions, deprecated in Python 3.9. Patch |
| 10680 |
by Victor Stinner. |
| 10681 |
|
| 10682 |
- gh-105145: Deprecate old Python initialization functions: |
| 10683 |
|
| 10684 |
* :c:func:`PySys_ResetWarnOptions` |
| 10685 |
* :c:func:`Py_GetExecPrefix` |
| 10686 |
* :c:func:`Py_GetPath` |
| 10687 |
* :c:func:`Py_GetPrefix` |
| 10688 |
* :c:func:`Py_GetProgramFullPath` |
| 10689 |
* :c:func:`Py_GetProgramName` |
| 10690 |
* :c:func:`Py_GetPythonHome` |
| 10691 |
|
| 10692 |
Patch by Victor Stinner. |
| 10693 |
|
| 10694 |
- gh-85275: ``PyObject_AsCharBuffer()``, ``PyObject_AsReadBuffer()``, |
| 10695 |
``PyObject_CheckReadBuffer()``, and ``PyObject_AsWriteBuffer()`` are |
| 10696 |
removed. Please migrate to new buffer protocol; |
| 10697 |
:c:func:`PyObject_GetBuffer` and :c:func:`PyBuffer_Release`. |
| 10698 |
|
| 10699 |
- gh-105156: Deprecate the old ``Py_UNICODE`` and ``PY_UNICODE_TYPE`` types: |
| 10700 |
use directly the :c:type:`wchar_t` type instead. Since Python 3.3, |
| 10701 |
``Py_UNICODE`` and ``PY_UNICODE_TYPE`` are just aliases to |
| 10702 |
:c:type:`wchar_t`. Patch by Victor Stinner. |
| 10703 |
|
| 10704 |
- gh-105145: Remove the following old functions to configure the Python |
| 10705 |
initialization, deprecated in Python 3.11: |
| 10706 |
|
| 10707 |
* ``PySys_AddWarnOptionUnicode()`` |
| 10708 |
* ``PySys_AddWarnOption()`` |
| 10709 |
* ``PySys_AddXOption()`` |
| 10710 |
* ``PySys_HasWarnOptions()`` |
| 10711 |
* ``PySys_SetArgvEx()`` |
| 10712 |
* ``PySys_SetArgv()`` |
| 10713 |
* ``PySys_SetPath()`` |
| 10714 |
* ``Py_SetPath()`` |
| 10715 |
* ``Py_SetProgramName()`` |
| 10716 |
* ``Py_SetPythonHome()`` |
| 10717 |
* ``Py_SetStandardStreamEncoding()`` |
| 10718 |
* ``_Py_SetProgramFullPath()`` |
| 10719 |
|
| 10720 |
Patch by Victor Stinner. |
| 10721 |
|
| 10722 |
- gh-105107: Remove functions deprecated in Python 3.9. |
| 10723 |
|
| 10724 |
* ``PyEval_CallObject()``, ``PyEval_CallObjectWithKeywords()``: use |
| 10725 |
:c:func:`PyObject_CallNoArgs` and :c:func:`PyObject_Call` (positional |
| 10726 |
arguments must not be *NULL*) instead. |
| 10727 |
* ``PyEval_CallFunction()``: use :c:func:`PyObject_CallFunction` instead. |
| 10728 |
* ``PyEval_CallMethod()``: use :c:func:`PyObject_CallMethod` instead. |
| 10729 |
* ``PyCFunction_Call()``: use :c:func:`PyObject_Call` instead. |
| 10730 |
|
| 10731 |
Patch by Victor Stinner. |
| 10732 |
|
| 10733 |
- gh-105115: ``PyTypeObject.tp_bases`` (and ``tp_mro``) for builtin static |
| 10734 |
types are now shared by all interpreters, whereas in 3.12-beta1 they were |
| 10735 |
stored on ``PyInterpreterState``. Also note that now the tuples are |
| 10736 |
immortal objects. |
| 10737 |
|
| 10738 |
- gh-105071: Add ``PyUnstable_Exc_PrepReraiseStar`` to the unstable C api to |
| 10739 |
expose the implementation of :keyword:`except* <except_star>`. |
| 10740 |
|
| 10741 |
- gh-104922: ``PY_SSIZE_T_CLEAN`` is no longer required to use ``'#'`` |
| 10742 |
formats in APIs like :c:func:`PyArg_ParseTuple` and |
| 10743 |
:c:func:`Py_BuildValue`. They uses ``Py_ssize_t`` for ``'#'`` regardless |
| 10744 |
``PY_SSIZE_T_CLEAN``. |
| 10745 |
|
| 10746 |
- gh-104584: Add an unstable C API for hooking in an optimizer. This is |
| 10747 |
mainly internal, but marked "unstable" to allow third-party |
| 10748 |
experimentation. |
| 10749 |
|
| 10750 |
- gh-104668: Don't call :c:var:`PyOS_InputHook` or |
| 10751 |
:c:var:`PyOS_ReadlineFunctionPointer` in subinterpreters, since it's |
| 10752 |
generally difficult to avoid using global state in their registered |
| 10753 |
callbacks. This also avoids situations where extensions may find |
| 10754 |
themselves running in a subinterpreter they don't support (or haven't yet |
| 10755 |
been loaded in). |
| 10756 |
|
| 10757 |
- bpo-42327: Add :c:func:`PyModule_Add` function: similar to |
| 10758 |
:c:func:`PyModule_AddObjectRef` and :c:func:`PyModule_AddObject`, but |
| 10759 |
always steals a reference to the value. |
| 10760 |
|
| 10761 |
- bpo-40309: Properly handle trailing spaces before closing parenthesis in |
| 10762 |
:c:func:`Py_BuildValue` format strings. |
| 10763 |
|
| 10764 |
|
| 10765 |
What's New in Python 3.12.0 beta 1? |
| 10766 |
=================================== |
| 10767 |
|
| 10768 |
*Release date: 2023-05-22* |
| 10769 |
|
| 10770 |
Security |
| 10771 |
-------- |
| 10772 |
|
| 10773 |
- gh-99889: Fixed a security in flaw in :func:`!uu.decode` that could allow |
| 10774 |
for directory traversal based on the input if no ``out_file`` was |
| 10775 |
specified. |
| 10776 |
|
| 10777 |
- gh-104049: Do not expose the local on-disk location in directory indexes |
| 10778 |
produced by :class:`http.client.SimpleHTTPRequestHandler`. |
| 10779 |
|
| 10780 |
- gh-99108: Upgrade built-in :mod:`hashlib` SHA3 implementation to a |
| 10781 |
verified implementation from the ``HACL*`` project. Used when OpenSSL is |
| 10782 |
not present or lacks SHA3. |
| 10783 |
|
| 10784 |
- gh-102153: :func:`urllib.parse.urlsplit` now strips leading C0 control and |
| 10785 |
space characters following the specification for URLs defined by WHATWG in |
| 10786 |
response to :cve:`2023-24329`. Patch by Illia Volochii. |
| 10787 |
|
| 10788 |
Library |
| 10789 |
------- |
| 10790 |
|
| 10791 |
- gh-102856: Implement PEP 701 changes in the :mod:`tokenize` module. Patch |
| 10792 |
by Marta Gómez Macías and Pablo Galindo Salgado |
| 10793 |
|
| 10794 |
Core and Builtins |
| 10795 |
----------------- |
| 10796 |
|
| 10797 |
- gh-104615: Fix wrong ordering of assignments in code like ``a, a = x, y``. |
| 10798 |
Contributed by Carl Meyer. |
| 10799 |
|
| 10800 |
- gh-104572: Improve syntax error message for invalid constructs in |
| 10801 |
:pep:`695` contexts and in annotations when ``from __future__ import |
| 10802 |
annotations`` is active. |
| 10803 |
|
| 10804 |
- gh-104482: Fix three error handling bugs in ast.c's validation of pattern |
| 10805 |
matching statements. |
| 10806 |
|
| 10807 |
- gh-102818: Do not add a frame to the traceback in the ``sys.setprofile`` |
| 10808 |
and ``sys.settrace`` trampoline functions. This ensures that frames are |
| 10809 |
not duplicated if an exception is raised in the callback function, and |
| 10810 |
ensures that frames are not omitted if a C callback is used and that does |
| 10811 |
not add the frame. |
| 10812 |
|
| 10813 |
- gh-104405: Fix an issue where some :term:`bytecode` instructions could |
| 10814 |
ignore :pep:`523` when "inlining" calls. |
| 10815 |
|
| 10816 |
- gh-103082: Change behavior of ``sys.monitoring.events.LINE`` events in |
| 10817 |
``sys.monitoring``: Line events now occur when a new line is reached |
| 10818 |
dynamically, instead of using a static approximation, as before. This |
| 10819 |
makes the behavior very similar to that of "line" events in |
| 10820 |
``sys.settrace``. This should ease porting of tools from 3.11 to 3.12. |
| 10821 |
|
| 10822 |
- gh-104263: Fix ``float("nan")`` to produce a quiet NaN on platforms (like |
| 10823 |
MIPS) where the meaning of the signalling / quiet bit is inverted from its |
| 10824 |
usual meaning. Also introduce a new macro ``Py_INFINITY`` matching C99's |
| 10825 |
``INFINITY``, and refactor internals to rely on C99's ``NAN`` and |
| 10826 |
``INFINITY`` macros instead of hard-coding bit patterns for infinities and |
| 10827 |
NaNs. Thanks Sebastian Berg. |
| 10828 |
|
| 10829 |
- gh-99113: Multi-phase init extension modules may now indicate that they |
| 10830 |
support running in subinterpreters that have their own GIL. This is done |
| 10831 |
by using ``Py_MOD_PER_INTERPRETER_GIL_SUPPORTED`` as the value for the |
| 10832 |
``Py_mod_multiple_interpreters`` module def slot. Otherwise the module, |
| 10833 |
by default, cannot be imported in such subinterpreters. (This does not |
| 10834 |
affect the main interpreter or subinterpreters that do not have their own |
| 10835 |
GIL.) In addition to the isolation that multi-phase init already normally |
| 10836 |
requires, support for per-interpreter GIL involves one additional |
| 10837 |
constraint: thread-safety. If the module has external (linked) |
| 10838 |
dependencies and those libraries have any state that isn't thread-safe |
| 10839 |
then the module must do the additional work to add thread-safety. This |
| 10840 |
should be an uncommon case. |
| 10841 |
|
| 10842 |
- gh-99113: The GIL is now (optionally) per-interpreter. This is the |
| 10843 |
fundamental change for PEP 684. This is all made possible by virtue of |
| 10844 |
the isolated state of each interpreter in the process. The behavior of |
| 10845 |
the main interpreter remains unchanged. Likewise, interpreters created |
| 10846 |
using ``Py_NewInterpreter()`` are not affected. To get an interpreter |
| 10847 |
with its own GIL, call ``Py_NewInterpreterFromConfig()``. |
| 10848 |
|
| 10849 |
- gh-104108: Multi-phase init extension modules may now indicate whether or |
| 10850 |
not they actually support multiple interpreters. By default such modules |
| 10851 |
are expected to support use in multiple interpreters. In the uncommon |
| 10852 |
case that one does not, it may use the new |
| 10853 |
``Py_mod_multiple_interpreters`` module def slot. A value of ``0`` means |
| 10854 |
the module does not support them. ``1`` means it does. The default is |
| 10855 |
``1``. |
| 10856 |
|
| 10857 |
- gh-104142: Fix an issue where :class:`list` or :class:`tuple` repetition |
| 10858 |
could fail to respect :pep:`683`. |
| 10859 |
|
| 10860 |
- gh-104078: Improve the performance of :c:func:`PyObject_HasAttrString` |
| 10861 |
|
| 10862 |
- gh-104066: Improve the performance of :func:`hasattr` for module objects |
| 10863 |
with a missing attribute. |
| 10864 |
|
| 10865 |
- gh-104028: Reduce object creation while calling callback function from gc. |
| 10866 |
Patch by Donghee Na. |
| 10867 |
|
| 10868 |
- gh-104018: Disallow the "z" format specifier in %-format of bytes objects. |
| 10869 |
|
| 10870 |
- gh-102213: Fix performance loss when accessing an object's attributes with |
| 10871 |
``__getattr__`` defined. |
| 10872 |
|
| 10873 |
- gh-103895: Improve handling of edge cases in showing |
| 10874 |
``Exception.__notes__``. Ensures that the messages always end with a |
| 10875 |
newline and that string/bytes are not exploded over multiple lines. Patch |
| 10876 |
by Carey Metcalfe. |
| 10877 |
|
| 10878 |
- gh-103907: Don't modify the refcounts of known immortal objects |
| 10879 |
(:const:`True`, :const:`False`, and :const:`None`) in the main interpreter |
| 10880 |
loop. |
| 10881 |
|
| 10882 |
- gh-103899: Provide a helpful hint in the :exc:`TypeError` message when |
| 10883 |
accidentally calling a :term:`module` object that has a callable attribute |
| 10884 |
of the same name (such as :func:`dis.dis` or :class:`datetime.datetime`). |
| 10885 |
|
| 10886 |
- gh-103845: Remove both line and instruction instrumentation before adding |
| 10887 |
new ones for monitoring, to avoid newly added instrumentation being |
| 10888 |
removed immediately. |
| 10889 |
|
| 10890 |
- gh-103763: Implement :pep:`695`, adding syntactic support for generic |
| 10891 |
classes, generic functions, and type aliases. |
| 10892 |
|
| 10893 |
A new ``type X = ...`` syntax is added for type aliases, which resolves at |
| 10894 |
runtime to an instance of the new class ``typing.TypeAliasType``. The |
| 10895 |
value is lazily evaluated and is accessible through the ``.__value__`` |
| 10896 |
attribute. This is implemented as a new AST node ``ast.TypeAlias``. |
| 10897 |
|
| 10898 |
New syntax (``class X[T]: ...``, ``def func[T](): ...``) is added for |
| 10899 |
defining generic functions and classes. This is implemented as a new |
| 10900 |
``type_params`` attribute on the AST nodes for classes and functions. This |
| 10901 |
node holds instances of the new AST classes ``ast.TypeVar``, |
| 10902 |
``ast.ParamSpec``, and ``ast.TypeVarTuple``. |
| 10903 |
|
| 10904 |
``typing.TypeVar``, ``typing.ParamSpec``, ``typing.ParamSpecArgs``, |
| 10905 |
``typing.ParamSpecKwargs``, ``typing.TypeVarTuple``, and |
| 10906 |
``typing.Generic`` are now implemented in C rather than Python. |
| 10907 |
|
| 10908 |
There are new bytecode instructions ``LOAD_LOCALS``, |
| 10909 |
``LOAD_CLASSDICT_OR_GLOBAL``, and ``LOAD_CLASSDICT_OR_DEREF`` to support |
| 10910 |
correct resolution of names in class namespaces. |
| 10911 |
|
| 10912 |
Patch by Eric Traut, Larry Hastings, and Jelle Zijlstra. |
| 10913 |
|
| 10914 |
Library |
| 10915 |
------- |
| 10916 |
|
| 10917 |
- gh-103801: Adds three minor linting fixes to the wasm module caught that |
| 10918 |
were caught by ruff. |
| 10919 |
|
| 10920 |
- gh-103793: Optimized asyncio Task creation by deferring expensive string |
| 10921 |
formatting (task name generation) from Task creation to the first time |
| 10922 |
``get_name`` is called. This makes asyncio benchmarks up to 5% faster. |
| 10923 |
|
| 10924 |
Core and Builtins |
| 10925 |
----------------- |
| 10926 |
|
| 10927 |
- gh-102310: Change the error range for invalid bytes literals. |
| 10928 |
|
| 10929 |
- gh-103590: Do not wrap a single exception raised from a ``try-except*`` |
| 10930 |
construct in an :exc:`ExceptionGroup`. |
| 10931 |
|
| 10932 |
- gh-103650: Change the perf map format to remove the '0x' prefix from the |
| 10933 |
addresses |
| 10934 |
|
| 10935 |
- gh-102856: Implement the required C tokenizer changes for PEP 701. Patch |
| 10936 |
by Pablo Galindo Salgado, Lysandros Nikolaou, Batuhan Taskaya, Marta Gómez |
| 10937 |
Macías and sunmy2019. |
| 10938 |
|
| 10939 |
- gh-100530: Clarify the error message raised when the called part of a |
| 10940 |
class pattern isn't actually a class. |
| 10941 |
|
| 10942 |
- gh-101517: Fix bug in line numbers of instructions emitted for |
| 10943 |
:keyword:`except* <except_star>`. |
| 10944 |
|
| 10945 |
- gh-103492: Clarify :exc:`SyntaxWarning` with literal ``is`` comparison by |
| 10946 |
specifying which literal is problematic, since comparisons using ``is`` |
| 10947 |
with e.g. ``None`` and bool literals are idiomatic. |
| 10948 |
|
| 10949 |
- gh-87729: Add :opcode:`LOAD_SUPER_ATTR` (and a specialization for |
| 10950 |
``super().method()``) to speed up ``super().method()`` and |
| 10951 |
``super().attr``. This makes ``super().method()`` roughly 2.3x faster and |
| 10952 |
brings it within 20% of the performance of a simple method call. Patch by |
| 10953 |
Vladimir Matveev and Carl Meyer. |
| 10954 |
|
| 10955 |
- gh-103488: Change the internal offset distinguishing yield and return |
| 10956 |
target addresses, so that the instruction pointer is correct for exception |
| 10957 |
handling and other stack unwinding. |
| 10958 |
|
| 10959 |
- gh-82012: The bitwise inversion operator (``~``) on bool is deprecated. It |
| 10960 |
returns the bitwise inversion of the underlying ``int`` representation |
| 10961 |
such that ``bool(~True) == True``, which can be confusing. Use ``not`` for |
| 10962 |
logical negation of bools. In the rare case that you really need the |
| 10963 |
bitwise inversion of the underlying ``int``, convert to int explicitly |
| 10964 |
``~int(x)``. |
| 10965 |
|
| 10966 |
- gh-77757: Exceptions raised in a typeobject's ``__set_name__`` method are |
| 10967 |
no longer wrapped by a :exc:`RuntimeError`. Context information is added |
| 10968 |
to the exception as a :pep:`678` note. |
| 10969 |
|
| 10970 |
- gh-103333: :exc:`AttributeError` now retains the ``name`` attribute when |
| 10971 |
pickled and unpickled. |
| 10972 |
|
| 10973 |
Library |
| 10974 |
------- |
| 10975 |
|
| 10976 |
- gh-103242: Migrate :meth:`~ssl.SSLContext.set_ecdh_curve` method not to |
| 10977 |
use deprecated OpenSSL APIs. Patch by Donghee Na. |
| 10978 |
|
| 10979 |
Core and Builtins |
| 10980 |
----------------- |
| 10981 |
|
| 10982 |
- gh-103323: We've replaced our use of ``_PyRuntime.tstate_current`` with a |
| 10983 |
thread-local variable. This is a fairly low-level implementation detail, |
| 10984 |
and there should be no change in behavior. |
| 10985 |
|
| 10986 |
- gh-84436: The implementation of PEP-683 which adds Immortal Objects by |
| 10987 |
using a fixed reference count that skips reference counting to make |
| 10988 |
objects truly immutable. |
| 10989 |
|
| 10990 |
- gh-102700: Allow built-in modules to be submodules. This allows submodules |
| 10991 |
to be statically linked into a CPython binary. |
| 10992 |
|
| 10993 |
- gh-103082: Implement :pep:`669` Low Impact Monitoring for CPython. |
| 10994 |
|
| 10995 |
- gh-88691: Reduce the number of inline :opcode:`CACHE` entries for |
| 10996 |
:opcode:`CALL`. |
| 10997 |
|
| 10998 |
- gh-102500: Make the buffer protocol accessible in Python code using the |
| 10999 |
new ``__buffer__`` and ``__release_buffer__`` magic methods. See |
| 11000 |
:pep:`688` for details. Patch by Jelle Zijlstra. |
| 11001 |
|
| 11002 |
- gh-97933: :pep:`709`: inline list, dict and set comprehensions to improve |
| 11003 |
performance and reduce bytecode size. |
| 11004 |
|
| 11005 |
- gh-99184: Bypass instance attribute access of ``__name__`` in ``repr`` of |
| 11006 |
:class:`weakref.ref`. |
| 11007 |
|
| 11008 |
- gh-98003: Complex function calls are now faster and consume no C stack |
| 11009 |
space. |
| 11010 |
|
| 11011 |
- bpo-39610: ``len()`` for 0-dimensional :class:`memoryview` objects (such |
| 11012 |
as ``memoryview(ctypes.c_uint8(42))``) now raises a :exc:`TypeError`. |
| 11013 |
Previously this returned ``1``, which was not consistent with |
| 11014 |
``mem_0d[0]`` raising an :exc:`IndexError`. |
| 11015 |
|
| 11016 |
Library |
| 11017 |
------- |
| 11018 |
|
| 11019 |
- bpo-31821: Fix :func:`!pause_reading` to work when called from |
| 11020 |
:func:`!connection_made` in :mod:`asyncio`. |
| 11021 |
|
| 11022 |
- gh-104600: :func:`functools.update_wrapper` now sets the |
| 11023 |
``__type_params__`` attribute (added by :pep:`695`). |
| 11024 |
|
| 11025 |
- gh-104340: When an ``asyncio`` pipe protocol loses its connection due to |
| 11026 |
an error, and the caller doesn't await ``wait_closed()`` on the |
| 11027 |
corresponding ``StreamWriter``, don't log a warning about an exception |
| 11028 |
that was never retrieved. After all, according to the |
| 11029 |
``StreamWriter.close()`` docs, the ``wait_closed()`` call is optional |
| 11030 |
("not mandatory"). |
| 11031 |
|
| 11032 |
- gh-104555: Fix issue where an :func:`issubclass` check comparing a class |
| 11033 |
``X`` against a :func:`runtime-checkable protocol |
| 11034 |
<typing.runtime_checkable>` ``Y`` with non-callable members would not |
| 11035 |
cause :exc:`TypeError` to be raised if an :func:`isinstance` call had |
| 11036 |
previously been made comparing an instance of ``X`` to ``Y``. This issue |
| 11037 |
was present in edge cases on Python 3.11, but became more prominent in |
| 11038 |
3.12 due to some unrelated changes that were made to runtime-checkable |
| 11039 |
protocols. Patch by Alex Waygood. |
| 11040 |
|
| 11041 |
- gh-104372: Refactored the ``_posixsubprocess`` internals to avoid Python C |
| 11042 |
API usage between fork and exec when marking ``pass_fds=`` file |
| 11043 |
descriptors inheritable. |
| 11044 |
|
| 11045 |
- gh-104484: Added *case_sensitive* argument to |
| 11046 |
:meth:`pathlib.PurePath.match` |
| 11047 |
|
| 11048 |
- gh-75367: Fix data descriptor detection in |
| 11049 |
:func:`inspect.getattr_static`. |
| 11050 |
|
| 11051 |
- gh-104536: Fix a race condition in the internal |
| 11052 |
:mod:`multiprocessing.process` cleanup logic that could manifest as an |
| 11053 |
unintended ``AttributeError`` when calling ``process.close()``. |
| 11054 |
|
| 11055 |
- gh-103857: Update datetime deprecations' stracktrace to point to the |
| 11056 |
calling line |
| 11057 |
|
| 11058 |
- gh-101520: Move the core functionality of the ``tracemalloc`` module in |
| 11059 |
the ``Python/`` folder, leaving just the module wrapper in ``Modules/``. |
| 11060 |
|
| 11061 |
- gh-104392: Remove undocumented and unused ``_paramspec_tvars`` attribute |
| 11062 |
from some classes in :mod:`typing`. |
| 11063 |
|
| 11064 |
- gh-102613: Fix issue where :meth:`pathlib.Path.glob` raised |
| 11065 |
:exc:`RecursionError` when walking deep directory trees. |
| 11066 |
|
| 11067 |
- gh-103000: Improve performance of :func:`dataclasses.asdict` for the |
| 11068 |
common case where *dict_factory* is ``dict``. Patch by David C Ellis. |
| 11069 |
|
| 11070 |
- gh-104301: Allow leading whitespace in disambiguated statements in |
| 11071 |
:mod:`pdb`. |
| 11072 |
|
| 11073 |
- gh-104139: Teach :func:`urllib.parse.unsplit` to retain the ``"//"`` when |
| 11074 |
assembling ``itms-services://?action=generate-bugs`` style `Apple Platform |
| 11075 |
Deployment |
| 11076 |
<https://support.apple.com/en-gb/guide/deployment/depce7cefc4d/web>`_ |
| 11077 |
URLs. |
| 11078 |
|
| 11079 |
- gh-104307: :func:`socket.getnameinfo` now releases the GIL while |
| 11080 |
contacting the DNS server |
| 11081 |
|
| 11082 |
- gh-104310: Users may now use ``importlib.util.allowing_all_extensions()`` |
| 11083 |
(a context manager) to temporarily disable the strict compatibility checks |
| 11084 |
for importing extension modules in subinterpreters. |
| 11085 |
|
| 11086 |
- gh-87695: Fix issue where :meth:`pathlib.Path.glob` raised :exc:`OSError` |
| 11087 |
when it encountered a symlink to an overly long path. |
| 11088 |
|
| 11089 |
- gh-104265: Prevent possible crash by disallowing instantiation of the |
| 11090 |
:class:`!_csv.Reader` and :class:`!_csv.Writer` types. The regression was |
| 11091 |
introduced in 3.10.0a4 with PR 23224 (:issue:`14935`). Patch by Radislav |
| 11092 |
Chugunov. |
| 11093 |
|
| 11094 |
- gh-102613: Improve performance of :meth:`pathlib.Path.glob` when expanding |
| 11095 |
recursive wildcards ("``**``") by merging adjacent wildcards and |
| 11096 |
de-duplicating results only when necessary. |
| 11097 |
|
| 11098 |
- gh-65772: Remove unneeded comments and code in turtle.py. |
| 11099 |
|
| 11100 |
- gh-90208: Fixed issue where :meth:`pathlib.Path.glob` returned incomplete |
| 11101 |
results when it encountered a :exc:`PermissionError`. This method now |
| 11102 |
suppresses all :exc:`OSError` exceptions, except those raised from calling |
| 11103 |
:meth:`~pathlib.Path.is_dir` on the top-level path. |
| 11104 |
|
| 11105 |
- gh-104144: Optimize :class:`asyncio.TaskGroup` when using |
| 11106 |
:func:`asyncio.eager_task_factory`. Skip scheduling a done callback if a |
| 11107 |
TaskGroup task completes eagerly. |
| 11108 |
|
| 11109 |
- gh-104144: Optimize :func:`asyncio.gather` when using |
| 11110 |
:func:`asyncio.eager_task_factory` to complete eagerly if all fututres |
| 11111 |
completed eagerly. Avoid scheduling done callbacks for futures that |
| 11112 |
complete eagerly. |
| 11113 |
|
| 11114 |
- gh-104114: Fix issue where :meth:`pathlib.Path.glob` returns paths using |
| 11115 |
the case of non-wildcard segments for corresponding path segments, rather |
| 11116 |
than the real filesystem case. |
| 11117 |
|
| 11118 |
- gh-104104: Improve performance of :meth:`pathlib.Path.glob` by using |
| 11119 |
:const:`re.IGNORECASE` to implement case-insensitive matching. |
| 11120 |
|
| 11121 |
- gh-104102: Improve performance of :meth:`pathlib.Path.glob` when |
| 11122 |
evaluating patterns that contain ``'../'`` segments. |
| 11123 |
|
| 11124 |
- gh-103822: Update the return type of ``weekday`` to the newly added Day |
| 11125 |
attribute |
| 11126 |
|
| 11127 |
- gh-103629: Update the ``repr`` of :class:`typing.Unpack` according to |
| 11128 |
:pep:`692`. |
| 11129 |
|
| 11130 |
- gh-103963: Make :mod:`dis` display the names of the args for |
| 11131 |
:opcode:`!CALL_INTRINSIC_*`. |
| 11132 |
|
| 11133 |
- gh-104035: Do not ignore user-defined ``__getstate__`` and |
| 11134 |
``__setstate__`` methods for slotted frozen dataclasses. |
| 11135 |
|
| 11136 |
- gh-103987: In :mod:`mmap`, fix several bugs that could lead to access to |
| 11137 |
memory-mapped files after they have been invalidated. |
| 11138 |
|
| 11139 |
- gh-103977: Improve import time of :mod:`platform` module. |
| 11140 |
|
| 11141 |
- gh-88773: Added :func:`turtle.teleport` to the :mod:`turtle` module to |
| 11142 |
move a turtle to a new point without tracing a line, visible or invisible. |
| 11143 |
Patch by Liam Gersten. |
| 11144 |
|
| 11145 |
- gh-103935: Use :func:`io.open_code` for files to be executed instead of |
| 11146 |
raw :func:`open` |
| 11147 |
|
| 11148 |
- gh-68968: Fixed garbled output of :meth:`~unittest.TestCase.assertEqual` |
| 11149 |
when an input lacks final newline. |
| 11150 |
|
| 11151 |
- gh-100370: Fix potential :exc:`OverflowError` in |
| 11152 |
:meth:`sqlite3.Connection.blobopen` for 32-bit builds. Patch by Erlend E. |
| 11153 |
Aasland. |
| 11154 |
|
| 11155 |
- gh-102628: Substitute CTRL-D with CTRL-Z in :mod:`sqlite3` CLI banner when |
| 11156 |
running on Windows. |
| 11157 |
|
| 11158 |
- gh-103636: Module-level attributes ``January`` and ``February`` are |
| 11159 |
deprecated from :mod:`calendar`. |
| 11160 |
|
| 11161 |
- gh-103583: Isolate :mod:`!_multibytecodec` and codecs extension modules. |
| 11162 |
Patches by Erlend E. Aasland. |
| 11163 |
|
| 11164 |
- gh-103848: Add checks to ensure that ``[`` bracketed ``]`` hosts found by |
| 11165 |
:func:`urllib.parse.urlsplit` are of IPv6 or IPvFuture format. |
| 11166 |
|
| 11167 |
- gh-103872: Update the bundled copy of pip to version 23.1.2. |
| 11168 |
|
| 11169 |
- gh-99944: Make :mod:`dis` display the value of oparg of |
| 11170 |
:opcode:`!KW_NAMES`. |
| 11171 |
|
| 11172 |
- gh-74940: The C.UTF-8 locale is no longer converted to en_US.UTF-8, |
| 11173 |
enabling the use of UTF-8 encoding on systems which have no locales |
| 11174 |
installed. |
| 11175 |
|
| 11176 |
- gh-103861: Fix ``zipfile.Zipfile`` creating invalid zip files when |
| 11177 |
``force_zip64`` was used to add files to them. Patch by Carey Metcalfe. |
| 11178 |
|
| 11179 |
- gh-103857: Deprecated :meth:`datetime.datetime.utcnow` and |
| 11180 |
:meth:`datetime.datetime.utcfromtimestamp`. (Patch by Paul Ganssle) |
| 11181 |
|
| 11182 |
- gh-103839: Avoid compilation error due to tommath.h not being found when |
| 11183 |
building Tkinter against Tcl 8.7 built with bundled libtommath. |
| 11184 |
|
| 11185 |
- gh-103791: :class:`contextlib.suppress` now supports suppressing |
| 11186 |
exceptions raised as part of an :exc:`ExceptionGroup`. If other exceptions |
| 11187 |
exist on the group, they are re-raised in a group that does not contain |
| 11188 |
the suppressed exceptions. |
| 11189 |
|
| 11190 |
- gh-90750: Use :meth:`datetime.datetime.fromisocalendar` in the |
| 11191 |
implementation of :meth:`datetime.datetime.strptime`, which should now |
| 11192 |
accept only valid ISO dates. (Patch by Paul Ganssle) |
| 11193 |
|
| 11194 |
- gh-103685: Prepare :meth:`tkinter.Menu.index` for Tk 8.7 so that it does |
| 11195 |
not raise ``TclError: expected integer but got ""`` when it should return |
| 11196 |
``None``. |
| 11197 |
|
| 11198 |
- gh-81403: :class:`urllib.request.CacheFTPHandler` no longer raises |
| 11199 |
:class:`URLError` if a cached FTP instance is reused. ftplib's endtransfer |
| 11200 |
method calls voidresp to drain the connection to handle FTP instance reuse |
| 11201 |
properly. |
| 11202 |
|
| 11203 |
- gh-103699: Add ``__orig_bases__`` to non-generic TypedDicts, call-based |
| 11204 |
TypedDicts, and call-based NamedTuples. Other TypedDicts and NamedTuples |
| 11205 |
already had the attribute. |
| 11206 |
|
| 11207 |
- gh-103693: Add convenience variable feature to :mod:`pdb` |
| 11208 |
|
| 11209 |
- gh-92248: Deprecate ``type``, ``choices``, and ``metavar`` parameters of |
| 11210 |
``argparse.BooleanOptionalAction``. |
| 11211 |
|
| 11212 |
- gh-89415: Add :mod:`socket` constants for source-specific multicast. Patch |
| 11213 |
by Reese Hyde. |
| 11214 |
|
| 11215 |
- gh-103673: :mod:`socketserver` gains ``ForkingUnixStreamServer`` and |
| 11216 |
``ForkingUnixDatagramServer`` classes. Patch by Jay Berry. |
| 11217 |
|
| 11218 |
- gh-103636: Added Enum for months and days in the calendar module. |
| 11219 |
|
| 11220 |
- gh-84976: Create a new ``Lib/_pydatetime.py`` file that defines the Python |
| 11221 |
version of the ``datetime`` module, and make ``datetime`` import the |
| 11222 |
contents of the new library only if the C implementation is missing. |
| 11223 |
Currently, the full Python implementation is defined and then deleted if |
| 11224 |
the C implementation is not available, slowing down ``import datetime`` |
| 11225 |
unnecessarily. |
| 11226 |
|
| 11227 |
- gh-103596: Attributes/methods are no longer shadowed by same-named enum |
| 11228 |
members, although they may be shadowed by enum.property's. |
| 11229 |
|
| 11230 |
- gh-103584: Updated ``importlib.metadata`` with changes from |
| 11231 |
``importlib_metadata`` 5.2 through 6.5.0, including: Support |
| 11232 |
``installed-files.txt`` for ``Distribution.files`` when present. |
| 11233 |
``PackageMetadata`` now stipulates an additional ``get`` method allowing |
| 11234 |
for easy querying of metadata keys that may not be present. |
| 11235 |
``packages_distributions`` now honors packages and modules with Python |
| 11236 |
modules that not ``.py`` sources (e.g. ``.pyc``, ``.so``). Expand protocol |
| 11237 |
for ``PackageMetadata.get_all`` to match the upstream implementation of |
| 11238 |
``email.message.Message.get_all`` in python/typeshed#9620. Deprecated use |
| 11239 |
of ``Distribution`` without defining abstract methods. Deprecated |
| 11240 |
expectation that ``PackageMetadata.__getitem__`` will return ``None`` for |
| 11241 |
missing keys. In the future, it will raise a ``KeyError``. |
| 11242 |
|
| 11243 |
- gh-103578: Fixed a bug where :mod:`pdb` crashes when reading source file |
| 11244 |
with different encoding by replacing :func:`io.open` with |
| 11245 |
:func:`io.open_code`. The new method would also call into the hook set by |
| 11246 |
:c:func:`PyFile_SetOpenCodeHook`. |
| 11247 |
|
| 11248 |
- gh-103556: Now creating :class:`inspect.Signature` objects with |
| 11249 |
positional-only parameter with a default followed by a |
| 11250 |
positional-or-keyword parameter without one is impossible. |
| 11251 |
|
| 11252 |
- gh-103559: Update the bundled copy of pip to version 23.1.1. |
| 11253 |
|
| 11254 |
- gh-103548: Improve performance of :meth:`pathlib.Path.absolute` and |
| 11255 |
:meth:`~pathlib.Path.cwd` by joining paths only when necessary. Also |
| 11256 |
improve performance of :meth:`pathlib.PurePath.is_absolute` on Posix by |
| 11257 |
skipping path parsing and normalization. |
| 11258 |
|
| 11259 |
- gh-103538: Remove ``_tkinter`` module code guarded by definition of the |
| 11260 |
``TK_AQUA`` macro which was only needed for Tk 8.4.7 or earlier and was |
| 11261 |
never actually defined by any build system or documented for manual use. |
| 11262 |
|
| 11263 |
- gh-103533: Update :mod:`cProfile` to use PEP 669 API |
| 11264 |
|
| 11265 |
- gh-103525: Fix misleading exception message when mixed ``str`` and |
| 11266 |
``bytes`` arguments are supplied to :class:`pathlib.PurePath` and |
| 11267 |
:class:`~pathlib.Path`. |
| 11268 |
|
| 11269 |
- gh-103489: Add :meth:`~sqlite3.Connection.getconfig` and |
| 11270 |
:meth:`~sqlite3.Connection.setconfig` to :class:`~sqlite3.Connection` to |
| 11271 |
make configuration changes to a database connection. Patch by Erlend E. |
| 11272 |
Aasland. |
| 11273 |
|
| 11274 |
- gh-103365: Set default Flag boundary to ``STRICT`` and fix bitwise |
| 11275 |
operations. |
| 11276 |
|
| 11277 |
- gh-103472: Avoid a potential :exc:`ResourceWarning` in |
| 11278 |
:class:`http.client.HTTPConnection` by closing the proxy / tunnel's |
| 11279 |
CONNECT response explicitly. |
| 11280 |
|
| 11281 |
- gh-103462: Fixed an issue with using |
| 11282 |
:meth:`~asyncio.WriteTransport.writelines` in :mod:`asyncio` to send very |
| 11283 |
large payloads that exceed the amount of data that can be written in one |
| 11284 |
call to :meth:`socket.socket.send` or :meth:`socket.socket.sendmsg`, |
| 11285 |
resulting in the remaining buffer being left unwritten. |
| 11286 |
|
| 11287 |
- gh-103449: Fix a bug in doc string generation in |
| 11288 |
:func:`dataclasses.dataclass`. |
| 11289 |
|
| 11290 |
- gh-103092: Isolate :mod:`!_collections` (apply :pep:`687`). Patch by |
| 11291 |
Erlend E. Aasland. |
| 11292 |
|
| 11293 |
- gh-103357: Added support for :class:`logging.Formatter` ``defaults`` |
| 11294 |
parameter to :func:`logging.config.dictConfig` and |
| 11295 |
:func:`logging.config.fileConfig`. Patch by Bar Harel. |
| 11296 |
|
| 11297 |
- gh-103092: Adapt the :mod:`winreg` extension module to :pep:`687`. |
| 11298 |
|
| 11299 |
- gh-74690: The performance of :func:`isinstance` checks against |
| 11300 |
:func:`runtime-checkable protocols <typing.runtime_checkable>` has been |
| 11301 |
considerably improved for protocols that only have a few members. To |
| 11302 |
achieve this improvement, several internal implementation details of the |
| 11303 |
:mod:`typing` module have been refactored, including |
| 11304 |
``typing._ProtocolMeta.__instancecheck__``, |
| 11305 |
``typing._is_callable_members_only``, and ``typing._get_protocol_attrs``. |
| 11306 |
Patches by Alex Waygood. |
| 11307 |
|
| 11308 |
- gh-74690: The members of a runtime-checkable protocol are now considered |
| 11309 |
"frozen" at runtime as soon as the class has been created. See |
| 11310 |
:ref:`"What's new in Python 3.12" <whatsnew-typing-py312>` for more |
| 11311 |
details. |
| 11312 |
|
| 11313 |
- gh-103256: Fixed a bug that caused :mod:`hmac` to raise an exception when |
| 11314 |
the requested hash algorithm was not available in OpenSSL despite being |
| 11315 |
available separately as part of ``hashlib`` itself. It now falls back |
| 11316 |
properly to the built-in. This could happen when, for example, your |
| 11317 |
OpenSSL does not include SHA3 support and you want to compute |
| 11318 |
``hmac.digest(b'K', b'M', 'sha3_256')``. |
| 11319 |
|
| 11320 |
- gh-102778: Support ``sys.last_exc`` in :mod:`idlelib`. |
| 11321 |
|
| 11322 |
- gh-103285: Improve performance of :func:`ast.get_source_segment`. |
| 11323 |
|
| 11324 |
- gh-103225: Fix a bug in :mod:`pdb` when displaying line numbers of |
| 11325 |
module-level source code. |
| 11326 |
|
| 11327 |
- gh-103092: Adapt the :mod:`msvcrt` extension module to :pep:`687`. |
| 11328 |
|
| 11329 |
- gh-103092: Adapt the :mod:`winsound` extension module to :pep:`687`. |
| 11330 |
|
| 11331 |
- gh-93910: Remove deprecation of enum ``member.member`` access. |
| 11332 |
|
| 11333 |
- gh-102978: Fixes :func:`unittest.mock.patch` not enforcing function |
| 11334 |
signatures for methods decorated with ``@classmethod`` or |
| 11335 |
``@staticmethod`` when patch is called with ``autospec=True``. |
| 11336 |
|
| 11337 |
- gh-103092: Isolate :mod:`!_socket` (apply :pep:`687`). Patch by Erlend E. |
| 11338 |
Aasland. |
| 11339 |
|
| 11340 |
- gh-100479: Add :meth:`pathlib.PurePath.with_segments`, which creates a |
| 11341 |
path object from arguments. This method is called whenever a derivative |
| 11342 |
path is created, such as from :attr:`pathlib.PurePath.parent`. Subclasses |
| 11343 |
may override this method to share information between path objects. |
| 11344 |
|
| 11345 |
- gh-103220: Fix issue where :func:`os.path.join` added a slash when joining |
| 11346 |
onto an incomplete UNC drive with a trailing slash on Windows. |
| 11347 |
|
| 11348 |
- gh-103204: Fixes :mod:`http.server` accepting HTTP requests with HTTP |
| 11349 |
version numbers preceded by '+', or '-', or with digit-separating '_' |
| 11350 |
characters. The length of the version numbers is also constrained. |
| 11351 |
|
| 11352 |
- gh-75586: Fix various Windows-specific issues with ``shutil.which``. |
| 11353 |
|
| 11354 |
- gh-103193: Improve performance of :func:`inspect.getattr_static`. Patch by |
| 11355 |
Alex Waygood. |
| 11356 |
|
| 11357 |
- gh-103176: :func:`sys._current_exceptions` now returns a mapping from |
| 11358 |
thread-id to an exception instance, rather than to a ``(typ, exc, tb)`` |
| 11359 |
tuple. |
| 11360 |
|
| 11361 |
- gh-103143: Polish the help messages and docstrings of :mod:`pdb`. |
| 11362 |
|
| 11363 |
- gh-103015: Add *entrypoint* keyword-only parameter to |
| 11364 |
:meth:`sqlite3.Connection.load_extension`, for overriding the SQLite |
| 11365 |
extension entry point. Patch by Erlend E. Aasland. |
| 11366 |
|
| 11367 |
- gh-103000: Improve performance of :func:`dataclasses.astuple` and |
| 11368 |
:func:`dataclasses.asdict` in cases where the contents are common Python |
| 11369 |
types. |
| 11370 |
|
| 11371 |
- gh-102953: The extraction methods in :mod:`tarfile`, and |
| 11372 |
:func:`shutil.unpack_archive`, have a new a *filter* argument that allows |
| 11373 |
limiting tar features than may be surprising or dangerous, such as |
| 11374 |
creating files outside the destination directory. See |
| 11375 |
:ref:`tarfile-extraction-filter` for details. |
| 11376 |
|
| 11377 |
- gh-97696: Implemented an eager task factory in asyncio. When used as a |
| 11378 |
task factory on an event loop, it performs eager execution of coroutines. |
| 11379 |
Coroutines that are able to complete synchronously (e.g. return or raise |
| 11380 |
without blocking) are returned immediately as a finished task, and the |
| 11381 |
task is never scheduled to the event loop. If the coroutine blocks, the |
| 11382 |
(pending) task is scheduled and returned. |
| 11383 |
|
| 11384 |
- gh-81079: Add *case_sensitive* keyword-only argument to |
| 11385 |
:meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob`. |
| 11386 |
|
| 11387 |
- gh-101819: Isolate the :mod:`io` extension module by applying :pep:`687`. |
| 11388 |
Patch by Kumar Aditya, Victor Stinner, and Erlend E. Aasland. |
| 11389 |
|
| 11390 |
- gh-91896: Deprecate :class:`collections.abc.ByteString` |
| 11391 |
|
| 11392 |
- gh-101362: Speed up :class:`pathlib.Path` construction by omitting the |
| 11393 |
path anchor from the internal list of path parts. |
| 11394 |
|
| 11395 |
- gh-102114: Functions in the :mod:`dis` module that accept a source code |
| 11396 |
string as argument now print a more concise traceback when the string |
| 11397 |
contains a syntax or indentation error. |
| 11398 |
|
| 11399 |
- gh-62432: The :mod:`unittest` runner will now exit with status code 5 if |
| 11400 |
no tests were run. It is common for test runner misconfiguration to fail |
| 11401 |
to find any tests, this should be an error. |
| 11402 |
|
| 11403 |
- gh-78079: Fix incorrect normalization of UNC device path roots, and |
| 11404 |
partial UNC share path roots, in :class:`pathlib.PurePath`. Pathlib no |
| 11405 |
longer appends a trailing slash to such paths. |
| 11406 |
|
| 11407 |
- gh-85984: Add :func:`tty.cfmakeraw` and :func:`tty.cfmakecbreak` to |
| 11408 |
:mod:`tty` and modernize, the behavior of :func:`tty.setraw` and |
| 11409 |
:func:`tty.setcbreak` to use POSIX.1-2017 Chapter 11 "General Terminal |
| 11410 |
Interface" flag masks by default. |
| 11411 |
|
| 11412 |
- gh-101688: Implement :func:`types.get_original_bases` to provide further |
| 11413 |
introspection for types. |
| 11414 |
|
| 11415 |
- gh-101640: :class:`argparse.ArgumentParser` now catches errors when |
| 11416 |
writing messages, such as when :data:`sys.stderr` is ``None``. Patch by |
| 11417 |
Oleg Iarygin. |
| 11418 |
|
| 11419 |
- gh-83861: Fix datetime.astimezone method return value when invoked on a |
| 11420 |
naive datetime instance that represents local time falling in a timezone |
| 11421 |
transition gap. PEP 495 requires that instances with fold=1 produce |
| 11422 |
earlier times than those with fold=0 in this case. |
| 11423 |
|
| 11424 |
- gh-89550: Decrease execution time of some :mod:`gzip` file writes by 15% |
| 11425 |
by adding more appropriate buffering. |
| 11426 |
|
| 11427 |
- gh-95299: Remove the bundled setuptools wheel from ``ensurepip``, and stop |
| 11428 |
installing setuptools in environments created by ``venv``. |
| 11429 |
|
| 11430 |
- gh-99353: Respect the :class:`http.client.HTTPConnection` ``.debuglevel`` |
| 11431 |
flag in :class:`urllib.request.AbstractHTTPHandler` when its constructor |
| 11432 |
parameter ``debuglevel`` is not set. And do the same for ``*HTTPS*``. |
| 11433 |
|
| 11434 |
- gh-98040: Remove the long-deprecated ``imp`` module. |
| 11435 |
|
| 11436 |
- gh-97850: Deprecate :func:`pkgutil.find_loader` and |
| 11437 |
:func:`pkgutil.get_loader` in favor of :func:`importlib.util.find_spec`. |
| 11438 |
|
| 11439 |
- gh-94473: Flatten arguments in :meth:`tkinter.Canvas.coords`. It now |
| 11440 |
accepts not only ``x1, y1, x2, y2, ...`` and ``[x1, y1, x2, y2, ...]``, |
| 11441 |
but also ``(x1, y1), (x2, y2), ...`` and ``[(x1, y1), (x2, y2), ...]``. |
| 11442 |
|
| 11443 |
- gh-98040: Remove more deprecated importlib APIs: ``find_loader()``, |
| 11444 |
``find_module()``, ``importlib.abc.Finder``, ``pkgutil.ImpImporter``, |
| 11445 |
``pkgutil.ImpLoader``. |
| 11446 |
|
| 11447 |
- gh-96522: Fix potential deadlock in pty.spawn() |
| 11448 |
|
| 11449 |
- gh-96534: Support divert(4) added in FreeBSD 14. |
| 11450 |
|
| 11451 |
- gh-87474: Fix potential file descriptor leaks in |
| 11452 |
:class:`subprocess.Popen`. |
| 11453 |
|
| 11454 |
- gh-94906: Support multiple steps in :func:`math.nextafter`. Patch by |
| 11455 |
Shantanu Jain and Matthias Gorgens. |
| 11456 |
|
| 11457 |
- gh-51574: Make :func:`tempfile.mkdtemp` return absolute paths when its |
| 11458 |
*dir* parameter is relative. |
| 11459 |
|
| 11460 |
- gh-94518: Convert private :meth:`!_posixsubprocess.fork_exec` to use |
| 11461 |
Argument Clinic. |
| 11462 |
|
| 11463 |
- gh-92184: When creating zip files using :mod:`zipfile`, ``os.altsep``, if |
| 11464 |
not ``None``, will always be treated as a path separator even when it is |
| 11465 |
not ``/``. Patch by Carey Metcalfe. |
| 11466 |
|
| 11467 |
- bpo-46797: Deprecation warnings are now emitted for :class:`!ast.Num`, |
| 11468 |
:class:`!ast.Bytes`, :class:`!ast.Str`, :class:`!ast.NameConstant` and |
| 11469 |
:class:`!ast.Ellipsis`. These have been documented as deprecated since |
| 11470 |
Python 3.8, and will be removed in Python 3.14. |
| 11471 |
|
| 11472 |
- bpo-44844: Enables :mod:`webbrowser` to detect and launch Microsoft Edge |
| 11473 |
browser. |
| 11474 |
|
| 11475 |
- bpo-45606: Fixed the bug in :meth:`pathlib.Path.glob` -- previously a |
| 11476 |
dangling symlink would not be found by this method when the pattern is an |
| 11477 |
exact match, but would be found when the pattern contains a wildcard or |
| 11478 |
the recursive wildcard (``**``). With this change, a dangling symlink will |
| 11479 |
be found in both cases. |
| 11480 |
|
| 11481 |
- bpo-23041: Add :const:`~csv.QUOTE_STRINGS` and :const:`~csv.QUOTE_NOTNULL` |
| 11482 |
to the suite of :mod:`csv` module quoting styles. |
| 11483 |
|
| 11484 |
- bpo-24964: Added |
| 11485 |
:meth:`http.client.HTTPConnection.get_proxy_response_headers` that |
| 11486 |
provides access to the HTTP headers on a proxy server response to the |
| 11487 |
``CONNECT`` request. |
| 11488 |
|
| 11489 |
- bpo-17258: :mod:`multiprocessing` now supports stronger HMAC algorithms |
| 11490 |
for inter-process connection authentication rather than only HMAC-MD5. |
| 11491 |
|
| 11492 |
- bpo-39744: Make :func:`asyncio.subprocess.Process.communicate` close the |
| 11493 |
subprocess's stdin even when called with ``input=None``. |
| 11494 |
|
| 11495 |
- bpo-22708: http.client CONNECT method tunnel improvements: Use HTTP 1.1 |
| 11496 |
protocol; send a matching Host: header with CONNECT, if one is not |
| 11497 |
provided; convert IDN domain names to Punycode. Patch by Michael Handler. |
| 11498 |
|
| 11499 |
Documentation |
| 11500 |
------------- |
| 11501 |
|
| 11502 |
- gh-67056: Document that the effect of registering or unregistering an |
| 11503 |
:mod:`atexit` cleanup function from within a registered cleanup function |
| 11504 |
is undefined. |
| 11505 |
|
| 11506 |
- gh-103629: Mention the new way of typing ``**kwargs`` with ``Unpack`` and |
| 11507 |
``TypedDict`` introduced in :pep:`692`. |
| 11508 |
|
| 11509 |
- gh-48241: Clarifying documentation about the url parameter to |
| 11510 |
urllib.request.urlopen and urllib.request.Request needing to be encoded |
| 11511 |
properly. |
| 11512 |
|
| 11513 |
- gh-86094: Add support for Unicode Path Extra Field in ZipFile. Patch by |
| 11514 |
Yeojin Kim and Andrea Giudiceandrea |
| 11515 |
|
| 11516 |
- gh-99202: Fix extension type from documentation for compiling in C++20 |
| 11517 |
mode |
| 11518 |
|
| 11519 |
Tests |
| 11520 |
----- |
| 11521 |
|
| 11522 |
- gh-104494: Update ``test_pack_configure_in`` and |
| 11523 |
``test_place_configure_in`` for changes to error message formatting in Tk |
| 11524 |
8.7. |
| 11525 |
|
| 11526 |
- gh-104461: Run test_configure_screen on X11 only, since the ``DISPLAY`` |
| 11527 |
environment variable and ``-screen`` option for toplevels are not useful |
| 11528 |
on Tk for Win32 or Aqua. |
| 11529 |
|
| 11530 |
- gh-86275: Added property-based tests to the :mod:`zoneinfo` tests, along |
| 11531 |
with stubs for the ``hypothesis`` interface. (Patch by Paul Ganssle) |
| 11532 |
|
| 11533 |
- gh-103329: Regression tests for the behaviour of |
| 11534 |
``unittest.mock.PropertyMock`` were added. |
| 11535 |
|
| 11536 |
- gh-102795: fix use of poll in test_epoll's test_control_and_wait |
| 11537 |
|
| 11538 |
- gh-75729: Fix the :func:`os.spawn* <os.spawnl>` tests failing on Windows |
| 11539 |
when the working directory or interpreter path contains spaces. |
| 11540 |
|
| 11541 |
Build |
| 11542 |
----- |
| 11543 |
|
| 11544 |
- gh-101282: BOLT optimization is now applied to the libpython shared |
| 11545 |
library if building a shared library. BOLT instrumentation and application |
| 11546 |
settings can now be influenced via the ``BOLT_INSTRUMENT_FLAGS`` and |
| 11547 |
``BOLT_APPLY_FLAGS`` configure variables. |
| 11548 |
|
| 11549 |
- gh-99017: ``PYTHON_FOR_REGEN`` now require Python 3.10 or newer. |
| 11550 |
|
| 11551 |
- gh-104490: Define ``.PHONY`` / virtual make targets consistently and |
| 11552 |
properly. |
| 11553 |
|
| 11554 |
- gh-104106: Add gcc fallback of mkfifoat/mknodat for macOS. Patch by |
| 11555 |
Donghee Na. |
| 11556 |
|
| 11557 |
- gh-103532: The ``TKINTER_PROTECT_LOADTK`` macro is no longer defined or |
| 11558 |
used in the ``_tkinter`` module. It was previously only defined when |
| 11559 |
building against Tk 8.4.13 and older, but Tk older than 8.5.12 has been |
| 11560 |
unsupported since gh-issue-91152. |
| 11561 |
|
| 11562 |
- gh-99069: Extended workaround defining ``static_assert`` when missing from |
| 11563 |
the libc headers to all clang and gcc builds. In particular, this fixes |
| 11564 |
building on macOS <= 10.10. |
| 11565 |
|
| 11566 |
- gh-100220: Changed the default value of the ``SHELL`` Makefile variable |
| 11567 |
from ``/bin/sh`` to ``/bin/sh -e`` to ensure that complex recipes |
| 11568 |
correctly fail after an error. Previously, ``make install`` could fail to |
| 11569 |
install some files and yet return a successful result. |
| 11570 |
|
| 11571 |
- gh-90656: Add platform triplets for 64-bit LoongArch: |
| 11572 |
|
| 11573 |
* loongarch64-linux-gnusf |
| 11574 |
* loongarch64-linux-gnuf32 |
| 11575 |
* loongarch64-linux-gnu |
| 11576 |
|
| 11577 |
Patch by Zhang Na. |
| 11578 |
|
| 11579 |
Windows |
| 11580 |
------- |
| 11581 |
|
| 11582 |
- gh-104623: Update Windows installer to use SQLite 3.42.0. |
| 11583 |
|
| 11584 |
- gh-82814: Fix a potential ``[Errno 13] Permission denied`` when using |
| 11585 |
:func:`shutil.copystat` within Windows Subsystem for Linux (WSL) on a |
| 11586 |
mounted filesystem by adding ``errno.EACCES`` to the list of ignored |
| 11587 |
errors within the internal implementation. |
| 11588 |
|
| 11589 |
- gh-103088: Fix virtual environment :file:`activate` script having |
| 11590 |
incorrect line endings for Cygwin. |
| 11591 |
|
| 11592 |
- gh-103088: Fixes venvs not working in bash on Windows across different |
| 11593 |
disks |
| 11594 |
|
| 11595 |
- gh-102997: Update Windows installer to use SQLite 3.41.2. |
| 11596 |
|
| 11597 |
- gh-88013: Fixed a bug where :exc:`TypeError` was raised when calling |
| 11598 |
:func:`ntpath.realpath` with a bytes parameter in some cases. |
| 11599 |
|
| 11600 |
macOS |
| 11601 |
----- |
| 11602 |
|
| 11603 |
- gh-99834: Update macOS installer to Tcl/Tk 8.6.13. |
| 11604 |
|
| 11605 |
- gh-104623: Update macOS installer to SQLite 3.42.0. |
| 11606 |
|
| 11607 |
- gh-103545: Add ``os.PRIO_DARWIN_THREAD``, ``os.PRIO_DARWIN_PROCESS``, |
| 11608 |
``os.PRIO_DARWIN_BG`` and ``os.PRIO_DARWIN_NONUI``. These can be used with |
| 11609 |
``os.setpriority`` to run the process at a lower priority and make use of |
| 11610 |
the efficiency cores on Apple Silicon systems. |
| 11611 |
|
| 11612 |
- gh-104180: Support reading SOCKS proxy configuration from macOS System |
| 11613 |
Configuration. Patch by Sam Schott. |
| 11614 |
|
| 11615 |
- gh-60436: update curses textbox to additionally handle backspace using the |
| 11616 |
``curses.ascii.DEL`` key press. |
| 11617 |
|
| 11618 |
- gh-102997: Update macOS installer to SQLite 3.41.2. |
| 11619 |
|
| 11620 |
IDLE |
| 11621 |
---- |
| 11622 |
|
| 11623 |
- gh-104499: Fix completions for Tk Aqua 8.7 (currently blank). |
| 11624 |
|
| 11625 |
- gh-104496: About prints both tcl and tk versions if different (expected |
| 11626 |
someday). |
| 11627 |
|
| 11628 |
- gh-88496: Fix IDLE test hang on macOS. |
| 11629 |
|
| 11630 |
Tools/Demos |
| 11631 |
----------- |
| 11632 |
|
| 11633 |
- gh-104389: Argument Clinic C converters now accept the ``unused`` keyword, |
| 11634 |
for wrapping a parameter with :c:macro:`Py_UNUSED`. Patch by Erlend E. |
| 11635 |
Aasland. |
| 11636 |
|
| 11637 |
C API |
| 11638 |
----- |
| 11639 |
|
| 11640 |
- gh-101291: Added unstable C API for extracting the value of "compact" |
| 11641 |
integers: :c:func:`PyUnstable_Long_IsCompact` and |
| 11642 |
:c:func:`PyUnstable_Long_CompactValue`. |
| 11643 |
|
| 11644 |
- gh-104109: We've added ``Py_NewInterpreterFromConfig()`` and |
| 11645 |
``PyInterpreterConfig`` to the public C-API (but not the stable ABI; not |
| 11646 |
yet at least). The new function may be used to create a new interpreter |
| 11647 |
with various features configured. The function was added to support PEP |
| 11648 |
684 (per-interpreter GIL). |
| 11649 |
|
| 11650 |
- gh-103968: :c:func:`PyType_FromSpec` and its variants now allow creating |
| 11651 |
classes whose metaclass overrides :c:member:`~PyTypeObject.tp_new`. The |
| 11652 |
``tp_new`` is ignored. This behavior is deprecated and will be disallowed |
| 11653 |
in 3.14+. The new :c:func:`PyType_FromMetaclass` already disallows it. |
| 11654 |
|
| 11655 |
- gh-103743: Add :c:func:`PyUnstable_Object_GC_NewWithExtraData` function |
| 11656 |
that can be used to allocate additional memory after an object for data |
| 11657 |
not managed by Python. |
| 11658 |
|
| 11659 |
- gh-103295: Introduced :c:func:`PyUnstable_WritePerfMapEntry`, |
| 11660 |
:c:func:`PyUnstable_PerfMapState_Init` and |
| 11661 |
:c:func:`PyUnstable_PerfMapState_Fini`. These allow extension modules (JIT |
| 11662 |
compilers in particular) to write to perf-map files in a thread safe |
| 11663 |
manner. The :doc:`../howto/perf_profiling` also uses these APIs to write |
| 11664 |
entries in the perf-map file. |
| 11665 |
|
| 11666 |
- gh-103509: Added C API for extending types whose instance memory layout is |
| 11667 |
opaque: :c:member:`PyType_Spec.basicsize` can now be zero or negative, |
| 11668 |
:c:func:`PyObject_GetTypeData` can be used to get subclass-specific data, |
| 11669 |
and :c:macro:`Py_TPFLAGS_ITEMS_AT_END` can be used to safely extend |
| 11670 |
variable-size objects. See :pep:`697` for details. |
| 11671 |
|
| 11672 |
- gh-103091: Add a new C-API function to eagerly assign a version tag to a |
| 11673 |
PyTypeObject: ``PyUnstable_Type_AssignVersionTag()``. |
| 11674 |
|
| 11675 |
- gh-101408: :c:macro:`PyObject_GC_Resize` should calculate preheader size |
| 11676 |
if needed. Patch by Donghee Na. |
| 11677 |
|
| 11678 |
- gh-98836: Add support of more formatting options (left aligning, octals, |
| 11679 |
uppercase hexadecimals, :c:type:`intmax_t`, :c:type:`ptrdiff_t`, |
| 11680 |
:c:type:`wchar_t` C strings, variable width and precision) in |
| 11681 |
:c:func:`PyUnicode_FromFormat` and :c:func:`PyUnicode_FromFormatV`. |
| 11682 |
|
| 11683 |
- gh-96803: Add unstable C-API functions to get the code object, lasti and |
| 11684 |
line number from the internal ``_PyInterpreterFrame`` in the limited API. |
| 11685 |
The functions are: |
| 11686 |
|
| 11687 |
* ``PyCodeObject * PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame)`` |
| 11688 |
* ``int PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame *frame)`` |
| 11689 |
* ``int PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame)`` |
| 11690 |
|
| 11691 |
|
| 11692 |
What's New in Python 3.12.0 alpha 7? |
| 11693 |
==================================== |
| 11694 |
|
| 11695 |
*Release date: 2023-04-04* |
| 11696 |
|
| 11697 |
Core and Builtins |
| 11698 |
----------------- |
| 11699 |
|
| 11700 |
- gh-102192: Deprecated ``_PyErr_ChainExceptions`` in favour of |
| 11701 |
``_PyErr_ChainExceptions1``. |
| 11702 |
|
| 11703 |
- gh-89987: Reduce the number of inline :opcode:`CACHE` entries for |
| 11704 |
:opcode:`BINARY_SUBSCR`. |
| 11705 |
|
| 11706 |
- gh-102859: Removed :opcode:`!JUMP_IF_FALSE_OR_POP` and |
| 11707 |
:opcode:`!JUMP_IF_TRUE_OR_POP` instructions. |
| 11708 |
|
| 11709 |
- gh-101975: Fixed ``stacktop`` value on tracing entries to avoid corruption |
| 11710 |
on garbage collection. |
| 11711 |
|
| 11712 |
- gh-102778: Add :data:`sys.last_exc` and deprecate :data:`sys.last_type`, |
| 11713 |
:data:`sys.last_value` and :data:`sys.last_traceback`, which hold the same |
| 11714 |
information in its legacy form. |
| 11715 |
|
| 11716 |
- gh-100982: Replace all occurrences of ``COMPARE_AND_BRANCH`` with |
| 11717 |
:opcode:`COMPARE_OP`. |
| 11718 |
|
| 11719 |
- gh-102701: Fix overflow when creating very large dict. |
| 11720 |
|
| 11721 |
- gh-102755: Add :c:func:`PyErr_DisplayException` which takes just an |
| 11722 |
exception instance, to replace the legacy :c:func:`PyErr_Display` which |
| 11723 |
takes the ``(typ, exc, tb)`` triplet. |
| 11724 |
|
| 11725 |
- gh-102594: Add note to exception raised in ``PyErr_SetObject`` when |
| 11726 |
normalization fails. |
| 11727 |
|
| 11728 |
- gh-90997: Shrink the number of inline :opcode:`CACHE` entries used by |
| 11729 |
:opcode:`LOAD_GLOBAL`. |
| 11730 |
|
| 11731 |
Library |
| 11732 |
------- |
| 11733 |
|
| 11734 |
- gh-102491: Improve import time of ``platform`` by removing IronPython |
| 11735 |
version parsing. The IronPython version parsing was not functional (see |
| 11736 |
https://github.com/IronLanguages/ironpython3/issues/1667). |
| 11737 |
|
| 11738 |
Core and Builtins |
| 11739 |
----------------- |
| 11740 |
|
| 11741 |
- gh-101291: Rearrage bits in first field (after header) of PyLongObject. * |
| 11742 |
Bits 0 and 1: 1 - sign. I.e. 0 for positive numbers, 1 for zero and 2 for |
| 11743 |
negative numbers. * Bit 2 reserved (probably for the immortal bit) * Bits |
| 11744 |
3+ the unsigned size. |
| 11745 |
|
| 11746 |
This makes a few operations slightly more efficient, and will enable a |
| 11747 |
more compact and faster 2s-complement representation of most ints in |
| 11748 |
future. |
| 11749 |
|
| 11750 |
- gh-102397: Fix segfault from race condition in signal handling during |
| 11751 |
garbage collection. Patch by Kumar Aditya. |
| 11752 |
|
| 11753 |
- gh-102406: :mod:`codecs` encoding/decoding errors now get the context |
| 11754 |
information (which operation and which codecs) attached as :pep:`678` |
| 11755 |
notes instead of through chaining a new instance of the exception. |
| 11756 |
|
| 11757 |
- gh-102281: Fix potential nullptr dereference and use of uninitialized |
| 11758 |
memory in fileutils. Patch by Max Bachmann. |
| 11759 |
|
| 11760 |
- gh-102300: Reuse operands with refcount of 1 in float specializations of |
| 11761 |
BINARY_OP. |
| 11762 |
|
| 11763 |
- gh-102213: Fix performance loss when accessing an object's attributes with |
| 11764 |
``__getattr__`` defined. |
| 11765 |
|
| 11766 |
- gh-102255: Improve build support for the Xbox. Patch by Max Bachmann. |
| 11767 |
|
| 11768 |
Build |
| 11769 |
----- |
| 11770 |
|
| 11771 |
- gh-102027: Fix SSE2 and SSE3 detection in ``_blake2`` internal module. |
| 11772 |
Patch by Max Bachmann. |
| 11773 |
|
| 11774 |
Core and Builtins |
| 11775 |
----------------- |
| 11776 |
|
| 11777 |
- gh-101865: Deprecate ``co_lnotab`` in code objects, schedule it for |
| 11778 |
removal in Python 3.14 |
| 11779 |
|
| 11780 |
Library |
| 11781 |
------- |
| 11782 |
|
| 11783 |
- bpo-1635741: Adapt :mod:`!_pickle` to :pep:`687`. Patch by Mohamed Koubaa |
| 11784 |
and Erlend Aasland. |
| 11785 |
|
| 11786 |
- gh-103085: Pure python :func:`locale.getencoding` will not warn |
| 11787 |
deprecation. |
| 11788 |
|
| 11789 |
- gh-103068: It's no longer possible to register conditional breakpoints in |
| 11790 |
:class:`~pdb.Pdb` that raise :exc:`SyntaxError`. Patch by Tian Gao. |
| 11791 |
|
| 11792 |
- gh-102549: Don't ignore exceptions in member type creation. |
| 11793 |
|
| 11794 |
- gh-103056: Ensure final ``_generate_next_value_`` is a ``staticmethod``. |
| 11795 |
|
| 11796 |
- gh-103046: Display current line label correctly in :mod:`dis` when |
| 11797 |
``show_caches`` is False and ``lasti`` points to a CACHE entry. |
| 11798 |
|
| 11799 |
- gh-102433: :func:`isinstance` checks against :func:`runtime-checkable |
| 11800 |
protocols <typing.runtime_checkable>` now use |
| 11801 |
:func:`inspect.getattr_static` rather than :func:`hasattr` to lookup |
| 11802 |
whether attributes exist. This means that descriptors and |
| 11803 |
:meth:`~object.__getattr__` methods are no longer unexpectedly evaluated |
| 11804 |
during ``isinstance()`` checks against runtime-checkable protocols. |
| 11805 |
However, it may also mean that some objects which used to be considered |
| 11806 |
instances of a runtime-checkable protocol may no longer be considered |
| 11807 |
instances of that protocol on Python 3.12+, and vice versa. Most users are |
| 11808 |
unlikely to be affected by this change. Patch by Alex Waygood. |
| 11809 |
|
| 11810 |
- gh-103023: It's no longer possible to register expressions to display in |
| 11811 |
:class:`~pdb.Pdb` that raise :exc:`SyntaxError`. Patch by Tian Gao. |
| 11812 |
|
| 11813 |
- gh-102947: Improve traceback when :func:`dataclasses.fields` is called on |
| 11814 |
a non-dataclass. Patch by Alex Waygood |
| 11815 |
|
| 11816 |
- gh-102780: The :class:`asyncio.Timeout` context manager now works reliably |
| 11817 |
even when performing cleanup due to task cancellation. Previously it |
| 11818 |
could raise a :exc:`~asyncio.CancelledError` instead of an |
| 11819 |
:exc:`~asyncio.TimeoutError` in such cases. |
| 11820 |
|
| 11821 |
- gh-102871: Remove support for obsolete browsers from :mod:`webbrowser`. |
| 11822 |
Removed browsers include Grail, Mosaic, Netscape, Galeon, Skipstone, |
| 11823 |
Iceape, Firebird, and Firefox versions 35 and below. |
| 11824 |
|
| 11825 |
- gh-102839: Improve performance of :func:`math.log` arguments handling by |
| 11826 |
removing the argument clinic. |
| 11827 |
|
| 11828 |
- gh-102828: Add the ``onexc`` arg to :func:`shutil.rmtree`, which is like |
| 11829 |
``onerror`` but expects an exception instance rather than an exc_info |
| 11830 |
tuple. Deprecate ``onerror``. |
| 11831 |
|
| 11832 |
- gh-88965: typing: Fix a bug relating to substitution in custom classes |
| 11833 |
generic over a :class:`~typing.ParamSpec`. Previously, if the |
| 11834 |
``ParamSpec`` was substituted with a parameters list that itself contained |
| 11835 |
a :class:`~typing.TypeVar`, the ``TypeVar`` in the parameters list could |
| 11836 |
not be subsequently substituted. This is now fixed. |
| 11837 |
|
| 11838 |
Patch by Nikita Sobolev. |
| 11839 |
|
| 11840 |
- gh-76846: Fix issue where ``__new__()`` and ``__init__()`` methods of |
| 11841 |
:class:`pathlib.PurePath` and :class:`~pathlib.Path` subclasses were not |
| 11842 |
called in some circumstances. |
| 11843 |
|
| 11844 |
- gh-78530: :func:`asyncio.wait` now accepts generators yielding tasks. |
| 11845 |
Patch by Kumar Aditya. |
| 11846 |
|
| 11847 |
- gh-102748: :func:`asyncio.iscoroutine` now returns ``False`` for |
| 11848 |
generators as :mod:`asyncio` does not support legacy generator-based |
| 11849 |
coroutines. Patch by Kumar Aditya. |
| 11850 |
|
| 11851 |
- gh-102670: Optimized fmean(), correlation(), covariance(), and |
| 11852 |
linear_regression() using the new math.sumprod() function. |
| 11853 |
|
| 11854 |
- gh-102615: Typing: Improve the ``repr`` of generic aliases for classes |
| 11855 |
generic over a :class:`~typing.ParamSpec`. (Use square brackets to |
| 11856 |
represent a parameter list.) |
| 11857 |
|
| 11858 |
- gh-100112: :meth:`asyncio.Task.get_coro` now always returns a coroutine |
| 11859 |
when wrapping an awaitable object. Patch by Kumar Aditya. |
| 11860 |
|
| 11861 |
- gh-102578: Speed up setting or deleting mutable attributes on |
| 11862 |
non-dataclass subclasses of frozen dataclasses. Due to the implementation |
| 11863 |
of ``__setattr__`` and ``__delattr__`` for frozen dataclasses, this |
| 11864 |
previously had a time complexity of *O*\ (*n*). It now has a time |
| 11865 |
complexity of *O*\ (1). |
| 11866 |
|
| 11867 |
- gh-102519: Add :func:`os.listdrives`, :func:`os.listvolumes` and |
| 11868 |
:func:`os.listmounts` functions on Windows for enumerating drives, volumes |
| 11869 |
and mount points |
| 11870 |
|
| 11871 |
- gh-74468: Attribute name of the extracted :mod:`tarfile` file object now |
| 11872 |
holds filename of itself rather than of the archive it is contained in. |
| 11873 |
Patch by Oleg Iarygin. |
| 11874 |
|
| 11875 |
- gh-102378: Private helper method |
| 11876 |
``inspect._signature_strip_non_python_syntax`` will no longer strip ``/`` |
| 11877 |
from the input string. |
| 11878 |
|
| 11879 |
- gh-79940: Add :func:`inspect.getasyncgenstate` and |
| 11880 |
:func:`inspect.getasyncgenlocals`. Patch by Thomas Krennwallner. |
| 11881 |
|
| 11882 |
- gh-102103: Add ``module`` argument to :func:`dataclasses.make_dataclass` |
| 11883 |
and make classes produced by it pickleable. |
| 11884 |
|
| 11885 |
- gh-102069: Fix ``__weakref__`` descriptor generation for custom |
| 11886 |
dataclasses. |
| 11887 |
|
| 11888 |
- gh-102038: Skip a ``stat`` in :mod:`site` if we have already found a |
| 11889 |
``pyvenv.cfg`` |
| 11890 |
|
| 11891 |
- gh-98886: Fix issues when defining dataclasses that have fields with |
| 11892 |
specific underscore names that aren't clearly reserved by |
| 11893 |
:mod:`dataclasses`. |
| 11894 |
|
| 11895 |
- gh-101673: Fix a :mod:`pdb` bug where ``ll`` clears the changes to local |
| 11896 |
variables. |
| 11897 |
|
| 11898 |
- gh-101313: Added -h and --help arguments to the webbrowser CLI |
| 11899 |
|
| 11900 |
- gh-100372: :meth:`ssl.SSLContext.load_verify_locations` no longer |
| 11901 |
incorrectly accepts some cases of trailing data when parsing DER. |
| 11902 |
|
| 11903 |
- gh-89727: Fix pathlib.Path.walk RecursionError on deep directory trees by |
| 11904 |
rewriting it using iteration instead of recursion. |
| 11905 |
|
| 11906 |
- gh-100131: Added an optional ``delete`` keyword argument to |
| 11907 |
:class:`tempfile.TemporaryDirectory`. |
| 11908 |
|
| 11909 |
- gh-48330: Added ``--durations`` command line option, showing the N slowest |
| 11910 |
test cases. :class:`unittest.TextTestRunner` and |
| 11911 |
:class:`unittest.TextTestResult` constructors accept a new *durations* |
| 11912 |
keyword argument. Subclasses should take this into account or accept |
| 11913 |
``**kwargs``. Added :meth:`unittest.TestResult.addDuration` method and |
| 11914 |
:attr:`unittest.TestResult.collectedDurations` attribute. |
| 11915 |
|
| 11916 |
(Contributed by Giampaolo Rodola) |
| 11917 |
|
| 11918 |
- gh-98169: Fix :func:`dataclasses.astuple` crash when |
| 11919 |
:class:`collections.defaultdict` is present in the attributes. |
| 11920 |
|
| 11921 |
- gh-96931: Fix incorrect results from :meth:`ssl.SSLSocket.shared_ciphers` |
| 11922 |
|
| 11923 |
- gh-95495: When built against OpenSSL 3.0, the :mod:`ssl` module had a bug |
| 11924 |
where it reported unauthenticated EOFs (i.e. without close_notify) as a |
| 11925 |
clean TLS-level EOF. It now raises :exc:`~ssl.SSLEOFError`, matching the |
| 11926 |
behavior in previous versions of OpenSSL. The |
| 11927 |
:attr:`~ssl.SSLContext.options` attribute on :class:`~ssl.SSLContext` also |
| 11928 |
no longer includes :const:`~ssl.OP_IGNORE_UNEXPECTED_EOF` by default. This |
| 11929 |
option may be set to specify the previous OpenSSL 3.0 behavior. |
| 11930 |
|
| 11931 |
- gh-94684: Now :func:`uuid.uuid3` and :func:`uuid.uuid5` functions support |
| 11932 |
:class:`bytes` objects as their *name* argument. |
| 11933 |
|
| 11934 |
- gh-94440: Fix a :mod:`concurrent.futures.process` bug where |
| 11935 |
``ProcessPoolExecutor`` shutdown could hang after a future has been |
| 11936 |
quickly submitted and canceled. |
| 11937 |
|
| 11938 |
- gh-72346: Added deprecation warning to *isdst* parameter of |
| 11939 |
:func:`email.utils.localtime`. |
| 11940 |
|
| 11941 |
- bpo-36305: Fix handling of Windows filenames that resemble drives, such as |
| 11942 |
``./a:b``, in :mod:`pathlib`. |
| 11943 |
|
| 11944 |
Documentation |
| 11945 |
------------- |
| 11946 |
|
| 11947 |
- gh-103112: Add docstring to :meth:`http.client.HTTPResponse.read` to fix |
| 11948 |
``pydoc`` output. |
| 11949 |
|
| 11950 |
Tests |
| 11951 |
----- |
| 11952 |
|
| 11953 |
- gh-102980: Improve test coverage on :mod:`pdb`. |
| 11954 |
|
| 11955 |
- gh-102537: Adjust the error handling strategy in |
| 11956 |
``test_zoneinfo.TzPathTest.python_tzpath_context``. Patch by Paul Ganssle. |
| 11957 |
|
| 11958 |
- gh-101377: Improved test_locale_calendar_formatweekday of calendar. |
| 11959 |
|
| 11960 |
Build |
| 11961 |
----- |
| 11962 |
|
| 11963 |
- gh-102973: Add a dev container (along with accompanying Dockerfile) for |
| 11964 |
development purposes. |
| 11965 |
|
| 11966 |
- gh-102711: Fix ``-Wstrict-prototypes`` compiler warnings. |
| 11967 |
|
| 11968 |
Windows |
| 11969 |
------- |
| 11970 |
|
| 11971 |
- gh-102690: Update :mod:`webbrowser` to fall back to Microsoft Edge instead |
| 11972 |
of Internet Explorer. |
| 11973 |
|
| 11974 |
- gh-99726: Improves correctness of stat results for Windows, and uses |
| 11975 |
faster API when available |
| 11976 |
|
| 11977 |
Tools/Demos |
| 11978 |
----------- |
| 11979 |
|
| 11980 |
- gh-102809: ``Misc/gdbinit`` was removed. |
| 11981 |
|
| 11982 |
C API |
| 11983 |
----- |
| 11984 |
|
| 11985 |
- gh-102013: Add a new (unstable) C-API function for iterating over GC'able |
| 11986 |
objects using a callback: ``PyUnstable_VisitObjects``. |
| 11987 |
|
| 11988 |
|
| 11989 |
What's New in Python 3.12.0 alpha 6? |
| 11990 |
==================================== |
| 11991 |
|
| 11992 |
*Release date: 2023-03-07* |
| 11993 |
|
| 11994 |
Security |
| 11995 |
-------- |
| 11996 |
|
| 11997 |
- gh-99108: Replace builtin hashlib implementations of MD5 and SHA1 with |
| 11998 |
verified ones from the HACL* project. |
| 11999 |
|
| 12000 |
- gh-101727: Updated the OpenSSL version used in Windows and macOS binary |
| 12001 |
release builds to 1.1.1t to address :cve:`2023-0286`, :cve:`2022-4303`, |
| 12002 |
and :cve:`2022-4303` per `the OpenSSL 2023-02-07 security advisory |
| 12003 |
<https://openssl-library.org/news/secadv/20230207.txt>`_. |
| 12004 |
|
| 12005 |
- gh-99108: Replace the builtin :mod:`hashlib` implementations of SHA2-384 |
| 12006 |
and SHA2-512 originally from LibTomCrypt with formally verified, |
| 12007 |
side-channel resistant code from the `HACL* |
| 12008 |
<https://github.com/hacl-star/hacl-star/>`_ project. The builtins remain a |
| 12009 |
fallback only used when OpenSSL does not provide them. |
| 12010 |
|
| 12011 |
- gh-101283: :class:`subprocess.Popen` now uses a safer approach to find |
| 12012 |
``cmd.exe`` when launching with ``shell=True``. Patch by Eryk Sun, based |
| 12013 |
on a patch by Oleg Iarygin. |
| 12014 |
|
| 12015 |
Core and Builtins |
| 12016 |
----------------- |
| 12017 |
|
| 12018 |
- gh-102493: Fix regression in semantics of normalisation in |
| 12019 |
``PyErr_SetObject``. |
| 12020 |
|
| 12021 |
- gh-102416: Do not memoize incorrectly automatically generated loop rules |
| 12022 |
in the parser. Patch by Pablo Galindo. |
| 12023 |
|
| 12024 |
- gh-102356: Fix a bug that caused a crash when deallocating deeply nested |
| 12025 |
filter objects. Patch by Marta Gómez Macías. |
| 12026 |
|
| 12027 |
- gh-102336: Cleanup Windows 7 specific special handling. Patch by Max |
| 12028 |
Bachmann. |
| 12029 |
|
| 12030 |
- gh-102250: Fixed a segfault occurring when the interpreter calls a |
| 12031 |
``__bool__`` method that raises. |
| 12032 |
|
| 12033 |
- gh-102126: Fix deadlock at shutdown when clearing thread states if any |
| 12034 |
finalizer tries to acquire the runtime head lock. Patch by Kumar Aditya. |
| 12035 |
|
| 12036 |
- gh-102027: Use ``GetCurrentProcessId`` on Windows when ``getpid`` is |
| 12037 |
unavailable. Patch by Max Bachmann. |
| 12038 |
|
| 12039 |
- gh-102056: Fix error handling bugs in interpreter's exception printing |
| 12040 |
code, which could cause a crash on infinite recursion. |
| 12041 |
|
| 12042 |
- gh-100982: Restrict the scope of the :opcode:`FOR_ITER_RANGE` instruction |
| 12043 |
to the scope of the original :opcode:`FOR_ITER` instruction, to allow |
| 12044 |
instrumentation. |
| 12045 |
|
| 12046 |
- gh-101967: Fix possible segfault in ``positional_only_passed_as_keyword`` |
| 12047 |
function, when new list created. |
| 12048 |
|
| 12049 |
- gh-101952: Fix possible segfault in ``BUILD_SET`` opcode, when new set |
| 12050 |
created. |
| 12051 |
|
| 12052 |
- gh-74895: :mod:`socket.getaddrinfo` no longer raises |
| 12053 |
:class:`OverflowError` for :class:`int` **port** values outside of the C |
| 12054 |
long range. Out of range values are left up to the underlying string based |
| 12055 |
C library API to report. A :class:`socket.gaierror` ``SAI_SERVICE`` may |
| 12056 |
occur instead, or no error at all as not all platform C libraries generate |
| 12057 |
an error. |
| 12058 |
|
| 12059 |
- gh-101799: Add :opcode:`CALL_INTRINSIC_2` and use it instead of |
| 12060 |
:opcode:`!PREP_RERAISE_STAR`. |
| 12061 |
|
| 12062 |
- gh-101857: Fix xattr support detection on Linux systems by widening the |
| 12063 |
check to linux, not just glibc. This fixes support for musl. |
| 12064 |
|
| 12065 |
- gh-84783: Make the slice object hashable. Patch by Will Bradshaw and |
| 12066 |
Furkan Onder. |
| 12067 |
|
| 12068 |
- gh-87849: Change the ``SEND`` instruction to leave the receiver on the |
| 12069 |
stack. This allows the specialized form of ``SEND`` to skip the chain of C |
| 12070 |
calls and jump directly to the ``RESUME`` in the generator or coroutine. |
| 12071 |
|
| 12072 |
- gh-101765: Fix SystemError / segmentation fault in iter ``__reduce__`` |
| 12073 |
when internal access of ``builtins.__dict__`` keys mutates the iter |
| 12074 |
object. |
| 12075 |
|
| 12076 |
- gh-101430: Update :mod:`tracemalloc` to handle presize of object properly. |
| 12077 |
Patch by Donghee Na. |
| 12078 |
|
| 12079 |
- gh-101696: Invalidate type version tag in ``_PyStaticType_Dealloc`` for |
| 12080 |
static types, avoiding bug where a false cache hit could crash the |
| 12081 |
interpreter. Patch by Kumar Aditya. |
| 12082 |
|
| 12083 |
- gh-101632: Adds a new :opcode:`RETURN_CONST` instruction. |
| 12084 |
|
| 12085 |
- gh-100719: Remove gi_code field from generator (and coroutine and async |
| 12086 |
generator) objects as it is redundant. The frame already includes a |
| 12087 |
reference to the code object. |
| 12088 |
|
| 12089 |
- gh-98627: When an interpreter is configured to check (and only then), |
| 12090 |
importing an extension module will now fail when the extension does not |
| 12091 |
support multiple interpreters (i.e. doesn't implement PEP 489 multi-phase |
| 12092 |
init). This does not apply to the main interpreter, nor to subinterpreters |
| 12093 |
created with ``Py_NewInterpreter()``. |
| 12094 |
|
| 12095 |
Library |
| 12096 |
------- |
| 12097 |
|
| 12098 |
- gh-102302: Micro-optimise hashing of :class:`inspect.Parameter`, reducing |
| 12099 |
the time it takes to hash an instance by around 40%. |
| 12100 |
|
| 12101 |
- gh-101979: Fix a bug where parentheses in the ``metavar`` argument to |
| 12102 |
:meth:`argparse.ArgumentParser.add_argument` were dropped. Patch by Yeojin |
| 12103 |
Kim. |
| 12104 |
|
| 12105 |
- gh-91038: :meth:`platform.platform` now has boolean default arguments. |
| 12106 |
|
| 12107 |
- gh-81652: Add :const:`mmap.MAP_ALIGNED_SUPER` FreeBSD and |
| 12108 |
:const:`mmap.MAP_CONCEAL` OpenBSD constants to :mod:`mmap`. Patch by |
| 12109 |
Yeojin Kim. |
| 12110 |
|
| 12111 |
- gh-102179: Fix :func:`os.dup2` error message for negative fds. |
| 12112 |
|
| 12113 |
- gh-101961: For the binary mode, :func:`fileinput.hookcompressed` doesn't |
| 12114 |
set the ``encoding`` value even if the value is ``None``. Patch by Gihwan |
| 12115 |
Kim. |
| 12116 |
|
| 12117 |
- gh-101936: The default value of ``fp`` becomes :class:`io.BytesIO` if |
| 12118 |
:exc:`~urllib.error.HTTPError` is initialized without a designated ``fp`` |
| 12119 |
parameter. Patch by Long Vo. |
| 12120 |
|
| 12121 |
- gh-101566: In zipfile, sync Path with `zipp 3.14 |
| 12122 |
<https://zipp.readthedocs.io/en/latest/history.html#v3-14-0>`_, including |
| 12123 |
fix for extractall on the underlying zipfile after being wrapped in |
| 12124 |
``Path``. |
| 12125 |
|
| 12126 |
- gh-97930: Apply changes from `importlib_resources 5.12 |
| 12127 |
<https://importlib-resources.readthedocs.io/en/latest/history.html#v5-12-0>`_, |
| 12128 |
including fix for ``MultiplexedPath`` to support directories in multiple |
| 12129 |
namespaces (python/importlib_resources#265). |
| 12130 |
|
| 12131 |
- gh-101997: Upgrade pip wheel bundled with ensurepip (pip 23.0.1) |
| 12132 |
|
| 12133 |
- gh-99108: The built-in extension modules for :mod:`hashlib` SHA2 |
| 12134 |
algorithms, used when OpenSSL does not provide them, now live in a single |
| 12135 |
internal ``_sha2`` module instead of separate ``_sha256`` and ``_sha512`` |
| 12136 |
modules. |
| 12137 |
|
| 12138 |
- gh-101892: Callable iterators no longer raise :class:`SystemError` when |
| 12139 |
the callable object exhausts the iterator but forgets to either return a |
| 12140 |
sentinel value or raise :class:`StopIteration`. |
| 12141 |
|
| 12142 |
- gh-87634: Remove locking behavior from :func:`functools.cached_property`. |
| 12143 |
|
| 12144 |
- gh-97786: Fix potential undefined behaviour in corner cases of |
| 12145 |
floating-point-to-time conversions. |
| 12146 |
|
| 12147 |
- gh-101517: Fixed bug where :mod:`bdb` looks up the source line with |
| 12148 |
:mod:`linecache` with a ``lineno=None``, which causes it to fail with an |
| 12149 |
unhandled exception. |
| 12150 |
|
| 12151 |
- gh-101773: Optimize :class:`fractions.Fraction` for small components. The |
| 12152 |
private argument ``_normalize`` of the :class:`fractions.Fraction` |
| 12153 |
constructor has been removed. |
| 12154 |
|
| 12155 |
- gh-101693: In :meth:`sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is |
| 12156 |
now emitted when :ref:`named placeholders <sqlite3-placeholders>` are used |
| 12157 |
together with parameters supplied as a :term:`sequence` instead of as a |
| 12158 |
:class:`dict`. Starting from Python 3.14, using named placeholders with |
| 12159 |
parameters supplied as a sequence will raise a |
| 12160 |
:exc:`~sqlite3.ProgrammingError`. Patch by Erlend E. Aasland. |
| 12161 |
|
| 12162 |
- gh-101446: Change repr of :class:`collections.OrderedDict` to use regular |
| 12163 |
dictionary formatting instead of pairs of keys and values. |
| 12164 |
|
| 12165 |
- gh-101362: Speed up :class:`pathlib.PurePath` construction by handling |
| 12166 |
arguments more uniformly. When a :class:`pathlib.Path` argument is |
| 12167 |
supplied, we use its string representation rather than joining its parts |
| 12168 |
with :func:`os.path.join`. |
| 12169 |
|
| 12170 |
- gh-101362: Speed up :class:`pathlib.PurePath` construction by calling |
| 12171 |
:func:`os.path.join` only when two or more arguments are given. |
| 12172 |
|
| 12173 |
- gh-101362: Speed up :class:`pathlib.Path` construction by running the path |
| 12174 |
flavour compatibility check only when pathlib is imported. |
| 12175 |
|
| 12176 |
- gh-85984: Refactored the implementation of :func:`pty.fork` to use |
| 12177 |
:func:`os.login_tty`. |
| 12178 |
|
| 12179 |
A :exc:`DeprecationWarning` is now raised by ``pty.master_open()`` and |
| 12180 |
``pty.slave_open()``. They were undocumented and deprecated long long ago |
| 12181 |
in the docstring in favor of :func:`pty.openpty`. |
| 12182 |
|
| 12183 |
- gh-101561: Add a new decorator :func:`typing.override`. See :pep:`698` for |
| 12184 |
details. Patch by Steven Troxler. |
| 12185 |
|
| 12186 |
- gh-63301: Set exit code when :mod:`tabnanny` CLI exits on error. |
| 12187 |
|
| 12188 |
- gh-101360: Fix anchor matching in :meth:`pathlib.PureWindowsPath.match`. |
| 12189 |
Path and pattern anchors are now matched with :mod:`fnmatch`, just like |
| 12190 |
other path parts. This allows patterns such as ``"*:/Users/*"`` to be |
| 12191 |
matched. |
| 12192 |
|
| 12193 |
- gh-101277: Remove global state from :mod:`itertools` module (:pep:`687`). |
| 12194 |
Patches by Erlend E. Aasland. |
| 12195 |
|
| 12196 |
- gh-100809: Fix handling of drive-relative paths (like 'C:' and 'C:foo') in |
| 12197 |
:meth:`pathlib.Path.absolute`. This method now uses the OS API to retrieve |
| 12198 |
the correct current working directory for the drive. |
| 12199 |
|
| 12200 |
- gh-99138: Apply :pep:`687` to :mod:`zoneinfo`. Patch by Erlend E. Aasland. |
| 12201 |
|
| 12202 |
- gh-96764: :func:`asyncio.wait_for` now uses :func:`asyncio.timeout` as its |
| 12203 |
underlying implementation. Patch by Kumar Aditya. |
| 12204 |
|
| 12205 |
- gh-88233: Correctly preserve "extra" fields in ``zipfile`` regardless of |
| 12206 |
their ordering relative to a zip64 "extra." |
| 12207 |
|
| 12208 |
- bpo-23224: Fix segfaults when creating :class:`lzma.LZMADecompressor` and |
| 12209 |
:class:`bz2.BZ2Decompressor` objects without calling ``__init__()``, and |
| 12210 |
fix leakage of locks and internal buffers when calling the ``__init__()`` |
| 12211 |
methods of :class:`lzma.LZMADecompressor`, :class:`lzma.LZMACompressor`, |
| 12212 |
:class:`bz2.BZ2Compressor`, and :class:`bz2.BZ2Decompressor` objects |
| 12213 |
multiple times. |
| 12214 |
|
| 12215 |
Documentation |
| 12216 |
------------- |
| 12217 |
|
| 12218 |
- gh-85417: Update :mod:`cmath` documentation to clarify behaviour on branch |
| 12219 |
cuts. |
| 12220 |
|
| 12221 |
- gh-97725: Fix :meth:`asyncio.Task.print_stack` description for |
| 12222 |
``file=None``. Patch by Oleg Iarygin. |
| 12223 |
|
| 12224 |
Tests |
| 12225 |
----- |
| 12226 |
|
| 12227 |
- gh-102019: Fix deadlock on shutdown if ``test_current_{exception,frames}`` |
| 12228 |
fails. Patch by Jacob Bower. |
| 12229 |
|
| 12230 |
- gh-85984: Utilize new "winsize" functions from termios in pty tests. |
| 12231 |
|
| 12232 |
- gh-89792: ``test_tools`` now copies up to 10x less source data to a |
| 12233 |
temporary directory during the ``freeze`` test by ignoring git metadata |
| 12234 |
and other artifacts. It also limits its python build parallelism based on |
| 12235 |
os.cpu_count instead of hard coding it as 8 cores. |
| 12236 |
|
| 12237 |
Build |
| 12238 |
----- |
| 12239 |
|
| 12240 |
- gh-99942: On Android, in a static build, python-config in embed mode no |
| 12241 |
longer incorrectly reports a library to link to. |
| 12242 |
|
| 12243 |
- gh-99942: On Android, python.pc now correctly reports the library to link |
| 12244 |
to, the same as python-config.sh. |
| 12245 |
|
| 12246 |
- gh-100221: Fix creating install directories in ``make sharedinstall`` if |
| 12247 |
they exist outside ``DESTDIR`` already. |
| 12248 |
|
| 12249 |
- gh-96821: Explicitly mark C extension modules that need defined signed |
| 12250 |
integer overflow, and add a configure option |
| 12251 |
:option:`--with-strict-overflow`. Patch by Matthias Görgens and Shantanu |
| 12252 |
Jain. |
| 12253 |
|
| 12254 |
Windows |
| 12255 |
------- |
| 12256 |
|
| 12257 |
- gh-102344: Implement ``winreg.QueryValue`` using ``QueryValueEx`` and |
| 12258 |
``winreg.SetValue`` using ``SetValueEx``. Patch by Max Bachmann. |
| 12259 |
|
| 12260 |
- gh-101881: Handle read and write operations on non-blocking pipes properly |
| 12261 |
on Windows. |
| 12262 |
|
| 12263 |
- gh-101881: Add support for the os.get_blocking() and os.set_blocking() |
| 12264 |
functions on Windows. |
| 12265 |
|
| 12266 |
- gh-101849: Ensures installer will correctly upgrade existing ``py.exe`` |
| 12267 |
launcher installs. |
| 12268 |
|
| 12269 |
- gh-101763: Updates copy of libffi bundled with Windows installs to 3.4.4. |
| 12270 |
|
| 12271 |
- gh-101759: Update Windows installer to SQLite 3.40.1. |
| 12272 |
|
| 12273 |
- gh-101614: Correctly handle extensions built against debug binaries that |
| 12274 |
reference ``python3_d.dll``. |
| 12275 |
|
| 12276 |
- gh-101196: The functions ``os.path.isdir``, ``os.path.isfile``, |
| 12277 |
``os.path.islink`` and ``os.path.exists`` are now 13% to 28% faster on |
| 12278 |
Windows, by making fewer Win32 API calls. |
| 12279 |
|
| 12280 |
macOS |
| 12281 |
----- |
| 12282 |
|
| 12283 |
- gh-101759: Update macOS installer to SQLite 3.40.1. |
| 12284 |
|
| 12285 |
C API |
| 12286 |
----- |
| 12287 |
|
| 12288 |
- gh-101907: Removes use of non-standard C++ extension in public header |
| 12289 |
files. |
| 12290 |
|
| 12291 |
- gh-99293: Document that the Py_TPFLAGS_VALID_VERSION_TAG is an internal |
| 12292 |
feature, should not be used, and will be removed. |
| 12293 |
|
| 12294 |
- gh-101578: Add :c:func:`PyErr_GetRaisedException` and |
| 12295 |
:c:func:`PyErr_SetRaisedException` for saving and restoring the current |
| 12296 |
exception. These functions return and accept a single exception object, |
| 12297 |
rather than the triple arguments of the now-deprecated |
| 12298 |
:c:func:`PyErr_Fetch` and :c:func:`PyErr_Restore`. This is less error |
| 12299 |
prone and a bit more efficient. |
| 12300 |
|
| 12301 |
Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as |
| 12302 |
convenience functions for retrieving and modifying the |
| 12303 |
:attr:`~BaseException.args` passed to the exception's constructor. |
| 12304 |
|
| 12305 |
- gh-91744: Introduced the *Unstable C API tier*, marking APi that is |
| 12306 |
allowed to change in minor releases without a deprecation period. See |
| 12307 |
:pep:`689` for details. |
| 12308 |
|
| 12309 |
|
| 12310 |
What's New in Python 3.12.0 alpha 5? |
| 12311 |
==================================== |
| 12312 |
|
| 12313 |
*Release date: 2023-02-07* |
| 12314 |
|
| 12315 |
Security |
| 12316 |
-------- |
| 12317 |
|
| 12318 |
- gh-99108: Replace the builtin :mod:`hashlib` implementations of SHA2-224 |
| 12319 |
and SHA2-256 originally from LibTomCrypt with formally verified, |
| 12320 |
side-channel resistant code from the `HACL* |
| 12321 |
<https://github.com/hacl-star/hacl-star/>`_ project. The builtins remain a |
| 12322 |
fallback only used when OpenSSL does not provide them. |
| 12323 |
|
| 12324 |
Core and Builtins |
| 12325 |
----------------- |
| 12326 |
|
| 12327 |
- gh-92173: Fix the ``defs`` and ``kwdefs`` arguments to |
| 12328 |
:c:func:`PyEval_EvalCodeEx` and a reference leak in that function. |
| 12329 |
|
| 12330 |
- gh-59956: The GILState API is now partially compatible with |
| 12331 |
subinterpreters. Previously, ``PyThreadState_GET()`` and |
| 12332 |
``PyGILState_GetThisThreadState()`` would get out of sync, causing |
| 12333 |
inconsistent behavior and crashes. |
| 12334 |
|
| 12335 |
- gh-101400: Fix wrong lineno in exception message on :keyword:`continue` or |
| 12336 |
:keyword:`break` which are not in a loop. Patch by Donghee Na. |
| 12337 |
|
| 12338 |
- gh-101372: Fix :func:`~unicodedata.is_normalized` to properly handle the |
| 12339 |
UCD 3.2.0 cases. Patch by Donghee Na. |
| 12340 |
|
| 12341 |
- gh-101266: Fix :func:`sys.getsizeof` reporting for :class:`int` |
| 12342 |
subclasses. |
| 12343 |
|
| 12344 |
- gh-101291: Refactor the ``PyLongObject`` struct into a normal Python |
| 12345 |
object header and a ``PyLongValue`` struct. |
| 12346 |
|
| 12347 |
- gh-101046: Fix a possible memory leak in the parser when raising |
| 12348 |
:exc:`MemoryError`. Patch by Pablo Galindo |
| 12349 |
|
| 12350 |
- gh-101037: Fix potential memory underallocation issue for instances of |
| 12351 |
:class:`int` subclasses with value zero. |
| 12352 |
|
| 12353 |
- gh-100762: Record the (virtual) exception block depth in the oparg of |
| 12354 |
:opcode:`YIELD_VALUE`. Use this to avoid the expensive ``throw()`` when |
| 12355 |
closing generators (and coroutines) that can be closed trivially. |
| 12356 |
|
| 12357 |
- gh-100982: Adds a new :opcode:`COMPARE_AND_BRANCH` instruction. This is a |
| 12358 |
bit more efficient when performing a comparison immediately followed by a |
| 12359 |
branch, and restores the design intent of PEP 659 that specializations are |
| 12360 |
local to a single instruction. |
| 12361 |
|
| 12362 |
- gh-100942: Fixed segfault in property.getter/setter/deleter that occurred |
| 12363 |
when a property subclass overrode the ``__new__`` method to return a |
| 12364 |
non-property instance. |
| 12365 |
|
| 12366 |
- gh-100923: Remove the ``mask`` cache entry for the :opcode:`COMPARE_OP` |
| 12367 |
instruction and embed the mask into the oparg. |
| 12368 |
|
| 12369 |
- gh-100892: Fix race while iterating over thread states in clearing |
| 12370 |
:class:`threading.local`. Patch by Kumar Aditya. |
| 12371 |
|
| 12372 |
- gh-91351: Fix a case where re-entrant imports could corrupt the import |
| 12373 |
deadlock detection code and cause a :exc:`KeyError` to be raised out of |
| 12374 |
:mod:`importlib/_bootstrap`. In addition to the straightforward cases, |
| 12375 |
this could also happen when garbage collection leads to a warning being |
| 12376 |
emitted -- as happens when it collects an open socket or file) |
| 12377 |
|
| 12378 |
- gh-100726: Optimize construction of ``range`` object for medium size |
| 12379 |
integers. |
| 12380 |
|
| 12381 |
- gh-100712: Added option to build cpython with specialization disabled, by |
| 12382 |
setting ``ENABLE_SPECIALIZATION=False`` in :mod:`opcode`, followed by |
| 12383 |
``make regen-all``. |
| 12384 |
|
| 12385 |
Library |
| 12386 |
------- |
| 12387 |
|
| 12388 |
- bpo-32780: Inter-field padding is now inserted into the PEP3118 format |
| 12389 |
strings obtained from :class:`ctypes.Structure` objects, reflecting their |
| 12390 |
true representation in memory. |
| 12391 |
|
| 12392 |
- gh-101541: [Enum] - fix psuedo-flag creation |
| 12393 |
|
| 12394 |
- gh-101570: Upgrade pip wheel bundled with ensurepip (pip 23.0) |
| 12395 |
|
| 12396 |
- gh-101323: Fix a bug where errors where not thrown by |
| 12397 |
zlib._ZlibDecompressor if encountered during decompressing. |
| 12398 |
|
| 12399 |
- gh-101317: Add *ssl_shutdown_timeout* parameter for |
| 12400 |
:meth:`asyncio.StreamWriter.start_tls`. |
| 12401 |
|
| 12402 |
- gh-101326: Fix regression when passing ``None`` as second or third |
| 12403 |
argument to ``FutureIter.throw``. |
| 12404 |
|
| 12405 |
- gh-92123: Adapt the ``_elementtree`` extension module to multi-phase init |
| 12406 |
(:pep:`489`). Patches by Erlend E. Aasland. |
| 12407 |
|
| 12408 |
- gh-100795: Avoid potential unexpected ``freeaddrinfo`` call (double free) |
| 12409 |
in :mod:`socket` when when a libc ``getaddrinfo()`` implementation leaves |
| 12410 |
garbage in an output pointer when returning an error. Original patch by |
| 12411 |
Sergey G. Brester. |
| 12412 |
|
| 12413 |
- gh-101143: Remove unused references to :class:`~asyncio.TimerHandle` in |
| 12414 |
``asyncio.base_events.BaseEventLoop._add_callback``. |
| 12415 |
|
| 12416 |
- gh-101144: Make :func:`zipfile.Path.open` and |
| 12417 |
:func:`zipfile.Path.read_text` also accept ``encoding`` as a positional |
| 12418 |
argument. This was the behavior in Python 3.9 and earlier. 3.10 |
| 12419 |
introduced a regression where supplying it as a positional argument would |
| 12420 |
lead to a :exc:`TypeError`. |
| 12421 |
|
| 12422 |
- gh-94518: Group-related variables of ``_posixsubprocess`` module are |
| 12423 |
renamed to stress that supplementary group affinity is added to a fork, |
| 12424 |
not replace the inherited ones. Patch by Oleg Iarygin. |
| 12425 |
|
| 12426 |
- gh-101015: Fix :func:`typing.get_type_hints` on ``'*tuple[...]'`` and |
| 12427 |
``*tuple[...]``. It must not drop the ``Unpack`` part. |
| 12428 |
|
| 12429 |
- gh-101000: Add :func:`os.path.splitroot`, which splits a path into a |
| 12430 |
3-item tuple ``(drive, root, tail)``. This new function is used by |
| 12431 |
:mod:`pathlib` to improve the performance of path construction by up to a |
| 12432 |
third. |
| 12433 |
|
| 12434 |
- gh-100573: Fix a Windows :mod:`asyncio` bug with named pipes where a |
| 12435 |
client doing ``os.stat()`` on the pipe would cause an error in the server |
| 12436 |
that disabled serving future requests. |
| 12437 |
|
| 12438 |
- gh-39615: :func:`warnings.warn` now has the ability to skip stack frames |
| 12439 |
based on code filename prefix rather than only a numeric ``stacklevel`` |
| 12440 |
via the new ``skip_file_prefixes`` keyword argument. |
| 12441 |
|
| 12442 |
- gh-100750: pass encoding kwarg to subprocess in platform |
| 12443 |
|
| 12444 |
- gh-100160: Emit a deprecation warning in |
| 12445 |
:meth:`asyncio.DefaultEventLoopPolicy.get_event_loop` if there is no |
| 12446 |
current event loop set and it decides to create one. |
| 12447 |
|
| 12448 |
- gh-96290: Fix handling of partial and invalid UNC drives in |
| 12449 |
``ntpath.splitdrive()``, and in ``ntpath.normpath()`` on non-Windows |
| 12450 |
systems. Paths such as '\\server' and '\\' are now considered by |
| 12451 |
``splitdrive()`` to contain only a drive, and consequently are not |
| 12452 |
modified by ``normpath()`` on non-Windows systems. The behaviour of |
| 12453 |
``normpath()`` on Windows systems is unaffected, as native OS APIs are |
| 12454 |
used. Patch by Eryk Sun, with contributions by Barney Gale. |
| 12455 |
|
| 12456 |
- gh-99952: Fix a reference undercounting issue in :class:`ctypes.Structure` |
| 12457 |
with ``from_param()`` results larger than a C pointer. |
| 12458 |
|
| 12459 |
- gh-67790: Add float-style formatting support for |
| 12460 |
:class:`fractions.Fraction` instances. |
| 12461 |
|
| 12462 |
- gh-99266: Preserve more detailed error messages in :mod:`ctypes`. |
| 12463 |
|
| 12464 |
- gh-86682: Ensure runtime-created collections have the correct module name |
| 12465 |
using the newly added (internal) :func:`sys._getframemodulename`. |
| 12466 |
|
| 12467 |
- gh-88597: :mod:`uuid` now has a command line interface. Try ``python -m |
| 12468 |
uuid -h``. |
| 12469 |
|
| 12470 |
- gh-60580: :data:`ctypes.wintypes.BYTE` definition changed from |
| 12471 |
:data:`~ctypes.c_byte` to :data:`~ctypes.c_ubyte` to match Windows SDK. |
| 12472 |
Patch by Anatoly Techtonik and Oleg Iarygin. |
| 12473 |
|
| 12474 |
- gh-94518: ``_posixsubprocess`` now initializes all UID and GID variables |
| 12475 |
using a reserved ``-1`` value instead of a separate flag. Patch by Oleg |
| 12476 |
Iarygin. |
| 12477 |
|
| 12478 |
- bpo-38941: The :mod:`xml.etree.ElementTree` module now emits |
| 12479 |
:exc:`DeprecationWarning` when testing the truth value of an |
| 12480 |
:class:`xml.etree.ElementTree.Element`. Before, the Python implementation |
| 12481 |
emitted :exc:`FutureWarning`, and the C implementation emitted nothing. |
| 12482 |
|
| 12483 |
- bpo-40077: Convert :mod:`elementtree` types to heap types. Patch by Erlend |
| 12484 |
E. Aasland. |
| 12485 |
|
| 12486 |
- bpo-29847: Fix a bug where :class:`pathlib.Path` accepted and ignored |
| 12487 |
keyword arguments. Patch provided by Yurii Karabas. |
| 12488 |
|
| 12489 |
- gh-77772: :class:`ctypes.CDLL`, :class:`ctypes.OleDLL`, |
| 12490 |
:class:`ctypes.WinDLL`, and :class:`ctypes.PyDLL` now accept |
| 12491 |
:term:`path-like objects <path-like object>` as their ``name`` argument. |
| 12492 |
Patch by Robert Hoelzl. |
| 12493 |
|
| 12494 |
Documentation |
| 12495 |
------------- |
| 12496 |
|
| 12497 |
- gh-88324: Reword :mod:`subprocess` to emphasize default behavior of |
| 12498 |
*stdin*, *stdout*, and *stderr* arguments. Remove inaccurate statement |
| 12499 |
about child file handle inheritance. |
| 12500 |
|
| 12501 |
Tests |
| 12502 |
----- |
| 12503 |
|
| 12504 |
- gh-101334: ``test_tarfile`` has been updated to pass when run as a high |
| 12505 |
UID. |
| 12506 |
|
| 12507 |
Build |
| 12508 |
----- |
| 12509 |
|
| 12510 |
- gh-101282: Update BOLT configuration not to use deprecated usage of |
| 12511 |
``--split functions``. Patch by Donghee Na. |
| 12512 |
|
| 12513 |
- gh-101522: Allow overriding Windows dependencies versions and paths using |
| 12514 |
MSBuild properties. |
| 12515 |
|
| 12516 |
- gh-77532: Minor fixes to allow building with ``PlatformToolset=ClangCL`` |
| 12517 |
on Windows. |
| 12518 |
|
| 12519 |
- gh-101152: In accordance with :PEP:`699`, the ``ma_version_tag`` field in |
| 12520 |
:c:type:`PyDictObject` is deprecated for extension modules. Accessing this |
| 12521 |
field will generate a compiler warning at compile time. This field will be |
| 12522 |
removed in Python 3.14. |
| 12523 |
|
| 12524 |
- gh-100340: Allows -Wno-int-conversion for wasm-sdk 17 and onwards, thus |
| 12525 |
enables building WASI builds once against the latest sdk. |
| 12526 |
|
| 12527 |
- gh-101060: Conditionally add ``-fno-reorder-blocks-and-partition`` in |
| 12528 |
configure. Effectively fixes ``--enable-bolt`` when using Clang, as this |
| 12529 |
appears to be a GCC-only flag. |
| 12530 |
|
| 12531 |
- gh-98705: ``__bool__`` is defined in AIX system header files which breaks |
| 12532 |
the build in AIX, so undefine it. |
| 12533 |
|
| 12534 |
- gh-98636: Fix a regression in detecting ``gdbm_compat`` library for the |
| 12535 |
``_gdbm`` module build. |
| 12536 |
|
| 12537 |
- gh-96305: ``_aix_support`` now uses a simple code to get platform details |
| 12538 |
rather than the now non-existent ``_bootsubprocess`` during bootstrap. |
| 12539 |
|
| 12540 |
Windows |
| 12541 |
------- |
| 12542 |
|
| 12543 |
- gh-101543: Ensure the install path in the registry is only used when the |
| 12544 |
standard library hasn't been located in any other way. |
| 12545 |
|
| 12546 |
- gh-101467: The ``py.exe`` launcher now correctly filters when only a |
| 12547 |
single runtime is installed. It also correctly handles prefix matches on |
| 12548 |
tags so that ``-3.1`` does not match ``3.11``, but would still match |
| 12549 |
``3.1-32``. |
| 12550 |
|
| 12551 |
- gh-99834: Updates bundled copy of Tcl/Tk to 8.6.13.0 |
| 12552 |
|
| 12553 |
- gh-101135: Restore ability to launch older 32-bit versions from the |
| 12554 |
:file:`py.exe` launcher when both 32-bit and 64-bit installs of the same |
| 12555 |
version are available. |
| 12556 |
|
| 12557 |
- gh-82052: Fixed an issue where writing more than 32K of Unicode output to |
| 12558 |
the console screen in one go can result in mojibake. |
| 12559 |
|
| 12560 |
- gh-100320: Ensures the ``PythonPath`` registry key from an install is used |
| 12561 |
when launching from a different copy of Python that relies on an existing |
| 12562 |
install to provide a copy of its modules and standard library. |
| 12563 |
|
| 12564 |
- gh-100247: Restores support for the :file:`py.exe` launcher finding |
| 12565 |
shebang commands in its configuration file using the full command name. |
| 12566 |
|
| 12567 |
|
| 12568 |
What's New in Python 3.12.0 alpha 4? |
| 12569 |
==================================== |
| 12570 |
|
| 12571 |
*Release date: 2023-01-10* |
| 12572 |
|
| 12573 |
Core and Builtins |
| 12574 |
----------------- |
| 12575 |
|
| 12576 |
- gh-100776: Fix misleading default value in :func:`input`'s |
| 12577 |
``__text_signature__``. |
| 12578 |
|
| 12579 |
- gh-99005: Remove :opcode:`!UNARY_POSITIVE`, :opcode:`!ASYNC_GEN_WRAP` and |
| 12580 |
:opcode:`!LIST_TO_TUPLE`, replacing them with intrinsics. |
| 12581 |
|
| 12582 |
- gh-99005: Add new :opcode:`CALL_INTRINSIC_1` instruction. Remove |
| 12583 |
:opcode:`IMPORT_STAR`, :opcode:`PRINT_EXPR` and |
| 12584 |
:opcode:`STOPITERATION_ERROR`, replacing them with the |
| 12585 |
:opcode:`CALL_INTRINSIC_1` instruction. |
| 12586 |
|
| 12587 |
- gh-100288: Remove the LOAD_ATTR_METHOD_WITH_DICT specialized instruction. |
| 12588 |
Stats show it is not useful. |
| 12589 |
|
| 12590 |
- gh-100720: Added ``_PyFrame_NumSlotsForCodeObject``, which returns the |
| 12591 |
number of slots needed in a frame for a given code object. |
| 12592 |
|
| 12593 |
- gh-100719: Removed the co_nplaincellvars field from the code object, as it |
| 12594 |
is redundant. |
| 12595 |
|
| 12596 |
- gh-100637: Fix :func:`int.__sizeof__` calculation to include the 1-element |
| 12597 |
``ob_digit`` array for ``0`` and ``False``. |
| 12598 |
|
| 12599 |
- gh-100649: Update the native_thread_id field of PyThreadState after fork. |
| 12600 |
|
| 12601 |
- gh-100126: Fix an issue where "incomplete" frames could be briefly visible |
| 12602 |
to C code while other frames are being torn down, possibly resulting in |
| 12603 |
corruption or hard crashes of the interpreter while running finalizers. |
| 12604 |
|
| 12605 |
- gh-87447: Fix :exc:`SyntaxError` on comprehension rebind checking with |
| 12606 |
names that are not actually redefined. |
| 12607 |
|
| 12608 |
Now reassigning ``b`` in ``[(b := 1) for a, b.prop in some_iter]`` is |
| 12609 |
allowed. Reassigning ``a`` is still disallowed as per :pep:`572`. |
| 12610 |
|
| 12611 |
- gh-100268: Add :meth:`int.is_integer` to improve duck type compatibility |
| 12612 |
between :class:`int` and :class:`float`. |
| 12613 |
|
| 12614 |
- gh-100425: Improve the accuracy of ``sum()`` with compensated summation. |
| 12615 |
|
| 12616 |
Library |
| 12617 |
------- |
| 12618 |
|
| 12619 |
- gh-100374: Fix incorrect result and delay in :func:`socket.getfqdn`. Patch |
| 12620 |
by Dominic Socular. |
| 12621 |
|
| 12622 |
Core and Builtins |
| 12623 |
----------------- |
| 12624 |
|
| 12625 |
- gh-100357: Convert ``vars``, ``dir``, ``next``, ``getattr``, and ``iter`` |
| 12626 |
to argument clinic. |
| 12627 |
|
| 12628 |
- gh-100117: Improve the output of :meth:`codeobject.co_lines` by emitting |
| 12629 |
only one entry for each line range. |
| 12630 |
|
| 12631 |
- gh-90043: Handle NaNs when specializing :opcode:`COMPARE_OP` for |
| 12632 |
:class:`float` values. |
| 12633 |
|
| 12634 |
- gh-100222: Redefine the ``_Py_CODEUNIT`` typedef as a union to describe |
| 12635 |
its layout to the C compiler, avoiding type punning and improving clarity. |
| 12636 |
|
| 12637 |
- gh-99955: Internal compiler functions (in compile.c) now consistently |
| 12638 |
return -1 on error and 0 on success. |
| 12639 |
|
| 12640 |
- gh-100188: The ``BINARY_SUBSCR_LIST_INT`` and ``BINARY_SUBSCR_TUPLE_INT`` |
| 12641 |
instructions are no longer used for negative integers because those |
| 12642 |
instructions always miss when encountering negative integers. |
| 12643 |
|
| 12644 |
- gh-99110: Initialize frame->previous in frameobject.c to fix a |
| 12645 |
segmentation fault when accessing frames created by :c:func:`PyFrame_New`. |
| 12646 |
|
| 12647 |
- gh-94155: Improved the hashing algorithm for code objects, mitigating some |
| 12648 |
hash collisions. |
| 12649 |
|
| 12650 |
- gh-99540: ``None`` now hashes to a constant value. This is not a |
| 12651 |
requirements change. |
| 12652 |
|
| 12653 |
- gh-100143: When built with ``--enable-pystats``, stats collection is now |
| 12654 |
off by default. To enable it early at startup, pass the ``-Xpystats`` |
| 12655 |
flag. Stats are now always dumped, even if switched off. |
| 12656 |
|
| 12657 |
- gh-100146: Improve ``BUILD_LIST`` opcode so that it works similarly to the |
| 12658 |
``BUILD_TUPLE`` opcode, by stealing references from the stack rather than |
| 12659 |
repeatedly using stack operations to set list elements. Implementation |
| 12660 |
details are in a new private API :c:func:`!_PyList_FromArraySteal`. |
| 12661 |
|
| 12662 |
- gh-100110: Specialize ``FOR_ITER`` for tuples. |
| 12663 |
|
| 12664 |
- gh-100050: Honor existing errors obtained when searching for mismatching |
| 12665 |
parentheses in the tokenizer. Patch by Pablo Galindo |
| 12666 |
|
| 12667 |
- gh-92216: Improve the performance of :func:`hasattr` for type objects with |
| 12668 |
a missing attribute. |
| 12669 |
|
| 12670 |
- gh-99582: Freeze :mod:`zipimport` module into ``_bootstrap_python``. |
| 12671 |
|
| 12672 |
- gh-99554: Pack debugging location tables more efficiently during bytecode |
| 12673 |
compilation. |
| 12674 |
|
| 12675 |
- gh-98522: Add an internal version number to code objects, to give better |
| 12676 |
versioning of inner functions and comprehensions, and thus better |
| 12677 |
specialization of those functions. This change is invisible to both Python |
| 12678 |
and C extensions. |
| 12679 |
|
| 12680 |
- gh-94603: Improve performance of ``list.pop`` for small lists. |
| 12681 |
|
| 12682 |
Library |
| 12683 |
------- |
| 12684 |
|
| 12685 |
- gh-89051: Add :const:`ssl.OP_LEGACY_SERVER_CONNECT` |
| 12686 |
|
| 12687 |
Core and Builtins |
| 12688 |
----------------- |
| 12689 |
|
| 12690 |
- bpo-32782: ``ctypes`` arrays of length 0 now report a correct itemsize |
| 12691 |
when a ``memoryview`` is constructed from them, rather than always giving |
| 12692 |
a value of 0. |
| 12693 |
|
| 12694 |
Library |
| 12695 |
------- |
| 12696 |
|
| 12697 |
- gh-100833: Speed up :func:`math.fsum` by removing defensive ``volatile`` |
| 12698 |
qualifiers. |
| 12699 |
|
| 12700 |
- gh-100805: Modify :func:`random.choice` implementation to once again work |
| 12701 |
with NumPy arrays. |
| 12702 |
|
| 12703 |
- gh-100813: Add :const:`socket.IP_PKTINFO` constant. |
| 12704 |
|
| 12705 |
- gh-100792: Make :meth:`email.message.Message.__contains__` twice as fast. |
| 12706 |
|
| 12707 |
- gh-91851: Microoptimizations for :meth:`fractions.Fraction.__round__`, |
| 12708 |
:meth:`fractions.Fraction.__ceil__` and |
| 12709 |
:meth:`fractions.Fraction.__floor__`. |
| 12710 |
|
| 12711 |
- gh-90104: Avoid RecursionError on ``repr`` if a dataclass field definition |
| 12712 |
has a cyclic reference. |
| 12713 |
|
| 12714 |
- gh-100689: Fix crash in :mod:`pyexpat` by statically allocating |
| 12715 |
``PyExpat_CAPI`` capsule. |
| 12716 |
|
| 12717 |
- gh-100740: Fix ``unittest.mock.Mock`` not respecting the spec for |
| 12718 |
attribute names prefixed with ``assert``. |
| 12719 |
|
| 12720 |
- gh-91219: Change ``SimpleHTTPRequestHandler`` to support subclassing to |
| 12721 |
provide a different set of index file names instead of using ``__init__`` |
| 12722 |
parameters. |
| 12723 |
|
| 12724 |
- gh-100690: ``Mock`` objects which are not unsafe will now raise an |
| 12725 |
``AttributeError`` when accessing an attribute that matches the name of an |
| 12726 |
assertion but without the prefix ``assert_``, e.g. accessing |
| 12727 |
``called_once`` instead of ``assert_called_once``. This is in addition to |
| 12728 |
this already happening for accessing attributes with prefixes ``assert``, |
| 12729 |
``assret``, ``asert``, ``aseert``, and ``assrt``. |
| 12730 |
|
| 12731 |
- gh-89727: Simplify and optimize :func:`os.walk` by using |
| 12732 |
:func:`isinstance` checks to check the top of the stack. |
| 12733 |
|
| 12734 |
- gh-100485: Add math.sumprod() to compute the sum of products. |
| 12735 |
|
| 12736 |
- gh-86508: Fix :func:`asyncio.open_connection` to skip binding to local |
| 12737 |
addresses of different family. Patch by Kumar Aditya. |
| 12738 |
|
| 12739 |
- gh-97930: ``importlib.resources.files`` now accepts a module as an anchor |
| 12740 |
instead of only accepting packages. If a module is passed, resources are |
| 12741 |
resolved adjacent to that module (in the same package or at the package |
| 12742 |
root). The parameter was renamed from ``package`` to ``anchor`` with a |
| 12743 |
compatibility shim for those passing by keyword. Additionally, the new |
| 12744 |
``anchor`` parameter is now optional and will default to the caller's |
| 12745 |
module. |
| 12746 |
|
| 12747 |
- gh-100585: Fixed a bug where importlib.resources.as_file was leaving file |
| 12748 |
pointers open |
| 12749 |
|
| 12750 |
- gh-100562: Improve performance of :meth:`pathlib.Path.absolute` by nearly |
| 12751 |
2x. This comes at the cost of a performance regression in |
| 12752 |
:meth:`pathlib.Path.cwd`, which is generally used less frequently in user |
| 12753 |
code. |
| 12754 |
|
| 12755 |
- gh-100519: Small simplification of :func:`http.cookiejar.eff_request_host` |
| 12756 |
that improves readability and better matches the RFC wording. |
| 12757 |
|
| 12758 |
- gh-100287: Fix the interaction of :func:`unittest.mock.seal` with |
| 12759 |
:class:`unittest.mock.AsyncMock`. |
| 12760 |
|
| 12761 |
- gh-100488: Add :meth:`Fraction.is_integer` to check whether a |
| 12762 |
:class:`fractions.Fraction` is an integer. This improves duck type |
| 12763 |
compatibility with :class:`float` and :class:`int`. |
| 12764 |
|
| 12765 |
- gh-100474: :mod:`http.server` now checks that an index page is actually a |
| 12766 |
regular file before trying to serve it. This avoids issues with |
| 12767 |
directories named ``index.html``. |
| 12768 |
|
| 12769 |
- gh-100363: Speed up :func:`asyncio.get_running_loop` by removing redundant |
| 12770 |
``getpid`` checks. Patch by Kumar Aditya. |
| 12771 |
|
| 12772 |
- gh-78878: Fix crash when creating an instance of :class:`!_ctypes.CField`. |
| 12773 |
|
| 12774 |
- gh-100348: Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by |
| 12775 |
removing ``_read_ready_cb`` in ``close``. |
| 12776 |
|
| 12777 |
- gh-100344: Provide C implementation for :func:`asyncio.current_task` for a |
| 12778 |
4x-6x speedup. |
| 12779 |
|
| 12780 |
- gh-100272: Fix JSON serialization of OrderedDict. It now preserves the |
| 12781 |
order of keys. |
| 12782 |
|
| 12783 |
- gh-83076: Instantiation of ``Mock()`` and ``AsyncMock()`` is now 3.8x |
| 12784 |
faster. |
| 12785 |
|
| 12786 |
- gh-100234: Set a default value of 1.0 for the ``lambd`` parameter in |
| 12787 |
random.expovariate(). |
| 12788 |
|
| 12789 |
- gh-100228: A :exc:`DeprecationWarning` may be raised when :func:`os.fork` |
| 12790 |
or :func:`os.forkpty` is called from multi-threaded processes. Forking |
| 12791 |
with threads is unsafe and can cause deadlocks, crashes and subtle |
| 12792 |
problems. Lack of a warning does not indicate that the fork call was |
| 12793 |
actually safe, as Python may not be aware of all threads. |
| 12794 |
|
| 12795 |
- gh-100039: Improve signatures for enums and flags. |
| 12796 |
|
| 12797 |
- gh-100133: Fix regression in :mod:`asyncio` where a subprocess would |
| 12798 |
sometimes lose data received from pipe. |
| 12799 |
|
| 12800 |
- bpo-44592: Fixes inconsistent handling of case sensitivity of |
| 12801 |
*extrasaction* arg in :class:`csv.DictWriter`. |
| 12802 |
|
| 12803 |
- gh-100098: Fix ``tuple`` subclasses being cast to ``tuple`` when used as |
| 12804 |
enum values. |
| 12805 |
|
| 12806 |
- gh-85432: Rename the *fmt* parameter of the pure-Python implementation of |
| 12807 |
:meth:`datetime.time.strftime` to *format*. Rename the *t* parameter of |
| 12808 |
:meth:`datetime.datetime.fromtimestamp` to *timestamp*. These changes mean |
| 12809 |
the parameter names in the pure-Python implementation now match the |
| 12810 |
parameter names in the C implementation. Patch by Alex Waygood. |
| 12811 |
|
| 12812 |
- gh-98778: Update :exc:`~urllib.error.HTTPError` to be initialized |
| 12813 |
properly, even if the ``fp`` is ``None``. Patch by Donghee Na. |
| 12814 |
|
| 12815 |
- gh-99925: Unify error messages in JSON serialization between |
| 12816 |
``json.dumps(float('nan'), allow_nan=False)`` and |
| 12817 |
``json.dumps(float('nan'), allow_nan=False, indent=<SOMETHING>)``. Now |
| 12818 |
both include the representation of the value that could not be serialized. |
| 12819 |
|
| 12820 |
- gh-89727: Fix issue with :func:`os.walk` where a :exc:`RecursionError` |
| 12821 |
would occur on deep directory structures by adjusting the implementation |
| 12822 |
of :func:`os.walk` to be iterative instead of recursive. |
| 12823 |
|
| 12824 |
- gh-94943: Add :ref:`enum-dataclass-support` to the :class:`~enum.Enum` |
| 12825 |
:meth:`~enum.Enum.__repr__`. When inheriting from a |
| 12826 |
:class:`~dataclasses.dataclass`, only show the field names in the value |
| 12827 |
section of the member :func:`repr`, and not the dataclass' class name. |
| 12828 |
|
| 12829 |
- gh-83035: Fix :func:`inspect.getsource` handling of decorator calls with |
| 12830 |
nested parentheses. |
| 12831 |
|
| 12832 |
- gh-99576: Fix ``.save()`` method for ``LWPCookieJar`` and |
| 12833 |
``MozillaCookieJar``: saved file was not truncated on repeated save. |
| 12834 |
|
| 12835 |
- gh-94912: Add :func:`inspect.markcoroutinefunction` decorator which |
| 12836 |
manually marks a function as a coroutine for the benefit of |
| 12837 |
:func:`iscoroutinefunction`. |
| 12838 |
|
| 12839 |
- gh-99509: Add :pep:`585` support for |
| 12840 |
:class:`multiprocessing.queues.Queue`. |
| 12841 |
|
| 12842 |
- gh-99482: Remove ``Jython`` partial compatibility code from several stdlib |
| 12843 |
modules. |
| 12844 |
|
| 12845 |
- gh-99433: Fix :mod:`doctest` failure on :class:`types.MethodWrapperType` |
| 12846 |
in modules. |
| 12847 |
|
| 12848 |
- gh-85267: Several improvements to :func:`inspect.signature`'s handling of |
| 12849 |
``__text_signature``. - Fixes a case where :func:`inspect.signature` |
| 12850 |
dropped parameters - Fixes a case where :func:`inspect.signature` raised |
| 12851 |
:exc:`tokenize.TokenError` - Allows :func:`inspect.signature` to |
| 12852 |
understand defaults involving binary operations of constants - |
| 12853 |
:func:`inspect.signature` is documented as only raising :exc:`TypeError` |
| 12854 |
or :exc:`ValueError`, but sometimes raised :exc:`RuntimeError`. These |
| 12855 |
cases now raise :exc:`ValueError` - Removed a dead code path |
| 12856 |
|
| 12857 |
- gh-91166: :mod:`asyncio` is optimized to avoid excessive copying when |
| 12858 |
writing to socket and use :meth:`~socket.socket.sendmsg` if the platform |
| 12859 |
supports it. Patch by Kumar Aditya. |
| 12860 |
|
| 12861 |
- gh-98030: Add missing TCP socket options from Linux: ``TCP_MD5SIG``, |
| 12862 |
``TCP_THIN_LINEAR_TIMEOUTS``, ``TCP_THIN_DUPACK``, ``TCP_REPAIR``, |
| 12863 |
``TCP_REPAIR_QUEUE``, ``TCP_QUEUE_SEQ``, ``TCP_REPAIR_OPTIONS``, |
| 12864 |
``TCP_TIMESTAMP``, ``TCP_CC_INFO``, ``TCP_SAVE_SYN``, ``TCP_SAVED_SYN``, |
| 12865 |
``TCP_REPAIR_WINDOW``, ``TCP_FASTOPEN_CONNECT``, ``TCP_ULP``, |
| 12866 |
``TCP_MD5SIG_EXT``, ``TCP_FASTOPEN_KEY``, ``TCP_FASTOPEN_NO_COOKIE``, |
| 12867 |
``TCP_ZEROCOPY_RECEIVE``, ``TCP_INQ``, ``TCP_TX_DELAY``. |
| 12868 |
|
| 12869 |
- gh-88500: Reduced the memory usage of :func:`urllib.parse.unquote` and |
| 12870 |
:func:`urllib.parse.unquote_to_bytes` on large values. |
| 12871 |
|
| 12872 |
- gh-96127: ``inspect.signature`` was raising ``TypeError`` on call with |
| 12873 |
mock objects. Now it correctly returns ``(*args, **kwargs)`` as inferred |
| 12874 |
signature. |
| 12875 |
|
| 12876 |
- gh-95882: Fix a 3.11 regression in |
| 12877 |
:func:`~contextlib.asynccontextmanager`, which caused it to propagate |
| 12878 |
exceptions with incorrect tracebacks and fix a 3.11 regression in |
| 12879 |
:func:`~contextlib.contextmanager`, which caused it to propagate |
| 12880 |
exceptions with incorrect tracebacks for :exc:`StopIteration`. |
| 12881 |
|
| 12882 |
- gh-78707: Deprecate passing more than one positional argument to |
| 12883 |
:meth:`pathlib.PurePath.relative_to` and |
| 12884 |
:meth:`~pathlib.PurePath.is_relative_to`. |
| 12885 |
|
| 12886 |
- gh-92122: Fix reStructuredText syntax errors in docstrings in the |
| 12887 |
:mod:`enum` module. |
| 12888 |
|
| 12889 |
- gh-91851: Optimize the :class:`~fractions.Fraction` arithmetics for small |
| 12890 |
components. |
| 12891 |
|
| 12892 |
- bpo-24132: Make :class:`pathlib.PurePath` and :class:`~pathlib.Path` |
| 12893 |
subclassable (private to start). Previously, attempting to instantiate a |
| 12894 |
subclass resulted in an :exc:`AttributeError` being raised. Patch by |
| 12895 |
Barney Gale. |
| 12896 |
|
| 12897 |
- bpo-40447: Accept :class:`os.PathLike` (such as :class:`pathlib.Path`) in |
| 12898 |
the ``stripdir`` arguments of :meth:`compileall.compile_file` and |
| 12899 |
:meth:`compileall.compile_dir`. |
| 12900 |
|
| 12901 |
- bpo-36880: Fix a reference counting issue when a :mod:`ctypes` callback |
| 12902 |
with return type :class:`~ctypes.py_object` returns ``None``, which could |
| 12903 |
cause crashes. |
| 12904 |
|
| 12905 |
Documentation |
| 12906 |
------------- |
| 12907 |
|
| 12908 |
- gh-100616: Document existing ``attr`` parameter to |
| 12909 |
:func:`curses.window.vline` function in :mod:`curses`. |
| 12910 |
|
| 12911 |
- gh-100472: Remove claim in documentation that the ``stripdir``, |
| 12912 |
``prependdir`` and ``limit_sl_dest`` parameters of |
| 12913 |
:func:`compileall.compile_dir` and :func:`compileall.compile_file` could |
| 12914 |
be :class:`bytes`. |
| 12915 |
|
| 12916 |
- bpo-25377: Clarify use of octal format of mode argument in help(os.chmod) |
| 12917 |
as well as help(os.fchmod) |
| 12918 |
|
| 12919 |
Tests |
| 12920 |
----- |
| 12921 |
|
| 12922 |
- gh-100454: Start running SSL tests with OpenSSL 3.1.0-beta1. |
| 12923 |
|
| 12924 |
- gh-100086: The Python test runner (libregrtest) now logs Python build |
| 12925 |
information like "debug" vs "release" build, or LTO and PGO optimizations. |
| 12926 |
Patch by Victor Stinner. |
| 12927 |
|
| 12928 |
- gh-93018: Make two tests forgiving towards host system libexpat with |
| 12929 |
backported security fixes applied. |
| 12930 |
|
| 12931 |
Build |
| 12932 |
----- |
| 12933 |
|
| 12934 |
- gh-100540: Removed the ``--with-system-ffi`` ``configure`` option; |
| 12935 |
``libffi`` must now always be supplied by the system on all non-Windows |
| 12936 |
platforms. The option has had no effect on non-Darwin platforms for |
| 12937 |
several releases, and in 3.11 only had the non-obvious effect of invoking |
| 12938 |
``pkg-config`` to find ``libffi`` and never setting |
| 12939 |
``-DUSING_APPLE_OS_LIBFFI``. Now on Darwin platforms ``configure`` will |
| 12940 |
first check for the OS ``libffi`` and then fall back to the same |
| 12941 |
processing as other platforms if it is not found. |
| 12942 |
|
| 12943 |
- gh-88267: Avoid exporting Python symbols in linked Windows applications |
| 12944 |
when the core is built as static. |
| 12945 |
|
| 12946 |
- bpo-41916: Allow override of ac_cv_cxx_thread so that cross compiled |
| 12947 |
python can set -pthread for CXX. |
| 12948 |
|
| 12949 |
Windows |
| 12950 |
------- |
| 12951 |
|
| 12952 |
- gh-100180: Update Windows installer to OpenSSL 1.1.1s |
| 12953 |
|
| 12954 |
- gh-99191: Use ``_MSVC_LANG >= 202002L`` instead of less-precise ``_MSC_VER |
| 12955 |
>=1929`` to more accurately test for C++20 support in |
| 12956 |
:file:`PC/_wmimodule.cpp`. |
| 12957 |
|
| 12958 |
- gh-79218: Define ``MS_WIN64`` for Mingw-w64 64bit, fix cython compilation |
| 12959 |
failure. |
| 12960 |
|
| 12961 |
- gh-99941: Ensure that :func:`asyncio.Protocol.data_received` receives an |
| 12962 |
immutable :class:`bytes` object (as documented), instead of |
| 12963 |
:class:`bytearray`. |
| 12964 |
|
| 12965 |
- bpo-43984: :meth:`winreg.SetValueEx` now leaves the target value untouched |
| 12966 |
in the case of conversion errors. Previously, ``-1`` would be written in |
| 12967 |
case of such errors. |
| 12968 |
|
| 12969 |
- bpo-34816: ``hasattr(ctypes.windll, 'nonexistant')`` now returns ``False`` |
| 12970 |
instead of raising :exc:`OSError`. |
| 12971 |
|
| 12972 |
macOS |
| 12973 |
----- |
| 12974 |
|
| 12975 |
- gh-100180: Update macOS installer to OpenSSL 1.1.1s |
| 12976 |
|
| 12977 |
- gh-100540: Removed obsolete ``dlfcn.h`` shim from the ``_ctypes`` |
| 12978 |
extension module, which has not been necessary since Mac OS X 10.2. |
| 12979 |
|
| 12980 |
Tools/Demos |
| 12981 |
----------- |
| 12982 |
|
| 12983 |
- bpo-45256: Fix a bug that caused an :exc:`AttributeError` to be raised in |
| 12984 |
``python-gdb.py`` when ``py-locals`` is used without a frame. |
| 12985 |
|
| 12986 |
- gh-100342: Add missing ``NULL`` check for possible allocation failure in |
| 12987 |
``*args`` parsing in Argument Clinic. |
| 12988 |
|
| 12989 |
C API |
| 12990 |
----- |
| 12991 |
|
| 12992 |
- gh-99947: Raising SystemError on import will now have its cause be set to |
| 12993 |
the original unexpected exception. |
| 12994 |
|
| 12995 |
- gh-99240: In argument parsing, after deallocating newly allocated memory, |
| 12996 |
reset its pointer to NULL. |
| 12997 |
|
| 12998 |
- gh-98724: The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and |
| 12999 |
:c:macro:`Py_XSETREF` macros now only evaluate their arguments once. If an |
| 13000 |
argument has side effects, these side effects are no longer duplicated. |
| 13001 |
Patch by Victor Stinner. |
| 13002 |
|
| 13003 |
|
| 13004 |
What's New in Python 3.12.0 alpha 3? |
| 13005 |
==================================== |
| 13006 |
|
| 13007 |
*Release date: 2022-12-06* |
| 13008 |
|
| 13009 |
Security |
| 13010 |
-------- |
| 13011 |
|
| 13012 |
- gh-100001: ``python -m http.server`` no longer allows terminal control |
| 13013 |
characters sent within a garbage request to be printed to the stderr |
| 13014 |
server log. |
| 13015 |
|
| 13016 |
This is done by changing the :mod:`http.server` |
| 13017 |
:class:`BaseHTTPRequestHandler` ``.log_message`` method to replace control |
| 13018 |
characters with a :samp:`\\x{HH}` hex escape before printing. |
| 13019 |
|
| 13020 |
- gh-87604: Avoid publishing list of active per-interpreter audit hooks via |
| 13021 |
the :mod:`gc` module |
| 13022 |
|
| 13023 |
Core and Builtins |
| 13024 |
----------------- |
| 13025 |
|
| 13026 |
- gh-99891: Fix a bug in the tokenizer that could cause infinite recursion |
| 13027 |
when showing syntax warnings that happen in the first line of the source. |
| 13028 |
Patch by Pablo Galindo |
| 13029 |
|
| 13030 |
- gh-91054: Add :c:func:`PyCode_AddWatcher` and |
| 13031 |
:c:func:`PyCode_ClearWatcher` APIs to register callbacks to receive |
| 13032 |
notification on creation and destruction of code objects. |
| 13033 |
|
| 13034 |
- gh-99729: Fix an issue that could cause frames to be visible to Python |
| 13035 |
code as they are being torn down, possibly leading to memory corruption or |
| 13036 |
hard crashes of the interpreter. |
| 13037 |
|
| 13038 |
- gh-99708: Fix bug where compiler crashes on an if expression with an empty |
| 13039 |
body block. |
| 13040 |
|
| 13041 |
- gh-99578: Fix a reference bug in :func:`!_imp.create_builtin` after the |
| 13042 |
creation of the first sub-interpreter for modules ``builtins`` and |
| 13043 |
``sys``. Patch by Victor Stinner. |
| 13044 |
|
| 13045 |
- gh-99581: Fixed a bug that was causing a buffer overflow if the tokenizer |
| 13046 |
copies a line missing the newline character from a file that is as long as |
| 13047 |
the available tokenizer buffer. Patch by Pablo galindo |
| 13048 |
|
| 13049 |
- gh-99553: Fix bug where an :exc:`ExceptionGroup` subclass can wrap a |
| 13050 |
:exc:`BaseException`. |
| 13051 |
|
| 13052 |
Library |
| 13053 |
------- |
| 13054 |
|
| 13055 |
- gh-99547: Add a function to os.path to check if a path is a junction: |
| 13056 |
isjunction. Add similar functionality to pathlib.Path as is_junction. |
| 13057 |
|
| 13058 |
- gh-99370: Fix zip path for venv created from a non-installed python on |
| 13059 |
POSIX platforms. |
| 13060 |
|
| 13061 |
Core and Builtins |
| 13062 |
----------------- |
| 13063 |
|
| 13064 |
- gh-99377: Add audit events for thread creation and clear operations. |
| 13065 |
|
| 13066 |
- gh-98686: Remove the ``BINARY_OP_GENERIC`` and ``COMPARE_OP_GENERIC`` |
| 13067 |
"specializations". |
| 13068 |
|
| 13069 |
- gh-99298: Remove the remaining error paths for attribute specializations, |
| 13070 |
and refuse to specialize attribute accesses on types that haven't had |
| 13071 |
:c:func:`PyType_Ready` called on them yet. |
| 13072 |
|
| 13073 |
- gh-99127: Allow some features of :mod:`syslog` to the main interpreter |
| 13074 |
only. Patch by Donghee Na. |
| 13075 |
|
| 13076 |
- gh-91053: Optimizing interpreters and JIT compilers may need to invalidate |
| 13077 |
internal metadata when functions are modified. This change adds the |
| 13078 |
ability to provide a callback that will be invoked each time a function is |
| 13079 |
created, modified, or destroyed. |
| 13080 |
|
| 13081 |
- gh-90994: Improve error messages when there's a syntax error with call |
| 13082 |
arguments. The following three cases are covered: - No value is assigned |
| 13083 |
to a named argument, eg ``foo(a=)``. - A value is assigned to a star |
| 13084 |
argument, eg ``foo(*args=[0])``. - A value is assigned to a double-star |
| 13085 |
keyword argument, eg ``foo(**kwarg={'a': 0})``. |
| 13086 |
|
| 13087 |
- bpo-45026: Optimize the :class:`range` object iterator. It is now smaller, |
| 13088 |
faster iteration of ranges containing large numbers. Smaller pickles, |
| 13089 |
faster unpickling. |
| 13090 |
|
| 13091 |
- bpo-31718: Raise :exc:`ValueError` instead of :exc:`SystemError` when |
| 13092 |
methods of uninitialized :class:`io.IncrementalNewlineDecoder` objects are |
| 13093 |
called. Patch by Oren Milman. |
| 13094 |
|
| 13095 |
- bpo-38031: Fix a possible assertion failure in :class:`io.FileIO` when the |
| 13096 |
opener returns an invalid file descriptor. |
| 13097 |
|
| 13098 |
Library |
| 13099 |
------- |
| 13100 |
|
| 13101 |
- gh-100001: Also \ escape \s in the http.server |
| 13102 |
BaseHTTPRequestHandler.log_message so that it is technically possible to |
| 13103 |
parse the line and reconstruct what the original data was. Without this a |
| 13104 |
\xHH is ambiguous as to if it is a hex replacement we put in or the |
| 13105 |
characters r"\x" came through in the original request line. |
| 13106 |
|
| 13107 |
- gh-99957: Add ``frozen_default`` parameter to |
| 13108 |
:func:`typing.dataclass_transform`. |
| 13109 |
|
| 13110 |
- gh-79033: Fix :func:`asyncio.Server.wait_closed` to actually do what the |
| 13111 |
docs promise -- wait for all existing connections to complete, after |
| 13112 |
closing the server. |
| 13113 |
|
| 13114 |
- gh-51524: Fix bug when calling trace.CoverageResults with valid infile. |
| 13115 |
|
| 13116 |
- gh-99645: Fix a bug in handling class cleanups in |
| 13117 |
:class:`unittest.TestCase`. Now ``addClassCleanup()`` uses separate lists |
| 13118 |
for different ``TestCase`` subclasses, and ``doClassCleanups()`` only |
| 13119 |
cleans up the particular class. |
| 13120 |
|
| 13121 |
- gh-99508: Fix ``TypeError`` in ``Lib/importlib/_bootstrap_external.py`` |
| 13122 |
while calling ``_imp.source_hash()``. |
| 13123 |
|
| 13124 |
- gh-66285: Fix :mod:`asyncio` to not share event loop and signal wakeupfd |
| 13125 |
in forked processes. Patch by Kumar Aditya. |
| 13126 |
|
| 13127 |
- gh-97001: Release the GIL when calling termios APIs to avoid blocking |
| 13128 |
threads. |
| 13129 |
|
| 13130 |
- gh-92647: Use final status of an enum to determine lookup or creation |
| 13131 |
branch of functional API. |
| 13132 |
|
| 13133 |
- gh-99388: Add *loop_factory* parameter to :func:`asyncio.run` to allow |
| 13134 |
specifying a custom event loop factory. Patch by Kumar Aditya. |
| 13135 |
|
| 13136 |
- gh-99341: Fix :func:`ast.increment_lineno` to also cover |
| 13137 |
:class:`ast.TypeIgnore` when changing line numbers. |
| 13138 |
|
| 13139 |
- gh-99382: Check the number of arguments in substitution in user generics |
| 13140 |
containing a :class:`~typing.TypeVarTuple` and one or more |
| 13141 |
:class:`~typing.TypeVar`. |
| 13142 |
|
| 13143 |
- gh-99379: Fix substitution of :class:`~typing.ParamSpec` followed by |
| 13144 |
:class:`~typing.TypeVarTuple` in generic aliases. |
| 13145 |
|
| 13146 |
- gh-99344: Fix substitution of :class:`~typing.TypeVarTuple` and |
| 13147 |
:class:`~typing.ParamSpec` together in user generics. |
| 13148 |
|
| 13149 |
- gh-99284: Remove ``_use_broken_old_ctypes_structure_semantics_`` old |
| 13150 |
untested and undocumented hack from :mod:`ctypes`. |
| 13151 |
|
| 13152 |
- gh-99201: Fix :exc:`IndexError` when initializing the config variables on |
| 13153 |
Windows if ``HAVE_DYNAMIC_LOADING`` is not set. |
| 13154 |
|
| 13155 |
- gh-99240: Fix double-free bug in Argument Clinic ``str_converter`` by |
| 13156 |
extracting memory clean up to a new ``post_parsing`` section. |
| 13157 |
|
| 13158 |
- gh-64490: Fix refcount error when arguments are packed to tuple in |
| 13159 |
Argument Clinic. |
| 13160 |
|
| 13161 |
- gh-99029: :meth:`pathlib.PurePath.relative_to` now treats naked Windows |
| 13162 |
drive paths as relative. This brings its behaviour in line with other |
| 13163 |
parts of pathlib. |
| 13164 |
|
| 13165 |
- gh-98253: The implementation of the typing module is now more resilient to |
| 13166 |
reference leaks in binary extension modules. |
| 13167 |
|
| 13168 |
Previously, a reference leak in a typed C API-based extension module could |
| 13169 |
leak internals of the typing module, which could in turn introduce leaks |
| 13170 |
in essentially any other package with typed function signatures. Although |
| 13171 |
the typing package is not the original source of the problem, such |
| 13172 |
non-local dependences exacerbate debugging of large-scale projects, and |
| 13173 |
the implementation was therefore changed to reduce harm by providing |
| 13174 |
better isolation. |
| 13175 |
|
| 13176 |
- gh-98458: Fix infinite loop in unittest when a self-referencing chained |
| 13177 |
exception is raised |
| 13178 |
|
| 13179 |
- gh-93453: :func:`asyncio.get_event_loop` and many other :mod:`asyncio` |
| 13180 |
functions like :func:`asyncio.ensure_future`, :func:`asyncio.shield` or |
| 13181 |
:func:`asyncio.gather`, and also the |
| 13182 |
:meth:`~asyncio.BaseDefaultEventLoopPolicy.get_event_loop` method of |
| 13183 |
:class:`asyncio.BaseDefaultEventLoopPolicy` now raise a |
| 13184 |
:exc:`RuntimeError` if called when there is no running event loop and the |
| 13185 |
current event loop was not set. Previously they implicitly created and set |
| 13186 |
a new current event loop. :exc:`DeprecationWarning` is no longer emitted |
| 13187 |
if there is no running event loop but the current event loop was set. |
| 13188 |
|
| 13189 |
- gh-97966: On ``uname_result``, restored expectation that ``_fields`` and |
| 13190 |
``_asdict`` would include all six properties including ``processor``. |
| 13191 |
|
| 13192 |
- gh-98248: Provide informative error messages in :func:`struct.pack` when |
| 13193 |
its integral arguments are not in range. |
| 13194 |
|
| 13195 |
- gh-98108: ``zipfile.Path`` is now pickleable if its initialization |
| 13196 |
parameters were pickleable (e.g. for file system paths). |
| 13197 |
|
| 13198 |
- gh-98098: Created packages from zipfile and test_zipfile modules, |
| 13199 |
separating ``zipfile.Path`` functionality. |
| 13200 |
|
| 13201 |
- gh-82836: Fix :attr:`~ipaddress.IPv4Address.is_private` properties in the |
| 13202 |
:mod:`ipaddress` module. Previously non-private networks (0.0.0.0/0) would |
| 13203 |
return ``True`` from this method; now they correctly return ``False``. |
| 13204 |
|
| 13205 |
- gh-96828: Add an :const:`~ssl.OP_ENABLE_KTLS` option for enabling the use |
| 13206 |
of the kernel TLS (kTLS). Patch by Illia Volochii. |
| 13207 |
|
| 13208 |
- gh-88863: To avoid apparent memory leaks when |
| 13209 |
:func:`asyncio.open_connection` raises, break reference cycles generated |
| 13210 |
by local exception and future instances (which has exception instance as |
| 13211 |
its member var). Patch by Dong Uk, Kang. |
| 13212 |
|
| 13213 |
- gh-91078: :meth:`TarFile.next` now returns ``None`` when called on an |
| 13214 |
empty tarfile. |
| 13215 |
|
| 13216 |
- bpo-47220: Document the optional *callback* parameter of |
| 13217 |
:class:`WeakMethod`. Patch by Géry Ogam. |
| 13218 |
|
| 13219 |
- bpo-44817: Ignore WinError 53 (ERROR_BAD_NETPATH), 65 |
| 13220 |
(ERROR_NETWORK_ACCESS_DENIED) and 161 (ERROR_BAD_PATHNAME) when using |
| 13221 |
ntpath.realpath(). |
| 13222 |
|
| 13223 |
- bpo-41260: Rename the *fmt* parameter of the pure Python implementation of |
| 13224 |
:meth:`datetime.date.strftime` to *format*. |
| 13225 |
|
| 13226 |
- bpo-15999: All built-in functions now accept arguments of any type instead |
| 13227 |
of just ``bool`` and ``int`` for boolean parameters. |
| 13228 |
|
| 13229 |
Documentation |
| 13230 |
------------- |
| 13231 |
|
| 13232 |
- gh-99931: Use `sphinxext-opengraph |
| 13233 |
<https://sphinxext-opengraph.readthedocs.io/>`__ to generate `OpenGraph |
| 13234 |
metadata <https://ogp.me/>`__. |
| 13235 |
|
| 13236 |
- gh-89682: Reworded docstring of the default ``__contains__`` to clarify |
| 13237 |
that it returns a :class:`bool`. |
| 13238 |
|
| 13239 |
- gh-88330: Improved the description of what a resource is in |
| 13240 |
importlib.resources docs. |
| 13241 |
|
| 13242 |
- gh-92892: Document that calling variadic functions with ctypes requires |
| 13243 |
special care on macOS/arm64 (and possibly other platforms). |
| 13244 |
|
| 13245 |
- bpo-41825: Restructured the documentation for the :func:`os.wait* |
| 13246 |
<os.wait>` family of functions, and improved the docs for |
| 13247 |
:func:`os.waitid` with more explanation of the possible argument |
| 13248 |
constants. |
| 13249 |
|
| 13250 |
Tests |
| 13251 |
----- |
| 13252 |
|
| 13253 |
- gh-99892: Skip test_normalization() of test_unicodedata if it fails to |
| 13254 |
download NormalizationTest.txt file from pythontest.net. Patch by Victor |
| 13255 |
Stinner. |
| 13256 |
|
| 13257 |
- gh-99934: Correct test_marsh on (32 bit) x86: test_deterministic sets was |
| 13258 |
failing. |
| 13259 |
|
| 13260 |
- gh-99741: We've implemented multi-phase init (PEP 489/630/687) for the |
| 13261 |
internal (for testing) _xxsubinterpreters module. |
| 13262 |
|
| 13263 |
- gh-99659: Optional big memory tests in ``test_sqlite3`` now catch the |
| 13264 |
correct :exc:`sqlite.DataError` exception type in case of too large |
| 13265 |
strings and/or blobs passed. |
| 13266 |
|
| 13267 |
- gh-99593: Cover the Unicode C API with tests. |
| 13268 |
|
| 13269 |
- gh-96002: Add functional test for Argument Clinic. |
| 13270 |
|
| 13271 |
Build |
| 13272 |
----- |
| 13273 |
|
| 13274 |
- gh-99086: Fix ``-Wimplicit-int``, ``-Wstrict-prototypes``, and |
| 13275 |
``-Wimplicit-function-declaration`` compiler warnings in |
| 13276 |
:program:`configure` checks. |
| 13277 |
|
| 13278 |
- gh-99337: Fix a compilation issue with GCC 12 on macOS. |
| 13279 |
|
| 13280 |
- gh-99289: Add a ``COMPILEALL_OPTS`` variable in Makefile to override |
| 13281 |
:mod:`compileall` options (default: ``-j0``) in ``make install``. Also |
| 13282 |
merged the ``compileall`` commands into a single command building .pyc |
| 13283 |
files for the all optimization levels (0, 1, 2) at once. Patch by Victor |
| 13284 |
Stinner. |
| 13285 |
|
| 13286 |
- gh-98872: Fix a possible fd leak in ``Programs/_freeze_module.c`` |
| 13287 |
introduced in Python 3.11. |
| 13288 |
|
| 13289 |
- gh-88226: Always define ``TARGET_*`` labels in ``Python/ceval.c``, even if |
| 13290 |
``USE_COMPUTED_GOTOS`` is disabled. This allows breakpoints to be set at |
| 13291 |
those labels in (for instance) ``gdb``. |
| 13292 |
|
| 13293 |
Windows |
| 13294 |
------- |
| 13295 |
|
| 13296 |
- gh-99345: Use faster initialization functions to detect install location |
| 13297 |
for Windows Store package |
| 13298 |
|
| 13299 |
- gh-98629: Fix initialization of :data:`sys.version` and ``sys._git`` on |
| 13300 |
Windows |
| 13301 |
|
| 13302 |
- gh-99442: Fix handling in :ref:`launcher` when ``argv[0]`` does not |
| 13303 |
include a file extension. |
| 13304 |
|
| 13305 |
- bpo-40882: Fix a memory leak in |
| 13306 |
:class:`multiprocessing.shared_memory.SharedMemory` on Windows. |
| 13307 |
|
| 13308 |
macOS |
| 13309 |
----- |
| 13310 |
|
| 13311 |
- gh-87235: On macOS ``python3 /dev/fd/9 9</path/to/script.py`` failed for |
| 13312 |
any script longer than a couple of bytes. |
| 13313 |
|
| 13314 |
- gh-98940: Fix ``Mac/Extras.install.py`` file filter bug. |
| 13315 |
|
| 13316 |
Tools/Demos |
| 13317 |
----------- |
| 13318 |
|
| 13319 |
- gh-64490: Argument Clinic varargs bugfixes |
| 13320 |
|
| 13321 |
* Fix out-of-bounds error in :c:func:`!_PyArg_UnpackKeywordsWithVararg`. |
| 13322 |
* Fix incorrect check which allowed more than one varargs in clinic.py. |
| 13323 |
* Fix miscalculation of ``noptargs`` in generated code. |
| 13324 |
* Do not generate ``noptargs`` when there is a vararg argument and no optional argument. |
| 13325 |
|
| 13326 |
C API |
| 13327 |
----- |
| 13328 |
|
| 13329 |
- gh-98680: ``PyBUF_*`` constants were marked as part of Limited API of |
| 13330 |
Python 3.11+. These were available in 3.11.0 with |
| 13331 |
:c:macro:`Py_LIMITED_API` defined for 3.11, and are necessary to use the |
| 13332 |
buffer API. |
| 13333 |
|
| 13334 |
- gh-99612: Fix :c:func:`PyUnicode_DecodeUTF8Stateful` for ASCII-only data: |
| 13335 |
``*consumed`` was not set. |
| 13336 |
|
| 13337 |
- gh-47146: The ``structmember.h`` header is deprecated. Its non-deprecated |
| 13338 |
contents are now available just by including ``Python.h``, with a ``Py_`` |
| 13339 |
prefix added if it was missing. (Deprecated contents are |
| 13340 |
:c:macro:`T_OBJECT`, :c:macro:`T_NONE`, and no-op flags.) Patch by Petr |
| 13341 |
Viktorin, based on earlier work by Alexander Belopolsky and Matthias |
| 13342 |
Braun. |
| 13343 |
|
| 13344 |
|
| 13345 |
What's New in Python 3.12.0 alpha 2? |
| 13346 |
==================================== |
| 13347 |
|
| 13348 |
*Release date: 2022-11-14* |
| 13349 |
|
| 13350 |
Security |
| 13351 |
-------- |
| 13352 |
|
| 13353 |
- gh-98433: The IDNA codec decoder used on DNS hostnames by :mod:`socket` or |
| 13354 |
:mod:`asyncio` related name resolution functions no longer involves a |
| 13355 |
quadratic algorithm. This prevents a potential CPU denial of service if an |
| 13356 |
out-of-spec excessive length hostname involving bidirectional characters |
| 13357 |
were decoded. Some protocols such as :mod:`urllib` http :samp:`3{xx}` |
| 13358 |
redirects potentially allow for an attacker to supply such a name. |
| 13359 |
|
| 13360 |
Individual labels within an IDNA encoded DNS name will now raise an error |
| 13361 |
early during IDNA decoding if they are longer than 1024 unicode characters |
| 13362 |
given that each decoded DNS label must be 63 or fewer characters and the |
| 13363 |
entire decoded DNS name is limited to 255. Only an application presenting |
| 13364 |
a hostname or label consisting primarily of :rfc:`3454` section 3.1 |
| 13365 |
"Nothing" characters to be removed would run into of this new limit. See |
| 13366 |
also :rfc:`5894` section 6 and :rfc:`3491`. |
| 13367 |
|
| 13368 |
- gh-98739: Update bundled libexpat to 2.5.0 |
| 13369 |
|
| 13370 |
Core and Builtins |
| 13371 |
----------------- |
| 13372 |
|
| 13373 |
- gh-81057: The docs clearly say that :c:data:`PyImport_Inittab`, |
| 13374 |
:c:func:`PyImport_AppendInittab`, and :c:func:`PyImport_ExtendInittab` |
| 13375 |
should not be used after :c:func:`Py_Initialize` has been called. We now |
| 13376 |
enforce this for the two functions. Additionally, the runtime now uses an |
| 13377 |
internal copy of :c:data:`PyImport_Inittab`, to guard against |
| 13378 |
modification. |
| 13379 |
|
| 13380 |
- gh-99298: Fix an issue that could potentially cause incorrect error |
| 13381 |
handling for some bytecode instructions. |
| 13382 |
|
| 13383 |
- gh-99254: The compiler now removes all unused constants from code objects |
| 13384 |
(except the first one, which may be a docstring). |
| 13385 |
|
| 13386 |
- gh-99205: Fix an issue that prevented :c:type:`PyThreadState` and |
| 13387 |
:c:type:`PyInterpreterState` memory from being freed properly. |
| 13388 |
|
| 13389 |
- gh-81057: The 18 global C variables holding the state of the allocators |
| 13390 |
have been moved to ``_PyRuntimeState``. This is a strictly internal |
| 13391 |
change with no change in behavior. |
| 13392 |
|
| 13393 |
- gh-99181: Fix failure in :keyword:`except* <except_star>` with unhashable |
| 13394 |
exceptions. |
| 13395 |
|
| 13396 |
- gh-99204: Fix calculation of :data:`sys._base_executable` when inside a |
| 13397 |
POSIX virtual environment using copies of the python binary when the base |
| 13398 |
installation does not provide the executable name used by the venv. |
| 13399 |
Calculation will fall back to alternative names ("python<MAJOR>", |
| 13400 |
"python<MAJOR>.<MINOR>"). |
| 13401 |
|
| 13402 |
- gh-96055: Update :mod:`faulthandler` to emit an error message with the |
| 13403 |
proper unexpected signal number. Patch by Donghee Na. |
| 13404 |
|
| 13405 |
- gh-99153: Fix location of :exc:`SyntaxError` for a :keyword:`try` block |
| 13406 |
with both :keyword:`except` and :keyword:`except* <except_star>`. |
| 13407 |
|
| 13408 |
- gh-98686: Merge the adaptive opcode logic into each instruction's |
| 13409 |
unquickened variant, and merge the logic in ``EXTENDED_ARG_QUICK`` into |
| 13410 |
:opcode:`EXTENDED_ARG`. With these changes, the quickening that happens at |
| 13411 |
code object creation is now only responsible for initializing warmup |
| 13412 |
counters and inserting superinstructions. |
| 13413 |
|
| 13414 |
- gh-99103: Fix the error reporting positions of specialized traceback |
| 13415 |
anchors when the source line contains Unicode characters. |
| 13416 |
|
| 13417 |
- gh-99139: Improve the error suggestion for :exc:`NameError` exceptions for |
| 13418 |
instances. Now if a :exc:`NameError` is raised in a method and the |
| 13419 |
instance has an attribute that's exactly equal to the name in the |
| 13420 |
exception, the suggestion will include ``self.<NAME>`` instead of the |
| 13421 |
closest match in the method scope. Patch by Pablo Galindo |
| 13422 |
|
| 13423 |
- gh-98401: Octal escapes with value larger than ``0o377`` (ex: ``"\477"``), |
| 13424 |
deprecated in Python 3.11, now produce a :exc:`SyntaxWarning`, instead of |
| 13425 |
:exc:`DeprecationWarning`. In a future Python version they will be |
| 13426 |
eventually a :exc:`SyntaxError`. Patch by Victor Stinner. |
| 13427 |
|
| 13428 |
- gh-98401: A backslash-character pair that is not a valid escape sequence |
| 13429 |
now generates a :exc:`SyntaxWarning`, instead of |
| 13430 |
:exc:`DeprecationWarning`. For example, ``re.compile("\d+\.\d+")`` now |
| 13431 |
emits a :exc:`SyntaxWarning` (``"\d"`` is an invalid escape sequence), use |
| 13432 |
raw strings for regular expression: ``re.compile(r"\d+\.\d+")``. In a |
| 13433 |
future Python version, :exc:`SyntaxError` will eventually be raised, |
| 13434 |
instead of :exc:`SyntaxWarning`. Patch by Victor Stinner. |
| 13435 |
|
| 13436 |
- gh-96793: Handle StopIteration and StopAsyncIteration raised in generator |
| 13437 |
or coroutines in the bytecode, rather than in wrapping C code. |
| 13438 |
|
| 13439 |
- gh-98931: Improve the :exc:`SyntaxError` error message when the user types |
| 13440 |
``import x from y`` instead of ``from y import x``. Patch by Pablo Galindo |
| 13441 |
|
| 13442 |
- gh-98852: Fix subscription of type aliases containing bare generic types |
| 13443 |
or types like :class:`~typing.TypeVar`: for example ``tuple[A, T][int]`` |
| 13444 |
and ``tuple[TypeVar, T][int]``, where ``A`` is a generic type, and ``T`` |
| 13445 |
is a type variable. |
| 13446 |
|
| 13447 |
- gh-98925: Lower the recursion depth for marshal on WASI to support |
| 13448 |
(in-development) wasmtime 2.0. |
| 13449 |
|
| 13450 |
- gh-98783: Fix multiple crashes in debug mode when ``str`` subclasses are |
| 13451 |
used instead of ``str`` itself. |
| 13452 |
|
| 13453 |
- gh-98811: Use complete source locations to simplify detection of |
| 13454 |
``__future__`` imports which are not at the beginning of the file. Also |
| 13455 |
corrects the offset in the exception raised in one case, which was off by |
| 13456 |
one and impeded highlighting. |
| 13457 |
|
| 13458 |
- gh-96793: Add specialization of :opcode:`FOR_ITER` for generators. Saves |
| 13459 |
multiple layers of dispatch and checking to get from the |
| 13460 |
:opcode:`FOR_ITER` instruction in the caller to the :opcode:`RESUME` in |
| 13461 |
the generator. |
| 13462 |
|
| 13463 |
- gh-98762: Fix source locations of :keyword:`match` sub-patterns. |
| 13464 |
|
| 13465 |
- gh-98586: Added the methods :c:func:`PyObject_Vectorcall` and |
| 13466 |
:c:func:`PyObject_VectorcallMethod` to the :ref:`Limited API <stable>` |
| 13467 |
along with the auxiliary macro constant |
| 13468 |
:c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. |
| 13469 |
|
| 13470 |
The availability of these functions enables more efficient :PEP:`590` |
| 13471 |
vector calls from binary extension modules that avoid argument |
| 13472 |
boxing/unboxing overheads. |
| 13473 |
|
| 13474 |
- gh-99257: Fix an issue where member descriptors (such as those for |
| 13475 |
:attr:`~object.__slots__`) could behave incorrectly or crash instead of |
| 13476 |
raising a :exc:`TypeError` when accessed via an instance of an invalid |
| 13477 |
type. |
| 13478 |
|
| 13479 |
- gh-93143: Rather than changing :attr:`~types.CodeType.co_code`, the |
| 13480 |
interpreter will now display a :exc:`RuntimeWarning` and assign |
| 13481 |
:const:`None` to any fast locals that are left unbound after jumps or |
| 13482 |
:keyword:`del` statements executed while tracing. |
| 13483 |
|
| 13484 |
- gh-96421: When calling into Python code from C code, through |
| 13485 |
:c:func:`PyEval_EvalFrameEx` or a related C-API function, a shim frame in |
| 13486 |
inserted into the call stack. This occurs in the |
| 13487 |
``_PyEval_EvalFrameDefault()`` function. The extra frame should be |
| 13488 |
invisible to all Python and most C extensions, but out-of-process |
| 13489 |
profilers and debuggers need to be aware of it. These shim frames can be |
| 13490 |
detected by checking ``frame->owner == FRAME_OWNED_BY_CSTACK``. |
| 13491 |
|
| 13492 |
Extensions implementing their own interpreters using PEP 523 need to be |
| 13493 |
aware of this shim frame and the changes to the semantics of |
| 13494 |
:opcode:`RETURN_VALUE`, :opcode:`YIELD_VALUE`, and |
| 13495 |
:opcode:`RETURN_GENERATOR`, which now clear the frame. |
| 13496 |
|
| 13497 |
Build |
| 13498 |
----- |
| 13499 |
|
| 13500 |
- gh-98415: Fix detection of MAC addresses for :mod:`uuid` on certain OSs. |
| 13501 |
Patch by Chaim Sanders |
| 13502 |
|
| 13503 |
Core and Builtins |
| 13504 |
----------------- |
| 13505 |
|
| 13506 |
- gh-98686: Quicken all code objects, and specialize adaptive bytecode |
| 13507 |
instructions more aggressively. |
| 13508 |
|
| 13509 |
- gh-92119: Print exception class name instead of its string representation |
| 13510 |
when raising errors from :mod:`ctypes` calls. |
| 13511 |
|
| 13512 |
- gh-91058: :exc:`ImportError` raised from failed ``from <module> import |
| 13513 |
<name>`` now include suggestions for the value of ``<name>`` based on the |
| 13514 |
available names in ``<module>``. Patch by Pablo Galindo |
| 13515 |
|
| 13516 |
- gh-96793: The :opcode:`FOR_ITER` now leaves the iterator on the stack on |
| 13517 |
termination of the loop. This is to assist specialization of loops for |
| 13518 |
generators. |
| 13519 |
|
| 13520 |
- gh-90716: Add _pylong.py module. It includes asymptotically faster |
| 13521 |
algorithms that can be used for operations on integers with many digits. |
| 13522 |
It is used by longobject.c to speed up some operations. |
| 13523 |
|
| 13524 |
- gh-95389: Expose :const:`~socket.ETH_P_ALL` and some of the |
| 13525 |
:ref:`ETHERTYPE_* constants <socket-ethernet-types>` in :mod:`socket`. |
| 13526 |
Patch by Noam Cohen. |
| 13527 |
|
| 13528 |
Library |
| 13529 |
------- |
| 13530 |
|
| 13531 |
- gh-93696: Allow :mod:`pdb` to locate source for frozen modules in the |
| 13532 |
standard library. |
| 13533 |
|
| 13534 |
- gh-99418: Fix bug in :func:`urllib.parse.urlparse` that causes URL schemes |
| 13535 |
that begin with a digit, a plus sign, or a minus sign to be parsed |
| 13536 |
incorrectly. |
| 13537 |
|
| 13538 |
- gh-94597: Deprecate :class:`asyncio.AbstractChildWatcher` to be removed in |
| 13539 |
Python 3.14. Patch by Kumar Aditya. |
| 13540 |
|
| 13541 |
- gh-99305: Improve performance of :func:`secrets.token_hex`. |
| 13542 |
|
| 13543 |
- gh-74044: Fixed bug where :func:`inspect.signature` reported incorrect |
| 13544 |
arguments for decorated methods. |
| 13545 |
|
| 13546 |
- gh-99275: Fix ``SystemError`` in :mod:`ctypes` when exception was not set |
| 13547 |
during ``__initsubclass__``. |
| 13548 |
|
| 13549 |
- gh-99277: Remove older version of |
| 13550 |
``_SSLProtocolTransport.get_write_buffer_limits`` in |
| 13551 |
:mod:`!asyncio.sslproto` |
| 13552 |
|
| 13553 |
- gh-99248: fix negative numbers failing in verify() |
| 13554 |
|
| 13555 |
- gh-99155: Fix :class:`statistics.NormalDist` pickle with ``0`` and ``1`` |
| 13556 |
protocols. |
| 13557 |
|
| 13558 |
- gh-93464: ``enum.auto()`` is now correctly activated when combined with |
| 13559 |
other assignment values. E.g. ``ONE = auto(), 'some text'`` will now |
| 13560 |
evaluate as ``(1, 'some text')``. |
| 13561 |
|
| 13562 |
- gh-99134: Update the bundled copy of pip to version 22.3.1. |
| 13563 |
|
| 13564 |
- gh-92584: Remove the ``distutils`` package. It was deprecated in Python |
| 13565 |
3.10 by :pep:`632` "Deprecate distutils module". For projects still using |
| 13566 |
``distutils`` and cannot be updated to something else, the ``setuptools`` |
| 13567 |
project can be installed: it still provides ``distutils``. Patch by Victor |
| 13568 |
Stinner. |
| 13569 |
|
| 13570 |
- gh-98999: Now :mod:`!_pyio` is consistent with :mod:`!_io` in raising |
| 13571 |
``ValueError`` when executing methods over closed buffers. |
| 13572 |
|
| 13573 |
- gh-83004: Clean up refleak on failed module initialisation in |
| 13574 |
:mod:`!_zoneinfo` |
| 13575 |
|
| 13576 |
- gh-83004: Clean up refleaks on failed module initialisation in |
| 13577 |
:mod:`!_pickle` |
| 13578 |
|
| 13579 |
- gh-83004: Clean up refleak on failed module initialisation in :mod:`!_io`. |
| 13580 |
|
| 13581 |
- gh-98897: Fix memory leak in :func:`math.dist` when both points don't have |
| 13582 |
the same dimension. Patch by Kumar Aditya. |
| 13583 |
|
| 13584 |
- gh-98878: Use the frame bound builtins when offering a name suggestion in |
| 13585 |
:mod:`traceback` to prevent crashing when ``__builtins__`` is not a dict. |
| 13586 |
|
| 13587 |
- gh-98139: In :mod:`importlib._bootstrap`, enhance namespace package repr |
| 13588 |
to ``<module 'x' (namespace) from ['path']>``. |
| 13589 |
|
| 13590 |
- gh-90352: Fix ``_SelectorDatagramTransport`` to inherit from |
| 13591 |
:class:`~asyncio.DatagramTransport` in :mod:`asyncio`. Patch by Kumar |
| 13592 |
Aditya. |
| 13593 |
|
| 13594 |
- gh-98793: Fix argument typechecks in :func:`!_overlapped.WSAConnect` and |
| 13595 |
:func:`!_overlapped.Overlapped.WSASendTo` functions. |
| 13596 |
|
| 13597 |
- gh-98744: Prevent crashing in :mod:`traceback` when retrieving the |
| 13598 |
byte-offset for some source files that contain certain unicode characters. |
| 13599 |
|
| 13600 |
- gh-98740: Fix internal error in the :mod:`re` module which in very rare |
| 13601 |
circumstances prevented compilation of a regular expression containing a |
| 13602 |
:ref:`conditional expression <re-conditional-expression>` without the |
| 13603 |
"else" branch. |
| 13604 |
|
| 13605 |
- gh-98703: Fix :meth:`asyncio.StreamWriter.drain` to call |
| 13606 |
``protocol.connection_lost`` callback only once on Windows. |
| 13607 |
|
| 13608 |
- gh-98624: Add a mutex to unittest.mock.NonCallableMock to protect |
| 13609 |
concurrent access to mock attributes. |
| 13610 |
|
| 13611 |
- gh-98658: The :class:`array.array` class now supports subscripting, making |
| 13612 |
it a :term:`generic type`. |
| 13613 |
|
| 13614 |
- gh-98284: Improved :class:`TypeError` message for undefined abstract |
| 13615 |
methods of a :class:`abc.ABC` instance. The names of the missing methods |
| 13616 |
are surrounded by single-quotes to highlight them. |
| 13617 |
|
| 13618 |
- gh-96151: Allow ``BUILTINS`` to be a valid field name for frozen |
| 13619 |
dataclasses. |
| 13620 |
|
| 13621 |
- gh-98086: Make sure ``patch.dict()`` can be applied on async functions. |
| 13622 |
|
| 13623 |
- gh-72719: Remove modules :mod:`!asyncore` and :mod:`!asynchat`, which were |
| 13624 |
deprecated by :pep:`594`. |
| 13625 |
|
| 13626 |
- gh-96192: Fix handling of ``bytes`` :term:`path-like objects <path-like |
| 13627 |
object>` in :func:`os.ismount`. |
| 13628 |
|
| 13629 |
- gh-94172: :mod:`ftplib`: Remove the ``FTP_TLS.ssl_version`` class |
| 13630 |
attribute: use the *context* parameter instead. Patch by Victor Stinner |
| 13631 |
|
| 13632 |
- gh-94172: Remove the *keyfile* and *certfile* parameters from the |
| 13633 |
:mod:`ftplib`, :mod:`imaplib`, :mod:`poplib` and :mod:`smtplib` modules, |
| 13634 |
and the *key_file*, *cert_file* and *check_hostname* parameters from the |
| 13635 |
:mod:`http.client` module, all deprecated since Python 3.6. Use the |
| 13636 |
*context* parameter (*ssl_context* in :mod:`imaplib`) instead. Patch by |
| 13637 |
Victor Stinner. |
| 13638 |
|
| 13639 |
- gh-83638: Add the :attr:`~sqlite3.Connection.autocommit` attribute to |
| 13640 |
:class:`sqlite3.Connection` and the *autocommit* parameter to |
| 13641 |
:func:`sqlite3.connect` to control :pep:`249`-compliant :ref:`transaction |
| 13642 |
handling <sqlite3-transaction-control-autocommit>`. Patch by Erlend E. |
| 13643 |
Aasland. |
| 13644 |
|
| 13645 |
- gh-92452: Fixed a race condition that could cause |
| 13646 |
:func:`sysconfig.get_config_var` to incorrectly return :const:`None` in |
| 13647 |
multi-threaded programs. |
| 13648 |
|
| 13649 |
- gh-91803: Fix an error when using a method of objects mocked with |
| 13650 |
:func:`unittest.mock.create_autospec` after it was sealed with |
| 13651 |
:func:`unittest.mock.seal` function. |
| 13652 |
|
| 13653 |
- bpo-38523: :func:`shutil.copytree` now applies the |
| 13654 |
*ignore_dangling_symlinks* argument recursively. |
| 13655 |
|
| 13656 |
- bpo-40358: Add walk_up argument in :meth:`pathlib.PurePath.relative_to`. |
| 13657 |
|
| 13658 |
- bpo-36267: Fix IndexError in :class:`argparse.ArgumentParser` when a |
| 13659 |
``store_true`` action is given an explicit argument. |
| 13660 |
|
| 13661 |
Documentation |
| 13662 |
------------- |
| 13663 |
|
| 13664 |
- gh-98832: Changes wording of docstring for :func:`pathlib.Path.iterdir`. |
| 13665 |
|
| 13666 |
- gh-97966: Update uname docs to clarify the special nature of the platform |
| 13667 |
attribute and to indicate when it became late-bound. |
| 13668 |
|
| 13669 |
Tests |
| 13670 |
----- |
| 13671 |
|
| 13672 |
- gh-98903: The Python test suite now fails with exit code 4 if no tests |
| 13673 |
ran. It should help detecting typos in test names and test methods. |
| 13674 |
|
| 13675 |
- gh-98713: Fix a bug in the :mod:`typing` tests where a test relying on |
| 13676 |
CPython-specific implementation details was not decorated with |
| 13677 |
``@cpython_only`` and was not skipped on other implementations. |
| 13678 |
|
| 13679 |
- gh-87390: Add tests for star-unpacking with PEP 646, and some other |
| 13680 |
miscellaneous PEP 646 tests. |
| 13681 |
|
| 13682 |
- gh-96853: Added explicit coverage of ``Py_Initialize`` (and hence |
| 13683 |
``Py_InitializeEx``) back to the embedding tests (all other embedding |
| 13684 |
tests migrated to ``Py_InitializeFromConfig`` in Python 3.11) |
| 13685 |
|
| 13686 |
- bpo-34272: Some C API tests were moved into the new Lib/test/test_capi/ |
| 13687 |
directory. |
| 13688 |
|
| 13689 |
Build |
| 13690 |
----- |
| 13691 |
|
| 13692 |
- gh-99086: Fix ``-Wimplicit-int`` compiler warning in :program:`configure` |
| 13693 |
check for ``PTHREAD_SCOPE_SYSTEM``. |
| 13694 |
|
| 13695 |
- gh-99016: Fix build with ``PYTHON_FOR_REGEN=python3.8``. |
| 13696 |
|
| 13697 |
- gh-97731: Specify the full path to the source location for ``make |
| 13698 |
docclean`` (needed for cross-builds). |
| 13699 |
|
| 13700 |
- gh-98949: Drop unused build dependency on ``readelf``. |
| 13701 |
|
| 13702 |
- gh-98989: Use ``python3.11``, if available, for regeneration and freezing. |
| 13703 |
|
| 13704 |
- gh-98831: Add new tooling, in ``Tools/cases_generator``, to generate the |
| 13705 |
interpreter switch statement from a list of opcode definitions. This only |
| 13706 |
affects adding, modifying or removing instruction definitions. The |
| 13707 |
instruction definitions now live in ``Python/bytecodes.c``, in the form of |
| 13708 |
a `custom DSL (under development) |
| 13709 |
<https://github.com/faster-cpython/ideas/blob/main/3.12/interpreter_definition.md>`__. |
| 13710 |
The tooling reads this file and writes ``Python/generated_cases.c.h``, |
| 13711 |
which is then included by ``Python/ceval.c`` to provide most of the cases |
| 13712 |
of the main interpreter switch. |
| 13713 |
|
| 13714 |
- gh-98817: Remove PCbuild/lib.pyproj: it's not used for anything, is only a |
| 13715 |
minor convenience for Visual Studio users (who probably mostly don't even |
| 13716 |
know about it), and it takes a lot of maintenance effort to keep updated. |
| 13717 |
|
| 13718 |
- gh-98776: Fix ``make regen-test-levenshtein`` for out-of-tree builds. |
| 13719 |
|
| 13720 |
- gh-98707: Don't use vendored ``libmpdec`` headers if |
| 13721 |
:option:`--with-system-libmpdec` is passed to :program:`configure`. Don't |
| 13722 |
use vendored ``libexpat`` headers if :option:`--with-system-expat` is |
| 13723 |
passed to :program:`configure`. |
| 13724 |
|
| 13725 |
Windows |
| 13726 |
------- |
| 13727 |
|
| 13728 |
- gh-98689: Update Windows builds to zlib v1.2.13. v1.2.12 has |
| 13729 |
:cve:`2022-37434`, but the vulnerable ``inflateGetHeader`` API is not used |
| 13730 |
by Python. |
| 13731 |
|
| 13732 |
- gh-98790: Assumes that a missing ``DLLs`` directory means that standard |
| 13733 |
extension modules are in the executable's directory. |
| 13734 |
|
| 13735 |
- gh-98745: Update :file:`py.exe` launcher to install 3.11 by default and |
| 13736 |
3.12 on request. |
| 13737 |
|
| 13738 |
- gh-98692: Fix the :ref:`launcher` ignoring unrecognized shebang lines |
| 13739 |
instead of treating them as local paths |
| 13740 |
|
| 13741 |
- gh-94328: Update Windows installer to use SQLite 3.39.4. |
| 13742 |
|
| 13743 |
macOS |
| 13744 |
----- |
| 13745 |
|
| 13746 |
- gh-94328: Update macOS installer to SQLite 3.39.4. |
| 13747 |
|
| 13748 |
C API |
| 13749 |
----- |
| 13750 |
|
| 13751 |
- gh-98724: The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and |
| 13752 |
:c:macro:`Py_XSETREF` macros now only evaluate their argument once. If the |
| 13753 |
argument has side effects, these side effects are no longer duplicated. |
| 13754 |
Patch by Victor Stinner. |
| 13755 |
|
| 13756 |
- gh-98978: Fix use-after-free in ``Py_SetPythonHome(NULL)``, |
| 13757 |
``Py_SetProgramName(NULL)`` and ``_Py_SetProgramFullPath(NULL)`` function |
| 13758 |
calls. Issue reported by Benedikt Reinartz. Patch by Victor Stinner. |
| 13759 |
|
| 13760 |
- gh-98410: Add ``getbufferproc`` and ``releasebufferproc`` to the stable |
| 13761 |
API. |
| 13762 |
|
| 13763 |
- gh-98610: Some configurable capabilities of sub-interpreters have changed. |
| 13764 |
They always allow subprocesses (:mod:`subprocess`) now, whereas before |
| 13765 |
subprocesses could be optionally disallowed for a sub-interpreter. Instead |
| 13766 |
:func:`os.exec` can now be disallowed. Disallowing daemon threads is now |
| 13767 |
supported. Disallowing all threads is still allowed, but is never done by |
| 13768 |
default. Note that the optional restrictions are only available through |
| 13769 |
``_Py_NewInterpreterFromConfig()``, which isn't a public API. They do not |
| 13770 |
affect the main interpreter, nor :c:func:`Py_NewInterpreter`. |
| 13771 |
|
| 13772 |
- gh-98608: A ``_PyInterpreterConfig`` has been added and |
| 13773 |
``_Py_NewInterpreter()`` has been renamed to |
| 13774 |
``_Py_NewInterpreterFromConfig()``. The "isolated_subinterpreters" |
| 13775 |
argument is now a granular config that captures the previous behavior. |
| 13776 |
Note that this is all "private" API. |
| 13777 |
|
| 13778 |
- gh-96853: ``Py_InitializeEx`` now correctly calls ``PyConfig_Clear`` after |
| 13779 |
initializing the interpreter (the omission didn't cause a memory leak only |
| 13780 |
because none of the dynamically allocated config fields are populated by |
| 13781 |
the wrapper function) |
| 13782 |
|
| 13783 |
- gh-91248: Add :c:func:`PyFrame_GetVar` and :c:func:`PyFrame_GetVarString` |
| 13784 |
functions to get a frame variable by its name. Patch by Victor Stinner. |
| 13785 |
|
| 13786 |
|
| 13787 |
What's New in Python 3.12.0 alpha 1? |
| 13788 |
==================================== |
| 13789 |
|
| 13790 |
*Release date: 2022-10-25* |
| 13791 |
|
| 13792 |
Security |
| 13793 |
-------- |
| 13794 |
|
| 13795 |
- gh-97616: Fix multiplying a list by an integer (``list *= int``): detect |
| 13796 |
the integer overflow when the new allocated length is close to the maximum |
| 13797 |
size. Issue reported by Jordan Limor. Patch by Victor Stinner. |
| 13798 |
|
| 13799 |
- gh-97514: On Linux the :mod:`multiprocessing` module returns to using |
| 13800 |
filesystem backed unix domain sockets for communication with the |
| 13801 |
*forkserver* process instead of the Linux abstract socket namespace. Only |
| 13802 |
code that chooses to use the :ref:`"forkserver" start method |
| 13803 |
<multiprocessing-start-methods>` is affected. |
| 13804 |
|
| 13805 |
Abstract sockets have no permissions and could allow any user on the |
| 13806 |
system in the same `network namespace |
| 13807 |
<https://man7.org/linux/man-pages/man7/network_namespaces.7.html>`_ (often |
| 13808 |
the whole system) to inject code into the multiprocessing *forkserver* |
| 13809 |
process. This was a potential privilege escalation. Filesystem based |
| 13810 |
socket permissions restrict this to the *forkserver* process user as was |
| 13811 |
the default in Python 3.8 and earlier. |
| 13812 |
|
| 13813 |
This prevents Linux :cve:`2022-42919`. |
| 13814 |
|
| 13815 |
- gh-87389: :mod:`http.server`: Fix an open redirection vulnerability in the |
| 13816 |
HTTP server when an URI path starts with ``//``. Vulnerability |
| 13817 |
discovered, and initial fix proposed, by Hamza Avvan. |
| 13818 |
|
| 13819 |
- gh-79096: LWPCookieJar and MozillaCookieJar create files with file mode |
| 13820 |
600 instead of 644 (Microsoft Windows is not affected) |
| 13821 |
|
| 13822 |
- gh-92888: Fix ``memoryview`` use after free when accessing the backing |
| 13823 |
buffer in certain cases. |
| 13824 |
|
| 13825 |
- gh-68966: The deprecated mailcap module now refuses to inject unsafe text |
| 13826 |
(filenames, MIME types, parameters) into shell commands. Instead of using |
| 13827 |
such text, it will warn and act as if a match was not found (or for test |
| 13828 |
commands, as if the test failed). |
| 13829 |
|
| 13830 |
Core and Builtins |
| 13831 |
----------------- |
| 13832 |
|
| 13833 |
- gh-98374: Suppress ImportError for invalid query for help() command. Patch |
| 13834 |
by Donghee Na. |
| 13835 |
|
| 13836 |
- gh-98461: Fix source location in bytecode for list, set and dict |
| 13837 |
comprehensions as well as generator expressions. |
| 13838 |
|
| 13839 |
- gh-98354: Added unicode check for ``name`` attribute of ``spec`` argument |
| 13840 |
passed in :func:`!_imp.create_builtin` function. |
| 13841 |
|
| 13842 |
- gh-98398: Fix source location of 'assert' bytecodes. |
| 13843 |
|
| 13844 |
- gh-98390: Fix location of sub-expressions of boolean expressions, by |
| 13845 |
reducing their scope to that of the sub-expression. |
| 13846 |
|
| 13847 |
- gh-98254: Modules from the standard library are now potentially suggested |
| 13848 |
as part of the error messages displayed by the interpreter when an |
| 13849 |
:exc:`NameError` is raised to the top level. Patch by Pablo Galindo |
| 13850 |
|
| 13851 |
- gh-97997: Add running column offset to the tokenizer state to avoid |
| 13852 |
calculating AST column information with pointer arithmetic. |
| 13853 |
|
| 13854 |
- gh-97973: Modify the tokenizer to return all necessary information the |
| 13855 |
parser needs to set location information in the AST nodes, so that the |
| 13856 |
parser does not have to calculate those doing pointer arithmetic. |
| 13857 |
|
| 13858 |
Library |
| 13859 |
------- |
| 13860 |
|
| 13861 |
- gh-96078: :func:`os.sched_yield` now release the GIL while calling |
| 13862 |
sched_yield(2). Patch by Donghee Na. |
| 13863 |
|
| 13864 |
- gh-97955: Migrate :mod:`zoneinfo` to Argument Clinic. |
| 13865 |
|
| 13866 |
Core and Builtins |
| 13867 |
----------------- |
| 13868 |
|
| 13869 |
- gh-97912: The compiler now avoids quadratic behavior when finding which |
| 13870 |
instructions should use the :opcode:`LOAD_FAST_CHECK` opcode. |
| 13871 |
|
| 13872 |
- gh-97002: Fix an issue where several frame objects could be backed by the |
| 13873 |
same interpreter frame, possibly leading to corrupted memory and hard |
| 13874 |
crashes of the interpreter. |
| 13875 |
|
| 13876 |
- gh-97943: Bugfix: :c:func:`PyFunction_GetAnnotations` should return a |
| 13877 |
borrowed reference. It was returning a new reference. |
| 13878 |
|
| 13879 |
- gh-97922: The Garbage Collector now runs only on the eval breaker |
| 13880 |
mechanism of the Python bytecode evaluation loop instead on object |
| 13881 |
allocations. The GC can also run when :c:func:`PyErr_CheckSignals` is |
| 13882 |
called so C extensions that need to run for a long time without executing |
| 13883 |
any Python code also have a chance to execute the GC periodically. |
| 13884 |
|
| 13885 |
- gh-65961: When ``__package__`` is different than ``__spec__.parent``, |
| 13886 |
raise a ``DeprecationWarning`` instead of ``ImportWarning``. |
| 13887 |
|
| 13888 |
Also remove ``importlib.util.set_package()`` which was scheduled for |
| 13889 |
removal. |
| 13890 |
|
| 13891 |
- gh-97850: Long deprecated, ``module_repr()`` should now be completely |
| 13892 |
eradicated. |
| 13893 |
|
| 13894 |
- gh-86298: In cases where ``warnings.warn_explicit()`` consults the |
| 13895 |
module's loader, an ``DeprecationWarning`` is issued when ``m.__loader__`` |
| 13896 |
differs from ``m.__spec__.loader``. |
| 13897 |
|
| 13898 |
- gh-97779: Ensure that all Python frame objects are backed by "complete" |
| 13899 |
frames. |
| 13900 |
|
| 13901 |
- gh-91052: Add API for subscribing to modification events on selected |
| 13902 |
dictionaries. |
| 13903 |
|
| 13904 |
- gh-97752: Fix possible data corruption or crashes when accessing the |
| 13905 |
``f_back`` member of newly-created generator or coroutine frames. |
| 13906 |
|
| 13907 |
- gh-97591: Fixed a missing incref/decref pair in |
| 13908 |
``Exception.__setstate__()``. Patch by Ofey Chan. |
| 13909 |
|
| 13910 |
- gh-97670: Remove the :func:`sys.getdxp` function and the |
| 13911 |
``Tools/scripts/analyze_dxp.py`` script. DXP stands for "dynamic execution |
| 13912 |
pairs". They were related to ``DYNAMIC_EXECUTION_PROFILE`` and ``DXPAIRS`` |
| 13913 |
macros which have been removed in Python 3.11. Python can now be built |
| 13914 |
with :option:`./configure --enable-pystats <--enable-pystats>` to gather |
| 13915 |
statistics on Python opcodes. Patch by Victor Stinner. |
| 13916 |
|
| 13917 |
- gh-94526: Fix the Python path configuration used to initialized |
| 13918 |
:data:`sys.path` at Python startup. Paths are no longer encoded to |
| 13919 |
UTF-8/strict to avoid encoding errors if it contains surrogate characters |
| 13920 |
(bytes paths are decoded with the surrogateescape error handler). Patch by |
| 13921 |
Victor Stinner. |
| 13922 |
|
| 13923 |
- gh-96670: The parser now raises :exc:`SyntaxError` when parsing source |
| 13924 |
code containing null bytes. Patch by Pablo Galindo |
| 13925 |
|
| 13926 |
- gh-96975: Fix a crash occurring when :c:func:`PyEval_GetFrame` is called |
| 13927 |
while the topmost Python frame is in a partially-initialized state. |
| 13928 |
|
| 13929 |
- gh-96848: Fix command line parsing: reject :option:`-X int_max_str_digits |
| 13930 |
<-X>` option with no value (invalid) when the |
| 13931 |
:envvar:`PYTHONINTMAXSTRDIGITS` environment variable is set to a valid |
| 13932 |
limit. Patch by Victor Stinner. |
| 13933 |
|
| 13934 |
- gh-95921: Fix overly-broad source position information for chained |
| 13935 |
comparisons used as branching conditions. |
| 13936 |
|
| 13937 |
Library |
| 13938 |
------- |
| 13939 |
|
| 13940 |
- gh-96821: Fix undefined behaviour in ``audioop.c``. |
| 13941 |
|
| 13942 |
Core and Builtins |
| 13943 |
----------------- |
| 13944 |
|
| 13945 |
- gh-96821: Fix undefined behaviour in ``_testcapimodule.c``. |
| 13946 |
|
| 13947 |
- gh-95778: When :exc:`ValueError` is raised if an integer is larger than |
| 13948 |
the limit, mention the :func:`sys.set_int_max_str_digits` function in the |
| 13949 |
error message. Patch by Victor Stinner. |
| 13950 |
|
| 13951 |
- gh-96387: At Python exit, sometimes a thread holding the GIL can wait |
| 13952 |
forever for a thread (usually a daemon thread) which requested to drop the |
| 13953 |
GIL, whereas the thread already exited. To fix the race condition, the |
| 13954 |
thread which requested the GIL drop now resets its request before exiting. |
| 13955 |
Issue discovered and analyzed by Mingliang ZHAO. Patch by Victor Stinner. |
| 13956 |
|
| 13957 |
- gh-96864: Fix a possible assertion failure, fatal error, or |
| 13958 |
:exc:`SystemError` if a line tracing event raises an exception while |
| 13959 |
opcode tracing is enabled. |
| 13960 |
|
| 13961 |
- gh-95778: The ``PyLong_FromString`` function was refactored to make it |
| 13962 |
more maintainable and extensible. |
| 13963 |
|
| 13964 |
- gh-96678: Fix undefined behaviour in C code of null pointer arithmetic. |
| 13965 |
|
| 13966 |
- gh-96754: Make sure that all frame objects created are created from valid |
| 13967 |
interpreter frames. Prevents the possibility of invalid frames in |
| 13968 |
backtraces and signal handlers. |
| 13969 |
|
| 13970 |
- gh-90997: Improve the performance of reading and writing inline bytecode |
| 13971 |
caches on some platforms. |
| 13972 |
|
| 13973 |
- gh-96751: Remove dead code from ``CALL_FUNCTION_EX`` opcode. |
| 13974 |
|
| 13975 |
- gh-90751: :class:`memoryview` now supports half-floats. Patch by Donghee |
| 13976 |
Na and Antoine Pitrou. |
| 13977 |
|
| 13978 |
- gh-96678: Fix case of undefined behavior in ceval.c |
| 13979 |
|
| 13980 |
Library |
| 13981 |
------- |
| 13982 |
|
| 13983 |
- gh-64373: Convert :mod:`!_functools` to argument clinic. |
| 13984 |
|
| 13985 |
- gh-96641: Do not expose ``KeyWrapper`` in :mod:`!_functools`. |
| 13986 |
|
| 13987 |
Core and Builtins |
| 13988 |
----------------- |
| 13989 |
|
| 13990 |
- gh-96636: Ensure that tracing, ``sys.setrace()``, is turned on |
| 13991 |
immediately. In pre-release versions of 3.11, some tracing events might |
| 13992 |
have been lost when turning on tracing in a ``__del__`` method or |
| 13993 |
interrupt. |
| 13994 |
|
| 13995 |
- gh-96572: Fix use after free in trace refs build mode. Patch by Kumar |
| 13996 |
Aditya. |
| 13997 |
|
| 13998 |
- gh-96611: When loading a file with invalid UTF-8 inside a multi-line |
| 13999 |
string, a correct SyntaxError is emitted. |
| 14000 |
|
| 14001 |
- gh-96612: Make sure that incomplete frames do not show up in tracemalloc |
| 14002 |
traces. |
| 14003 |
|
| 14004 |
- gh-90230: Fix compiler warnings and test failures when building with |
| 14005 |
``--enable-pystats``. |
| 14006 |
|
| 14007 |
- gh-96587: Correctly raise ``SyntaxError`` on exception groups (:pep:`654`) |
| 14008 |
on python versions prior to 3.11 |
| 14009 |
|
| 14010 |
- gh-96569: Remove two cases of undefined behavior, by adding NULL checks. |
| 14011 |
|
| 14012 |
- gh-96582: Fix possible ``NULL`` pointer dereference in |
| 14013 |
``_PyThread_CurrentFrames``. Patch by Kumar Aditya. |
| 14014 |
|
| 14015 |
- gh-91079: Separate Python recursion checking from C recursion checking |
| 14016 |
which reduces the chance of C stack overflow and allows the recursion |
| 14017 |
limit to be increased safely. |
| 14018 |
|
| 14019 |
- gh-93911: Fix an issue that could prevent :opcode:`LOAD_ATTR` from |
| 14020 |
specializing properly when accessing properties. |
| 14021 |
|
| 14022 |
- gh-96348: Emit a DeprecationWarning when :meth:`~generator.throw`, |
| 14023 |
:meth:`~coroutine.throw` or :meth:`~agen.athrow` are called with more than |
| 14024 |
one argument. |
| 14025 |
|
| 14026 |
- gh-95196: Disable incorrect pickling of the C implemented classmethod |
| 14027 |
descriptors. |
| 14028 |
|
| 14029 |
- gh-96364: Fix text signatures of ``list.__getitem__`` and |
| 14030 |
``dict.__getitem__``. |
| 14031 |
|
| 14032 |
- gh-96352: Fix :exc:`AttributeError` missing ``name`` and ``obj`` |
| 14033 |
attributes in :meth:`object.__getattribute__`. Patch by Philip Georgi. |
| 14034 |
|
| 14035 |
- gh-93554: Change the jump opcodes so that all conditional jumps are |
| 14036 |
forward jumps. Backward jumps are converted by the assembler into a |
| 14037 |
conditional forward jump whose target is the fallthrough block (and with a |
| 14038 |
reversed condition), followed by an unconditional backward jump. For |
| 14039 |
example: |
| 14040 |
|
| 14041 |
``POP_JUMP_IF_TRUE BACKWARD_TARGET`` becomes ``POP_JUMP_IF_FALSE |
| 14042 |
NEXT_BLOCK; JUMP BACKWARD_TARGET``. |
| 14043 |
|
| 14044 |
All the directed conditional jump opcodes were removed: |
| 14045 |
``POP_JUMP_FORWARD_IF_TRUE``, ``POP_JUMP_BACKWARD_IF_TRUE``, |
| 14046 |
``POP_JUMP_FORWARD_IF_FALSE``, ``POP_JUMP_BACKWARD_IF_FALSE``, |
| 14047 |
``POP_JUMP_FORWARD_IF_NONE``, ``POP_JUMP_BACKWARD_IF_NONE``, |
| 14048 |
``POP_JUMP_FORWARD_IF_NOT_NONE``, ``POP_JUMP_BACKWARD_IF_NOT_NONE``. |
| 14049 |
|
| 14050 |
The corresponding opcodes without direction are no longer |
| 14051 |
pseudo-instructions, and they implement the forward conditional jumps. |
| 14052 |
|
| 14053 |
- gh-96268: Loading a file with invalid UTF-8 will now report the broken |
| 14054 |
character at the correct location. |
| 14055 |
|
| 14056 |
- gh-96237: The internal field ``_PyInterpreterFrame.f_func`` is renamed to |
| 14057 |
``_PyInterpreterFrame.f_funcobj`` and may be any object. The ``f_globals`` |
| 14058 |
and ``f_builtin`` fields may hold junk values. |
| 14059 |
|
| 14060 |
It is safest to treat the ``_PyInterpreterFrame`` struct as opaque. |
| 14061 |
|
| 14062 |
- gh-96187: Fixed a bug that caused ``_PyCode_GetExtra`` to return garbage |
| 14063 |
for negative indexes. Patch by Pablo Galindo |
| 14064 |
|
| 14065 |
- gh-96143: Add a new ``-X perf`` Python command line option as well as |
| 14066 |
:func:`sys.activate_stack_trampoline` and |
| 14067 |
:func:`sys.deactivate_stack_trampoline` function in the :mod:`sys` module |
| 14068 |
that allows to set/unset the interpreter in a way that the Linux ``perf`` |
| 14069 |
profiler can detect Python calls. The new |
| 14070 |
:func:`sys.is_stack_trampoline_active` function allows to query the state |
| 14071 |
of the perf trampoline. Design by Pablo Galindo. Patch by Pablo Galindo |
| 14072 |
and Christian Heimes with contributions from Gregory P. Smith [Google] and |
| 14073 |
Mark Shannon. |
| 14074 |
|
| 14075 |
- gh-96071: Fix a deadlock in :c:func:`PyGILState_Ensure` when allocating |
| 14076 |
new thread state. Patch by Kumar Aditya. |
| 14077 |
|
| 14078 |
- gh-96046: :c:func:`PyType_Ready` now initializes ``ht_cached_keys`` and |
| 14079 |
performs additional checks to ensure that type objects are properly |
| 14080 |
configured. This avoids crashes in 3rd party packages that don't use |
| 14081 |
regular API to create new types. |
| 14082 |
|
| 14083 |
- gh-96005: On WASI :const:`~errno.ENOTCAPABLE` is now mapped to |
| 14084 |
:exc:`PermissionError`. The :mod:`errno` modules exposes the new error |
| 14085 |
number. ``getpath.py`` now ignores :exc:`PermissionError` when it cannot |
| 14086 |
open landmark files ``pybuilddir.txt`` and ``pyenv.cfg``. |
| 14087 |
|
| 14088 |
- gh-93678: Added test a harness for direct unit tests of the compiler's |
| 14089 |
optimization stage. The ``_testinternalcapi.optimize_cfg()`` function runs |
| 14090 |
the optimiser on a sequence of instructions. The |
| 14091 |
``CfgOptimizationTestCase`` class in ``test.support`` has utilities for |
| 14092 |
invoking the optimizer and checking the output. |
| 14093 |
|
| 14094 |
- gh-95245: Reduces the size of a "simple" Python object from 8 to 6 words |
| 14095 |
by moving the weakreflist pointer into the pre-header directly before the |
| 14096 |
object's dict/values pointer. |
| 14097 |
|
| 14098 |
- gh-90997: Compile virtual :keyword:`try`/:keyword:`except` blocks to |
| 14099 |
handle exceptions raised during :meth:`~generator.close` or |
| 14100 |
:meth:`~generator.throw` calls through a suspended frame. |
| 14101 |
|
| 14102 |
- gh-95977: Optimized calling :meth:`~object.__get__` with vectorcall. Patch |
| 14103 |
by Kumar Aditya. |
| 14104 |
|
| 14105 |
- gh-91210: Improve error message when a parameter without a default value |
| 14106 |
follows one with a default value, and show the same message, even when the |
| 14107 |
non-default/default sequence is preceded by positional-only parameters. |
| 14108 |
|
| 14109 |
- gh-95922: Fixed bug where the compiler's ``eliminate_empty_basic_blocks`` |
| 14110 |
function ignores the last block of the code unit. |
| 14111 |
|
| 14112 |
- gh-95818: Skip over incomplete frames in :c:func:`PyThreadState_GetFrame`. |
| 14113 |
|
| 14114 |
- gh-95876: Fix format string in ``_PyPegen_raise_error_known_location`` |
| 14115 |
that can lead to memory corruption on some 64bit systems. The function was |
| 14116 |
building a tuple with ``i`` (int) instead of ``n`` (Py_ssize_t) for |
| 14117 |
Py_ssize_t arguments. |
| 14118 |
|
| 14119 |
- gh-95605: Fix misleading contents of error message when converting an |
| 14120 |
all-whitespace string to :class:`float`. |
| 14121 |
|
| 14122 |
- gh-95150: Update code object hashing and equality to consider all |
| 14123 |
debugging and exception handling tables. This fixes an issue where certain |
| 14124 |
non-identical code objects could be "deduplicated" during compilation. |
| 14125 |
|
| 14126 |
- gh-91146: Reduce allocation size of :class:`list` from :meth:`str.split` |
| 14127 |
and :meth:`str.rsplit`. Patch by Donghee Na and Inada Naoki. |
| 14128 |
|
| 14129 |
- gh-87092: Create a 'jump target label' abstraction in the compiler so that |
| 14130 |
the compiler's codegen stage does not work directly with basic blocks. |
| 14131 |
This prepares the code for changes to the underlying CFG generation |
| 14132 |
mechanism. |
| 14133 |
|
| 14134 |
- gh-95355: ``_PyPegen_Parser_New`` now properly detects token memory |
| 14135 |
allocation errors. Patch by Honglin Zhu. |
| 14136 |
|
| 14137 |
- gh-90081: Run Python code in tracer/profiler function at full speed. Fixes |
| 14138 |
slowdown in earlier versions of 3.11. |
| 14139 |
|
| 14140 |
- gh-95324: Emit a warning in debug mode if an object does not call |
| 14141 |
:c:func:`PyObject_GC_UnTrack` before deallocation. Patch by Pablo Galindo. |
| 14142 |
|
| 14143 |
- gh-95245: Merge managed dict and values pointer into a single tagged |
| 14144 |
pointer to save one word in the pre-header. |
| 14145 |
|
| 14146 |
- gh-93678: Add cfg_builder struct and refactor the relevant code so that a |
| 14147 |
cfg can be constructed without an instance of the compiler struct. |
| 14148 |
|
| 14149 |
- gh-95185: Prevented crashes in the AST constructor when compiling some |
| 14150 |
absurdly long expressions like ``"+0"*1000000``. :exc:`RecursionError` is |
| 14151 |
now raised instead. Patch by Pablo Galindo |
| 14152 |
|
| 14153 |
- gh-93351: :class:`ast.AST` node positions are now validated when provided |
| 14154 |
to :func:`compile` and other related functions. If invalid positions are |
| 14155 |
detected, a :exc:`ValueError` will be raised. |
| 14156 |
|
| 14157 |
- gh-94438: Fix an issue that caused extended opcode arguments and some |
| 14158 |
conditional pops to be ignored when calculating valid jump targets for |
| 14159 |
assignments to the ``f_lineno`` attribute of frame objects. In some cases, |
| 14160 |
this could cause inconsistent internal state, resulting in a hard crash of |
| 14161 |
the interpreter. |
| 14162 |
|
| 14163 |
- gh-95060: Undocumented ``PyCode_Addr2Location`` function now properly |
| 14164 |
returns when ``addrq`` argument is less than zero. |
| 14165 |
|
| 14166 |
- gh-95113: Replace all ``EXTENDED_ARG_QUICK`` instructions with basic |
| 14167 |
:opcode:`EXTENDED_ARG` instructions in unquickened code. Consumers of |
| 14168 |
non-adaptive bytecode should be able to handle extended arguments the same |
| 14169 |
way they were handled in CPython 3.10 and older. |
| 14170 |
|
| 14171 |
- gh-91409: Fix incorrect source location info caused by certain |
| 14172 |
optimizations in the bytecode compiler. |
| 14173 |
|
| 14174 |
Library |
| 14175 |
------- |
| 14176 |
|
| 14177 |
- gh-95023: Implement :func:`os.setns` and :func:`os.unshare` for Linux. |
| 14178 |
Patch by Noam Cohen. |
| 14179 |
|
| 14180 |
Core and Builtins |
| 14181 |
----------------- |
| 14182 |
|
| 14183 |
- gh-94036: Fix incorrect source location info for some multi-line attribute |
| 14184 |
accesses and method calls. |
| 14185 |
|
| 14186 |
- gh-94938: Fix error detection in some builtin functions when keyword |
| 14187 |
argument name is an instance of a str subclass with overloaded ``__eq__`` |
| 14188 |
and ``__hash__``. Previously it could cause SystemError or other undesired |
| 14189 |
behavior. |
| 14190 |
|
| 14191 |
Library |
| 14192 |
------- |
| 14193 |
|
| 14194 |
- gh-94996: :func:`ast.parse` will no longer parse function definitions with |
| 14195 |
positional-only params when passed ``feature_version`` less than ``(3, |
| 14196 |
8)``. Patch by Shantanu Jain. |
| 14197 |
|
| 14198 |
Core and Builtins |
| 14199 |
----------------- |
| 14200 |
|
| 14201 |
- gh-94739: Allow jumping within, out of, and across exception handlers in |
| 14202 |
the debugger. |
| 14203 |
|
| 14204 |
Library |
| 14205 |
------- |
| 14206 |
|
| 14207 |
- gh-94949: :func:`ast.parse` will no longer parse parenthesized context |
| 14208 |
managers when passed ``feature_version`` less than ``(3, 9)``. Patch by |
| 14209 |
Shantanu Jain. |
| 14210 |
|
| 14211 |
- gh-94947: :func:`ast.parse` will no longer parse assignment expressions |
| 14212 |
when passed ``feature_version`` less than ``(3, 8)``. Patch by Shantanu |
| 14213 |
Jain. |
| 14214 |
|
| 14215 |
Core and Builtins |
| 14216 |
----------------- |
| 14217 |
|
| 14218 |
- gh-91256: Ensures the program name is known for help text during |
| 14219 |
interpreter startup. |
| 14220 |
|
| 14221 |
- gh-94869: Fix the column offsets for some expressions in multi-line |
| 14222 |
f-strings :mod:`ast` nodes. Patch by Pablo Galindo. |
| 14223 |
|
| 14224 |
- gh-94893: Fix an issue where frame object manipulations could corrupt |
| 14225 |
inline bytecode caches. |
| 14226 |
|
| 14227 |
- gh-94822: Fix an issue where lookups of metaclass descriptors may be |
| 14228 |
ignored when an identically-named attribute also exists on the class |
| 14229 |
itself. |
| 14230 |
|
| 14231 |
- gh-91153: Fix an issue where a :class:`bytearray` item assignment could |
| 14232 |
crash if it's resized by the new value's :meth:`__index__` method. |
| 14233 |
|
| 14234 |
- gh-90699: Fix reference counting bug in :meth:`bool.__repr__`. Patch by |
| 14235 |
Kumar Aditya. |
| 14236 |
|
| 14237 |
- gh-94694: Fix an issue that could cause code with multi-line method |
| 14238 |
lookups to have misleading or incorrect column offset information. In some |
| 14239 |
cases (when compiling a hand-built AST) this could have resulted in a hard |
| 14240 |
crash of the interpreter. |
| 14241 |
|
| 14242 |
- gh-93252: Fix an issue that caused internal frames to outlive failed |
| 14243 |
Python function calls, possibly resulting in memory leaks or hard |
| 14244 |
interpreter crashes. |
| 14245 |
|
| 14246 |
- gh-94215: Fix an issue where exceptions raised by line-tracing events |
| 14247 |
would cause frames to be left in an invalid state, possibly resulting in a |
| 14248 |
hard crash of the interpreter. |
| 14249 |
|
| 14250 |
- gh-92228: Disable the compiler's inline-small-exit-blocks optimization for |
| 14251 |
exit blocks that are associated with source code lines. This fixes a bug |
| 14252 |
where the debugger cannot tell where an exception handler ends and the |
| 14253 |
following code block begins. |
| 14254 |
|
| 14255 |
- gh-94485: Line number of a module's ``RESUME`` instruction is set to 0 as |
| 14256 |
specified in :pep:`626`. |
| 14257 |
|
| 14258 |
- gh-94438: Account for instructions that can push NULL to the stack when |
| 14259 |
setting line number in a frame. Prevents some (unlikely) crashes. |
| 14260 |
|
| 14261 |
- gh-91719: Reload ``opcode`` when raising ``unknown opcode error`` in the |
| 14262 |
interpreter main loop, for C compilers to generate dispatching code |
| 14263 |
independently. |
| 14264 |
|
| 14265 |
- gh-94329: Compile and run code with unpacking of extremely large sequences |
| 14266 |
(1000s of elements). Such code failed to compile. It now compiles and runs |
| 14267 |
correctly. |
| 14268 |
|
| 14269 |
- gh-94360: Fixed a tokenizer crash when reading encoded files with syntax |
| 14270 |
errors from ``stdin`` with non utf-8 encoded text. Patch by Pablo Galindo |
| 14271 |
|
| 14272 |
- gh-88116: Fix an issue when reading line numbers from code objects if the |
| 14273 |
encoded line numbers are close to ``INT_MIN``. Patch by Pablo Galindo |
| 14274 |
|
| 14275 |
- gh-94262: Don't create frame objects for incomplete frames. Prevents the |
| 14276 |
creation of generators and closures from being observable to Python and C |
| 14277 |
extensions, restoring the behavior of 3.10 and earlier. |
| 14278 |
|
| 14279 |
- gh-94192: Fix error for dictionary literals with invalid expression as |
| 14280 |
value. |
| 14281 |
|
| 14282 |
- gh-87995: :class:`types.MappingProxyType` instances are now hashable if |
| 14283 |
the underlying mapping is hashable. |
| 14284 |
|
| 14285 |
- gh-93883: Revise the display strategy of traceback enhanced error |
| 14286 |
locations. The indicators are only shown when the location doesn't span |
| 14287 |
the whole line. |
| 14288 |
|
| 14289 |
- gh-94163: Add :opcode:`BINARY_SLICE` and :opcode:`STORE_SLICE` |
| 14290 |
instructions for more efficient handling and better specialization of |
| 14291 |
slicing operations, where the slice is explicit in the source code. |
| 14292 |
|
| 14293 |
- gh-94021: Fix unreachable code warning in ``Python/specialize.c``. |
| 14294 |
|
| 14295 |
- gh-93911: Specialize ``LOAD_ATTR`` for objects with custom |
| 14296 |
``__getattribute__``. |
| 14297 |
|
| 14298 |
- gh-93955: Improve performance of attribute lookups on objects with custom |
| 14299 |
``__getattribute__`` and ``__getattr__``. Patch by Ken Jin. |
| 14300 |
|
| 14301 |
- gh-93911: Specialize ``LOAD_ATTR`` for ``property()`` attributes. |
| 14302 |
|
| 14303 |
- gh-93678: Refactor compiler optimisation code so that it no longer needs |
| 14304 |
the ``struct assembler`` and ``struct compiler`` passed around. Instead, |
| 14305 |
each function takes the CFG and other data that it actually needs. This |
| 14306 |
will make it possible to test this code directly. |
| 14307 |
|
| 14308 |
- gh-93841: When built with ``-enable-pystats``, ``sys._stats_on()``, |
| 14309 |
``sys._stats_off()``, ``sys._stats_clear()`` and ``sys._stats_dump()`` |
| 14310 |
functions have been added to enable gathering stats for parts of programs. |
| 14311 |
|
| 14312 |
- gh-93516: Store offset of first traceable instruction in code object to |
| 14313 |
avoid having to recompute it for each instruction when tracing. |
| 14314 |
|
| 14315 |
- gh-93516: Lazily create a table mapping bytecode offsets to line numbers |
| 14316 |
to speed up calculation of line numbers when tracing. |
| 14317 |
|
| 14318 |
- gh-89828: :class:`types.GenericAlias` no longer relays the ``__class__`` |
| 14319 |
attribute. For example, ``isinstance(list[int], type)`` no longer returns |
| 14320 |
``True``. |
| 14321 |
|
| 14322 |
- gh-93678: Refactor the compiler to reduce boilerplate and repetition. |
| 14323 |
|
| 14324 |
- gh-93671: Fix some exponential backtrace case happening with deeply nested |
| 14325 |
sequence patterns in match statements. Patch by Pablo Galindo |
| 14326 |
|
| 14327 |
- gh-93662: Make sure that the end column offsets are correct in multi-line |
| 14328 |
method calls. Previously, the end column could precede the column offset. |
| 14329 |
|
| 14330 |
Library |
| 14331 |
------- |
| 14332 |
|
| 14333 |
- gh-93461: :func:`importlib.invalidate_caches` now drops entries from |
| 14334 |
:data:`sys.path_importer_cache` with a relative path as name. This solves |
| 14335 |
a caching issue when a process changes its current working directory. |
| 14336 |
|
| 14337 |
``FileFinder`` no longer inserts a dot in the path, e.g. ``/egg/./spam`` |
| 14338 |
is now ``/egg/spam``. |
| 14339 |
|
| 14340 |
Core and Builtins |
| 14341 |
----------------- |
| 14342 |
|
| 14343 |
- gh-93621: Change order of bytecode instructions emitted for |
| 14344 |
:keyword:`with` and :keyword:`async with` to reduce the number of entries |
| 14345 |
in the exception table. |
| 14346 |
|
| 14347 |
- gh-93533: Reduce the size of the inline cache for ``LOAD_METHOD`` by 2 |
| 14348 |
bytes. |
| 14349 |
|
| 14350 |
- gh-93444: Removed redundant fields from the compiler's basicblock struct: |
| 14351 |
``b_nofallthrough``, ``b_exit``, ``b_return``. They can be easily |
| 14352 |
calculated from the opcode of the last instruction of the block. |
| 14353 |
|
| 14354 |
- gh-93429: ``LOAD_METHOD`` instruction has been removed. It was merged back |
| 14355 |
into ``LOAD_ATTR``. |
| 14356 |
|
| 14357 |
- gh-93418: Fixed an assert where an f-string has an equal sign '=' |
| 14358 |
following an expression, but there's no trailing brace. For example, |
| 14359 |
f"{i=". |
| 14360 |
|
| 14361 |
- gh-93382: Cache the result of :c:func:`PyCode_GetCode` function to restore |
| 14362 |
the *O*\ (1) lookup of the :attr:`~types.CodeType.co_code` attribute. |
| 14363 |
|
| 14364 |
- gh-93359: Ensure that custom :mod:`ast` nodes without explicit end |
| 14365 |
positions can be compiled. Patch by Pablo Galindo. |
| 14366 |
|
| 14367 |
- gh-93356: Code for exception handlers is emitted at the end of the code |
| 14368 |
unit's bytecode. This avoids one jump when no exception is raised. |
| 14369 |
|
| 14370 |
- gh-93354: Use exponential backoff for specialization counters in the |
| 14371 |
interpreter. Can reduce the number of failed specializations significantly |
| 14372 |
and avoid slowdown for those parts of a program that are not suitable for |
| 14373 |
specialization. |
| 14374 |
|
| 14375 |
- gh-93283: Improve error message for invalid syntax of conversion character |
| 14376 |
in f-string expressions. |
| 14377 |
|
| 14378 |
- gh-93345: Fix a crash in substitution of a ``TypeVar`` in nested generic |
| 14379 |
alias after ``TypeVarTuple``. |
| 14380 |
|
| 14381 |
- gh-93223: When a bytecode instruction jumps to an unconditional jump |
| 14382 |
instruction, the first instruction can often be optimized to target the |
| 14383 |
unconditional jump's target directly. For tracing reasons, this would |
| 14384 |
previously only occur if both instructions have the same line number. This |
| 14385 |
also now occurs if the unconditional jump is artificial, i.e., if it has |
| 14386 |
no associated line number. |
| 14387 |
|
| 14388 |
- gh-84694: The ``--experimental-isolated-subinterpreters`` configure option |
| 14389 |
and ``EXPERIMENTAL_ISOLATED_SUBINTERPRETERS`` macro have been removed. |
| 14390 |
|
| 14391 |
- gh-91924: Fix ``__lltrace__`` debug feature if the stdout encoding is not |
| 14392 |
UTF-8. Patch by Victor Stinner. |
| 14393 |
|
| 14394 |
- gh-93040: Wraps unused parameters in ``Objects/obmalloc.c`` with |
| 14395 |
``Py_UNUSED``. |
| 14396 |
|
| 14397 |
- gh-93143: Avoid ``NULL`` checks for uninitialized local variables by |
| 14398 |
determining at compile time which variables must be initialized. |
| 14399 |
|
| 14400 |
- gh-93061: Backward jumps after ``async for`` loops are no longer given |
| 14401 |
dubious line numbers. |
| 14402 |
|
| 14403 |
- gh-93065: Fix contextvars HAMT implementation to handle iteration over |
| 14404 |
deep trees. |
| 14405 |
|
| 14406 |
The bug was discovered and fixed by Eli Libman. See |
| 14407 |
`MagicStack/immutables#84 |
| 14408 |
<https://github.com/MagicStack/immutables/issues/84>`_ for more details. |
| 14409 |
|
| 14410 |
- gh-93012: Added the new function :c:func:`PyType_FromMetaclass`, which |
| 14411 |
generalizes the existing :c:func:`PyType_FromModuleAndSpec` using an |
| 14412 |
additional metaclass argument. This is useful for language binding tools, |
| 14413 |
where it can be used to intercept type-related operations like subclassing |
| 14414 |
or static attribute access by specifying a metaclass with custom slots. |
| 14415 |
|
| 14416 |
Importantly, :c:func:`PyType_FromMetaclass` is available in the Limited |
| 14417 |
API, which provides a path towards migrating more binding tools onto the |
| 14418 |
Stable ABI. |
| 14419 |
|
| 14420 |
- gh-93021: Fix the :attr:`__text_signature__` for :meth:`__get__` methods |
| 14421 |
implemented in C. Patch by Jelle Zijlstra. |
| 14422 |
|
| 14423 |
- gh-89914: The operand of the ``YIELD_VALUE`` instruction is set to the |
| 14424 |
stack depth. This is done to help frame handling on ``yield`` and may |
| 14425 |
assist debuggers. |
| 14426 |
|
| 14427 |
- gh-92955: Fix memory leak in code object's lines and positions iterators |
| 14428 |
as they were not finalized at exit. Patch by Kumar Aditya. |
| 14429 |
|
| 14430 |
- gh-92930: Fixed a crash in ``_pickle.c`` from mutating collections during |
| 14431 |
``__reduce__`` or ``persistent_id``. |
| 14432 |
|
| 14433 |
- gh-90690: The PRECALL instruction has been removed. It offered only a |
| 14434 |
small advantage for specialization and is not needed in the vast majority |
| 14435 |
of cases. |
| 14436 |
|
| 14437 |
- gh-92914: Always round the allocated size for lists up to the nearest even |
| 14438 |
number. |
| 14439 |
|
| 14440 |
- gh-92858: Improve error message for some suites with syntax error before |
| 14441 |
':' |
| 14442 |
|
| 14443 |
- gh-90473: Decrease default recursion limit on WASI to address limited call |
| 14444 |
stack size. |
| 14445 |
|
| 14446 |
- gh-92804: Fix memory leak in ``memoryview`` iterator as it was not |
| 14447 |
finalized at exit. Patch by Kumar Aditya. |
| 14448 |
|
| 14449 |
- gh-92777: Specialize ``LOAD_METHOD`` for objects with lazy dictionaries. |
| 14450 |
Patch by Ken Jin. |
| 14451 |
|
| 14452 |
- gh-92658: Add support for connecting and binding to Hyper-V sockets on |
| 14453 |
Windows Hyper-V hosts and guests. |
| 14454 |
|
| 14455 |
- gh-92236: Remove spurious "LINE" event when starting a generator or |
| 14456 |
coroutine, visible tracing functions implemented in C. |
| 14457 |
|
| 14458 |
Library |
| 14459 |
------- |
| 14460 |
|
| 14461 |
- gh-91102: :meth:`!_warnings.warn_explicit` is ported to Argument Clinic. |
| 14462 |
|
| 14463 |
Core and Builtins |
| 14464 |
----------------- |
| 14465 |
|
| 14466 |
- gh-92619: Make the compiler duplicate an exit block only if none of its |
| 14467 |
instructions have a lineno (previously only the first instruction in the |
| 14468 |
block was checked, leading to unnecessarily duplicated blocks). |
| 14469 |
|
| 14470 |
- gh-88750: The deprecated debug build only ``PYTHONTHREADDEBUG`` |
| 14471 |
environment variable no longer does anything. |
| 14472 |
|
| 14473 |
Library |
| 14474 |
------- |
| 14475 |
|
| 14476 |
- gh-92261: Fix hang when trying to iterate over a ``typing.Union``. |
| 14477 |
|
| 14478 |
Core and Builtins |
| 14479 |
----------------- |
| 14480 |
|
| 14481 |
- gh-91432: Specialized the :opcode:`FOR_ITER` opcode using the PEP 659 |
| 14482 |
machinery |
| 14483 |
|
| 14484 |
- gh-91399: Removed duplicate '{0, 0, 0, 0, 0, 0}' entry in |
| 14485 |
'Objects/unicodetype_db.h'. |
| 14486 |
|
| 14487 |
- gh-91578: Updates the error message for abstract class. |
| 14488 |
|
| 14489 |
- bpo-47091: Improve performance of repetition of :class:`list` and |
| 14490 |
:class:`tuple` by using ``memcpy`` to copy data and performing the |
| 14491 |
reference increments in one step. |
| 14492 |
|
| 14493 |
- bpo-46142: Make ``--help`` output shorter by moving some info to the new |
| 14494 |
``--help-env`` and ``--help-xoptions`` command-line options. Also add |
| 14495 |
``--help-all`` option to print complete usage. |
| 14496 |
|
| 14497 |
- bpo-42316: Document some places where an assignment expression needs |
| 14498 |
parentheses. |
| 14499 |
|
| 14500 |
Library |
| 14501 |
------- |
| 14502 |
|
| 14503 |
- gh-89237: Fix hang on Windows in ``subprocess.wait_closed()`` in |
| 14504 |
:mod:`asyncio` with :class:`~asyncio.ProactorEventLoop`. Patch by Kumar |
| 14505 |
Aditya. |
| 14506 |
|
| 14507 |
- gh-97928: :meth:`tkinter.Text.count` raises now an exception for options |
| 14508 |
starting with "-" instead of silently ignoring them. |
| 14509 |
|
| 14510 |
- gh-98393: The :mod:`os` module no longer accepts bytes-like paths, like |
| 14511 |
:class:`bytearray` and :class:`memoryview` types: only the exact |
| 14512 |
:class:`bytes` type is accepted for bytes strings. Patch by Victor |
| 14513 |
Stinner. |
| 14514 |
|
| 14515 |
- gh-98363: Added itertools.batched() to batch data into lists of a given |
| 14516 |
length with the last list possibly being shorter than the others. |
| 14517 |
|
| 14518 |
- gh-98331: Update the bundled copies of pip and setuptools to versions 22.3 |
| 14519 |
and 65.5.0 respectively. |
| 14520 |
|
| 14521 |
- gh-98307: A :meth:`~logging.handlers.SysLogHandler.createSocket` method |
| 14522 |
was added to :class:`~logging.handlers.SysLogHandler`. |
| 14523 |
|
| 14524 |
- gh-96035: Fix bug in :func:`urllib.parse.urlparse` that causes certain |
| 14525 |
port numbers containing whitespace, underscores, plus and minus signs, or |
| 14526 |
non-ASCII digits to be incorrectly accepted. |
| 14527 |
|
| 14528 |
- gh-98257: Make :func:`sys.setprofile` and :func:`sys.settrace` functions |
| 14529 |
reentrant. They can no long fail with: ``RuntimeError("Cannot install a |
| 14530 |
trace function while another trace function is being installed")``. Patch |
| 14531 |
by Victor Stinner. |
| 14532 |
|
| 14533 |
- gh-98251: Allow :mod:`venv` to pass along :envvar:`!PYTHON*` variables to |
| 14534 |
``ensurepip`` and ``pip`` when they do not impact path resolution |
| 14535 |
|
| 14536 |
- gh-94597: Deprecated |
| 14537 |
:meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` and |
| 14538 |
:meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` methods to be |
| 14539 |
removed in Python 3.14. Patch by Kumar Aditya. |
| 14540 |
|
| 14541 |
- gh-98178: On macOS, fix a crash in :func:`syslog.syslog` in multi-threaded |
| 14542 |
applications. On macOS, the libc ``syslog()`` function is not thread-safe, |
| 14543 |
so :func:`syslog.syslog` no longer releases the GIL to call it. Patch by |
| 14544 |
Victor Stinner. |
| 14545 |
|
| 14546 |
- gh-44098: Release the GIL when creating :class:`mmap.mmap` objects on |
| 14547 |
Unix. |
| 14548 |
|
| 14549 |
- gh-87730: Wrap network errors consistently in urllib FTP support, so the |
| 14550 |
test suite doesn't fail when a network is available but the public |
| 14551 |
internet is not reachable. |
| 14552 |
|
| 14553 |
- gh-94597: The child watcher classes |
| 14554 |
:class:`~asyncio.MultiLoopChildWatcher`, |
| 14555 |
:class:`~asyncio.FastChildWatcher` and :class:`~asyncio.SafeChildWatcher` |
| 14556 |
are deprecated and will be removed in Python 3.14. Patch by Kumar Aditya. |
| 14557 |
|
| 14558 |
- gh-98023: Change default child watcher to |
| 14559 |
:class:`~asyncio.PidfdChildWatcher` on Linux systems which supports it. |
| 14560 |
Patch by Kumar Aditya. |
| 14561 |
|
| 14562 |
- gh-90985: Earlier in 3.11 we deprecated |
| 14563 |
``asyncio.Task.cancel("message")``. We realized we were too harsh, and |
| 14564 |
have undeprecated it. |
| 14565 |
|
| 14566 |
- gh-65961: Do not rely solely on ``__cached__`` on modules; code will also |
| 14567 |
support ``__spec__.cached``. |
| 14568 |
|
| 14569 |
- gh-97646: Replace deprecated ``application/javascript`` with |
| 14570 |
``text/javascript`` in :mod:`mimetypes`. See :rfc:`9239`. Patch by Noam |
| 14571 |
Cohen. |
| 14572 |
|
| 14573 |
- gh-97930: Apply changes from importlib_resources 5.8 and 5.9: |
| 14574 |
``Traversable.joinpath`` provides a concrete implementation. ``as_file`` |
| 14575 |
now supports directories of resources. |
| 14576 |
|
| 14577 |
- gh-97850: Remove deprecated :func:`!importlib.util.set_loader` and |
| 14578 |
:func:`!importlib.util.module_for_loader` from :mod:`importlib.util`. |
| 14579 |
|
| 14580 |
- gh-97837: Change deprecate warning message in :mod:`unittest` from |
| 14581 |
|
| 14582 |
``It is deprecated to return a value!=None`` |
| 14583 |
|
| 14584 |
to |
| 14585 |
|
| 14586 |
``It is deprecated to return a value that is not None from a test case`` |
| 14587 |
|
| 14588 |
- gh-97825: Fixes :exc:`AttributeError` when :meth:`subprocess.check_output` |
| 14589 |
is used with argument ``input=None`` and either of the arguments |
| 14590 |
*encoding* or *errors* are used. |
| 14591 |
|
| 14592 |
- gh-97008: :exc:`NameError` and :exc:`AttributeError` spelling suggestions |
| 14593 |
provided since :gh:`82711` are now also emitted by the pure Python |
| 14594 |
:mod:`traceback` module. Tests for those suggestions now exercise both |
| 14595 |
implementations to ensure they are equivalent. Patch by Carl Friedrich |
| 14596 |
Bolz-Tereick and Łukasz Langa. |
| 14597 |
|
| 14598 |
- gh-97799: :mod:`dataclass` now uses :func:`inspect.get_annotations` to |
| 14599 |
examine the annotations on class objects. |
| 14600 |
|
| 14601 |
- gh-97781: Removed deprecated interfaces in ``importlib.metadata`` (entry |
| 14602 |
points accessed as dictionary, implicit dictionary construction of |
| 14603 |
sequence of ``EntryPoint`` objects, mutablility of ``EntryPoints`` result, |
| 14604 |
access of entry point by index). ``entry_points`` now has a simpler, more |
| 14605 |
straightforward API (returning ``EntryPoints``). |
| 14606 |
|
| 14607 |
- gh-96827: Avoid spurious tracebacks from :mod:`asyncio` when default |
| 14608 |
executor cleanup is delayed until after the event loop is closed (e.g. as |
| 14609 |
the result of a keyboard interrupt). |
| 14610 |
|
| 14611 |
- gh-95534: :meth:`gzip.GzipFile.read` reads 10% faster. |
| 14612 |
|
| 14613 |
- gh-97592: Avoid a crash in the C version of |
| 14614 |
:meth:`asyncio.Future.remove_done_callback` when an evil argument is |
| 14615 |
passed. |
| 14616 |
|
| 14617 |
- gh-97639: Remove ``tokenize.NL`` check from :mod:`tabnanny`. |
| 14618 |
|
| 14619 |
- gh-97545: Make Semaphore run faster. |
| 14620 |
|
| 14621 |
- gh-73588: Fix generation of the default name of |
| 14622 |
:class:`tkinter.Checkbutton`. Previously, checkbuttons in different parent |
| 14623 |
widgets could have the same short name and share the same state if |
| 14624 |
arguments "name" and "variable" are not specified. Now they are globally |
| 14625 |
unique. |
| 14626 |
|
| 14627 |
- gh-96865: fix Flag to use boundary CONFORM |
| 14628 |
|
| 14629 |
This restores previous Flag behavior of allowing flags with non-sequential |
| 14630 |
values to be combined; e.g. |
| 14631 |
|
| 14632 |
class Skip(Flag): TWO = 2 EIGHT = 8 |
| 14633 |
|
| 14634 |
Skip.TWO | Skip.EIGHT -> <Skip.TWO|EIGHT: 10> |
| 14635 |
|
| 14636 |
- gh-97005: Update bundled libexpat to 2.4.9 |
| 14637 |
|
| 14638 |
- gh-85760: Fix race condition in :mod:`asyncio` where |
| 14639 |
:meth:`~asyncio.SubprocessProtocol.process_exited` called before the |
| 14640 |
:meth:`~asyncio.SubprocessProtocol.pipe_data_received` leading to |
| 14641 |
inconsistent output. Patch by Kumar Aditya. |
| 14642 |
|
| 14643 |
- gh-96704: Pass the correct ``contextvars.Context`` when a ``asyncio`` |
| 14644 |
exception handler is called on behalf of a task or callback handle. This |
| 14645 |
adds a new ``Task`` method, ``get_context``, and also a new ``Handle`` |
| 14646 |
method with the same name. If this method is not found on a task object |
| 14647 |
(perhaps because it is a third-party library that does not yet provide |
| 14648 |
this method), the context prevailing at the time the exception handler is |
| 14649 |
called is used. |
| 14650 |
|
| 14651 |
- gh-96819: Fixed check in :mod:`multiprocessing.resource_tracker` that |
| 14652 |
guarantees that the length of a write to a pipe is not greater than |
| 14653 |
``PIPE_BUF``. |
| 14654 |
|
| 14655 |
- gh-95865: Reduce :func:`urllib.parse.quote_from_bytes` memory use on large |
| 14656 |
values. |
| 14657 |
|
| 14658 |
Contributed by Dennis Sweeney. |
| 14659 |
|
| 14660 |
- gh-96741: Corrected type annotation for dataclass attribute |
| 14661 |
``pstats.FunctionProfile.ncalls`` to be ``str``. |
| 14662 |
|
| 14663 |
- gh-96734: Update :mod:`unicodedata` database to Unicode 15.0.0. |
| 14664 |
|
| 14665 |
- gh-96735: Fix undefined behaviour in :func:`struct.unpack`. |
| 14666 |
|
| 14667 |
- gh-46412: Improve performance of ``bool(db)`` for large ndb/gdb databases. |
| 14668 |
Previously this would call ``len(db)`` which would iterate over all keys |
| 14669 |
-- the answer (empty or not) is known after the first key. |
| 14670 |
|
| 14671 |
- gh-96652: Fix the faulthandler implementation of |
| 14672 |
``faulthandler.register(signal, chain=True)`` if the ``sigaction()`` |
| 14673 |
function is not available: don't call the previous signal handler if it's |
| 14674 |
NULL. Patch by Victor Stinner. |
| 14675 |
|
| 14676 |
- gh-68163: Correct conversion of :class:`numbers.Rational`'s to |
| 14677 |
:class:`float`. |
| 14678 |
|
| 14679 |
- gh-96538: Speed up ``bisect.bisect()`` functions by taking advantage of |
| 14680 |
type-stability. |
| 14681 |
|
| 14682 |
- gh-96465: Fraction hashes are now cached. |
| 14683 |
|
| 14684 |
- gh-96079: In :mod:`typing`, fix missing field ``name`` and incorrect |
| 14685 |
``__module__`` in _AnnotatedAlias. |
| 14686 |
|
| 14687 |
- gh-96415: Remove ``types._cell_factory`` from module namespace. |
| 14688 |
|
| 14689 |
- gh-95987: Fix ``repr`` of ``Any`` subclasses. |
| 14690 |
|
| 14691 |
- gh-96388: Work around missing socket functions in |
| 14692 |
:class:`~socket.socket`'s ``__repr__``. |
| 14693 |
|
| 14694 |
- gh-96385: Fix ``TypeVarTuple.__typing_prepare_subst__``. ``TypeError`` was |
| 14695 |
not raised when using more than one ``TypeVarTuple``, like ``[*T, *V]`` in |
| 14696 |
type alias substitutions. |
| 14697 |
|
| 14698 |
- gh-96142: Add ``match_args``, ``kw_only``, ``slots``, and ``weakref_slot`` |
| 14699 |
to ``_DataclassParams``. |
| 14700 |
|
| 14701 |
- gh-96073: In :mod:`inspect`, fix overeager replacement of "``typing.``" in |
| 14702 |
formatting annotations. |
| 14703 |
|
| 14704 |
- gh-89258: Added a :meth:`~logging.Logger.getChildren` method to |
| 14705 |
:class:`logging.Logger`, to get the immediate child loggers of a logger. |
| 14706 |
|
| 14707 |
- gh-96346: Use double caching for compiled RE patterns. |
| 14708 |
|
| 14709 |
- gh-96349: Fixed a minor performance regression in |
| 14710 |
:func:`threading.Event.__init__` |
| 14711 |
|
| 14712 |
- gh-90467: Fix :class:`asyncio.streams.StreamReaderProtocol` to keep a |
| 14713 |
strong reference to the created task, so that it's not garbage collected |
| 14714 |
|
| 14715 |
- gh-96172: Fix a bug in ``unicodedata``: ``east_asian_width`` used to |
| 14716 |
return the wrong value for unassigned characters; and for yet unassigned, |
| 14717 |
but reserved characters. |
| 14718 |
|
| 14719 |
- gh-96159: Fix a performance regression in logging |
| 14720 |
TimedRotatingFileHandler. Only check for special files when the rollover |
| 14721 |
time has passed. |
| 14722 |
|
| 14723 |
- gh-96175: Fix unused ``localName`` parameter in the ``Attr`` class in |
| 14724 |
:mod:`xml.dom.minidom`. |
| 14725 |
|
| 14726 |
- gh-96145: Add AttrDict to JSON module for use with object_hook. |
| 14727 |
|
| 14728 |
- gh-96052: Fix handling compiler warnings (SyntaxWarning and |
| 14729 |
DeprecationWarning) in :func:`codeop.compile_command` when checking for |
| 14730 |
incomplete input. Previously it emitted warnings and raised a SyntaxError. |
| 14731 |
Now it always returns ``None`` for incomplete input without emitting any |
| 14732 |
warnings. |
| 14733 |
|
| 14734 |
- gh-96125: Fix incorrect condition that causes ``sys.thread_info.name`` to |
| 14735 |
be wrong on pthread platforms. |
| 14736 |
|
| 14737 |
- gh-96019: Fix a bug in the ``makeunicodedata.py`` script leading to about |
| 14738 |
13 KiB of space saving in the ``unicodedata`` module, specifically the |
| 14739 |
character decomposition data. |
| 14740 |
|
| 14741 |
- gh-95463: Remove an incompatible change from :issue:`28080` that caused a |
| 14742 |
regression that ignored the utf8 in ``ZipInfo.flag_bits``. Patch by Pablo |
| 14743 |
Galindo. |
| 14744 |
|
| 14745 |
- gh-69142: Add ``%:z`` strftime format code (generates tzoffset with colons |
| 14746 |
as separator), see :ref:`strftime-strptime-behavior`. |
| 14747 |
|
| 14748 |
- gh-95899: Fix :class:`asyncio.Runner` to call |
| 14749 |
:func:`asyncio.set_event_loop` only once to avoid calling |
| 14750 |
:meth:`~asyncio.AbstractChildWatcher.attach_loop` multiple times on child |
| 14751 |
watchers. Patch by Kumar Aditya. |
| 14752 |
|
| 14753 |
- gh-95736: Fix :class:`unittest.IsolatedAsyncioTestCase` to set event loop |
| 14754 |
before calling setup functions. Patch by Kumar Aditya. |
| 14755 |
|
| 14756 |
- gh-95865: Speed up :func:`urllib.parse.quote_from_bytes` by replacing a |
| 14757 |
list comprehension with ``map()``. |
| 14758 |
|
| 14759 |
- gh-95861: Add support for computing Spearman's correlation coefficient to |
| 14760 |
the existing statistics.correlation() function. |
| 14761 |
|
| 14762 |
- gh-95804: Fix ``logging`` shutdown handler so it respects |
| 14763 |
``MemoryHandler.flushOnClose``. |
| 14764 |
|
| 14765 |
- gh-95704: When a task catches :exc:`asyncio.CancelledError` and raises |
| 14766 |
some other error, the other error should generally not silently be |
| 14767 |
suppressed. |
| 14768 |
|
| 14769 |
- gh-95149: The :class:`HTTPStatus <http.HTTPStatus>` enum offers a couple |
| 14770 |
of properties to indicate the HTTP status category e.g. |
| 14771 |
``HTTPStatus.OK.is_success``. |
| 14772 |
|
| 14773 |
- gh-95609: Update bundled pip to 22.2.2. |
| 14774 |
|
| 14775 |
- gh-95289: Fix :class:`asyncio.TaskGroup` to propagate exception when |
| 14776 |
:exc:`asyncio.CancelledError` was replaced with another exception by a |
| 14777 |
context manager. Patch by Kumar Aditya and Guido van Rossum. |
| 14778 |
|
| 14779 |
- gh-94909: Fix incorrect joining of relative Windows paths with drives in |
| 14780 |
:class:`pathlib.PurePath` initializer. |
| 14781 |
|
| 14782 |
- gh-95385: Faster ``json.dumps()`` when sorting of keys is not requested |
| 14783 |
(default). |
| 14784 |
|
| 14785 |
- gh-83901: Improve :meth:`Signature.bind <inspect.Signature.bind>` error |
| 14786 |
message for missing keyword-only arguments. |
| 14787 |
|
| 14788 |
- gh-95339: Update bundled pip to 22.2.1. |
| 14789 |
|
| 14790 |
- gh-95045: Fix GC crash when deallocating ``_lsprof.Profiler`` by |
| 14791 |
untracking it before calling any callbacks. Patch by Kumar Aditya. |
| 14792 |
|
| 14793 |
- gh-95231: Fail gracefully if :const:`~errno.EPERM` or |
| 14794 |
:const:`~errno.ENOSYS` is raised when loading :mod:`!crypt` methods. This |
| 14795 |
may happen when trying to load ``MD5`` on a Linux kernel with :abbr:`FIPS |
| 14796 |
(Federal Information Processing Standard)` enabled. |
| 14797 |
|
| 14798 |
- gh-95097: Fix :func:`asyncio.run` for :class:`asyncio.Task` |
| 14799 |
implementations without :meth:`~asyncio.Task.uncancel` method. Patch by |
| 14800 |
Kumar Aditya. |
| 14801 |
|
| 14802 |
- gh-95087: Fix IndexError in parsing invalid date in the :mod:`email` |
| 14803 |
module. |
| 14804 |
|
| 14805 |
- gh-95199: Upgrade bundled setuptools to 63.2.0. |
| 14806 |
|
| 14807 |
- gh-95194: Upgrade bundled pip to 22.2. |
| 14808 |
|
| 14809 |
- gh-93899: Fix check for existence of :const:`os.EFD_CLOEXEC`, |
| 14810 |
:const:`os.EFD_NONBLOCK` and :const:`os.EFD_SEMAPHORE` flags on older |
| 14811 |
kernel versions where these flags are not present. Patch by Kumar Aditya. |
| 14812 |
|
| 14813 |
- gh-95166: Fix :meth:`concurrent.futures.Executor.map` to cancel the |
| 14814 |
currently waiting on future on an error - e.g. TimeoutError or |
| 14815 |
KeyboardInterrupt. |
| 14816 |
|
| 14817 |
- gh-95132: Fix a :mod:`sqlite3` regression where ``*args`` and ``**kwds`` |
| 14818 |
were incorrectly relayed from :py:func:`~sqlite3.connect` to the |
| 14819 |
:class:`~sqlite3.Connection` factory. The regression was introduced in |
| 14820 |
3.11a1 with PR 24421 (:gh:`85128`). Patch by Erlend E. Aasland. |
| 14821 |
|
| 14822 |
- gh-93157: Fix :mod:`fileinput` module didn't support ``errors`` option |
| 14823 |
when ``inplace`` is true. |
| 14824 |
|
| 14825 |
- gh-91212: Fixed flickering of the turtle window when the tracer is turned |
| 14826 |
off. Patch by Shin-myoung-serp. |
| 14827 |
|
| 14828 |
- gh-95077: Add deprecation warning for enum ``member.member`` access (e.g. |
| 14829 |
``Color.RED.BLUE``). Remove ``EnumMeta.__getattr__``. |
| 14830 |
|
| 14831 |
- gh-95109: Ensure that timeouts scheduled with :class:`asyncio.Timeout` |
| 14832 |
that have already expired are delivered promptly. |
| 14833 |
|
| 14834 |
- gh-95105: :meth:`wsgiref.types.InputStream.__iter__` should return |
| 14835 |
``Iterator[bytes]``, not ``Iterable[bytes]``. Patch by Shantanu Jain. |
| 14836 |
|
| 14837 |
- gh-95066: Replaced assert with exception in :func:`ast.parse`, when |
| 14838 |
``feature_version`` has an invalid major version. Patch by Shantanu Jain. |
| 14839 |
|
| 14840 |
- gh-77617: Add :mod:`sqlite3` :ref:`command-line interface <sqlite3-cli>`. |
| 14841 |
Patch by Erlend Aasland. |
| 14842 |
|
| 14843 |
- gh-95005: Replace :c:expr:`_PyAccu` with :c:expr:`_PyUnicodeWriter` in |
| 14844 |
JSON encoder and StringIO and remove the :c:expr:`_PyAccu` implementation. |
| 14845 |
|
| 14846 |
- gh-90085: Remove ``-c/--clock`` and ``-t/--time`` CLI options of |
| 14847 |
:mod:`timeit`. The options had been deprecated since Python 3.3 and the |
| 14848 |
functionality was removed in Python 3.7. Patch by Shantanu Jain. |
| 14849 |
|
| 14850 |
- gh-94857: Fix refleak in ``_io.TextIOWrapper.reconfigure``. Patch by Kumar |
| 14851 |
Aditya. |
| 14852 |
|
| 14853 |
- gh-94821: Fix binding of unix socket to empty address on Linux to use an |
| 14854 |
available address from the abstract namespace, instead of "\0". |
| 14855 |
|
| 14856 |
- gh-94736: Fix crash when deallocating an instance of a subclass of |
| 14857 |
``_multiprocessing.SemLock``. Patch by Kumar Aditya. |
| 14858 |
|
| 14859 |
- gh-81620: Add random.binomialvariate(). |
| 14860 |
|
| 14861 |
- gh-74116: Allow :meth:`asyncio.StreamWriter.drain` to be awaited |
| 14862 |
concurrently by multiple tasks. Patch by Kumar Aditya. |
| 14863 |
|
| 14864 |
- gh-87822: When called with ``capture_locals=True``, the :mod:`traceback` |
| 14865 |
module functions swallow exceptions raised from calls to ``repr()`` on |
| 14866 |
local variables of frames. This is in order to prioritize the original |
| 14867 |
exception over rendering errors. An indication of the failure is printed |
| 14868 |
in place of the missing value. (Patch by Simon-Martin Schroeder). |
| 14869 |
|
| 14870 |
- gh-88050: Fix :mod:`asyncio` subprocess transport to kill process cleanly |
| 14871 |
when process is blocked and avoid ``RuntimeError`` when loop is closed. |
| 14872 |
Patch by Kumar Aditya. |
| 14873 |
|
| 14874 |
- gh-94637: :meth:`SSLContext.set_default_verify_paths` now releases the GIL |
| 14875 |
around ``SSL_CTX_set_default_verify_paths`` call. The function call |
| 14876 |
performs I/O and CPU intensive work. |
| 14877 |
|
| 14878 |
- gh-94309: Deprecate aliases :class:`typing.Hashable` and |
| 14879 |
:class:`typing.Sized` |
| 14880 |
|
| 14881 |
- gh-92546: An undocumented ``python -m pprint`` benchmark is moved into |
| 14882 |
``pprint`` suite of pyperformance. Patch by Oleg Iarygin. |
| 14883 |
|
| 14884 |
- gh-94607: Fix subclassing complex generics with type variables in |
| 14885 |
:mod:`typing`. Previously an error message saying ``Some type variables |
| 14886 |
... are not listed in Generic[...]`` was shown. :mod:`typing` no longer |
| 14887 |
populates ``__parameters__`` with the ``__parameters__`` of a Python |
| 14888 |
class. |
| 14889 |
|
| 14890 |
- gh-94619: Remove the long-deprecated ``module_repr()`` from |
| 14891 |
:mod:`importlib`. |
| 14892 |
|
| 14893 |
- gh-93910: The ability to access the other values of an enum on an enum |
| 14894 |
(e.g. ``Color.RED.BLUE``) has been restored in order to fix a performance |
| 14895 |
regression. |
| 14896 |
|
| 14897 |
- gh-93896: Fix :func:`asyncio.run` and |
| 14898 |
:class:`unittest.IsolatedAsyncioTestCase` to always the set event loop as |
| 14899 |
it was done in Python 3.10 and earlier. Patch by Kumar Aditya. |
| 14900 |
|
| 14901 |
- gh-94343: Allow setting the attributes of ``reprlib.Repr`` during object |
| 14902 |
initialization |
| 14903 |
|
| 14904 |
- gh-94382: Port static types of ``_multiprocessing`` module to heap types. |
| 14905 |
Patch by Kumar Aditya. |
| 14906 |
|
| 14907 |
- gh-78724: Fix crash in :class:`struct.Struct` when it was not completely |
| 14908 |
initialized by initializing it in :meth:`~object.__new__`. Patch by Kumar |
| 14909 |
Aditya. |
| 14910 |
|
| 14911 |
- gh-94510: Re-entrant calls to :func:`sys.setprofile` and |
| 14912 |
:func:`sys.settrace` now raise :exc:`RuntimeError`. Patch by Pablo |
| 14913 |
Galindo. |
| 14914 |
|
| 14915 |
- gh-92336: Fix bug where :meth:`linecache.getline` fails on bad files with |
| 14916 |
:exc:`UnicodeDecodeError` or :exc:`SyntaxError`. It now returns an empty |
| 14917 |
string as per the documentation. |
| 14918 |
|
| 14919 |
- gh-94398: Once a :class:`asyncio.TaskGroup` has started shutting down |
| 14920 |
(i.e., at least one task has failed and the task group has started |
| 14921 |
cancelling the remaining tasks), it should not be possible to add new |
| 14922 |
tasks to the task group. |
| 14923 |
|
| 14924 |
- gh-94383: :mod:`xml.etree`: Remove the ``ElementTree.Element.copy()`` |
| 14925 |
method of the pure Python implementation, deprecated in Python 3.10, use |
| 14926 |
the :func:`copy.copy` function instead. The C implementation of |
| 14927 |
:mod:`xml.etree` has no ``copy()`` method, only a ``__copy__()`` method. |
| 14928 |
Patch by Victor Stinner. |
| 14929 |
|
| 14930 |
- gh-94379: :mod:`zipimport`: Remove ``find_loader()`` and ``find_module()`` |
| 14931 |
methods, deprecated in Python 3.10: use the ``find_spec()`` method |
| 14932 |
instead. See :pep:`451` for the rationale. Patch by Victor Stinner. |
| 14933 |
|
| 14934 |
- gh-94352: :func:`shlex.split`: Passing ``None`` for *s* argument now |
| 14935 |
raises an exception, rather than reading :data:`sys.stdin`. The feature |
| 14936 |
was deprecated in Python 3.9. Patch by Victor Stinner. |
| 14937 |
|
| 14938 |
- gh-94318: Strip trailing spaces in :mod:`pydoc` text output. |
| 14939 |
|
| 14940 |
- gh-89988: Fix memory leak in :class:`pickle.Pickler` when looking up |
| 14941 |
:attr:`dispatch_table`. Patch by Kumar Aditya. |
| 14942 |
|
| 14943 |
- gh-90016: Deprecate :mod:`sqlite3` :ref:`default adapters and converters |
| 14944 |
<sqlite3-default-converters>`. Patch by Erlend E. Aasland. |
| 14945 |
|
| 14946 |
- gh-94254: Fixed types of :mod:`struct` module to be immutable. Patch by |
| 14947 |
Kumar Aditya. |
| 14948 |
|
| 14949 |
- gh-93259: Now raise ``ValueError`` when ``None`` or an empty string are |
| 14950 |
passed to ``Distribution.from_name`` (and other callers). |
| 14951 |
|
| 14952 |
- gh-74696: :func:`shutil.make_archive` now passes the *root_dir* argument |
| 14953 |
to custom archivers which support it. |
| 14954 |
|
| 14955 |
- gh-94216: The :mod:`dis` module now has the opcodes for pseudo |
| 14956 |
instructions (those which are used by the compiler during code generation |
| 14957 |
but then removed or replaced by real opcodes before the final bytecode is |
| 14958 |
emitted). |
| 14959 |
|
| 14960 |
- gh-93096: Removed undocumented ``python -m codecs``. Use ``python -m |
| 14961 |
unittest test.test_codecs.EncodedFileTest`` instead. |
| 14962 |
|
| 14963 |
- gh-94207: Made :class:`!_struct.Struct` GC-tracked in order to fix a |
| 14964 |
reference leak in the :mod:`!_struct` module. |
| 14965 |
|
| 14966 |
- gh-93096: Removed undocumented ``-t`` argument of ``python -m base64``. |
| 14967 |
Use ``python -m unittest |
| 14968 |
test.test_base64.LegacyBase64TestCase.test_encodebytes`` instead. |
| 14969 |
|
| 14970 |
- gh-94226: Remove the :func:`locale.format` function, deprecated in Python |
| 14971 |
3.7: use :func:`locale.format_string` instead. Patch by Victor Stinner. |
| 14972 |
|
| 14973 |
- gh-94199: Remove the :func:`ssl.match_hostname` function. The |
| 14974 |
:func:`ssl.match_hostname` was deprecated in Python 3.7. OpenSSL performs |
| 14975 |
hostname matching since Python 3.7, Python no longer uses the |
| 14976 |
:func:`ssl.match_hostname` function. Patch by Victor Stinner. |
| 14977 |
|
| 14978 |
- gh-94214: Document the ``context`` object used in the ``venv.EnvBuilder`` |
| 14979 |
class, and add the new environment's library path to it. |
| 14980 |
|
| 14981 |
- gh-94199: Remove the :func:`ssl.wrap_socket` function, deprecated in |
| 14982 |
Python 3.7: instead, create a :class:`ssl.SSLContext` object and call its |
| 14983 |
:class:`ssl.SSLContext.wrap_socket` method. Any package that still uses |
| 14984 |
:func:`ssl.wrap_socket` is broken and insecure. The function neither sends |
| 14985 |
a SNI TLS extension nor validates server hostname. Code is subject to |
| 14986 |
:cwe:`295` Improper Certificate Validation. Patch by Victor Stinner. |
| 14987 |
|
| 14988 |
- gh-94199: Remove the :func:`ssl.RAND_pseudo_bytes` function, deprecated in |
| 14989 |
Python 3.6: use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. |
| 14990 |
Patch by Victor Stinner. |
| 14991 |
|
| 14992 |
- gh-94199: :mod:`hashlib`: Remove the pure Python implementation of |
| 14993 |
:func:`hashlib.pbkdf2_hmac`, deprecated in Python 3.10. Python 3.10 and |
| 14994 |
newer requires OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides a |
| 14995 |
C implementation of :func:`~hashlib.pbkdf2_hmac` which is faster. Patch by |
| 14996 |
Victor Stinner. |
| 14997 |
|
| 14998 |
- gh-94196: :mod:`gzip`: Remove the ``filename`` attribute of |
| 14999 |
:class:`gzip.GzipFile`, deprecated since Python 2.6, use the |
| 15000 |
:attr:`~gzip.GzipFile.name` attribute instead. In write mode, the |
| 15001 |
``filename`` attribute added ``'.gz'`` file extension if it was not |
| 15002 |
present. Patch by Victor Stinner. |
| 15003 |
|
| 15004 |
- gh-94182: run the :class:`asyncio.PidfdChildWatcher` on the running loop, |
| 15005 |
this allows event loops to run subprocesses when there is no default event |
| 15006 |
loop running on the main thread |
| 15007 |
|
| 15008 |
- gh-94169: Remove ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated |
| 15009 |
in Python 3.10: just use :func:`open` instead. The :func:`open` |
| 15010 |
(:func:`io.open`) function is a built-in function. Since Python 3.10, |
| 15011 |
:func:`!_pyio.open` is also a static method. Patch by Victor Stinner. |
| 15012 |
|
| 15013 |
- gh-91742: Fix :mod:`pdb` crash after jump caused by a null pointer |
| 15014 |
dereference. Patch by Kumar Aditya. |
| 15015 |
|
| 15016 |
- gh-94101: Manual instantiation of :class:`ssl.SSLSession` objects is no |
| 15017 |
longer allowed as it lead to misconfigured instances that crashed the |
| 15018 |
interpreter when attributes where accessed on them. |
| 15019 |
|
| 15020 |
- gh-84753: :func:`inspect.iscoroutinefunction`, |
| 15021 |
:func:`inspect.isgeneratorfunction`, and |
| 15022 |
:func:`inspect.isasyncgenfunction` now properly return ``True`` for |
| 15023 |
duck-typed function-like objects like instances of |
| 15024 |
:class:`unittest.mock.AsyncMock`. |
| 15025 |
|
| 15026 |
This makes :func:`inspect.iscoroutinefunction` consistent with the |
| 15027 |
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK. |
| 15028 |
|
| 15029 |
- gh-94028: Fix a regression in the :mod:`sqlite3` where statement objects |
| 15030 |
were not properly cleared and reset after use in cursor iters. The |
| 15031 |
regression was introduced by PR 27884 in Python 3.11a1. Patch by Erlend E. |
| 15032 |
Aasland. |
| 15033 |
|
| 15034 |
- gh-93973: Add keyword argument ``all_errors`` to |
| 15035 |
``asyncio.create_connection`` so that multiple connection errors can be |
| 15036 |
raised as an ``ExceptionGroup``. |
| 15037 |
|
| 15038 |
- gh-93963: Officially deprecate from ``importlib.abc`` classes moved to |
| 15039 |
``importlib.resources.abc``. |
| 15040 |
|
| 15041 |
- gh-93858: Prevent error when activating venv in nested fish instances. |
| 15042 |
|
| 15043 |
- gh-93820: Pickle :class:`enum.Flag` by name. |
| 15044 |
|
| 15045 |
- gh-93847: Fix repr of enum of generic aliases. |
| 15046 |
|
| 15047 |
- gh-91404: Revert the :mod:`re` memory leak when a match is terminated by a |
| 15048 |
signal or memory allocation failure as the implemented fix caused a major |
| 15049 |
performance regression. |
| 15050 |
|
| 15051 |
- gh-83499: Fix double closing of file description in :mod:`tempfile`. |
| 15052 |
|
| 15053 |
- gh-93820: Fixed a regression when :func:`copy.copy`-ing :class:`enum.Flag` |
| 15054 |
with multiple flag members. |
| 15055 |
|
| 15056 |
- gh-79512: Fixed names and ``__module__`` value of :mod:`weakref` classes |
| 15057 |
:class:`~weakref.ReferenceType`, :class:`~weakref.ProxyType`, |
| 15058 |
:class:`~weakref.CallableProxyType`. It makes them pickleable. |
| 15059 |
|
| 15060 |
- gh-91389: Fix an issue where :mod:`dis` utilities could report missing or |
| 15061 |
incorrect position information in the presence of ``CACHE`` entries. |
| 15062 |
|
| 15063 |
- gh-93626: Set ``__future__.annotations`` to have a ``None`` |
| 15064 |
mandatoryRelease to indicate that it is currently 'TBD'. |
| 15065 |
|
| 15066 |
- gh-90473: Emscripten and WASI have no home directory and cannot provide |
| 15067 |
:pep:`370` user site directory. |
| 15068 |
|
| 15069 |
- gh-90494: :func:`copy.copy` and :func:`copy.deepcopy` now always raise a |
| 15070 |
TypeError if ``__reduce__()`` returns a tuple with length 6 instead of |
| 15071 |
silently ignore the 6th item or produce incorrect result. |
| 15072 |
|
| 15073 |
- gh-90549: Fix a multiprocessing bug where a global named resource (such as |
| 15074 |
a semaphore) could leak when a child process is spawned (as opposed to |
| 15075 |
forked). |
| 15076 |
|
| 15077 |
- gh-93521: Fixed a case where dataclasses would try to add ``__weakref__`` |
| 15078 |
into the ``__slots__`` for a dataclass that specified |
| 15079 |
``weakref_slot=True`` when it was already defined in one of its bases. |
| 15080 |
This resulted in a ``TypeError`` upon the new class being created. |
| 15081 |
|
| 15082 |
- gh-79579: :mod:`sqlite3` now correctly detects DML queries with leading |
| 15083 |
comments. Patch by Erlend E. Aasland. |
| 15084 |
|
| 15085 |
- gh-93421: Update :data:`sqlite3.Cursor.rowcount` when a DML statement has |
| 15086 |
run to completion. This fixes the row count for SQL queries like ``UPDATE |
| 15087 |
... RETURNING``. Patch by Erlend E. Aasland. |
| 15088 |
|
| 15089 |
- gh-93475: Expose ``FICLONE`` and ``FICLONERANGE`` constants in |
| 15090 |
:mod:`fcntl`. Patch by Illia Volochii. |
| 15091 |
|
| 15092 |
- gh-93370: Deprecate :data:`sqlite3.version` and |
| 15093 |
:data:`sqlite3.version_info`. |
| 15094 |
|
| 15095 |
- gh-91810: Suppress writing an XML declaration in open files in |
| 15096 |
``ElementTree.write()`` with ``encoding='unicode'`` and |
| 15097 |
``xml_declaration=None``. |
| 15098 |
|
| 15099 |
- gh-91162: Support splitting of unpacked arbitrary-length tuple over |
| 15100 |
``TypeVar`` and ``TypeVarTuple`` parameters. For example: |
| 15101 |
|
| 15102 |
* ``A[T, *Ts][*tuple[int, ...]]`` -> ``A[int, *tuple[int, ...]]`` |
| 15103 |
* ``A[*Ts, T][*tuple[int, ...]]`` -> ``A[*tuple[int, ...], int]`` |
| 15104 |
|
| 15105 |
- gh-93353: Fix the :func:`importlib.resources.as_file` context manager to |
| 15106 |
remove the temporary file if destroyed late during Python finalization: |
| 15107 |
keep a local reference to the :func:`os.remove` function. Patch by Victor |
| 15108 |
Stinner. |
| 15109 |
|
| 15110 |
- gh-83658: Make :class:`multiprocessing.Pool` raise an exception if |
| 15111 |
``maxtasksperchild`` is not ``None`` or a positive int. |
| 15112 |
|
| 15113 |
- gh-93312: Add :const:`os.PIDFD_NONBLOCK` flag to open a file descriptor |
| 15114 |
for a process with :func:`os.pidfd_open` in non-blocking mode. Patch by |
| 15115 |
Kumar Aditya. |
| 15116 |
|
| 15117 |
- gh-88123: Implement ``Enum.__contains__`` that returns ``True`` or |
| 15118 |
``False`` to replace the deprecated behaviour that would sometimes raise a |
| 15119 |
:exc:`TypeError`. |
| 15120 |
|
| 15121 |
- gh-93297: Make asyncio task groups prevent child tasks from being GCed |
| 15122 |
|
| 15123 |
- gh-85308: Changed :class:`argparse.ArgumentParser` to use |
| 15124 |
:term:`filesystem encoding and error handler` instead of default text |
| 15125 |
encoding to read arguments from file (e.g. ``fromfile_prefix_chars`` |
| 15126 |
option). This change affects Windows; argument file should be encoded with |
| 15127 |
UTF-8 instead of ANSI Codepage. |
| 15128 |
|
| 15129 |
- gh-93156: Accessing the :attr:`pathlib.PurePath.parents` sequence of an |
| 15130 |
absolute path using negative index values produced incorrect results. |
| 15131 |
|
| 15132 |
- gh-93162: Add the ability for :func:`logging.config.dictConfig` to |
| 15133 |
usefully configure :class:`~logging.handlers.QueueHandler` and |
| 15134 |
:class:`~logging.handlers.QueueListener` as a pair, and add |
| 15135 |
:func:`logging.getHandlerByName` and :func:`logging.getHandlerNames` APIs |
| 15136 |
to allow access to handlers by name. |
| 15137 |
|
| 15138 |
- gh-93243: The :mod:`!smtpd` module was removed per the schedule in |
| 15139 |
:pep:`594`. |
| 15140 |
|
| 15141 |
- gh-92886: Replace ``assert`` statements with ``raise AssertionError()`` in |
| 15142 |
:class:`~wsgiref.BaseHandler` so that the tested behaviour is maintained |
| 15143 |
running with optimizations ``(-O)``. |
| 15144 |
|
| 15145 |
- gh-90155: Fix broken :class:`asyncio.Semaphore` when acquire is cancelled. |
| 15146 |
|
| 15147 |
- gh-90817: The :func:`locale.resetlocale` function is deprecated and will |
| 15148 |
be removed in Python 3.13. Use ``locale.setlocale(locale.LC_ALL, "")`` |
| 15149 |
instead. Patch by Victor Stinner. |
| 15150 |
|
| 15151 |
- gh-91513: Added ``taskName`` attribute to :mod:`logging` module for use |
| 15152 |
with :mod:`asyncio` tasks. |
| 15153 |
|
| 15154 |
- gh-74696: :func:`shutil.make_archive` no longer temporarily changes the |
| 15155 |
current working directory during creation of standard ``.zip`` or tar |
| 15156 |
archives. |
| 15157 |
|
| 15158 |
- gh-92728: The :func:`re.template` function and the corresponding |
| 15159 |
:const:`re.TEMPLATE` and :const:`re.T` flags are restored after they were |
| 15160 |
removed in 3.11.0b1, but they are now deprecated, so they might be removed |
| 15161 |
from Python 3.13. |
| 15162 |
|
| 15163 |
- gh-93033: Search in some strings (platform dependent i.e [U+0xFFFF, |
| 15164 |
U+0x0100] on Windows or [U+0xFFFFFFFF, U+0x00010000] on Linux 64-bit) are |
| 15165 |
now up to 10 times faster. |
| 15166 |
|
| 15167 |
- gh-89973: Fix :exc:`re.error` raised in :mod:`fnmatch` if the pattern |
| 15168 |
contains a character range with upper bound lower than lower bound (e.g. |
| 15169 |
``[c-a]``). Now such ranges are interpreted as empty ranges. |
| 15170 |
|
| 15171 |
- gh-93044: No longer convert the database argument of |
| 15172 |
:func:`sqlite3.connect` to bytes before passing it to the factory. |
| 15173 |
|
| 15174 |
- gh-93010: In a very special case, the email package tried to append the |
| 15175 |
nonexistent ``InvalidHeaderError`` to the defect list. It should have been |
| 15176 |
``InvalidHeaderDefect``. |
| 15177 |
|
| 15178 |
- gh-92986: Fix :func:`ast.unparse` when ``ImportFrom.level`` is ``None`` |
| 15179 |
|
| 15180 |
- gh-92932: Now :func:`~dis.dis` and :func:`~dis.get_instructions` handle |
| 15181 |
operand values for instructions prefixed by ``EXTENDED_ARG_QUICK``. Patch |
| 15182 |
by Sam Gross and Donghee Na. |
| 15183 |
|
| 15184 |
- gh-92675: Fix :func:`venv.ensure_directories` to accept |
| 15185 |
:class:`pathlib.Path` arguments in addition to :class:`str` paths. Patch |
| 15186 |
by David Foster. |
| 15187 |
|
| 15188 |
- gh-87901: Removed the ``encoding`` argument from :func:`os.popen` that was |
| 15189 |
added in 3.11b1. |
| 15190 |
|
| 15191 |
- gh-91922: Fix function :func:`sqlite.connect` and the |
| 15192 |
:class:`sqlite.Connection` constructor on non-UTF-8 locales. Also, they |
| 15193 |
now support bytes paths non-decodable with the current FS encoding. |
| 15194 |
|
| 15195 |
- gh-92869: Added :class:`~ctypes.c_time_t` to :mod:`ctypes`, which has the |
| 15196 |
same size as the :c:type:`time_t` type in C. |
| 15197 |
|
| 15198 |
- gh-92839: Fixed crash resulting from calling bisect.insort() or |
| 15199 |
bisect.insort_left() with the key argument not equal to ``None``. |
| 15200 |
|
| 15201 |
- gh-90473: :mod:`subprocess` now fails early on Emscripten and WASI |
| 15202 |
platforms to work around missing :func:`os.pipe` on WASI. |
| 15203 |
|
| 15204 |
- gh-89325: Removed many old deprecated :mod:`unittest` features: |
| 15205 |
:class:`~unittest.TestCase` method aliases, undocumented and broken |
| 15206 |
:class:`~unittest.TestCase` method ``assertDictContainsSubset``, |
| 15207 |
undocumented :meth:`TestLoader.loadTestsFromModule |
| 15208 |
<unittest.TestLoader.loadTestsFromModule>` parameter *use_load_tests*, and |
| 15209 |
an underscored alias of the :class:`~unittest.TextTestResult` class. |
| 15210 |
|
| 15211 |
- gh-92734: Allow multi-element reprs emitted by :mod:`reprlib` to be |
| 15212 |
pretty-printed using configurable indentation. |
| 15213 |
|
| 15214 |
- gh-92671: Fixed :func:`ast.unparse` for empty tuples in the assignment |
| 15215 |
target context. |
| 15216 |
|
| 15217 |
- gh-91581: :meth:`~datetime.datetime.utcfromtimestamp` no longer attempts |
| 15218 |
to resolve ``fold`` in the pure Python implementation, since the fold is |
| 15219 |
never 1 in UTC. In addition to being slightly faster in the common case, |
| 15220 |
this also prevents some errors when the timestamp is close to |
| 15221 |
:attr:`datetime.min <datetime.datetime.min>`. Patch by Paul Ganssle. |
| 15222 |
|
| 15223 |
- gh-86388: Removed randrange() functionality deprecated since Python 3.10. |
| 15224 |
Formerly, randrange(10.0) losslessly converted to randrange(10). Now, it |
| 15225 |
raises a TypeError. Also, the exception raised for non-integral values |
| 15226 |
such as randrange(10.5) or randrange('10') has been changed from |
| 15227 |
ValueError to TypeError. |
| 15228 |
|
| 15229 |
- gh-90385: Add :meth:`pathlib.Path.walk` as an alternative to |
| 15230 |
:func:`os.walk`. |
| 15231 |
|
| 15232 |
- gh-92550: Fix :meth:`pathlib.Path.rglob` for empty pattern. |
| 15233 |
|
| 15234 |
- gh-92591: Allow :mod:`logging` filters to return a |
| 15235 |
:class:`logging.LogRecord` instance so that filters attached to |
| 15236 |
:class:`logging.Handler`\ s can enrich records without side effects on |
| 15237 |
other handlers. |
| 15238 |
|
| 15239 |
- gh-92445: Fix a bug in :mod:`argparse` where ``nargs="*"`` would raise an |
| 15240 |
error instead of returning an empty list when 0 arguments were supplied if |
| 15241 |
choice was also defined in ``parser.add_argument``. |
| 15242 |
|
| 15243 |
- gh-92547: Remove undocumented :mod:`sqlite3` features deprecated in Python |
| 15244 |
3.10: |
| 15245 |
|
| 15246 |
* ``sqlite3.enable_shared_cache()`` |
| 15247 |
* ``sqlite3.OptimizedUnicode`` |
| 15248 |
|
| 15249 |
Patch by Erlend E. Aasland. |
| 15250 |
|
| 15251 |
- gh-92530: Fix an issue that occurred after interrupting |
| 15252 |
:func:`threading.Condition.notify`. |
| 15253 |
|
| 15254 |
- gh-92531: The statistics.median_grouped() function now always return a |
| 15255 |
float. Formerly, it did not convert the input type when for sequences of |
| 15256 |
length one. |
| 15257 |
|
| 15258 |
- gh-84131: The :class:`pathlib.Path` deprecated method ``link_to`` has been |
| 15259 |
removed. Use 3.10's :meth:`~pathlib.Path.hardlink_to` method instead as |
| 15260 |
its semantics are consistent with that of |
| 15261 |
:meth:`~pathlib.Path.symlink_to`. |
| 15262 |
|
| 15263 |
- gh-89336: Removed :mod:`configparser` module APIs: the |
| 15264 |
``SafeConfigParser`` class alias, the ``ParsingError.filename`` property |
| 15265 |
and parameter, and the ``ConfigParser.readfp`` method, all of which were |
| 15266 |
deprecated since Python 3.2. |
| 15267 |
|
| 15268 |
- gh-92391: Add :meth:`~object.__class_getitem__` to |
| 15269 |
:class:`csv.DictReader` and :class:`csv.DictWriter`, allowing them to be |
| 15270 |
parameterized at runtime. Patch by Marc Mueller. |
| 15271 |
|
| 15272 |
- gh-91968: Add ``SO_RTABLE`` and ``SO_USER_COOKIE`` constants to |
| 15273 |
:mod:`socket`. |
| 15274 |
|
| 15275 |
- gh-91810: :class:`~xml.etree.ElementTree.ElementTree` method |
| 15276 |
:meth:`~xml.etree.ElementTree.ElementTree.write` and function |
| 15277 |
:func:`~xml.etree.ElementTree.tostring` now use the text file's encoding |
| 15278 |
("UTF-8" if not available) instead of locale encoding in XML declaration |
| 15279 |
when ``encoding="unicode"`` is specified. |
| 15280 |
|
| 15281 |
- gh-81790: :func:`os.path.splitdrive` now understands DOS device paths with |
| 15282 |
UNC links (beginning ``\\?\UNC\``). Contributed by Barney Gale. |
| 15283 |
|
| 15284 |
- gh-91760: Apply more strict rules for numerical group references and group |
| 15285 |
names in regular expressions. Only sequence of ASCII digits is now |
| 15286 |
accepted as a numerical reference. The group name in bytes patterns and |
| 15287 |
replacement strings can now only contain ASCII letters and digits and |
| 15288 |
underscore. |
| 15289 |
|
| 15290 |
- gh-90622: Worker processes for |
| 15291 |
:class:`concurrent.futures.ProcessPoolExecutor` are no longer spawned on |
| 15292 |
demand (a feature added in 3.9) when the multiprocessing context start |
| 15293 |
method is ``"fork"`` as that can lead to deadlocks in the child processes |
| 15294 |
due to a fork happening while threads are running. |
| 15295 |
|
| 15296 |
- gh-91577: Move imports in :class:`~multiprocessing.SharedMemory` methods |
| 15297 |
to module level so that they can be executed late in python finalization. |
| 15298 |
|
| 15299 |
- gh-91581: Remove an unhandled error case in the C implementation of calls |
| 15300 |
to :meth:`datetime.fromtimestamp <datetime.datetime.fromtimestamp>` with |
| 15301 |
no time zone (i.e. getting a local time from an epoch timestamp). This |
| 15302 |
should have no user-facing effect other than giving a possibly more |
| 15303 |
accurate error message when called with timestamps that fall on |
| 15304 |
10000-01-01 in the local time. Patch by Paul Ganssle. |
| 15305 |
|
| 15306 |
- gh-91539: Improve performance of ``urllib.request.getproxies_environment`` |
| 15307 |
when there are many environment variables |
| 15308 |
|
| 15309 |
- gh-91524: Speed up the regular expression substitution (functions |
| 15310 |
:func:`re.sub` and :func:`re.subn` and corresponding :class:`re.Pattern` |
| 15311 |
methods) for replacement strings containing group references by 2--3 |
| 15312 |
times. |
| 15313 |
|
| 15314 |
- gh-91447: Fix findtext in the xml module to only give an empty string when |
| 15315 |
the text attribute is set to ``None``. |
| 15316 |
|
| 15317 |
- gh-91456: Deprecate current default auto() behavior: In 3.13 the default |
| 15318 |
will be for for auto() to always return the largest member value |
| 15319 |
incremented by 1, and to raise if incompatible value types are used. |
| 15320 |
|
| 15321 |
- bpo-47231: Fixed an issue with inconsistent trailing slashes in tarfile |
| 15322 |
longname directories. |
| 15323 |
|
| 15324 |
- bpo-39064: :class:`zipfile.ZipFile` now raises :exc:`zipfile.BadZipFile` |
| 15325 |
instead of ``ValueError`` when reading a corrupt zip file in which the |
| 15326 |
central directory offset is negative. |
| 15327 |
|
| 15328 |
- bpo-41287: Fix handling of the ``doc`` argument in subclasses of |
| 15329 |
:func:`property`. |
| 15330 |
|
| 15331 |
- gh-90005: :mod:`ctypes` dependency ``libffi`` is now detected with |
| 15332 |
``pkg-config``. |
| 15333 |
|
| 15334 |
- bpo-32547: The constructors for :class:`~csv.DictWriter` and |
| 15335 |
:class:`~csv.DictReader` now coerce the ``fieldnames`` argument to a |
| 15336 |
:class:`list` if it is an iterator. |
| 15337 |
|
| 15338 |
- bpo-35540: Fix :func:`dataclasses.asdict` crash when |
| 15339 |
:class:`collections.defaultdict` is present in the attributes. |
| 15340 |
|
| 15341 |
- bpo-47063: Add an index_pages parameter to support using non-default index |
| 15342 |
page names. |
| 15343 |
|
| 15344 |
- bpo-47025: Drop support for :class:`bytes` on :data:`sys.path`. |
| 15345 |
|
| 15346 |
- bpo-46951: Order the contents of zipapp archives, to make builds more |
| 15347 |
reproducible. |
| 15348 |
|
| 15349 |
- bpo-42777: Implement :meth:`pathlib.Path.is_mount` for Windows paths. |
| 15350 |
|
| 15351 |
- bpo-46755: In :class:`QueueHandler`, clear ``stack_info`` from |
| 15352 |
:class:`LogRecord` to prevent stack trace from being written twice. |
| 15353 |
|
| 15354 |
- bpo-45393: Fix the formatting for ``await x`` and ``not x`` in the |
| 15355 |
operator precedence table when using the :func:`help` system. |
| 15356 |
|
| 15357 |
- bpo-46642: Improve error message when trying to subclass an instance of |
| 15358 |
:data:`typing.TypeVar`, :data:`typing.ParamSpec`, |
| 15359 |
:data:`typing.TypeVarTuple`, etc. Based on patch by Gregory Beauregard. |
| 15360 |
|
| 15361 |
- bpo-46364: Restrict use of sockets instead of pipes for stdin of |
| 15362 |
subprocesses created by :mod:`asyncio` to AIX platform only. |
| 15363 |
|
| 15364 |
- bpo-28249: Set :attr:`doctest.DocTest.lineno` to ``None`` when an object |
| 15365 |
does not have :attr:`~definition.__doc__`. |
| 15366 |
|
| 15367 |
- bpo-46197: Fix :mod:`ensurepip` environment isolation for subprocess |
| 15368 |
running ``pip``. |
| 15369 |
|
| 15370 |
- bpo-45924: Fix :mod:`asyncio` incorrect traceback when future's exception |
| 15371 |
is raised multiple times. Patch by Kumar Aditya. |
| 15372 |
|
| 15373 |
- bpo-45046: Add support of context managers in :mod:`unittest`: methods |
| 15374 |
:meth:`~unittest.TestCase.enterContext` and |
| 15375 |
:meth:`~unittest.TestCase.enterClassContext` of class |
| 15376 |
:class:`~unittest.TestCase`, method |
| 15377 |
:meth:`~unittest.IsolatedAsyncioTestCase.enterAsyncContext` of class |
| 15378 |
:class:`~unittest.IsolatedAsyncioTestCase` and function |
| 15379 |
:func:`unittest.enterModuleContext`. |
| 15380 |
|
| 15381 |
- bpo-44173: Enable fast seeking of uncompressed unencrypted |
| 15382 |
:class:`zipfile.ZipExtFile` |
| 15383 |
|
| 15384 |
- bpo-42627: Fix incorrect parsing of Windows registry proxy settings |
| 15385 |
|
| 15386 |
- bpo-42047: Add :func:`threading.get_native_id` support for DragonFly BSD. |
| 15387 |
Patch by David Carlier. |
| 15388 |
|
| 15389 |
- bpo-14243: The :class:`tempfile.NamedTemporaryFile` function has a new |
| 15390 |
optional parameter *delete_on_close* |
| 15391 |
|
| 15392 |
- bpo-41246: Give the same callback function for when the overlapped |
| 15393 |
operation is done to the functions ``recv``, ``recv_into``, ``recvfrom``, |
| 15394 |
``sendto``, ``send`` and ``sendfile`` inside ``IocpProactor``. |
| 15395 |
|
| 15396 |
- bpo-39264: Fixed :meth:`collections.UserDict.get` to not call |
| 15397 |
:meth:`~object.__missing__` when a value is not found. This matches the |
| 15398 |
behavior of :class:`dict`. Patch by Bar Harel. |
| 15399 |
|
| 15400 |
- bpo-38693: :mod:`importlib` now uses f-strings internally instead of |
| 15401 |
``str.format``. |
| 15402 |
|
| 15403 |
- bpo-38267: Add *timeout* parameter to |
| 15404 |
:meth:`asyncio.loop.shutdown_default_executor`. The default value is |
| 15405 |
``None``, which means the executor will be given an unlimited amount of |
| 15406 |
time. When called from :class:`asyncio.Runner` or :func:`asyncio.run`, the |
| 15407 |
default timeout is 5 minutes. |
| 15408 |
|
| 15409 |
- bpo-34828: :meth:`sqlite3.Connection.iterdump` now handles databases that |
| 15410 |
use ``AUTOINCREMENT`` in one or more tables. |
| 15411 |
|
| 15412 |
- bpo-32990: Support reading wave files with the ``WAVE_FORMAT_EXTENSIBLE`` |
| 15413 |
format in the :mod:`wave` module. |
| 15414 |
|
| 15415 |
- bpo-26253: Allow adjustable compression level for tarfile streams in |
| 15416 |
:func:`tarfile.open`. |
| 15417 |
|
| 15418 |
Documentation |
| 15419 |
------------- |
| 15420 |
|
| 15421 |
- gh-85525: Remove extra row |
| 15422 |
|
| 15423 |
- gh-86404: Deprecated tools ``make suspicious`` and ``rstlint.py`` are now |
| 15424 |
removed. They have been replaced by :pypi:`sphinx-lint`. |
| 15425 |
|
| 15426 |
- gh-97741: Fix ``!`` in c domain ref target syntax via a ``conf.py`` patch, |
| 15427 |
so it works as intended to disable ref target resolution. |
| 15428 |
|
| 15429 |
- gh-96432: Fraction literals now support whitespace around the forward |
| 15430 |
slash, ``Fraction('2 / 3')``. |
| 15431 |
|
| 15432 |
- gh-96098: Improve discoverability of the higher level concurrent.futures |
| 15433 |
module by providing clearer links from the lower level threading and |
| 15434 |
multiprocessing modules. |
| 15435 |
|
| 15436 |
- gh-95957: What's New 3.11 now has instructions for how to provide compiler |
| 15437 |
and linker flags for Tcl/Tk and OpenSSL on RHEL 7 and CentOS 7. |
| 15438 |
|
| 15439 |
- gh-95588: Clarified the conflicting advice given in the :mod:`ast` |
| 15440 |
documentation about :func:`ast.literal_eval` being "safe" for use on |
| 15441 |
untrusted input while at the same time warning that it can crash the |
| 15442 |
process. The latter statement is true and is deemed unfixable without a |
| 15443 |
large amount of work unsuitable for a bugfix. So we keep the warning and |
| 15444 |
no longer claim that ``literal_eval`` is safe. |
| 15445 |
|
| 15446 |
- gh-91207: Fix stylesheet not working in Windows CHM htmlhelp docs and add |
| 15447 |
warning that they are deprecated. Contributed by C.A.M. Gerlach. |
| 15448 |
|
| 15449 |
- gh-95454: Replaced incorrectly written true/false values in documentation. |
| 15450 |
Patch by Robert O'Shea |
| 15451 |
|
| 15452 |
- gh-95451: Update library documentation with :ref:`availability information |
| 15453 |
<wasm-availability>` on WebAssembly platforms ``wasm32-emscripten`` and |
| 15454 |
``wasm32-wasi``. |
| 15455 |
|
| 15456 |
- gh-95415: Use consistent syntax for platform availability. The directive |
| 15457 |
now supports a content body and emits a warning when it encounters an |
| 15458 |
unknown platform. |
| 15459 |
|
| 15460 |
- gh-94321: Document the :pep:`246` style protocol type |
| 15461 |
:class:`sqlite3.PrepareProtocol`. |
| 15462 |
|
| 15463 |
- gh-86128: Document a limitation in ThreadPoolExecutor where its exit |
| 15464 |
handler is executed before any handlers in atexit. |
| 15465 |
|
| 15466 |
- gh-61162: Clarify :mod:`sqlite3` behavior when |
| 15467 |
:ref:`sqlite3-connection-context-manager`. |
| 15468 |
|
| 15469 |
- gh-87260: Align :mod:`sqlite3` argument specs with the actual |
| 15470 |
implementation. |
| 15471 |
|
| 15472 |
- gh-86986: The minimum Sphinx version required to build the documentation |
| 15473 |
is now 3.2. |
| 15474 |
|
| 15475 |
- gh-88831: Augmented documentation of asyncio.create_task(). Clarified the |
| 15476 |
need to keep strong references to tasks and added a code snippet detailing |
| 15477 |
how to do this. |
| 15478 |
|
| 15479 |
- gh-86438: Clarify that :option:`-W` and :envvar:`PYTHONWARNINGS` are |
| 15480 |
matched literally and case-insensitively, rather than as regular |
| 15481 |
expressions, in :mod:`warnings`. |
| 15482 |
|
| 15483 |
- gh-93031: Update tutorial introduction output to use 3.10+ SyntaxError |
| 15484 |
invalid range. |
| 15485 |
|
| 15486 |
- gh-92240: Added release dates for "What's New in Python 3.X" for 3.0, 3.1, |
| 15487 |
3.2, 3.8 and 3.10 |
| 15488 |
|
| 15489 |
- bpo-47161: Document that :class:`pathlib.PurePath` does not collapse |
| 15490 |
initial double slashes because they denote UNC paths. |
| 15491 |
|
| 15492 |
- bpo-40838: Document that :func:`inspect.getdoc`, |
| 15493 |
:func:`inspect.getmodule`, and :func:`inspect.getsourcefile` might return |
| 15494 |
``None``. |
| 15495 |
|
| 15496 |
- bpo-43689: The ``Differ`` documentation now also mentions other whitespace |
| 15497 |
characters, which make it harder to understand the diff output. |
| 15498 |
|
| 15499 |
- bpo-38056: Overhaul the :ref:`error-handlers` documentation in |
| 15500 |
:mod:`codecs`. |
| 15501 |
|
| 15502 |
- bpo-13553: Document tkinter.Tk args. |
| 15503 |
|
| 15504 |
Tests |
| 15505 |
----- |
| 15506 |
|
| 15507 |
- gh-95027: On Windows, when the Python test suite is run with the ``-jN`` |
| 15508 |
option, the ANSI code page is now used as the encoding for the stdout |
| 15509 |
temporary file, rather than using UTF-8 which can lead to decoding errors. |
| 15510 |
Patch by Victor Stinner. |
| 15511 |
|
| 15512 |
- gh-96624: Fixed the failure of repeated runs of ``test.test_unittest`` |
| 15513 |
caused by side effects in ``test_dotted_but_module_not_loaded``. |
| 15514 |
|
| 15515 |
- gh-95243: Mitigate the inherent race condition from using |
| 15516 |
find_unused_port() in testSockName() by trying to find an unused port a |
| 15517 |
few times before failing. Patch by Ross Burton. |
| 15518 |
|
| 15519 |
- gh-95573: :source:`Lib/test/test_asyncio/test_ssl.py` exposed a bug in the |
| 15520 |
macOS kernel where intense concurrent load on non-blocking sockets |
| 15521 |
occasionally causes :const:`errno.ENOBUFS` ("No buffer space available") |
| 15522 |
to be emitted. FB11063974 filed with Apple, in the mean time as a |
| 15523 |
workaround buffer size used in tests on macOS is decreased to avoid |
| 15524 |
intermittent failures. Patch by Fantix King. |
| 15525 |
|
| 15526 |
- gh-95280: Fix problem with ``test_ssl`` ``test_get_ciphers`` on systems |
| 15527 |
that require perfect forward secrecy (PFS) ciphers. |
| 15528 |
|
| 15529 |
- gh-95212: Make multiprocessing test case ``test_shared_memory_recreate`` |
| 15530 |
parallel-safe. |
| 15531 |
|
| 15532 |
- gh-95218: Move tests for importlib.resources into |
| 15533 |
test_importlib.resources. |
| 15534 |
|
| 15535 |
- gh-93963: Updated tests to use preferred location for |
| 15536 |
``importlib.resources`` ABCs. |
| 15537 |
|
| 15538 |
- gh-94675: Add a regression test for :mod:`re` exponentional slowdown when |
| 15539 |
using rjsmin. |
| 15540 |
|
| 15541 |
- gh-91330: Added more tests for :mod:`dataclasses` to cover behavior with |
| 15542 |
data descriptor-based fields. |
| 15543 |
|
| 15544 |
- gh-94208: ``test_ssl`` is now checking for supported TLS version and |
| 15545 |
protocols in more tests. |
| 15546 |
|
| 15547 |
- gh-94315: Tests now check for DAC override capability instead of relying |
| 15548 |
on :func:`os.geteuid`. |
| 15549 |
|
| 15550 |
- gh-54781: Rename test_tk to test_tkinter, and rename test_ttk_guionly to |
| 15551 |
test_ttk. Patch by Victor Stinner. |
| 15552 |
|
| 15553 |
- gh-93839: Move ``Lib/ctypes/test/`` to ``Lib/test/test_ctypes/``. Patch by |
| 15554 |
Victor Stinner. |
| 15555 |
|
| 15556 |
- gh-93951: In test_bdb.StateTestCase.test_skip, avoid including auxiliary |
| 15557 |
importers. |
| 15558 |
|
| 15559 |
- gh-93957: Provide nicer error reporting from subprocesses in |
| 15560 |
test_venv.EnsurePipTest.test_with_pip. |
| 15561 |
|
| 15562 |
- gh-93884: Add test cases for :c:func:`PyNumber_ToBase` that take a large |
| 15563 |
number or a non-int object as parameter. |
| 15564 |
|
| 15565 |
- gh-93852: test_asyncio, test_logging, test_socket and test_socketserver |
| 15566 |
now create AF_UNIX domains in the current directory to no longer fail with |
| 15567 |
``OSError("AF_UNIX path too long")`` if the temporary directory (the |
| 15568 |
:envvar:`TMPDIR` environment variable) is too long. Patch by Victor |
| 15569 |
Stinner. |
| 15570 |
|
| 15571 |
- gh-93353: regrtest now checks if a test leaks temporary files or |
| 15572 |
directories if run with -jN option. Patch by Victor Stinner. |
| 15573 |
|
| 15574 |
- gh-84461: ``run_tests.py`` now handles cross compiling env vars correctly |
| 15575 |
and pass ``HOSTRUNNER`` to regression tests. |
| 15576 |
|
| 15577 |
- gh-93616: ``test_modulefinder`` now creates a temporary directory in |
| 15578 |
``ModuleFinderTest.setUp()`` instead of module scope. |
| 15579 |
|
| 15580 |
- gh-93575: Fix issue with test_unicode test_raiseMemError. The test case |
| 15581 |
now use ``test.support.calcobjsize`` to calculate size of PyUnicode |
| 15582 |
structs. :func:`sys.getsizeof` may return different size when string has |
| 15583 |
UTF-8 memory. |
| 15584 |
|
| 15585 |
- gh-90473: WASI does not have a ``chmod(2)`` syscall. :func:`os.chmod` is |
| 15586 |
now a dummy function on WASI. Skip all tests that depend on working |
| 15587 |
:func:`os.chmod`. |
| 15588 |
|
| 15589 |
- gh-90473: Skip tests on WASI that require symlinks with absolute paths. |
| 15590 |
|
| 15591 |
- gh-57539: Increase calendar test coverage for |
| 15592 |
:meth:`calendar.LocaleTextCalendar.formatweekday`. |
| 15593 |
|
| 15594 |
- gh-90473: Skip symlink tests on WASI. wasmtime uses ``openat2(2)`` with |
| 15595 |
``RESOLVE_BENEATH`` flag, which prevents symlinks with absolute paths. |
| 15596 |
|
| 15597 |
- gh-89858: Fix ``test_embed`` for out-of-tree builds. Patch by Kumar |
| 15598 |
Aditya. |
| 15599 |
|
| 15600 |
- gh-92886: Fixing tests that fail when running with optimizations (``-O``) |
| 15601 |
in ``test_imaplib.py``. |
| 15602 |
|
| 15603 |
- gh-92886: Fixing tests that fail when running with optimizations (``-O``) |
| 15604 |
in ``test_zipimport.py`` |
| 15605 |
|
| 15606 |
- gh-92886: Fixing tests that fail when running with optimizations (``-O``) |
| 15607 |
in ``test_py_compile.py`` |
| 15608 |
|
| 15609 |
- gh-92886: Fixing tests that fail when running with optimizations (``-O``) |
| 15610 |
in ``test_sys_settrace.py``. |
| 15611 |
|
| 15612 |
- gh-92886: Fixing tests that fail when running with optimizations (``-O``) |
| 15613 |
in ``_test_multiprocessing.py`` |
| 15614 |
|
| 15615 |
- gh-92670: Skip ``test_shutil.TestCopy.test_copyfile_nonexistent_dir`` test |
| 15616 |
on AIX as the test uses a trailing slash to force the OS consider the path |
| 15617 |
as a directory, but on AIX the trailing slash has no effect and is |
| 15618 |
considered as a file. |
| 15619 |
|
| 15620 |
- gh-92514: Remove unused ``test.support.BasicTestRunner``. Patch by Jelle |
| 15621 |
Zijlstra. |
| 15622 |
|
| 15623 |
- bpo-47016: Create a GitHub Actions workflow for verifying bundled pip and |
| 15624 |
setuptools. Patch by Illia Volochii and Adam Turner. |
| 15625 |
|
| 15626 |
Build |
| 15627 |
----- |
| 15628 |
|
| 15629 |
- gh-96761: Fix the build process of clang compiler for |
| 15630 |
:program:`_bootstrap_python` if LTO optimization is applied. Patch by |
| 15631 |
Matthias Görgens and Donghee Na. |
| 15632 |
|
| 15633 |
- gh-96883: ``wasm32-emscripten`` builds for browsers now include |
| 15634 |
:mod:`concurrent.futures` for :mod:`asyncio` and :mod:`unittest.mock`. |
| 15635 |
|
| 15636 |
- gh-85936: CPython now uses the ThinLTO option as the default policy if the |
| 15637 |
Clang compiler accepts the flag. Patch by Donghee Na. |
| 15638 |
|
| 15639 |
- gh-96729: Ensure that Windows releases built with |
| 15640 |
``Tools\msi\buildrelease.bat`` are upgradable to and from official Python |
| 15641 |
releases. |
| 15642 |
|
| 15643 |
- gh-96269: Shared module targets now depend on new ``MODULE_DEPS`` |
| 15644 |
variable, which includes ``EXPORTSYMS``. This fixes a build order issue on |
| 15645 |
unsupported AIX platform. |
| 15646 |
|
| 15647 |
- gh-84461: ``wasm32-emscripten`` platform no longer builds :mod:`resource` |
| 15648 |
module, :func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. |
| 15649 |
The APIs are stubs and not functional. |
| 15650 |
|
| 15651 |
- gh-95973: Add a new ``--with-dsymutil`` configure option to link debug |
| 15652 |
information in macOS. Patch by Pablo Galindo. |
| 15653 |
|
| 15654 |
- gh-90536: Use the BOLT post-link optimizer to improve performance, |
| 15655 |
particularly on medium-to-large applications. |
| 15656 |
|
| 15657 |
- gh-93744: Remove the ``configure --with-cxx-main`` build option: it didn't |
| 15658 |
work for many years. Remove the ``MAINCC`` variable from ``configure`` and |
| 15659 |
``Makefile``. Patch by Victor Stinner. |
| 15660 |
|
| 15661 |
- gh-94801: Fix a regression in ``configure`` script that caused some header |
| 15662 |
checks to ignore custom ``CPPFLAGS``. The regression was introduced in |
| 15663 |
:gh:`94802`. |
| 15664 |
|
| 15665 |
- gh-95145: wasm32-wasi builds no longer depend on WASIX's pthread stubs. |
| 15666 |
Python now has its own stubbed pthread API. |
| 15667 |
|
| 15668 |
- gh-95174: Python now detects missing ``dup`` function in WASI and works |
| 15669 |
around some missing :mod:`errno`, :mod:`select`, and :mod:`socket` |
| 15670 |
constants. |
| 15671 |
|
| 15672 |
- gh-95174: Python now skips missing :mod:`socket` functions and methods on |
| 15673 |
WASI. WASI can only create sockets from existing fd / accept and has no |
| 15674 |
netdb. |
| 15675 |
|
| 15676 |
- gh-95085: Platforms ``wasm32-unknown-emscripten`` and |
| 15677 |
``wasm32-unknown-wasi`` have been promoted to :pep:`11` tier 3 platform |
| 15678 |
support. |
| 15679 |
|
| 15680 |
- gh-94847: Fixed ``_decimal`` module build issue on GCC when compiling with |
| 15681 |
LTO and pydebug. Debug builds no longer force inlining of functions. |
| 15682 |
|
| 15683 |
- gh-94841: Fix the possible performance regression of |
| 15684 |
:c:func:`PyObject_Free` compiled with MSVC version 1932. |
| 15685 |
|
| 15686 |
- gh-94801: ``configure`` now uses custom flags like ``ZLIB_CFLAGS`` and |
| 15687 |
``ZLIB_LIBS`` when searching for headers and libraries. |
| 15688 |
|
| 15689 |
- gh-94773: ``deepfreeze.py`` now supports code object with frozensets that |
| 15690 |
contain incompatible, unsortable types. |
| 15691 |
|
| 15692 |
- gh-94682: Build and test with OpenSSL 1.1.1q |
| 15693 |
|
| 15694 |
- gh-90005: Dependencies of :mod:`readline` and :mod:`curses` module are now |
| 15695 |
detected in ``configure`` script with ``pkg-config``. Only ``ncurses`` / |
| 15696 |
``ncursesw`` are detected automatically. The old ``curses`` library is not |
| 15697 |
configured automatically. Workaround for missing ``termcap`` or ``tinfo`` |
| 15698 |
library has been removed. |
| 15699 |
|
| 15700 |
- gh-90005: Fix building ``_ctypes`` extension without ``pkg-config``. |
| 15701 |
|
| 15702 |
- gh-90005: ``_dbm`` module dependencies are now detected by configure. |
| 15703 |
|
| 15704 |
- gh-94404: ``makesetup`` now works around an issue with sed on macOS and |
| 15705 |
uses correct CFLAGS for object files that end up in a shared extension. |
| 15706 |
Module CFLAGS are used before PY_STDMODULE_CFLAGS to avoid clashes with |
| 15707 |
system headers. |
| 15708 |
|
| 15709 |
- gh-93939: C extension modules are now built by ``configure`` and ``make`` |
| 15710 |
instead of ``distutils`` and ``setup.py``. |
| 15711 |
|
| 15712 |
- gh-93939: The ``2to3``, ``idle``, and ``pydoc`` scripts are now generated |
| 15713 |
and installed by ``Makefile`` instead of ``setup.py``. |
| 15714 |
|
| 15715 |
- gh-94280: Updated pegen regeneration script on Windows to find and use |
| 15716 |
Python 3.9 or higher. Prior to this, pegen regeneration already required |
| 15717 |
3.9 or higher, but the script may have used lower versions of Python. |
| 15718 |
|
| 15719 |
- gh-93584: Address race condition in ``Makefile`` when installing a PGO |
| 15720 |
build. All ``test`` and ``install`` targets now depend on ``all`` target. |
| 15721 |
|
| 15722 |
- gh-93491: ``configure`` now detects and reports :pep:`11` support tiers. |
| 15723 |
|
| 15724 |
- gh-69093: Fix ``Modules/Setup.stdlib.in`` rule for ``_sqlite3`` extension. |
| 15725 |
|
| 15726 |
- gh-93207: ``va_start()`` with two parameters, like ``va_start(args, |
| 15727 |
format),`` is now required to build Python. ``va_start()`` is no longer |
| 15728 |
called with a single parameter. Patch by Kumar Aditya. |
| 15729 |
|
| 15730 |
- gh-93202: Python now always use the ``%zu`` and ``%zd`` printf formats to |
| 15731 |
format a :c:type:`size_t` or ``Py_ssize_t`` number. Building Python 3.12 |
| 15732 |
requires a C11 compiler, so these printf formats are now always supported. |
| 15733 |
Patch by Victor Stinner. |
| 15734 |
|
| 15735 |
- gh-90473: Disable pymalloc and increase stack size on ``wasm32-wasi``. |
| 15736 |
|
| 15737 |
- bpo-34449: Drop invalid compiler switch ``-fPIC`` for HP aCC on HP-UX. |
| 15738 |
Patch by Michael Osipov. |
| 15739 |
|
| 15740 |
Windows |
| 15741 |
------- |
| 15742 |
|
| 15743 |
- gh-98360: Fixes :mod:`multiprocessing` spawning child processes on Windows |
| 15744 |
from a virtual environment to ensure that child processes that also use |
| 15745 |
:mod:`multiprocessing` to spawn more children will recognize that they are |
| 15746 |
in a virtual environment. |
| 15747 |
|
| 15748 |
- gh-98414: Fix :file:`py.exe` launcher handling of :samp:`-V:{<company>}/` |
| 15749 |
option when default preferences have been set in environment variables or |
| 15750 |
configuration files. |
| 15751 |
|
| 15752 |
- gh-97728: Fix possible crashes caused by the use of uninitialized |
| 15753 |
variables when pass invalid arguments in :func:`os.system` on Windows and |
| 15754 |
in Windows-specific modules (like ``winreg``). |
| 15755 |
|
| 15756 |
- gh-90989: Made :ref:`launcher` install per-user by default (unless an all |
| 15757 |
users install already exists), and clarify some text in the installer. |
| 15758 |
|
| 15759 |
- gh-97649: The ``Tools`` directory is no longer installed on Windows |
| 15760 |
|
| 15761 |
- gh-96965: Update libffi to 3.4.3 |
| 15762 |
|
| 15763 |
- gh-96577: Fixes a potential buffer overrun in :mod:`!msilib`. |
| 15764 |
|
| 15765 |
- gh-96559: Fixes the Windows launcher not using the compatible |
| 15766 |
interpretation of default tags found in configuration files when no tag |
| 15767 |
was passed to the command. |
| 15768 |
|
| 15769 |
- gh-94781: Fix :file:`pcbuild.proj` to clean previous instances of output |
| 15770 |
files in ``Python\deepfreeze`` and ``Python\frozen_modules`` directories |
| 15771 |
on Windows. Patch by Charlie Zhao. |
| 15772 |
|
| 15773 |
- gh-89545: Updates :mod:`platform` code getting the Windows version to use |
| 15774 |
native Windows Management Instrumentation (WMI) queries to determine OS |
| 15775 |
version, type, and architecture. |
| 15776 |
|
| 15777 |
- gh-95733: Make certain requirements of the Windows Store package optional |
| 15778 |
to allow installing on earlier updates of Windows. |
| 15779 |
|
| 15780 |
- gh-95656: Enable the :meth:`~sqlite3.Connection.enable_load_extension` |
| 15781 |
:mod:`sqlite3` API. |
| 15782 |
|
| 15783 |
- gh-95587: Fixes some issues where the Windows installer would incorrectly |
| 15784 |
detect certain features of an existing install when upgrading. |
| 15785 |
|
| 15786 |
- gh-94399: Restores the behaviour of :ref:`launcher` for ``/usr/bin/env`` |
| 15787 |
shebang lines, which will now search :envvar:`PATH` for an executable |
| 15788 |
matching the given command. If none is found, the usual search process is |
| 15789 |
used. |
| 15790 |
|
| 15791 |
- gh-95445: Fixes the unsuccessful removal of the HTML document directory |
| 15792 |
when uninstalling with Windows msi. |
| 15793 |
|
| 15794 |
- gh-95359: Fix :ref:`launcher` handling of :file:`py.ini` commands (it was |
| 15795 |
incorrectly expecting a ``py_`` prefix on keys) and crashes when reading |
| 15796 |
per-user configuration file. |
| 15797 |
|
| 15798 |
- gh-95285: Fix :ref:`launcher` handling of command lines where it is only |
| 15799 |
passed a short executable name. |
| 15800 |
|
| 15801 |
- gh-90844: Allow virtual environments to correctly launch when they have |
| 15802 |
spaces in the path. |
| 15803 |
|
| 15804 |
- gh-94772: Fix incorrect handling of shebang lines in py.exe launcher |
| 15805 |
|
| 15806 |
- gh-94018: :mod:`zipfile` will now remove trailing spaces from path |
| 15807 |
components when extracting files on Windows. |
| 15808 |
|
| 15809 |
- gh-93824: Drag and drop of files onto Python files in Windows Explorer has |
| 15810 |
been enabled for Windows ARM64. |
| 15811 |
|
| 15812 |
- gh-43414: :func:`os.get_terminal_size` now attempts to read the size from |
| 15813 |
any provided handle, rather than only supporting file descriptors 0, 1 and |
| 15814 |
2. |
| 15815 |
|
| 15816 |
- gh-92817: Ensures that :file:`py.exe` will prefer an active virtual |
| 15817 |
environment over default tags specified with environment variables or |
| 15818 |
through a :file:`py.ini` file. |
| 15819 |
|
| 15820 |
- gh-92984: Explicitly disable incremental linking for non-Debug builds |
| 15821 |
|
| 15822 |
- gh-92841: :mod:`asyncio` no longer throws ``RuntimeError: Event loop is |
| 15823 |
closed`` on interpreter exit after asynchronous socket activity. Patch by |
| 15824 |
Oleg Iarygin. |
| 15825 |
|
| 15826 |
- bpo-46907: Update Windows installer to use SQLite 3.38.4. |
| 15827 |
|
| 15828 |
- gh-91061: Accept os.PathLike for the argument to winsound.PlaySound |
| 15829 |
|
| 15830 |
- bpo-42658: Support native Windows case-insensitive path comparisons by |
| 15831 |
using ``LCMapStringEx`` instead of :func:`str.lower` in |
| 15832 |
:func:`ntpath.normcase`. Add ``LCMapStringEx`` to the :mod:`!_winapi` |
| 15833 |
module. |
| 15834 |
|
| 15835 |
- bpo-38704: Prevent installation on unsupported Windows versions. |
| 15836 |
|
| 15837 |
macOS |
| 15838 |
----- |
| 15839 |
|
| 15840 |
- gh-97897: The macOS 13 SDK includes support for the ``mkfifoat`` and |
| 15841 |
``mknodat`` system calls. Using the ``dir_fd`` option with either |
| 15842 |
:func:`os.mkfifo` or :func:`os.mknod` could result in a segfault if |
| 15843 |
cpython is built with the macOS 13 SDK but run on an earlier version of |
| 15844 |
macOS. Prevent this by adding runtime support for detection of these |
| 15845 |
system calls ("weaklinking") as is done for other newer syscalls on macOS. |
| 15846 |
|
| 15847 |
IDLE |
| 15848 |
---- |
| 15849 |
|
| 15850 |
- gh-97527: Fix a bug in the previous bugfix that caused IDLE to not start |
| 15851 |
when run with 3.10.8, 3.12.0a1, and at least Microsoft Python 3.10.2288.0 |
| 15852 |
installed without the Lib/test package. 3.11.0 was never affected. |
| 15853 |
|
| 15854 |
- gh-65802: Document handling of extensions in Save As dialogs. |
| 15855 |
|
| 15856 |
- gh-95191: Include prompts when saving Shell (interactive input and |
| 15857 |
output). |
| 15858 |
|
| 15859 |
- gh-95511: Fix the Shell context menu copy-with-prompts bug of copying an |
| 15860 |
extra line when one selects whole lines. |
| 15861 |
|
| 15862 |
- gh-95471: In the Edit menu, move ``Select All`` and add a new separator. |
| 15863 |
|
| 15864 |
- gh-95411: Enable using IDLE's module browser with .pyw files. |
| 15865 |
|
| 15866 |
- gh-89610: Add .pyi as a recognized extension for IDLE on macOS. This |
| 15867 |
allows opening stub files by double clicking on them in the Finder. |
| 15868 |
|
| 15869 |
Tools/Demos |
| 15870 |
----------- |
| 15871 |
|
| 15872 |
- gh-68686: Remove ptags and eptags scripts. |
| 15873 |
|
| 15874 |
- gh-97681: Remove the ``Tools/demo/`` directory which contained old demo |
| 15875 |
scripts. A copy can be found in the `old-demos project |
| 15876 |
<https://github.com/gvanrossum/old-demos>`_. Patch by Victor Stinner. |
| 15877 |
|
| 15878 |
- gh-97669: Remove outdated example scripts of the ``Tools/scripts/`` |
| 15879 |
directory. A copy can be found in the `old-demos project |
| 15880 |
<https://github.com/gvanrossum/old-demos>`_. Patch by Victor Stinner. |
| 15881 |
|
| 15882 |
- gh-95853: The ``wasm_build.py`` script now pre-builds Emscripten ports, |
| 15883 |
checks for broken EMSDK versions, and warns about pkg-config env vars. |
| 15884 |
|
| 15885 |
- gh-95853: The new tool ``Tools/wasm/wasm_builder.py`` automates configure, |
| 15886 |
compile, and test steps for building CPython on WebAssembly platforms. |
| 15887 |
|
| 15888 |
- gh-95731: Fix handling of module docstrings in |
| 15889 |
:file:`Tools/i18n/pygettext.py`. |
| 15890 |
|
| 15891 |
- gh-93939: Add script ``Tools/scripts/check_modules.py`` to check and |
| 15892 |
validate builtin and shared extension modules. The script also handles |
| 15893 |
``Modules/Setup`` and will eventually replace ``setup.py``. |
| 15894 |
|
| 15895 |
- gh-94538: Fix Argument Clinic output to custom file destinations. Patch by |
| 15896 |
Erlend E. Aasland. |
| 15897 |
|
| 15898 |
- gh-94430: Allow parameters named ``module`` and ``self`` with custom C |
| 15899 |
names in Argument Clinic. Patch by Erlend E. Aasland |
| 15900 |
|
| 15901 |
- gh-86087: The ``Tools/scripts/parseentities.py`` script used to parse |
| 15902 |
HTML4 entities has been removed. |
| 15903 |
|
| 15904 |
C API |
| 15905 |
----- |
| 15906 |
|
| 15907 |
- gh-98393: The :c:func:`PyUnicode_FSDecoder` function no longer accepts |
| 15908 |
bytes-like paths, like :class:`bytearray` and :class:`memoryview` types: |
| 15909 |
only the exact :class:`bytes` type is accepted for bytes strings. Patch by |
| 15910 |
Victor Stinner. |
| 15911 |
|
| 15912 |
- gh-91051: Add :c:func:`PyType_Watch` and related APIs to allow callbacks |
| 15913 |
on :c:func:`PyType_Modified`. |
| 15914 |
|
| 15915 |
- gh-95756: Lazily create and cache ``co_`` attributes for better |
| 15916 |
performance for code getters. |
| 15917 |
|
| 15918 |
- gh-96512: Configuration for the :ref:`integer string conversion length |
| 15919 |
limitation <int_max_str_digits>` now lives in the PyConfig C API struct. |
| 15920 |
|
| 15921 |
- gh-95589: Extensions classes that set ``tp_dictoffset`` and |
| 15922 |
``tp_weaklistoffset`` lose the support for multiple inheritance, but are |
| 15923 |
now safe. Extension classes should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` |
| 15924 |
and :c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead. |
| 15925 |
|
| 15926 |
- gh-95781: An unrecognized format character in |
| 15927 |
:c:func:`PyUnicode_FromFormat` and :c:func:`PyUnicode_FromFormatV` now |
| 15928 |
sets a :exc:`SystemError`. In previous versions it caused all the rest of |
| 15929 |
the format string to be copied as-is to the result string, and any extra |
| 15930 |
arguments discarded. |
| 15931 |
|
| 15932 |
- gh-92678: Restore the 3.10 behavior for multiple inheritance of C |
| 15933 |
extension classes that store their dictionary at the end of the struct. |
| 15934 |
|
| 15935 |
- gh-92678: Support C extensions using managed dictionaries by setting the |
| 15936 |
``Py_TPFLAGS_MANAGED_DICT`` flag. |
| 15937 |
|
| 15938 |
- gh-93274: API for implementing vectorcall |
| 15939 |
(:c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`, :c:func:`PyVectorcall_NARGS` and |
| 15940 |
:c:func:`PyVectorcall_Call`) was added to the limited API and stable ABI. |
| 15941 |
|
| 15942 |
- gh-95504: Fix sign placement when specifying width or precision in |
| 15943 |
:c:func:`PyUnicode_FromFormat` and :c:func:`PyUnicode_FromFormatV`. Patch |
| 15944 |
by Philip Georgi. |
| 15945 |
|
| 15946 |
- gh-93012: The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed |
| 15947 |
from a class when the class's :py:meth:`~object.__call__` method is |
| 15948 |
reassigned. This makes vectorcall safe to use with mutable types (i.e. |
| 15949 |
heap types without the :const:`immutable <Py_TPFLAGS_IMMUTABLETYPE>` |
| 15950 |
flag). Mutable types that do not override |
| 15951 |
:c:member:`~PyTypeObject.tp_call` now inherit the |
| 15952 |
:c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag. |
| 15953 |
|
| 15954 |
- gh-95388: Creating :c:macro:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` |
| 15955 |
with mutable bases is deprecated and is planned to be disabled in Python |
| 15956 |
3.14. |
| 15957 |
|
| 15958 |
- gh-92678: Adds unstable C-API functions ``_PyObject_VisitManagedDict`` and |
| 15959 |
``_PyObject_ClearManagedDict`` to allow C extensions to allow the VM to |
| 15960 |
manage their object's dictionaries. |
| 15961 |
|
| 15962 |
- gh-94936: Added :c:func:`PyCode_GetVarnames`, :c:func:`PyCode_GetCellvars` |
| 15963 |
and :c:func:`PyCode_GetFreevars` for accessing ``co_varnames``, |
| 15964 |
``co_cellvars`` and ``co_freevars`` respectively via the C API. |
| 15965 |
|
| 15966 |
- gh-94930: Fix ``SystemError`` raised when |
| 15967 |
:c:func:`PyArg_ParseTupleAndKeywords` is used with ``#`` in ``(...)`` but |
| 15968 |
without ``PY_SSIZE_T_CLEAN`` defined. |
| 15969 |
|
| 15970 |
- gh-94731: Python again uses C-style casts for most casting operations when |
| 15971 |
compiled with C++. This may trigger compiler warnings, if they are enabled |
| 15972 |
with e.g. ``-Wold-style-cast`` or ``-Wzero-as-null-pointer-constant`` |
| 15973 |
options for ``g++``. |
| 15974 |
|
| 15975 |
- gh-93937: The following frame functions and type are now directly |
| 15976 |
available with ``#include <Python.h>``, it's no longer needed to add |
| 15977 |
``#include <frameobject.h>``: |
| 15978 |
|
| 15979 |
* :c:func:`PyFrame_Check` |
| 15980 |
* :c:func:`PyFrame_GetBack` |
| 15981 |
* :c:func:`PyFrame_GetBuiltins` |
| 15982 |
* :c:func:`PyFrame_GetGenerator` |
| 15983 |
* :c:func:`PyFrame_GetGlobals` |
| 15984 |
* :c:func:`PyFrame_GetLasti` |
| 15985 |
* :c:func:`PyFrame_GetLocals` |
| 15986 |
* :c:type:`PyFrame_Type` |
| 15987 |
|
| 15988 |
Patch by Victor Stinner. |
| 15989 |
|
| 15990 |
- gh-91321: Fix the compatibility of the Python C API with C++ older than |
| 15991 |
C++11. Patch by Victor Stinner. |
| 15992 |
|
| 15993 |
- gh-91731: Avoid defining the ``static_assert`` when compiling with C++ 11, |
| 15994 |
where this is a keyword and redefining it can lead to undefined behavior. |
| 15995 |
Patch by Pablo Galindo |
| 15996 |
|
| 15997 |
- gh-89546: :c:func:`PyType_FromMetaclass` (and other ``PyType_From*`` |
| 15998 |
functions) now check that offsets and the base class's |
| 15999 |
:c:member:`~PyTypeObject.tp_basicsize` fit in the new class's |
| 16000 |
``tp_basicsize``. |
| 16001 |
|
| 16002 |
- gh-93503: Add two new public functions to the public C-API, |
| 16003 |
:c:func:`PyEval_SetProfileAllThreads` and |
| 16004 |
:c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and |
| 16005 |
profiling functions in all running threads in addition to the calling one. |
| 16006 |
Also, two analogous functions to the :mod:`threading` module |
| 16007 |
(:func:`threading.setprofile_all_threads` and |
| 16008 |
:func:`threading.settrace_all_threads`) that allow to do the same from |
| 16009 |
Python. Patch by Pablo Galindo |
| 16010 |
|
| 16011 |
- gh-93442: Add C++ overloads for _Py_CAST_impl() to handle 0/NULL. This |
| 16012 |
will allow C++ extensions that pass 0 or NULL to macros using _Py_CAST() |
| 16013 |
to continue to compile. |
| 16014 |
|
| 16015 |
- gh-93466: Slot IDs in PyType_Spec may not be repeated. The documentation |
| 16016 |
was updated to mention this. For some cases of repeated slots, |
| 16017 |
PyType_FromSpec and related functions will now raise an exception. |
| 16018 |
|
| 16019 |
- gh-92898: Fix C++ compiler warnings when casting function arguments to |
| 16020 |
``PyObject*``. Patch by Serge Guelton. |
| 16021 |
|
| 16022 |
- gh-93103: Deprecate global configuration variables, like |
| 16023 |
:c:var:`Py_IgnoreEnvironmentFlag`, in the documentation: the |
| 16024 |
:c:func:`Py_InitializeFromConfig` API should be instead. Patch by Victor |
| 16025 |
Stinner. |
| 16026 |
|
| 16027 |
- gh-77782: Deprecate global configuration variable like |
| 16028 |
:c:var:`Py_IgnoreEnvironmentFlag`: the :c:func:`Py_InitializeFromConfig` |
| 16029 |
API should be instead. Patch by Victor Stinner. |
| 16030 |
|
| 16031 |
- gh-92913: Ensures changes to :c:member:`PyConfig.module_search_paths` are |
| 16032 |
ignored unless :c:member:`PyConfig.module_search_paths_set` is set |
| 16033 |
|
| 16034 |
- gh-92781: Avoid mixing declarations and code in the C API to fix the |
| 16035 |
compiler warning: "ISO C90 forbids mixed declarations and code" |
| 16036 |
[-Werror=declaration-after-statement]. Patch by Victor Stinner. |
| 16037 |
|
| 16038 |
- gh-92651: Remove the ``token.h`` header file. There was never any public |
| 16039 |
tokenizer C API. The ``token.h`` header file was only designed to be used |
| 16040 |
by Python internals. Patch by Victor Stinner. |
| 16041 |
|
| 16042 |
- gh-92536: Remove legacy Unicode APIs based on ``Py_UNICODE*``. |
| 16043 |
|
| 16044 |
- gh-85858: Remove the ``PyUnicode_InternImmortal()`` function and the |
| 16045 |
``SSTATE_INTERNED_IMMORTAL`` macro. Patch by Victor Stinner. |
| 16046 |
|
| 16047 |
- gh-92193: Add new function :c:func:`PyFunction_SetVectorcall` to the C API |
| 16048 |
which sets the vectorcall field of a given :c:type:`PyFunctionObject`. |
| 16049 |
|
| 16050 |
Warning: extensions using this API must preserve the behavior of the |
| 16051 |
unaltered function! |
| 16052 |
|
| 16053 |
- gh-59121: Fixed an assert that prevented ``PyRun_InteractiveOne`` from |
| 16054 |
providing tracebacks when parsing from the provided FD. |
| 16055 |
|
| 16056 |
- bpo-45383: The :c:func:`PyType_FromSpec` API will now find and use a |
| 16057 |
metaclass based on the provided bases. An error will be raised if there is |
| 16058 |
a metaclass conflict. |
| 16059 |
|
| 16060 |
|
| 16061 |
What's New in Python 3.11.0 beta 1? |
| 16062 |
=================================== |
| 16063 |
|
| 16064 |
*Release date: 2022-05-06* |
| 16065 |
|
| 16066 |
Security |
| 16067 |
-------- |
| 16068 |
|
| 16069 |
- gh-57684: Add the :option:`-P` command line option and the |
| 16070 |
:envvar:`PYTHONSAFEPATH` environment variable to not prepend a potentially |
| 16071 |
unsafe path to :data:`sys.path`. Patch by Victor Stinner. |
| 16072 |
|
| 16073 |
Core and Builtins |
| 16074 |
----------------- |
| 16075 |
|
| 16076 |
- gh-89519: Chaining classmethod descriptors (introduced in bpo-19072) is |
| 16077 |
deprecated. It can no longer be used to wrap other descriptors such as |
| 16078 |
property(). The core design of this feature was flawed, and it caused a |
| 16079 |
number of downstream problems. |
| 16080 |
|
| 16081 |
- gh-92345: ``pymain_run_python()`` now imports ``readline`` and |
| 16082 |
``rlcompleter`` before sys.path is extended to include the current working |
| 16083 |
directory of an interactive interpreter. Non-interactive interpreters are |
| 16084 |
not affected. |
| 16085 |
|
| 16086 |
- bpo-43857: Improve the :exc:`AttributeError` message when deleting a |
| 16087 |
missing attribute. Patch by Géry Ogam. |
| 16088 |
|
| 16089 |
- gh-92245: Make sure that PEP 523 is respected in all cases. In 3.11a7, |
| 16090 |
specialization may have prevented Python-to-Python calls respecting PEP |
| 16091 |
523. |
| 16092 |
|
| 16093 |
- gh-92203: Add a closure keyword-only parameter to :func:`exec`. It can |
| 16094 |
only be specified when exec-ing a code object that uses free variables. |
| 16095 |
When specified, it must be a tuple, with exactly the number of cell |
| 16096 |
variables referenced by the code object. closure has a default value of |
| 16097 |
``None``, and it must be ``None`` if the code object doesn't refer to any |
| 16098 |
free variables. |
| 16099 |
|
| 16100 |
- gh-91173: Disable frozen modules in debug builds. Patch by Kumar Aditya. |
| 16101 |
|
| 16102 |
- gh-92114: Improve error message when subscript a type with |
| 16103 |
``__class_getitem__`` set to ``None``. |
| 16104 |
|
| 16105 |
- gh-92112: Fix crash triggered by an evil custom ``mro()`` on a metaclass. |
| 16106 |
|
| 16107 |
- gh-92063: The ``PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS`` instruction |
| 16108 |
now ensures methods are called only on objects of the correct type. |
| 16109 |
|
| 16110 |
- gh-92031: Deoptimize statically allocated code objects during |
| 16111 |
``Py_FINALIZE()`` so that future ``_PyCode_Quicken`` calls always start |
| 16112 |
with unquickened code. |
| 16113 |
|
| 16114 |
- gh-92036: Fix a crash in subinterpreters related to the garbage collector. |
| 16115 |
When a subinterpreter is deleted, untrack all objects tracked by its GC. |
| 16116 |
To prevent a crash in deallocator functions expecting objects to be |
| 16117 |
tracked by the GC, leak a strong reference to these objects on purpose, so |
| 16118 |
they are never deleted and their deallocator functions are not called. |
| 16119 |
Patch by Victor Stinner. |
| 16120 |
|
| 16121 |
- gh-92032: The interpreter can now autocomplete soft keywords, as of now |
| 16122 |
``match``, ``case``, and ``_`` (wildcard pattern) from :pep:`634`. |
| 16123 |
|
| 16124 |
- gh-87999: The warning emitted by the Python parser for a numeric literal |
| 16125 |
immediately followed by keyword has been changed from deprecation warning |
| 16126 |
to syntax warning. |
| 16127 |
|
| 16128 |
- gh-91869: Fix an issue where specialized opcodes with extended arguments |
| 16129 |
could produce incorrect tracing output or lead to assertion failures. |
| 16130 |
|
| 16131 |
- gh-91603: Speed up :class:`types.UnionType` instantiation. Based on patch |
| 16132 |
provided by Yurii Karabas. |
| 16133 |
|
| 16134 |
- gh-89373: If Python is built in debug mode, Python now ensures that |
| 16135 |
deallocator functions leave the current exception unchanged. Patch by |
| 16136 |
Victor Stinner. |
| 16137 |
|
| 16138 |
- gh-91632: Fix a minor memory leak at exit: release the memory of the |
| 16139 |
:class:`generic_alias_iterator` type. Patch by Donghee Na. |
| 16140 |
|
| 16141 |
- gh-81548: Octal escapes with value larger than ``0o377`` now produce a |
| 16142 |
:exc:`DeprecationWarning`. In a future Python version they will be a |
| 16143 |
:exc:`SyntaxWarning` and eventually a :exc:`SyntaxError`. |
| 16144 |
|
| 16145 |
- bpo-43950: Use a single compact table for line starts, ends and column |
| 16146 |
offsets. Reduces memory consumption for location info by half |
| 16147 |
|
| 16148 |
- gh-91102: Use Argument Clinic for :class:`EncodingMap`. Patch by Oleg |
| 16149 |
Iarygin. |
| 16150 |
|
| 16151 |
- gh-91636: Fixed a crash in a garbage-collection edge-case, in which a |
| 16152 |
``PyFunction_Type.tp_clear`` function could leave a python function object |
| 16153 |
in an inconsistent state. |
| 16154 |
|
| 16155 |
- gh-91603: Speed up :func:`isinstance` and :func:`issubclass` checks for |
| 16156 |
:class:`types.UnionType`. Patch by Yurii Karabas. |
| 16157 |
|
| 16158 |
- gh-91625: Fixed a bug in which adaptive opcodes ignored any preceding |
| 16159 |
``EXTENDED_ARG``\ s on specialization failure. |
| 16160 |
|
| 16161 |
- gh-78607: The LLTRACE special build now looks for the name ``__lltrace__`` |
| 16162 |
defined in module globals, rather than the name ``__ltrace__``, which had |
| 16163 |
been introduced as a typo. |
| 16164 |
|
| 16165 |
- gh-91576: Speed up iteration of ascii strings by 50%. Patch by Kumar |
| 16166 |
Aditya. |
| 16167 |
|
| 16168 |
- gh-89279: Improve interpreter performance on Windows by inlining a few |
| 16169 |
specific macros. |
| 16170 |
|
| 16171 |
- gh-91502: Add a new :c:func:`!_PyFrame_IsEntryFrame` API function, to |
| 16172 |
check if a :c:type:`PyFrameObject` is an entry frame. Patch by Pablo |
| 16173 |
Galindo. |
| 16174 |
|
| 16175 |
- gh-91266: Refactor the ``bytearray`` strip methods ``strip``, ``lstrip`` |
| 16176 |
and ``rstrip`` to use a common implementation. |
| 16177 |
|
| 16178 |
- gh-91479: Replaced the ``__note__`` field of :exc:`BaseException` (added |
| 16179 |
in an earlier version of 3.11) with the final design of :pep:`678`. |
| 16180 |
Namely, :exc:`BaseException` gets an :meth:`add_note` method, and its |
| 16181 |
``__notes__`` field is created when necessary. |
| 16182 |
|
| 16183 |
- gh-46055: Speed up right shift of negative integers, by removing |
| 16184 |
unnecessary creation of temporaries. Original patch by Xinhang Xu, |
| 16185 |
reworked by Mark Dickinson. |
| 16186 |
|
| 16187 |
- gh-91462: Make the interpreter's low-level tracing (lltrace) feature |
| 16188 |
output more readable by displaying opcode names (rather than just |
| 16189 |
numbers), and by displaying stack contents before each opcode. |
| 16190 |
|
| 16191 |
- gh-89455: Fixed an uninitialized bool value in the traceback printing code |
| 16192 |
path that was introduced by the initial bpo-45292 exception groups work. |
| 16193 |
|
| 16194 |
- gh-91421: Fix a potential integer overflow in _Py_DecodeUTF8Ex. |
| 16195 |
|
| 16196 |
- gh-91428: Add ``static const char *const _PyOpcode_OpName[256] = {...};`` |
| 16197 |
to ``opcode.h`` for debug builds to assist in debugging the Python |
| 16198 |
interpreter. It is now more convenient to make various forms of debugging |
| 16199 |
output more human-readable by including opcode names rather than just the |
| 16200 |
corresponding decimal digits. |
| 16201 |
|
| 16202 |
- bpo-47120: Make :opcode:`POP_JUMP_IF_TRUE`, :opcode:`POP_JUMP_IF_FALSE`, |
| 16203 |
:opcode:`POP_JUMP_IF_NONE` and :opcode:`POP_JUMP_IF_NOT_NONE` virtual, |
| 16204 |
mapping to new relative jump opcodes. |
| 16205 |
|
| 16206 |
- bpo-45317: Add internal documentation explaining design of new (for 3.11) |
| 16207 |
frame stack. |
| 16208 |
|
| 16209 |
Library |
| 16210 |
------- |
| 16211 |
|
| 16212 |
- bpo-47197: ctypes used to mishandle ``void`` return types, so that for |
| 16213 |
instance a function declared like ``ctypes.CFUNCTYPE(None, ctypes.c_int)`` |
| 16214 |
would be called with signature ``int f(int)`` instead of ``void f(int)``. |
| 16215 |
Wasm targets require function pointers to be called with the correct |
| 16216 |
signatures so this led to crashes. The problem is now fixed. |
| 16217 |
|
| 16218 |
Core and Builtins |
| 16219 |
----------------- |
| 16220 |
|
| 16221 |
- bpo-47120: Make opcodes :opcode:`!JUMP_IF_TRUE_OR_POP` and |
| 16222 |
:opcode:`!JUMP_IF_FALSE_OR_POP` relative rather than absolute. |
| 16223 |
|
| 16224 |
- bpo-47177: Replace the ``f_lasti`` member of the internal |
| 16225 |
``_PyInterpreterFrame`` structure with a ``prev_instr`` pointer, which |
| 16226 |
reduces overhead in the main interpreter loop. The ``f_lasti`` attribute |
| 16227 |
of Python-layer frame objects is preserved for backward-compatibility. |
| 16228 |
|
| 16229 |
- bpo-46961: Integer mod/remainder operations, including the three-argument |
| 16230 |
form of :func:`pow`, now consistently return ints from the global small |
| 16231 |
integer cache when applicable. |
| 16232 |
|
| 16233 |
- bpo-46962: Classes and functions that unconditionally declared their |
| 16234 |
docstrings ignoring the ``--without-doc-strings`` compilation flag no |
| 16235 |
longer do so. |
| 16236 |
|
| 16237 |
The classes affected are :class:`ctypes.UnionType`, |
| 16238 |
:class:`pickle.PickleBuffer`, :class:`testcapi.RecursingInfinitelyError`, |
| 16239 |
and :class:`types.GenericAlias`. |
| 16240 |
|
| 16241 |
The functions affected are 24 methods in :mod:`ctypes`. |
| 16242 |
|
| 16243 |
Patch by Oleg Iarygin. |
| 16244 |
|
| 16245 |
- bpo-46942: Use Argument Clinic for the :class:`types.MethodType` |
| 16246 |
constructor. Patch by Oleg Iarygin. |
| 16247 |
|
| 16248 |
- bpo-46764: Fix wrapping bound methods with @classmethod |
| 16249 |
|
| 16250 |
- bpo-43464: Optimize :meth:`set.intersection` for non-set arguments. |
| 16251 |
|
| 16252 |
- bpo-46721: Optimize :meth:`set.issuperset` for non-set argument. |
| 16253 |
|
| 16254 |
- bpo-46509: Add type-specialized versions of the ``Py_DECREF()``, and use |
| 16255 |
them for ``float``, ``int``, ``str``, ``bool``, and ``None`` to avoid |
| 16256 |
pointer-chasing at runtime where types are known at C compile time. |
| 16257 |
|
| 16258 |
Build |
| 16259 |
----- |
| 16260 |
|
| 16261 |
- bpo-46045: Do not use POSIX semaphores on NetBSD |
| 16262 |
|
| 16263 |
Core and Builtins |
| 16264 |
----------------- |
| 16265 |
|
| 16266 |
- bpo-36819: Fix crashes in built-in encoders with error handlers that |
| 16267 |
return position less or equal than the starting position of non-encodable |
| 16268 |
characters. |
| 16269 |
|
| 16270 |
- bpo-34093: ``marshal.dumps()`` uses ``FLAG_REF`` for all interned strings. |
| 16271 |
This makes output more deterministic and helps reproducible build. |
| 16272 |
|
| 16273 |
- bpo-26579: Added ``object.__getstate__`` which provides the default |
| 16274 |
implementation of the ``__getstate__()`` method. |
| 16275 |
|
| 16276 |
Copying and pickling instances of subclasses of builtin types bytearray, |
| 16277 |
set, frozenset, collections.OrderedDict, collections.deque, |
| 16278 |
weakref.WeakSet, and datetime.tzinfo now copies and pickles instance |
| 16279 |
attributes implemented as slots. |
| 16280 |
|
| 16281 |
Library |
| 16282 |
------- |
| 16283 |
|
| 16284 |
- gh-87901: Add the *encoding* parameter to :func:`os.popen`. |
| 16285 |
|
| 16286 |
- gh-90997: Fix an issue where :mod:`dis` utilities may interpret populated |
| 16287 |
inline cache entries as valid instructions. |
| 16288 |
|
| 16289 |
- gh-92332: Deprecate :class:`typing.Text` (removal of the class is |
| 16290 |
currently not planned). Patch by Alex Waygood. |
| 16291 |
|
| 16292 |
- gh-78157: Deprecate nested classes in enum definitions becoming members -- |
| 16293 |
in 3.13 they will be normal classes; add ``member`` and ``nonmember`` |
| 16294 |
functions to allow control over results now. |
| 16295 |
|
| 16296 |
- gh-92356: Fixed a performance regression in ctypes function calls. |
| 16297 |
|
| 16298 |
- gh-90997: Show the actual named values stored in inline caches when |
| 16299 |
``show_caches=True`` is passed to :mod:`dis` utilities. |
| 16300 |
|
| 16301 |
- gh-92301: Prefer ``close_range()`` to iterating over procfs for file |
| 16302 |
descriptor closing in :mod:`subprocess` for better performance. |
| 16303 |
|
| 16304 |
- gh-67248: Sort the miscellaneous topics in Cmd.do_help() |
| 16305 |
|
| 16306 |
- gh-92210: Port ``socket.__init__`` to Argument Clinic. Patch by Cinder. |
| 16307 |
|
| 16308 |
- gh-80010: Add support for generalized ISO 8601 parsing to |
| 16309 |
:meth:`datetime.datetime.fromisoformat`, |
| 16310 |
:meth:`datetime.date.fromisoformat` and |
| 16311 |
:meth:`datetime.time.fromisoformat`. Patch by Paul Ganssle. |
| 16312 |
|
| 16313 |
- gh-92118: Fix a 3.11 regression in :func:`~contextlib.contextmanager`, |
| 16314 |
which caused it to propagate exceptions with incorrect tracebacks. |
| 16315 |
|
| 16316 |
- gh-90887: Adding ``COPYFILE_STAT``, ``COPYFILE_ACL`` and |
| 16317 |
``COPYFILE_XATTR`` constants for :func:`os.fcopyfile` available in macOs. |
| 16318 |
|
| 16319 |
- gh-91215: For :deco:`~dataclasses.dataclass`, add *weakref_slot*. The new |
| 16320 |
parameter defaults to ``False``. If true, and if ``slots=True``, add a |
| 16321 |
slot named ``"__weakref__"``, which will allow instances to be weakref'd. |
| 16322 |
Contributed by Eric V. Smith |
| 16323 |
|
| 16324 |
- gh-85984: New function os.login_tty() for Unix. |
| 16325 |
|
| 16326 |
- gh-92128: Add :meth:`~object.__class_getitem__` to |
| 16327 |
:class:`logging.LoggerAdapter` and :class:`logging.StreamHandler`, |
| 16328 |
allowing them to be parameterized at runtime. Patch by Alex Waygood. |
| 16329 |
|
| 16330 |
- gh-92049: Forbid pickling constants ``re._constants.SUCCESS`` etc. |
| 16331 |
Previously, pickling did not fail, but the result could not be unpickled. |
| 16332 |
|
| 16333 |
- gh-92062: :class:`inspect.Parameter` now raises :exc:`ValueError` if |
| 16334 |
``name`` is a keyword, in addition to the existing check that it is an |
| 16335 |
identifier. |
| 16336 |
|
| 16337 |
- gh-87390: Add an ``__unpacked__`` attribute to |
| 16338 |
:class:`types.GenericAlias`. Patch by Jelle Zijlstra. |
| 16339 |
|
| 16340 |
- gh-88089: Add support for generic :class:`typing.NamedTuple`. |
| 16341 |
|
| 16342 |
- gh-91996: New http.HTTPMethod enum to represent all the available HTTP |
| 16343 |
request methods in a convenient way |
| 16344 |
|
| 16345 |
- gh-91984: Modified test strings in test_argparse.py to not contain |
| 16346 |
trailing spaces before end of line. |
| 16347 |
|
| 16348 |
- gh-91952: Add ``encoding="locale"`` support to |
| 16349 |
:meth:`TextIOWrapper.reconfigure`. |
| 16350 |
|
| 16351 |
- gh-91954: Add *encoding* and *errors* arguments to |
| 16352 |
:func:`subprocess.getoutput` and :func:`subprocess.getstatusoutput`. |
| 16353 |
|
| 16354 |
- bpo-47029: Always close the read end of the pipe used by |
| 16355 |
:class:`multiprocessing.Queue` *after* the last write of buffered data to |
| 16356 |
the write end of the pipe to avoid :exc:`BrokenPipeError` at garbage |
| 16357 |
collection and at :meth:`multiprocessing.Queue.close` calls. Patch by Géry |
| 16358 |
Ogam. |
| 16359 |
|
| 16360 |
- gh-91928: Add ``datetime.UTC`` alias for ``datetime.timezone.utc``. |
| 16361 |
|
| 16362 |
Patch by Kabir Kwatra. |
| 16363 |
|
| 16364 |
- gh-68966: The :mod:`!mailcap` module is now deprecated and will be removed |
| 16365 |
in Python 3.13. See :pep:`594` for the rationale and the :mod:`mimetypes` |
| 16366 |
module for an alternative. Patch by Victor Stinner. |
| 16367 |
|
| 16368 |
- gh-91401: Provide a way to disable :mod:`subprocess` use of ``vfork()`` |
| 16369 |
just in case it is ever needed and document the existing mechanism for |
| 16370 |
``posix_spawn()``. |
| 16371 |
|
| 16372 |
- gh-64783: Fix :const:`signal.NSIG` value on FreeBSD to accept signal |
| 16373 |
numbers greater than 32, like :const:`signal.SIGRTMIN` and |
| 16374 |
:const:`signal.SIGRTMAX`. Patch by Victor Stinner. |
| 16375 |
|
| 16376 |
- gh-91910: Add missing f prefix to f-strings in error messages from the |
| 16377 |
:mod:`multiprocessing` and :mod:`asyncio` modules. |
| 16378 |
|
| 16379 |
- gh-91860: Add :func:`typing.dataclass_transform`, implementing :pep:`681`. |
| 16380 |
Patch by Jelle Zijlstra. |
| 16381 |
|
| 16382 |
- gh-91832: Add ``required`` attribute to :class:`argparse.Action` repr |
| 16383 |
output. |
| 16384 |
|
| 16385 |
- gh-91827: In the :mod:`tkinter` module add method ``info_patchlevel()`` |
| 16386 |
which returns the exact version of the Tcl library as a named tuple |
| 16387 |
similar to :data:`sys.version_info`. |
| 16388 |
|
| 16389 |
- gh-84461: Add :option:`--enable-wasm-pthreads` to enable pthreads support |
| 16390 |
for WASM builds. ``Emscripten/node`` no longer has threading enabled by |
| 16391 |
default. Include additional file systems. |
| 16392 |
|
| 16393 |
- gh-91821: Fix unstable ``test_from_tuple`` test in ``test_decimal.py``. |
| 16394 |
|
| 16395 |
- gh-91217: Deprecate the xdrlib module. |
| 16396 |
|
| 16397 |
- gh-91217: Deprecate the uu module. |
| 16398 |
|
| 16399 |
- gh-91760: More strict rules will be applied for numerical group references |
| 16400 |
and group names in regular expressions. For now, a deprecation warning is |
| 16401 |
emitted for group references and group names which will be errors in |
| 16402 |
future Python versions. |
| 16403 |
|
| 16404 |
- gh-84461: Add provisional :data:`sys._emscripten_info` named tuple with |
| 16405 |
build-time and run-time information about Emscripten platform. |
| 16406 |
|
| 16407 |
- gh-90623: :func:`signal.raise_signal` and :func:`os.kill` now check |
| 16408 |
immediately for pending signals. Patch by Victor Stinner. |
| 16409 |
|
| 16410 |
- gh-91734: Fix OSS audio support on Solaris. |
| 16411 |
|
| 16412 |
- gh-90633: Include the passed value in the exception thrown by |
| 16413 |
:func:`typing.assert_never`. Patch by Jelle Zijlstra. |
| 16414 |
|
| 16415 |
- gh-91700: Compilation of regular expression containing a conditional |
| 16416 |
expression ``(?(group)...)`` now raises an appropriate :exc:`re.error` if |
| 16417 |
the group number refers to not defined group. Previously an internal |
| 16418 |
RuntimeError was raised. |
| 16419 |
|
| 16420 |
- gh-91231: Add an optional keyword *shutdown_timeout* parameter to the |
| 16421 |
:class:`multiprocessing.BaseManager` constructor. Kill the process if |
| 16422 |
terminate() takes longer than the timeout. Patch by Victor Stinner. |
| 16423 |
|
| 16424 |
- gh-91621: Fix :func:`typing.get_type_hints` for |
| 16425 |
:class:`collections.abc.Callable`. Patch by Shantanu Jain. |
| 16426 |
|
| 16427 |
- gh-90568: Parsing ``\N`` escapes of Unicode Named Character Sequences in a |
| 16428 |
:mod:`regular expression <re>` raises now :exc:`re.error` instead of |
| 16429 |
``TypeError``. |
| 16430 |
|
| 16431 |
- gh-91670: Remove deprecated ``SO`` config variable in :mod:`sysconfig`. |
| 16432 |
|
| 16433 |
- gh-91217: Deprecate the telnetlib module. |
| 16434 |
|
| 16435 |
- gh-91217: Deprecate the sunau module. |
| 16436 |
|
| 16437 |
- gh-91217: Deprecate the spwd module. |
| 16438 |
|
| 16439 |
- gh-91217: Deprecate the sndhdr module, as well as inline needed |
| 16440 |
functionality for ``email.mime.MIMEAudio``. |
| 16441 |
|
| 16442 |
- gh-91616: :mod:`re` module, fix :meth:`~re.Pattern.fullmatch` mismatch |
| 16443 |
when using Atomic Grouping or Possessive Quantifiers. |
| 16444 |
|
| 16445 |
- gh-91217: Deprecate the 'pipes' module. |
| 16446 |
|
| 16447 |
- gh-91217: Deprecate the ossaudiodev module. |
| 16448 |
|
| 16449 |
- bpo-47256: :mod:`re` module, limit the maximum capturing group to |
| 16450 |
1,073,741,823 in 64-bit build, this increases the depth of backtracking. |
| 16451 |
|
| 16452 |
- gh-91217: Deprecate the nis module. |
| 16453 |
|
| 16454 |
- gh-91595: Fix the comparison of character and integer inside |
| 16455 |
:func:`Tools.gdb.libpython.write_repr`. Patch by Yu Liu. |
| 16456 |
|
| 16457 |
- gh-74166: Add option to raise all errors from |
| 16458 |
:meth:`~socket.create_connection` in an :exc:`ExceptionGroup` when it |
| 16459 |
fails to create a connection. The default remains to raise only the last |
| 16460 |
error that had occurred when multiple addresses were tried. |
| 16461 |
|
| 16462 |
- gh-91487: Optimize asyncio UDP speed, over 100 times faster when |
| 16463 |
transferring a large file. |
| 16464 |
|
| 16465 |
- gh-91575: Update case-insensitive matching in the :mod:`re` module to the |
| 16466 |
latest Unicode version. |
| 16467 |
|
| 16468 |
- gh-90622: In ``concurrent.futures.process.ProcessPoolExecutor`` disallow |
| 16469 |
the "fork" multiprocessing start method when the new |
| 16470 |
``max_tasks_per_child`` feature is used as the mix of threads+fork can |
| 16471 |
hang the child processes. Default to using the safe "spawn" start method |
| 16472 |
in that circumstance if no ``mp_context`` was supplied. |
| 16473 |
|
| 16474 |
- gh-89022: In :mod:`sqlite3`, ``SQLITE_MISUSE`` result codes are now mapped |
| 16475 |
to :exc:`~sqlite3.InterfaceError` instead of |
| 16476 |
:exc:`~sqlite3.ProgrammingError`. Also, more accurate exceptions are |
| 16477 |
raised when binding parameters fail. Patch by Erlend E. Aasland. |
| 16478 |
|
| 16479 |
- gh-91526: Stop calling ``os.device_encoding(file.fileno())`` in |
| 16480 |
:class:`TextIOWrapper`. It was complex, never documented, and didn't work |
| 16481 |
for most cases. (Patch by Inada Naoki.) |
| 16482 |
|
| 16483 |
- gh-88116: Change the frame-related functions in the :mod:`inspect` module |
| 16484 |
to return a regular object (that is backwards compatible with the old |
| 16485 |
tuple-like interface) that include the extended :pep:`657` position |
| 16486 |
information (end line number, column and end column). The affected |
| 16487 |
functions are: :func:`inspect.getframeinfo`, |
| 16488 |
:func:`inspect.getouterframes`, :func:`inspect.getinnerframes`, |
| 16489 |
:func:`inspect.stack` and :func:`inspect.trace`. Patch by Pablo Galindo. |
| 16490 |
|
| 16491 |
- gh-69093: Add indexing and slicing support to :class:`sqlite3.Blob`. Patch |
| 16492 |
by Aviv Palivoda and Erlend E. Aasland. |
| 16493 |
|
| 16494 |
- gh-69093: Add :term:`context manager` support to :class:`sqlite3.Blob`. |
| 16495 |
Patch by Aviv Palivoda and Erlend E. Aasland. |
| 16496 |
|
| 16497 |
- gh-91217: Deprecate nntplib. |
| 16498 |
|
| 16499 |
- gh-91217: Deprecate msilib. |
| 16500 |
|
| 16501 |
- gh-91404: Improve the performance of :mod:`re` matching by using computed |
| 16502 |
gotos (or "threaded code") on supported platforms and removing expensive |
| 16503 |
pointer indirections. |
| 16504 |
|
| 16505 |
- gh-91217: Deprecate the imghdr module. |
| 16506 |
|
| 16507 |
- gh-91217: Deprecate the crypt module. |
| 16508 |
|
| 16509 |
- gh-91276: Make space for longer opcodes in :mod:`dis` output. |
| 16510 |
|
| 16511 |
- bpo-47000: Make :class:`TextIOWrapper` uses locale encoding when |
| 16512 |
``encoding="locale"`` is specified even in UTF-8 mode. |
| 16513 |
|
| 16514 |
- gh-91230: :func:`warnings.catch_warnings` now accepts arguments for |
| 16515 |
:func:`warnings.simplefilter`, providing a more concise way to locally |
| 16516 |
ignore warnings or convert them to errors. |
| 16517 |
|
| 16518 |
- gh-91217: Deprecate the chunk module. |
| 16519 |
|
| 16520 |
- gh-91498: Add the ``TCP_CONNECTION_INFO`` option (available on macOS) to |
| 16521 |
:mod:`socket`. |
| 16522 |
|
| 16523 |
- bpo-47260: Fix ``os.closerange()`` potentially being a no-op in a Linux |
| 16524 |
seccomp sandbox. |
| 16525 |
|
| 16526 |
- bpo-47087: Implement ``typing.Required`` and ``typing.NotRequired`` |
| 16527 |
(:pep:`655`). Patch by David Foster and Jelle Zijlstra. |
| 16528 |
|
| 16529 |
- bpo-47061: Deprecate cgi and cgitb. |
| 16530 |
|
| 16531 |
- bpo-47061: Deprecate audioop. |
| 16532 |
|
| 16533 |
- bpo-47000: Add :func:`locale.getencoding` to get the current locale |
| 16534 |
encoding. It is similar to ``locale.getpreferredencoding(False)`` but |
| 16535 |
ignores the :ref:`Python UTF-8 Mode <utf8-mode>`. |
| 16536 |
|
| 16537 |
- bpo-42012: Add :mod:`wsgiref.types`, containing WSGI-specific types for |
| 16538 |
static type checking. |
| 16539 |
|
| 16540 |
- bpo-47227: Suppress expression chaining for more :mod:`re` parsing errors. |
| 16541 |
|
| 16542 |
- bpo-47211: Remove undocumented and never working function |
| 16543 |
``re.template()`` and flag ``re.TEMPLATE``. This was later reverted in |
| 16544 |
3.11.0b2 and deprecated instead. |
| 16545 |
|
| 16546 |
- bpo-47135: :meth:`decimal.localcontext` now accepts context attributes via |
| 16547 |
keyword arguments |
| 16548 |
|
| 16549 |
- bpo-43323: Fix errors in the :mod:`email` module if the charset itself |
| 16550 |
contains undecodable/unencodable characters. |
| 16551 |
|
| 16552 |
- bpo-46841: Disassembly of quickened code. |
| 16553 |
|
| 16554 |
- bpo-46681: Forward gzip.compress() compresslevel to zlib. |
| 16555 |
|
| 16556 |
- bpo-45100: Add :func:`typing.get_overloads` and |
| 16557 |
:func:`typing.clear_overloads`. Patch by Jelle Zijlstra. |
| 16558 |
|
| 16559 |
- bpo-44807: :class:`typing.Protocol` no longer silently replaces |
| 16560 |
:meth:`__init__` methods defined on subclasses. Patch by Adrian Garcia |
| 16561 |
Badaracco. |
| 16562 |
|
| 16563 |
- bpo-46787: Fix :class:`concurrent.futures.ProcessPoolExecutor` exception |
| 16564 |
memory leak |
| 16565 |
|
| 16566 |
- bpo-46720: Add support for path-like objects to |
| 16567 |
:func:`multiprocessing.set_executable` for Windows to be on a par with |
| 16568 |
Unix-like systems. Patch by Géry Ogam. |
| 16569 |
|
| 16570 |
- bpo-46696: Add ``SO_INCOMING_CPU`` constant to :mod:`socket`. |
| 16571 |
|
| 16572 |
- bpo-46053: Fix OSS audio support on NetBSD. |
| 16573 |
|
| 16574 |
- bpo-45639: ``image/avif`` and ``image/webp`` were added to |
| 16575 |
:mod:`mimetypes`. |
| 16576 |
|
| 16577 |
- bpo-46285: Add command-line option ``-p``/``--protocol`` to module |
| 16578 |
:mod:`http.server` which specifies the HTTP version to which the server is |
| 16579 |
conformant (HTTP/1.1 conformant servers can now be run from the |
| 16580 |
command-line interface of module :mod:`http.server`). Patch by Géry Ogam. |
| 16581 |
|
| 16582 |
- bpo-44791: Accept ellipsis as the last argument of |
| 16583 |
:data:`typing.Concatenate`. |
| 16584 |
|
| 16585 |
- bpo-46547: Remove variables leaking into ``pydoc.Helper`` class namespace. |
| 16586 |
|
| 16587 |
- bpo-46415: Fix ipaddress.ip_{address,interface,network} raising TypeError |
| 16588 |
instead of ValueError if given invalid tuple as address parameter. |
| 16589 |
|
| 16590 |
- bpo-46075: ``CookieJar`` with ``DefaultCookiePolicy`` now can process |
| 16591 |
cookies from localhost with domain=localhost explicitly specified in |
| 16592 |
Set-Cookie header. |
| 16593 |
|
| 16594 |
- bpo-45995: Add a "z" option to the string formatting specification that |
| 16595 |
coerces negative zero floating-point values to positive zero after |
| 16596 |
rounding to the format precision. Contributed by John Belmonte. |
| 16597 |
|
| 16598 |
- bpo-26175: Fully implement the :class:`io.BufferedIOBase` or |
| 16599 |
:class:`io.TextIOBase` interface for |
| 16600 |
:class:`tempfile.SpooledTemporaryFile` objects. This lets them work |
| 16601 |
correctly with higher-level layers (like compression modules). Patch by |
| 16602 |
Carey Metcalfe. |
| 16603 |
|
| 16604 |
- bpo-45138: Fix a regression in the :mod:`sqlite3` trace callback where |
| 16605 |
bound parameters were not expanded in the passed statement string. The |
| 16606 |
regression was introduced in Python 3.10 by :issue:`40318`. Patch by |
| 16607 |
Erlend E. Aasland. |
| 16608 |
|
| 16609 |
- bpo-44863: Allow :class:`~typing.TypedDict` subclasses to also include |
| 16610 |
:class:`~typing.Generic` as a base class in class based syntax. Thereby |
| 16611 |
allowing the user to define a generic ``TypedDict``, just like a |
| 16612 |
user-defined generic but with ``TypedDict`` semantics. |
| 16613 |
|
| 16614 |
- bpo-44587: Fix BooleanOptionalAction to not automatically add a default |
| 16615 |
string. If a default string is desired, use a formatter to add it. |
| 16616 |
|
| 16617 |
- bpo-43827: All positional-or-keyword parameters to ``ABCMeta.__new__`` are |
| 16618 |
now positional-only to avoid conflicts with keyword arguments to be passed |
| 16619 |
to :meth:`__init_subclass__`. |
| 16620 |
|
| 16621 |
- bpo-43218: Prevent creation of a venv whose path contains the PATH |
| 16622 |
separator. This could affect the usage of the activate script. Patch by |
| 16623 |
Dustin Rodrigues. |
| 16624 |
|
| 16625 |
- bpo-38435: Add a ``process_group`` parameter to :class:`subprocess.Popen` |
| 16626 |
to help move more things off of the unsafe ``preexec_fn`` parameter. |
| 16627 |
|
| 16628 |
- bpo-42066: Fix cookies getting sorted in :func:`CookieJar.__iter__` which |
| 16629 |
is an extra behavior and not mentioned in RFC 2965 or Netscape cookie |
| 16630 |
protocol. Now the cookies in ``CookieJar`` follows the order of the |
| 16631 |
``Set-Cookie`` header. Patch by Iman Kermani. |
| 16632 |
|
| 16633 |
- bpo-40617: Add :meth:`~sqlite3.Connection.create_window_function` to |
| 16634 |
:class:`sqlite3.Connection` for creating aggregate window functions. Patch |
| 16635 |
by Erlend E. Aasland. |
| 16636 |
|
| 16637 |
- bpo-40676: Convert :mod:`csv` to use Argument Clinic for |
| 16638 |
:func:`csv.field_size_limit`, :func:`csv.get_dialect`, |
| 16639 |
:func:`csv.unregister_dialect` and :func:`csv.list_dialects`. |
| 16640 |
|
| 16641 |
- bpo-39716: Raise an ``ArgumentError`` when the same subparser name is |
| 16642 |
added twice to an ``argparse.ArgumentParser``. This is consistent with |
| 16643 |
the (default) behavior when the same option string is added twice to an |
| 16644 |
``ArgumentParser``. |
| 16645 |
|
| 16646 |
- bpo-36073: Raise :exc:`~sqlite3.ProgrammingError` instead of segfaulting |
| 16647 |
on recursive usage of cursors in :mod:`sqlite3` converters. Patch by |
| 16648 |
Sergey Fedoseev. |
| 16649 |
|
| 16650 |
- bpo-34975: Adds a ``start_tls()`` method to |
| 16651 |
:class:`~asyncio.streams.StreamWriter`, which upgrades the connection with |
| 16652 |
TLS using the given :class:`~ssl.SSLContext`. |
| 16653 |
|
| 16654 |
- bpo-22276: :class:`~pathlib.Path` methods :meth:`~pathlib.Path.glob` and |
| 16655 |
:meth:`~pathlib.Path.rglob` return only directories if *pattern* ends with |
| 16656 |
a pathname components separator (``/`` or :data:`~os.sep`). Patch by |
| 16657 |
Eisuke Kawashima. |
| 16658 |
|
| 16659 |
- bpo-24905: Add :meth:`~sqlite3.Connection.blobopen` to |
| 16660 |
:class:`sqlite3.Connection`. :class:`sqlite3.Blob` allows incremental I/O |
| 16661 |
operations on blobs. Patch by Aviv Palivoda and Erlend E. Aasland. |
| 16662 |
|
| 16663 |
Documentation |
| 16664 |
------------- |
| 16665 |
|
| 16666 |
- gh-91888: Add a new ``gh`` role to the documentation to link to GitHub |
| 16667 |
issues. |
| 16668 |
|
| 16669 |
- gh-91783: Document security issues concerning the use of the function |
| 16670 |
:meth:`shutil.unpack_archive` |
| 16671 |
|
| 16672 |
- gh-91547: Remove "Undocumented modules" page. |
| 16673 |
|
| 16674 |
- gh-91298: In ``importlib.resources.abc``, refined the documentation of the |
| 16675 |
Traversable Protocol, applying changes from importlib_resources 5.7.1. |
| 16676 |
|
| 16677 |
- bpo-44347: Clarify the meaning of *dirs_exist_ok*, a kwarg of |
| 16678 |
:func:`shutil.copytree`. |
| 16679 |
|
| 16680 |
- bpo-36329: Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview' |
| 16681 |
|
| 16682 |
- bpo-47189: Add a What's New in Python 3.11 entry for the Faster CPython |
| 16683 |
project. Documentation by Ken Jin and Kumar Aditya. |
| 16684 |
|
| 16685 |
- bpo-38668: Update the introduction to documentation for :mod:`os.path` to |
| 16686 |
remove warnings that became irrelevant after the implementations of |
| 16687 |
:pep:`383` and :pep:`529`. |
| 16688 |
|
| 16689 |
- bpo-47115: The documentation now lists which members of C structs are part |
| 16690 |
of the :ref:`Limited API/Stable ABI <stable>`. |
| 16691 |
|
| 16692 |
- bpo-46962: All docstrings in code snippets are now wrapped into |
| 16693 |
:c:macro:`PyDoc_STR` to follow the guideline of :pep:`PEP 7's |
| 16694 |
Documentation Strings paragraph <0007#documentation-strings>`. Patch by |
| 16695 |
Oleg Iarygin. |
| 16696 |
|
| 16697 |
- bpo-26792: Improve the docstrings of :func:`runpy.run_module` and |
| 16698 |
:func:`runpy.run_path`. Original patch by Andrew Brezovsky. |
| 16699 |
|
| 16700 |
Tests |
| 16701 |
----- |
| 16702 |
|
| 16703 |
- gh-92169: Use ``warnings_helper.import_deprecated()`` to import deprecated |
| 16704 |
modules uniformly in tests. Patch by Hugo van Kemenade. |
| 16705 |
|
| 16706 |
- gh-84461: When multiprocessing is enabled, libregrtest can now use a |
| 16707 |
Python executable other than :code:`sys.executable` via the ``--python`` |
| 16708 |
flag. |
| 16709 |
|
| 16710 |
- gh-91904: Fix initialization of :envvar:`PYTHONREGRTEST_UNICODE_GUARD` |
| 16711 |
which prevented running regression tests on non-UTF-8 locale. |
| 16712 |
|
| 16713 |
- gh-91752: Added @requires_zlib to test.test_tools.test_freeze.TestFreeze. |
| 16714 |
|
| 16715 |
- gh-91607: Fix ``test_concurrent_futures`` to test the correct |
| 16716 |
multiprocessing start method context in several cases where the test logic |
| 16717 |
mixed this up. |
| 16718 |
|
| 16719 |
- bpo-40280: Threading tests are now skipped on WASM targets without pthread |
| 16720 |
support. |
| 16721 |
|
| 16722 |
- bpo-47109: Test for :mod:`ctypes.macholib.dyld`, |
| 16723 |
:mod:`ctypes.macholib.dylib`, and :mod:`ctypes.macholib.framework` are |
| 16724 |
brought from manual pre-:mod:`unittest` times to :mod:`ctypes.test` |
| 16725 |
location and structure. Patch by Oleg Iarygin. |
| 16726 |
|
| 16727 |
- bpo-29890: Add tests for :class:`ipaddress.IPv4Interface` and |
| 16728 |
:class:`ipaddress.IPv6Interface` construction with tuple arguments. |
| 16729 |
Original patch and tests by louisom. |
| 16730 |
|
| 16731 |
Build |
| 16732 |
----- |
| 16733 |
|
| 16734 |
- gh-89452: gdbm-compat is now preferred over ndbm if both are available on |
| 16735 |
the system. This allows avoiding the problematic ndbm.h on macOS. |
| 16736 |
|
| 16737 |
- gh-91731: Python is now built with ``-std=c11`` compiler option, rather |
| 16738 |
than ``-std=c99``. Patch by Victor Stinner. |
| 16739 |
|
| 16740 |
- bpo-47152: Add script and make target for generating ``sre_constants.h``. |
| 16741 |
|
| 16742 |
- bpo-47103: Windows ``PGInstrument`` builds now copy a required DLL into |
| 16743 |
the output directory, making it easier to run the profile stage of a PGO |
| 16744 |
build. |
| 16745 |
|
| 16746 |
Windows |
| 16747 |
------- |
| 16748 |
|
| 16749 |
- bpo-46907: Update Windows installer to use SQLite 3.38.3. |
| 16750 |
|
| 16751 |
- bpo-47239: Fixed --list and --list-paths output for :ref:`launcher` when |
| 16752 |
used in an active virtual environment. |
| 16753 |
|
| 16754 |
- bpo-46907: Update Windows installer to use SQLite 3.38.2. |
| 16755 |
|
| 16756 |
- bpo-46785: Fix race condition between :func:`os.stat` and unlinking a file |
| 16757 |
on Windows, by using errors codes returned by ``FindFirstFileW()`` when |
| 16758 |
appropriate in ``win32_xstat_impl``. |
| 16759 |
|
| 16760 |
- bpo-40859: Update Windows build to use xz-5.2.5 |
| 16761 |
|
| 16762 |
macOS |
| 16763 |
----- |
| 16764 |
|
| 16765 |
- bpo-46907: Update macOS installer to SQLite 3.38.4. |
| 16766 |
|
| 16767 |
Tools/Demos |
| 16768 |
----------- |
| 16769 |
|
| 16770 |
- gh-91583: Fix regression in the code generated by Argument Clinic for |
| 16771 |
functions with the ``defining_class`` parameter. |
| 16772 |
|
| 16773 |
- gh-91575: Add script ``Tools/scripts/generate_re_casefix.py`` and the make |
| 16774 |
target ``regen-re`` for generating additional data for case-insensitive |
| 16775 |
matching according to the current Unicode version. |
| 16776 |
|
| 16777 |
- gh-91551: Remove the ancient Pynche color editor. It has moved to |
| 16778 |
https://gitlab.com/warsaw/pynche |
| 16779 |
|
| 16780 |
C API |
| 16781 |
----- |
| 16782 |
|
| 16783 |
- gh-88279: Deprecate the C functions: :c:func:`!PySys_SetArgv`, |
| 16784 |
:c:func:`!PySys_SetArgvEx`, :c:func:`!PySys_SetPath`. Patch by Victor |
| 16785 |
Stinner. |
| 16786 |
|
| 16787 |
- gh-92154: Added the :c:func:`PyCode_GetCode` function. This function does |
| 16788 |
the equivalent of the Python code ``getattr(code_object, 'co_code')``. |
| 16789 |
|
| 16790 |
- gh-92173: Fix the ``closure`` argument to :c:func:`PyEval_EvalCodeEx`. |
| 16791 |
|
| 16792 |
- gh-91320: Fix C++ compiler warnings about "old-style cast" (``g++ |
| 16793 |
-Wold-style-cast``) in the Python C API. Use C++ ``reinterpret_cast<>`` |
| 16794 |
and ``static_cast<>`` casts when the Python C API is used in C++. Patch by |
| 16795 |
Victor Stinner. |
| 16796 |
|
| 16797 |
- gh-80527: Mark functions as deprecated by :pep:`623`: |
| 16798 |
:c:func:`!PyUnicode_AS_DATA`, :c:func:`!PyUnicode_AS_UNICODE`, |
| 16799 |
:c:func:`!PyUnicode_GET_DATA_SIZE`, :c:func:`!PyUnicode_GET_SIZE`. Patch |
| 16800 |
by Victor Stinner. |
| 16801 |
|
| 16802 |
- gh-91768: :c:func:`Py_REFCNT`, :c:func:`Py_TYPE`, :c:func:`Py_SIZE` and |
| 16803 |
:c:func:`Py_IS_TYPE` functions argument type is now ``PyObject*``, rather |
| 16804 |
than ``const PyObject*``. Patch by Victor Stinner. |
| 16805 |
|
| 16806 |
- gh-91020: Add ``PyBytes_Type.tp_alloc`` to initialize |
| 16807 |
``PyBytesObject.ob_shash`` for bytes subclasses. |
| 16808 |
|
| 16809 |
- bpo-40421: Add ``PyFrame_GetLasti`` C-API function to access frame |
| 16810 |
object's ``f_lasti`` attribute safely from C code. |
| 16811 |
|
| 16812 |
- bpo-35134: Remove the ``Include/code.h`` header file. C extensions should |
| 16813 |
only include the main ``<Python.h>`` header file. Patch by Victor Stinner. |
| 16814 |
|
| 16815 |
- bpo-47169: :c:func:`PyOS_CheckStack` is now exported in the Stable ABI on |
| 16816 |
Windows. |
| 16817 |
|
| 16818 |
- bpo-47169: :c:func:`PyThread_get_thread_native_id` is excluded from the |
| 16819 |
stable ABI on platforms where it doesn't exist (like Solaris). |
| 16820 |
|
| 16821 |
- bpo-46343: Added :c:func:`PyErr_GetHandledException` and |
| 16822 |
:c:func:`PyErr_SetHandledException` as simpler alternatives to |
| 16823 |
:c:func:`PyErr_GetExcInfo` and :c:func:`PyErr_SetExcInfo`. |
| 16824 |
|
| 16825 |
They are included in the stable ABI. |
| 16826 |
|
| 16827 |
|
| 16828 |
What's New in Python 3.11.0 alpha 7? |
| 16829 |
==================================== |
| 16830 |
|
| 16831 |
*Release date: 2022-04-05* |
| 16832 |
|
| 16833 |
Core and Builtins |
| 16834 |
----------------- |
| 16835 |
|
| 16836 |
- bpo-47212: Raise :exc:`IndentationError` instead of :exc:`SyntaxError` for |
| 16837 |
a bare ``except`` with no following indent. Improve :exc:`SyntaxError` |
| 16838 |
locations for an un-parenthesized generator used as arguments. Patch by |
| 16839 |
Matthieu Dartiailh. |
| 16840 |
|
| 16841 |
- bpo-47186: Replace :opcode:`JUMP_IF_NOT_EG_MATCH` by |
| 16842 |
:opcode:`CHECK_EG_MATCH` + jump. |
| 16843 |
|
| 16844 |
- bpo-47176: Emscripten builds cannot handle signals in the usual way due to |
| 16845 |
platform limitations. Python can now handle signals. To use, set |
| 16846 |
Module.Py_EmscriptenSignalBuffer to be a single byte SharedArrayBuffer and |
| 16847 |
set Py_EMSCRIPTEN_SIGNAL_HANDLING to 1. Writing a number into the |
| 16848 |
SharedArrayBuffer will cause the corresponding signal to be raised into |
| 16849 |
the Python thread. |
| 16850 |
|
| 16851 |
- bpo-47186: Replace :opcode:`JUMP_IF_NOT_EXC_MATCH` by |
| 16852 |
:opcode:`CHECK_EXC_MATCH` + jump. |
| 16853 |
|
| 16854 |
- bpo-47120: Replace the absolute jump opcode :opcode:`JUMP_NO_INTERRUPT` by |
| 16855 |
the relative :opcode:`JUMP_BACKWARD_NO_INTERRUPT`. |
| 16856 |
|
| 16857 |
- bpo-46841: Avoid unnecessary allocations when comparing code objects. |
| 16858 |
|
| 16859 |
- bpo-47182: Fix a crash when using a named unicode character like |
| 16860 |
``"\N{digit nine}"`` after the main interpreter has been initialized a |
| 16861 |
second time. |
| 16862 |
|
| 16863 |
- bpo-47162: WebAssembly cannot deal with bad function pointer casts |
| 16864 |
(different count or types of arguments). Python can now use call |
| 16865 |
trampolines to mitigate the problem. Define :c:macro:`PY_CALL_TRAMPOLINE` |
| 16866 |
to enable call trampolines. |
| 16867 |
|
| 16868 |
- bpo-46775: Some Windows system error codes(>= 10000) are now mapped into |
| 16869 |
the correct errno and may now raise a subclass of :exc:`OSError`. Patch by |
| 16870 |
Donghee Na. |
| 16871 |
|
| 16872 |
- bpo-47129: Improve error messages in f-string syntax errors concerning |
| 16873 |
empty expressions. |
| 16874 |
|
| 16875 |
- bpo-47117: Fix a crash if we fail to decode characters in interactive mode |
| 16876 |
if the tokenizer buffers are uninitialized. Patch by Pablo Galindo. |
| 16877 |
|
| 16878 |
- bpo-47127: Speed up calls to c functions with keyword arguments by 25% |
| 16879 |
with specialization. Patch by Kumar Aditya. |
| 16880 |
|
| 16881 |
- bpo-47120: Replaced :opcode:`JUMP_ABSOLUTE` by the relative jump |
| 16882 |
:opcode:`JUMP_BACKWARD`. |
| 16883 |
|
| 16884 |
- bpo-42197: :c:func:`!PyFrame_FastToLocalsWithError` and |
| 16885 |
:c:func:`!PyFrame_LocalsToFast` are no longer called during profiling nor |
| 16886 |
tracing. C code can access the ``f_locals`` attribute of |
| 16887 |
:c:type:`PyFrameObject` by calling :c:func:`PyFrame_GetLocals`. |
| 16888 |
|
| 16889 |
- bpo-47070: Improve performance of ``array_inplace_repeat`` by reducing the |
| 16890 |
number of invocations of ``memcpy``. Refactor the ``repeat`` and inplace |
| 16891 |
``repeat`` methods of ``array``, ``bytes``, ``bytearray`` and |
| 16892 |
``unicodeobject`` to use the common ``_PyBytes_Repeat``. |
| 16893 |
|
| 16894 |
- bpo-47053: Reduce de-optimization in the specialized |
| 16895 |
``BINARY_OP_INPLACE_ADD_UNICODE`` opcode. |
| 16896 |
|
| 16897 |
- bpo-47045: Remove the ``f_state`` field from the _PyInterpreterFrame |
| 16898 |
struct. Add the ``owner`` field to the _PyInterpreterFrame struct to make |
| 16899 |
ownership explicit to simplify clearing and deallocing frames and |
| 16900 |
generators. |
| 16901 |
|
| 16902 |
Library |
| 16903 |
------- |
| 16904 |
|
| 16905 |
- bpo-46968: Check for the existence of the "sys/auxv.h" header in |
| 16906 |
:mod:`faulthandler` to avoid compilation problems in systems where this |
| 16907 |
header doesn't exist. Patch by Pablo Galindo |
| 16908 |
|
| 16909 |
Core and Builtins |
| 16910 |
----------------- |
| 16911 |
|
| 16912 |
- bpo-46329: Use low bit of ``LOAD_GLOBAL`` to indicate whether to push a |
| 16913 |
``NULL`` before the global. Helps streamline the call sequence a bit. |
| 16914 |
|
| 16915 |
- bpo-46841: Quicken bytecode in-place by storing it as part of the |
| 16916 |
corresponding ``PyCodeObject``. |
| 16917 |
|
| 16918 |
- bpo-47012: Speed up iteration of :class:`bytes` and :class:`bytearray` by |
| 16919 |
30%. Patch by Kumar Aditya. |
| 16920 |
|
| 16921 |
- bpo-47009: Improved the performance of :meth:`list.append` and list |
| 16922 |
comprehensions by optimizing for the common case, where no resize is |
| 16923 |
needed. Patch by Dennis Sweeney. |
| 16924 |
|
| 16925 |
- bpo-47005: Improve performance of ``bytearray_repeat`` and |
| 16926 |
``bytearray_irepeat`` by reducing the number of invocations of ``memcpy``. |
| 16927 |
|
| 16928 |
Library |
| 16929 |
------- |
| 16930 |
|
| 16931 |
- bpo-46829: Deprecate passing a message into :meth:`asyncio.Future.cancel` |
| 16932 |
and :meth:`asyncio.Task.cancel` |
| 16933 |
|
| 16934 |
Core and Builtins |
| 16935 |
----------------- |
| 16936 |
|
| 16937 |
- bpo-46993: Speed up :class:`bytearray` creation from :class:`list` and |
| 16938 |
:class:`tuple` by 40%. Patch by Kumar Aditya. |
| 16939 |
|
| 16940 |
- bpo-39829: Removed the ``__len__()`` call when initializing a list and |
| 16941 |
moved initializing to ``list_extend``. Patch by Jeremiah Pascual. |
| 16942 |
|
| 16943 |
- bpo-46944: Speed up throwing exception in generator with |
| 16944 |
:c:macro:`METH_FASTCALL` calling convention. Patch by Kumar Aditya. |
| 16945 |
|
| 16946 |
- bpo-46841: Modify :opcode:`STORE_SUBSCR` to use an inline cache entry |
| 16947 |
(rather than its oparg) as an adaptive counter. |
| 16948 |
|
| 16949 |
- bpo-46841: Use inline caching for :opcode:`!PRECALL` and :opcode:`CALL`, |
| 16950 |
and remove the internal machinery for managing the (now unused) non-inline |
| 16951 |
caches. |
| 16952 |
|
| 16953 |
- bpo-46881: Statically allocate and initialize the latin1 characters. |
| 16954 |
|
| 16955 |
- bpo-46838: Improve syntax errors for incorrect function definitions. Patch |
| 16956 |
by Pablo Galindo |
| 16957 |
|
| 16958 |
- bpo-43721: Fix docstrings of :attr:`~property.getter`, |
| 16959 |
:attr:`~property.setter`, and :attr:`~property.deleter` to clarify that |
| 16960 |
they create a new copy of the property. |
| 16961 |
|
| 16962 |
- bpo-43224: Make grammar changes required for PEP 646. |
| 16963 |
|
| 16964 |
Library |
| 16965 |
------- |
| 16966 |
|
| 16967 |
- bpo-47208: Allow vendors to override :const:`CTYPES_MAX_ARGCOUNT`. |
| 16968 |
|
| 16969 |
- bpo-23689: :mod:`re` module: fix memory leak when a match is terminated by |
| 16970 |
a signal or memory allocation failure. Patch by Ma Lin. |
| 16971 |
|
| 16972 |
- bpo-47167: Allow overriding a future compliance check in |
| 16973 |
:class:`asyncio.Task`. |
| 16974 |
|
| 16975 |
- bpo-47151: When subprocess tries to use vfork, it now falls back to fork |
| 16976 |
if vfork returns an error. This allows use in situations where vfork isn't |
| 16977 |
allowed by the OS kernel. |
| 16978 |
|
| 16979 |
- bpo-47152: Convert the :mod:`re` module into a package. Deprecate modules |
| 16980 |
``sre_compile``, ``sre_constants`` and ``sre_parse``. |
| 16981 |
|
| 16982 |
- bpo-4833: Add :meth:`ZipFile.mkdir` |
| 16983 |
|
| 16984 |
- bpo-27929: Fix :meth:`asyncio.loop.sock_connect` to only resolve names for |
| 16985 |
:const:`socket.AF_INET` or :const:`socket.AF_INET6` families. Resolution |
| 16986 |
may not make sense for other families, like :const:`socket.AF_BLUETOOTH` |
| 16987 |
and :const:`socket.AF_UNIX`. |
| 16988 |
|
| 16989 |
- bpo-14265: Adds the fully qualified test name to unittest output |
| 16990 |
|
| 16991 |
- bpo-47061: Deprecate the aifc module. |
| 16992 |
|
| 16993 |
- bpo-39622: Handle Ctrl+C in asyncio programs to interrupt the main task. |
| 16994 |
|
| 16995 |
- bpo-47101: :const:`hashlib.algorithms_available` now lists only algorithms |
| 16996 |
that are provided by activated crypto providers on OpenSSL 3.0. Legacy |
| 16997 |
algorithms are not listed unless the legacy provider has been loaded into |
| 16998 |
the default OSSL context. |
| 16999 |
|
| 17000 |
- bpo-47099: All :exc:`URLError` exception messages raised in |
| 17001 |
:class:`urllib.request.URLopener` now contain a colon between ``ftp |
| 17002 |
error`` and the rest of the message. Previously, |
| 17003 |
:func:`~urllib.request.URLopener.open_ftp` missed the colon. Patch by Oleg |
| 17004 |
Iarygin. |
| 17005 |
|
| 17006 |
- bpo-47099: Exception chaining is changed from |
| 17007 |
:func:`Exception.with_traceback`/:func:`sys.exc_info` to :pep:`3134`. |
| 17008 |
Patch by Oleg Iarygin. |
| 17009 |
|
| 17010 |
- bpo-47095: :mod:`hashlib`'s internal ``_blake2`` module now prefers |
| 17011 |
``libb2`` from https://www.blake2.net/ over Python's vendored copy of |
| 17012 |
blake2. |
| 17013 |
|
| 17014 |
- bpo-47098: The Keccak Code Package for :mod:`hashlib`'s internal ``_sha3`` |
| 17015 |
module has been replaced with tiny_sha3. The module is used as fallback |
| 17016 |
when Python is built without OpenSSL. |
| 17017 |
|
| 17018 |
- bpo-47088: Implement :data:`typing.LiteralString`, part of :pep:`675`. |
| 17019 |
Patch by Jelle Zijlstra. |
| 17020 |
|
| 17021 |
- bpo-42885: Optimize :func:`re.search`, :func:`re.split`, |
| 17022 |
:func:`re.findall`, :func:`re.finditer` and :func:`re.sub` for regular |
| 17023 |
expressions starting with ``\A`` or ``^``. |
| 17024 |
|
| 17025 |
- bpo-23691: Protect the :func:`re.finditer` iterator from re-entering. |
| 17026 |
|
| 17027 |
- bpo-47067: Optimize calling ``GenericAlias`` objects by using :pep:`590` |
| 17028 |
``vectorcall`` and by replacing ``PyObject_SetAttrString`` with |
| 17029 |
``PyObject_SetAttr``. |
| 17030 |
|
| 17031 |
- bpo-28080: Add the *metadata_encoding* parameter in the |
| 17032 |
:class:`zipfile.ZipFile` constructor and the ``--metadata-encoding`` |
| 17033 |
option in the :mod:`zipfile` CLI to allow reading zipfiles using |
| 17034 |
non-standard codecs to encode the filenames within the archive. |
| 17035 |
|
| 17036 |
- bpo-47000: Make :func:`io.text_encoding` returns "utf-8" when UTF-8 mode |
| 17037 |
is enabled. |
| 17038 |
|
| 17039 |
- bpo-42369: Fix thread safety of :meth:`zipfile._SharedFile.tell` to avoid |
| 17040 |
a "zipfile.BadZipFile: Bad CRC-32 for file" exception when reading a |
| 17041 |
:class:`ZipFile` from multiple threads. |
| 17042 |
|
| 17043 |
- bpo-38256: Fix :func:`binascii.crc32` when it is compiled to use zlib'c |
| 17044 |
crc32 to work properly on inputs 4+GiB in length instead of returning the |
| 17045 |
wrong result. The workaround prior to this was to always feed the function |
| 17046 |
data in increments smaller than 4GiB or to just call the zlib module |
| 17047 |
function. |
| 17048 |
|
| 17049 |
We also have :func:`binascii.crc32` release the GIL when computing on |
| 17050 |
larger inputs as :func:`zlib.crc32` and :mod:`hashlib` do. |
| 17051 |
|
| 17052 |
This also boosts performance on Windows as it now uses the zlib crc32 |
| 17053 |
implementation for :func:`binascii.crc32` for a 2-3x speedup. |
| 17054 |
|
| 17055 |
That the stdlib has a crc32 API in two modules is a known historical |
| 17056 |
oddity. This moves us closer to a single implementation behind them. |
| 17057 |
|
| 17058 |
- bpo-47066: Global inline flags (e.g. ``(?i)``) can now only be used at the |
| 17059 |
start of the regular expressions. Using them not at the start of |
| 17060 |
expression was deprecated since Python 3.6. |
| 17061 |
|
| 17062 |
- bpo-39394: A warning about inline flags not at the start of the regular |
| 17063 |
expression now contains the position of the flag. |
| 17064 |
|
| 17065 |
- bpo-433030: Add support of atomic grouping (``(?>...)``) and possessive |
| 17066 |
quantifiers (``*+``, ``++``, ``?+``, ``{m,n}+``) in :mod:`regular |
| 17067 |
expressions <re>`. |
| 17068 |
|
| 17069 |
- bpo-47062: Implement :class:`asyncio.Runner` context manager. |
| 17070 |
|
| 17071 |
- bpo-46382: :func:`~dataclasses.dataclass` ``slots=True`` now correctly |
| 17072 |
omits slots already defined in base classes. Patch by Arie Bovenberg. |
| 17073 |
|
| 17074 |
- bpo-47057: Use FASTCALL convention for ``FutureIter.throw()`` |
| 17075 |
|
| 17076 |
- bpo-47061: Deprecate the various modules listed by :pep:`594`: |
| 17077 |
|
| 17078 |
aifc, asynchat, asyncore, audioop, cgi, cgitb, chunk, crypt, imghdr, |
| 17079 |
msilib, nntplib, nis, ossaudiodev, pipes, smtpd, sndhdr, spwd, sunau, |
| 17080 |
telnetlib, uu, xdrlib |
| 17081 |
|
| 17082 |
- bpo-34790: Remove passing coroutine objects to :func:`asyncio.wait`. |
| 17083 |
|
| 17084 |
- bpo-47039: Normalize ``repr()`` of asyncio future and task objects. |
| 17085 |
|
| 17086 |
- bpo-2604: Fix bug where doctests using globals would fail when run |
| 17087 |
multiple times. |
| 17088 |
|
| 17089 |
- bpo-45150: Add :func:`hashlib.file_digest` helper for efficient hashing of |
| 17090 |
file object. |
| 17091 |
|
| 17092 |
- bpo-34861: Made cumtime the default sorting key for cProfile |
| 17093 |
|
| 17094 |
- bpo-45997: Fix :class:`asyncio.Semaphore` re-aquiring FIFO order. |
| 17095 |
|
| 17096 |
- bpo-47022: The :mod:`!asynchat`, :mod:`!asyncore` and :mod:`!smtpd` |
| 17097 |
modules have been deprecated since at least Python 3.6. Their |
| 17098 |
documentation and deprecation warnings and have now been updated to note |
| 17099 |
they will removed in Python 3.12 (:pep:`594`). |
| 17100 |
|
| 17101 |
- bpo-43253: Fix a crash when closing transports where the underlying socket |
| 17102 |
handle is already invalid on the Proactor event loop. |
| 17103 |
|
| 17104 |
- bpo-40280: :func:`select.select` now passes ``NULL`` to ``select`` for |
| 17105 |
each empty fdset. |
| 17106 |
|
| 17107 |
- bpo-47004: Apply bugfixes from importlib_metadata 4.11.3, including bugfix |
| 17108 |
for EntryPoint.extras, which was returning match objects and not the |
| 17109 |
extras strings. |
| 17110 |
|
| 17111 |
- bpo-46998: Allow subclassing of :class:`typing.Any`. Patch by Shantanu |
| 17112 |
Jain. |
| 17113 |
|
| 17114 |
- bpo-46995: Deprecate missing :meth:`asyncio.Task.set_name` for third-party |
| 17115 |
task implementations, schedule making it mandatory in Python 3.13. |
| 17116 |
|
| 17117 |
- bpo-46994: Accept explicit contextvars.Context in |
| 17118 |
:func:`asyncio.create_task` and :meth:`asyncio.loop.create_task`. |
| 17119 |
|
| 17120 |
- bpo-46981: ``typing.get_args(typing.Tuple[()])`` now returns ``()`` |
| 17121 |
instead of ``((),)``. |
| 17122 |
|
| 17123 |
- bpo-46968: Add ``os.sysconf_names['SC_MINSIGSTKSZ']``. |
| 17124 |
|
| 17125 |
- bpo-46985: Upgrade pip wheel bundled with ensurepip (pip 22.0.4) |
| 17126 |
|
| 17127 |
- bpo-46968: :mod:`faulthandler`: On Linux 5.14 and newer, dynamically |
| 17128 |
determine size of signal handler stack size CPython allocates using |
| 17129 |
``getauxval(AT_MINSIGSTKSZ)``. This changes allows for Python extension's |
| 17130 |
request to Linux kernel to use AMX_TILE instruction set on Sapphire Rapids |
| 17131 |
Xeon processor to succeed, unblocking use of the ISA in frameworks. |
| 17132 |
|
| 17133 |
- bpo-46917: The :data:`math.nan` value is now always available. Patch by |
| 17134 |
Victor Stinner. |
| 17135 |
|
| 17136 |
- bpo-46955: Expose :class:`asyncio.base_events.Server` as |
| 17137 |
:class:`asyncio.Server`. Patch by Stefan Zabka. |
| 17138 |
|
| 17139 |
- bpo-23325: The :mod:`signal` module no longer assumes that |
| 17140 |
:const:`~signal.SIG_IGN` and :const:`~signal.SIG_DFL` are small int |
| 17141 |
singletons. |
| 17142 |
|
| 17143 |
- bpo-46932: Update bundled libexpat to 2.4.7 |
| 17144 |
|
| 17145 |
- bpo-46933: The :mod:`pwd` module is now optional. |
| 17146 |
:func:`os.path.expanduser` returns the path when the :mod:`pwd` module is |
| 17147 |
not available. |
| 17148 |
|
| 17149 |
- bpo-40059: :pep:`680`, the :mod:`tomllib` module. Adds support for parsing |
| 17150 |
TOML. |
| 17151 |
|
| 17152 |
- bpo-464471: :func:`asyncio.timeout` and :func:`asyncio.timeout_at` context |
| 17153 |
managers added. Patch by Tin Tvrtković and Andrew Svetlov. |
| 17154 |
|
| 17155 |
- bpo-46805: Added raw datagram socket functions for asyncio: |
| 17156 |
:meth:`~asyncio.AbstractEventLoop.sock_sendto`, |
| 17157 |
:meth:`~asyncio.AbstractEventLoop.sock_recvfrom` and |
| 17158 |
:meth:`~asyncio.AbstractEventLoop.sock_recvfrom_into`. |
| 17159 |
|
| 17160 |
- bpo-46644: No longer require valid typeforms to be callable. This allows |
| 17161 |
:data:`typing.Annotated` to wrap :data:`typing.ParamSpecArgs` and |
| 17162 |
:data:`dataclasses.InitVar`. Patch by Gregory Beauregard. |
| 17163 |
|
| 17164 |
- bpo-46581: Brings :class:`ParamSpec` propagation for :class:`GenericAlias` |
| 17165 |
in line with :class:`Concatenate` (and others). |
| 17166 |
|
| 17167 |
- bpo-45413: Define *posix_venv* and *nt_venv* :ref:`sysconfig installation |
| 17168 |
schemes <installation_paths>` to be used for bootstrapping new virtual |
| 17169 |
environments. Add *venv* sysconfig installation scheme to get the |
| 17170 |
appropriate one of the above. The schemes are identical to the |
| 17171 |
pre-existing *posix_prefix* and *nt* install schemes. The :mod:`venv` |
| 17172 |
module now uses the *venv* scheme to create new virtual environments |
| 17173 |
instead of hardcoding the paths depending only on the platform. Downstream |
| 17174 |
Python distributors customizing the *posix_prefix* or *nt* install scheme |
| 17175 |
in a way that is not compatible with the install scheme used in virtual |
| 17176 |
environments are encouraged not to customize the *venv* schemes. When |
| 17177 |
Python itself runs in a virtual environment, |
| 17178 |
:func:`sysconfig.get_default_scheme` and |
| 17179 |
:func:`sysconfig.get_preferred_scheme` with ``key="prefix"`` returns |
| 17180 |
*venv*. |
| 17181 |
|
| 17182 |
- bpo-43224: Implement support for PEP 646 in typing.py. |
| 17183 |
|
| 17184 |
- bpo-43224: Allow unpacking types.GenericAlias objects, e.g. ``*tuple[int, |
| 17185 |
str]``. |
| 17186 |
|
| 17187 |
- bpo-46557: Warnings captured by the logging module are now logged without |
| 17188 |
a format string to prevent systems that group logs by the msg argument |
| 17189 |
from grouping captured warnings together. |
| 17190 |
|
| 17191 |
- bpo-41370: :func:`typing.get_type_hints` now supports evaluating strings |
| 17192 |
as forward references in :ref:`PEP 585 generic aliases |
| 17193 |
<types-genericalias>`. |
| 17194 |
|
| 17195 |
- bpo-46607: Add :exc:`DeprecationWarning` to :class:`!LegacyInterpolation`, |
| 17196 |
deprecated in the docstring since Python 3.2. Will be removed in Python |
| 17197 |
3.13. Use :class:`BasicInterpolation` or :class:`ExtendedInterpolation` |
| 17198 |
instead. |
| 17199 |
|
| 17200 |
- bpo-26120: :mod:`pydoc` now excludes __future__ imports from the module's |
| 17201 |
data items. |
| 17202 |
|
| 17203 |
- bpo-46480: Add :func:`typing.assert_type`. Patch by Jelle Zijlstra. |
| 17204 |
|
| 17205 |
- bpo-46421: Fix a unittest issue where if the command was invoked as |
| 17206 |
``python -m unittest`` and the filename(s) began with a dot (.), a |
| 17207 |
``ValueError`` is returned. |
| 17208 |
|
| 17209 |
- bpo-46245: Add optional parameter *dir_fd* in :func:`shutil.rmtree`. |
| 17210 |
|
| 17211 |
- bpo-22859: :meth:`!unittest.TestProgram.usageExit` is marked as |
| 17212 |
deprecated, to be removed in Python 3.13. |
| 17213 |
|
| 17214 |
- bpo-46170: Improve the error message when you try to subclass an instance |
| 17215 |
of :class:`typing.NewType`. |
| 17216 |
|
| 17217 |
- bpo-40296: Fix supporting generic aliases in :mod:`pydoc`. |
| 17218 |
|
| 17219 |
- bpo-20392: Fix inconsistency with uppercase file extensions in |
| 17220 |
:meth:`MimeTypes.guess_type`. Patch by Kumar Aditya. |
| 17221 |
|
| 17222 |
- bpo-46030: Add ``LOCAL_CREDS``, ``LOCAL_CREDS_PERSISTENT`` and |
| 17223 |
``SCM_CREDS2`` FreeBSD constants to the socket module. |
| 17224 |
|
| 17225 |
- bpo-44439: Fix ``.write()`` method of a member file in ``ZipFile``, when |
| 17226 |
the input data is an object that supports the buffer protocol, the file |
| 17227 |
length may be wrong. |
| 17228 |
|
| 17229 |
- bpo-45171: Fix handling of the ``stacklevel`` argument to logging |
| 17230 |
functions in the :mod:`logging` module so that it is consistent across all |
| 17231 |
logging functions and, as advertised, similar to the ``stacklevel`` |
| 17232 |
argument used in :meth:`~warnings.warn`. |
| 17233 |
|
| 17234 |
- bpo-24959: Fix bug where :mod:`unittest` sometimes drops frames from |
| 17235 |
tracebacks of exceptions raised in tests. |
| 17236 |
|
| 17237 |
- bpo-44859: Raise more accurate and :pep:`249` compatible exceptions in |
| 17238 |
:mod:`sqlite3`. |
| 17239 |
|
| 17240 |
* Raise :exc:`~sqlite3.InterfaceError` instead of |
| 17241 |
:exc:`~sqlite3.ProgrammingError` for ``SQLITE_MISUSE`` errors. |
| 17242 |
* Don't overwrite :exc:`BufferError` with :exc:`ValueError` when conversion to |
| 17243 |
BLOB fails. |
| 17244 |
* Raise :exc:`~sqlite3.ProgrammingError` instead of :exc:`~sqlite3.Warning` if |
| 17245 |
user tries to :meth:`~sqlite3.Cursor.execute` more than one SQL statement. |
| 17246 |
* Raise :exc:`~sqlite3.ProgrammingError` instead of :exc:`ValueError` if an SQL |
| 17247 |
query contains null characters. |
| 17248 |
|
| 17249 |
- bpo-44493: Add missing terminated NUL in sockaddr_un's length |
| 17250 |
|
| 17251 |
This was potentially observable when using non-abstract AF_UNIX datagram |
| 17252 |
sockets to processes written in another programming language. |
| 17253 |
|
| 17254 |
- bpo-41930: Add :meth:`~sqlite3.Connection.serialize` and |
| 17255 |
:meth:`~sqlite3.Connection.deserialize` support to :mod:`sqlite3`. Patch |
| 17256 |
by Erlend E. Aasland. |
| 17257 |
|
| 17258 |
- bpo-33178: Added :class:`ctypes.BigEndianUnion` and |
| 17259 |
:class:`ctypes.LittleEndianUnion` classes, as originally documented in the |
| 17260 |
library docs but not yet implemented. |
| 17261 |
|
| 17262 |
- bpo-43352: Add an Barrier object in synchronization primitives of |
| 17263 |
*asyncio* Lib in order to be consistent with Barrier from *threading* and |
| 17264 |
*multiprocessing* libs* |
| 17265 |
|
| 17266 |
- bpo-35859: :mod:`re` module, fix a few bugs about capturing group. In rare |
| 17267 |
cases, capturing group gets an incorrect string. Patch by Ma Lin. |
| 17268 |
|
| 17269 |
Documentation |
| 17270 |
------------- |
| 17271 |
|
| 17272 |
- bpo-45099: Document internal :mod:`asyncio` API. |
| 17273 |
|
| 17274 |
- bpo-47126: Update PEP URLs to :pep:`676`'s new canonical form. |
| 17275 |
|
| 17276 |
- bpo-47040: Clarified the old Python versions compatibility note of |
| 17277 |
:func:`binascii.crc32` / :func:`zlib.adler32` / :func:`zlib.crc32` |
| 17278 |
functions. |
| 17279 |
|
| 17280 |
- bpo-46033: Clarify ``for`` statement execution in its doc. |
| 17281 |
|
| 17282 |
- bpo-45790: Adjust inaccurate phrasing in |
| 17283 |
:doc:`../extending/newtypes_tutorial` about the ``ob_base`` field and the |
| 17284 |
macros used to access its contents. |
| 17285 |
|
| 17286 |
- bpo-42340: Document that in some circumstances :exc:`KeyboardInterrupt` |
| 17287 |
may cause the code to enter an inconsistent state. Provided a sample |
| 17288 |
workaround to avoid it if needed. |
| 17289 |
|
| 17290 |
- bpo-41233: Link the errnos referenced in ``Doc/library/exceptions.rst`` to |
| 17291 |
their respective section in ``Doc/library/errno.rst``, and vice versa. |
| 17292 |
Previously this was only done for EINTR and InterruptedError. Patch by Yan |
| 17293 |
"yyyyyyyan" Orestes. |
| 17294 |
|
| 17295 |
Tests |
| 17296 |
----- |
| 17297 |
|
| 17298 |
- bpo-47205: Skip test for :func:`~os.sched_getaffinity` and |
| 17299 |
:func:`~os.sched_setaffinity` error case on FreeBSD. |
| 17300 |
|
| 17301 |
- bpo-46126: Restore 'descriptions' when running tests internally. |
| 17302 |
|
| 17303 |
- bpo-47104: Rewrite :func:`asyncio.to_thread` tests to use |
| 17304 |
:class:`unittest.IsolatedAsyncioTestCase`. |
| 17305 |
|
| 17306 |
- bpo-40280: The test suite is now passing on the Emscripten platform. All |
| 17307 |
fork, socket, and subprocess-based tests are skipped. |
| 17308 |
|
| 17309 |
- bpo-47037: Skip ``strftime("%4Y")`` feature test on Windows. It can cause |
| 17310 |
an assertion error in debug builds. |
| 17311 |
|
| 17312 |
- bpo-46587: Skip tests if platform's ``strftime`` does not support |
| 17313 |
non-portable glibc extensions. |
| 17314 |
|
| 17315 |
- bpo-47015: A test case for :func:`os.sendfile` is converted from |
| 17316 |
deprecated :mod:`!asyncore` (see :pep:`594`) to :mod:`asyncio`. Patch by |
| 17317 |
Oleg Iarygin. |
| 17318 |
|
| 17319 |
Build |
| 17320 |
----- |
| 17321 |
|
| 17322 |
- bpo-40280: Add configure option :option:`--enable-wasm-dynamic-linking` to |
| 17323 |
enable ``dlopen`` and MAIN_MODULE / SIDE_MODULE on ``wasm32-emscripten``. |
| 17324 |
|
| 17325 |
- bpo-46023: ``makesetup`` now detects and skips all duplicated module |
| 17326 |
definitions. The first entry wins. |
| 17327 |
|
| 17328 |
- bpo-40280: Add SOABI ``wasm32-emscripten`` for Emscripten and |
| 17329 |
``wasm32-wasi`` for WASI on 32bit WASM as well as ``wasm64`` counter |
| 17330 |
parts. |
| 17331 |
|
| 17332 |
- bpo-47032: Ensure Windows install builds fail correctly with a non-zero |
| 17333 |
exit code when part of the build fails. |
| 17334 |
|
| 17335 |
- bpo-47024: Update OpenSSL to 1.1.1n for macOS installers and all Windows |
| 17336 |
builds. |
| 17337 |
|
| 17338 |
- bpo-46996: The :mod:`tkinter` package now requires Tcl/Tk version 8.5.12 |
| 17339 |
or newer. |
| 17340 |
|
| 17341 |
- bpo-46973: Add ``regen-configure`` make target to regenerate configure |
| 17342 |
script with Christian's container image |
| 17343 |
``quay.io/tiran/cpython_autoconf:269``. |
| 17344 |
|
| 17345 |
- bpo-46917: Building Python now requires support of IEEE 754 floating-point |
| 17346 |
numbers. Patch by Victor Stinner. |
| 17347 |
|
| 17348 |
- bpo-45774: ``configure`` now verifies that all SQLite C APIs needed for |
| 17349 |
the :mod:`sqlite3` extension module are found. |
| 17350 |
|
| 17351 |
Windows |
| 17352 |
------- |
| 17353 |
|
| 17354 |
- bpo-47194: Update ``zlib`` to v1.2.12 to resolve :cve:`2018-25032`. |
| 17355 |
|
| 17356 |
- bpo-47171: Enables installing the :file:`py.exe` launcher on Windows |
| 17357 |
ARM64. |
| 17358 |
|
| 17359 |
- bpo-46566: Upgraded :ref:`launcher` to support a new ``-V:company/tag`` |
| 17360 |
argument for full :pep:`514` support and to detect ARM64 installs. The |
| 17361 |
``-64`` suffix on arguments is deprecated, but still selects any |
| 17362 |
non-32-bit install. Setting :envvar:`PYLAUNCHER_ALLOW_INSTALL` and |
| 17363 |
specifying a version that is not installed will attempt to install the |
| 17364 |
requested version from the Microsoft Store. |
| 17365 |
|
| 17366 |
- bpo-47086: The installer for Windows now includes documentation as loose |
| 17367 |
HTML files rather than a single compiled :file:`.chm` file. |
| 17368 |
|
| 17369 |
- bpo-46907: Update Windows installer to use SQLite 3.38.1. |
| 17370 |
|
| 17371 |
- bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate |
| 17372 |
:cve:`2016-3189` and :cve:`2019-12900`. |
| 17373 |
|
| 17374 |
- bpo-46948: Prevent :cve:`2022-26488` by ensuring the Add to PATH option in |
| 17375 |
the Windows installer uses the correct path when being repaired. |
| 17376 |
|
| 17377 |
macOS |
| 17378 |
----- |
| 17379 |
|
| 17380 |
- bpo-46890: Fix a regression in the setting of ``sys._base_executable`` in |
| 17381 |
framework builds, and thereby fix a regression in :mod:`venv` virtual |
| 17382 |
environments with such builds. |
| 17383 |
|
| 17384 |
- bpo-46907: Update macOS installer to SQLite 3.38.1. |
| 17385 |
|
| 17386 |
Tools/Demos |
| 17387 |
----------- |
| 17388 |
|
| 17389 |
- bpo-40280: Replace Emscripten's limited shell with Katie Bell's browser-ui |
| 17390 |
REPL from python-wasm project. |
| 17391 |
|
| 17392 |
C API |
| 17393 |
----- |
| 17394 |
|
| 17395 |
- bpo-40421: Add ``PyFrame_GetBuiltins``, ``PyFrame_GetGenerator`` and |
| 17396 |
``PyFrame_GetGlobals`` C-API functions to access frame object attributes |
| 17397 |
safely from C code. |
| 17398 |
|
| 17399 |
- bpo-46850: Move the private ``_PyFrameEvalFunction`` type, and private |
| 17400 |
``_PyInterpreterState_GetEvalFrameFunc()`` and |
| 17401 |
``_PyInterpreterState_SetEvalFrameFunc()`` functions to the internal C |
| 17402 |
API. The ``_PyFrameEvalFunction`` callback function type now uses the |
| 17403 |
``_PyInterpreterFrame`` type which is part of the internal C API. Patch by |
| 17404 |
Victor Stinner. |
| 17405 |
|
| 17406 |
- bpo-46850: Move the private undocumented ``_PyEval_EvalFrameDefault()`` |
| 17407 |
function to the internal C API. The function now uses the |
| 17408 |
``_PyInterpreterFrame`` type which is part of the internal C API. Patch by |
| 17409 |
Victor Stinner. |
| 17410 |
|
| 17411 |
- bpo-46850: Remove the private undocumented function |
| 17412 |
``_PyEval_CallTracing()`` from the C API. Call the public |
| 17413 |
:func:`sys.call_tracing` function instead. Patch by Victor Stinner. |
| 17414 |
|
| 17415 |
- bpo-46850: Remove the private undocumented function |
| 17416 |
``_PyEval_GetCoroutineOriginTrackingDepth()`` from the C API. Call the |
| 17417 |
public :func:`sys.get_coroutine_origin_tracking_depth` function instead. |
| 17418 |
Patch by Victor Stinner. |
| 17419 |
|
| 17420 |
- bpo-46850: Remove the following private undocumented functions from the C |
| 17421 |
API: |
| 17422 |
|
| 17423 |
* ``_PyEval_GetAsyncGenFirstiter()`` |
| 17424 |
* ``_PyEval_GetAsyncGenFinalizer()`` |
| 17425 |
* ``_PyEval_SetAsyncGenFirstiter()`` |
| 17426 |
* ``_PyEval_SetAsyncGenFinalizer()`` |
| 17427 |
|
| 17428 |
Call the public :func:`sys.get_asyncgen_hooks` and |
| 17429 |
:func:`sys.set_asyncgen_hooks` functions instead. Patch by Victor Stinner. |
| 17430 |
|
| 17431 |
- bpo-46987: Remove private functions ``_PySys_GetObjectId()`` and |
| 17432 |
``_PySys_SetObjectId()``. Patch by Donghee Na. |
| 17433 |
|
| 17434 |
- bpo-46906: Add new functions to pack and unpack C double (serialize and |
| 17435 |
deserialize): :c:func:`PyFloat_Pack2`, :c:func:`PyFloat_Pack4`, |
| 17436 |
:c:func:`PyFloat_Pack8`, :c:func:`PyFloat_Unpack2`, |
| 17437 |
:c:func:`PyFloat_Unpack4` and :c:func:`PyFloat_Unpack8`. Patch by Victor |
| 17438 |
Stinner. |
| 17439 |
|
| 17440 |
|
| 17441 |
What's New in Python 3.11.0 alpha 6? |
| 17442 |
==================================== |
| 17443 |
|
| 17444 |
*Release date: 2022-03-07* |
| 17445 |
|
| 17446 |
Core and Builtins |
| 17447 |
----------------- |
| 17448 |
|
| 17449 |
- bpo-46940: Avoid overriding :exc:`AttributeError` metadata information for |
| 17450 |
nested attribute access calls. Patch by Pablo Galindo. |
| 17451 |
|
| 17452 |
- bpo-46927: Include the type's name in the error message for subscripting |
| 17453 |
non-generic types. |
| 17454 |
|
| 17455 |
- bpo-46921: Support vectorcall for ``super()``. Patch by Ken Jin. |
| 17456 |
|
| 17457 |
- bpo-46841: Fix incorrect handling of inline cache entries when |
| 17458 |
specializing :opcode:`BINARY_OP`. |
| 17459 |
|
| 17460 |
- bpo-46841: Use an oparg to simplify the construction of helpful error |
| 17461 |
messages in :opcode:`GET_AWAITABLE`. |
| 17462 |
|
| 17463 |
- bpo-46903: Make sure that str subclasses can be used as attribute names |
| 17464 |
for instances with virtual dictionaries. Fixes regression in 3.11alpha |
| 17465 |
|
| 17466 |
- bpo-46841: Add more detailed specialization failure stats for |
| 17467 |
:opcode:`COMPARE_OP` followed by :opcode:`EXTENDED_ARG`. |
| 17468 |
|
| 17469 |
- bpo-46891: Fix bug introduced during 3.11alpha where subclasses of |
| 17470 |
``types.ModuleType`` with ``__slots__`` were not initialized correctly, |
| 17471 |
resulting in an interpreter crash. |
| 17472 |
|
| 17473 |
- bpo-46841: Use inline caching for :opcode:`LOAD_ATTR`, |
| 17474 |
:opcode:`LOAD_METHOD`, and :opcode:`STORE_ATTR`. |
| 17475 |
|
| 17476 |
- bpo-46841: Use inline cache for :opcode:`BINARY_SUBSCR`. |
| 17477 |
|
| 17478 |
- bpo-46841: Use inline caching for :opcode:`COMPARE_OP`. |
| 17479 |
|
| 17480 |
- bpo-46864: Deprecate ``PyBytesObject.ob_shash``. It will be removed in |
| 17481 |
Python 3.13. |
| 17482 |
|
| 17483 |
- bpo-46841: Use inline caching for :opcode:`UNPACK_SEQUENCE`. |
| 17484 |
|
| 17485 |
- bpo-46845: Reduces dict size by removing hash value from hash table when |
| 17486 |
all inserted keys are Unicode. For example, |
| 17487 |
``sys.getsizeof(dict.fromkeys("abcdefg"))`` becomes 272 bytes from 352 |
| 17488 |
bytes on 64bit platform. |
| 17489 |
|
| 17490 |
- bpo-46841: Use inline cache for :opcode:`LOAD_GLOBAL`. |
| 17491 |
|
| 17492 |
- bpo-46852: Rename the private undocumented ``float.__set_format__()`` |
| 17493 |
method to ``float.__setformat__()`` to fix a typo introduced in Python |
| 17494 |
3.7. The method is only used by test_float. Patch by Victor Stinner. |
| 17495 |
|
| 17496 |
- bpo-46852: Remove the undocumented private ``float.__set_format__()`` |
| 17497 |
method, previously known as ``float.__setformat__()`` in Python 3.7. Its |
| 17498 |
docstring said: "You probably don't want to use this function. It exists |
| 17499 |
mainly to be used in Python's test suite." Patch by Victor Stinner. |
| 17500 |
|
| 17501 |
- bpo-40116: Fix regression that dict.update(other) may don't respect |
| 17502 |
iterate order of other when other is key sharing dict. |
| 17503 |
|
| 17504 |
- bpo-46712: Share global string identifiers in deep-frozen modules. |
| 17505 |
|
| 17506 |
- bpo-46430: Fix memory leak in interned strings of deep-frozen modules. |
| 17507 |
|
| 17508 |
- bpo-46841: Store :opcode:`BINARY_OP` caches inline using a new |
| 17509 |
:opcode:`CACHE` instruction. |
| 17510 |
|
| 17511 |
- bpo-45107: Specialize ``LOAD_METHOD`` for instances with a dict. |
| 17512 |
|
| 17513 |
- bpo-44337: Reduce the memory usage of specialized :opcode:`LOAD_ATTR` and |
| 17514 |
:opcode:`STORE_ATTR` instructions. |
| 17515 |
|
| 17516 |
- bpo-46729: Add number of sub-exceptions to :meth:`BaseException.__str__`. |
| 17517 |
|
| 17518 |
- bpo-45885: Don't un-adapt :opcode:`COMPARE_OP` when collecting |
| 17519 |
specialization stats. |
| 17520 |
|
| 17521 |
- bpo-46329: Fix specialization stats gathering for :opcode:`!PRECALL` |
| 17522 |
instructions. |
| 17523 |
|
| 17524 |
Library |
| 17525 |
------- |
| 17526 |
|
| 17527 |
- bpo-46794: Bump up the libexpat version into 2.4.6 |
| 17528 |
|
| 17529 |
Core and Builtins |
| 17530 |
----------------- |
| 17531 |
|
| 17532 |
- bpo-46823: Implement a specialized combined opcode |
| 17533 |
``LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE``. Patch by Dennis Sweeney. |
| 17534 |
|
| 17535 |
- bpo-46820: Fix parsing a numeric literal immediately (without spaces) |
| 17536 |
followed by "not in" keywords, like in ``1not in x``. Now the parser only |
| 17537 |
emits a warning, not a syntax error. |
| 17538 |
|
| 17539 |
- bpo-46329: Move ``KW_NAMES`` before ``PRECALL`` instruction in call |
| 17540 |
sequence. Change ``operand`` of ``CALL`` to match ``PRECALL`` for easier |
| 17541 |
specialization. |
| 17542 |
|
| 17543 |
- bpo-46808: Remove the ``NEXT_BLOCK`` macro from compile.c, and make the |
| 17544 |
compiler automatically generate implicit blocks when they are needed. |
| 17545 |
|
| 17546 |
- bpo-46329: Add ``PUSH_NULL`` instruction. This is used as a prefix when |
| 17547 |
evaluating a callable, so that the stack has the same shape for methods |
| 17548 |
and other calls. ``PRECALL_FUNCTION`` and ``PRECALL_METHOD`` are merged |
| 17549 |
into a single ``PRECALL`` instruction. |
| 17550 |
|
| 17551 |
There is no change in semantics. |
| 17552 |
|
| 17553 |
- bpo-46762: Fix an assert failure in debug builds when a '<', '>', or '=' |
| 17554 |
is the last character in an f-string that's missing a closing right brace. |
| 17555 |
|
| 17556 |
- bpo-46730: Message of AttributeError caused by getting, setting or |
| 17557 |
deleting a property without the corresponding function now mentions that |
| 17558 |
the attribute is in fact a property and also specifies type of the class |
| 17559 |
that it belongs to. |
| 17560 |
|
| 17561 |
- bpo-46724: Make sure that all backwards jumps use the ``JUMP_ABSOLUTE`` |
| 17562 |
instruction, rather than ``JUMP_FORWARD`` with an argument of |
| 17563 |
``(2**32)+offset``. |
| 17564 |
|
| 17565 |
- bpo-46732: Correct the docstring for the :meth:`~object.__bool__` method. |
| 17566 |
Patch by Jelle Zijlstra. |
| 17567 |
|
| 17568 |
- bpo-46072: Add more detailed specialization failure statistics for |
| 17569 |
:opcode:`BINARY_OP`. |
| 17570 |
|
| 17571 |
- bpo-46707: Avoid potential exponential backtracking when producing some |
| 17572 |
syntax errors involving lots of brackets. Patch by Pablo Galindo. |
| 17573 |
|
| 17574 |
Library |
| 17575 |
------- |
| 17576 |
|
| 17577 |
- bpo-46323: :mod:`ctypes` now allocates memory on the stack instead of on |
| 17578 |
the heap to pass arguments while calling a Python callback function. Patch |
| 17579 |
by Donghee Na. |
| 17580 |
|
| 17581 |
Core and Builtins |
| 17582 |
----------------- |
| 17583 |
|
| 17584 |
- bpo-45923: Add a quickened form of :opcode:`RESUME` that skips quickening |
| 17585 |
checks. |
| 17586 |
|
| 17587 |
- bpo-46702: Specialize :opcode:`UNPACK_SEQUENCE` for :class:`tuple` and |
| 17588 |
:class:`list` unpackings. |
| 17589 |
|
| 17590 |
- bpo-46072: Opcode pair stats are now gathered with ``--enable-pystats``. |
| 17591 |
Defining ``DYNAMIC_EXECUTION_PROFILE`` or ``DXPAIRS`` no longer has any |
| 17592 |
effect. |
| 17593 |
|
| 17594 |
- bpo-46675: Allow more than 16 items in a split dict before it is combined. |
| 17595 |
The limit is now 254. |
| 17596 |
|
| 17597 |
Library |
| 17598 |
------- |
| 17599 |
|
| 17600 |
- bpo-40479: Add a missing call to ``va_end()`` in |
| 17601 |
``Modules/_hashopenssl.c``. |
| 17602 |
|
| 17603 |
- bpo-46323: Use :c:func:`PyObject_Vectorcall` while calling ctypes callback |
| 17604 |
function. Patch by Donghee Na. |
| 17605 |
|
| 17606 |
Core and Builtins |
| 17607 |
----------------- |
| 17608 |
|
| 17609 |
- bpo-46615: When iterating over sets internally in ``setobject.c``, acquire |
| 17610 |
strong references to the resulting items from the set. This prevents |
| 17611 |
crashes in corner-cases of various set operations where the set gets |
| 17612 |
mutated. |
| 17613 |
|
| 17614 |
- bpo-45828: The bytecode compiler now attempts to apply runtime stack |
| 17615 |
manipulations at compile-time (whenever it is feasible to do so). |
| 17616 |
|
| 17617 |
- bpo-30496: Fixed a minor portability issue in the implementation of |
| 17618 |
:c:func:`PyLong_FromLong`, and added a fast path for single-digit integers |
| 17619 |
to :c:func:`PyLong_FromLongLong`. |
| 17620 |
|
| 17621 |
Library |
| 17622 |
------- |
| 17623 |
|
| 17624 |
- bpo-25707: Fixed a file leak in :func:`xml.etree.ElementTree.iterparse` |
| 17625 |
when the iterator is not exhausted. Patch by Jacob Walls. |
| 17626 |
|
| 17627 |
- bpo-46877: Export :func:`unittest.doModuleCleanups` in :mod:`unittest`. |
| 17628 |
Patch by Kumar Aditya. |
| 17629 |
|
| 17630 |
- bpo-46848: For performance, use the optimized string-searching |
| 17631 |
implementations from :meth:`~bytes.find` and :meth:`~bytes.rfind` for |
| 17632 |
:meth:`~mmap.find` and :meth:`~mmap.rfind`. |
| 17633 |
|
| 17634 |
- bpo-46736: :class:`~http.server.SimpleHTTPRequestHandler` now uses HTML5 |
| 17635 |
grammar. Patch by Donghee Na. |
| 17636 |
|
| 17637 |
- bpo-44886: Inherit asyncio proactor datagram transport from |
| 17638 |
:class:`asyncio.DatagramTransport`. |
| 17639 |
|
| 17640 |
- bpo-46827: Support UDP sockets in :meth:`asyncio.loop.sock_connect` for |
| 17641 |
selector-based event loops. Patch by Thomas Grainger. |
| 17642 |
|
| 17643 |
- bpo-46811: Make test suite support Expat >=2.4.5 |
| 17644 |
|
| 17645 |
- bpo-46252: Raise :exc:`TypeError` if :class:`ssl.SSLSocket` is passed to |
| 17646 |
transport-based APIs. |
| 17647 |
|
| 17648 |
- bpo-46784: Fix libexpat symbols collisions with user dynamically loaded or |
| 17649 |
statically linked libexpat in embedded Python. |
| 17650 |
|
| 17651 |
- bpo-46786: The HTML serialisation in xml.etree.ElementTree now writes |
| 17652 |
``embed``, ``source``, ``track`` and ``wbr`` as empty tags, as defined in |
| 17653 |
HTML 5. |
| 17654 |
|
| 17655 |
- bpo-39327: :func:`shutil.rmtree` can now work with VirtualBox shared |
| 17656 |
folders when running from the guest operating-system. |
| 17657 |
|
| 17658 |
- bpo-45390: Propagate :exc:`asyncio.CancelledError` message from inner task |
| 17659 |
to outer awaiter. |
| 17660 |
|
| 17661 |
- bpo-46756: Fix a bug in |
| 17662 |
:meth:`urllib.request.HTTPPasswordMgr.find_user_password` and |
| 17663 |
:meth:`urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated` which |
| 17664 |
allowed to bypass authorization. For example, access to URI |
| 17665 |
``example.org/foobar`` was allowed if the user was authorized for URI |
| 17666 |
``example.org/foo``. |
| 17667 |
|
| 17668 |
- bpo-46737: :func:`random.gauss` and :func:`random.normalvariate` now have |
| 17669 |
default arguments. |
| 17670 |
|
| 17671 |
- bpo-46752: Add task groups to asyncio (structured concurrency, inspired by |
| 17672 |
Trio's nurseries). This also introduces a change to task cancellation, |
| 17673 |
where a cancelled task can't be cancelled again until it calls |
| 17674 |
.uncancel(). |
| 17675 |
|
| 17676 |
- bpo-46724: Fix :mod:`dis` behavior on negative jump offsets. |
| 17677 |
|
| 17678 |
- bpo-46333: The :meth:`__repr__` method of :class:`typing.ForwardRef` now |
| 17679 |
includes the ``module`` parameter of :class:`typing.ForwardRef` when it is |
| 17680 |
set. |
| 17681 |
|
| 17682 |
- bpo-46643: In :func:`typing.get_type_hints`, support evaluating |
| 17683 |
stringified ``ParamSpecArgs`` and ``ParamSpecKwargs`` annotations. Patch |
| 17684 |
by Gregory Beauregard. |
| 17685 |
|
| 17686 |
- bpo-45863: When the :mod:`tarfile` module creates a pax format archive, it |
| 17687 |
will put an integer representation of timestamps in the ustar header (if |
| 17688 |
possible) for the benefit of older unarchivers, in addition to the |
| 17689 |
existing full-precision timestamps in the pax extended header. |
| 17690 |
|
| 17691 |
- bpo-46066: Deprecate kwargs-based syntax for :class:`typing.TypedDict` |
| 17692 |
definitions. It had confusing semantics when specifying totality, and was |
| 17693 |
largely unused. Patch by Jingchen Ye. |
| 17694 |
|
| 17695 |
- bpo-46676: Make :data:`typing.ParamSpec` args and kwargs equal to |
| 17696 |
themselves. Patch by Gregory Beauregard. |
| 17697 |
|
| 17698 |
- bpo-46323: ``ctypes.CFUNCTYPE()`` and ``ctypes.WINFUNCTYPE()`` now fail to |
| 17699 |
create the type if its ``_argtypes_`` member contains too many arguments. |
| 17700 |
Previously, the error was only raised when calling a function. Patch by |
| 17701 |
Victor Stinner. |
| 17702 |
|
| 17703 |
- bpo-46672: Fix ``NameError`` in :func:`asyncio.gather` when initial type |
| 17704 |
check fails. |
| 17705 |
|
| 17706 |
- bpo-46659: The :class:`calendar.LocaleTextCalendar` and |
| 17707 |
:class:`calendar.LocaleHTMLCalendar` classes now use |
| 17708 |
:func:`locale.getlocale`, instead of using |
| 17709 |
:func:`locale.getdefaultlocale`, if no locale is specified. Patch by |
| 17710 |
Victor Stinner. |
| 17711 |
|
| 17712 |
- bpo-46659: The :func:`locale.getdefaultlocale` function is deprecated and |
| 17713 |
will be removed in Python 3.13. Use :func:`locale.setlocale`, |
| 17714 |
:func:`locale.getpreferredencoding(False) <locale.getpreferredencoding>` |
| 17715 |
and :func:`locale.getlocale` functions instead. Patch by Victor Stinner. |
| 17716 |
|
| 17717 |
- bpo-46655: In :func:`typing.get_type_hints`, support evaluating bare |
| 17718 |
stringified ``TypeAlias`` annotations. Patch by Gregory Beauregard. |
| 17719 |
|
| 17720 |
- bpo-45948: Fixed a discrepancy in the C implementation of the |
| 17721 |
:mod:`xml.etree.ElementTree` module. Now, instantiating an |
| 17722 |
:class:`xml.etree.ElementTree.XMLParser` with a ``target=None`` keyword |
| 17723 |
provides a default :class:`xml.etree.ElementTree.TreeBuilder` target as |
| 17724 |
the Python implementation does. |
| 17725 |
|
| 17726 |
- bpo-46626: Expose Linux's ``IP_BIND_ADDRESS_NO_PORT`` option in |
| 17727 |
:mod:`socket`. |
| 17728 |
|
| 17729 |
- bpo-46521: Fix a bug in the :mod:`codeop` module that was incorrectly |
| 17730 |
identifying invalid code involving string quotes as valid code. |
| 17731 |
|
| 17732 |
- bpo-46571: Improve :func:`typing.no_type_check`. |
| 17733 |
|
| 17734 |
Now it does not modify external classes and functions. We also now |
| 17735 |
correctly mark classmethods as not to be type checked. |
| 17736 |
|
| 17737 |
- bpo-46400: expat: Update libexpat from 2.4.1 to 2.4.4 |
| 17738 |
|
| 17739 |
- bpo-46556: Deprecate undocumented support for using a |
| 17740 |
:class:`pathlib.Path` object as a context manager. |
| 17741 |
|
| 17742 |
- bpo-46534: Implement :pep:`673` :class:`typing.Self`. Patch by James |
| 17743 |
Hilton-Balfe. |
| 17744 |
|
| 17745 |
- bpo-46522: Make various module ``__getattr__`` AttributeErrors more |
| 17746 |
closely match a typical AttributeError |
| 17747 |
|
| 17748 |
- bpo-46475: Add :data:`typing.Never` and :func:`typing.assert_never`. Patch |
| 17749 |
by Jelle Zijlstra. |
| 17750 |
|
| 17751 |
- bpo-46333: The :meth:`__eq__` and :meth:`__hash__` methods of |
| 17752 |
:class:`typing.ForwardRef` now honor the ``module`` parameter of |
| 17753 |
:class:`typing.ForwardRef`. Forward references from different modules are |
| 17754 |
now differentiated. |
| 17755 |
|
| 17756 |
- bpo-46246: Add missing ``__slots__`` to |
| 17757 |
``importlib.metadata.DeprecatedList``. Patch by Arie Bovenberg. |
| 17758 |
|
| 17759 |
- bpo-46232: The :mod:`ssl` module now handles certificates with bit strings |
| 17760 |
in DN correctly. |
| 17761 |
|
| 17762 |
- bpo-46195: :func:`typing.get_type_hints` no longer adds ``Optional`` to |
| 17763 |
parameters with ``None`` as a default. This aligns to changes to PEP 484 |
| 17764 |
in https://github.com/python/peps/pull/689 |
| 17765 |
|
| 17766 |
- bpo-31369: Add :class:`~re.RegexFlag` to ``re.__all__`` and documented it. |
| 17767 |
Add :data:`~re.RegexFlag.NOFLAG` to indicate no flags being set. |
| 17768 |
|
| 17769 |
- bpo-45898: :mod:`ctypes` no longer defines ``ffi_type_*`` symbols in |
| 17770 |
``cfield.c``. The symbols have been provided by libffi for over a decade. |
| 17771 |
|
| 17772 |
- bpo-44953: Calling ``operator.itemgetter`` objects and |
| 17773 |
``operator.attrgetter`` objects is now faster due to use of the vectorcall |
| 17774 |
calling convention. |
| 17775 |
|
| 17776 |
- bpo-44289: Fix an issue with :meth:`~tarfile.is_tarfile` method when using |
| 17777 |
*fileobj* argument: position in the *fileobj* was advanced forward which |
| 17778 |
made it unreadable with :meth:`tarfile.TarFile.open`. |
| 17779 |
|
| 17780 |
- bpo-44011: Reimplement SSL/TLS support in asyncio, borrow the |
| 17781 |
implementation from uvloop library. |
| 17782 |
|
| 17783 |
- bpo-41086: Make the :class:`configparser.ConfigParser` constructor raise |
| 17784 |
:exc:`TypeError` if the ``interpolation`` parameter is not of type |
| 17785 |
:class:`!configparser.Interpolation` |
| 17786 |
|
| 17787 |
- bpo-29418: Implement :func:`inspect.ismethodwrapper` and fix |
| 17788 |
:func:`inspect.isroutine` for cases where methodwrapper is given. Patch by |
| 17789 |
Hakan Çelik. |
| 17790 |
|
| 17791 |
- bpo-14156: argparse.FileType now supports an argument of '-' in binary |
| 17792 |
mode, returning the .buffer attribute of sys.stdin/sys.stdout as |
| 17793 |
appropriate. Modes including 'x' and 'a' are treated equivalently to 'w' |
| 17794 |
when argument is '-'. Patch contributed by Josh Rosenberg |
| 17795 |
|
| 17796 |
Documentation |
| 17797 |
------------- |
| 17798 |
|
| 17799 |
- bpo-42238: ``Doc/tools/rstlint.py`` has moved to its own repository and is |
| 17800 |
now packaged on PyPI as ``sphinx-lint``. |
| 17801 |
|
| 17802 |
Tests |
| 17803 |
----- |
| 17804 |
|
| 17805 |
- bpo-46913: Fix test_faulthandler.test_sigfpe() if Python is built with |
| 17806 |
undefined behavior sanitizer (UBSAN): disable UBSAN on the |
| 17807 |
faulthandler_sigfpe() function. Patch by Victor Stinner. |
| 17808 |
|
| 17809 |
- bpo-46760: Remove bytecode offsets from expected values in test.test_dis |
| 17810 |
module. Reduces the obstacles to modifying the VM or compiler. |
| 17811 |
|
| 17812 |
- bpo-46708: Prevent default asyncio event loop policy modification warning |
| 17813 |
after ``test_asyncio`` execution. |
| 17814 |
|
| 17815 |
- bpo-46678: The function ``make_legacy_pyc`` in |
| 17816 |
``Lib/test/support/import_helper.py`` no longer fails when |
| 17817 |
``PYTHONPYCACHEPREFIX`` is set to a directory on a different device from |
| 17818 |
where tempfiles are stored. |
| 17819 |
|
| 17820 |
- bpo-46623: Skip test_pair() and test_speech128() of test_zlib on s390x |
| 17821 |
since they fail if zlib uses the s390x hardware accelerator. Patch by |
| 17822 |
Victor Stinner. |
| 17823 |
|
| 17824 |
Build |
| 17825 |
----- |
| 17826 |
|
| 17827 |
- bpo-46860: Respect ``--with-suffix`` when building on case-insensitive |
| 17828 |
file systems. |
| 17829 |
|
| 17830 |
- bpo-46656: Building Python now requires a C11 compiler. Optional C11 |
| 17831 |
features are not required. Patch by Victor Stinner. |
| 17832 |
|
| 17833 |
- bpo-46656: Building Python now requires support for floating-point |
| 17834 |
Not-a-Number (NaN): remove the ``Py_NO_NAN`` macro. Patch by Victor |
| 17835 |
Stinner. |
| 17836 |
|
| 17837 |
- bpo-46640: Building Python now requires a C99 ``<math.h>`` header file |
| 17838 |
providing a ``NAN`` constant, or the ``__builtin_nan()`` built-in |
| 17839 |
function. Patch by Victor Stinner. |
| 17840 |
|
| 17841 |
- bpo-46608: Exclude marshalled-frozen data if deep-freezing to save 300 KB |
| 17842 |
disk space. This includes adding a new ``is_package`` field to |
| 17843 |
:c:struct:`_frozen`. Patch by Kumar Aditya. |
| 17844 |
|
| 17845 |
- bpo-40280: Fix wasm32-emscripten test failures and platform issues. - |
| 17846 |
Disable syscalls that are not supported or don't work, e.g. wait, |
| 17847 |
getrusage, prlimit, mkfifo, mknod, setres[gu]id, setgroups. - Use fd_count |
| 17848 |
to count open fds. - Add more checks for subprocess and fork. - Add |
| 17849 |
workarounds for missing _multiprocessing and failing socket.accept(). - |
| 17850 |
Enable bzip2. - Disable large file support. - Disable signal.alarm. |
| 17851 |
|
| 17852 |
- bpo-46430: Intern strings in deep-frozen modules. Patch by Kumar Aditya. |
| 17853 |
|
| 17854 |
Windows |
| 17855 |
------- |
| 17856 |
|
| 17857 |
- bpo-46744: The default all users install directory for ARM64 is now under |
| 17858 |
the native ``Program Files`` folder, rather than ``Program Files (Arm)`` |
| 17859 |
which is intended for ARM (32-bit) files. |
| 17860 |
|
| 17861 |
- bpo-46567: Adds Tcl and Tk support for Windows ARM64. This also adds IDLE |
| 17862 |
to the installation. |
| 17863 |
|
| 17864 |
- bpo-46638: Ensures registry virtualization is consistently disabled. For |
| 17865 |
3.10 and earlier, it remains enabled (some registry writes are protected), |
| 17866 |
while for 3.11 and later it is disabled (registry modifications affect all |
| 17867 |
applications). |
| 17868 |
|
| 17869 |
IDLE |
| 17870 |
---- |
| 17871 |
|
| 17872 |
- bpo-46630: Make query dialogs on Windows start with a cursor in the entry |
| 17873 |
box. |
| 17874 |
|
| 17875 |
- bpo-45447: Apply IDLE syntax highlighting to ``.pyi`` files. Patch by Alex |
| 17876 |
Waygood and Terry Jan Reedy. |
| 17877 |
|
| 17878 |
C API |
| 17879 |
----- |
| 17880 |
|
| 17881 |
- bpo-46748: Python's public headers no longer import ``<stdbool.h>``, |
| 17882 |
leaving code that embeds/extends Python free to define ``bool``, ``true`` |
| 17883 |
and ``false``. |
| 17884 |
|
| 17885 |
- bpo-46836: Move the :c:type:`PyFrameObject` type definition (``struct |
| 17886 |
_frame``) to the internal C API ``pycore_frame.h`` header file. Patch by |
| 17887 |
Victor Stinner. |
| 17888 |
|
| 17889 |
- bpo-45459: Rename ``Include/buffer.h`` header file to |
| 17890 |
``Include/pybuffer.h`` to avoid conflicts with projects having an existing |
| 17891 |
``buffer.h`` header file. Patch by Victor Stinner. |
| 17892 |
|
| 17893 |
- bpo-45412: Remove the ``HAVE_PY_SET_53BIT_PRECISION`` macro (moved to the |
| 17894 |
internal C API). Patch by Victor Stinner. |
| 17895 |
|
| 17896 |
- bpo-46613: Added function :c:func:`PyType_GetModuleByDef`, which allows |
| 17897 |
access to module state when a method's defining class is not available. |
| 17898 |
|
| 17899 |
|
| 17900 |
What's New in Python 3.11.0 alpha 5? |
| 17901 |
==================================== |
| 17902 |
|
| 17903 |
*Release date: 2022-02-03* |
| 17904 |
|
| 17905 |
Core and Builtins |
| 17906 |
----------------- |
| 17907 |
|
| 17908 |
- bpo-45773: Remove two invalid "peephole" optimizations from the bytecode |
| 17909 |
compiler. |
| 17910 |
|
| 17911 |
- bpo-46564: Do not create frame objects when creating :class:`super` |
| 17912 |
object. Patch by Kumar Aditya. |
| 17913 |
|
| 17914 |
- bpo-45885: Added more fined-grained specialization failure stats regarding |
| 17915 |
the ``COMPARE_OP`` bytecode. |
| 17916 |
|
| 17917 |
- bpo-44977: The delegation of :func:`int` to :meth:`__trunc__` is now |
| 17918 |
deprecated. Calling ``int(a)`` when ``type(a)`` implements |
| 17919 |
:meth:`__trunc__` but not :meth:`__int__` or :meth:`__index__` now raises |
| 17920 |
a :exc:`DeprecationWarning`. |
| 17921 |
|
| 17922 |
- bpo-46458: Reorder code emitted by the compiler for a |
| 17923 |
:keyword:`try`-:keyword:`except` block so that the :keyword:`else` block's |
| 17924 |
code immediately follows the :keyword:`try` body (without a jump). This is |
| 17925 |
more optimal for the happy path. |
| 17926 |
|
| 17927 |
- bpo-46527: Allow passing ``iterable`` as a keyword argument to |
| 17928 |
:func:`enumerate` again. Patch by Jelle Zijlstra. |
| 17929 |
|
| 17930 |
- bpo-46528: Replace several stack manipulation instructions (``DUP_TOP``, |
| 17931 |
``DUP_TOP_TWO``, ``ROT_TWO``, ``ROT_THREE``, ``ROT_FOUR``, and ``ROT_N``) |
| 17932 |
with new :opcode:`COPY` and :opcode:`SWAP` instructions. |
| 17933 |
|
| 17934 |
- bpo-46329: Use two or three bytecodes to implement most calls. |
| 17935 |
|
| 17936 |
Calls without named arguments are implemented as a sequence of two |
| 17937 |
instructions: ``PRECALL; CALL``. Calls with named arguments are |
| 17938 |
implemented as a sequence of three instructions: ``PRECALL; KW_NAMES; |
| 17939 |
CALL``. There are two different ``PRECALL`` instructions: |
| 17940 |
``PRECALL_FUNTION`` and ``PRECALL_METHOD``. The latter pairs with |
| 17941 |
``LOAD_METHOD``. |
| 17942 |
|
| 17943 |
This partition into pre-call and call allows better specialization, and |
| 17944 |
thus better performance ultimately. |
| 17945 |
|
| 17946 |
There is no change in semantics. |
| 17947 |
|
| 17948 |
- bpo-46503: Fix an assert when parsing some invalid \N escape sequences in |
| 17949 |
f-strings. |
| 17950 |
|
| 17951 |
- bpo-46431: Improve error message on invalid calls to |
| 17952 |
:meth:`BaseExceptionGroup.__new__`. |
| 17953 |
|
| 17954 |
- bpo-46476: Fix memory leak in code objects generated by deepfreeze. Patch |
| 17955 |
by Kumar Aditya. |
| 17956 |
|
| 17957 |
- bpo-46481: Speed up calls to :meth:`weakref.ref.__call__` by using the |
| 17958 |
:pep:`590` ``vectorcall`` calling convention. Patch by Donghee Na. |
| 17959 |
|
| 17960 |
- bpo-46417: Fix a race condition on setting a type ``__bases__`` attribute: |
| 17961 |
the internal function ``add_subclass()`` now gets the |
| 17962 |
``PyTypeObject.tp_subclasses`` member after calling |
| 17963 |
:c:func:`PyWeakref_NewRef` which can trigger a garbage collection which |
| 17964 |
can indirectly modify ``PyTypeObject.tp_subclasses``. Patch by Victor |
| 17965 |
Stinner. |
| 17966 |
|
| 17967 |
- bpo-46417: ``python -X showrefcount`` now shows the total reference count |
| 17968 |
after clearing and destroyed the main Python interpreter. Previously, it |
| 17969 |
was shown before. Patch by Victor Stinner. |
| 17970 |
|
| 17971 |
- bpo-43683: Add ASYNC_GEN_WRAP opcode to wrap the value to be yielded in |
| 17972 |
async generators. Removes the need to special case async generators in the |
| 17973 |
``YIELD_VALUE`` instruction. |
| 17974 |
|
| 17975 |
- bpo-46407: Optimize some modulo operations in ``Objects/longobject.c``. |
| 17976 |
Patch by Jeremiah Vivian. |
| 17977 |
|
| 17978 |
- bpo-46409: Add new ``RETURN_GENERATOR`` bytecode to make generators. |
| 17979 |
Simplifies calling Python functions in the VM, as they no longer any need |
| 17980 |
to special case generator functions. |
| 17981 |
|
| 17982 |
Also add ``JUMP_NO_INTERRUPT`` bytecode that acts like ``JUMP_ABSOLUTE``, |
| 17983 |
but does not check for interrupts. |
| 17984 |
|
| 17985 |
- bpo-46406: The integer division ``//`` implementation has been optimized |
| 17986 |
to better let the compiler understand its constraints. It can be 20% |
| 17987 |
faster on the amd64 platform when dividing an int by a value smaller than |
| 17988 |
``2**30``. |
| 17989 |
|
| 17990 |
Library |
| 17991 |
------- |
| 17992 |
|
| 17993 |
- bpo-46383: Fix invalid signature of ``_zoneinfo``'s ``module_free`` |
| 17994 |
function to resolve a crash on wasm32-emscripten platform. |
| 17995 |
|
| 17996 |
Core and Builtins |
| 17997 |
----------------- |
| 17998 |
|
| 17999 |
- bpo-46361: Ensure that "small" integers created by :meth:`int.from_bytes` |
| 18000 |
and :class:`decimal.Decimal` are properly cached. |
| 18001 |
|
| 18002 |
- bpo-46161: Fix the class building error when the arguments are constants |
| 18003 |
and CALL_FUNCTION_EX is used. |
| 18004 |
|
| 18005 |
- bpo-46028: Fixes calculation of :data:`sys._base_executable` when inside a |
| 18006 |
virtual environment that uses symlinks with different binary names than |
| 18007 |
the base environment provides. |
| 18008 |
|
| 18009 |
- bpo-46091: Correctly calculate indentation levels for lines with |
| 18010 |
whitespace character that are ended by line continuation characters. Patch |
| 18011 |
by Pablo Galindo |
| 18012 |
|
| 18013 |
Library |
| 18014 |
------- |
| 18015 |
|
| 18016 |
- bpo-30512: Add CAN Socket support for NetBSD. |
| 18017 |
|
| 18018 |
Build |
| 18019 |
----- |
| 18020 |
|
| 18021 |
- bpo-46045: Do not use POSIX semaphores on NetBSD |
| 18022 |
|
| 18023 |
Core and Builtins |
| 18024 |
----------------- |
| 18025 |
|
| 18026 |
- bpo-44024: Improve the :exc:`TypeError` message for non-string second |
| 18027 |
arguments passed to the built-in functions :func:`getattr` and |
| 18028 |
:func:`hasattr`. Patch by Géry Ogam. |
| 18029 |
|
| 18030 |
Library |
| 18031 |
------- |
| 18032 |
|
| 18033 |
- bpo-46624: Restore support for non-integer arguments of |
| 18034 |
:func:`random.randrange` and :func:`random.randint`. |
| 18035 |
|
| 18036 |
- bpo-46591: Make the IDLE doc URL on the About IDLE dialog clickable. |
| 18037 |
|
| 18038 |
- bpo-46565: Remove loop variables that are leaking into modules' |
| 18039 |
namespaces. |
| 18040 |
|
| 18041 |
- bpo-46553: In :func:`typing.get_type_hints`, support evaluating bare |
| 18042 |
stringified ``ClassVar`` annotations. Patch by Gregory Beauregard. |
| 18043 |
|
| 18044 |
- bpo-46544: Don't leak ``x`` & ``uspace`` intermediate vars in |
| 18045 |
:class:`textwrap.TextWrapper`. |
| 18046 |
|
| 18047 |
- bpo-46487: Add the ``get_write_buffer_limits`` method to |
| 18048 |
:class:`asyncio.transports.WriteTransport` and to the SSL transport. |
| 18049 |
|
| 18050 |
- bpo-45173: Note the configparser deprecations will be removed in Python |
| 18051 |
3.12. |
| 18052 |
|
| 18053 |
- bpo-45162: The deprecated :mod:`unittest` APIs removed in 3.11a1 have been |
| 18054 |
temporarily restored to be removed in 3.12 while cleanups in external |
| 18055 |
projects go in. |
| 18056 |
|
| 18057 |
- bpo-46539: In :func:`typing.get_type_hints`, support evaluating |
| 18058 |
stringified ``ClassVar`` and ``Final`` annotations inside ``Annotated``. |
| 18059 |
Patch by Gregory Beauregard. |
| 18060 |
|
| 18061 |
- bpo-46510: Add missing test for :class:`types.TracebackType` and |
| 18062 |
:class:`types.FrameType`. Calculate them directly from the caught |
| 18063 |
exception without calling :func:`sys.exc_info`. |
| 18064 |
|
| 18065 |
- bpo-46491: Allow :data:`typing.Annotated` to wrap :data:`typing.Final` and |
| 18066 |
:data:`typing.ClassVar`. Patch by Gregory Beauregard. |
| 18067 |
|
| 18068 |
- bpo-46483: Remove :meth:`~object.__class_getitem__` from |
| 18069 |
:class:`pathlib.PurePath` as this class was not supposed to be generic. |
| 18070 |
|
| 18071 |
- bpo-46436: Fix command-line option ``-d``/``--directory`` in module |
| 18072 |
:mod:`http.server` which is ignored when combined with command-line option |
| 18073 |
``--cgi``. Patch by Géry Ogam. |
| 18074 |
|
| 18075 |
- bpo-41403: Make :meth:`mock.patch` raise a :exc:`TypeError` with a |
| 18076 |
relevant error message on invalid arg. Previously it allowed a cryptic |
| 18077 |
:exc:`AttributeError` to escape. |
| 18078 |
|
| 18079 |
- bpo-46474: In ``importlib.metadata.EntryPoint.pattern``, avoid potential |
| 18080 |
REDoS by limiting ambiguity in consecutive whitespace. |
| 18081 |
|
| 18082 |
- bpo-46474: Removed private method from ``importlib.metadata.Path``. Sync |
| 18083 |
with importlib_metadata 4.10.0. |
| 18084 |
|
| 18085 |
- bpo-46470: Remove unused branch from ``typing._remove_dups_flatten`` |
| 18086 |
|
| 18087 |
- bpo-46469: :mod:`asyncio` generic classes now return |
| 18088 |
:class:`types.GenericAlias` in ``__class_getitem__`` instead of the same |
| 18089 |
class. |
| 18090 |
|
| 18091 |
- bpo-41906: Support passing filter instances in the ``filters`` values of |
| 18092 |
``handlers`` and ``loggers`` in the dictionary passed to |
| 18093 |
:func:`logging.config.dictConfig`. |
| 18094 |
|
| 18095 |
- bpo-46422: Use ``dis.Positions`` in ``dis.Instruction`` instead of a |
| 18096 |
regular ``tuple``. |
| 18097 |
|
| 18098 |
- bpo-46434: :mod:`pdb` now gracefully handles ``help`` when |
| 18099 |
:attr:`~module.__doc__` is missing, for example when run with pregenerated |
| 18100 |
optimized ``.pyc`` files. |
| 18101 |
|
| 18102 |
- bpo-43869: Python uses the same time Epoch on all platforms. Add an |
| 18103 |
explicit unit test to ensure that it's the case. Patch by Victor Stinner. |
| 18104 |
|
| 18105 |
- bpo-46414: Add :func:`typing.reveal_type`. Patch by Jelle Zijlstra. |
| 18106 |
|
| 18107 |
- bpo-40280: :mod:`subprocess` now imports Windows-specific imports when |
| 18108 |
``msvcrt`` module is available, and POSIX-specific imports on all other |
| 18109 |
platforms. This gives a clean exception when ``_posixsubprocess`` is not |
| 18110 |
available (e.g. Emscripten browser target). |
| 18111 |
|
| 18112 |
- bpo-40066: ``IntEnum``, ``IntFlag``, and ``StrEnum`` use the mixed-in type |
| 18113 |
for their ``str()`` and ``format()`` output. |
| 18114 |
|
| 18115 |
- bpo-46316: Optimize :meth:`pathlib.Path.iterdir` by removing an |
| 18116 |
unnecessary check for special entries. |
| 18117 |
|
| 18118 |
- bpo-29688: Document :meth:`pathlib.Path.absolute` (which has always |
| 18119 |
existed). |
| 18120 |
|
| 18121 |
- bpo-43012: The pathlib module's obsolete and internal ``_Accessor`` class |
| 18122 |
has been removed to prepare the terrain for upcoming enhancements to the |
| 18123 |
module. |
| 18124 |
|
| 18125 |
- bpo-46258: Speed up :func:`math.isqrt` for small positive integers by |
| 18126 |
replacing two division steps with a lookup table. |
| 18127 |
|
| 18128 |
- bpo-46242: Improve error message when creating a new :class:`enum.Enum` |
| 18129 |
type subclassing an existing ``Enum`` with ``_member_names_`` using |
| 18130 |
:meth:`enum.Enum.__call__`. |
| 18131 |
|
| 18132 |
- bpo-43118: Fix a bug in :func:`inspect.signature` that was causing it to |
| 18133 |
fail on some subclasses of classes with a ``__text_signature__`` |
| 18134 |
referencing module globals. Patch by Weipeng Hong. |
| 18135 |
|
| 18136 |
- bpo-26552: Fixed case where failing :func:`asyncio.ensure_future` did not |
| 18137 |
close the coroutine. Patch by Kumar Aditya. |
| 18138 |
|
| 18139 |
- bpo-21987: Fix an issue with :meth:`tarfile.TarFile.getmember` getting a |
| 18140 |
directory name with a trailing slash. |
| 18141 |
|
| 18142 |
- bpo-46124: Update :mod:`zoneinfo` to rely on importlib.resources |
| 18143 |
traversable API. |
| 18144 |
|
| 18145 |
- bpo-46103: Now :func:`inspect.getmembers` only gets :attr:`__bases__` |
| 18146 |
attribute from class type. Patch by Weipeng Hong. |
| 18147 |
|
| 18148 |
- bpo-46080: Fix exception in argparse help text generation if a |
| 18149 |
:class:`argparse.BooleanOptionalAction` argument's default is |
| 18150 |
``argparse.SUPPRESS`` and it has ``help`` specified. Patch by Felix |
| 18151 |
Fontein. |
| 18152 |
|
| 18153 |
- bpo-44791: Fix substitution of :class:`~typing.ParamSpec` in |
| 18154 |
:data:`~typing.Concatenate` with different parameter expressions. |
| 18155 |
Substitution with a list of types returns now a tuple of types. |
| 18156 |
Substitution with ``Concatenate`` returns now a ``Concatenate`` with |
| 18157 |
concatenated lists of arguments. |
| 18158 |
|
| 18159 |
Documentation |
| 18160 |
------------- |
| 18161 |
|
| 18162 |
- bpo-46463: Fixes :file:`escape4chm.py` script used when building the CHM |
| 18163 |
documentation file |
| 18164 |
|
| 18165 |
Tests |
| 18166 |
----- |
| 18167 |
|
| 18168 |
- bpo-43478: Mocks can no longer be provided as the specs for other Mocks. |
| 18169 |
As a result, an already-mocked object cannot be passed to ``mock.Mock()``. |
| 18170 |
This can uncover bugs in tests since these Mock-derived Mocks will always |
| 18171 |
pass certain tests (e.g. isinstance) and builtin assert functions (e.g. |
| 18172 |
assert_called_once_with) will unconditionally pass. |
| 18173 |
|
| 18174 |
- bpo-46616: Ensures ``test_importlib.test_windows`` cleans up registry keys |
| 18175 |
after completion. |
| 18176 |
|
| 18177 |
- bpo-44359: test_ftplib now silently ignores socket errors to prevent |
| 18178 |
logging unhandled threading exceptions. Patch by Victor Stinner. |
| 18179 |
|
| 18180 |
- bpo-46600: Fix test_gdb.test_pycfunction() for Python built with ``clang |
| 18181 |
-Og``. Tolerate inlined functions in the gdb traceback. Patch by Victor |
| 18182 |
Stinner. |
| 18183 |
|
| 18184 |
- bpo-46542: Fix a Python crash in test_lib2to3 when using Python built in |
| 18185 |
debug mode: limit the recursion limit. Patch by Victor Stinner. |
| 18186 |
|
| 18187 |
- bpo-46576: test_peg_generator now disables compiler optimization when |
| 18188 |
testing compilation of its own C extensions to significantly speed up the |
| 18189 |
testing on non-debug builds of CPython. |
| 18190 |
|
| 18191 |
- bpo-46542: Fix ``test_json`` tests checking for :exc:`RecursionError`: |
| 18192 |
modify these tests to use ``support.infinite_recursion()``. Patch by |
| 18193 |
Victor Stinner. |
| 18194 |
|
| 18195 |
- bpo-13886: Skip test_builtin PTY tests on non-ASCII characters if the |
| 18196 |
readline module is loaded. The readline module changes input() behavior, |
| 18197 |
but test_builtin is not intended to test the readline module. Patch by |
| 18198 |
Victor Stinner. |
| 18199 |
|
| 18200 |
- bpo-40280: Add :func:`test.support.requires_fork` decorators to mark tests |
| 18201 |
that require a working :func:`os.fork`. |
| 18202 |
|
| 18203 |
- bpo-40280: Add :func:`test.support.requires_subprocess` decorator to mark |
| 18204 |
tests which require working :mod:`subprocess` module or ``os.spawn*``. The |
| 18205 |
wasm32-emscripten platform has no support for processes. |
| 18206 |
|
| 18207 |
- bpo-46126: Disable 'descriptions' when running tests internally. |
| 18208 |
|
| 18209 |
Build |
| 18210 |
----- |
| 18211 |
|
| 18212 |
- bpo-46602: Tidied up configure.ac so that conftest.c is truncated rather |
| 18213 |
than appended. This assists in the case where the 'rm' of conftest.c fails |
| 18214 |
to happen between tests. Downstream issues such as a clobbered SOABI can |
| 18215 |
result. |
| 18216 |
|
| 18217 |
- bpo-46600: Fix the test checking if the C compiler supports ``-Og`` option |
| 18218 |
in the ``./configure`` script to also use ``-Og`` on clang which supports |
| 18219 |
it. Patch by Victor Stinner. |
| 18220 |
|
| 18221 |
- bpo-38472: Fix GCC detection in setup.py when cross-compiling. The C |
| 18222 |
compiler is now run with LC_ALL=C. Previously, the detection failed with a |
| 18223 |
German locale. |
| 18224 |
|
| 18225 |
- bpo-46513: :program:`configure` no longer uses ``AC_C_CHAR_UNSIGNED`` |
| 18226 |
macro and ``pyconfig.h`` no longer defines reserved symbol |
| 18227 |
``__CHAR_UNSIGNED__``. |
| 18228 |
|
| 18229 |
- bpo-46471: Use global singletons for single byte bytes objects in |
| 18230 |
deepfreeze. |
| 18231 |
|
| 18232 |
- bpo-46443: Deepfreeze now uses cached small integers as it saves some |
| 18233 |
space for common small integers. |
| 18234 |
|
| 18235 |
- bpo-46429: Merge all deep-frozen files into one for space savings. Patch |
| 18236 |
by Kumar Aditya. |
| 18237 |
|
| 18238 |
- bpo-45569: The build now defaults to using 30-bit digits for Python |
| 18239 |
integers. Previously either 15-bit or 30-bit digits would be selected, |
| 18240 |
depending on the platform. 15-bit digits may still be selected using the |
| 18241 |
``--enable-big-digits=15`` option to the ``configure`` script, or by |
| 18242 |
defining ``PYLONG_BITS_IN_DIGIT`` in ``pyconfig.h``. |
| 18243 |
|
| 18244 |
- bpo-45925: Update Windows installer to use SQLite 3.37.2. |
| 18245 |
|
| 18246 |
- bpo-43112: Detect musl libc as a separate SOABI (tagged as |
| 18247 |
``linux-musl``). |
| 18248 |
|
| 18249 |
Windows |
| 18250 |
------- |
| 18251 |
|
| 18252 |
- bpo-33125: The traditional EXE/MSI based installer for Windows is now |
| 18253 |
available for ARM64 |
| 18254 |
|
| 18255 |
- bpo-46362: os.path.abspath("C:\CON") is now fixed to return "\\.\CON", not |
| 18256 |
the same path. The regression was true of all legacy DOS devices such as |
| 18257 |
COM1, LPT1, or NUL. |
| 18258 |
|
| 18259 |
- bpo-44934: The installer now offers a command-line only option to add the |
| 18260 |
installation directory to the end of :envvar:`PATH` instead of at the |
| 18261 |
start. |
| 18262 |
|
| 18263 |
macOS |
| 18264 |
----- |
| 18265 |
|
| 18266 |
- bpo-45925: Update macOS installer to SQLite 3.37.2. |
| 18267 |
|
| 18268 |
IDLE |
| 18269 |
---- |
| 18270 |
|
| 18271 |
- bpo-45296: Clarify close, quit, and exit in IDLE. In the File menu, |
| 18272 |
'Close' and 'Exit' are now 'Close Window' (the current one) and 'Exit' is |
| 18273 |
now 'Exit IDLE' (by closing all windows). In Shell, 'quit()' and 'exit()' |
| 18274 |
mean 'close Shell'. If there are no other windows, this also exits IDLE. |
| 18275 |
|
| 18276 |
C API |
| 18277 |
----- |
| 18278 |
|
| 18279 |
- bpo-40170: Remove the ``PyHeapType_GET_MEMBERS()`` macro. It was exposed |
| 18280 |
in the public C API by mistake, it must only be used by Python internally. |
| 18281 |
Use the ``PyTypeObject.tp_members`` member instead. Patch by Victor |
| 18282 |
Stinner. |
| 18283 |
|
| 18284 |
- bpo-40170: Move _Py_GetAllocatedBlocks() and _PyObject_DebugMallocStats() |
| 18285 |
private functions to the internal C API. Patch by Victor Stinner. |
| 18286 |
|
| 18287 |
- bpo-46433: The internal function _PyType_GetModuleByDef now correctly |
| 18288 |
handles inheritance patterns involving static types. |
| 18289 |
|
| 18290 |
- bpo-45459: :c:type:`Py_buffer` and various ``Py_buffer`` related functions |
| 18291 |
are now part of the limited API and stable ABI. |
| 18292 |
|
| 18293 |
- bpo-14916: Fixed bug in the tokenizer that prevented |
| 18294 |
``PyRun_InteractiveOne`` from parsing from the provided FD. |
| 18295 |
|
| 18296 |
|
| 18297 |
What's New in Python 3.11.0 alpha 4? |
| 18298 |
==================================== |
| 18299 |
|
| 18300 |
*Release date: 2022-01-13* |
| 18301 |
|
| 18302 |
Core and Builtins |
| 18303 |
----------------- |
| 18304 |
|
| 18305 |
- bpo-46070: :c:func:`Py_EndInterpreter` now explicitly untracks all objects |
| 18306 |
currently tracked by the GC. Previously, if an object was used later by |
| 18307 |
another interpreter, calling :c:func:`PyObject_GC_UnTrack` on the object |
| 18308 |
crashed if the previous or the next object of the :c:type:`!PyGC_Head` |
| 18309 |
structure became a dangling pointer. Patch by Victor Stinner. |
| 18310 |
|
| 18311 |
- bpo-46347: Fix memory leak in PyEval_EvalCodeEx. |
| 18312 |
|
| 18313 |
- bpo-46339: Fix a crash in the parser when retrieving the error text for |
| 18314 |
multi-line f-strings expressions that do not start in the first line of |
| 18315 |
the string. Patch by Pablo Galindo |
| 18316 |
|
| 18317 |
- bpo-46331: Do not set line number of instruction storing doc-string. Fixes |
| 18318 |
regression introduced in 3.11 alpha. |
| 18319 |
|
| 18320 |
- bpo-46314: Remove spurious "call" event when creating a lambda function |
| 18321 |
that was accidentally introduced in 3.11a4. |
| 18322 |
|
| 18323 |
- bpo-46289: ASDL declaration of ``FormattedValue`` has changed to reflect |
| 18324 |
``conversion`` field is not optional. |
| 18325 |
|
| 18326 |
- bpo-46297: Fixed an interpreter crash on bootup with multiple PythonPaths |
| 18327 |
set in the Windows registry. Patch by Derzsi Dániel. |
| 18328 |
|
| 18329 |
- bpo-46237: Fix the line number of tokenizer errors inside f-strings. Patch |
| 18330 |
by Pablo Galindo. |
| 18331 |
|
| 18332 |
- bpo-46263: We always expect the "use_frozen_modules" config to be set, now |
| 18333 |
that getpath.c was rewritten in pure Python and the logic improved. |
| 18334 |
|
| 18335 |
- bpo-46006: Fix a regression when a type method like ``__init__()`` is |
| 18336 |
modified in a subinterpreter. Fix a regression in |
| 18337 |
``_PyUnicode_EqualToASCIIId()`` and type ``update_slot()``. Revert the |
| 18338 |
change which made the Unicode dictionary of interned strings compatible |
| 18339 |
with subinterpreters: the internal interned dictionary is shared again by |
| 18340 |
all interpreters. Patch by Victor Stinner. |
| 18341 |
|
| 18342 |
- bpo-45923: Add RESUME opcode. This is a logical no-op. It is emitted by |
| 18343 |
the compiler anywhere a Python function can be entered. It is used by the |
| 18344 |
interpreter to perform tracing and optimizer checks. |
| 18345 |
|
| 18346 |
Library |
| 18347 |
------- |
| 18348 |
|
| 18349 |
- bpo-46208: Fix the regression of os.path.normpath("A/../../B") not |
| 18350 |
returning expected "../B" but "B". |
| 18351 |
|
| 18352 |
Core and Builtins |
| 18353 |
----------------- |
| 18354 |
|
| 18355 |
- bpo-46240: Correct the error message for unclosed parentheses when the |
| 18356 |
tokenizer doesn't reach the end of the source when the error is reported. |
| 18357 |
Patch by Pablo Galindo |
| 18358 |
|
| 18359 |
- bpo-46009: Remove the ``GEN_START`` opcode. |
| 18360 |
|
| 18361 |
- bpo-46235: Certain sequence multiplication operations like ``[0] * 1_000`` |
| 18362 |
are now faster due to reference-counting optimizations. Patch by Dennis |
| 18363 |
Sweeney. |
| 18364 |
|
| 18365 |
- bpo-46221: :opcode:`!PREP_RERAISE_STAR` no longer pushes ``lasti`` to the |
| 18366 |
stack. |
| 18367 |
|
| 18368 |
- bpo-46202: Remove :opcode:`!POP_EXCEPT_AND_RERAISE` and replace it by an |
| 18369 |
equivalent sequence of other opcodes. |
| 18370 |
|
| 18371 |
Library |
| 18372 |
------- |
| 18373 |
|
| 18374 |
- bpo-46085: Fix iterator cache mechanism of :class:`OrderedDict`. |
| 18375 |
|
| 18376 |
Core and Builtins |
| 18377 |
----------------- |
| 18378 |
|
| 18379 |
- bpo-46055: Speed up shifting operation involving integers less than |
| 18380 |
:c:macro:`PyLong_BASE`. Patch by Xinhang Xu. |
| 18381 |
|
| 18382 |
- bpo-46110: Add a maximum recursion check to the PEG parser to avoid stack |
| 18383 |
overflow. Patch by Pablo Galindo |
| 18384 |
|
| 18385 |
- bpo-46107: Fix bug where :meth:`ExceptionGroup.split` and |
| 18386 |
:meth:`ExceptionGroup.subgroup` did not copy the exception group's |
| 18387 |
``__note__`` field to the parts. |
| 18388 |
|
| 18389 |
- bpo-45711: The interpreter state's representation of handled exceptions |
| 18390 |
(a.k.a exc_info, or _PyErr_StackItem) now has only the ``exc_value`` |
| 18391 |
field, ``exc_type`` and ``exc_traceback`` have been removed as their |
| 18392 |
values can be derived from ``exc_value``. |
| 18393 |
|
| 18394 |
- bpo-44525: Replace the four call bytecode instructions which one pre-call |
| 18395 |
instruction and two call instructions. |
| 18396 |
|
| 18397 |
Removes ``CALL_FUNCTION``, ``CALL_FUNCTION_KW``, ``CALL_METHOD`` and |
| 18398 |
``CALL_METHOD_KW``. |
| 18399 |
|
| 18400 |
Adds ``CALL_NO_KW`` and ``CALL_KW`` call instructions, and |
| 18401 |
``PRECALL_METHOD`` prefix for pairing with ``LOAD_METHOD``. |
| 18402 |
|
| 18403 |
- bpo-46039: Remove the ``YIELD_FROM`` instruction and replace it with the |
| 18404 |
``SEND`` instruction which performs the same operation, but without the |
| 18405 |
loop. |
| 18406 |
|
| 18407 |
- bpo-45635: The code called from :c:func:`!_PyErr_Display` was refactored |
| 18408 |
to improve error handling. It now exits immediately upon an unrecoverable |
| 18409 |
error. |
| 18410 |
|
| 18411 |
- bpo-46054: Fix parser error when parsing non-utf8 characters in source |
| 18412 |
files. Patch by Pablo Galindo. |
| 18413 |
|
| 18414 |
- bpo-46042: Improve the location of the caret in :exc:`SyntaxError` |
| 18415 |
exceptions emitted by the symbol table. Patch by Pablo Galindo. |
| 18416 |
|
| 18417 |
- bpo-46049: Ensure :file:`._pth` files work as intended on platforms other |
| 18418 |
than Windows. |
| 18419 |
|
| 18420 |
- bpo-46048: Fixes parsing of :file:`._pth` files on startup so that |
| 18421 |
single-character paths are correctly read. |
| 18422 |
|
| 18423 |
- bpo-37971: Fix a bug where the line numbers given in a traceback when a |
| 18424 |
decorator application raised an exception were wrong. |
| 18425 |
|
| 18426 |
- bpo-46031: Add :opcode:`POP_JUMP_IF_NOT_NONE` and |
| 18427 |
:opcode:`POP_JUMP_IF_NONE` opcodes to speed up conditional jumps. |
| 18428 |
|
| 18429 |
- bpo-45654: Deepfreeze :mod:`runpy`, patch by Kumar Aditya. |
| 18430 |
|
| 18431 |
- bpo-46025: Fix a crash in the :mod:`atexit` module involving functions |
| 18432 |
that unregister themselves before raising exceptions. Patch by Pablo |
| 18433 |
Galindo. |
| 18434 |
|
| 18435 |
Library |
| 18436 |
------- |
| 18437 |
|
| 18438 |
- bpo-46000: Improve compatibility of the :mod:`curses` module with NetBSD |
| 18439 |
curses. |
| 18440 |
|
| 18441 |
Core and Builtins |
| 18442 |
----------------- |
| 18443 |
|
| 18444 |
- bpo-44525: Specialize the CALL_FUNCTION instruction for calls to builtin |
| 18445 |
types with a single argument. Speeds up ``range(x)``, ``list(x)``, and |
| 18446 |
specifically ``type(obj)``. |
| 18447 |
|
| 18448 |
- bpo-42918: Fix bug where the built-in :func:`compile` function did not |
| 18449 |
always raise a :exc:`SyntaxError` when passed multiple statements in |
| 18450 |
'single' mode. Patch by Weipeng Hong. |
| 18451 |
|
| 18452 |
- bpo-45953: The main interpreter in _PyRuntimeState.interpreters is now |
| 18453 |
statically allocated (as part of _PyRuntime). Likewise for the initial |
| 18454 |
thread state of each interpreter. This means less allocation during |
| 18455 |
runtime init, as well as better memory locality for these key state |
| 18456 |
objects. |
| 18457 |
|
| 18458 |
- bpo-45292: Complete the :pep:`654` implementation: add ``except*``. |
| 18459 |
|
| 18460 |
- bpo-43413: Revert changes in ``set.__init__``. Subclass of :class:`set` |
| 18461 |
needs to define a ``__init__()`` method if it defines a ``__new__()`` |
| 18462 |
method with additional keyword parameters. |
| 18463 |
|
| 18464 |
- bpo-43931: Added the :c:data:`Py_Version` constant which bears the same |
| 18465 |
value as :c:macro:`PY_VERSION_HEX`. Patch by Gabriele N. Tornetta. |
| 18466 |
|
| 18467 |
Library |
| 18468 |
------- |
| 18469 |
|
| 18470 |
- bpo-46342: The ``@typing.final`` decorator now sets the ``__final__`` |
| 18471 |
attribute on the decorated object to allow runtime introspection. Patch by |
| 18472 |
Jelle Zijlstra. |
| 18473 |
|
| 18474 |
- bpo-46328: Added the :meth:`sys.exception` method which returns the active |
| 18475 |
exception instance. |
| 18476 |
|
| 18477 |
- bpo-46307: Add :meth:`string.Template.is_valid` and |
| 18478 |
:meth:`string.Template.get_identifiers` methods. |
| 18479 |
|
| 18480 |
- bpo-46306: Assume that :class:`types.CodeType` always has |
| 18481 |
:attr:`types.CodeType.co_firstlineno` in :mod:`doctest`. |
| 18482 |
|
| 18483 |
- bpo-40479: Fix :mod:`hashlib` *usedforsecurity* option to work correctly |
| 18484 |
with OpenSSL 3.0.0 in FIPS mode. |
| 18485 |
|
| 18486 |
- bpo-46070: Fix possible segfault when importing the :mod:`asyncio` module |
| 18487 |
from different sub-interpreters in parallel. Patch by Erlend E. Aasland. |
| 18488 |
|
| 18489 |
- bpo-46244: Removed ``__slots__`` from :class:`typing.ParamSpec` and |
| 18490 |
:class:`typing.TypeVar`. They served no purpose. Patch by Arie Bovenberg. |
| 18491 |
|
| 18492 |
- bpo-46278: Reflect ``context`` argument in ``AbstractEventLoop.call_*()`` |
| 18493 |
methods. Loop implementations already support it. |
| 18494 |
|
| 18495 |
- bpo-46269: Remove special-casing of ``__new__`` in |
| 18496 |
:meth:`enum.Enum.__dir__`. |
| 18497 |
|
| 18498 |
- bpo-46266: Improve day constants in :mod:`calendar`. |
| 18499 |
|
| 18500 |
Now all constants (``MONDAY`` ... ``SUNDAY``) are documented, tested, and |
| 18501 |
added to ``__all__``. |
| 18502 |
|
| 18503 |
- bpo-46257: Optimized the mean, variance, and stdev functions in the |
| 18504 |
statistics module. If the input is an iterator, it is consumed in a single |
| 18505 |
pass rather than eating memory by conversion to a list. The single pass |
| 18506 |
algorithm is about twice as fast as the previous two pass code. |
| 18507 |
|
| 18508 |
- bpo-41011: Added two new variables to *pyvenv.cfg* which is generated by |
| 18509 |
:mod:`venv` module: *executable* for the executable and *command* for the |
| 18510 |
command line used to create the environment. |
| 18511 |
|
| 18512 |
- bpo-46239: Improve error message when importing |
| 18513 |
:mod:`asyncio.windows_events` on non-Windows. |
| 18514 |
|
| 18515 |
- bpo-46238: Reuse ``_winapi`` constants in ``asyncio.windows_events``. |
| 18516 |
|
| 18517 |
- bpo-46222: Adding ``SF_NOCACHE`` sendfile constant for FreeBSD for the |
| 18518 |
posixmodule. |
| 18519 |
|
| 18520 |
- bpo-37295: Add fast path for ``0 <= k <= n <= 67`` for :func:`math.comb`. |
| 18521 |
|
| 18522 |
- bpo-46176: Adding the ``MAP_STACK`` constant for the mmap module. |
| 18523 |
|
| 18524 |
- bpo-43424: Deprecate :attr:`webbrowser.MacOSXOSAScript._name` and use |
| 18525 |
``name`` instead. |
| 18526 |
|
| 18527 |
- bpo-45321: Added missing error codes to module |
| 18528 |
``xml.parsers.expat.errors``. |
| 18529 |
|
| 18530 |
- bpo-46125: Refactor tests to test traversable API directly. Includes |
| 18531 |
changes from importlib 5.4.0. |
| 18532 |
|
| 18533 |
- bpo-46118: Moved importlib.resources and its related functionality to a |
| 18534 |
package. |
| 18535 |
|
| 18536 |
- bpo-37578: Add *include_hidden* parameter to :func:`~glob.glob` and |
| 18537 |
:func:`~glob.iglob` to match hidden files and directories when using |
| 18538 |
special characters like ``*``, ``**``, ``?`` and ``[]``. |
| 18539 |
|
| 18540 |
- bpo-20369: :func:`concurrent.futures.wait` no longer blocks forever when |
| 18541 |
given duplicate Futures. Patch by Kumar Aditya. |
| 18542 |
|
| 18543 |
- bpo-46105: Honor spec when generating requirement specs with urls and |
| 18544 |
extras (importlib_metadata 4.8.3). |
| 18545 |
|
| 18546 |
- bpo-44893: EntryPoint objects are no longer tuples. Recommended means to |
| 18547 |
access is by attribute ('.name', '.group') or accessor ('.load()'). Access |
| 18548 |
by index is deprecated and will raise deprecation warning. |
| 18549 |
|
| 18550 |
- bpo-22815: Print unexpected successes together with failures and errors in |
| 18551 |
summary in :class:`unittest.TextTestResult`. |
| 18552 |
|
| 18553 |
- bpo-22047: Calling :meth:`add_argument_group` on an argument group is |
| 18554 |
deprecated. Calling :meth:`add_argument_group` or |
| 18555 |
:meth:`add_mutually_exclusive_group` on a mutually exclusive group is |
| 18556 |
deprecated. |
| 18557 |
|
| 18558 |
These features were never supported and do not always work correctly. The |
| 18559 |
functions exist on the API by accident through inheritance and will be |
| 18560 |
removed in the future. |
| 18561 |
|
| 18562 |
- bpo-26952: :mod:`argparse` raises :exc:`ValueError` with clear message |
| 18563 |
when trying to render usage for an empty mutually exclusive group. |
| 18564 |
Previously it raised a cryptic :exc:`IndexError`. |
| 18565 |
|
| 18566 |
- bpo-45615: Functions in the :mod:`traceback` module raise :exc:`TypeError` |
| 18567 |
rather than :exc:`AttributeError` when an exception argument is not of |
| 18568 |
type :exc:`BaseException`. |
| 18569 |
|
| 18570 |
- bpo-16594: Add allow allow_reuse_port flag in socketserver. |
| 18571 |
|
| 18572 |
- bpo-27718: Fix help for the :mod:`signal` module. Some functions (e.g. |
| 18573 |
``signal()`` and ``getsignal()``) were omitted. |
| 18574 |
|
| 18575 |
- bpo-46032: The ``registry()`` method of :func:`functools.singledispatch` |
| 18576 |
functions checks now the first argument or the first parameter annotation |
| 18577 |
and raises a TypeError if it is not supported. Previously unsupported |
| 18578 |
"types" were ignored (e.g. ``typing.List[int]``) or caused an error at |
| 18579 |
calling time (e.g. ``list[int]``). |
| 18580 |
|
| 18581 |
- bpo-46014: Add ability to use ``typing.Union`` and ``types.UnionType`` as |
| 18582 |
dispatch argument to ``functools.singledispatch``. Patch provided by Yurii |
| 18583 |
Karabas. |
| 18584 |
|
| 18585 |
- bpo-27062: Add :attr:`__all__` to :mod:`inspect`, patch by Kumar Aditya. |
| 18586 |
|
| 18587 |
- bpo-46018: Ensure that :func:`math.expm1` does not raise on underflow. |
| 18588 |
|
| 18589 |
- bpo-46016: Adding :const:`!F_DUP2FD` and :const:`!F_DUP2FD_CLOEXEC` |
| 18590 |
constants from FreeBSD into the :mod:`fcntl` module. |
| 18591 |
|
| 18592 |
- bpo-45755: :mod:`typing` generic aliases now reveal the class attributes |
| 18593 |
of the original generic class when passed to ``dir()``. This was the |
| 18594 |
behavior up to Python 3.6, but was changed in 3.7-3.9. |
| 18595 |
|
| 18596 |
- bpo-45874: The empty query string, consisting of no query arguments, is |
| 18597 |
now handled correctly in ``urllib.parse.parse_qsl``. This caused problems |
| 18598 |
before when strict parsing was enabled. |
| 18599 |
|
| 18600 |
- bpo-44674: Change how dataclasses disallows mutable default values. It |
| 18601 |
used to use a list of known types (list, dict, set). Now it disallows |
| 18602 |
unhashable objects to be defaults. It's using unhashability as a proxy |
| 18603 |
for mutability. Patch by Eric V. Smith, idea by Raymond Hettinger. |
| 18604 |
|
| 18605 |
- bpo-23882: Remove namespace package (PEP 420) support from unittest |
| 18606 |
discovery. It was introduced in Python 3.4 but has been broken since |
| 18607 |
Python 3.7. |
| 18608 |
|
| 18609 |
- bpo-25066: Added a :meth:`__repr__` method to |
| 18610 |
:class:`multiprocessing.Event` objects, patch by Kumar Aditya. |
| 18611 |
|
| 18612 |
- bpo-45643: Added :const:`signal.SIGSTKFLT` on platforms where this signal |
| 18613 |
is defined. |
| 18614 |
|
| 18615 |
- bpo-44092: Fetch across rollback no longer raises |
| 18616 |
:exc:`~sqlite3.InterfaceError`. Instead we leave it to the SQLite library |
| 18617 |
to handle these cases. Patch by Erlend E. Aasland. |
| 18618 |
|
| 18619 |
- bpo-42413: Replace ``concurrent.futures.TimeoutError`` and |
| 18620 |
``asyncio.TimeoutError`` with builtin :exc:`TimeoutError`, keep these |
| 18621 |
names as deprecated aliases. |
| 18622 |
|
| 18623 |
Documentation |
| 18624 |
------------- |
| 18625 |
|
| 18626 |
- bpo-46196: Document method :meth:`cmd.Cmd.columnize`. |
| 18627 |
|
| 18628 |
- bpo-46120: State that ``|`` is preferred for readability over ``Union`` in |
| 18629 |
the :mod:`typing` docs. |
| 18630 |
|
| 18631 |
- bpo-46109: Extracted ``importlib.resources`` and |
| 18632 |
``importlib.resources.abc`` documentation into separate files. |
| 18633 |
|
| 18634 |
- bpo-19737: Update the documentation for the :func:`globals` function. |
| 18635 |
|
| 18636 |
Tests |
| 18637 |
----- |
| 18638 |
|
| 18639 |
- bpo-46296: Add a test case for :mod:`enum` with ``_use_args_ == True`` and |
| 18640 |
``_member_type_ == object``. |
| 18641 |
|
| 18642 |
- bpo-46205: Fix hang in runtest_mp due to race condition |
| 18643 |
|
| 18644 |
- bpo-46263: Fix test_capi on FreeBSD 14-dev: instruct jemalloc to not fill |
| 18645 |
freed memory with junk byte. |
| 18646 |
|
| 18647 |
- bpo-46262: Cover ``ValueError`` path in tests for |
| 18648 |
:meth:`enum.Flag._missing_`. |
| 18649 |
|
| 18650 |
- bpo-46150: Now ``fakename`` in |
| 18651 |
``test_pathlib.PosixPathTest.test_expanduser`` is checked to be |
| 18652 |
non-existent. |
| 18653 |
|
| 18654 |
- bpo-46129: Rewrite ``asyncio.locks`` tests with |
| 18655 |
:class:`unittest.IsolatedAsyncioTestCase` usage. |
| 18656 |
|
| 18657 |
- bpo-23819: Fixed :mod:`asyncio` tests in python optimized mode. Patch by |
| 18658 |
Kumar Aditya. |
| 18659 |
|
| 18660 |
- bpo-46114: Fix test case for OpenSSL 3.0.1 version. OpenSSL 3.0 uses |
| 18661 |
``0xMNN00PP0L``. |
| 18662 |
|
| 18663 |
Build |
| 18664 |
----- |
| 18665 |
|
| 18666 |
- bpo-44133: When Python is configured with |
| 18667 |
:option:`--without-static-libpython`, the Python static library |
| 18668 |
(libpython.a) is no longer built. Patch by Victor Stinner. |
| 18669 |
|
| 18670 |
- bpo-44133: When Python is built without :option:`--enable-shared`, the |
| 18671 |
``python`` program is now linked to object files, rather than being linked |
| 18672 |
to the Python static library (libpython.a), to make sure that all symbols |
| 18673 |
are exported. Previously, the linker omitted some symbols like the |
| 18674 |
:c:func:`Py_FrozenMain` function. Patch by Victor Stinner. |
| 18675 |
|
| 18676 |
- bpo-40280: The ``configure`` script has a new option |
| 18677 |
``--with-emscripten-target`` to select browser or node as Emscripten build |
| 18678 |
target. |
| 18679 |
|
| 18680 |
- bpo-46315: Added and fixed ``#ifdef HAVE_FEATURE`` checks for |
| 18681 |
functionality that is not available on WASI platform. |
| 18682 |
|
| 18683 |
- bpo-45723: Fixed a regression in ``configure`` check for |
| 18684 |
:func:`select.epoll`. |
| 18685 |
|
| 18686 |
- bpo-46263: ``configure`` no longer sets ``MULTIARCH`` on FreeBSD |
| 18687 |
platforms. |
| 18688 |
|
| 18689 |
- bpo-46106: Updated OpenSSL to 1.1.1m in Windows builds, macOS installer |
| 18690 |
builds, and CI. Patch by Kumar Aditya. |
| 18691 |
|
| 18692 |
- bpo-46088: Automatically detect or install bootstrap Python runtime when |
| 18693 |
building from Visual Studio. |
| 18694 |
|
| 18695 |
- bpo-46072: Add a --with-pystats configure option to turn on internal |
| 18696 |
statistics gathering. |
| 18697 |
|
| 18698 |
- bpo-40280: A new directory ``Tools/wasm`` contains WebAssembly-related |
| 18699 |
helpers like ``config.site`` override for wasm32-emscripten, wasm assets |
| 18700 |
generator to bundle the stdlib, and a README. |
| 18701 |
|
| 18702 |
- bpo-46023: :program:`makesetup` no longer builds extensions that have been |
| 18703 |
marked as *disabled*. This allows users to disable modules in |
| 18704 |
``Modules/Setup.local``. |
| 18705 |
|
| 18706 |
- bpo-45949: Use pure Python ``freeze_module`` for all but importlib |
| 18707 |
bootstrap files. ``--with-freeze-module`` :program:`configure` option is |
| 18708 |
no longer needed for cross builds. |
| 18709 |
|
| 18710 |
Windows |
| 18711 |
------- |
| 18712 |
|
| 18713 |
- bpo-46217: Removed parameter that is unsupported on Windows 8.1 and early |
| 18714 |
Windows 10 and may have caused build or runtime failures. |
| 18715 |
|
| 18716 |
macOS |
| 18717 |
----- |
| 18718 |
|
| 18719 |
- bpo-40477: The Python Launcher app for macOS now properly launches scripts |
| 18720 |
and, if necessary, the Terminal app when running on recent macOS releases. |
| 18721 |
|
| 18722 |
C API |
| 18723 |
----- |
| 18724 |
|
| 18725 |
- bpo-46236: Fix a bug in :c:func:`PyFunction_GetAnnotations` that caused it |
| 18726 |
to return a ``tuple`` instead of a ``dict``. |
| 18727 |
|
| 18728 |
- bpo-46140: :c:func:`PyBuffer_GetPointer`, |
| 18729 |
:c:func:`PyBuffer_FromContiguous`, :c:func:`PyBuffer_ToContiguous` and |
| 18730 |
:c:func:`PyMemoryView_FromBuffer` now take buffer info by ``const |
| 18731 |
Py_buffer *`` instead of ``Py_buffer *``, as they do not need mutability. |
| 18732 |
:c:func:`PyBuffer_FromContiguous` also now takes the source buffer as |
| 18733 |
``const void *``, and similarly :c:func:`PyBuffer_GetPointer` takes the |
| 18734 |
strides as ``const Py_ssize_t *``. |
| 18735 |
|
| 18736 |
- bpo-45855: Document that the *no_block* argument to |
| 18737 |
:c:func:`PyCapsule_Import` is a no-op now. |
| 18738 |
|
| 18739 |
- bpo-45855: Replaced deprecated usage of |
| 18740 |
:c:func:`PyImport_ImportModuleNoBlock` with |
| 18741 |
:c:func:`PyImport_ImportModule` in stdlib modules. Patch by Kumar Aditya. |
| 18742 |
|
| 18743 |
- bpo-46007: The :c:func:`!PyUnicode_CHECK_INTERNED` macro has been excluded |
| 18744 |
from the limited C API. It was never usable there, because it used |
| 18745 |
internal structures which are not available in the limited C API. Patch by |
| 18746 |
Victor Stinner. |
| 18747 |
|
| 18748 |
|
| 18749 |
What's New in Python 3.11.0 alpha 3? |
| 18750 |
==================================== |
| 18751 |
|
| 18752 |
*Release date: 2021-12-08* |
| 18753 |
|
| 18754 |
Core and Builtins |
| 18755 |
----------------- |
| 18756 |
|
| 18757 |
- bpo-46009: Restore behavior from 3.9 and earlier when sending non-None to |
| 18758 |
newly started generator. In 3.9 this did not affect the state of the |
| 18759 |
generator. In 3.10.0 and 3.10.1 ``gen_func().send(0)`` is equivalent to |
| 18760 |
``gen_func().throw(TypeError(...)`` which exhausts the generator. In |
| 18761 |
3.10.2 onward, the behavior has been reverted to that of 3.9. |
| 18762 |
|
| 18763 |
- bpo-46004: Fix the :exc:`SyntaxError` location for errors involving for |
| 18764 |
loops with invalid targets. Patch by Pablo Galindo |
| 18765 |
|
| 18766 |
- bpo-45711: :c:func:`!_PyErr_ChainStackItem` no longer normalizes |
| 18767 |
``exc_info`` (including setting the traceback on the exception instance) |
| 18768 |
because ``exc_info`` is always normalized. |
| 18769 |
|
| 18770 |
- bpo-45607: The ``__note__`` field was added to :exc:`BaseException`. It is |
| 18771 |
``None`` by default but can be set to a string which is added to the |
| 18772 |
exception's traceback. |
| 18773 |
|
| 18774 |
- bpo-45947: Place pointers to dict and values immediately before GC header. |
| 18775 |
This reduces number of dependent memory loads to access either dict or |
| 18776 |
values from 3 to 1. |
| 18777 |
|
| 18778 |
- bpo-45915: ``is_valid_fd`` now uses faster ``fcntl(fd, F_GETFD)`` on |
| 18779 |
Linux, macOS, and Windows. |
| 18780 |
|
| 18781 |
- bpo-44530: Reverts a change to the ``code.__new__`` :ref:`audit event |
| 18782 |
<audit-events>` from an earlier prerelease. |
| 18783 |
|
| 18784 |
- bpo-42268: Fail the configure step if the selected compiler doesn't |
| 18785 |
support memory sanitizer. Patch by Pablo Galindo |
| 18786 |
|
| 18787 |
- bpo-45711: The three values of ``exc_info`` are now always consistent with |
| 18788 |
each other. In particular, the ``type`` and ``traceback`` fields are now |
| 18789 |
derived from the exception instance. This impacts the return values of |
| 18790 |
:func:`sys.exc_info` and :c:func:`PyErr_GetExcInfo()` if the exception |
| 18791 |
instance is modified while the exception is handled, as well as |
| 18792 |
:c:func:`PyErr_SetExcInfo()`, which now ignores the ``type`` and |
| 18793 |
``traceback`` arguments provided to it. |
| 18794 |
|
| 18795 |
- bpo-45727: Refine the custom syntax error that suggests that a comma may |
| 18796 |
be missing to trigger only when the expressions are detected between |
| 18797 |
parentheses or brackets. Patch by Pablo Galindo |
| 18798 |
|
| 18799 |
- bpo-45885: Specialized the ``COMPARE_OP`` opcode using the PEP 659 |
| 18800 |
machinery. |
| 18801 |
|
| 18802 |
- bpo-45786: Allocate space for the interpreter frame in the frame object, |
| 18803 |
to avoid an additional allocation when the frame object outlives the frame |
| 18804 |
activation. |
| 18805 |
|
| 18806 |
Library |
| 18807 |
------- |
| 18808 |
|
| 18809 |
- bpo-45614: Fix :mod:`traceback` display for exceptions with invalid module |
| 18810 |
name. |
| 18811 |
|
| 18812 |
Core and Builtins |
| 18813 |
----------------- |
| 18814 |
|
| 18815 |
- bpo-45813: Fix crash when calling coro.cr_frame.clear() after coroutine |
| 18816 |
has been freed. |
| 18817 |
|
| 18818 |
- bpo-45811: Improve the tokenizer errors when encountering invisible |
| 18819 |
control characters in the parser. Patch by Pablo Galindo |
| 18820 |
|
| 18821 |
- bpo-45848: Allow the parser to obtain error lines directly from encoded |
| 18822 |
files. Patch by Pablo Galindo |
| 18823 |
|
| 18824 |
- bpo-45709: Restore behavior from 3.10 when tracing an exception raised |
| 18825 |
within a with statement. |
| 18826 |
|
| 18827 |
- bpo-44525: Adds new :opcode:`COPY_FREE_VARS` opcode, to make copying of |
| 18828 |
free variables from function to frame explicit. Helps optimization of |
| 18829 |
calls to Python function. |
| 18830 |
|
| 18831 |
- bpo-45829: Specialize :opcode:`BINARY_SUBSCR` for classes with a |
| 18832 |
``__getitem__`` method implemented in Python |
| 18833 |
|
| 18834 |
- bpo-45826: Fixed a crash when calling ``.with_traceback(None)`` on |
| 18835 |
``NameError``. This occurs internally in |
| 18836 |
``unittest.TestCase.assertRaises()``. |
| 18837 |
|
| 18838 |
- bpo-45822: Fixed a bug in the parser that was causing it to not respect |
| 18839 |
:pep:`263` coding cookies when no flags are provided. Patch by Pablo |
| 18840 |
Galindo |
| 18841 |
|
| 18842 |
- bpo-45820: Fix a segfault when the parser fails without reading any input. |
| 18843 |
Patch by Pablo Galindo |
| 18844 |
|
| 18845 |
- bpo-45636: Simplify the implementation of :opcode:`BINARY_OP` by indexing |
| 18846 |
into an array of function pointers (rather than switching on the oparg). |
| 18847 |
|
| 18848 |
- bpo-42540: Fix crash when :func:`os.fork` is called with an active |
| 18849 |
non-default memory allocator. |
| 18850 |
|
| 18851 |
- bpo-45738: Fix computation of error location for invalid continuation |
| 18852 |
characters in the parser. Patch by Pablo Galindo. |
| 18853 |
|
| 18854 |
- bpo-45636: Remove an existing "fast path" for old-style string formatting, |
| 18855 |
since it no longer appears to have any measurable impact. |
| 18856 |
|
| 18857 |
- bpo-45753: Make recursion checks a bit more efficient by tracking amount |
| 18858 |
of calls left before overflow. |
| 18859 |
|
| 18860 |
- bpo-45773: Fix a compiler hang when attempting to optimize certain jump |
| 18861 |
patterns. |
| 18862 |
|
| 18863 |
- bpo-45764: The parser now gives a better error message when leaving out |
| 18864 |
the opening parenthesis ``(`` after a ``def``-statement:: |
| 18865 |
|
| 18866 |
>>> def f: |
| 18867 |
File "<stdin>", line 1 |
| 18868 |
def f: |
| 18869 |
^ |
| 18870 |
SyntaxError: expected '(' |
| 18871 |
|
| 18872 |
- bpo-45609: Specialized the ``STORE_SUBSCR`` opcode using the PEP 659 |
| 18873 |
machinery. |
| 18874 |
|
| 18875 |
- bpo-45636: Replace all numeric ``BINARY_*`` and ``INPLACE_*`` instructions |
| 18876 |
with a single :opcode:`BINARY_OP` implementation. |
| 18877 |
|
| 18878 |
- bpo-45582: Path calculation (known as ``getpath``) has been reimplemented |
| 18879 |
as a frozen Python module. This should have no visible impact, but may |
| 18880 |
affect calculation of all paths referenced in :mod:`sys` and |
| 18881 |
:mod:`sysconfig`. |
| 18882 |
|
| 18883 |
- bpo-45450: Improve the syntax error message for parenthesized arguments. |
| 18884 |
Patch by Pablo Galindo. |
| 18885 |
|
| 18886 |
Library |
| 18887 |
------- |
| 18888 |
|
| 18889 |
- bpo-27946: Fix possible crash when getting an attribute of |
| 18890 |
:class:`xml.etree.ElementTree.Element` simultaneously with replacing the |
| 18891 |
``attrib`` dict. |
| 18892 |
|
| 18893 |
- bpo-45711: Make :mod:`asyncio` normalize exceptions as soon as they are |
| 18894 |
captured with :c:func:`PyErr_Fetch`, and before they are stored as an |
| 18895 |
exc_info triplet. This brings :mod:`asyncio` in line with the rest of the |
| 18896 |
codebase, where an exc_info triplet is always normalized. |
| 18897 |
|
| 18898 |
- bpo-23819: Replaced asserts with exceptions in asyncio, patch by Kumar |
| 18899 |
Aditya. |
| 18900 |
|
| 18901 |
- bpo-13236: :class:`unittest.TextTestResult` and |
| 18902 |
:class:`unittest.TextTestRunner` flush now the output stream more often. |
| 18903 |
|
| 18904 |
- bpo-45917: Added :func:`math.exp2`:, which returns 2 raised to the power |
| 18905 |
of x. |
| 18906 |
|
| 18907 |
- bpo-37658: Fix issue when on certain conditions ``asyncio.wait_for()`` may |
| 18908 |
allow a coroutine to complete successfully, but fail to return the result, |
| 18909 |
potentially causing memory leaks or other issues. |
| 18910 |
|
| 18911 |
- bpo-45876: Improve the accuracy of stdev() and pstdev() in the statistics |
| 18912 |
module. When the inputs are floats or fractions, the output is a |
| 18913 |
correctly rounded float |
| 18914 |
|
| 18915 |
- bpo-44649: Handle dataclass(slots=True) with a field that has default a |
| 18916 |
default value, but for which init=False. |
| 18917 |
|
| 18918 |
- bpo-45803: Added missing kw_only parameter to |
| 18919 |
dataclasses.make_dataclass(). |
| 18920 |
|
| 18921 |
- bpo-45837: The :meth:`!turtle.RawTurtle.settiltangle` is deprecated since |
| 18922 |
Python 3.1, it now emits a deprecation warning and will be removed in |
| 18923 |
Python 3.13. |
| 18924 |
|
| 18925 |
Use :meth:`turtle.RawTurtle.tiltangle` instead. |
| 18926 |
|
| 18927 |
:meth:`turtle.RawTurtle.tiltangle` was earlier incorrectly marked as |
| 18928 |
deprecated, its docstring has been corrected. |
| 18929 |
|
| 18930 |
Patch by Hugo van Kemenade. |
| 18931 |
|
| 18932 |
- bpo-45831: :mod:`faulthandler` can now write ASCII-only strings (like |
| 18933 |
filenames and function names) with a single write() syscall when dumping a |
| 18934 |
traceback. It reduces the risk of getting an unreadable dump when two |
| 18935 |
threads or two processes dump a traceback to the same file (like stderr) |
| 18936 |
at the same time. Patch by Victor Stinner. |
| 18937 |
|
| 18938 |
- bpo-45828: :mod:`sqlite` C callbacks now use unraisable exceptions if |
| 18939 |
callback tracebacks are enabled. Patch by Erlend E. Aasland. |
| 18940 |
|
| 18941 |
- bpo-41735: Fix thread lock in ``zlib.Decompress.flush()`` method before |
| 18942 |
``PyObject_GetBuffer``. |
| 18943 |
|
| 18944 |
- bpo-45235: Reverted an argparse bugfix that caused regression in the |
| 18945 |
handling of default arguments for subparsers. This prevented leaf level |
| 18946 |
arguments from taking precedence over root level arguments. |
| 18947 |
|
| 18948 |
- bpo-45754: Fix a regression in Python 3.11a1 and 3.11a2 where |
| 18949 |
:mod:`sqlite3` incorrectly would use ``SQLITE_LIMIT_LENGTH`` when checking |
| 18950 |
SQL statement lengths. Now, ``SQLITE_LIMIT_SQL_LENGTH`` is used. Patch by |
| 18951 |
Erlend E. Aasland. |
| 18952 |
|
| 18953 |
- bpo-45766: Added *proportional* option to |
| 18954 |
:meth:`statistics.linear_regression`. |
| 18955 |
|
| 18956 |
- bpo-45765: In importlib.metadata, fix distribution discovery for an empty |
| 18957 |
path. |
| 18958 |
|
| 18959 |
- bpo-45757: Fix bug where :mod:`dis` produced an incorrect oparg when |
| 18960 |
:opcode:`EXTENDED_ARG` is followed by an opcode that does not use its |
| 18961 |
argument. |
| 18962 |
|
| 18963 |
- bpo-45644: In-place JSON file formatting using ``python3 -m json.tool |
| 18964 |
infile infile`` now works correctly, previously it left the file empty. |
| 18965 |
Patch by Chris Wesseling. |
| 18966 |
|
| 18967 |
- bpo-45703: When a namespace package is imported before another module from |
| 18968 |
the same namespace is created/installed in a different :data:`sys.path` |
| 18969 |
location while the program is running, calling the |
| 18970 |
:func:`importlib.invalidate_caches` function will now also guarantee the |
| 18971 |
new module is noticed. |
| 18972 |
|
| 18973 |
- bpo-45535: Improve output of ``dir()`` with Enums. |
| 18974 |
|
| 18975 |
- bpo-45664: Fix :func:`types.resolve_bases` and :func:`types.new_class` for |
| 18976 |
:class:`types.GenericAlias` instance as a base. |
| 18977 |
|
| 18978 |
- bpo-45663: Fix :func:`dataclasses.is_dataclass` for dataclasses which are |
| 18979 |
subclasses of :class:`types.GenericAlias`. |
| 18980 |
|
| 18981 |
- bpo-45662: Fix the repr of :data:`dataclasses.InitVar` with a type alias |
| 18982 |
to the built-in class, e.g. ``InitVar[list[int]]``. |
| 18983 |
|
| 18984 |
- bpo-43137: Launch GNOME web browsers via gio tool instead of obsolete |
| 18985 |
gvfs-open |
| 18986 |
|
| 18987 |
- bpo-45429: On Windows, :func:`time.sleep` now uses a waitable timer which |
| 18988 |
supports high-resolution timers. Patch by Donghee Na and Eryk Sun. |
| 18989 |
|
| 18990 |
- bpo-37295: Optimize :func:`math.comb` and :func:`math.perm`. |
| 18991 |
|
| 18992 |
- bpo-45514: Deprecated legacy functions in :mod:`importlib.resources`. |
| 18993 |
|
| 18994 |
- bpo-45507: Add tests for truncated/missing trailers in gzip.decompress |
| 18995 |
implementation. |
| 18996 |
|
| 18997 |
- bpo-45359: Implement :pep:`585` for :class:`graphlib.TopologicalSorter`. |
| 18998 |
|
| 18999 |
- bpo-44733: Add ``max_tasks_per_child`` to |
| 19000 |
:class:`concurrent.futures.ProcessPoolExecutor`. This allows users to |
| 19001 |
specify the maximum number of tasks a single process should execute before |
| 19002 |
the process needs to be restarted. |
| 19003 |
|
| 19004 |
- bpo-28806: Improve netrc library. netrc file no longer needs to contain |
| 19005 |
all tokens. And if the login name is anonymous, security check is no |
| 19006 |
longer need. |
| 19007 |
|
| 19008 |
- bpo-43498: Avoid a possible *"RuntimeError: dictionary changed size during |
| 19009 |
iteration"* when adjusting the process count of |
| 19010 |
:class:`ProcessPoolExecutor`. |
| 19011 |
|
| 19012 |
- bpo-42158: Add MIME types for N-quads, N-triples, Notation3 and TriG to |
| 19013 |
``mimetypes``. |
| 19014 |
|
| 19015 |
- bpo-30533: Add :func:`inspect.getmembers_static` , it return all members |
| 19016 |
without triggering dynamic lookup via the descriptor protocol. Patch by |
| 19017 |
Weipeng Hong. |
| 19018 |
|
| 19019 |
Documentation |
| 19020 |
------------- |
| 19021 |
|
| 19022 |
- bpo-42238: ``make -C Doc suspicious`` will be removed soon in favor of |
| 19023 |
``make -C Doc check``, mark it as deprecated. |
| 19024 |
|
| 19025 |
- bpo-45840: Improve cross-references in the documentation for the data |
| 19026 |
model. |
| 19027 |
|
| 19028 |
- bpo-45640: Properly marked-up grammar tokens in the documentation are now |
| 19029 |
clickable and take you to the definition of a given piece of grammar. |
| 19030 |
Patch by Arthur Milchior. |
| 19031 |
|
| 19032 |
- bpo-45788: Link doc for sys.prefix to sysconfig doc on installation paths. |
| 19033 |
|
| 19034 |
- bpo-45772: ``socket.socket`` documentation is corrected to a class from a |
| 19035 |
function. |
| 19036 |
|
| 19037 |
- bpo-45392: Update the docstring of the :class:`type` built-in to remove a |
| 19038 |
redundant line and to mention keyword arguments for the constructor. |
| 19039 |
|
| 19040 |
- bpo-45250: Update the documentation to note that CPython does not |
| 19041 |
consistently require iterators to define ``__iter__``. |
| 19042 |
|
| 19043 |
- bpo-25381: In the extending chapter of the extending doc, update a |
| 19044 |
paragraph about the global variables containing exception information. |
| 19045 |
|
| 19046 |
- bpo-43905: Expanded :func:`~dataclasses.astuple` and |
| 19047 |
:func:`~dataclasses.asdict` docs, warning about deepcopy being applied and |
| 19048 |
providing a workaround. |
| 19049 |
|
| 19050 |
Tests |
| 19051 |
----- |
| 19052 |
|
| 19053 |
- bpo-45695: Out-of-tree builds with a read-only source directory are now |
| 19054 |
tested by CI. |
| 19055 |
|
| 19056 |
- bpo-19460: Add new Test for |
| 19057 |
``Lib/email/mime/nonmultipart.py::MIMENonMultipart``. |
| 19058 |
|
| 19059 |
- bpo-45835: Fix race condition in test_queue tests with multiple "feeder" |
| 19060 |
threads. |
| 19061 |
|
| 19062 |
- bpo-45783: The test for the freeze tool now handles file moves and |
| 19063 |
deletions. |
| 19064 |
|
| 19065 |
- bpo-45745: Remove the ``--findleaks`` command line option of regrtest: use |
| 19066 |
the ``--fail-env-changed`` option instead. Since Python 3.7, it was a |
| 19067 |
deprecated alias to the ``--fail-env-changed`` option. |
| 19068 |
|
| 19069 |
- bpo-45701: Add tests with ``tuple`` type with :func:`functools.lru_cache` |
| 19070 |
to ``test_functools``. |
| 19071 |
|
| 19072 |
Build |
| 19073 |
----- |
| 19074 |
|
| 19075 |
- bpo-44035: CI now verifies that autoconf files have been regenerated with |
| 19076 |
a current and unpatched autoconf package. |
| 19077 |
|
| 19078 |
- bpo-45950: The build system now uses a :program:`_bootstrap_python` |
| 19079 |
interpreter for freezing and deepfreezing again. To speed up build process |
| 19080 |
the build tools :program:`_bootstrap_python` and :program:`_freeze_module` |
| 19081 |
are no longer build with LTO. |
| 19082 |
|
| 19083 |
- bpo-45881: The :program:`configure` script now accepts |
| 19084 |
``--with-build-python`` and ``--with-freeze-module`` options to make cross |
| 19085 |
compiling easier. |
| 19086 |
|
| 19087 |
- bpo-40280: Emscripten platform now uses ``.wasm`` suffix by default. |
| 19088 |
|
| 19089 |
- bpo-40280: Disable unusable core extension modules on WASM/Emscripten |
| 19090 |
targets. |
| 19091 |
|
| 19092 |
- bpo-40280: ``configure`` now checks for socket ``shutdown`` function. The |
| 19093 |
check makes it possible to disable ``SYS_shutdown`` with |
| 19094 |
``ac_cv_func_shutdown=no`` in CONFIG_SITE. |
| 19095 |
|
| 19096 |
- bpo-40280: ``configure`` now checks for functions ``fork1, getegid, |
| 19097 |
geteuid, getgid, getppid, getuid, opendir, pipe, system, wait, ttyname``. |
| 19098 |
|
| 19099 |
- bpo-33393: Update ``config.guess`` to 2021-06-03 and ``config.sub`` to |
| 19100 |
2021-08-14. ``Makefile`` now has an ``update-config`` target to make |
| 19101 |
updating more convenient. |
| 19102 |
|
| 19103 |
- bpo-45866: ``make regen-all`` now produces the same output when run from a |
| 19104 |
directory other than the source tree: when building Python out of the |
| 19105 |
source tree. pegen now strips directory of the "generated by pygen from |
| 19106 |
<FILENAME>" header Patch by Victor Stinner. |
| 19107 |
|
| 19108 |
- bpo-40280: ``configure`` now accepts machine ``wasm32`` or ``wasm64`` and |
| 19109 |
OS ``wasi`` or ``emscripten`` for cross building, e.g. |
| 19110 |
``wasm32-unknown-emscripten``, ``wasm32-wasi``, or |
| 19111 |
``wasm32-unknown-wasi``. |
| 19112 |
|
| 19113 |
- bpo-41498: Python now compiles on platforms without ``sigset_t``. Several |
| 19114 |
functions in :mod:`signal` are not available when ``sigset_t`` is missing. |
| 19115 |
|
| 19116 |
Based on patch by Roman Yurchak for pyodide. |
| 19117 |
|
| 19118 |
- bpo-45881: ``setup.py`` now uses ``CC`` from environment first to discover |
| 19119 |
multiarch and cross compile paths. |
| 19120 |
|
| 19121 |
- bpo-45886: The ``_freeze_module`` program path can now be overridden on |
| 19122 |
the command line, e.g. ``make |
| 19123 |
FREEZE_MODULE=../x86_64/Program/_freeze_module``. |
| 19124 |
|
| 19125 |
- bpo-45873: Get rid of the ``_bootstrap_python`` build step. The |
| 19126 |
deepfreeze.py script is now run using ``$(PYTHON_FOR_REGEN)`` which can be |
| 19127 |
Python 3.7 or newer (on Windows, 3.8 or newer). |
| 19128 |
|
| 19129 |
- bpo-45847: Port builtin hashlib extensions to ``PY_STDLIB_MOD`` macro and |
| 19130 |
``addext()``. |
| 19131 |
|
| 19132 |
- bpo-45723: Add ``autoconf`` helpers for saving and restoring environment |
| 19133 |
variables: |
| 19134 |
|
| 19135 |
* ``SAVE_ENV``: Save ``$CFLAGS``, ``$LDFLAGS``, ``$LIBS``, and |
| 19136 |
``$CPPFLAGS``. |
| 19137 |
* ``RESTORE_ENV``: Restore ``$CFLAGS``, ``$LDFLAGS``, ``$LIBS``, and |
| 19138 |
``$CPPFLAGS``. |
| 19139 |
* ``WITH_SAVE_ENV([SCRIPT])``: Run ``SCRIPT`` wrapped with ``SAVE_ENV`` and |
| 19140 |
``RESTORE_ENV``. |
| 19141 |
|
| 19142 |
Patch by Erlend E. Aasland. |
| 19143 |
|
| 19144 |
- bpo-45573: Mandatory core modules, that are required to bootstrap Python, |
| 19145 |
are now in ``Modules/Setup.bootstrap``. |
| 19146 |
|
| 19147 |
- bpo-45573: ``configure`` now creates ``Modules/Setup.stdlib`` with |
| 19148 |
conditionally enabled/disabled extension module lines. The file is not |
| 19149 |
used, yet. |
| 19150 |
|
| 19151 |
- bpo-45573: ``configure`` now uses a unified format to set state, compiler |
| 19152 |
flags, and linker flags in Makefile. The new macro ``PY_STDLIB_MOD`` sets |
| 19153 |
three variables that are consumed by ``Modules/Setup`` and ``setup.py``. |
| 19154 |
|
| 19155 |
- bpo-45816: Python now supports building with Visual Studio 2022 (MSVC |
| 19156 |
v143, VS Version 17.0). Patch by Jeremiah Vivian. |
| 19157 |
|
| 19158 |
- bpo-45800: Settings for :mod:`pyexpat` C extension are now detected by |
| 19159 |
``configure``. The bundled ``expat`` library is built in ``Makefile``. |
| 19160 |
|
| 19161 |
- bpo-45798: Settings for :mod:`decimal` internal C extension are now |
| 19162 |
detected by ``configure``. The bundled ``libmpdec`` library is built in |
| 19163 |
``Makefile``. |
| 19164 |
|
| 19165 |
- bpo-45723: :program:`configure` has a new option ``--with-pkg-config`` to |
| 19166 |
disable or require pkg-config. |
| 19167 |
|
| 19168 |
- bpo-45774: The build dependencies for :mod:`sqlite3` are now detected by |
| 19169 |
``configure`` and ``pkg-config``. Patch by Erlend E. Aasland. |
| 19170 |
|
| 19171 |
- bpo-45763: The build dependencies for :mod:`zlib`, :mod:`bz2`, and |
| 19172 |
:mod:`lzma` are now detected by ``configure``. |
| 19173 |
|
| 19174 |
- bpo-45747: gdbm and dbm build dependencies are now detected by |
| 19175 |
``configure``. |
| 19176 |
|
| 19177 |
- bpo-45743: On macOS, the build system no longer passes |
| 19178 |
``search_paths_first`` to the linker. The flag has been the default since |
| 19179 |
Xcode 4 / macOS 10.6. |
| 19180 |
|
| 19181 |
- bpo-45723: ``configure.ac`` is now compatible with autoconf 2.71. |
| 19182 |
Deprecated checks ``STDC_HEADERS`` and ``AC_HEADER_TIME`` have been |
| 19183 |
removed. |
| 19184 |
|
| 19185 |
- bpo-45723: ``configure`` now prints a warning when pkg-config is missing. |
| 19186 |
|
| 19187 |
- bpo-45731: ``configure --enable-loadable-sqlite-extensions`` is now |
| 19188 |
handled by new ``PY_SQLITE_ENABLE_LOAD_EXTENSION`` macro instead of logic |
| 19189 |
in setup.py. |
| 19190 |
|
| 19191 |
- bpo-45723: configure.ac now uses custom helper macros and |
| 19192 |
``AC_CACHE_CHECK`` to simplify and speed up configure runs. |
| 19193 |
|
| 19194 |
- bpo-45696: Skip the marshal step for frozen modules by generating C code |
| 19195 |
that produces a set of ready-to-use code objects. This speeds up startup |
| 19196 |
time by another 10% or more. |
| 19197 |
|
| 19198 |
- bpo-45561: Run smelly.py tool from $(srcdir). |
| 19199 |
|
| 19200 |
Windows |
| 19201 |
------- |
| 19202 |
|
| 19203 |
- bpo-46105: Fixed calculation of :data:`sys.path` in a venv on Windows. |
| 19204 |
|
| 19205 |
- bpo-45901: When installed through the Microsoft Store and set as the |
| 19206 |
default app for :file:`*.py` files, command line arguments will now be |
| 19207 |
passed to Python when invoking a script without explicitly launching |
| 19208 |
Python (that is, ``script.py args`` rather than ``python script.py |
| 19209 |
args``). |
| 19210 |
|
| 19211 |
- bpo-45616: Fix Python Launcher's ability to distinguish between versions |
| 19212 |
3.1 and 3.10 when either one is explicitly requested. Previously, 3.1 |
| 19213 |
would be used if 3.10 was requested but not installed, and 3.10 would be |
| 19214 |
used if 3.1 was requested but 3.10 was installed. |
| 19215 |
|
| 19216 |
- bpo-45850: Implement changes to build with deep-frozen modules on Windows. |
| 19217 |
Note that we now require Python 3.10 as the "bootstrap" or "host" Python. |
| 19218 |
|
| 19219 |
- bpo-45732: Updates bundled Tcl/Tk to 8.6.12. |
| 19220 |
|
| 19221 |
- bpo-45720: Internal reference to :file:`shlwapi.dll` was dropped to help |
| 19222 |
improve startup time. This DLL will no longer be loaded at the start of |
| 19223 |
every Python process. |
| 19224 |
|
| 19225 |
macOS |
| 19226 |
----- |
| 19227 |
|
| 19228 |
- bpo-45732: Update python.org macOS installer to use Tcl/Tk 8.6.12. |
| 19229 |
|
| 19230 |
C API |
| 19231 |
----- |
| 19232 |
|
| 19233 |
- bpo-39026: Fix Python.h to build C extensions with Xcode: remove a |
| 19234 |
relative include from ``Include/cpython/pystate.h``. |
| 19235 |
|
| 19236 |
|
| 19237 |
What's New in Python 3.11.0 alpha 2? |
| 19238 |
==================================== |
| 19239 |
|
| 19240 |
*Release date: 2021-11-05* |
| 19241 |
|
| 19242 |
Core and Builtins |
| 19243 |
----------------- |
| 19244 |
|
| 19245 |
- bpo-45716: Improve the :exc:`SyntaxError` message when using ``True``, |
| 19246 |
``None`` or ``False`` as keywords in a function call. Patch by Pablo |
| 19247 |
Galindo. |
| 19248 |
|
| 19249 |
- bpo-45688: :data:`sys.stdlib_module_names` now contains the macOS-specific |
| 19250 |
module :mod:`!_scproxy`. |
| 19251 |
|
| 19252 |
- bpo-45379: Clarify :exc:`ImportError` message when we try to explicitly |
| 19253 |
import a frozen module but frozen modules are disabled. |
| 19254 |
|
| 19255 |
- bpo-44525: Specialize simple calls to Python functions (no starargs, |
| 19256 |
keyword dict, or closure) |
| 19257 |
|
| 19258 |
- bpo-45530: Cases of sorting using tuples as keys may now be significantly |
| 19259 |
faster in some cases. Patch by Tim Peters. |
| 19260 |
|
| 19261 |
The order of the result may differ from earlier releases if the tuple |
| 19262 |
elements don't define a total ordering (see |
| 19263 |
:ref:`expressions-value-comparisons` for information on total ordering). |
| 19264 |
It's generally true that the result of sorting simply isn't well-defined |
| 19265 |
in the absence of a total ordering on list elements. |
| 19266 |
|
| 19267 |
- bpo-45526: In obmalloc, set ADDRESS_BITS to not ignore any bits (ignored |
| 19268 |
16 before). That is safer in the case that the kernel gives user-space |
| 19269 |
virtual addresses that span a range greater than 48 bits. |
| 19270 |
|
| 19271 |
- bpo-30570: Fixed a crash in ``issubclass()`` from infinite recursion when |
| 19272 |
searching pathological ``__bases__`` tuples. |
| 19273 |
|
| 19274 |
- bpo-45521: Fix a bug in the obmalloc radix tree code. On 64-bit machines, |
| 19275 |
the bug causes the tree to hold 46-bits of virtual addresses, rather than |
| 19276 |
the intended 48-bits. |
| 19277 |
|
| 19278 |
- bpo-45494: Fix parser crash when reporting errors involving invalid |
| 19279 |
continuation characters. Patch by Pablo Galindo. |
| 19280 |
|
| 19281 |
- bpo-45445: Python now fails to initialize if it finds an invalid |
| 19282 |
:option:`-X` option in the command line. Patch by Pablo Galindo. |
| 19283 |
|
| 19284 |
- bpo-45340: Object attributes are held in an array instead of a dictionary. |
| 19285 |
An object's dictionary are created lazily, only when needed. Reduces the |
| 19286 |
memory consumption of a typical Python object by about 30%. Patch by Mark |
| 19287 |
Shannon. |
| 19288 |
|
| 19289 |
- bpo-45408: Fix a crash in the parser when reporting tokenizer errors that |
| 19290 |
occur at the same time unclosed parentheses are detected. Patch by Pablo |
| 19291 |
Galindo. |
| 19292 |
|
| 19293 |
- bpo-29410: Add SipHash13 for string hash algorithm and use it by default. |
| 19294 |
|
| 19295 |
- bpo-45385: Fix reference leak from descr_check. Patch by Donghee Na. |
| 19296 |
|
| 19297 |
- bpo-45367: Specialized the ``BINARY_MULTIPLY`` opcode to |
| 19298 |
``BINARY_MULTIPLY_INT`` and ``BINARY_MULTIPLY_FLOAT`` using the PEP 659 |
| 19299 |
machinery. |
| 19300 |
|
| 19301 |
- bpo-21736: Frozen stdlib modules now have ``__file__`` to the .py file |
| 19302 |
they would otherwise be loaded from, if possible. For packages, |
| 19303 |
``__path__`` now has the correct entry instead of being an empty list, |
| 19304 |
which allows unfrozen submodules to be imported. These are set only if |
| 19305 |
the stdlib directory is known when the runtime is initialized. Note that |
| 19306 |
the file at ``__file__`` is not guaranteed to exist. None of this affects |
| 19307 |
non-stdlib frozen modules nor, for now, frozen modules imported using |
| 19308 |
``PyImport_ImportFrozenModule()``. Also, at the moment ``co_filename`` is |
| 19309 |
not updated for the module. |
| 19310 |
|
| 19311 |
- bpo-45020: For frozen stdlib modules, record the original module name as |
| 19312 |
``module.__spec__.loader_state.origname``. If the value is different than |
| 19313 |
``module.__spec__.name`` then the module was defined as an alias in |
| 19314 |
Tools/scripts/freeze_modules.py. If it is ``None`` then the module comes |
| 19315 |
from a source file outside the stdlib. |
| 19316 |
|
| 19317 |
- bpo-45324: In FrozenImporter.find_spec(), we now preserve the information |
| 19318 |
needed in exec_module() to load the module. This change mostly impacts |
| 19319 |
internal details, rather than changing the importer's behavior. |
| 19320 |
|
| 19321 |
- bpo-45292: Implement :pep:`654`. Add :class:`ExceptionGroup` and |
| 19322 |
:class:`BaseExceptionGroup`. Update traceback display code. |
| 19323 |
|
| 19324 |
- bpo-40116: Change to the implementation of split dictionaries. Classes |
| 19325 |
where the instances differ either in the exact set of attributes, or in |
| 19326 |
the order in which those attributes are set, can still share keys. This |
| 19327 |
should have no observable effect on users of Python or the C-API. Patch by |
| 19328 |
Mark Shannon. |
| 19329 |
|
| 19330 |
- bpo-44050: Extensions that indicate they use global state (by setting |
| 19331 |
``m_size`` to -1) can again be used in multiple interpreters. This reverts |
| 19332 |
to behavior of Python 3.8. |
| 19333 |
|
| 19334 |
- bpo-44525: Setup initial specialization infrastructure for the |
| 19335 |
``CALL_FUNCTION`` opcode. Implemented initial specializations for C |
| 19336 |
function calls: |
| 19337 |
|
| 19338 |
* ``CALL_FUNCTION_BUILTIN_O`` for ``METH_O`` flag. |
| 19339 |
|
| 19340 |
* ``CALL_FUNCTION_BUILTIN_FAST`` for ``METH_FASTCALL`` flag without keywords. |
| 19341 |
|
| 19342 |
* ``CALL_FUNCTION_LEN`` for ``len(o)``. |
| 19343 |
|
| 19344 |
* ``CALL_FUNCTION_ISINSTANCE`` for ``isinstance(o, t)``. |
| 19345 |
|
| 19346 |
- bpo-44511: Improve the generated bytecode for class and mapping patterns. |
| 19347 |
|
| 19348 |
- bpo-43706: Speed up calls to ``enumerate()`` by using the :pep:`590` |
| 19349 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 19350 |
|
| 19351 |
Library |
| 19352 |
------- |
| 19353 |
|
| 19354 |
- bpo-45679: Fix caching of multi-value :data:`typing.Literal`. |
| 19355 |
``Literal[True, 2]`` is no longer equal to ``Literal[1, 2]``. |
| 19356 |
|
| 19357 |
- bpo-42064: Convert :mod:`sqlite3` to multi-phase initialisation (PEP 489). |
| 19358 |
Patches by Erlend E. Aasland. |
| 19359 |
|
| 19360 |
- bpo-45438: Fix typing.Signature string representation for generic builtin |
| 19361 |
types. |
| 19362 |
|
| 19363 |
- bpo-45613: :mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on |
| 19364 |
the default threading mode the underlying SQLite library has been compiled |
| 19365 |
with. Patch by Erlend E. Aasland. |
| 19366 |
|
| 19367 |
- bpo-45574: Fix warning about ``print_escape`` being unused. |
| 19368 |
|
| 19369 |
- bpo-45581: :meth:`sqlite3.connect` now correctly raises :exc:`MemoryError` |
| 19370 |
if the underlying SQLite API signals memory error. Patch by Erlend E. |
| 19371 |
Aasland. |
| 19372 |
|
| 19373 |
- bpo-45557: :func:`pprint.pprint` now handles *underscore_numbers* |
| 19374 |
correctly. Previously it was always setting it to ``False``. |
| 19375 |
|
| 19376 |
- bpo-44019: Add :func:`operator.call` to ``operator.__all__``. Patch by |
| 19377 |
Kreusada. |
| 19378 |
|
| 19379 |
- bpo-42174: :meth:`shutil.get_terminal_size` now falls back to sane values |
| 19380 |
if the column or line count are 0. |
| 19381 |
|
| 19382 |
- bpo-35673: Improve the introspectability of the ``__loader__`` attribute |
| 19383 |
for namespace packages. :class:`importlib.machinery.NamespaceLoader` is |
| 19384 |
now public, and implements the :class:`importlib.abc.InspectLoader` |
| 19385 |
interface. ``_NamespaceLoader`` is kept for backward compatibility. |
| 19386 |
|
| 19387 |
- bpo-45515: Add references to :mod:`zoneinfo` in the :mod:`datetime` |
| 19388 |
documentation, mostly replacing outdated references to ``dateutil.tz``. |
| 19389 |
Change by Paul Ganssle. |
| 19390 |
|
| 19391 |
- bpo-45475: Reverted optimization of iterating :class:`gzip.GzipFile`, |
| 19392 |
:class:`bz2.BZ2File`, and :class:`lzma.LZMAFile` (see bpo-43787) because |
| 19393 |
it caused regression when user iterate them without having reference of |
| 19394 |
them. Patch by Inada Naoki. |
| 19395 |
|
| 19396 |
- bpo-45489: Update :class:`~typing.ForwardRef` to support ``|`` operator. |
| 19397 |
Patch by Donghee Na. |
| 19398 |
|
| 19399 |
- bpo-42222: Removed deprecated support for float arguments in |
| 19400 |
*randrange()*. |
| 19401 |
|
| 19402 |
- bpo-45428: Fix a regression in py_compile when reading filenames from |
| 19403 |
standard input. |
| 19404 |
|
| 19405 |
- bpo-45467: Fix incremental decoder and stream reader in the |
| 19406 |
"raw-unicode-escape" codec. Previously they failed if the escape sequence |
| 19407 |
was split. |
| 19408 |
|
| 19409 |
- bpo-45461: Fix incremental decoder and stream reader in the |
| 19410 |
"unicode-escape" codec. Previously they failed if the escape sequence was |
| 19411 |
split. |
| 19412 |
|
| 19413 |
- bpo-45239: Fixed :func:`email.utils.parsedate_tz` crashing with |
| 19414 |
:exc:`UnboundLocalError` on certain invalid input instead of returning |
| 19415 |
``None``. Patch by Ben Hoyt. |
| 19416 |
|
| 19417 |
- bpo-45417: Fix quadratic behaviour in the enum module: Creation of enum |
| 19418 |
classes with a lot of entries was quadratic. |
| 19419 |
|
| 19420 |
- bpo-45249: Fix the behaviour of :func:`traceback.print_exc` when |
| 19421 |
displaying the caret when the ``end_offset`` in the exception is set to 0. |
| 19422 |
Patch by Pablo Galindo |
| 19423 |
|
| 19424 |
- bpo-45416: Fix use of :class:`asyncio.Condition` with explicit |
| 19425 |
:class:`asyncio.Lock` objects, which was a regression due to removal of |
| 19426 |
explicit loop arguments. Patch by Joongi Kim. |
| 19427 |
|
| 19428 |
- bpo-20028: Empty escapechar/quotechar is not allowed when initializing |
| 19429 |
:class:`csv.Dialect`. Patch by Vajrasky Kok and Donghee Na. |
| 19430 |
|
| 19431 |
- bpo-44904: Fix bug in the :mod:`doctest` module that caused it to fail if |
| 19432 |
a docstring included an example with a ``classmethod`` ``property``. Patch |
| 19433 |
by Alex Waygood. |
| 19434 |
|
| 19435 |
- bpo-45406: Make :func:`inspect.getmodule` catch ``FileNotFoundError`` |
| 19436 |
raised by :func:`inspect.getabsfile`, and return ``None`` to indicate that |
| 19437 |
the module could not be determined. |
| 19438 |
|
| 19439 |
- bpo-45411: Add extensions for files containing subtitles - .srt & .vtt - |
| 19440 |
to the mimetypes.py module. |
| 19441 |
|
| 19442 |
- bpo-10716: Migrated pydoc to HTML5 (without changing the look of it). Side |
| 19443 |
effect is to update xmlrpc's ``ServerHTMLDoc`` which now uses the CSS too. |
| 19444 |
cgitb now relies less on pydoc (as it can't use the CSS file). |
| 19445 |
|
| 19446 |
- bpo-27580: Add support of null characters in :mod:`csv`. |
| 19447 |
|
| 19448 |
- bpo-45262: Prevent use-after-free in asyncio. Make sure the cached running |
| 19449 |
loop holder gets cleared on dealloc to prevent use-after-free in |
| 19450 |
get_running_loop |
| 19451 |
|
| 19452 |
- bpo-45386: Make :mod:`xmlrpc.client` more robust to C runtimes where the |
| 19453 |
underlying C ``strftime`` function results in a ``ValueError`` when |
| 19454 |
testing for year formatting options. |
| 19455 |
|
| 19456 |
- bpo-20028: Improve error message of :class:`csv.Dialect` when |
| 19457 |
initializing. Patch by Vajrasky Kok and Donghee Na. |
| 19458 |
|
| 19459 |
- bpo-45343: Update bundled pip to 21.2.4 and setuptools to 58.1.0 |
| 19460 |
|
| 19461 |
- bpo-45328: Fixed :class:`http.client.HTTPConnection` to work properly in |
| 19462 |
OSs that don't support the ``TCP_NODELAY`` socket option. |
| 19463 |
|
| 19464 |
- bpo-45243: Add :meth:`~sqlite3.Connection.setlimit` and |
| 19465 |
:meth:`~sqlite3.Connection.getlimit` to :class:`sqlite3.Connection` for |
| 19466 |
setting and getting SQLite limits by connection basis. Patch by Erlend E. |
| 19467 |
Aasland. |
| 19468 |
|
| 19469 |
- bpo-45320: Removed from the :mod:`inspect` module: |
| 19470 |
|
| 19471 |
* the ``getargspec`` function, deprecated since Python 3.0; |
| 19472 |
use :func:`inspect.signature` or :func:`inspect.getfullargspec` instead. |
| 19473 |
|
| 19474 |
* the ``formatargspec`` function, deprecated since Python 3.5; |
| 19475 |
use the :func:`inspect.signature` function and :class:`Signature` object |
| 19476 |
directly. |
| 19477 |
|
| 19478 |
* the undocumented ``Signature.from_builtin`` and ``Signature.from_function`` |
| 19479 |
functions, deprecated since Python 3.5; use the |
| 19480 |
:meth:`Signature.from_callable() <inspect.Signature.from_callable>` method |
| 19481 |
instead. |
| 19482 |
|
| 19483 |
Patch by Hugo van Kemenade. |
| 19484 |
|
| 19485 |
- bpo-45192: Fix the ``tempfile._infer_return_type`` function so that the |
| 19486 |
``dir`` argument of the :mod:`tempfile` functions accepts an object |
| 19487 |
implementing the ``os.PathLike`` protocol. |
| 19488 |
|
| 19489 |
Patch by Kyungmin Lee. |
| 19490 |
|
| 19491 |
- bpo-45160: When tracing a tkinter variable used by a ttk OptionMenu, |
| 19492 |
callbacks are no longer made twice. |
| 19493 |
|
| 19494 |
- bpo-25625: Added non parallel-safe :func:`~contextlib.chdir` context |
| 19495 |
manager to change the current working directory and then restore it on |
| 19496 |
exit. Simple wrapper around :func:`~os.chdir`. |
| 19497 |
|
| 19498 |
- bpo-24139: Add support for SQLite extended result codes in |
| 19499 |
:exc:`sqlite3.Error`. Patch by Erlend E. Aasland. |
| 19500 |
|
| 19501 |
- bpo-24444: Fixed an error raised in :mod:`argparse` help display when help |
| 19502 |
for an option is set to 1+ blank spaces or when *choices* arg is an empty |
| 19503 |
container. |
| 19504 |
|
| 19505 |
- bpo-44547: Implement ``Fraction.__int__``, so that a |
| 19506 |
:class:`fractions.Fraction` instance ``f`` passes an ``isinstance(f, |
| 19507 |
typing.SupportsInt)`` check. |
| 19508 |
|
| 19509 |
- bpo-40321: Adds support for HTTP 308 redirects to :mod:`urllib`. See |
| 19510 |
:rfc:`7538` for details. Patch by Jochem Schulenklopper. |
| 19511 |
|
| 19512 |
- bpo-41374: Ensure that ``socket.TCP_*`` constants are exposed on Cygwin |
| 19513 |
3.1.6 and greater. |
| 19514 |
|
| 19515 |
- bpo-35970: Add help flag to the base64 module's command line interface. |
| 19516 |
Patch contributed by Robert Kuska. |
| 19517 |
|
| 19518 |
Documentation |
| 19519 |
------------- |
| 19520 |
|
| 19521 |
- bpo-45726: Improve documentation for :func:`functools.singledispatch` and |
| 19522 |
:class:`functools.singledispatchmethod`. |
| 19523 |
|
| 19524 |
- bpo-45680: Amend the docs on ``GenericAlias`` objects to clarify that |
| 19525 |
non-container classes can also implement ``__class_getitem__``. Patch |
| 19526 |
contributed by Alex Waygood. |
| 19527 |
|
| 19528 |
- bpo-45618: Update Sphinx version used to build the documentation to 4.2.0. |
| 19529 |
Patch by Maciej Olko. |
| 19530 |
|
| 19531 |
- bpo-45655: Add a new "relevant PEPs" section to the top of the |
| 19532 |
documentation for the ``typing`` module. Patch by Alex Waygood. |
| 19533 |
|
| 19534 |
- bpo-45604: Add ``level`` argument to ``multiprocessing.log_to_stderr`` |
| 19535 |
function docs. |
| 19536 |
|
| 19537 |
- bpo-45516: Add protocol description to the |
| 19538 |
:class:`importlib.abc.TraversableResources` documentation. |
| 19539 |
|
| 19540 |
- bpo-45464: Mention in the documentation of :ref:`Built-in Exceptions |
| 19541 |
<bltin-exceptions>` that inheriting from multiple exception types in a |
| 19542 |
single subclass is not recommended due to possible memory layout |
| 19543 |
incompatibility. |
| 19544 |
|
| 19545 |
- bpo-45449: Add note about :pep:`585` in :mod:`collections.abc`. |
| 19546 |
|
| 19547 |
- bpo-45516: Add protocol description to the |
| 19548 |
:class:`importlib.abc.Traversable` documentation. |
| 19549 |
|
| 19550 |
- bpo-20692: Add Programming FAQ entry explaining that int literal attribute |
| 19551 |
access requires either a space after or parentheses around the literal. |
| 19552 |
|
| 19553 |
Tests |
| 19554 |
----- |
| 19555 |
|
| 19556 |
- bpo-45678: Add tests for scenarios in which |
| 19557 |
:class:`functools.singledispatchmethod` is stacked on top of a method that |
| 19558 |
has already been wrapped by two other decorators. Patch by Alex Waygood. |
| 19559 |
|
| 19560 |
- bpo-45578: Add tests for :func:`dis.distb` |
| 19561 |
|
| 19562 |
- bpo-45678: Add tests to ensure that ``functools.singledispatchmethod`` |
| 19563 |
correctly wraps the attributes of the target function. |
| 19564 |
|
| 19565 |
- bpo-45668: PGO tests now pass when Python is built without test extension |
| 19566 |
modules. |
| 19567 |
|
| 19568 |
- bpo-45577: Add subtests for all ``pickle`` protocols in ``test_zoneinfo``. |
| 19569 |
|
| 19570 |
- bpo-45566: Fix ``test_frozen_pickle`` in ``test_dataclasses`` to check all |
| 19571 |
``pickle`` versions. |
| 19572 |
|
| 19573 |
- bpo-43592: :mod:`test.libregrtest` now raises the soft resource limit for |
| 19574 |
the maximum number of file descriptors when the default is too low for our |
| 19575 |
test suite as was often the case on macOS. |
| 19576 |
|
| 19577 |
- bpo-39679: Add more test cases for ``@functools.singledispatchmethod`` |
| 19578 |
when combined with ``@classmethod`` or ``@staticmethod``. |
| 19579 |
|
| 19580 |
- bpo-45410: When libregrtest spawns a worker process, stderr is now written |
| 19581 |
into stdout to keep messages order. Use a single pipe for stdout and |
| 19582 |
stderr, rather than two pipes. Previously, messages were out of order |
| 19583 |
which made analysis of buildbot logs harder Patch by Victor Stinner. |
| 19584 |
|
| 19585 |
- bpo-45402: Fix test_tools.test_sundry() when Python is built out of tree: |
| 19586 |
fix how the freeze_modules.py tool locates the _freeze_module program. |
| 19587 |
Patch by Victor Stinner. |
| 19588 |
|
| 19589 |
- bpo-45403: Fix test_sys.test_stdlib_dir() when Python is built outside the |
| 19590 |
source tree: compare normalized paths. Patch by Victor Stinner. |
| 19591 |
|
| 19592 |
- bpo-45400: Fix |
| 19593 |
test_name_error_suggestions_do_not_trigger_for_too_many_locals() of |
| 19594 |
test_exceptions if a directory name contains "a1" (like |
| 19595 |
"Python-3.11.0a1"): use a stricter regular expression. Patch by Victor |
| 19596 |
Stinner. |
| 19597 |
|
| 19598 |
- bpo-10572: Rename :mod:`sqlite3` tests from ``test_sqlite`` to |
| 19599 |
``test_sqlite3``, and relocate them to ``Lib/test/test_sqlite3``. Patch by |
| 19600 |
Erlend E. Aasland. |
| 19601 |
|
| 19602 |
Build |
| 19603 |
----- |
| 19604 |
|
| 19605 |
- bpo-43158: ``setup.py`` now uses values from configure script to build the |
| 19606 |
``_uuid`` extension module. Configure now detects util-linux's |
| 19607 |
``libuuid``, too. |
| 19608 |
|
| 19609 |
- bpo-45666: Fix warning of ``swprintf`` and ``%s`` usage in |
| 19610 |
``_testembed.c`` |
| 19611 |
|
| 19612 |
- bpo-45548: ``Modules/Setup`` and ``Modules/makesetup`` have been improved. |
| 19613 |
The ``Setup`` file now contains working rules for all extensions. Outdated |
| 19614 |
comments have been removed. Rules defined by ``makesetup`` track |
| 19615 |
dependencies correctly. |
| 19616 |
|
| 19617 |
- bpo-45548: The :mod:`math` and :mod:`cmath` implementation now require a |
| 19618 |
C99 compatible ``libm`` and no longer ship with workarounds for missing |
| 19619 |
acosh, asinh, atanh, expm1, and log1p functions. |
| 19620 |
|
| 19621 |
- bpo-45595: ``setup.py`` and ``makesetup`` now track build dependencies on |
| 19622 |
all Python header files and module specific header files. |
| 19623 |
|
| 19624 |
- bpo-45571: ``Modules/Setup`` now use ``PY_CFLAGS_NODIST`` instead of |
| 19625 |
``PY_CFLAGS`` to compile shared modules. |
| 19626 |
|
| 19627 |
- bpo-45570: :mod:`pyexpat` and :mod:`!_elementtree` no longer define |
| 19628 |
obsolete macros ``HAVE_EXPAT_CONFIG_H`` and ``USE_PYEXPAT_CAPI``. |
| 19629 |
``XML_POOR_ENTROPY`` is now defined in ``expat_config.h``. |
| 19630 |
|
| 19631 |
- bpo-43974: ``setup.py`` no longer defines ``Py_BUILD_CORE_MODULE``. |
| 19632 |
Instead every module, that uses the internal API, defines the macro. |
| 19633 |
|
| 19634 |
- bpo-45548: Fill in missing entries in Modules/Setup. |
| 19635 |
|
| 19636 |
- bpo-45532: Update :data:`sys.version` to use ``main`` as fallback |
| 19637 |
information. Patch by Jeong YunWon. |
| 19638 |
|
| 19639 |
- bpo-45536: The ``configure`` script now checks whether OpenSSL headers and |
| 19640 |
libraries provide required APIs. Most common APIs are verified. The check |
| 19641 |
detects outdated or missing OpenSSL. Failures do not stop configure. |
| 19642 |
|
| 19643 |
- bpo-45221: Fixed regression in handling of ``LDFLAGS`` and ``CPPFLAGS`` |
| 19644 |
options where :meth:`argparse.parse_known_args` could interpret an option |
| 19645 |
as one of the built-in command line argument, for example ``-h`` for help. |
| 19646 |
|
| 19647 |
- bpo-45440: Building Python now requires a C99 ``<math.h>`` header file |
| 19648 |
providing the following functions: ``copysign()``, ``hypot()``, |
| 19649 |
``isfinite()``, ``isinf()``, ``isnan()``, ``round()``. Patch by Victor |
| 19650 |
Stinner. |
| 19651 |
|
| 19652 |
- bpo-45405: Prevent ``internal configure error`` when running ``configure`` |
| 19653 |
with recent versions of non-Apple clang. Patch by David Bohman. |
| 19654 |
|
| 19655 |
- bpo-45433: Avoid linking libpython with libcrypt. |
| 19656 |
|
| 19657 |
Windows |
| 19658 |
------- |
| 19659 |
|
| 19660 |
- bpo-43652: Update Tcl/Tk to 8.6.11, actually this time. The previous |
| 19661 |
update incorrectly included 8.6.10. |
| 19662 |
|
| 19663 |
- bpo-45337: venv now warns when the created environment may need to be |
| 19664 |
accessed at a different path, due to redirections, links or junctions. It |
| 19665 |
also now correctly installs or upgrades components when the alternate path |
| 19666 |
is required. |
| 19667 |
|
| 19668 |
- bpo-43851: Build SQLite ``SQLITE_OMIT_AUTOINIT`` on Windows. Patch by |
| 19669 |
Erlend E. Aasland. |
| 19670 |
|
| 19671 |
macOS |
| 19672 |
----- |
| 19673 |
|
| 19674 |
- bpo-44828: Avoid tkinter file dialog failure on macOS 12 Monterey when |
| 19675 |
using the Tk 8.6.11 provided by python.org macOS installers. Patch by Marc |
| 19676 |
Culler of the Tk project. |
| 19677 |
|
| 19678 |
IDLE |
| 19679 |
---- |
| 19680 |
|
| 19681 |
- bpo-45495: Add context keywords 'case' and 'match' to completions list. |
| 19682 |
|
| 19683 |
C API |
| 19684 |
----- |
| 19685 |
|
| 19686 |
- bpo-29103: :c:func:`PyType_FromSpec* <PyType_FromModuleAndSpec>` now |
| 19687 |
copies the class name from the spec to a buffer owned by the class, so the |
| 19688 |
original can be safely deallocated. Patch by Petr Viktorin. |
| 19689 |
|
| 19690 |
- bpo-45522: The internal freelists for frame, float, list, dict, async |
| 19691 |
generators, and context objects can now be disabled. |
| 19692 |
|
| 19693 |
- bpo-35134: Exclude :c:func:`PyWeakref_GET_OBJECT` from the limited C API. |
| 19694 |
It never worked since the :c:type:`!PyWeakReference` structure is opaque |
| 19695 |
in the limited C API. |
| 19696 |
|
| 19697 |
- bpo-35081: Move the ``interpreteridobject.h`` header file from |
| 19698 |
``Include/`` to ``Include/internal/``. It only provides private functions. |
| 19699 |
Patch by Victor Stinner. |
| 19700 |
|
| 19701 |
- bpo-35134: The non-limited API files ``cellobject.h``, ``classobject.h``, |
| 19702 |
``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` |
| 19703 |
have been moved to the ``Include/cpython`` directory. Moreover, the |
| 19704 |
``eval.h`` header file was removed. These files must not be included |
| 19705 |
directly, as they are already included in ``Python.h``: :ref:`Include |
| 19706 |
Files <api-includes>`. If they have been included directly, consider |
| 19707 |
including ``Python.h`` instead. Patch by Victor Stinner. |
| 19708 |
|
| 19709 |
- bpo-45474: The following items are no longer available when |
| 19710 |
``Py_LIMITED_API`` is defined: |
| 19711 |
|
| 19712 |
* :c:func:`PyMarshal_WriteLongToFile` |
| 19713 |
* :c:func:`PyMarshal_WriteObjectToFile` |
| 19714 |
* :c:func:`PyMarshal_ReadObjectFromString` |
| 19715 |
* :c:func:`PyMarshal_WriteObjectToString` |
| 19716 |
* the ``Py_MARSHAL_VERSION`` macro |
| 19717 |
|
| 19718 |
These are not part of the :ref:`limited API <limited-api-list>`. |
| 19719 |
|
| 19720 |
Patch by Victor Stinner. |
| 19721 |
|
| 19722 |
- bpo-45434: Remove the ``pystrhex.h`` header file. It only contains private |
| 19723 |
functions. C extensions should only include the main ``<Python.h>`` header |
| 19724 |
file. Patch by Victor Stinner. |
| 19725 |
|
| 19726 |
- bpo-45440: Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the |
| 19727 |
``Py_IS_INFINITY()`` macro. Patch by Victor Stinner. |
| 19728 |
|
| 19729 |
- bpo-45434: ``<Python.h>`` no longer includes the header files |
| 19730 |
``<stdlib.h>``, ``<stdio.h>``, ``<errno.h>`` and ``<string.h>`` when the |
| 19731 |
``Py_LIMITED_API`` macro is set to ``0x030b0000`` (Python 3.11) or higher. |
| 19732 |
C extensions should explicitly include the header files after ``#include |
| 19733 |
<Python.h>``. Patch by Victor Stinner. |
| 19734 |
|
| 19735 |
- bpo-41123: Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, |
| 19736 |
deprecated since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or |
| 19737 |
``memcpy()`` (``wchar_t*`` string), and ``PyUnicode_Fill()`` functions |
| 19738 |
instead. Patch by Victor Stinner. |
| 19739 |
|
| 19740 |
- bpo-45412: Remove the following math macros using the ``errno`` variable: |
| 19741 |
|
| 19742 |
* ``Py_ADJUST_ERANGE1()`` |
| 19743 |
* ``Py_ADJUST_ERANGE2()`` |
| 19744 |
* ``Py_OVERFLOWED()`` |
| 19745 |
* ``Py_SET_ERANGE_IF_OVERFLOW()`` |
| 19746 |
* ``Py_SET_ERRNO_ON_MATH_ERROR()`` |
| 19747 |
|
| 19748 |
Patch by Victor Stinner. |
| 19749 |
|
| 19750 |
- bpo-45395: Custom frozen modules (the array set to |
| 19751 |
``PyImport_FrozenModules``) are now treated as additions, rather than |
| 19752 |
replacing all the default frozen modules. Frozen stdlib modules can still |
| 19753 |
be disabled by setting the "code" field of the custom array entry to NULL. |
| 19754 |
|
| 19755 |
- bpo-43760: Add new :c:func:`PyThreadState_EnterTracing`, and |
| 19756 |
:c:func:`PyThreadState_LeaveTracing` functions to the limited C API to |
| 19757 |
suspend and resume tracing and profiling. Patch by Victor Stinner. |
| 19758 |
|
| 19759 |
- bpo-44220: :c:var:`PyStructSequence_UnnamedField` is added to the Stable |
| 19760 |
ABI. |
| 19761 |
|
| 19762 |
|
| 19763 |
What's New in Python 3.11.0 alpha 1? |
| 19764 |
==================================== |
| 19765 |
|
| 19766 |
*Release date: 2021-10-05* |
| 19767 |
|
| 19768 |
Security |
| 19769 |
-------- |
| 19770 |
|
| 19771 |
- bpo-42278: Replaced usage of :func:`tempfile.mktemp` with |
| 19772 |
:class:`~tempfile.TemporaryDirectory` to avoid a potential race condition. |
| 19773 |
|
| 19774 |
- bpo-44600: Fix incorrect line numbers while tracing some failed patterns |
| 19775 |
in :ref:`match <match>` statements. Patch by Charles Burkland. |
| 19776 |
|
| 19777 |
- bpo-41180: Add auditing events to the :mod:`marshal` module, and stop |
| 19778 |
raising ``code.__init__`` events for every unmarshalled code object. |
| 19779 |
Directly instantiated code objects will continue to raise an event, and |
| 19780 |
audit event handlers should inspect or collect the raw marshal data. This |
| 19781 |
reduces a significant performance overhead when loading from ``.pyc`` |
| 19782 |
files. |
| 19783 |
|
| 19784 |
- bpo-44394: Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to |
| 19785 |
get the fix for the :cve:`2013-0340` "Billion Laughs" vulnerability. This |
| 19786 |
copy is most used on Windows and macOS. |
| 19787 |
|
| 19788 |
- bpo-43124: Made the internal ``putcmd`` function in :mod:`smtplib` |
| 19789 |
sanitize input for presence of ``\r`` and ``\n`` characters to avoid |
| 19790 |
(unlikely) command injection. |
| 19791 |
|
| 19792 |
- bpo-44022: :mod:`http.client` now avoids infinitely reading potential HTTP |
| 19793 |
headers after a ``100 Continue`` status response from the server. |
| 19794 |
|
| 19795 |
Core and Builtins |
| 19796 |
----------------- |
| 19797 |
|
| 19798 |
- bpo-43760: The number of hardware branches per instruction dispatch is |
| 19799 |
reduced from two to one by adding a special instruction for tracing. Patch |
| 19800 |
by Mark Shannon. |
| 19801 |
|
| 19802 |
- bpo-45061: Add a deallocator to the bool type to detect refcount bugs in C |
| 19803 |
extensions which call Py_DECREF(Py_True) or Py_DECREF(Py_False) by |
| 19804 |
mistake. Detect also refcount bugs when the empty tuple singleton or the |
| 19805 |
Unicode empty string singleton is destroyed by mistake. Patch by Victor |
| 19806 |
Stinner. |
| 19807 |
|
| 19808 |
- bpo-24076: sum() was further optimised for summing up single digit |
| 19809 |
integers. |
| 19810 |
|
| 19811 |
- bpo-45190: Update Unicode databases to Unicode 14.0.0. |
| 19812 |
|
| 19813 |
- bpo-45167: Fix deepcopying of :class:`types.GenericAlias` objects. |
| 19814 |
|
| 19815 |
- bpo-45155: :meth:`int.to_bytes` and :meth:`int.from_bytes` now take a |
| 19816 |
default value of ``"big"`` for the ``byteorder`` argument. |
| 19817 |
:meth:`int.to_bytes` also takes a default value of ``1`` for the |
| 19818 |
``length`` argument. |
| 19819 |
|
| 19820 |
Library |
| 19821 |
------- |
| 19822 |
|
| 19823 |
- bpo-44219: Release the GIL while performing ``isatty`` system calls on |
| 19824 |
arbitrary file descriptors. In particular, this affects :func:`os.isatty`, |
| 19825 |
:func:`os.device_encoding` and :class:`io.TextIOWrapper`. By extension, |
| 19826 |
:func:`io.open` in text mode is also affected. This change solves a |
| 19827 |
deadlock in :func:`os.isatty`. Patch by Vincent Michel in :issue:`44219`. |
| 19828 |
|
| 19829 |
Core and Builtins |
| 19830 |
----------------- |
| 19831 |
|
| 19832 |
- bpo-44959: Added fallback to extension modules with '.sl' suffix on HP-UX |
| 19833 |
|
| 19834 |
Library |
| 19835 |
------- |
| 19836 |
|
| 19837 |
- bpo-45121: Fix issue where ``Protocol.__init__`` raises ``RecursionError`` |
| 19838 |
when it's called directly or via ``super()``. Patch provided by Yurii |
| 19839 |
Karabas. |
| 19840 |
|
| 19841 |
Core and Builtins |
| 19842 |
----------------- |
| 19843 |
|
| 19844 |
- bpo-44348: The deallocator function of the :exc:`BaseException` type now |
| 19845 |
uses the trashcan mechanism to prevent stack overflow. For example, when a |
| 19846 |
:exc:`RecursionError` instance is raised, it can be linked to another |
| 19847 |
RecursionError through the ``__context__`` attribute or the |
| 19848 |
``__traceback__`` attribute, and then a chain of exceptions is created. |
| 19849 |
When the chain is destroyed, nested deallocator function calls can crash |
| 19850 |
with a stack overflow if the chain is too long compared to the available |
| 19851 |
stack memory. Patch by Victor Stinner. |
| 19852 |
|
| 19853 |
- bpo-45123: Fix PyAiter_Check to only check for the __anext__ presence (not |
| 19854 |
for __aiter__). Rename PyAiter_Check to PyAIter_Check, PyObject_GetAiter |
| 19855 |
-> PyObject_GetAIter. |
| 19856 |
|
| 19857 |
- bpo-1514420: Interpreter no longer attempts to open files with names in |
| 19858 |
angle brackets (like "<string>" or "<stdin>") when formatting an |
| 19859 |
exception. |
| 19860 |
|
| 19861 |
- bpo-41031: Match C and Python code formatting of unprintable exceptions |
| 19862 |
and exceptions in the :mod:`__main__` module. |
| 19863 |
|
| 19864 |
- bpo-37330: :func:`open`, :func:`io.open`, :func:`codecs.open` and |
| 19865 |
:class:`fileinput.FileInput` no longer accept ``'U'`` ("universal |
| 19866 |
newline") in the file mode. This flag was deprecated since Python 3.3. |
| 19867 |
Patch by Victor Stinner. |
| 19868 |
|
| 19869 |
- bpo-45083: When the interpreter renders an exception, its name now has a |
| 19870 |
complete qualname. Previously only the class name was concatenated to the |
| 19871 |
module name, which sometimes resulted in an incorrect full name being |
| 19872 |
displayed. |
| 19873 |
|
| 19874 |
(This issue impacted only the C code exception rendering, the |
| 19875 |
:mod:`traceback` module was using qualname already). |
| 19876 |
|
| 19877 |
- bpo-34561: List sorting now uses the merge-ordering strategy from Munro |
| 19878 |
and Wild's ``powersort()``. Unlike the former strategy, this is provably |
| 19879 |
near-optimal in the entropy of the distribution of run lengths. Most uses |
| 19880 |
of ``list.sort()`` probably won't see a significant time difference, but |
| 19881 |
may see significant improvements in cases where the former strategy was |
| 19882 |
exceptionally poor. However, as these are all fast linear-time |
| 19883 |
approximations to a problem that's inherently at best quadratic-time to |
| 19884 |
solve truly optimally, it's also possible to contrive cases where the |
| 19885 |
former strategy did better. |
| 19886 |
|
| 19887 |
- bpo-45056: Compiler now removes trailing unused constants from co_consts. |
| 19888 |
|
| 19889 |
- bpo-45020: Add a new command line option, "-X frozen_modules=[on|off]" to |
| 19890 |
opt out of (or into) using optional frozen modules. This defaults to "on" |
| 19891 |
(or "off" if it's running out of the source tree). |
| 19892 |
|
| 19893 |
Library |
| 19894 |
------- |
| 19895 |
|
| 19896 |
- bpo-45012: In :mod:`posix`, release GIL during ``stat()``, ``lstat()``, |
| 19897 |
and ``fstatat()`` syscalls made by :func:`os.DirEntry.stat`. Patch by |
| 19898 |
Stanisław Skonieczny. |
| 19899 |
|
| 19900 |
Core and Builtins |
| 19901 |
----------------- |
| 19902 |
|
| 19903 |
- bpo-45018: Fixed pickling of range iterators that iterated for over |
| 19904 |
``2**32`` times. |
| 19905 |
|
| 19906 |
- bpo-45000: A :exc:`SyntaxError` is now raised when trying to delete |
| 19907 |
:const:`__debug__`. Patch by Donghee Na. |
| 19908 |
|
| 19909 |
- bpo-44963: Implement ``send()`` and ``throw()`` methods for |
| 19910 |
``anext_awaitable`` objects. Patch by Pablo Galindo. |
| 19911 |
|
| 19912 |
Library |
| 19913 |
------- |
| 19914 |
|
| 19915 |
- bpo-44962: Fix a race in WeakKeyDictionary, WeakValueDictionary and |
| 19916 |
WeakSet when two threads attempt to commit the last pending removal. This |
| 19917 |
fixes asyncio.create_task and fixes a data loss in asyncio.run where |
| 19918 |
shutdown_asyncgens is not run |
| 19919 |
|
| 19920 |
Core and Builtins |
| 19921 |
----------------- |
| 19922 |
|
| 19923 |
- bpo-24234: Implement the :meth:`__bytes__` special method on the |
| 19924 |
:class:`bytes` type, so a bytes object ``b`` passes an ``isinstance(b, |
| 19925 |
typing.SupportsBytes)`` check. |
| 19926 |
|
| 19927 |
- bpo-24234: Implement the :meth:`__complex__` special method on the |
| 19928 |
:class:`complex` type, so a complex number ``z`` passes an ``isinstance(z, |
| 19929 |
typing.SupportsComplex)`` check. |
| 19930 |
|
| 19931 |
- bpo-44954: Fixed a corner case bug where the result of |
| 19932 |
``float.fromhex('0x.8p-1074')`` was rounded the wrong way. |
| 19933 |
|
| 19934 |
- bpo-44947: Refine the syntax error for trailing commas in import |
| 19935 |
statements. Patch by Pablo Galindo. |
| 19936 |
|
| 19937 |
- bpo-44945: Specialize the BINARY_ADD instruction using the PEP 659 |
| 19938 |
machinery. Adds five new instructions: |
| 19939 |
|
| 19940 |
* BINARY_ADD_ADAPTIVE |
| 19941 |
* BINARY_ADD_FLOAT |
| 19942 |
* BINARY_ADD_INT |
| 19943 |
* BINARY_ADD_UNICODE |
| 19944 |
* BINARY_ADD_UNICODE_INPLACE_FAST |
| 19945 |
|
| 19946 |
Library |
| 19947 |
------- |
| 19948 |
|
| 19949 |
- bpo-44929: Fix some edge cases of ``enum.Flag`` string representation in |
| 19950 |
the REPL. Patch by Pablo Galindo. |
| 19951 |
|
| 19952 |
Core and Builtins |
| 19953 |
----------------- |
| 19954 |
|
| 19955 |
- bpo-44914: Class version tags are no longer recycled. |
| 19956 |
|
| 19957 |
This means that a version tag serves as a unique identifier for the state |
| 19958 |
of a class. We rely on this for effective specialization of the LOAD_ATTR |
| 19959 |
and other instructions. |
| 19960 |
|
| 19961 |
- bpo-44698: Restore behaviour of complex exponentiation with integer-valued |
| 19962 |
exponent of type :class:`float` or :class:`complex`. |
| 19963 |
|
| 19964 |
- bpo-44895: A debug variable :envvar:`PYTHONDUMPREFSFILE` is added for |
| 19965 |
creating a dump file which is generated by :option:`--with-trace-refs`. |
| 19966 |
Patch by Donghee Na. |
| 19967 |
|
| 19968 |
- bpo-44900: Add five superinstructions for PEP 659 quickening: |
| 19969 |
|
| 19970 |
* LOAD_FAST LOAD_FAST |
| 19971 |
* STORE_FAST LOAD_FAST |
| 19972 |
* LOAD_FAST LOAD_CONST |
| 19973 |
* LOAD_CONST LOAD_FAST |
| 19974 |
* STORE_FAST STORE_FAST |
| 19975 |
|
| 19976 |
- bpo-44889: Initial implementation of adaptive specialization of |
| 19977 |
``LOAD_METHOD``. The following specialized forms were added: |
| 19978 |
|
| 19979 |
* ``LOAD_METHOD_CACHED`` |
| 19980 |
|
| 19981 |
* ``LOAD_METHOD_MODULE`` |
| 19982 |
|
| 19983 |
* ``LOAD_METHOD_CLASS`` |
| 19984 |
|
| 19985 |
- bpo-44890: Specialization stats are always collected in debug builds. |
| 19986 |
|
| 19987 |
- bpo-44885: Correct the ast locations of f-strings with format specs and |
| 19988 |
repeated expressions. Patch by Pablo Galindo |
| 19989 |
|
| 19990 |
- bpo-44878: Remove the loop from the bytecode interpreter. All instructions |
| 19991 |
end with a DISPATCH macro, so the loop is now redundant. |
| 19992 |
|
| 19993 |
- bpo-44878: Remove switch statement for interpreter loop when using |
| 19994 |
computed gotos. This makes sure that we only have one dispatch table in |
| 19995 |
the interpreter. |
| 19996 |
|
| 19997 |
- bpo-44874: Deprecate the old trashcan macros |
| 19998 |
(``Py_TRASHCAN_SAFE_BEGIN``/``Py_TRASHCAN_SAFE_END``). They should be |
| 19999 |
replaced by the new macros ``Py_TRASHCAN_BEGIN`` and ``Py_TRASHCAN_END``. |
| 20000 |
|
| 20001 |
- bpo-44872: Use new trashcan macros (Py_TRASHCAN_BEGIN/END) in |
| 20002 |
frameobject.c instead of the old ones (Py_TRASHCAN_SAFE_BEGIN/END). |
| 20003 |
|
| 20004 |
- bpo-33930: Fix segmentation fault with deep recursion when cleaning method |
| 20005 |
objects. Patch by Augusto Goulart and Pablo Galindo. |
| 20006 |
|
| 20007 |
- bpo-25782: Fix bug where ``PyErr_SetObject`` hangs when the current |
| 20008 |
exception has a cycle in its context chain. |
| 20009 |
|
| 20010 |
- bpo-44856: Fix reference leaks in the error paths of ``update_bases()`` |
| 20011 |
and ``__build_class__``. Patch by Pablo Galindo. |
| 20012 |
|
| 20013 |
- bpo-44826: Initial implementation of adaptive specialization of STORE_ATTR |
| 20014 |
|
| 20015 |
Three specialized forms of STORE_ATTR are added: |
| 20016 |
|
| 20017 |
* STORE_ATTR_SLOT |
| 20018 |
|
| 20019 |
* STORE_ATTR_SPLIT_KEYS |
| 20020 |
|
| 20021 |
* STORE_ATTR_WITH_HINT |
| 20022 |
|
| 20023 |
- bpo-44838: Fixed a bug that was causing the parser to raise an incorrect |
| 20024 |
custom :exc:`SyntaxError` for invalid 'if' expressions. Patch by Pablo |
| 20025 |
Galindo. |
| 20026 |
|
| 20027 |
- bpo-44821: Create instance dictionaries (__dict__) eagerly, to improve |
| 20028 |
regularity of object layout and assist specialization. |
| 20029 |
|
| 20030 |
- bpo-44792: Improve syntax errors for if expressions. Patch by Miguel Brito |
| 20031 |
|
| 20032 |
- bpo-34013: Generalize the invalid legacy statement custom error message |
| 20033 |
(like the one generated when "print" is called without parentheses) to |
| 20034 |
include more generic expressions. Patch by Pablo Galindo |
| 20035 |
|
| 20036 |
- bpo-44732: Rename ``types.Union`` to ``types.UnionType``. |
| 20037 |
|
| 20038 |
- bpo-44725: Expose specialization stats in python via |
| 20039 |
:func:`!_opcode.get_specialization_stats`. |
| 20040 |
|
| 20041 |
- bpo-44717: Improve AttributeError on circular imports of submodules. |
| 20042 |
|
| 20043 |
- bpo-44698: Fix undefined behaviour in complex object exponentiation. |
| 20044 |
|
| 20045 |
- bpo-44653: Support :mod:`typing` types in parameter substitution in the |
| 20046 |
union type. |
| 20047 |
|
| 20048 |
- bpo-44676: Add ability to serialise ``types.Union`` objects. Patch |
| 20049 |
provided by Yurii Karabas. |
| 20050 |
|
| 20051 |
- bpo-44633: Parameter substitution of the union type with wrong types now |
| 20052 |
raises ``TypeError`` instead of returning :data:`NotImplemented`. |
| 20053 |
|
| 20054 |
- bpo-44661: Update ``property_descr_set`` to use vectorcall if possible. |
| 20055 |
Patch by Donghee Na. |
| 20056 |
|
| 20057 |
- bpo-44662: Add ``__module__`` to ``types.Union``. This also fixes |
| 20058 |
``types.Union`` issues with ``typing.Annotated``. Patch provided by Yurii |
| 20059 |
Karabas. |
| 20060 |
|
| 20061 |
- bpo-44655: Include the name of the type in unset __slots__ attribute |
| 20062 |
errors. Patch by Pablo Galindo |
| 20063 |
|
| 20064 |
- bpo-44655: Don't include a missing attribute with the same name as the |
| 20065 |
failing one when offering suggestions for missing attributes. Patch by |
| 20066 |
Pablo Galindo |
| 20067 |
|
| 20068 |
- bpo-44646: Fix the hash of the union type: it no longer depends on the |
| 20069 |
order of arguments. |
| 20070 |
|
| 20071 |
- bpo-44636: Collapse union of equal types. E.g. the result of ``int | int`` |
| 20072 |
is now ``int``. Fix comparison of the union type with non-hashable |
| 20073 |
objects. E.g. ``int | str == {}`` no longer raises a TypeError. |
| 20074 |
|
| 20075 |
Library |
| 20076 |
------- |
| 20077 |
|
| 20078 |
- bpo-44611: On Windows, :func:`os.urandom`: uses BCryptGenRandom API |
| 20079 |
instead of CryptGenRandom API which is deprecated from Microsoft Windows |
| 20080 |
API. Patch by Donghee Na. |
| 20081 |
|
| 20082 |
Core and Builtins |
| 20083 |
----------------- |
| 20084 |
|
| 20085 |
- bpo-44635: Convert ``None`` to ``type(None)`` in the union type |
| 20086 |
constructor. |
| 20087 |
|
| 20088 |
- bpo-26280: Implement adaptive specialization for BINARY_SUBSCR |
| 20089 |
|
| 20090 |
Three specialized forms of BINARY_SUBSCR are added: |
| 20091 |
|
| 20092 |
* BINARY_SUBSCR_LIST_INT |
| 20093 |
|
| 20094 |
* BINARY_SUBSCR_TUPLE_INT |
| 20095 |
|
| 20096 |
* BINARY_SUBSCR_DICT |
| 20097 |
|
| 20098 |
- bpo-44589: Mapping patterns in ``match`` statements with two or more equal |
| 20099 |
literal keys will now raise a :exc:`SyntaxError` at compile-time. |
| 20100 |
|
| 20101 |
- bpo-44606: Fix ``__instancecheck__`` and ``__subclasscheck__`` for the |
| 20102 |
union type. |
| 20103 |
|
| 20104 |
- bpo-42073: The ``@classmethod`` decorator can now wrap other |
| 20105 |
classmethod-like descriptors. |
| 20106 |
|
| 20107 |
- bpo-41972: Tuned the string-searching algorithm of fastsearch.h to have a |
| 20108 |
shorter inner loop for most cases. |
| 20109 |
|
| 20110 |
- bpo-44590: All necessary data for executing a Python function (local |
| 20111 |
variables, stack, etc) is now kept in a per-thread stack. Frame objects |
| 20112 |
are lazily allocated on demand. This increases performance by about 7% on |
| 20113 |
the standard benchmark suite. Introspection and debugging are unaffected |
| 20114 |
as frame objects are always available when needed. Patch by Mark Shannon. |
| 20115 |
|
| 20116 |
- bpo-44584: The threading debug (:envvar:`!PYTHONTHREADDEBUG` environment |
| 20117 |
variable) is deprecated in Python 3.10 and will be removed in Python 3.12. |
| 20118 |
This feature requires a debug build of Python. Patch by Victor Stinner. |
| 20119 |
|
| 20120 |
- bpo-43895: An obsolete internal cache of shared object file handles added |
| 20121 |
in 1995 that attempted, but did not guarantee, that a .so would not be |
| 20122 |
dlopen'ed twice to work around flaws in mid-1990s posix-ish operating |
| 20123 |
systems has been removed from dynload_shlib.c. |
| 20124 |
|
| 20125 |
Library |
| 20126 |
------- |
| 20127 |
|
| 20128 |
- bpo-44490: :mod:`typing` now searches for type parameters in |
| 20129 |
``types.Union`` objects. ``get_type_hints`` will also properly resolve |
| 20130 |
annotations with nested ``types.Union`` objects. Patch provided by Yurii |
| 20131 |
Karabas. |
| 20132 |
|
| 20133 |
Core and Builtins |
| 20134 |
----------------- |
| 20135 |
|
| 20136 |
- bpo-43950: Code objects can now provide the column information for |
| 20137 |
instructions when available. This is levaraged during traceback printing |
| 20138 |
to show the expressions responsible for errors. |
| 20139 |
|
| 20140 |
Contributed by Pablo Galindo, Batuhan Taskaya and Ammar Askar as part of |
| 20141 |
:pep:`657`. |
| 20142 |
|
| 20143 |
- bpo-44562: Remove uses of :c:func:`PyObject_GC_Del` in error path when |
| 20144 |
initializing :class:`types.GenericAlias`. |
| 20145 |
|
| 20146 |
Library |
| 20147 |
------- |
| 20148 |
|
| 20149 |
- bpo-41486: Fix a memory consumption and copying performance regression in |
| 20150 |
earlier 3.10 beta releases if someone used an output buffer larger than |
| 20151 |
4GiB with zlib.decompress on input data that expands that large. |
| 20152 |
|
| 20153 |
Core and Builtins |
| 20154 |
----------------- |
| 20155 |
|
| 20156 |
- bpo-43908: Heap types with the :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag |
| 20157 |
can now inherit the :pep:`590` vectorcall protocol. Previously, this was |
| 20158 |
only possible for :ref:`static types <static-types>`. Patch by Erlend E. |
| 20159 |
Aasland. |
| 20160 |
|
| 20161 |
- bpo-44553: Implement GC methods for ``types.Union`` to break reference |
| 20162 |
cycles and prevent memory leaks. |
| 20163 |
|
| 20164 |
- bpo-44490: Add ``__parameters__`` attribute and ``__getitem__`` operator |
| 20165 |
to ``types.Union``. Patch provided by Yurii Karabas. |
| 20166 |
|
| 20167 |
- bpo-44523: Remove the pass-through for :func:`hash` of |
| 20168 |
:class:`weakref.proxy` objects to prevent unintended consequences when the |
| 20169 |
original referred object dies while the proxy is part of a hashable |
| 20170 |
object. Patch by Pablo Galindo. |
| 20171 |
|
| 20172 |
- bpo-44483: Fix a crash in ``types.Union`` objects when creating a union of |
| 20173 |
an object with bad ``__module__`` field. |
| 20174 |
|
| 20175 |
- bpo-44486: Modules will always have a dictionary, even when created by |
| 20176 |
``types.ModuleType.__new__()`` |
| 20177 |
|
| 20178 |
- bpo-44472: Fix ltrace functionality when exceptions are raised. Patch by |
| 20179 |
Pablo Galindo |
| 20180 |
|
| 20181 |
- bpo-12022: A :exc:`TypeError` is now raised instead of an |
| 20182 |
:exc:`AttributeError` in :keyword:`with` and :keyword:`async with` |
| 20183 |
statements for objects which do not support the :term:`context manager` or |
| 20184 |
:term:`asynchronous context manager` protocols correspondingly. |
| 20185 |
|
| 20186 |
- bpo-44297: Make sure that the line number is set when entering a |
| 20187 |
comprehension scope. This ensures that backtraces including generator |
| 20188 |
expressions show the correct line number. |
| 20189 |
|
| 20190 |
- bpo-44456: Improve the syntax error when mixing positional and keyword |
| 20191 |
patterns. Patch by Pablo Galindo. |
| 20192 |
|
| 20193 |
- bpo-44409: Fix error location information for tokenizer errors raised on |
| 20194 |
initialization of the tokenizer. Patch by Pablo Galindo. |
| 20195 |
|
| 20196 |
- bpo-44396: Fix a possible crash in the tokenizer when raising syntax |
| 20197 |
errors for unclosed strings. Patch by Pablo Galindo. |
| 20198 |
|
| 20199 |
- bpo-44376: Exact integer exponentiation (like ``i**2`` or ``pow(i, 2)``) |
| 20200 |
with a small exponent is much faster, due to reducing overhead in such |
| 20201 |
cases. |
| 20202 |
|
| 20203 |
- bpo-44313: Directly imported objects and modules (through import and from |
| 20204 |
import statements) don't generate ``LOAD_METHOD``/``CALL_METHOD`` for |
| 20205 |
directly accessed objects on their namespace. They now use the regular |
| 20206 |
``LOAD_ATTR``/``CALL_FUNCTION``. |
| 20207 |
|
| 20208 |
- bpo-44338: Implement adaptive specialization for LOAD_GLOBAL |
| 20209 |
|
| 20210 |
Two specialized forms of LOAD_GLOBAL are added: |
| 20211 |
|
| 20212 |
* LOAD_GLOBAL_MODULE |
| 20213 |
|
| 20214 |
* LOAD_GLOBAL_BUILTIN |
| 20215 |
|
| 20216 |
- bpo-44368: Improve syntax errors for invalid "as" targets. Patch by Pablo |
| 20217 |
Galindo |
| 20218 |
|
| 20219 |
- bpo-44349: Fix an edge case when displaying text from files with encoding |
| 20220 |
in syntax errors. Patch by Pablo Galindo. |
| 20221 |
|
| 20222 |
- bpo-44337: Initial implementation of adaptive specialization of LOAD_ATTR |
| 20223 |
|
| 20224 |
Four specialized forms of LOAD_ATTR are added: |
| 20225 |
|
| 20226 |
* LOAD_ATTR_SLOT |
| 20227 |
|
| 20228 |
* LOAD_ATTR_SPLIT_KEYS |
| 20229 |
|
| 20230 |
* LOAD_ATTR_WITH_HINT |
| 20231 |
|
| 20232 |
* LOAD_ATTR_MODULE |
| 20233 |
|
| 20234 |
- bpo-44335: Fix a regression when identifying incorrect characters in |
| 20235 |
syntax errors. Patch by Pablo Galindo |
| 20236 |
|
| 20237 |
- bpo-43693: Computation of the offsets of cell variables is done in the |
| 20238 |
compiler instead of at runtime. This reduces the overhead of handling cell |
| 20239 |
and free variables, especially in the case where a variable is both an |
| 20240 |
argument and cell variable. |
| 20241 |
|
| 20242 |
- bpo-44317: Improve tokenizer error with improved locations. Patch by Pablo |
| 20243 |
Galindo. |
| 20244 |
|
| 20245 |
Library |
| 20246 |
------- |
| 20247 |
|
| 20248 |
- bpo-44304: Fix a crash in the :mod:`sqlite3` module that happened when the |
| 20249 |
garbage collector clears :class:`sqlite.Statement` objects. Patch by Pablo |
| 20250 |
Galindo |
| 20251 |
|
| 20252 |
Core and Builtins |
| 20253 |
----------------- |
| 20254 |
|
| 20255 |
- bpo-44305: Improve error message for ``try`` blocks without ``except`` or |
| 20256 |
``finally`` blocks. Patch by Pablo Galindo. |
| 20257 |
|
| 20258 |
- bpo-43413: Constructors of subclasses of some builtin classes (e.g. |
| 20259 |
:class:`tuple`, :class:`list`, :class:`frozenset`) no longer accept |
| 20260 |
arbitrary keyword arguments. [reverted in 3.11a4] Subclass of :class:`set` |
| 20261 |
can now define a ``__new__()`` method with additional keyword parameters |
| 20262 |
without overriding also ``__init__()``. |
| 20263 |
|
| 20264 |
- bpo-43667: Improve Unicode support in non-UTF locales on Oracle Solaris. |
| 20265 |
This issue does not affect other Solaris systems. |
| 20266 |
|
| 20267 |
- bpo-43693: A new opcode MAKE_CELL has been added that effectively moves |
| 20268 |
some of the work done on function entry into the compiler and into the |
| 20269 |
eval loop. In addition to creating the required cell objects, the new |
| 20270 |
opcode converts relevant arguments (and other locals) to cell variables on |
| 20271 |
function entry. |
| 20272 |
|
| 20273 |
- bpo-44232: Fix a regression in :func:`type` when a metaclass raises an |
| 20274 |
exception. The C function :c:func:`type_new` must properly report the |
| 20275 |
exception when a metaclass constructor raises an exception and the winner |
| 20276 |
class is not the metaclass. Patch by Victor Stinner. |
| 20277 |
|
| 20278 |
- bpo-44201: Avoid side effects of checking for specialized syntax errors in |
| 20279 |
the REPL that was causing it to ask for extra tokens after a syntax error |
| 20280 |
had been detected. Patch by Pablo Galindo |
| 20281 |
|
| 20282 |
- bpo-43693: ``PyCodeObject`` gained ``co_fastlocalnames`` and |
| 20283 |
``co_fastlocalkinds`` as the authoritative source of fast locals info. |
| 20284 |
Marshaled code objects have changed accordingly. |
| 20285 |
|
| 20286 |
- bpo-44184: Fix a crash at Python exit when a deallocator function removes |
| 20287 |
the last strong reference to a heap type. Patch by Victor Stinner. |
| 20288 |
|
| 20289 |
- bpo-44187: Implement quickening in the interpreter. This offers no |
| 20290 |
advantages as yet, but is an enabler of future optimizations. See PEP 659 |
| 20291 |
for full explanation. |
| 20292 |
|
| 20293 |
- bpo-44180: The parser doesn't report generic syntax errors that happen in |
| 20294 |
a position further away that the one it reached in the first pass. Patch |
| 20295 |
by Pablo Galindo |
| 20296 |
|
| 20297 |
- bpo-44168: Fix error message in the parser involving keyword arguments |
| 20298 |
with invalid expressions. Patch by Pablo Galindo |
| 20299 |
|
| 20300 |
- bpo-44156: String caches in ``compile.c`` are now subinterpreter |
| 20301 |
compatible. |
| 20302 |
|
| 20303 |
- bpo-44143: Fixed a crash in the parser that manifest when raising |
| 20304 |
tokenizer errors when an existing exception was present. Patch by Pablo |
| 20305 |
Galindo. |
| 20306 |
|
| 20307 |
- bpo-44032: Move 'fast' locals and other variables from the frame object to |
| 20308 |
a per-thread datastack. |
| 20309 |
|
| 20310 |
- bpo-44114: Fix incorrect dictkeys_reversed and dictitems_reversed function |
| 20311 |
signatures in C code, which broke webassembly builds. |
| 20312 |
|
| 20313 |
- bpo-44110: Improve :func:`str.__getitem__` error message |
| 20314 |
|
| 20315 |
- bpo-26110: Add ``CALL_METHOD_KW`` opcode to speed up method calls with |
| 20316 |
keyword arguments. Idea originated from PyPy. A side effect is executing |
| 20317 |
``CALL_METHOD`` is now branchless in the evaluation loop. |
| 20318 |
|
| 20319 |
- bpo-28307: Compiler now optimizes simple C-style formatting with literal |
| 20320 |
format containing only format codes %s, %r and %a by converting them to |
| 20321 |
f-string expressions. |
| 20322 |
|
| 20323 |
- bpo-43149: Correct the syntax error message regarding multiple exception |
| 20324 |
types to not refer to "exception groups". Patch by Pablo Galindo |
| 20325 |
|
| 20326 |
- bpo-43822: The parser will prioritize tokenizer errors over custom syntax |
| 20327 |
errors when raising exceptions. Patch by Pablo Galindo. |
| 20328 |
|
| 20329 |
- bpo-40222: "Zero cost" exception handling. |
| 20330 |
|
| 20331 |
* Uses a lookup table to determine how to handle exceptions. |
| 20332 |
* Removes SETUP_FINALLY and POP_TOP block instructions, eliminating the runtime overhead of try statements. |
| 20333 |
* Reduces the size of the frame object by about 60%. |
| 20334 |
|
| 20335 |
Patch by Mark Shannon |
| 20336 |
|
| 20337 |
- bpo-43918: Document the signature and ``default`` argument in the |
| 20338 |
docstring of the new ``anext`` builtin. |
| 20339 |
|
| 20340 |
- bpo-43833: Emit a deprecation warning if the numeric literal is |
| 20341 |
immediately followed by one of keywords: and, else, for, if, in, is, or. |
| 20342 |
Raise a syntax error with more informative message if it is immediately |
| 20343 |
followed by other keyword or identifier. |
| 20344 |
|
| 20345 |
- bpo-43879: Add native_thread_id to PyThreadState. Patch by Gabriele N. |
| 20346 |
Tornetta. |
| 20347 |
|
| 20348 |
- bpo-43693: Compute cell offsets relative to locals in compiler. Allows the |
| 20349 |
interpreter to treats locals and cells a single array, which is slightly |
| 20350 |
more efficient. Also make the LOAD_CLOSURE opcode an alias for LOAD_FAST. |
| 20351 |
Preserving LOAD_CLOSURE helps keep bytecode a bit more readable. |
| 20352 |
|
| 20353 |
- bpo-17792: More accurate error messages for access of unbound locals or |
| 20354 |
free vars. |
| 20355 |
|
| 20356 |
- bpo-28146: Fix a confusing error message in :func:`str.format`. |
| 20357 |
|
| 20358 |
- bpo-11105: When compiling :class:`ast.AST` objects with recursive |
| 20359 |
references through :func:`compile`, the interpreter doesn't crash anymore |
| 20360 |
instead it raises a :exc:`RecursionError`. |
| 20361 |
|
| 20362 |
- bpo-39091: Fix crash when using passing a non-exception to a generator's |
| 20363 |
``throw()`` method. Patch by Noah Oxer |
| 20364 |
|
| 20365 |
- bpo-33346: Asynchronous comprehensions are now allowed inside |
| 20366 |
comprehensions in asynchronous functions. Outer comprehensions implicitly |
| 20367 |
become asynchronous. |
| 20368 |
|
| 20369 |
Library |
| 20370 |
------- |
| 20371 |
|
| 20372 |
- bpo-45371: Fix clang rpath issue in ``distutils``. The UnixCCompiler now |
| 20373 |
uses correct clang option to add a runtime library directory (rpath) to a |
| 20374 |
shared library. |
| 20375 |
|
| 20376 |
- bpo-45329: Fix freed memory access in :class:`pyexpat.xmlparser` when |
| 20377 |
building it with an installed expat library <= 2.2.0. |
| 20378 |
|
| 20379 |
- bpo-41710: On Unix, if the ``sem_clockwait()`` function is available in |
| 20380 |
the C library (glibc 2.30 and newer), the :meth:`threading.Lock.acquire` |
| 20381 |
method now uses the monotonic clock (:const:`time.CLOCK_MONOTONIC`) for |
| 20382 |
the timeout, rather than using the system clock |
| 20383 |
(:const:`time.CLOCK_REALTIME`), to not be affected by system clock |
| 20384 |
changes. Patch by Victor Stinner. |
| 20385 |
|
| 20386 |
- bpo-1596321: Fix the :func:`threading._shutdown` function when the |
| 20387 |
:mod:`threading` module was imported first from a thread different than |
| 20388 |
the main thread: no longer log an error at Python exit. |
| 20389 |
|
| 20390 |
- bpo-45274: Fix a race condition in the :meth:`Thread.join() |
| 20391 |
<threading.Thread.join>` method of the :mod:`threading` module. If the |
| 20392 |
function is interrupted by a signal and the signal handler raises an |
| 20393 |
exception, make sure that the thread remains in a consistent state to |
| 20394 |
prevent a deadlock. Patch by Victor Stinner. |
| 20395 |
|
| 20396 |
- bpo-21302: In Unix operating systems, :func:`time.sleep` now uses the |
| 20397 |
``nanosleep()`` function, if ``clock_nanosleep()`` is not available but |
| 20398 |
``nanosleep()`` is available. ``nanosleep()`` allows to sleep with |
| 20399 |
nanosecond precision. |
| 20400 |
|
| 20401 |
- bpo-21302: On Windows, :func:`time.sleep` now uses a waitable timer which |
| 20402 |
has a resolution of 100 nanoseconds (10\ :sup:`-7` seconds). Previously, |
| 20403 |
it had a resolution of 1 millisecond (10\ :sup:`-3` seconds). Patch by |
| 20404 |
Benjamin Szőke and Victor Stinner. |
| 20405 |
|
| 20406 |
- bpo-45238: Fix :meth:`unittest.IsolatedAsyncioTestCase.debug`: it runs now |
| 20407 |
asynchronous methods and callbacks. |
| 20408 |
|
| 20409 |
- bpo-36674: :meth:`unittest.TestCase.debug` raises now a |
| 20410 |
:class:`unittest.SkipTest` if the class or the test method are decorated |
| 20411 |
with the skipping decorator. |
| 20412 |
|
| 20413 |
- bpo-45235: Fix an issue where argparse would not preserve values in a |
| 20414 |
provided namespace when using a subparser with defaults. |
| 20415 |
|
| 20416 |
- bpo-45183: Have zipimport.zipimporter.find_spec() not raise an exception |
| 20417 |
when the underlying zip file has been deleted and the internal cache has |
| 20418 |
been reset via invalidate_cache(). |
| 20419 |
|
| 20420 |
- bpo-45234: Fixed a regression in :func:`~shutil.copyfile`, |
| 20421 |
:func:`~shutil.copy`, :func:`~shutil.copy2` raising |
| 20422 |
:exc:`FileNotFoundError` when source is a directory, which should raise |
| 20423 |
:exc:`IsADirectoryError` |
| 20424 |
|
| 20425 |
- bpo-45228: Fix stack buffer overflow in parsing J1939 network address. |
| 20426 |
|
| 20427 |
- bpo-45225: use map function instead of genexpr in capwords. |
| 20428 |
|
| 20429 |
- bpo-42135: Fix typo: ``importlib.find_loader`` is really slated for |
| 20430 |
removal in Python 3.12 not 3.10, like the others in PR 25169. |
| 20431 |
|
| 20432 |
Patch by Hugo van Kemenade. |
| 20433 |
|
| 20434 |
- bpo-20524: Improves error messages on ``.format()`` operation for ``str``, |
| 20435 |
``float``, ``int``, and ``complex``. New format now shows the problematic |
| 20436 |
pattern and the object type. |
| 20437 |
|
| 20438 |
- bpo-45168: Change :func:`dis.dis` output to omit op arg values that cannot |
| 20439 |
be resolved due to ``co_consts``, ``co_names`` etc not being provided. |
| 20440 |
Previously the oparg itself was repeated in the value field, which is not |
| 20441 |
useful and can be confusing. |
| 20442 |
|
| 20443 |
- bpo-21302: In Unix operating systems, :func:`time.sleep` now uses the |
| 20444 |
``clock_nanosleep()`` function, if available, which allows to sleep for an |
| 20445 |
interval specified with nanosecond precision. |
| 20446 |
|
| 20447 |
- bpo-45173: Remove from the :mod:`configparser` module: the |
| 20448 |
:class:`!SafeConfigParser` class, the :attr:`!filename` property of the |
| 20449 |
:class:`~configparser.ParsingError` class, the :meth:`!readfp` method of |
| 20450 |
the :class:`~configparser.ConfigParser` class, deprecated since Python |
| 20451 |
3.2. |
| 20452 |
|
| 20453 |
Patch by Hugo van Kemenade. |
| 20454 |
|
| 20455 |
- bpo-44987: Pure ASCII strings are now normalized in constant time by |
| 20456 |
:func:`unicodedata.normalize`. Patch by Donghee Na. |
| 20457 |
|
| 20458 |
- bpo-35474: Calling :func:`mimetypes.guess_all_extensions` with |
| 20459 |
``strict=False`` no longer affects the result of the following call with |
| 20460 |
``strict=True``. Also, mutating the returned list no longer affects the |
| 20461 |
global state. |
| 20462 |
|
| 20463 |
- bpo-45166: :func:`typing.get_type_hints` now works with |
| 20464 |
:data:`~typing.Final` wrapped in :class:`~typing.ForwardRef`. |
| 20465 |
|
| 20466 |
- bpo-45162: Remove many old deprecated :mod:`unittest` features: |
| 20467 |
|
| 20468 |
* "``fail*``" and "``assert*``" aliases of :class:`~unittest.TestCase` methods. |
| 20469 |
* Broken from start :class:`~unittest.TestCase` method ``assertDictContainsSubset()``. |
| 20470 |
* Ignored :meth:`<unittest.TestLoader.loadTestsFromModule> TestLoader.loadTestsFromModule` parameter *use_load_tests*. |
| 20471 |
* Old alias ``_TextTestResult`` of :class:`~unittest.TextTestResult`. |
| 20472 |
|
| 20473 |
- bpo-38371: Remove the deprecated ``split()`` method of |
| 20474 |
:class:`!_tkinter.TkappType`. Patch by Erlend E. Aasland. |
| 20475 |
|
| 20476 |
- bpo-20499: Improve the speed and accuracy of statistics.pvariance(). |
| 20477 |
|
| 20478 |
- bpo-45132: Remove :meth:`~object.__getitem__` methods of |
| 20479 |
:class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper` |
| 20480 |
and :class:`fileinput.FileInput`, deprecated since Python 3.9. |
| 20481 |
|
| 20482 |
Patch by Hugo van Kemenade. |
| 20483 |
|
| 20484 |
- bpo-45129: Due to significant security concerns, the *reuse_address* |
| 20485 |
parameter of :meth:`asyncio.loop.create_datagram_endpoint`, disabled in |
| 20486 |
Python 3.9, is now entirely removed. This is because of the behavior of |
| 20487 |
the socket option ``SO_REUSEADDR`` in UDP. |
| 20488 |
|
| 20489 |
Patch by Hugo van Kemenade. |
| 20490 |
|
| 20491 |
- bpo-45124: The ``bdist_msi`` command, deprecated in Python 3.9, is now |
| 20492 |
removed. |
| 20493 |
|
| 20494 |
Use ``bdist_wheel`` (wheel packages) instead. |
| 20495 |
|
| 20496 |
Patch by Hugo van Kemenade. |
| 20497 |
|
| 20498 |
- bpo-30856: :class:`unittest.TestResult` methods |
| 20499 |
:meth:`~unittest.TestResult.addFailure`, |
| 20500 |
:meth:`~unittest.TestResult.addError`, |
| 20501 |
:meth:`~unittest.TestResult.addSkip` and |
| 20502 |
:meth:`~unittest.TestResult.addSubTest` are now called immediately after |
| 20503 |
raising an exception in test or finishing a subtest. Previously they were |
| 20504 |
called only after finishing the test clean up. |
| 20505 |
|
| 20506 |
- bpo-45034: Changes how error is formatted for ``struct.pack`` with ``'H'`` |
| 20507 |
and ``'h'`` modes and too large / small numbers. Now it shows the actual |
| 20508 |
numeric limits, while previously it was showing arithmetic expressions. |
| 20509 |
|
| 20510 |
- bpo-25894: :mod:`unittest` now always reports skipped and failed subtests |
| 20511 |
separately: separate characters in default mode and separate lines in |
| 20512 |
verbose mode. Also the test description is now output for errors in test |
| 20513 |
method, class and module cleanups. |
| 20514 |
|
| 20515 |
- bpo-45081: Fix issue when dataclasses that inherit from |
| 20516 |
``typing.Protocol`` subclasses have wrong ``__init__``. Patch provided by |
| 20517 |
Yurii Karabas. |
| 20518 |
|
| 20519 |
- bpo-45085: The ``binhex`` module, deprecated in Python 3.9, is now |
| 20520 |
removed. The following :mod:`binascii` functions, deprecated in Python |
| 20521 |
3.9, are now also removed: |
| 20522 |
|
| 20523 |
* ``a2b_hqx()``, ``b2a_hqx()``; |
| 20524 |
* ``rlecode_hqx()``, ``rledecode_hqx()``. |
| 20525 |
|
| 20526 |
The :func:`binascii.crc_hqx` function remains available. |
| 20527 |
|
| 20528 |
Patch by Victor Stinner. |
| 20529 |
|
| 20530 |
- bpo-40360: The :mod:`!lib2to3` package is now deprecated and may not be |
| 20531 |
able to parse Python 3.10 or newer. See the :pep:`617` (New PEG parser for |
| 20532 |
CPython). Patch by Victor Stinner. |
| 20533 |
|
| 20534 |
- bpo-45075: Rename :meth:`traceback.StackSummary.format_frame` to |
| 20535 |
:meth:`traceback.StackSummary.format_frame_summary`. This method was added |
| 20536 |
for 3.11 so it was not released yet. |
| 20537 |
|
| 20538 |
Updated code and docs to better distinguish frame and FrameSummary. |
| 20539 |
|
| 20540 |
- bpo-31299: Add option to completely drop frames from a traceback by |
| 20541 |
returning ``None`` from a :meth:`~traceback.StackSummary.format_frame` |
| 20542 |
override. |
| 20543 |
|
| 20544 |
- bpo-41620: :meth:`~unittest.TestCase.run` now always return a |
| 20545 |
:class:`~unittest.TestResult` instance. Previously it returned ``None`` if |
| 20546 |
the test class or method was decorated with a skipping decorator. |
| 20547 |
|
| 20548 |
- bpo-45021: Fix a potential deadlock at shutdown of forked children when |
| 20549 |
using :mod:`concurrent.futures` module |
| 20550 |
|
| 20551 |
- bpo-43913: Fix bugs in cleaning up classes and modules in :mod:`unittest`: |
| 20552 |
|
| 20553 |
* Functions registered with :func:`~unittest.addModuleCleanup` were not called unless the user defines ``tearDownModule()`` in their test module. |
| 20554 |
* Functions registered with :meth:`~unittest.TestCase.addClassCleanup` were not called if ``tearDownClass`` is set to ``None``. |
| 20555 |
* Buffering in :class:`~unittest.TestResult` did not work with functions registered with ``addClassCleanup()`` and ``addModuleCleanup()``. |
| 20556 |
* Errors in functions registered with ``addClassCleanup()`` and ``addModuleCleanup()`` were not handled correctly in buffered and debug modes. |
| 20557 |
* Errors in ``setUpModule()`` and functions registered with ``addModuleCleanup()`` were reported in wrong order. |
| 20558 |
* And several lesser bugs. |
| 20559 |
|
| 20560 |
- bpo-45030: Fix integer overflow in pickling and copying the range |
| 20561 |
iterator. |
| 20562 |
|
| 20563 |
- bpo-45001: Made email date parsing more robust against malformed input, |
| 20564 |
namely a whitespace-only ``Date:`` header. Patch by Wouter Bolsterlee. |
| 20565 |
|
| 20566 |
- bpo-45010: Remove support of special method ``__div__`` in |
| 20567 |
:mod:`unittest.mock`. It is not used in Python 3. |
| 20568 |
|
| 20569 |
- bpo-39218: Improve accuracy of variance calculations by using ``x*x`` |
| 20570 |
instead of ``x**2``. |
| 20571 |
|
| 20572 |
- bpo-43613: Improve the speed of :func:`gzip.compress` and |
| 20573 |
:func:`gzip.decompress` by compressing and decompressing at once in memory |
| 20574 |
instead of in a streamed fashion. |
| 20575 |
|
| 20576 |
- bpo-37596: Ensure that :class:`set` and :class:`frozenset` objects are |
| 20577 |
always :mod:`marshalled <marshal>` reproducibly. |
| 20578 |
|
| 20579 |
- bpo-44019: A new function ``operator.call`` has been added, such that |
| 20580 |
``operator.call(obj, *args, **kwargs) == obj(*args, **kwargs)``. |
| 20581 |
|
| 20582 |
- bpo-42255: :class:`!webbrowser.MacOSX` is deprecated and will be removed |
| 20583 |
in Python 3.13. It is untested and undocumented and also not used by |
| 20584 |
:mod:`webbrowser` itself. Patch by Donghee Na. |
| 20585 |
|
| 20586 |
- bpo-44955: Method :meth:`~unittest.TestResult.stopTestRun` is now always |
| 20587 |
called in pair with method :meth:`~unittest.TestResult.startTestRun` for |
| 20588 |
:class:`~unittest.TestResult` objects implicitly created in |
| 20589 |
:meth:`~unittest.TestCase.run`. Previously it was not called for test |
| 20590 |
methods and classes decorated with a skipping decorator. |
| 20591 |
|
| 20592 |
- bpo-39039: tarfile.open raises :exc:`~tarfile.ReadError` when a zlib error |
| 20593 |
occurs during file extraction. |
| 20594 |
|
| 20595 |
- bpo-44935: :mod:`subprocess` on Solaris now also uses |
| 20596 |
:func:`os.posix_spawn` for better performance. |
| 20597 |
|
| 20598 |
- bpo-44911: :class:`~unittest.IsolatedAsyncioTestCase` will no longer throw |
| 20599 |
an exception while cancelling leaked tasks. Patch by Bar Harel. |
| 20600 |
|
| 20601 |
- bpo-41322: Added ``DeprecationWarning`` for tests and async tests that |
| 20602 |
return a value!=None (as this may indicate an improperly written test, for |
| 20603 |
example a test written as a generator function). |
| 20604 |
|
| 20605 |
- bpo-44524: Make exception message more useful when subclass from typing |
| 20606 |
special form alias. Patch provided by Yurii Karabas. |
| 20607 |
|
| 20608 |
- bpo-38956: :class:`argparse.BooleanOptionalAction`'s default value is no |
| 20609 |
longer printed twice when used with |
| 20610 |
:class:`argparse.ArgumentDefaultsHelpFormatter`. |
| 20611 |
|
| 20612 |
- bpo-44860: Fix the ``posix_user`` scheme in :mod:`sysconfig` to not depend |
| 20613 |
on :data:`sys.platlibdir`. |
| 20614 |
|
| 20615 |
- bpo-44859: Improve error handling in :mod:`sqlite3` and raise more |
| 20616 |
accurate exceptions. |
| 20617 |
|
| 20618 |
* :exc:`MemoryError` is now raised instead of :exc:`sqlite3.Warning` when memory is not enough for encoding a statement to UTF-8 in ``Connection.__call__()`` and ``Cursor.execute()``. |
| 20619 |
* :exc:`UnicodEncodeError` is now raised instead of :exc:`sqlite3.Warning` when the statement contains surrogate characters in ``Connection.__call__()`` and ``Cursor.execute()``. |
| 20620 |
* :exc:`TypeError` is now raised instead of :exc:`ValueError` for non-string script argument in ``Cursor.executescript()``. |
| 20621 |
* :exc:`ValueError` is now raised for script containing the null character instead of truncating it in ``Cursor.executescript()``. |
| 20622 |
* Correctly handle exceptions raised when getting boolean value of the result of the progress handler. |
| 20623 |
* Add many tests covering different corner cases. |
| 20624 |
|
| 20625 |
- bpo-44581: Upgrade bundled pip to 21.2.3 and setuptools to 57.4.0 |
| 20626 |
|
| 20627 |
- bpo-44849: Fix the :func:`os.set_inheritable` function on FreeBSD 14 for |
| 20628 |
file descriptor opened with the :const:`~os.O_PATH` flag: ignore the |
| 20629 |
:const:`~errno.EBADF` error on ``ioctl()``, fallback on the ``fcntl()`` |
| 20630 |
implementation. Patch by Victor Stinner. |
| 20631 |
|
| 20632 |
- bpo-44605: The @functools.total_ordering() decorator now works with |
| 20633 |
metaclasses. |
| 20634 |
|
| 20635 |
- bpo-44524: Fixed an issue wherein the ``__name__`` and ``__qualname__`` |
| 20636 |
attributes of subscribed specialforms could be ``None``. |
| 20637 |
|
| 20638 |
- bpo-44839: :class:`MemoryError` raised in user-defined functions will now |
| 20639 |
produce a ``MemoryError`` in :mod:`sqlite3`. :class:`OverflowError` will |
| 20640 |
now be converted to :class:`~sqlite3.DataError`. Previously |
| 20641 |
:class:`~sqlite3.OperationalError` was produced in these cases. |
| 20642 |
|
| 20643 |
- bpo-44822: :mod:`sqlite3` user-defined functions and aggregators returning |
| 20644 |
:class:`strings <str>` with embedded NUL characters are no longer |
| 20645 |
truncated. Patch by Erlend E. Aasland. |
| 20646 |
|
| 20647 |
- bpo-44801: Ensure that the :class:`~typing.ParamSpec` variable in Callable |
| 20648 |
can only be substituted with a parameters expression (a list of types, an |
| 20649 |
ellipsis, ParamSpec or Concatenate). |
| 20650 |
|
| 20651 |
- bpo-44806: Non-protocol subclasses of :class:`typing.Protocol` ignore now |
| 20652 |
the ``__init__`` method inherited from protocol base classes. |
| 20653 |
|
| 20654 |
- bpo-27275: :meth:`collections.OrderedDict.popitem` and |
| 20655 |
:meth:`collections.OrderedDict.pop` no longer call ``__getitem__`` and |
| 20656 |
``__delitem__`` methods of the OrderedDict subclasses. |
| 20657 |
|
| 20658 |
- bpo-44793: Fix checking the number of arguments when subscribe a generic |
| 20659 |
type with ``ParamSpec`` parameter. |
| 20660 |
|
| 20661 |
- bpo-44784: In importlib.metadata tests, override warnings behavior under |
| 20662 |
expected DeprecationWarnings (importlib_metadata 4.6.3). |
| 20663 |
|
| 20664 |
- bpo-44667: The :func:`tokenize.tokenize` doesn't incorrectly generate a |
| 20665 |
``NEWLINE`` token if the source doesn't end with a new line character but |
| 20666 |
the last line is a comment, as the function is already generating a ``NL`` |
| 20667 |
token. Patch by Pablo Galindo |
| 20668 |
|
| 20669 |
- bpo-44771: Added ``importlib.simple`` module implementing adapters from a |
| 20670 |
low-level resources reader interface to a ``TraversableResources`` |
| 20671 |
interface. Legacy API (``path``, ``contents``, ...) is now supported |
| 20672 |
entirely by the ``.files()`` API with a compatibility shim supplied for |
| 20673 |
resource loaders without that functionality. Feature parity with |
| 20674 |
``importlib_resources`` 5.2. |
| 20675 |
|
| 20676 |
- bpo-44752: :mod:`rcompleter` does not call :func:`getattr` on |
| 20677 |
:class:`property` objects to avoid the side-effect of evaluating the |
| 20678 |
corresponding method. |
| 20679 |
|
| 20680 |
- bpo-44747: Refactor usage of ``sys._getframe`` in ``typing`` module. Patch |
| 20681 |
provided by Yurii Karabas. |
| 20682 |
|
| 20683 |
- bpo-42378: Fixes the issue with log file being overwritten when |
| 20684 |
:class:`logging.FileHandler` is used in :mod:`atexit` with *filemode* set |
| 20685 |
to ``'w'``. Note this will cause the message in *atexit* not being logged |
| 20686 |
if the log stream is already closed due to shutdown of logging. |
| 20687 |
|
| 20688 |
- bpo-44720: ``weakref.proxy`` objects referencing non-iterators now raise |
| 20689 |
``TypeError`` rather than dereferencing the null ``tp_iternext`` slot and |
| 20690 |
crashing. |
| 20691 |
|
| 20692 |
- bpo-44704: The implementation of ``collections.abc.Set._hash()`` now |
| 20693 |
matches that of ``frozenset.__hash__()``. |
| 20694 |
|
| 20695 |
- bpo-44666: Fixed issue in :func:`compileall.compile_file` when |
| 20696 |
``sys.stdout`` is redirected. Patch by Stefan Hölzl. |
| 20697 |
|
| 20698 |
- bpo-44688: :meth:`sqlite3.Connection.create_collation` now accepts |
| 20699 |
non-ASCII collation names. Patch by Erlend E. Aasland. |
| 20700 |
|
| 20701 |
- bpo-44690: Adopt *binacii.a2b_base64*'s strict mode in *base64.b64decode*. |
| 20702 |
|
| 20703 |
- bpo-42854: Fixed a bug in the :mod:`!_ssl` module that was throwing |
| 20704 |
:exc:`OverflowError` when using :meth:`!_ssl._SSLSocket.write` and |
| 20705 |
:meth:`!_ssl._SSLSocket.read` for a big value of the ``len`` parameter. |
| 20706 |
Patch by Pablo Galindo. |
| 20707 |
|
| 20708 |
- bpo-44686: Replace ``unittest.mock._importer`` with |
| 20709 |
``pkgutil.resolve_name``. |
| 20710 |
|
| 20711 |
- bpo-44353: Make ``NewType.__call__`` faster by implementing it in C. Patch |
| 20712 |
provided by Yurii Karabas. |
| 20713 |
|
| 20714 |
- bpo-44682: Change the :mod:`pdb` *commands* directive to disallow setting |
| 20715 |
commands for an invalid breakpoint and to display an appropriate error. |
| 20716 |
|
| 20717 |
- bpo-44353: Refactor ``typing.NewType`` from function into callable class. |
| 20718 |
Patch provided by Yurii Karabas. |
| 20719 |
|
| 20720 |
- bpo-44678: Added a separate error message for discontinuous padding in |
| 20721 |
*binascii.a2b_base64* strict mode. |
| 20722 |
|
| 20723 |
- bpo-44524: Add missing ``__name__`` and ``__qualname__`` attributes to |
| 20724 |
``typing`` module classes. Patch provided by Yurii Karabas. |
| 20725 |
|
| 20726 |
- bpo-40897: Give priority to using the current class constructor in |
| 20727 |
:func:`inspect.signature`. Patch by Weipeng Hong. |
| 20728 |
|
| 20729 |
- bpo-44638: Add a reference to the zipp project and hint as to how to use |
| 20730 |
it. |
| 20731 |
|
| 20732 |
- bpo-44648: Fixed wrong error being thrown by :func:`inspect.getsource` |
| 20733 |
when examining a class in the interactive session. Instead of |
| 20734 |
:exc:`TypeError`, it should be :exc:`OSError` with appropriate error |
| 20735 |
message. |
| 20736 |
|
| 20737 |
- bpo-44608: Fix memory leak in :func:`!_tkinter._flatten` if it is called |
| 20738 |
with a sequence or set, but not list or tuple. |
| 20739 |
|
| 20740 |
- bpo-44594: Fix an edge case of :class:`ExitStack` and |
| 20741 |
:class:`AsyncExitStack` exception chaining. They will now match ``with`` |
| 20742 |
block behavior when ``__context__`` is explicitly set to ``None`` when the |
| 20743 |
exception is in flight. |
| 20744 |
|
| 20745 |
- bpo-42799: In :mod:`fnmatch`, the cache size for compiled regex patterns |
| 20746 |
(:func:`functools.lru_cache`) was bumped up from 256 to 32768, affecting |
| 20747 |
functions: :func:`fnmatch.fnmatch`, :func:`fnmatch.fnmatchcase`, |
| 20748 |
:func:`fnmatch.filter`. |
| 20749 |
|
| 20750 |
- bpo-41928: Update :func:`shutil.copyfile` to raise |
| 20751 |
:exc:`FileNotFoundError` instead of confusing :exc:`IsADirectoryError` |
| 20752 |
when a path ending with a :const:`os.path.sep` does not exist; |
| 20753 |
:func:`shutil.copy` and :func:`shutil.copy2` are also affected. |
| 20754 |
|
| 20755 |
- bpo-44569: Added the :func:`StackSummary.format_frame` function in |
| 20756 |
:mod:`traceback`. This allows users to customize the way individual lines |
| 20757 |
are formatted in tracebacks without re-implementing logic to handle |
| 20758 |
recursive tracebacks. |
| 20759 |
|
| 20760 |
- bpo-44566: handle StopIteration subclass raised from |
| 20761 |
@contextlib.contextmanager generator |
| 20762 |
|
| 20763 |
- bpo-44558: Make the implementation consistency of |
| 20764 |
:func:`~operator.indexOf` between C and Python versions. Patch by Donghee |
| 20765 |
Na. |
| 20766 |
|
| 20767 |
- bpo-41249: Fixes ``TypedDict`` to work with ``typing.get_type_hints()`` |
| 20768 |
and postponed evaluation of annotations across modules. |
| 20769 |
|
| 20770 |
- bpo-44554: Refactor argument processing in :func:`pdb.main` to simplify |
| 20771 |
detection of errors in input loading and clarify behavior around module or |
| 20772 |
script invocation. |
| 20773 |
|
| 20774 |
- bpo-34798: Break up paragraph about :class:`pprint.PrettyPrinter` |
| 20775 |
construction parameters to make it easier to read. |
| 20776 |
|
| 20777 |
- bpo-44539: Added support for recognizing JPEG files without JFIF or Exif |
| 20778 |
markers. |
| 20779 |
|
| 20780 |
- bpo-44461: Fix bug with :mod:`pdb`'s handling of import error due to a |
| 20781 |
package which does not have a ``__main__`` module |
| 20782 |
|
| 20783 |
- bpo-43625: Fix a bug in the detection of CSV file headers by |
| 20784 |
:meth:`csv.Sniffer.has_header` and improve documentation of same. |
| 20785 |
|
| 20786 |
- bpo-44516: Update vendored pip to 21.1.3 |
| 20787 |
|
| 20788 |
- bpo-42892: Fixed an exception thrown while parsing a malformed multipart |
| 20789 |
email by :class:`email.message.EmailMessage`. |
| 20790 |
|
| 20791 |
- bpo-44468: :func:`typing.get_type_hints` now finds annotations in classes |
| 20792 |
and base classes with unexpected ``__module__``. Previously, it skipped |
| 20793 |
those MRO elements. |
| 20794 |
|
| 20795 |
- bpo-44491: Allow clearing the :mod:`sqlite3` authorizer callback by |
| 20796 |
passing :const:`None` to :meth:`~sqlite3.Connection.set_authorizer`. Patch |
| 20797 |
by Erlend E. Aasland. |
| 20798 |
|
| 20799 |
- bpo-43977: Set the proper :c:macro:`Py_TPFLAGS_MAPPING` and |
| 20800 |
:c:macro:`Py_TPFLAGS_SEQUENCE` flags for subclasses created before a |
| 20801 |
parent has been registered as a :class:`collections.abc.Mapping` or |
| 20802 |
:class:`collections.abc.Sequence`. |
| 20803 |
|
| 20804 |
- bpo-44482: Fix very unlikely resource leak in :mod:`glob` in alternate |
| 20805 |
Python implementations. |
| 20806 |
|
| 20807 |
- bpo-44466: The :mod:`faulthandler` module now detects if a fatal error |
| 20808 |
occurs during a garbage collector collection. Patch by Victor Stinner. |
| 20809 |
|
| 20810 |
- bpo-44471: A :exc:`TypeError` is now raised instead of an |
| 20811 |
:exc:`AttributeError` in :meth:`contextlib.ExitStack.enter_context` and |
| 20812 |
:meth:`contextlib.AsyncExitStack.enter_async_context` for objects which do |
| 20813 |
not support the :term:`context manager` or :term:`asynchronous context |
| 20814 |
manager` protocols correspondingly. |
| 20815 |
|
| 20816 |
- bpo-44404: :mod:`tkinter`'s ``after()`` method now supports callables |
| 20817 |
without the ``__name__`` attribute. |
| 20818 |
|
| 20819 |
- bpo-41546: Make :mod:`pprint` (like the builtin ``print``) not attempt to |
| 20820 |
write to ``stdout`` when it is ``None``. |
| 20821 |
|
| 20822 |
- bpo-44458: ``BUFFER_BLOCK_SIZE`` is now declared static, to avoid linking |
| 20823 |
collisions when bz2, lmza or zlib are statically linked. |
| 20824 |
|
| 20825 |
- bpo-44464: Remove exception for flake8 in deprecated importlib.metadata |
| 20826 |
interfaces. Sync with importlib_metadata 4.6. |
| 20827 |
|
| 20828 |
- bpo-44446: Take into account that ``lineno`` might be ``None`` in |
| 20829 |
:class:`traceback.FrameSummary`. |
| 20830 |
|
| 20831 |
- bpo-44439: Fix in :meth:`bz2.BZ2File.write` / :meth:`lzma.LZMAFile.write` |
| 20832 |
methods, when the input data is an object that supports the buffer |
| 20833 |
protocol, the file length may be wrong. |
| 20834 |
|
| 20835 |
- bpo-44434: _thread.start_new_thread() no longer calls |
| 20836 |
PyThread_exit_thread() explicitly at the thread exit, the call was |
| 20837 |
redundant. On Linux with the glibc, pthread_exit() aborts the whole |
| 20838 |
process if dlopen() fails to open libgcc_s.so file (ex: EMFILE error). |
| 20839 |
Patch by Victor Stinner. |
| 20840 |
|
| 20841 |
- bpo-42972: The _thread.RLock type now fully implement the GC protocol: add |
| 20842 |
a traverse function and the :c:macro:`Py_TPFLAGS_HAVE_GC` flag. Patch by |
| 20843 |
Victor Stinner. |
| 20844 |
|
| 20845 |
- bpo-44422: The :func:`threading.enumerate` function now uses a reentrant |
| 20846 |
lock to prevent a hang on reentrant call. Patch by Victor Stinner. |
| 20847 |
|
| 20848 |
- bpo-38291: Importing typing.io or typing.re now prints a |
| 20849 |
``DeprecationWarning``. |
| 20850 |
|
| 20851 |
- bpo-37880: argparse actions store_const and append_const each receive a |
| 20852 |
default value of ``None`` when the ``const`` kwarg is not provided. |
| 20853 |
Previously, this raised a :exc:`TypeError`. |
| 20854 |
|
| 20855 |
- bpo-44389: Fix deprecation of :data:`ssl.OP_NO_TLSv1_3` |
| 20856 |
|
| 20857 |
- bpo-27827: :meth:`pathlib.PureWindowsPath.is_reserved` now identifies a |
| 20858 |
greater range of reserved filenames, including those with trailing spaces |
| 20859 |
or colons. |
| 20860 |
|
| 20861 |
- bpo-44395: Fix :meth:`~email.message.MIMEPart.as_string` to pass unixfrom |
| 20862 |
properly. Patch by Donghee Na. |
| 20863 |
|
| 20864 |
- bpo-34266: Handle exceptions from parsing the arg of :mod:`pdb`'s |
| 20865 |
run/restart command. |
| 20866 |
|
| 20867 |
- bpo-44362: Improve :mod:`ssl` module's deprecation messages, error |
| 20868 |
reporting, and documentation for deprecations. |
| 20869 |
|
| 20870 |
- bpo-44342: [Enum] Change pickling from by-value to by-name. |
| 20871 |
|
| 20872 |
- bpo-44356: [Enum] Allow multiple data-type mixins if they are all the |
| 20873 |
same. |
| 20874 |
|
| 20875 |
- bpo-44351: Restore back :func:`parse_makefile` in ``distutils.sysconfig`` |
| 20876 |
because it behaves differently than the similar implementation in |
| 20877 |
:mod:`sysconfig`. |
| 20878 |
|
| 20879 |
- bpo-35800: :class:`!smtpd.MailmanProxy` is now removed as it is unusable |
| 20880 |
without an external module, ``mailman``. Patch by Donghee Na. |
| 20881 |
|
| 20882 |
- bpo-44357: Added a function that returns cube root of the given number |
| 20883 |
:func:`math.cbrt` |
| 20884 |
|
| 20885 |
- bpo-44339: Change ``math.pow(±0.0, -math.inf)`` to return ``inf`` instead |
| 20886 |
of raising ``ValueError``. This brings the special-case handling of |
| 20887 |
``math.pow`` into compliance with the IEEE 754 standard. |
| 20888 |
|
| 20889 |
- bpo-44242: Remove missing flag check from Enum creation and move into a |
| 20890 |
``verify`` decorator. |
| 20891 |
|
| 20892 |
- bpo-44246: In ``importlib.metadata``, restore compatibility in the result |
| 20893 |
from ``Distribution.entry_points`` (``EntryPoints``) to honor expectations |
| 20894 |
in older implementations and issuing deprecation warnings for these cases: |
| 20895 |
A. ``EntryPoints`` objects are once again mutable, allowing for |
| 20896 |
``sort()`` and other list-based mutation operations. Avoid deprecation |
| 20897 |
warnings by casting to a mutable sequence (e.g. |
| 20898 |
``list(dist.entry_points).sort()``). B. ``EntryPoints`` results once again |
| 20899 |
allow for access by index. To avoid deprecation warnings, cast the |
| 20900 |
result to a Sequence first (e.g. ``tuple(dist.entry_points)[0]``). |
| 20901 |
|
| 20902 |
- bpo-44246: In importlib.metadata.entry_points, de-duplication of |
| 20903 |
distributions no longer requires loading the full metadata for |
| 20904 |
PathDistribution objects, improving entry point loading performance by |
| 20905 |
~10x. |
| 20906 |
|
| 20907 |
- bpo-43858: Added a function that returns a copy of a dict of logging |
| 20908 |
levels: :func:`logging.getLevelNamesMapping` |
| 20909 |
|
| 20910 |
- bpo-44260: The :class:`random.Random` constructor no longer reads system |
| 20911 |
entropy without need. |
| 20912 |
|
| 20913 |
- bpo-44254: On Mac, give turtledemo button text a color that works on both |
| 20914 |
light or dark background. Programmers cannot control the latter. |
| 20915 |
|
| 20916 |
- bpo-44258: Support PEP 515 for Fraction's initialization from string. |
| 20917 |
|
| 20918 |
- bpo-44235: Remove deprecated functions in the :mod:`gettext`. Patch by |
| 20919 |
Donghee Na. |
| 20920 |
|
| 20921 |
- bpo-38693: Prefer f-strings to ``.format`` in importlib.resources. |
| 20922 |
|
| 20923 |
- bpo-33693: Importlib.metadata now prefers f-strings to .format. |
| 20924 |
|
| 20925 |
- bpo-44241: Incorporate minor tweaks from importlib_metadata 4.1: |
| 20926 |
SimplePath protocol, support for Metadata 2.2. |
| 20927 |
|
| 20928 |
- bpo-43216: Remove the :deco:`asyncio.coroutine` :term:`decorator` enabling |
| 20929 |
legacy generator-based coroutines to be compatible with async/await code; |
| 20930 |
remove :class:`asyncio.coroutines.CoroWrapper` used for wrapping legacy |
| 20931 |
coroutine objects in the debug mode. The decorator has been deprecated |
| 20932 |
since Python 3.8 and the removal was initially scheduled for Python 3.10. |
| 20933 |
Patch by Illia Volochii. |
| 20934 |
|
| 20935 |
- bpo-44210: Make importlib.metadata._meta.PackageMetadata public. |
| 20936 |
|
| 20937 |
- bpo-43643: Declare readers.MultiplexedPath.name as a property per the |
| 20938 |
spec. |
| 20939 |
|
| 20940 |
- bpo-27334: The :mod:`sqlite3` context manager now performs a rollback |
| 20941 |
(thus releasing the database lock) if commit failed. Patch by Luca Citi |
| 20942 |
and Erlend E. Aasland. |
| 20943 |
|
| 20944 |
- bpo-4928: Documented existing behavior on POSIX: NamedTemporaryFiles are |
| 20945 |
not deleted when creating process is killed with SIGKILL |
| 20946 |
|
| 20947 |
- bpo-44154: Optimize :class:`fractions.Fraction` pickling for large |
| 20948 |
components. |
| 20949 |
|
| 20950 |
- bpo-33433: For IPv4 mapped IPv6 addresses (:rfc:`4291` Section 2.5.5.2), |
| 20951 |
the :mod:`ipaddress.IPv6Address.is_private` check is deferred to the |
| 20952 |
mapped IPv4 address. This solves a bug where public mapped IPv4 addresses |
| 20953 |
were considered private by the IPv6 check. |
| 20954 |
|
| 20955 |
- bpo-44150: Add optional *weights* argument to statistics.fmean(). |
| 20956 |
|
| 20957 |
- bpo-44142: :func:`ast.unparse` will now drop the redundant parentheses |
| 20958 |
when tuples used as assignment targets (e.g in for loops). |
| 20959 |
|
| 20960 |
- bpo-44145: :mod:`hmac` computations were not releasing the GIL while |
| 20961 |
calling the OpenSSL ``HMAC_Update`` C API (a new feature in 3.9). This |
| 20962 |
unintentionally prevented parallel computation as other :mod:`hashlib` |
| 20963 |
algorithms support. |
| 20964 |
|
| 20965 |
- bpo-44095: :class:`zipfile.Path` now supports :attr:`zipfile.Path.stem`, |
| 20966 |
:attr:`zipfile.Path.suffixes`, and :attr:`zipfile.Path.suffix` attributes. |
| 20967 |
|
| 20968 |
- bpo-44077: It's now possible to receive the type of service (ToS), a.k.a. |
| 20969 |
differentiated services (DS), a.k.a. differentiated services code point |
| 20970 |
(DSCP) and explicit congestion notification (ECN) IP header fields with |
| 20971 |
``socket.IP_RECVTOS``. |
| 20972 |
|
| 20973 |
- bpo-37788: Fix a reference leak when a Thread object is never joined. |
| 20974 |
|
| 20975 |
- bpo-38908: Subclasses of ``typing.Protocol`` which only have data |
| 20976 |
variables declared will now raise a ``TypeError`` when checked with |
| 20977 |
``isinstance`` unless they are decorated with :func:`runtime_checkable`. |
| 20978 |
Previously, these checks passed silently. Patch provided by Yurii Karabas. |
| 20979 |
|
| 20980 |
- bpo-44098: ``typing.ParamSpec`` will no longer be found in the |
| 20981 |
``__parameters__`` of most :mod:`typing` generics except in valid use |
| 20982 |
locations specified by :pep:`612`. This prevents incorrect usage like |
| 20983 |
``typing.List[P][int]``. This change means incorrect usage which may have |
| 20984 |
passed silently in 3.10 beta 1 and earlier will now error. |
| 20985 |
|
| 20986 |
- bpo-44089: Allow subclassing ``csv.Error`` in 3.10 (it was allowed in 3.9 |
| 20987 |
and earlier but was disallowed in early versions of 3.10). |
| 20988 |
|
| 20989 |
- bpo-44081: :func:`ast.unparse` now doesn't use redundant spaces to |
| 20990 |
separate ``lambda`` and the ``:`` if there are no parameters. |
| 20991 |
|
| 20992 |
- bpo-44061: Fix regression in previous release when calling |
| 20993 |
:func:`pkgutil.iter_modules` with a list of :class:`pathlib.Path` objects |
| 20994 |
|
| 20995 |
- bpo-44059: Register the SerenityOS Browser in the :mod:`webbrowser` |
| 20996 |
module. |
| 20997 |
|
| 20998 |
- bpo-36515: The :mod:`hashlib` module no longer does unaligned memory |
| 20999 |
accesses when compiled for ARM platforms. |
| 21000 |
|
| 21001 |
- bpo-40465: Remove random module features deprecated in Python 3.9. |
| 21002 |
|
| 21003 |
- bpo-44018: random.seed() no longer mutates bytearray inputs. |
| 21004 |
|
| 21005 |
- bpo-38352: Add ``IO``, ``BinaryIO``, ``TextIO``, ``Match``, and |
| 21006 |
``Pattern`` to ``typing.__all__``. Patch by Jelle Zijlstra. |
| 21007 |
|
| 21008 |
- bpo-44002: :mod:`urllib.parse` now uses :func:`functool.lru_cache` for its |
| 21009 |
internal URL splitting and quoting caches instead of rolling its own like |
| 21010 |
its the '90s. |
| 21011 |
|
| 21012 |
The undocumented internal :mod:`urllib.parse` ``Quoted`` class API is now |
| 21013 |
deprecated, for removal in 3.14. |
| 21014 |
|
| 21015 |
- bpo-43972: When :class:`http.server.SimpleHTTPRequestHandler` sends a |
| 21016 |
``301 (Moved Permanently)`` for a directory path not ending with ``/``, |
| 21017 |
add a ``Content-Length: 0`` header. This improves the behavior for certain |
| 21018 |
clients. |
| 21019 |
|
| 21020 |
- bpo-28528: Fix a bug in :mod:`pdb` where :meth:`~pdb.Pdb.checkline` raises |
| 21021 |
:exc:`AttributeError` if it is called after :meth:`~pdb.Pdb.reset`. |
| 21022 |
|
| 21023 |
- bpo-43853: Improved string handling for :mod:`sqlite3` user-defined |
| 21024 |
functions and aggregates: |
| 21025 |
|
| 21026 |
* It is now possible to pass strings with embedded null characters to UDFs |
| 21027 |
* Conversion failures now correctly raise :exc:`MemoryError` |
| 21028 |
|
| 21029 |
Patch by Erlend E. Aasland. |
| 21030 |
|
| 21031 |
- bpo-43666: AIX: ``Lib/_aix_support.get_platform()`` may fail in an AIX |
| 21032 |
WPAR. The fileset bos.rte appears to have a builddate in both LPAR and |
| 21033 |
WPAR so this fileset is queried rather than bos.mp64. To prevent a similar |
| 21034 |
situation (no builddate in ODM) a value (9988) sufficient for completing a |
| 21035 |
build is provided. Patch by M Felt. |
| 21036 |
|
| 21037 |
- bpo-43650: Fix :exc:`MemoryError` in :func:`shutil.unpack_archive` which |
| 21038 |
fails inside :func:`shutil._unpack_zipfile` on large files. Patch by Igor |
| 21039 |
Bolshakov. |
| 21040 |
|
| 21041 |
- bpo-43612: :func:`zlib.compress` now accepts a wbits parameter which |
| 21042 |
allows users to compress data as a raw deflate block without zlib headers |
| 21043 |
and trailers in one go. Previously this required instantiating a |
| 21044 |
``zlib.compressobj``. It also provides a faster alternative to |
| 21045 |
``gzip.compress`` when wbits=31 is used. |
| 21046 |
|
| 21047 |
- bpo-43392: :func:`importlib._bootstrap._find_and_load` now implements a |
| 21048 |
two-step check to avoid locking when modules have been already imported |
| 21049 |
and are ready. This improves performance of repeated calls to |
| 21050 |
:func:`importlib.import_module` and :func:`importlib.__import__`. |
| 21051 |
|
| 21052 |
- bpo-43318: Fix a bug where :mod:`pdb` does not always echo cleared |
| 21053 |
breakpoints. |
| 21054 |
|
| 21055 |
- bpo-43234: Prohibit passing |
| 21056 |
non-:class:`concurrent.futures.ThreadPoolExecutor` executors to |
| 21057 |
:meth:`loop.set_default_executor` following a deprecation in Python 3.8. |
| 21058 |
Patch by Illia Volochii. |
| 21059 |
|
| 21060 |
- bpo-43232: Prohibit previously deprecated potentially disruptive |
| 21061 |
operations on :class:`asyncio.trsock.TransportSocket`. Patch by Illia |
| 21062 |
Volochii. |
| 21063 |
|
| 21064 |
- bpo-30077: Added support for Apple's aifc/sowt pseudo-compression |
| 21065 |
|
| 21066 |
- bpo-42971: Add definition of ``errno.EQFULL`` for platforms that define |
| 21067 |
this constant (such as macOS). |
| 21068 |
|
| 21069 |
- bpo-43086: Added a new optional :code:`strict_mode` parameter to |
| 21070 |
*binascii.a2b_base64*. When :code:`scrict_mode` is set to :code:`True`, |
| 21071 |
the *a2b_base64* function will accept only valid base64 content. More |
| 21072 |
details about what "valid base64 content" is, can be found in the |
| 21073 |
function's documentation. |
| 21074 |
|
| 21075 |
- bpo-43024: Improve the help signature of |
| 21076 |
:func:`traceback.print_exception`, :func:`traceback.format_exception` and |
| 21077 |
:func:`traceback.format_exception_only`. |
| 21078 |
|
| 21079 |
- bpo-33809: Add the :meth:`traceback.TracebackException.print` method which |
| 21080 |
prints the formatted exception information. |
| 21081 |
|
| 21082 |
- bpo-42862: :mod:`sqlite3` now utilizes :meth:`functools.lru_cache` to |
| 21083 |
implement the connection statement cache. As a small optimisation, the |
| 21084 |
default statement cache size has been increased from 100 to 128. Patch by |
| 21085 |
Erlend E. Aasland. |
| 21086 |
|
| 21087 |
- bpo-41818: Soumendra Ganguly: add termios.tcgetwinsize(), |
| 21088 |
termios.tcsetwinsize(). |
| 21089 |
|
| 21090 |
- bpo-40497: :meth:`subprocess.check_output` now raises :exc:`ValueError` |
| 21091 |
when the invalid keyword argument *check* is passed by user code. |
| 21092 |
Previously such use would fail later with a :exc:`TypeError`. Patch by |
| 21093 |
Rémi Lapeyre. |
| 21094 |
|
| 21095 |
- bpo-37449: ``ensurepip`` now uses ``importlib.resources.files()`` |
| 21096 |
traversable APIs |
| 21097 |
|
| 21098 |
- bpo-40956: Use Argument Clinic in :mod:`sqlite3`. Patches by Erlend E. |
| 21099 |
Aasland. |
| 21100 |
|
| 21101 |
- bpo-41730: ``DeprecationWarning`` is now raised when importing |
| 21102 |
:mod:`tkinter.tix`, which has been deprecated in documentation since |
| 21103 |
Python 3.6. |
| 21104 |
|
| 21105 |
- bpo-20684: Remove unused ``_signature_get_bound_param`` function from |
| 21106 |
:mod:`inspect` - by Anthony Sottile. |
| 21107 |
|
| 21108 |
- bpo-41402: Fix :meth:`email.message.EmailMessage.set_content` when called |
| 21109 |
with binary data and ``7bit`` content transfer encoding. |
| 21110 |
|
| 21111 |
- bpo-32695: The *compresslevel* and *preset* keyword arguments of |
| 21112 |
:func:`tarfile.open` are now both documented and tested. |
| 21113 |
|
| 21114 |
- bpo-41137: Use utf-8 encoding while reading .pdbrc files. Patch by |
| 21115 |
Srinivas Reddy Thatiparthy |
| 21116 |
|
| 21117 |
- bpo-24391: Improved reprs of :mod:`threading` synchronization objects: |
| 21118 |
:class:`~threading.Semaphore`, :class:`~threading.BoundedSemaphore`, |
| 21119 |
:class:`~threading.Event` and :class:`~threading.Barrier`. |
| 21120 |
|
| 21121 |
- bpo-5846: Deprecated the following :mod:`unittest` functions, scheduled |
| 21122 |
for removal in Python 3.13: |
| 21123 |
|
| 21124 |
* :func:`!findTestCases` |
| 21125 |
* :func:`!makeSuite` |
| 21126 |
* :func:`!getTestCaseNames` |
| 21127 |
|
| 21128 |
Use :class:`~unittest.TestLoader` methods instead: |
| 21129 |
|
| 21130 |
* :meth:`unittest.TestLoader.loadTestsFromModule` |
| 21131 |
* :meth:`unittest.TestLoader.loadTestsFromTestCase` |
| 21132 |
* :meth:`unittest.TestLoader.getTestCaseNames` |
| 21133 |
|
| 21134 |
Patch by Erlend E. Aasland. |
| 21135 |
|
| 21136 |
- bpo-40563: Support pathlike objects on dbm/shelve. Patch by Hakan Çelik |
| 21137 |
and Henry-Joseph Audéoud. |
| 21138 |
|
| 21139 |
- bpo-34990: Fixed a Y2k38 bug in the compileall module where it would fail |
| 21140 |
to compile files with a modification time after the year 2038. |
| 21141 |
|
| 21142 |
- bpo-39549: Whereas the code for reprlib.Repr had previously used a |
| 21143 |
hardcoded string value of '...', this PR updates it to use of a |
| 21144 |
“fillvalue” attribute, whose value defaults to '...' and can be reset in |
| 21145 |
either individual reprlib.Repr instances or in subclasses thereof. |
| 21146 |
|
| 21147 |
- bpo-37022: :mod:`pdb` now displays exceptions from ``repr()`` with its |
| 21148 |
``p`` and ``pp`` commands. |
| 21149 |
|
| 21150 |
- bpo-38840: Fix ``test___all__`` on platforms lacking a shared memory |
| 21151 |
implementation. |
| 21152 |
|
| 21153 |
- bpo-39359: Add one missing check that the password is a bytes object for |
| 21154 |
an encrypted zipfile. |
| 21155 |
|
| 21156 |
- bpo-38741: :mod:`configparser`: using ']' inside a section header will no |
| 21157 |
longer cut the section name short at the ']' |
| 21158 |
|
| 21159 |
- bpo-38415: Added missing behavior to |
| 21160 |
:func:`contextlib.asynccontextmanager` to match |
| 21161 |
:func:`contextlib.contextmanager` so decorated functions can themselves be |
| 21162 |
decorators. |
| 21163 |
|
| 21164 |
- bpo-30256: Pass multiprocessing BaseProxy argument ``manager_owned`` |
| 21165 |
through AutoProxy. |
| 21166 |
|
| 21167 |
- bpo-27513: :func:`email.utils.getaddresses` now accepts |
| 21168 |
:class:`email.header.Header` objects along with string values. Patch by |
| 21169 |
Zackery Spytz. |
| 21170 |
|
| 21171 |
- bpo-16379: Add SQLite error code and name to :mod:`sqlite3` exceptions. |
| 21172 |
Patch by Aviv Palivoda, Daniel Shahaf, and Erlend E. Aasland. |
| 21173 |
|
| 21174 |
- bpo-26228: pty.spawn no longer hangs on FreeBSD, macOS, and Solaris. |
| 21175 |
|
| 21176 |
- bpo-33349: lib2to3 now recognizes async generators everywhere. |
| 21177 |
|
| 21178 |
- bpo-29298: Fix ``TypeError`` when required subparsers without ``dest`` do |
| 21179 |
not receive arguments. Patch by Anthony Sottile. |
| 21180 |
|
| 21181 |
Documentation |
| 21182 |
------------- |
| 21183 |
|
| 21184 |
- bpo-45216: Remove extra documentation listing methods in ``difflib``. It |
| 21185 |
was rendering twice in pydoc and was outdated in some places. |
| 21186 |
|
| 21187 |
- bpo-45024: :mod:`collections.abc` documentation has been expanded to |
| 21188 |
explicitly cover how instance and subclass checks work, with additional |
| 21189 |
doctest examples and an exhaustive list of ABCs which test membership |
| 21190 |
purely by presence of the right :term:`special method`\s. Patch by Raymond |
| 21191 |
Hettinger. |
| 21192 |
|
| 21193 |
- bpo-44957: Promote PEP 604 union syntax by using it where possible. Also, |
| 21194 |
mention ``X | Y`` more prominently in section about ``Union`` and mention |
| 21195 |
``X | None`` at all in section about ``Optional``. |
| 21196 |
|
| 21197 |
- bpo-16580: Added code equivalents for the :meth:`int.to_bytes` and |
| 21198 |
:meth:`int.from_bytes` methods, as well as tests ensuring that these code |
| 21199 |
equivalents are valid. |
| 21200 |
|
| 21201 |
- bpo-44903: Removed the ``othergui.rst`` file, any references to it, and |
| 21202 |
the list of GUI frameworks in the FAQ. In their place I've added links to |
| 21203 |
the Python Wiki `page on GUI frameworks |
| 21204 |
<https://wiki.python.org/moin/GuiProgramming>`_. |
| 21205 |
|
| 21206 |
- bpo-33479: Tkinter documentation has been greatly expanded with new |
| 21207 |
"Architecture" and "Threading model" sections. |
| 21208 |
|
| 21209 |
- bpo-36700: :mod:`base64` RFC references were updated to point to |
| 21210 |
:rfc:`4648`; a section was added to point users to the new "security |
| 21211 |
considerations" section of the RFC. |
| 21212 |
|
| 21213 |
- bpo-44740: Replaced occurrences of uppercase "Web" and "Internet" with |
| 21214 |
lowercase versions per the 2016 revised Associated Press Style Book. |
| 21215 |
|
| 21216 |
- bpo-44693: Update the definition of __future__ in the glossary by |
| 21217 |
replacing the confusing word "pseudo-module" with a more accurate |
| 21218 |
description. |
| 21219 |
|
| 21220 |
- bpo-35183: Add typical examples to os.path.splitext docs |
| 21221 |
|
| 21222 |
- bpo-30511: Clarify that :func:`shutil.make_archive` is not thread-safe due |
| 21223 |
to reliance on changing the current working directory. |
| 21224 |
|
| 21225 |
- bpo-44561: Update of three expired hyperlinks in |
| 21226 |
Doc/distributing/index.rst: "Project structure", "Building and packaging |
| 21227 |
the project", and "Uploading the project to the Python Packaging Index". |
| 21228 |
|
| 21229 |
- bpo-44651: Delete entry "coercion" in Doc/glossary.rst for its outdated |
| 21230 |
definition. |
| 21231 |
|
| 21232 |
- bpo-42958: Updated the docstring and docs of :func:`filecmp.cmp` to be |
| 21233 |
more accurate and less confusing especially in respect to *shallow* arg. |
| 21234 |
|
| 21235 |
- bpo-44631: Refactored the ``repr()`` code of the ``_Environ`` (os module). |
| 21236 |
|
| 21237 |
- bpo-44613: importlib.metadata is no longer provisional. |
| 21238 |
|
| 21239 |
- bpo-44558: Match the docstring and python implementation of |
| 21240 |
:func:`~operator.countOf` to the behavior of its c implementation. |
| 21241 |
|
| 21242 |
- bpo-44544: List all kwargs for :func:`textwrap.wrap`, |
| 21243 |
:func:`textwrap.fill`, and :func:`textwrap.shorten`. Now, there are nav |
| 21244 |
links to attributes of :class:`TextWrap`, which makes navigation much |
| 21245 |
easier while minimizing duplication in the documentation. |
| 21246 |
|
| 21247 |
- bpo-38062: Clarify that atexit uses equality comparisons internally. |
| 21248 |
|
| 21249 |
- bpo-40620: Convert examples in tutorial controlflow.rst section 4.3 to be |
| 21250 |
interpreter-demo style. |
| 21251 |
|
| 21252 |
- bpo-43066: Added a warning to :mod:`zipfile` docs: filename arg with a |
| 21253 |
leading slash may cause archive to be un-openable on Windows systems. |
| 21254 |
|
| 21255 |
- bpo-39452: Rewrote ``Doc/library/__main__.rst``. Broadened scope of the |
| 21256 |
document to explicitly discuss and differentiate between ``__main__.py`` |
| 21257 |
in packages versus the ``__name__ == '__main__'`` expression (and the |
| 21258 |
idioms that surround it). |
| 21259 |
|
| 21260 |
- bpo-13814: In the Design FAQ, answer "Why don't generators support the |
| 21261 |
with statement?" |
| 21262 |
|
| 21263 |
- bpo-27752: Documentation of csv.Dialect is more descriptive. |
| 21264 |
|
| 21265 |
- bpo-44453: Fix documentation for the return type of |
| 21266 |
:func:`sysconfig.get_path`. |
| 21267 |
|
| 21268 |
- bpo-44392: Added a new section in the C API documentation for types used |
| 21269 |
in type hinting. Documented ``Py_GenericAlias`` and |
| 21270 |
``Py_GenericAliasType``. |
| 21271 |
|
| 21272 |
- bpo-38291: Mark ``typing.io`` and ``typing.re`` as deprecated since Python |
| 21273 |
3.8 in the documentation. They were never properly supported by type |
| 21274 |
checkers. |
| 21275 |
|
| 21276 |
- bpo-44322: Document that SyntaxError args have a details tuple and that |
| 21277 |
details are adjusted for errors in f-string field replacement expressions. |
| 21278 |
|
| 21279 |
- bpo-42392: Document the deprecation and removal of the ``loop`` parameter |
| 21280 |
for many functions and classes in :mod:`asyncio`. |
| 21281 |
|
| 21282 |
- bpo-44195: Corrected references to ``TraversableResources`` in docs. There |
| 21283 |
is no ``TraversableReader``. |
| 21284 |
|
| 21285 |
- bpo-41963: Document that ``ConfigParser`` strips off comments when reading |
| 21286 |
configuration files. |
| 21287 |
|
| 21288 |
- bpo-44072: Correct where in the numeric ABC hierarchy ``**`` support is |
| 21289 |
added, i.e., in numbers.Complex, not numbers.Integral. |
| 21290 |
|
| 21291 |
- bpo-43558: Add the remark to :mod:`dataclasses` documentation that the |
| 21292 |
:meth:`__init__` of any base class has to be called in |
| 21293 |
:meth:`__post_init__`, along with a code example. |
| 21294 |
|
| 21295 |
- bpo-44025: Clarify when '_' in match statements is a keyword, and when |
| 21296 |
not. |
| 21297 |
|
| 21298 |
- bpo-41706: Fix docs about how methods like ``__add__`` are invoked when |
| 21299 |
evaluating operator expressions. |
| 21300 |
|
| 21301 |
- bpo-41621: Document that :class:`collections.defaultdict` parameter |
| 21302 |
``default_factory`` defaults to ``None`` and is positional-only. |
| 21303 |
|
| 21304 |
- bpo-41576: document BaseException in favor of bare except |
| 21305 |
|
| 21306 |
- bpo-21760: The description for __file__ fixed. Patch by Furkan Onder |
| 21307 |
|
| 21308 |
- bpo-39498: Add a "Security Considerations" index which links to standard |
| 21309 |
library modules that have explicitly documented security considerations. |
| 21310 |
|
| 21311 |
- bpo-33479: Remove the unqualified claim that tkinter is threadsafe. It has |
| 21312 |
not been true for several years and likely never was. An explanation of |
| 21313 |
what is true may be added later, after more discussion, and possibly after |
| 21314 |
patching _tkinter.c, |
| 21315 |
|
| 21316 |
Tests |
| 21317 |
----- |
| 21318 |
|
| 21319 |
- bpo-40173: Fix :func:`test.support.import_helper.import_fresh_module`. |
| 21320 |
|
| 21321 |
- bpo-45280: Add a test case for empty :class:`typing.NamedTuple`. |
| 21322 |
|
| 21323 |
- bpo-45269: Cover case when invalid ``markers`` type is supplied to |
| 21324 |
``c_make_encoder``. |
| 21325 |
|
| 21326 |
- bpo-45128: Fix ``test_multiprocessing_fork`` failure due to |
| 21327 |
``test_logging`` and ``sys.modules`` manipulation. |
| 21328 |
|
| 21329 |
- bpo-45209: Fix ``UserWarning: resource_tracker`` warning in |
| 21330 |
``_test_multiprocessing._TestSharedMemory.test_shared_memory_cleaned_after_process_termination`` |
| 21331 |
|
| 21332 |
- bpo-45185: Enables ``TestEnumerations`` test cases in ``test_ssl`` suite. |
| 21333 |
|
| 21334 |
- bpo-45195: Fix test_readline.test_nonascii(): sometimes, the newline |
| 21335 |
character is not written at the end, so don't expect it in the output. |
| 21336 |
Patch by Victor Stinner. |
| 21337 |
|
| 21338 |
- bpo-45156: Fixes infinite loop on :func:`unittest.mock.seal` of mocks |
| 21339 |
created by :func:`~unittest.create_autospec`. |
| 21340 |
|
| 21341 |
- bpo-45125: Improves pickling tests and docs of ``SharedMemory`` and |
| 21342 |
``SharableList`` objects. |
| 21343 |
|
| 21344 |
- bpo-44860: Update ``test_sysconfig.test_user_similar()`` for the |
| 21345 |
posix_user scheme: ``platlib`` doesn't use :data:`sys.platlibdir`. Patch |
| 21346 |
by Victor Stinner. |
| 21347 |
|
| 21348 |
- bpo-45052: ``WithProcessesTestSharedMemory.test_shared_memory_basics`` |
| 21349 |
test was ignored, because ``self.assertEqual(sms.size, sms2.size)`` line |
| 21350 |
was failing. It is now removed and test is unskipped. |
| 21351 |
|
| 21352 |
The main motivation for this line to be removed from the test is that the |
| 21353 |
``size`` of ``SharedMemory`` is not ever guaranteed to be the same. It is |
| 21354 |
decided by the platform. |
| 21355 |
|
| 21356 |
- bpo-44895: libregrtest now clears the type cache later to reduce the risk |
| 21357 |
of false alarm when checking for reference leaks. Previously, the type |
| 21358 |
cache was cleared too early and libregrtest raised a false alarm about |
| 21359 |
reference leaks under very specific conditions. Patch by Irit Katriel and |
| 21360 |
Victor Stinner. |
| 21361 |
|
| 21362 |
- bpo-45042: Fixes that test classes decorated with |
| 21363 |
``@hashlib_helper.requires_hashdigest`` were skipped all the time. |
| 21364 |
|
| 21365 |
- bpo-25130: Add calls of :func:`gc.collect` in tests to support PyPy. |
| 21366 |
|
| 21367 |
- bpo-45011: Made tests relying on the :mod:`!_asyncio` C extension module |
| 21368 |
optional to allow running on alternative Python implementations. Patch by |
| 21369 |
Serhiy Storchaka. |
| 21370 |
|
| 21371 |
- bpo-44949: Fix auto history tests of test_readline: sometimes, the newline |
| 21372 |
character is not written at the end, so don't expect it in the output. |
| 21373 |
|
| 21374 |
- bpo-44891: Tests were added to clarify :func:`id` is preserved when ``obj |
| 21375 |
* 1`` is used on :class:`str` and :class:`bytes` objects. Patch by Nikita |
| 21376 |
Sobolev. |
| 21377 |
|
| 21378 |
- bpo-44852: Add ability to wholesale silence DeprecationWarnings while |
| 21379 |
running the regression test suite. |
| 21380 |
|
| 21381 |
- bpo-40928: Notify users running test_decimal regression tests on macOS of |
| 21382 |
potential harmless "malloc can't allocate region" messages spewed by |
| 21383 |
test_decimal. |
| 21384 |
|
| 21385 |
- bpo-44734: Fixed floating-point precision issue in turtle tests. |
| 21386 |
|
| 21387 |
- bpo-44708: Regression tests, when run with -w, are now re-running only the |
| 21388 |
affected test methods instead of re-running the entire test file. |
| 21389 |
|
| 21390 |
- bpo-42095: Added interop tests for Apple plists: generate plist files with |
| 21391 |
Python plistlib and parse with Apple plutil; and the other way round. |
| 21392 |
|
| 21393 |
- bpo-44647: Added a permanent Unicode-valued environment variable to |
| 21394 |
regression tests to ensure they handle this use case in the future. If |
| 21395 |
your test environment breaks because of that, report a bug to us, and |
| 21396 |
temporarily set PYTHONREGRTEST_UNICODE_GUARD=0 in your test environment. |
| 21397 |
|
| 21398 |
- bpo-44515: Adjust recently added contextlib tests to avoid assuming the |
| 21399 |
use of a refcounted GC |
| 21400 |
|
| 21401 |
- bpo-44287: Fix asyncio test_popen() of test_windows_utils by using a |
| 21402 |
longer timeout. Use military grade battle-tested |
| 21403 |
:data:`test.support.SHORT_TIMEOUT` timeout rather than a hardcoded timeout |
| 21404 |
of 10 seconds: it's 30 seconds by default, but it is made longer on slow |
| 21405 |
buildbots. Patch by Victor Stinner. |
| 21406 |
|
| 21407 |
- bpo-44451: Reset ``DeprecationWarning`` filters in |
| 21408 |
``test.test_importlib.test_metadata_api.APITests.test_entry_points_by_index`` |
| 21409 |
to avoid ``StopIteration`` error if ``DeprecationWarnings`` are ignored. |
| 21410 |
|
| 21411 |
- bpo-44363: Account for address sanitizer in test_capi. test_capi now |
| 21412 |
passes when run GCC address sanitizer. |
| 21413 |
|
| 21414 |
- bpo-44364: Add non integral tests for :func:`math.sqrt` function. |
| 21415 |
|
| 21416 |
- bpo-43921: Fix test_ssl.test_wrong_cert_tls13(): use |
| 21417 |
``suppress_ragged_eofs=False``, since ``read()`` can raise |
| 21418 |
:exc:`ssl.SSLEOFError` on Windows. Patch by Victor Stinner. |
| 21419 |
|
| 21420 |
- bpo-43921: Fix test_pha_required_nocert() of test_ssl: catch two more EOF |
| 21421 |
cases (when the ``recv()`` method returns an empty string). Patch by |
| 21422 |
Victor Stinner. |
| 21423 |
|
| 21424 |
- bpo-44131: Add test_frozenmain to test_embed to test the |
| 21425 |
:c:func:`Py_FrozenMain` C function. Patch by Victor Stinner. |
| 21426 |
|
| 21427 |
- bpo-31904: Ignore error string case in test_file_not_exists(). |
| 21428 |
|
| 21429 |
- bpo-42083: Add test to check that ``PyStructSequence_NewType`` accepts a |
| 21430 |
``PyStructSequence_Desc`` with ``doc`` field set to ``NULL``. |
| 21431 |
|
| 21432 |
- bpo-35753: Fix crash in doctest when doctest parses modules that include |
| 21433 |
unwrappable functions by skipping those functions. |
| 21434 |
|
| 21435 |
- bpo-30256: Add test for nested queues when using ``multiprocessing`` |
| 21436 |
shared objects ``AutoProxy[Queue]`` inside ``ListProxy`` and ``DictProxy`` |
| 21437 |
|
| 21438 |
Build |
| 21439 |
----- |
| 21440 |
|
| 21441 |
- bpo-45220: Avoid building with the Windows 11 SDK previews automatically. |
| 21442 |
This may be overridden by setting the ``DefaultWindowsSDKVersion`` |
| 21443 |
environment variable before building. |
| 21444 |
|
| 21445 |
- bpo-45020: Freeze stdlib modules that are imported during startup. This |
| 21446 |
provides significant performance improvements to startup. If necessary, |
| 21447 |
use the previously added "-X frozen_modules=off" commandline option to |
| 21448 |
force importing the source modules. |
| 21449 |
|
| 21450 |
- bpo-45188: Windows builds now regenerate frozen modules as the first part |
| 21451 |
of the build. Previously the regeneration was later in the build, which |
| 21452 |
would require it to be restarted if any modules had changed. |
| 21453 |
|
| 21454 |
- bpo-45163: Fixes Haiku platform build. |
| 21455 |
|
| 21456 |
- bpo-45067: The ncurses function extended_color_content was introduced in |
| 21457 |
2017 |
| 21458 |
|
| 21459 |
(https://invisible-island.net/ncurses/NEWS.html#index-t20170401). The |
| 21460 |
|
| 21461 |
ncurses-devel package in CentOS 7 had a older version ncurses resulted in |
| 21462 |
compilation error. For compiling ncurses with extended color support, we |
| 21463 |
verify the version of the ncurses library >= 20170401. |
| 21464 |
|
| 21465 |
- bpo-45019: Generate lines in relevant files for frozen modules. Up until |
| 21466 |
now each of the files had to be edited manually. This change makes it |
| 21467 |
easier to add to and modify the frozen modules. |
| 21468 |
|
| 21469 |
- bpo-44340: Add support for building with clang thin lto via |
| 21470 |
--with-lto=thin/full. Patch by Donghee Na and Brett Holman. |
| 21471 |
|
| 21472 |
- bpo-44535: Enable building using a Visual Studio 2022 install on Windows. |
| 21473 |
|
| 21474 |
- bpo-43298: Improved error message when building without a Windows SDK |
| 21475 |
installed. |
| 21476 |
|
| 21477 |
- bpo-44381: The Windows build now accepts :envvar:`EnableControlFlowGuard` |
| 21478 |
set to ``guard`` to enable CFG. |
| 21479 |
|
| 21480 |
- bpo-41282: Fix broken ``make install`` that caused standard library |
| 21481 |
extension modules to be unnecessarily and incorrectly rebuilt during the |
| 21482 |
install phase of cpython. |
| 21483 |
|
| 21484 |
Windows |
| 21485 |
------- |
| 21486 |
|
| 21487 |
- bpo-45375: Fixes an assertion failure due to searching for the standard |
| 21488 |
library in unnormalised paths. |
| 21489 |
|
| 21490 |
- bpo-45022: Update Windows release to include libffi 3.4.2 |
| 21491 |
|
| 21492 |
- bpo-45007: Update to OpenSSL 1.1.1l in Windows build |
| 21493 |
|
| 21494 |
- bpo-44848: Upgrade Windows installer to use SQLite 3.36.0. |
| 21495 |
|
| 21496 |
- bpo-44572: Avoid consuming standard input in the :mod:`platform` module |
| 21497 |
|
| 21498 |
- bpo-44582: Accelerate speed of :mod:`mimetypes` initialization using a |
| 21499 |
native implementation of the registry scan. |
| 21500 |
|
| 21501 |
- bpo-41299: Fix 16 milliseconds jitter when using timeouts in |
| 21502 |
:mod:`threading`, such as with :meth:`threading.Lock.acquire` or |
| 21503 |
:meth:`threading.Condition.wait`. |
| 21504 |
|
| 21505 |
- bpo-42686: Build :mod:`sqlite3` with math functions enabled. Patch by |
| 21506 |
Erlend E. Aasland. |
| 21507 |
|
| 21508 |
- bpo-40263: This is a follow-on bug from |
| 21509 |
https://bugs.python.org/issue26903. Once that is applied we run into an |
| 21510 |
off-by-one assertion problem. The assert was not correct. |
| 21511 |
|
| 21512 |
macOS |
| 21513 |
----- |
| 21514 |
|
| 21515 |
- bpo-45007: Update macOS installer builds to use OpenSSL 1.1.1l. |
| 21516 |
|
| 21517 |
- bpo-34602: When building CPython on macOS with ``./configure |
| 21518 |
--with-undefined-behavior-sanitizer --with-pydebug``, the stack size is |
| 21519 |
now quadrupled to allow for the entire test suite to pass. |
| 21520 |
|
| 21521 |
- bpo-44848: Update macOS installer to use SQLite 3.36.0. |
| 21522 |
|
| 21523 |
- bpo-44689: :meth:`ctypes.util.find_library` now works correctly on macOS |
| 21524 |
11 Big Sur even if Python is built on an older version of macOS. |
| 21525 |
Previously, when built on older macOS systems, ``find_library`` was not |
| 21526 |
able to find macOS system libraries when running on Big Sur due to |
| 21527 |
changes in how system libraries are stored. |
| 21528 |
|
| 21529 |
- bpo-41972: The framework build's user header path in sysconfig is changed |
| 21530 |
to add a 'pythonX.Y' component to match distutils's behavior. |
| 21531 |
|
| 21532 |
- bpo-43109: Allow --with-lto configure option to work with Apple-supplied |
| 21533 |
Xcode or Command Line Tools. |
| 21534 |
|
| 21535 |
- bpo-34932: Add socket.TCP_KEEPALIVE support for macOS. Patch by Shane |
| 21536 |
Harvey. |
| 21537 |
|
| 21538 |
IDLE |
| 21539 |
---- |
| 21540 |
|
| 21541 |
- bpo-45296: On Windows, change exit/quit message to suggest Ctrl-D, which |
| 21542 |
works, instead of <Ctrl-Z Return>, which does not work in IDLE. |
| 21543 |
|
| 21544 |
- bpo-45193: Make completion boxes appear on Ubuntu again. |
| 21545 |
|
| 21546 |
- bpo-40128: Mostly fix completions on macOS when not using tcl/tk 8.6.11 |
| 21547 |
(as with 3.9). The added update_idletask call should be harmless and |
| 21548 |
possibly helpful otherwise. |
| 21549 |
|
| 21550 |
- bpo-33962: Move the indent space setting from the Font tab to the new |
| 21551 |
Windows tab. Patch by Mark Roseman and Terry Jan Reedy. |
| 21552 |
|
| 21553 |
- bpo-40468: Split the settings dialog General tab into Windows and Shell/ED |
| 21554 |
tabs. Move help sources, which extend the Help menu, to the Extensions |
| 21555 |
tab. Make space for new options and shorten the dialog. The latter makes |
| 21556 |
the dialog better fit small screens. |
| 21557 |
|
| 21558 |
- bpo-41611: Avoid uncaught exceptions in |
| 21559 |
``AutoCompleteWindow.winconfig_event()``. |
| 21560 |
|
| 21561 |
- bpo-41611: Fix IDLE sometimes freezing upon tab-completion on macOS. |
| 21562 |
|
| 21563 |
- bpo-44010: Highlight the new :ref:`match <match>` statement's :ref:`soft |
| 21564 |
keywords <soft-keywords>`: :keyword:`match`, :keyword:`case <match>`, and |
| 21565 |
:keyword:`_ <wildcard-patterns>`. However, this highlighting is not |
| 21566 |
perfect and will be incorrect in some rare cases, including some ``_``-s |
| 21567 |
in ``case`` patterns. |
| 21568 |
|
| 21569 |
- bpo-44026: Include interpreter's typo fix suggestions in message line for |
| 21570 |
NameErrors and AttributeErrors. Patch by E. Paine. |
| 21571 |
|
| 21572 |
Tools/Demos |
| 21573 |
----------- |
| 21574 |
|
| 21575 |
- bpo-44786: Fix a warning in regular expression in the c-analyzer script. |
| 21576 |
|
| 21577 |
- bpo-44967: pydoc now returns a non-zero status code when a module cannot |
| 21578 |
be found. |
| 21579 |
|
| 21580 |
- bpo-44978: Allow the Argument Clinic tool to handle ``__complex__`` |
| 21581 |
special methods. |
| 21582 |
|
| 21583 |
- bpo-43425: Removed the 'test2to3' demo project that demonstrated using |
| 21584 |
lib2to3 to support Python 2.x and Python 3.x from a single source in a |
| 21585 |
distutils package. Patch by Donghee Na |
| 21586 |
|
| 21587 |
- bpo-44074: Make patchcheck automatically detect the correct base branch |
| 21588 |
name (previously it was hardcoded to 'master') |
| 21589 |
|
| 21590 |
- bpo-20291: Added support for variadic positional parameters in Argument |
| 21591 |
Clinic. |
| 21592 |
|
| 21593 |
C API |
| 21594 |
----- |
| 21595 |
|
| 21596 |
- bpo-41710: The PyThread_acquire_lock_timed() function now clamps the |
| 21597 |
timeout if it is too large, rather than aborting the process. Patch by |
| 21598 |
Victor Stinner. |
| 21599 |
|
| 21600 |
- bpo-44687: :meth:`BufferedReader.peek` no longer raises :exc:`ValueError` |
| 21601 |
when the entire file has already been buffered. |
| 21602 |
|
| 21603 |
- bpo-45116: Add the :c:macro:`Py_ALWAYS_INLINE` macro to ask the compiler |
| 21604 |
to always inline a static inline function. The compiler can ignore it and |
| 21605 |
decides to not inline the function. Patch by Victor Stinner. |
| 21606 |
|
| 21607 |
- bpo-45094: Add the :c:macro:`Py_NO_INLINE` macro to disable inlining on a |
| 21608 |
function. Patch by Victor Stinner. |
| 21609 |
|
| 21610 |
- bpo-45061: Add a deallocator to the :class:`bool` type to detect refcount |
| 21611 |
bugs in C extensions which call ``Py_DECREF(Py_True);`` or |
| 21612 |
``Py_DECREF(Py_False);`` by mistake. Patch by Victor Stinner. |
| 21613 |
|
| 21614 |
- bpo-42035: Add a new :c:func:`PyType_GetQualName` function to get type's |
| 21615 |
qualified name. |
| 21616 |
|
| 21617 |
- bpo-41103: Reverts removal of the old buffer protocol because they are |
| 21618 |
part of stable ABI. |
| 21619 |
|
| 21620 |
- bpo-44751: Remove ``crypt.h`` include from the public ``Python.h`` header. |
| 21621 |
|
| 21622 |
- bpo-42747: The ``Py_TPFLAGS_HAVE_VERSION_TAG`` type flag now does nothing. |
| 21623 |
The ``Py_TPFLAGS_HAVE_AM_SEND`` flag (which was added in 3.10) is removed. |
| 21624 |
Both were unnecessary because it is not possible to have type objects with |
| 21625 |
the relevant fields missing. |
| 21626 |
|
| 21627 |
- bpo-44530: Added the ``co_qualname`` to the ``PyCodeObject`` structure to |
| 21628 |
propagate the qualified name from the compiler to code objects. |
| 21629 |
|
| 21630 |
Patch by Gabriele N. Tornetta |
| 21631 |
|
| 21632 |
- bpo-44441: :c:func:`Py_RunMain` now resets :c:data:`PyImport_Inittab` to |
| 21633 |
its initial value at exit. It must be possible to call |
| 21634 |
:c:func:`PyImport_AppendInittab` or :c:func:`PyImport_ExtendInittab` at |
| 21635 |
each Python initialization. Patch by Victor Stinner. |
| 21636 |
|
| 21637 |
- bpo-39947: Remove 4 private trashcan C API functions which were only kept |
| 21638 |
for the backward compatibility of the stable ABI with Python 3.8 and |
| 21639 |
older, since the trashcan API was not usable with the limited C API on |
| 21640 |
Python 3.8 and older. The trashcan API was excluded from the limited C API |
| 21641 |
in Python 3.9. |
| 21642 |
|
| 21643 |
Removed functions: |
| 21644 |
|
| 21645 |
* _PyTrash_deposit_object() |
| 21646 |
* _PyTrash_destroy_chain() |
| 21647 |
* _PyTrash_thread_deposit_object() |
| 21648 |
* _PyTrash_thread_destroy_chain() |
| 21649 |
|
| 21650 |
The trashcan C API was never usable with the limited C API, since old |
| 21651 |
trashcan macros accessed directly :c:type:`PyThreadState` members like |
| 21652 |
``_tstate->trash_delete_nesting``, whereas the :c:type:`PyThreadState` |
| 21653 |
structure is opaque in the limited C API. |
| 21654 |
|
| 21655 |
Exclude also the ``PyTrash_UNWIND_LEVEL`` constant from the C API. |
| 21656 |
|
| 21657 |
Patch by Victor Stinner. |
| 21658 |
|
| 21659 |
- bpo-40939: Removed documentation for the removed ``PyParser_*`` C API. |
| 21660 |
|
| 21661 |
- bpo-43795: The list in :ref:`limited-api-list` now shows the public name |
| 21662 |
:c:struct:`PyFrameObject` rather than ``_frame``. The non-existing entry |
| 21663 |
``_node`` no longer appears in the list. |
| 21664 |
|
| 21665 |
- bpo-44378: :c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid |
| 21666 |
a compiler warning: no longer cast ``const PyObject*`` to ``PyObject*``. |
| 21667 |
Patch by Victor Stinner. |
| 21668 |
|
| 21669 |
- bpo-39573: Convert the :c:func:`Py_TYPE` and :c:func:`Py_SIZE` macros to |
| 21670 |
static inline functions. The :c:func:`Py_SET_TYPE` and |
| 21671 |
:c:func:`Py_SET_SIZE` functions must now be used to set an object type and |
| 21672 |
size. Patch by Victor Stinner. |
| 21673 |
|
| 21674 |
- bpo-44263: The :c:func:`PyType_Ready` function now raises an error if a |
| 21675 |
type is defined with the :c:macro:`Py_TPFLAGS_HAVE_GC` flag set but has no |
| 21676 |
traverse function (:c:member:`PyTypeObject.tp_traverse`). Patch by Victor |
| 21677 |
Stinner. |
| 21678 |
|
| 21679 |
- bpo-43795: The undocumented function :c:func:`Py_FrozenMain` is removed |
| 21680 |
from the Limited API. |
| 21681 |
|
| 21682 |
- bpo-44113: Deprecate the following functions to configure the Python |
| 21683 |
initialization: |
| 21684 |
|
| 21685 |
* :c:func:`!PySys_AddWarnOptionUnicode` |
| 21686 |
* :c:func:`!PySys_AddWarnOption` |
| 21687 |
* :c:func:`!PySys_AddXOption` |
| 21688 |
* :c:func:`!PySys_HasWarnOptions` |
| 21689 |
* :c:func:`!Py_SetPath` |
| 21690 |
* :c:func:`!Py_SetProgramName` |
| 21691 |
* :c:func:`!Py_SetPythonHome` |
| 21692 |
* :c:func:`!Py_SetStandardStreamEncoding` |
| 21693 |
* :c:func:`!_Py_SetProgramFullPath` |
| 21694 |
|
| 21695 |
Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization |
| 21696 |
Configuration <init-config>` instead (:pep:`587`). |
| 21697 |
|
| 21698 |
- bpo-44094: Remove ``PyErr_SetFromErrnoWithUnicodeFilename()``, |
| 21699 |
``PyErr_SetFromWindowsErrWithUnicodeFilename()``, and |
| 21700 |
``PyErr_SetExcFromWindowsErrWithUnicodeFilename()``. They are not |
| 21701 |
documented and have been deprecated since Python 3.3. |
| 21702 |
|
| 21703 |
- bpo-43795: :c:func:`PyCodec_Unregister` is now properly exported as a |
| 21704 |
function in the Windows Stable ABI DLL. |
| 21705 |
|
| 21706 |
- bpo-44029: Remove deprecated ``Py_UNICODE`` APIs: ``PyUnicode_Encode``, |
| 21707 |
``PyUnicode_EncodeUTF7``, ``PyUnicode_EncodeUTF8``, |
| 21708 |
``PyUnicode_EncodeUTF16``, ``PyUnicode_EncodeUTF32``, |
| 21709 |
``PyUnicode_EncodeLatin1``, ``PyUnicode_EncodeMBCS``, |
| 21710 |
``PyUnicode_EncodeDecimal``, ``PyUnicode_EncodeRawUnicodeEscape``, |
| 21711 |
``PyUnicode_EncodeCharmap``, ``PyUnicode_EncodeUnicodeEscape``, |
| 21712 |
``PyUnicode_TransformDecimalToASCII``, ``PyUnicode_TranslateCharmap``, |
| 21713 |
``PyUnicodeEncodeError_Create``, ``PyUnicodeTranslateError_Create``. See |
| 21714 |
:pep:`393` and :pep:`624` for reference. |
| 21715 |
|
| 21716 |
- bpo-42035: Add a new :c:func:`PyType_GetName` function to get type's short |
| 21717 |
name. |
| 21718 |
|
| 21719 |
|
| 21720 |
What's New in Python 3.10.0 beta 1? |
| 21721 |
=================================== |
| 21722 |
|
| 21723 |
*Release date: 2021-05-03* |
| 21724 |
|
| 21725 |
Security |
| 21726 |
-------- |
| 21727 |
|
| 21728 |
- bpo-43434: Creating :class:`sqlite3.Connection` objects now also produces |
| 21729 |
``sqlite3.connect`` and ``sqlite3.connect/handle`` :ref:`auditing events |
| 21730 |
<auditing>`. Previously these events were only produced by |
| 21731 |
:func:`sqlite3.connect` calls. Patch by Erlend E. Aasland. |
| 21732 |
|
| 21733 |
- bpo-43998: The :mod:`ssl` module sets more secure cipher suites defaults. |
| 21734 |
Ciphers without forward secrecy and with SHA-1 MAC are disabled by |
| 21735 |
default. Security level 2 prohibits weak RSA, DH, and ECC keys with less |
| 21736 |
than 112 bits of security. :class:`~ssl.SSLContext` defaults to minimum |
| 21737 |
protocol version TLS 1.2. Settings are based on Hynek Schlawack's |
| 21738 |
research. |
| 21739 |
|
| 21740 |
- bpo-43882: The presence of newline or tab characters in parts of a URL |
| 21741 |
could allow some forms of attacks. |
| 21742 |
|
| 21743 |
Following the controlling specification for URLs defined by WHATWG |
| 21744 |
:func:`urllib.parse` now removes ASCII newlines and tabs from URLs, |
| 21745 |
preventing such attacks. |
| 21746 |
|
| 21747 |
- bpo-43472: Ensures interpreter-level audit hooks receive the |
| 21748 |
``cpython.PyInterpreterState_New`` event when called through the |
| 21749 |
``_xxsubinterpreters`` module. |
| 21750 |
|
| 21751 |
- bpo-43362: Fix invalid free in _sha3 module. The issue was introduced in |
| 21752 |
3.10.0a1. Python 3.9 and earlier are not affected. |
| 21753 |
|
| 21754 |
- bpo-43762: Add audit events for :func:`sqlite3.connect/handle`, |
| 21755 |
:meth:`sqlite3.Connection.enable_load_extension`, and |
| 21756 |
:meth:`sqlite3.Connection.load_extension`. Patch by Erlend E. Aasland. |
| 21757 |
|
| 21758 |
- bpo-43756: Add new audit event ``glob.glob/2`` to incorporate the new |
| 21759 |
*root_dir* and *dir_fd* arguments added to :func:`glob.glob` and |
| 21760 |
:func:`glob.iglob`. |
| 21761 |
|
| 21762 |
- bpo-36384: :mod:`ipaddress` module no longer accepts any leading zeros in |
| 21763 |
IPv4 address strings. Leading zeros are ambiguous and interpreted as octal |
| 21764 |
notation by some libraries. For example the legacy function |
| 21765 |
:func:`socket.inet_aton` treats leading zeros as octal notation. glibc |
| 21766 |
implementation of modern :func:`~socket.inet_pton` does not accept any |
| 21767 |
leading zeros. For a while the :mod:`ipaddress` module used to accept |
| 21768 |
ambiguous leading zeros. |
| 21769 |
|
| 21770 |
- bpo-43075: Fix Regular Expression Denial of Service (ReDoS) vulnerability |
| 21771 |
in :class:`urllib.request.AbstractBasicAuthHandler`. The ReDoS-vulnerable |
| 21772 |
regex has quadratic worst-case complexity and it allows cause a denial of |
| 21773 |
service when identifying crafted invalid RFCs. This ReDoS issue is on the |
| 21774 |
client side and needs remote attackers to control the HTTP server. |
| 21775 |
|
| 21776 |
- bpo-42800: Audit hooks are now fired for frame.f_code, traceback.tb_frame, |
| 21777 |
and generator code/frame attribute access. |
| 21778 |
|
| 21779 |
- bpo-37363: Add audit events to the :mod:`http.client` module. |
| 21780 |
|
| 21781 |
Core and Builtins |
| 21782 |
----------------- |
| 21783 |
|
| 21784 |
- bpo-43977: Prevent classes being both a sequence and a mapping when |
| 21785 |
pattern matching. |
| 21786 |
|
| 21787 |
- bpo-43977: Use :c:member:`~PyTypeObject.tp_flags` on the class object to |
| 21788 |
determine if the subject is a sequence or mapping when pattern matching. |
| 21789 |
Avoids the need to import :mod:`collections.abc` when pattern matching. |
| 21790 |
|
| 21791 |
- bpo-43892: Restore proper validation of complex literal value patterns |
| 21792 |
when parsing :keyword:`!match` blocks. |
| 21793 |
|
| 21794 |
- bpo-43933: Set frame.f_lineno to the line number of the 'with' kweyword |
| 21795 |
when executing the call to ``__exit__``. |
| 21796 |
|
| 21797 |
- bpo-43933: If the current position in a frame has no line number then set |
| 21798 |
the f_lineno attribute to None, instead of -1, to conform to PEP 626. This |
| 21799 |
should not normally be possible, but might occur in some unusual |
| 21800 |
circumstances. |
| 21801 |
|
| 21802 |
- bpo-43963: Importing the :mod:`!_signal` module in a subinterpreter has no |
| 21803 |
longer side effects. |
| 21804 |
|
| 21805 |
- bpo-42739: The internal representation of line number tables is changed to |
| 21806 |
not use sentinels, and an explicit length parameter is added to the out of |
| 21807 |
process API function ``PyLineTable_InitAddressRange``. This makes the |
| 21808 |
handling of line number tables more robust in some circumstances. |
| 21809 |
|
| 21810 |
Library |
| 21811 |
------- |
| 21812 |
|
| 21813 |
- bpo-43908: Make :mod:`re` types immutable. Patch by Erlend E. Aasland. |
| 21814 |
|
| 21815 |
- bpo-43908: Make the :class:`array.array` type immutable. Patch by Erlend |
| 21816 |
E. Aasland. |
| 21817 |
|
| 21818 |
Core and Builtins |
| 21819 |
----------------- |
| 21820 |
|
| 21821 |
- bpo-43901: Change class and module objects to lazy-create empty |
| 21822 |
annotations dicts on demand. The annotations dicts are stored in the |
| 21823 |
object's __dict__ for backwards compatibility. |
| 21824 |
|
| 21825 |
- bpo-43892: Match patterns now use new dedicated AST nodes (``MatchValue``, |
| 21826 |
``MatchSingleton``, ``MatchSequence``, ``MatchStar``, ``MatchMapping``, |
| 21827 |
``MatchClass``) rather than reusing expression AST nodes. ``MatchAs`` and |
| 21828 |
``MatchOr`` are now defined as pattern nodes rather than as expression |
| 21829 |
nodes. Patch by Nick Coghlan. |
| 21830 |
|
| 21831 |
- bpo-42725: Usage of ``await``/``yield``/``yield from`` and named |
| 21832 |
expressions within an annotation is now forbidden when PEP 563 is |
| 21833 |
activated. |
| 21834 |
|
| 21835 |
- bpo-43754: When performing structural pattern matching (:pep:`634`), |
| 21836 |
captured names are now left unbound until the *entire* pattern has matched |
| 21837 |
successfully. |
| 21838 |
|
| 21839 |
- bpo-42737: Annotations for complex targets (everything beside simple |
| 21840 |
names) no longer cause any runtime effects with ``from __future__ import |
| 21841 |
annotations``. |
| 21842 |
|
| 21843 |
- bpo-43914: :exc:`SyntaxError` exceptions raised by the interpreter will |
| 21844 |
highlight the full error range of the expression that constitutes the |
| 21845 |
syntax error itself, instead of just where the problem is detected. Patch |
| 21846 |
by Pablo Galindo. |
| 21847 |
|
| 21848 |
- bpo-38605: Revert making ``from __future__ import annotations`` the |
| 21849 |
default. This follows the Steering Council decision to postpone PEP 563 |
| 21850 |
changes to at least Python 3.11. See the original email for more |
| 21851 |
information regarding the decision: |
| 21852 |
https://mail.python.org/archives/list/[email protected]/thread/CLVXXPQ2T2LQ5MP2Y53VVQFCXYWQJHKZ/. |
| 21853 |
Patch by Pablo Galindo. |
| 21854 |
|
| 21855 |
- bpo-43475: Hashes of NaN values now depend on object identity. Formerly, |
| 21856 |
they always hashed to 0 even though NaN values are not equal to one |
| 21857 |
another. Having the same hash for unequal values caused pile-ups in hash |
| 21858 |
tables. |
| 21859 |
|
| 21860 |
- bpo-43859: Improve the error message for :exc:`IndentationError` |
| 21861 |
exceptions. Patch by Pablo Galindo |
| 21862 |
|
| 21863 |
- bpo-41323: Constant tuple folding in bytecode optimizer now reuses tuple |
| 21864 |
in constant table. |
| 21865 |
|
| 21866 |
- bpo-43846: Data stack usage is much reduced for large literal and call |
| 21867 |
expressions. |
| 21868 |
|
| 21869 |
- bpo-38530: When printing :exc:`NameError` raised by the interpreter, |
| 21870 |
:c:func:`PyErr_Display` will offer suggestions of similar variable names |
| 21871 |
in the function that the exception was raised from. Patch by Pablo Galindo |
| 21872 |
|
| 21873 |
- bpo-43823: Improve syntax errors for invalid dictionary literals. Patch by |
| 21874 |
Pablo Galindo. |
| 21875 |
|
| 21876 |
- bpo-43822: Improve syntax errors in the parser for missing commas between |
| 21877 |
expressions. Patch by Pablo Galindo. |
| 21878 |
|
| 21879 |
- bpo-43798: :class:`ast.alias` nodes now include source location metadata |
| 21880 |
attributes e.g. lineno, col_offset. |
| 21881 |
|
| 21882 |
- bpo-43797: Improve ``SyntaxError`` error messages for invalid comparisons. |
| 21883 |
Patch by Pablo Galindo. |
| 21884 |
|
| 21885 |
- bpo-43760: Move the flag for checking whether tracing is enabled to the C |
| 21886 |
stack, from the heap. Should speed up dispatch in the interpreter. |
| 21887 |
|
| 21888 |
- bpo-43682: Static methods (:deco:`staticmethod`) and class methods |
| 21889 |
(:deco:`classmethod`) now inherit the method attributes (``__module__``, |
| 21890 |
``__name__``, ``__qualname__``, ``__doc__``, ``__annotations__``) and have |
| 21891 |
a new ``__wrapped__`` attribute. Patch by Victor Stinner. |
| 21892 |
|
| 21893 |
- bpo-43751: Fixed a bug where ``anext(ait, default)`` would erroneously |
| 21894 |
return None. |
| 21895 |
|
| 21896 |
- bpo-42128: :data:`~object.__match_args__` is no longer allowed to be a |
| 21897 |
list. |
| 21898 |
|
| 21899 |
- bpo-43683: Add GEN_START opcode. Marks start of generator, including |
| 21900 |
async, or coroutine and handles sending values to a newly created |
| 21901 |
generator or coroutine. |
| 21902 |
|
| 21903 |
Library |
| 21904 |
------- |
| 21905 |
|
| 21906 |
- bpo-43105: Importlib now resolves relative paths when creating module spec |
| 21907 |
objects from file locations. |
| 21908 |
|
| 21909 |
Core and Builtins |
| 21910 |
----------------- |
| 21911 |
|
| 21912 |
- bpo-43682: Static methods (:deco:`staticmethod`) are now callable as |
| 21913 |
regular functions. Patch by Victor Stinner. |
| 21914 |
|
| 21915 |
- bpo-42609: Prevented crashes in the AST validator and optimizer when |
| 21916 |
compiling some absurdly long expressions like ``"+0"*1000000``. |
| 21917 |
:exc:`RecursionError` is now raised instead. |
| 21918 |
|
| 21919 |
- bpo-38530: When printing :exc:`AttributeError`, :c:func:`PyErr_Display` |
| 21920 |
will offer suggestions of similar attribute names in the object that the |
| 21921 |
exception was raised from. Patch by Pablo Galindo |
| 21922 |
|
| 21923 |
Library |
| 21924 |
------- |
| 21925 |
|
| 21926 |
- bpo-44015: In @dataclass(), raise a TypeError if KW_ONLY is specified more |
| 21927 |
than once. |
| 21928 |
|
| 21929 |
- bpo-25478: Added a *total()* method to collections.Counter() to compute |
| 21930 |
the sum of the counts. |
| 21931 |
|
| 21932 |
- bpo-43733: Change :class:`netrc.netrc` to use UTF-8 encoding before using |
| 21933 |
locale encoding. |
| 21934 |
|
| 21935 |
- bpo-43979: Removed an unnecessary list comprehension before looping from |
| 21936 |
:func:`urllib.parse.parse_qsl`. Patch by Christoph Zwerschke and Donghee |
| 21937 |
Na. |
| 21938 |
|
| 21939 |
- bpo-43993: Update bundled pip to 21.1.1. |
| 21940 |
|
| 21941 |
- bpo-43957: [Enum] Deprecate ``TypeError`` when non-member is used in a |
| 21942 |
containment check; In 3.12 ``True`` or ``False`` will be returned instead, |
| 21943 |
and containment will return ``True`` if the value is either a member of |
| 21944 |
that enum or one of its members' value. |
| 21945 |
|
| 21946 |
- bpo-42904: For backwards compatibility with previous minor versions of |
| 21947 |
Python, if :func:`typing.get_type_hints` receives no namespace dictionary |
| 21948 |
arguments, :func:`typing.get_type_hints` will search through the global |
| 21949 |
then local namespaces during evaluation of stringized type annotations |
| 21950 |
(string forward references) inside a class. |
| 21951 |
|
| 21952 |
- bpo-43945: [Enum] Deprecate non-standard mixin format() behavior: in 3.12 |
| 21953 |
the enum member, not the member's value, will be used for format() calls. |
| 21954 |
|
| 21955 |
- bpo-41139: Deprecate undocumented ``cgi.log()`` API. |
| 21956 |
|
| 21957 |
- bpo-43937: Fixed the :mod:`turtle` module working with non-default root |
| 21958 |
window. |
| 21959 |
|
| 21960 |
- bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0 |
| 21961 |
|
| 21962 |
- bpo-43907: Fix a bug in the pure-Python pickle implementation when using |
| 21963 |
protocol 5, where bytearray instances that occur several time in the |
| 21964 |
pickled object graph would incorrectly unpickle into repeated copies of |
| 21965 |
the bytearray object. |
| 21966 |
|
| 21967 |
- bpo-43926: In ``importlib.metadata``, provide a uniform interface to |
| 21968 |
``Description``, allow for any field to be encoded with multiline values, |
| 21969 |
remove continuation lines from multiline values, and add a ``.json`` |
| 21970 |
property for easy access to the PEP 566 JSON-compatible form. Sync with |
| 21971 |
``importlib_metadata 4.0``. |
| 21972 |
|
| 21973 |
- bpo-43920: OpenSSL 3.0.0: :meth:`~ssl.SSLContext.load_verify_locations` |
| 21974 |
now returns a consistent error message when cadata contains no valid |
| 21975 |
certificate. |
| 21976 |
|
| 21977 |
- bpo-43607: :mod:`urllib` can now convert Windows paths with ``\\?\`` |
| 21978 |
prefixes into URL paths. |
| 21979 |
|
| 21980 |
- bpo-43817: Add :func:`inspect.get_annotations`, which safely computes the |
| 21981 |
annotations defined on an object. It works around the quirks of accessing |
| 21982 |
the annotations from various types of objects, and makes very few |
| 21983 |
assumptions about the object passed in. :func:`inspect.get_annotations` |
| 21984 |
can also correctly un-stringize stringized annotations. |
| 21985 |
|
| 21986 |
:func:`inspect.signature`, :func:`inspect.from_callable`, and |
| 21987 |
:func:`inspect.from_function` now call :func:`inspect.get_annotations` to |
| 21988 |
retrieve annotations. This means :func:`inspect.signature` and |
| 21989 |
:func:`inspect.from_callable` can now un-stringize stringized annotations, |
| 21990 |
too. |
| 21991 |
|
| 21992 |
- bpo-43284: platform.win32_ver derives the windows version from |
| 21993 |
sys.getwindowsversion().platform_version which in turn derives the version |
| 21994 |
from kernel32.dll (which can be of a different version than Windows |
| 21995 |
itself). Therefore change the platform.win32_ver to determine the version |
| 21996 |
using the platform module's _syscmd_ver private function to return an |
| 21997 |
accurate version. |
| 21998 |
|
| 21999 |
- bpo-42854: The :mod:`ssl` module now uses ``SSL_read_ex`` and |
| 22000 |
``SSL_write_ex`` internally. The functions support reading and writing of |
| 22001 |
data larger than 2 GB. Writing zero-length data no longer fails with a |
| 22002 |
protocol violation error. |
| 22003 |
|
| 22004 |
- bpo-42333: Port ``_ssl`` extension module to multiphase initialization. |
| 22005 |
|
| 22006 |
- bpo-43880: :mod:`ssl` now raises DeprecationWarning for OP_NO_SSL/TLS* |
| 22007 |
options, old TLS versions, old protocols, and other features that have |
| 22008 |
been deprecated since Python 3.6, 3.7, or OpenSSL 1.1.0. |
| 22009 |
|
| 22010 |
- bpo-41559: :pep:`612` is now implemented purely in Python; builtin |
| 22011 |
``types.GenericAlias`` objects no longer include ``typing.ParamSpec`` in |
| 22012 |
``__parameters__`` (with the exception of ``collections.abc.Callable``\ 's |
| 22013 |
``GenericAlias``). This means previously invalid uses of ``ParamSpec`` |
| 22014 |
(such as ``list[P]``) which worked in earlier versions of Python 3.10 |
| 22015 |
alpha, will now raise ``TypeError`` during substitution. |
| 22016 |
|
| 22017 |
- bpo-43867: The :mod:`multiprocessing` ``Server`` class now explicitly |
| 22018 |
catches :exc:`SystemExit` and closes the client connection in this case. |
| 22019 |
It happens when the ``Server.serve_client()`` method reaches the end of |
| 22020 |
file (EOF). |
| 22021 |
|
| 22022 |
- bpo-40443: Remove unused imports: pyclbr no longer uses copy, and typing |
| 22023 |
no longer uses ast. Patch by Victor Stinner. |
| 22024 |
|
| 22025 |
- bpo-43820: Remove an unneeded copy of the namespace passed to |
| 22026 |
dataclasses.make_dataclass(). |
| 22027 |
|
| 22028 |
- bpo-43787: Add ``__iter__()`` method to :class:`bz2.BZ2File`, |
| 22029 |
:class:`gzip.GzipFile`, and :class:`lzma.LZMAFile`. It makes iterating |
| 22030 |
them about 2x faster. Patch by Inada Naoki. |
| 22031 |
|
| 22032 |
- bpo-43680: Deprecate io.OpenWrapper and _pyio.OpenWrapper: use io.open and |
| 22033 |
_pyio.open instead. Until Python 3.9, _pyio.open was not a static method |
| 22034 |
and builtins.open was set to OpenWrapper to not become a bound method when |
| 22035 |
set to a class variable. _io.open is a built-in function whereas |
| 22036 |
_pyio.open is a Python function. In Python 3.10, _pyio.open() is now a |
| 22037 |
static method, and builtins.open() is now io.open(). |
| 22038 |
|
| 22039 |
- bpo-43680: The Python :func:`!_pyio.open` function becomes a static method |
| 22040 |
to behave as :func:`io.open` built-in function: don't become a bound |
| 22041 |
method when stored as a class variable. It becomes possible since static |
| 22042 |
methods are now callable in Python 3.10. Moreover, |
| 22043 |
:func:`!_pyio.OpenWrapper` becomes a simple alias to :func:`!_pyio.open`. |
| 22044 |
Patch by Victor Stinner. |
| 22045 |
|
| 22046 |
- bpo-41515: Fix :exc:`KeyError` raised in :func:`typing.get_type_hints` due |
| 22047 |
to synthetic modules that don't appear in ``sys.modules``. |
| 22048 |
|
| 22049 |
- bpo-43776: When :class:`subprocess.Popen` args are provided as a string or |
| 22050 |
as :class:`pathlib.Path`, the Popen instance repr now shows the right |
| 22051 |
thing. |
| 22052 |
|
| 22053 |
- bpo-42248: [Enum] ensure exceptions raised in ``_missing__`` are released |
| 22054 |
|
| 22055 |
- bpo-43744: fix issue with enum member name matching the start of a private |
| 22056 |
variable name |
| 22057 |
|
| 22058 |
- bpo-43772: Fixed the return value of ``TypeVar.__ror__``. Patch by Jelle |
| 22059 |
Zijlstra. |
| 22060 |
|
| 22061 |
- bpo-43764: Add match_args parameter to @dataclass decorator to allow |
| 22062 |
suppression of __match_args__ generation. |
| 22063 |
|
| 22064 |
- bpo-43799: OpenSSL 3.0.0: define ``OPENSSL_API_COMPAT`` 1.1.1 to suppress |
| 22065 |
deprecation warnings. Python requires OpenSSL 1.1.1 APIs. |
| 22066 |
|
| 22067 |
- bpo-43478: Mocks can no longer be used as the specs for other Mocks. As a |
| 22068 |
result, an already-mocked object cannot have an attribute mocked using |
| 22069 |
``autospec=True`` or be the subject of a ``create_autospec(...)`` call. |
| 22070 |
This can uncover bugs in tests since these Mock-derived Mocks will always |
| 22071 |
pass certain tests (e.g. :func:`isinstance`) and builtin assert functions |
| 22072 |
(e.g. assert_called_once_with) will unconditionally pass. |
| 22073 |
|
| 22074 |
- bpo-43794: Add :const:`ssl.OP_IGNORE_UNEXPECTED_EOF` constants (OpenSSL |
| 22075 |
3.0.0) |
| 22076 |
|
| 22077 |
- bpo-43785: Improve ``bz2.BZ2File`` performance by removing the RLock from |
| 22078 |
BZ2File. This makes BZ2File thread unsafe in the face of multiple |
| 22079 |
simultaneous readers or writers, just like its equivalent classes in |
| 22080 |
:mod:`gzip` and :mod:`lzma` have always been. Patch by Inada Naoki. |
| 22081 |
|
| 22082 |
- bpo-43789: OpenSSL 3.0.0: Don't call the password callback function a |
| 22083 |
second time when first call has signaled an error condition. |
| 22084 |
|
| 22085 |
- bpo-43788: The header files for :mod:`ssl` error codes are now OpenSSL |
| 22086 |
version-specific. Exceptions will now show correct reason and library |
| 22087 |
codes. The ``make_ssl_data.py`` script has been rewritten to use OpenSSL's |
| 22088 |
text file with error codes. |
| 22089 |
|
| 22090 |
- bpo-43766: Implement :pep:`647` in the :mod:`typing` module by adding |
| 22091 |
:data:`TypeGuard`. |
| 22092 |
|
| 22093 |
- bpo-25264: :func:`os.path.realpath` now accepts a *strict* keyword-only |
| 22094 |
argument. When set to ``True``, :exc:`OSError` is raised if a path doesn't |
| 22095 |
exist or a symlink loop is encountered. |
| 22096 |
|
| 22097 |
- bpo-43780: In ``importlib.metadata``, incorporate changes from |
| 22098 |
importlib_metadata 3.10: Add mtime-based caching during distribution |
| 22099 |
discovery. Flagged use of dict result from ``entry_points()`` as |
| 22100 |
deprecated. |
| 22101 |
|
| 22102 |
- gh-47383: The ``P.args`` and ``P.kwargs`` attributes of |
| 22103 |
:class:`typing.ParamSpec` are now instances of the new classes |
| 22104 |
:class:`typing.ParamSpecArgs` and :class:`typing.ParamSpecKwargs`, which |
| 22105 |
enables a more useful ``repr()``. Patch by Jelle Zijlstra. |
| 22106 |
|
| 22107 |
- bpo-43731: Add an ``encoding`` parameter :func:`logging.fileConfig`. |
| 22108 |
|
| 22109 |
- bpo-43712: Add ``encoding`` and ``errors`` parameters to |
| 22110 |
:func:`fileinput.input` and :class:`fileinput.FileInput`. |
| 22111 |
|
| 22112 |
- bpo-38659: A ``simple_enum`` decorator is added to the ``enum`` module to |
| 22113 |
convert a normal class into an Enum. ``test_simple_enum`` added to test |
| 22114 |
simple enums against a corresponding normal Enum. Standard library |
| 22115 |
modules updated to use ``simple_enum``. |
| 22116 |
|
| 22117 |
- bpo-43764: Fix an issue where :data:`~object.__match_args__` generation |
| 22118 |
could fail for some :mod:`dataclasses`. |
| 22119 |
|
| 22120 |
- bpo-43752: Fix :mod:`sqlite3` regression for zero-sized blobs with |
| 22121 |
converters, where ``b""`` was returned instead of ``None``. The regression |
| 22122 |
was introduced by PR 24723. Patch by Erlend E. Aasland. |
| 22123 |
|
| 22124 |
- bpo-43655: :mod:`tkinter` dialog windows are now recognized as dialogs by |
| 22125 |
window managers on macOS and X Window. |
| 22126 |
|
| 22127 |
- bpo-43723: The following ``threading`` methods are now deprecated and |
| 22128 |
should be replaced: |
| 22129 |
|
| 22130 |
- ``currentThread`` => :func:`threading.current_thread` |
| 22131 |
|
| 22132 |
- ``activeCount`` => :func:`threading.active_count` |
| 22133 |
|
| 22134 |
- ``Condition.notifyAll`` => :meth:`threading.Condition.notify_all` |
| 22135 |
|
| 22136 |
- ``Event.isSet`` => :meth:`threading.Event.is_set` |
| 22137 |
|
| 22138 |
- ``Thread.setName`` => :attr:`threading.Thread.name` |
| 22139 |
|
| 22140 |
- ``thread.getName`` => :attr:`threading.Thread.name` |
| 22141 |
|
| 22142 |
- ``Thread.isDaemon`` => :attr:`threading.Thread.daemon` |
| 22143 |
|
| 22144 |
- ``Thread.setDaemon`` => :attr:`threading.Thread.daemon` |
| 22145 |
|
| 22146 |
Patch by Jelle Zijlstra. |
| 22147 |
|
| 22148 |
- bpo-2135: Deprecate find_module() and find_loader() implementations in |
| 22149 |
importlib and zipimport. |
| 22150 |
|
| 22151 |
- bpo-43534: :func:`turtle.textinput` and :func:`turtle.numinput` create now |
| 22152 |
a transient window working on behalf of the canvas window. |
| 22153 |
|
| 22154 |
- bpo-43532: Add the ability to specify keyword-only fields to dataclasses. |
| 22155 |
These fields will become keyword-only arguments to the generated __init__. |
| 22156 |
|
| 22157 |
- bpo-43522: Fix problem with |
| 22158 |
:attr:`~ssl.SSLContext.hostname_checks_common_name`. OpenSSL does not copy |
| 22159 |
hostflags from *struct SSL_CTX* to *struct SSL*. |
| 22160 |
|
| 22161 |
- bpo-8978: Improve error message for :func:`tarfile.open` when :mod:`lzma` |
| 22162 |
/ :mod:`bz2` are unavailable. Patch by Anthony Sottile. |
| 22163 |
|
| 22164 |
- bpo-42967: Allow :class:`bytes` ``separator`` argument in |
| 22165 |
``urllib.parse.parse_qs`` and ``urllib.parse.parse_qsl`` when parsing |
| 22166 |
:class:`str` query strings. Previously, this raised a ``TypeError``. |
| 22167 |
|
| 22168 |
- bpo-43296: Improve :mod:`sqlite3` error handling: ``sqlite3_value_blob()`` |
| 22169 |
errors that set ``SQLITE_NOMEM`` now raise :exc:`MemoryError`. Patch by |
| 22170 |
Erlend E. Aasland. |
| 22171 |
|
| 22172 |
- bpo-43312: New functions :func:`sysconfig.get_preferred_scheme` and |
| 22173 |
:func:`sysconfig.get_default_scheme` are added to query a platform for its |
| 22174 |
preferred "user", "home", and "prefix" (default) scheme names. |
| 22175 |
|
| 22176 |
- bpo-43265: Improve :meth:`sqlite3.Connection.backup` error handling. The |
| 22177 |
error message for non-existent target database names is now ``unknown |
| 22178 |
database <database name>`` instead of ``SQL logic error``. Patch by Erlend |
| 22179 |
E. Aasland. |
| 22180 |
|
| 22181 |
- bpo-41282: Install schemes in ``distutils.command.install`` are now loaded |
| 22182 |
from :mod:`sysconfig`. |
| 22183 |
|
| 22184 |
- bpo-41282: ``distutils.sysconfig`` has been merged to :mod:`sysconfig`. |
| 22185 |
|
| 22186 |
- bpo-43176: Fixed processing of a dataclass that inherits from a frozen |
| 22187 |
dataclass with no fields. It is now correctly detected as an error. |
| 22188 |
|
| 22189 |
- bpo-43080: :mod:`pprint` now has support for |
| 22190 |
:class:`dataclasses.dataclass`. Patch by Lewis Gaul. |
| 22191 |
|
| 22192 |
- bpo-39950: Add ``pathlib.Path.hardlink_to()`` method that supersedes |
| 22193 |
``link_to()``. The new method has the same argument order as |
| 22194 |
``symlink_to()``. |
| 22195 |
|
| 22196 |
- bpo-42904: :func:`typing.get_type_hints` now checks the local namespace of |
| 22197 |
a class when evaluating :pep:`563` annotations inside said class. |
| 22198 |
|
| 22199 |
- bpo-42269: Add ``slots`` parameter to ``dataclasses.dataclass`` decorator |
| 22200 |
to automatically generate ``__slots__`` for class. Patch provided by Yurii |
| 22201 |
Karabas. |
| 22202 |
|
| 22203 |
- bpo-39529: Deprecated use of :func:`asyncio.get_event_loop` without |
| 22204 |
running event loop. Emit deprecation warning for :mod:`asyncio` functions |
| 22205 |
which implicitly create a :class:`~asyncio.Future` or |
| 22206 |
:class:`~asyncio.Task` objects if there is no running event loop and no |
| 22207 |
explicit *loop* argument is passed: :func:`~asyncio.ensure_future`, |
| 22208 |
:func:`~asyncio.wrap_future`, :func:`~asyncio.gather`, |
| 22209 |
:func:`~asyncio.shield`, :func:`~asyncio.as_completed` and constructors of |
| 22210 |
:class:`~asyncio.Future`, :class:`~asyncio.Task`, |
| 22211 |
:class:`~asyncio.StreamReader`, :class:`~asyncio.StreamReaderProtocol`. |
| 22212 |
|
| 22213 |
- bpo-18369: Certificate and PrivateKey classes were added to the ssl |
| 22214 |
module. Certificates and keys can now be loaded from memory buffer, too. |
| 22215 |
|
| 22216 |
- bpo-41486: Use a new output buffer management code for :mod:`bz2` / |
| 22217 |
:mod:`lzma` / :mod:`zlib` modules, and add ``.readall()`` function to |
| 22218 |
``_compression.DecompressReader`` class. These bring some performance |
| 22219 |
improvements. Patch by Ma Lin. |
| 22220 |
|
| 22221 |
- bpo-31870: The :func:`ssl.get_server_certificate` function now has a |
| 22222 |
*timeout* parameter. |
| 22223 |
|
| 22224 |
- bpo-41735: Fix thread locks in zlib module may go wrong in rare case. |
| 22225 |
Patch by Ma Lin. |
| 22226 |
|
| 22227 |
- bpo-36470: Fix dataclasses with ``InitVar``\s and |
| 22228 |
:func:`~dataclasses.replace`. Patch by Claudiu Popa. |
| 22229 |
|
| 22230 |
- bpo-40849: Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag |
| 22231 |
|
| 22232 |
- bpo-35114: :func:`ssl.RAND_status` now returns a boolean value (as |
| 22233 |
documented) instead of ``1`` or ``0``. |
| 22234 |
|
| 22235 |
- bpo-39906: :meth:`pathlib.Path.stat` and :meth:`~pathlib.Path.chmod` now |
| 22236 |
accept a *follow_symlinks* keyword-only argument for consistency with |
| 22237 |
corresponding functions in the :mod:`os` module. |
| 22238 |
|
| 22239 |
- bpo-39899: :func:`os.path.expanduser` now refuses to guess Windows home |
| 22240 |
directories if the basename of current user's home directory does not |
| 22241 |
match their username. |
| 22242 |
|
| 22243 |
:meth:`pathlib.Path.expanduser` and :meth:`~pathlib.Path.home` now |
| 22244 |
consistently raise :exc:`RuntimeError` exception when a home directory |
| 22245 |
cannot be resolved. Previously a :exc:`KeyError` exception could be raised |
| 22246 |
on Windows when the ``"USERNAME"`` environment variable was unset. |
| 22247 |
|
| 22248 |
- bpo-36076: Added SNI support to :func:`ssl.get_server_certificate`. |
| 22249 |
|
| 22250 |
- bpo-38490: Covariance, Pearson's correlation, and simple linear regression |
| 22251 |
functionality was added to statistics module. Patch by Tymoteusz Wołodźko. |
| 22252 |
|
| 22253 |
- bpo-33731: Provide a locale.localize() function, which converts a |
| 22254 |
normalized number string into a locale format. |
| 22255 |
|
| 22256 |
- bpo-32745: Fix a regression in the handling of ctypes' |
| 22257 |
:data:`ctypes.c_wchar_p` type: embedded null characters would cause a |
| 22258 |
:exc:`ValueError` to be raised. Patch by Zackery Spytz. |
| 22259 |
|
| 22260 |
Documentation |
| 22261 |
------------- |
| 22262 |
|
| 22263 |
- bpo-43987: Add "Annotations Best Practices" document as a new HOWTO. |
| 22264 |
|
| 22265 |
- bpo-43977: Document the new :c:macro:`Py_TPFLAGS_MAPPING` and |
| 22266 |
:c:macro:`Py_TPFLAGS_SEQUENCE` type flags. |
| 22267 |
|
| 22268 |
- bpo-43959: The documentation on the PyContextVar C-API was clarified. |
| 22269 |
|
| 22270 |
- bpo-43938: Update dataclasses documentation to express that |
| 22271 |
FrozenInstanceError is derived from AttributeError. |
| 22272 |
|
| 22273 |
- bpo-43778: Fix the Sphinx glossary_search extension: create the _static/ |
| 22274 |
sub-directory if it doesn't exist. |
| 22275 |
|
| 22276 |
- bpo-43755: Update documentation to reflect that unparenthesized lambda |
| 22277 |
expressions can no longer be the expression part in an ``if`` clause in |
| 22278 |
comprehensions and generator expressions since Python 3.9. |
| 22279 |
|
| 22280 |
- bpo-43739: Fixing the example code in Doc/extending/extending.rst to |
| 22281 |
declare and initialize the pmodule variable to be of the right type. |
| 22282 |
|
| 22283 |
Tests |
| 22284 |
----- |
| 22285 |
|
| 22286 |
- bpo-43961: Fix test_logging.test_namer_rotator_inheritance() on Windows: |
| 22287 |
use :func:`os.replace` rather than :func:`os.rename`. Patch by Victor |
| 22288 |
Stinner. |
| 22289 |
|
| 22290 |
- bpo-43842: Fix a race condition in the SMTP test of test_logging. Don't |
| 22291 |
close a file descriptor (socket) from a different thread while |
| 22292 |
asyncore.loop() is polling the file descriptor. Patch by Victor Stinner. |
| 22293 |
|
| 22294 |
- bpo-43843: :mod:`test.libregrtest` now marks a test as ENV_CHANGED |
| 22295 |
(altered the execution environment) if a thread raises an exception but |
| 22296 |
does not catch it. It sets a hook on :func:`threading.excepthook`. Use |
| 22297 |
``--fail-env-changed`` option to mark the test as failed. Patch by Victor |
| 22298 |
Stinner. |
| 22299 |
|
| 22300 |
- bpo-43811: Tests multiple OpenSSL versions on GitHub Actions. Use ccache |
| 22301 |
to speed up testing. |
| 22302 |
|
| 22303 |
- bpo-43791: OpenSSL 3.0.0: Disable testing of legacy protocols TLS 1.0 and |
| 22304 |
1.1. Tests are failing with TLSV1_ALERT_INTERNAL_ERROR. |
| 22305 |
|
| 22306 |
Build |
| 22307 |
----- |
| 22308 |
|
| 22309 |
- bpo-43567: Improved generated code refresh (AST/tokens/opcodes/keywords) |
| 22310 |
on Windows. |
| 22311 |
|
| 22312 |
- bpo-43669: Implement :pep:`644`. Python now requires OpenSSL 1.1.1 or |
| 22313 |
newer. |
| 22314 |
|
| 22315 |
Windows |
| 22316 |
------- |
| 22317 |
|
| 22318 |
- bpo-35306: Adds additional arguments to :func:`os.startfile` function. |
| 22319 |
|
| 22320 |
- bpo-43538: Avoid raising errors from :meth:`pathlib.Path.exists` when |
| 22321 |
passed an invalid filename. |
| 22322 |
|
| 22323 |
- bpo-38822: Fixed :func:`os.stat` failing on inaccessible directories with |
| 22324 |
a trailing slash, rather than falling back to the parent directory's |
| 22325 |
metadata. This implicitly affected :func:`os.path.exists` and |
| 22326 |
:func:`os.path.isdir`. |
| 22327 |
|
| 22328 |
- bpo-26227: Fixed decoding of host names in :func:`socket.gethostbyaddr` |
| 22329 |
and :func:`socket.gethostbyname_ex`. |
| 22330 |
|
| 22331 |
- bpo-40432: Updated pegen regeneration script on Windows to find and use |
| 22332 |
Python 3.8 or higher. Prior to this, pegen regeneration already required |
| 22333 |
3.8 or higher, but the script may have used lower versions of Python. |
| 22334 |
|
| 22335 |
- bpo-43745: Actually updates Windows release to OpenSSL 1.1.1k. Earlier |
| 22336 |
releases were mislabelled and actually included 1.1.1i again. |
| 22337 |
|
| 22338 |
- bpo-43652: Update Tcl and Tk to 8.6.11 in Windows installer. |
| 22339 |
|
| 22340 |
- bpo-43492: Upgrade Windows installer to use SQLite 3.35.5. |
| 22341 |
|
| 22342 |
- bpo-30555: Fix ``WindowsConsoleIO`` errors in the presence of fd |
| 22343 |
redirection. Patch by Segev Finer. |
| 22344 |
|
| 22345 |
macOS |
| 22346 |
----- |
| 22347 |
|
| 22348 |
- bpo-42119: Fix check for macOS SDK paths when building Python. Narrow |
| 22349 |
search to match contents of SDKs, namely only files in |
| 22350 |
``/System/Library``, ``/System/IOSSupport``, and ``/usr`` other than |
| 22351 |
``/usr/local``. Previously, anything under ``/System`` was assumed to be |
| 22352 |
in an SDK which causes problems with the new file system layout in 10.15+ |
| 22353 |
where user file systems may appear to be mounted under ``/System``. Paths |
| 22354 |
in ``/Library`` were also incorrectly treated as SDK locations. |
| 22355 |
|
| 22356 |
- bpo-43568: Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 |
| 22357 |
|
| 22358 |
- bpo-44009: Provide "python3.x-intel64" executable to allow reliably |
| 22359 |
forcing macOS universal2 framework builds to run under Rosetta 2 Intel-64 |
| 22360 |
emulation on Apple Silicon Macs. This can be useful for testing or when |
| 22361 |
universal2 wheels are not yet available. |
| 22362 |
|
| 22363 |
- bpo-43851: Build SQLite with ``SQLITE_OMIT_AUTOINIT`` on macOS. Patch by |
| 22364 |
Erlend E. Aasland. |
| 22365 |
|
| 22366 |
- bpo-43492: Update macOS installer to use SQLite 3.35.4. |
| 22367 |
|
| 22368 |
- bpo-42235: ``Mac/BuildScript/build-installer.py`` will now use |
| 22369 |
"--enable-optimizations" and ``--with-lto`` when building on macOS 10.15 |
| 22370 |
or later. |
| 22371 |
|
| 22372 |
IDLE |
| 22373 |
---- |
| 22374 |
|
| 22375 |
- bpo-37903: Add mouse actions to the shell sidebar. Left click and |
| 22376 |
optional drag selects one or more lines, as with the editor line number |
| 22377 |
sidebar. Right click after selecting raises a context menu with 'copy |
| 22378 |
with prompts'. This zips together prompts from the sidebar with lines |
| 22379 |
from the selected text. |
| 22380 |
|
| 22381 |
- bpo-43981: Fix reference leak in test_sidebar and test_squeezer. Patches |
| 22382 |
by Terry Jan Reedy and Pablo Galindo |
| 22383 |
|
| 22384 |
- bpo-37892: Indent IDLE Shell input with spaces instead of tabs |
| 22385 |
|
| 22386 |
- bpo-43655: IDLE dialog windows are now recognized as dialogs by window |
| 22387 |
managers on macOS and X Window. |
| 22388 |
|
| 22389 |
- bpo-37903: IDLE's shell now shows prompts in a separate side-bar. |
| 22390 |
|
| 22391 |
C API |
| 22392 |
----- |
| 22393 |
|
| 22394 |
- bpo-43916: Add a new :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type |
| 22395 |
flag to disallow creating type instances. Patch by Victor Stinner. |
| 22396 |
|
| 22397 |
- bpo-43774: Remove the now unused ``PYMALLOC_DEBUG`` macro. Debug hooks on |
| 22398 |
memory allocators are now installed by default if Python is built in debug |
| 22399 |
mode (if ``Py_DEBUG`` macro is defined). Moreover, they can now be used on |
| 22400 |
Python build in release mode (ex: using ``PYTHONMALLOC=debug`` environment |
| 22401 |
variable). |
| 22402 |
|
| 22403 |
- bpo-43962: _PyInterpreterState_IDIncref() now calls |
| 22404 |
_PyInterpreterState_IDInitref() and always increments id_refcount. |
| 22405 |
Previously, calling _xxsubinterpreters.get_current() could create an |
| 22406 |
id_refcount inconsistency when a _xxsubinterpreters.InterpreterID object |
| 22407 |
was deallocated. Patch by Victor Stinner. |
| 22408 |
|
| 22409 |
- bpo-28254: Add new C-API functions to control the state of the garbage |
| 22410 |
collector: :c:func:`PyGC_Enable()`, :c:func:`PyGC_Disable()`, |
| 22411 |
:c:func:`PyGC_IsEnabled()`, corresponding to the functions in the |
| 22412 |
:mod:`gc` module. |
| 22413 |
|
| 22414 |
- bpo-43908: Introduce :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag for |
| 22415 |
immutable type objects, and modify :c:func:`PyType_Ready` to set it for |
| 22416 |
static types. Patch by Erlend E. Aasland. |
| 22417 |
|
| 22418 |
- bpo-43795: :c:func:`PyMem_Calloc` is now available in the limited C API |
| 22419 |
(``Py_LIMITED_API``). |
| 22420 |
|
| 22421 |
- bpo-43868: :c:func:`PyOS_ReadlineFunctionPointer` is no longer exported by |
| 22422 |
limited C API headers and by ``python3.dll`` on Windows. Like any function |
| 22423 |
that takes ``FILE*``, it is not part of the stable ABI. |
| 22424 |
|
| 22425 |
- bpo-43795: Stable ABI and limited API definitions are generated from a |
| 22426 |
central manifest (:pep:`652`). |
| 22427 |
|
| 22428 |
- bpo-43753: Add the :c:func:`Py_Is(x, y) <Py_Is>` function to test if the |
| 22429 |
*x* object is the *y* object, the same as ``x is y`` in Python. Add also |
| 22430 |
the :c:func:`Py_IsNone`, :c:func:`Py_IsTrue`, :c:func:`Py_IsFalse` |
| 22431 |
functions to test if an object is, respectively, the ``None`` singleton, |
| 22432 |
the ``True`` singleton or the ``False`` singleton. Patch by Victor |
| 22433 |
Stinner. |
| 22434 |
|
| 22435 |
|
| 22436 |
What's New in Python 3.10.0 alpha 7? |
| 22437 |
==================================== |
| 22438 |
|
| 22439 |
*Release date: 2021-04-05* |
| 22440 |
|
| 22441 |
Security |
| 22442 |
-------- |
| 22443 |
|
| 22444 |
- bpo-42988: :cve:`2021-3426`: Remove the ``getfile`` feature of the |
| 22445 |
:mod:`pydoc` module which could be abused to read arbitrary files on the |
| 22446 |
disk (directory traversal vulnerability). Moreover, even source code of |
| 22447 |
Python modules can contain sensitive data like passwords. Vulnerability |
| 22448 |
reported by David Schwörer. |
| 22449 |
|
| 22450 |
- bpo-43285: :mod:`ftplib` no longer trusts the IP address value returned |
| 22451 |
from the server in response to the PASV command by default. This prevents |
| 22452 |
a malicious FTP server from using the response to probe IPv4 address and |
| 22453 |
port combinations on the client network. |
| 22454 |
|
| 22455 |
Code that requires the former vulnerable behavior may set a |
| 22456 |
``trust_server_pasv_ipv4_address`` attribute on their :class:`ftplib.FTP` |
| 22457 |
instances to ``True`` to re-enable it. |
| 22458 |
|
| 22459 |
- bpo-43439: Add audit hooks for :func:`gc.get_objects`, |
| 22460 |
:func:`gc.get_referrers` and :func:`gc.get_referents`. Patch by Pablo |
| 22461 |
Galindo. |
| 22462 |
|
| 22463 |
Core and Builtins |
| 22464 |
----------------- |
| 22465 |
|
| 22466 |
- bpo-27129: Update CPython bytecode magic number. |
| 22467 |
|
| 22468 |
- bpo-43672: Raise ImportWarning when calling find_loader(). |
| 22469 |
|
| 22470 |
- bpo-43660: Fix crash that happens when replacing ``sys.stderr`` with a |
| 22471 |
callable that can remove the object while an exception is being printed. |
| 22472 |
Patch by Pablo Galindo. |
| 22473 |
|
| 22474 |
- bpo-27129: The bytecode interpreter uses instruction, rather byte, offsets |
| 22475 |
internally. This reduces the number of EXTENDED_ARG instructions needed |
| 22476 |
and streamlines instruction dispatch a bit. |
| 22477 |
|
| 22478 |
Library |
| 22479 |
------- |
| 22480 |
|
| 22481 |
- bpo-40645: Fix reference leak in the :mod:`!_hashopenssl` extension. Patch |
| 22482 |
by Pablo Galindo. |
| 22483 |
|
| 22484 |
Core and Builtins |
| 22485 |
----------------- |
| 22486 |
|
| 22487 |
- bpo-42134: Calls to find_module() by the import system now raise |
| 22488 |
ImportWarning. |
| 22489 |
|
| 22490 |
- bpo-41064: Improve the syntax error for invalid usage of double starred |
| 22491 |
elements ('**') in f-strings. Patch by Pablo Galindo. |
| 22492 |
|
| 22493 |
- bpo-43575: Speed up calls to ``map()`` by using the :pep:`590` |
| 22494 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 22495 |
|
| 22496 |
- bpo-42137: The import system now prefers using ``__spec__`` for |
| 22497 |
``ModuleType.__repr__`` over ``module_repr()``. |
| 22498 |
|
| 22499 |
- bpo-43452: Added micro-optimizations to ``_PyType_Lookup()`` to improve |
| 22500 |
cache lookup performance in the common case of cache hits. |
| 22501 |
|
| 22502 |
- bpo-43555: Report the column offset for :exc:`SyntaxError` for invalid |
| 22503 |
line continuation characters. Patch by Pablo Galindo. |
| 22504 |
|
| 22505 |
- bpo-43517: Fix misdetection of circular imports when using ``from pkg.mod |
| 22506 |
import attr``, which caused false positives in non-trivial multi-threaded |
| 22507 |
code. |
| 22508 |
|
| 22509 |
- bpo-43497: Emit SyntaxWarnings for assertions with tuple constants, this |
| 22510 |
is a regression introduced in python3.7 |
| 22511 |
|
| 22512 |
- bpo-39316: Tracing now has correct line numbers for attribute accesses |
| 22513 |
when the attribute is on a different line from the object. Improves |
| 22514 |
debugging and profiling for multi-line method chains. |
| 22515 |
|
| 22516 |
- bpo-35883: Python no longer fails at startup with a fatal error if a |
| 22517 |
command line argument contains an invalid Unicode character. The |
| 22518 |
:c:func:`Py_DecodeLocale` function now escapes byte sequences which would |
| 22519 |
be decoded as Unicode characters outside the [U+0000; U+10ffff] range. |
| 22520 |
|
| 22521 |
- bpo-43410: Fix a bug that was causing the parser to crash when emitting |
| 22522 |
syntax errors when reading input from stdin. Patch by Pablo Galindo |
| 22523 |
|
| 22524 |
- bpo-43406: Fix a possible race condition where ``PyErr_CheckSignals`` |
| 22525 |
tries to execute a non-Python signal handler. |
| 22526 |
|
| 22527 |
- bpo-42128: Add ``__match_args__`` to :ref:`struct sequence objects |
| 22528 |
<struct-sequence-objects>`. Patch by Pablo Galindo. |
| 22529 |
|
| 22530 |
- bpo-43390: CPython now sets the ``SA_ONSTACK`` flag in ``PyOS_setsig`` for |
| 22531 |
the VM's default signal handlers. This is friendlier to other in-process |
| 22532 |
code that an extension module or embedding use could pull in (such as |
| 22533 |
Golang's cgo) where tiny thread stacks are the norm and ``sigaltstack()`` |
| 22534 |
has been used to provide for signal handlers. This is a no-op change for |
| 22535 |
the vast majority of processes that don't use sigaltstack. |
| 22536 |
|
| 22537 |
- bpo-43287: Speed up calls to ``filter()`` by using the :pep:`590` |
| 22538 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 22539 |
|
| 22540 |
- bpo-37448: Add a radix tree based memory map to track in-use obmalloc |
| 22541 |
arenas. Use to replace the old implementation of address_in_range(). The |
| 22542 |
radix tree approach makes it easy to increase pool sizes beyond the OS |
| 22543 |
page size. Boosting the pool and arena size allows obmalloc to handle a |
| 22544 |
significantly higher percentage of requests from its ultra-fast paths. |
| 22545 |
|
| 22546 |
It also has the advantage of eliminating the memory unsanitary behavior of |
| 22547 |
the previous address_in_range(). The old address_in_range() was marked |
| 22548 |
with the annotations _Py_NO_SANITIZE_ADDRESS, _Py_NO_SANITIZE_THREAD, and |
| 22549 |
_Py_NO_SANITIZE_MEMORY. Those annotations are no longer needed. |
| 22550 |
|
| 22551 |
To disable the radix tree map, set a preprocessor flag as follows: |
| 22552 |
``-DWITH_PYMALLOC_RADIX_TREE=0``. |
| 22553 |
|
| 22554 |
Co-authored-by: Tim Peters <[email protected]> |
| 22555 |
|
| 22556 |
- bpo-29988: Only handle asynchronous exceptions and requests to drop the |
| 22557 |
GIL when returning from a call or on the back edges of loops. Makes sure |
| 22558 |
that :meth:`~object.__exit__` is always called in with statements, even |
| 22559 |
for interrupts. |
| 22560 |
|
| 22561 |
Library |
| 22562 |
------- |
| 22563 |
|
| 22564 |
- bpo-43720: Document various stdlib deprecations in imp, pkgutil, and |
| 22565 |
importlib.util for removal in Python 3.12. |
| 22566 |
|
| 22567 |
- bpo-43433: :class:`xmlrpc.client.ServerProxy` no longer ignores query and |
| 22568 |
fragment in the URL of the server. |
| 22569 |
|
| 22570 |
- bpo-31956: The :meth:`~array.array.index` method of :class:`array.array` |
| 22571 |
now has optional *start* and *stop* parameters. |
| 22572 |
|
| 22573 |
- bpo-40066: Enum: adjust ``repr()`` to show only enum and member name (not |
| 22574 |
value, nor angle brackets) and ``str()`` to show only member name. Update |
| 22575 |
and improve documentation to match. |
| 22576 |
|
| 22577 |
- bpo-42136: Deprecate all module_repr() methods found in importlib as their |
| 22578 |
use is being phased out by Python 3.12. |
| 22579 |
|
| 22580 |
- bpo-35930: Raising an exception raised in a "future" instance will create |
| 22581 |
reference cycles. |
| 22582 |
|
| 22583 |
- bpo-41369: Finish updating the vendored libmpdec to version 2.5.1. Patch |
| 22584 |
by Stefan Krah. |
| 22585 |
|
| 22586 |
- bpo-43422: Revert the _decimal C API which was added in bpo-41324. |
| 22587 |
|
| 22588 |
- bpo-43577: Fix deadlock when using :class:`ssl.SSLContext` debug callback |
| 22589 |
with :meth:`ssl.SSLContext.sni_callback`. |
| 22590 |
|
| 22591 |
- bpo-43571: It's now possible to create MPTCP sockets with IPPROTO_MPTCP |
| 22592 |
|
| 22593 |
- bpo-43542: ``image/heic`` and ``image/heif`` were added to |
| 22594 |
:mod:`mimetypes`. |
| 22595 |
|
| 22596 |
- bpo-40645: The :mod:`hmac` module now uses OpenSSL's HMAC implementation |
| 22597 |
when digestmod argument is a hash name or builtin hash function. |
| 22598 |
|
| 22599 |
- bpo-43510: Implement :pep:`597`: Add ``EncodingWarning`` warning, ``-X |
| 22600 |
warn_default_encoding`` option, :envvar:`PYTHONWARNDEFAULTENCODING` |
| 22601 |
environment variable and ``encoding="locale"`` argument value. |
| 22602 |
|
| 22603 |
- bpo-43521: ``ast.unparse`` can now render NaNs and empty sets. |
| 22604 |
|
| 22605 |
- bpo-42914: :func:`pprint.pprint` gains a new boolean |
| 22606 |
``underscore_numbers`` optional argument to emit integers with thousands |
| 22607 |
separated by an underscore character for improved readability (for example |
| 22608 |
``1_000_000`` instead of ``1000000``). |
| 22609 |
|
| 22610 |
- bpo-41361: :meth:`~collections.deque.rotate` calls are now slightly faster |
| 22611 |
due to faster argument parsing. |
| 22612 |
|
| 22613 |
- bpo-43423: :func:`subprocess.communicate` no longer raises an IndexError |
| 22614 |
when there is an empty stdout or stderr IO buffer during a timeout on |
| 22615 |
Windows. |
| 22616 |
|
| 22617 |
- bpo-27820: Fixed long-standing bug of smtplib.SMTP where doing AUTH LOGIN |
| 22618 |
with initial_response_ok=False will fail. |
| 22619 |
|
| 22620 |
The cause is that SMTP.auth_login _always_ returns a password if provided |
| 22621 |
with a challenge string, thus non-compliant with the standard for AUTH |
| 22622 |
LOGIN. |
| 22623 |
|
| 22624 |
Also fixes bug with the test for smtpd. |
| 22625 |
|
| 22626 |
- bpo-43445: Add frozen modules to :data:`sys.stdlib_module_names`. For |
| 22627 |
example, add ``"_frozen_importlib"`` and ``"_frozen_importlib_external"`` |
| 22628 |
names. |
| 22629 |
|
| 22630 |
- bpo-43245: Add keyword arguments support to ``ChainMap.new_child()``. |
| 22631 |
|
| 22632 |
- bpo-29982: Add optional parameter *ignore_cleanup_errors* to |
| 22633 |
:func:`tempfile.TemporaryDirectory` and allow multiple :func:`cleanup` |
| 22634 |
attempts. Contributed by C.A.M. Gerlach. |
| 22635 |
|
| 22636 |
- bpo-43428: Include changes from `importlib_metadata 3.7 |
| 22637 |
<https://importlib-metadata.readthedocs.io/en/latest/history.html#v3-7-0>`_: |
| 22638 |
|
| 22639 |
Performance enhancements to distribution discovery. |
| 22640 |
|
| 22641 |
``entry_points`` only returns unique distributions. |
| 22642 |
|
| 22643 |
Introduces new ``EntryPoints`` object for containing a set of entry points |
| 22644 |
with convenience methods for selecting entry points by group or name. |
| 22645 |
``entry_points`` now returns this object if selection parameters are |
| 22646 |
supplied but continues to return a dict object for compatibility. Users |
| 22647 |
are encouraged to rely on the selection interface. The dict object result |
| 22648 |
is likely to be deprecated in the future. |
| 22649 |
|
| 22650 |
Added packages_distributions function to return a mapping of packages to |
| 22651 |
the distributions that provide them. |
| 22652 |
|
| 22653 |
- bpo-43332: Improves the networking efficiency of :mod:`http.client` when |
| 22654 |
using a proxy via :meth:`~HTTPConnection.set_tunnel`. Fewer small send |
| 22655 |
calls are made during connection setup. |
| 22656 |
|
| 22657 |
- bpo-43420: Improve performance of :class:`fractions.Fraction` arithmetics |
| 22658 |
for large components. Contributed by Sergey B. Kirpichev. |
| 22659 |
|
| 22660 |
- bpo-43356: Allow passing a signal number to ``_thread.interrupt_main()``. |
| 22661 |
|
| 22662 |
- bpo-43399: Fix ``ElementTree.extend`` not working on iterators when using |
| 22663 |
the Python implementation |
| 22664 |
|
| 22665 |
- bpo-43369: Improve :mod:`sqlite3` error handling: If |
| 22666 |
``sqlite3_column_text()`` and ``sqlite3_column_blob()`` set |
| 22667 |
``SQLITE_NOMEM``, :exc:`MemoryError` is now raised. Patch by Erlend E. |
| 22668 |
Aasland. |
| 22669 |
|
| 22670 |
- bpo-43368: Fix a regression introduced in PR 24562, where an empty |
| 22671 |
bytestring was fetched as ``None`` instead of ``b''`` in :mod:`sqlite3`. |
| 22672 |
Patch by Mariusz Felisiak. |
| 22673 |
|
| 22674 |
- bpo-41282: Fixed stacklevel of ``DeprecationWarning`` emitted from |
| 22675 |
``import distutils``. |
| 22676 |
|
| 22677 |
- bpo-42129: ``importlib.resources`` now honors namespace packages, merging |
| 22678 |
resources from each location in the namespace as introduced in |
| 22679 |
``importlib_resources`` 3.2 and including incidental changes through |
| 22680 |
5.0.3. |
| 22681 |
|
| 22682 |
- bpo-43295: :meth:`datetime.datetime.strptime` now raises ``ValueError`` |
| 22683 |
instead of ``IndexError`` when matching ``'z'`` with the ``%z`` format |
| 22684 |
specifier. |
| 22685 |
|
| 22686 |
- bpo-43125: Return empty string if base64mime.body_encode receive empty |
| 22687 |
bytes |
| 22688 |
|
| 22689 |
- bpo-43084: :func:`curses.window.enclose` returns now ``True`` or ``False`` |
| 22690 |
(as was documented) instead of ``1`` or ``0``. |
| 22691 |
|
| 22692 |
- bpo-42994: Add MIME types for opus, AAC, 3gpp and 3gpp2 |
| 22693 |
|
| 22694 |
- bpo-14678: Add an invalidate_caches() method to the zipimport.zipimporter |
| 22695 |
class to support importlib.invalidate_caches(). Patch by Desmond Cheong. |
| 22696 |
|
| 22697 |
- bpo-42782: Fail fast in :func:`shutil.move` to avoid creating destination |
| 22698 |
directories on failure. |
| 22699 |
|
| 22700 |
- bpo-40066: Enum's ``repr()`` and ``str()`` have changed: ``repr()`` is now |
| 22701 |
*EnumClass.MemberName* and ``str()`` is *MemberName*. Additionally, |
| 22702 |
stdlib Enum's whose contents are available as module attributes, such as |
| 22703 |
``RegexFlag.IGNORECASE``, have their ``repr()`` as *module.name*, e.g. |
| 22704 |
``re.IGNORECASE``. |
| 22705 |
|
| 22706 |
- bpo-26053: Fixed bug where the :mod:`pdb` interactive run command echoed |
| 22707 |
the args from the shell command line, even if those have been overridden |
| 22708 |
at the pdb prompt. |
| 22709 |
|
| 22710 |
- bpo-24160: Fixed bug where breakpoints did not persist across multiple |
| 22711 |
debugger sessions in :mod:`pdb`'s interactive mode. |
| 22712 |
|
| 22713 |
- bpo-40701: When the :data:`tempfile.tempdir` global variable is set to a |
| 22714 |
value of type bytes, it is now handled consistently. Previously |
| 22715 |
exceptions could be raised from some tempfile APIs when the directory did |
| 22716 |
not already exist in this situation. Also ensures that the |
| 22717 |
:func:`tempfile.gettempdir` and :func:`tempfile.gettempdirb` functions |
| 22718 |
*always* return ``str`` and ``bytes`` respectively. |
| 22719 |
|
| 22720 |
- bpo-39342: Expose ``X509_V_FLAG_ALLOW_PROXY_CERTS`` as |
| 22721 |
:const:`~ssl.VERIFY_ALLOW_PROXY_CERTS` to allow proxy certificate |
| 22722 |
validation as explained in |
| 22723 |
https://docs.openssl.org/1.1.1/man7/proxy-certificates/. |
| 22724 |
|
| 22725 |
- bpo-31861: Add builtins.aiter and builtins.anext. Patch by Joshua Bronson |
| 22726 |
(@jab), Daniel Pope (@lordmauve), and Justin Wang (@justin39). |
| 22727 |
|
| 22728 |
Documentation |
| 22729 |
------------- |
| 22730 |
|
| 22731 |
- bpo-43199: Answer "Why is there no goto?" in the Design and History FAQ. |
| 22732 |
|
| 22733 |
- bpo-43407: Clarified that a result from :func:`time.monotonic`, |
| 22734 |
:func:`time.perf_counter`, :func:`time.process_time`, or |
| 22735 |
:func:`time.thread_time` can be compared with the result from any |
| 22736 |
following call to the same function - not just the next immediate call. |
| 22737 |
|
| 22738 |
- bpo-43354: Fix type documentation for ``Fault.faultCode``; the type has to |
| 22739 |
be ``int`` instead of ``str``. |
| 22740 |
|
| 22741 |
- bpo-41933: Clarified wording of s * n in the Common Sequence Operations |
| 22742 |
|
| 22743 |
Tests |
| 22744 |
----- |
| 22745 |
|
| 22746 |
- bpo-37945: Fix test_getsetlocale_issue1813() of test_locale: skip the test |
| 22747 |
if ``setlocale()`` fails. Patch by Victor Stinner. |
| 22748 |
|
| 22749 |
- bpo-41561: Add workaround for Ubuntu's custom OpenSSL security level |
| 22750 |
policy. |
| 22751 |
|
| 22752 |
Build |
| 22753 |
----- |
| 22754 |
|
| 22755 |
- bpo-43179: Introduce and correctly use ALIGNOF_X in place of SIZEOF_X for |
| 22756 |
alignment-related code in optimized string routines. Patch by Jessica |
| 22757 |
Clarke. |
| 22758 |
|
| 22759 |
- bpo-43631: Update macOS, Windows, and CI to OpenSSL 1.1.1k. |
| 22760 |
|
| 22761 |
- bpo-43617: Improve configure.ac: Check for presence of autoconf-archive |
| 22762 |
package and remove our copies of M4 macros. |
| 22763 |
|
| 22764 |
- bpo-43466: The ``configure`` script now supports ``--with-openssl-rpath`` |
| 22765 |
option. |
| 22766 |
|
| 22767 |
- bpo-43372: Use ``_freeze_importlib`` to generate code for the |
| 22768 |
``__hello__`` module. This approach ensures the code matches the |
| 22769 |
interpreter version. Previously, PYTHON_FOR_REGEN was used to generate |
| 22770 |
the code, which might be wrong. The marshal format for code objects has |
| 22771 |
changed with bpo-42246, commit 877df851. Update the code and the expected |
| 22772 |
code sizes in ctypes test_frozentable. |
| 22773 |
|
| 22774 |
Windows |
| 22775 |
------- |
| 22776 |
|
| 22777 |
- bpo-43440: Build :mod:`sqlite3` with the ``R*Tree`` module enabled. Patch |
| 22778 |
by Erlend E. Aasland. |
| 22779 |
|
| 22780 |
IDLE |
| 22781 |
---- |
| 22782 |
|
| 22783 |
- bpo-42225: Document that IDLE can fail on Unix either from misconfigured |
| 22784 |
IP masquerade rules or failure displaying complex colored (non-ascii) |
| 22785 |
characters. |
| 22786 |
|
| 22787 |
C API |
| 22788 |
----- |
| 22789 |
|
| 22790 |
- bpo-43688: The limited C API is now supported if Python is built in debug |
| 22791 |
mode (if the ``Py_DEBUG`` macro is defined). In the limited C API, the |
| 22792 |
:c:func:`Py_INCREF` and :c:func:`Py_DECREF` functions are now implemented |
| 22793 |
as opaque function calls, rather than accessing directly the |
| 22794 |
:c:member:`PyObject.ob_refcnt` member, if Python is built in debug mode |
| 22795 |
and the ``Py_LIMITED_API`` macro targets Python 3.10 or newer. It became |
| 22796 |
possible to support the limited C API in debug mode because the |
| 22797 |
:c:type:`PyObject` structure is the same in release and debug mode since |
| 22798 |
Python 3.8 (see :issue:`36465`). |
| 22799 |
|
| 22800 |
The limited C API is still not supported in the ``--with-trace-refs`` |
| 22801 |
special build (``Py_TRACE_REFS`` macro). |
| 22802 |
|
| 22803 |
Patch by Victor Stinner. |
| 22804 |
|
| 22805 |
- bpo-43244: Remove the ``pyarena.h`` header file with functions: |
| 22806 |
|
| 22807 |
* ``PyArena_New()`` |
| 22808 |
* ``PyArena_Free()`` |
| 22809 |
* ``PyArena_Malloc()`` |
| 22810 |
* ``PyArena_AddPyObject()`` |
| 22811 |
|
| 22812 |
These functions were undocumented, excluded from the limited C API, and |
| 22813 |
were only used internally by the compiler. Patch by Victor Stinner. |
| 22814 |
|
| 22815 |
- bpo-43244: Remove the compiler and parser functions using ``struct _mod`` |
| 22816 |
type, because the public AST C API was removed: |
| 22817 |
|
| 22818 |
* ``PyAST_Compile()`` |
| 22819 |
* ``PyAST_CompileEx()`` |
| 22820 |
* ``PyAST_CompileObject()`` |
| 22821 |
* ``PyFuture_FromAST()`` |
| 22822 |
* ``PyFuture_FromASTObject()`` |
| 22823 |
* ``PyParser_ASTFromFile()`` |
| 22824 |
* ``PyParser_ASTFromFileObject()`` |
| 22825 |
* ``PyParser_ASTFromFilename()`` |
| 22826 |
* ``PyParser_ASTFromString()`` |
| 22827 |
* ``PyParser_ASTFromStringObject()`` |
| 22828 |
|
| 22829 |
These functions were undocumented and excluded from the limited C API. |
| 22830 |
Patch by Victor Stinner. |
| 22831 |
|
| 22832 |
- bpo-43244: Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header |
| 22833 |
files. These functions were undocumented and excluded from the limited C |
| 22834 |
API. Most names defined by these header files were not prefixed by ``Py`` |
| 22835 |
and so could create names conflicts. For example, ``Python-ast.h`` defined |
| 22836 |
a ``Yield`` macro which was conflict with the ``Yield`` name used by the |
| 22837 |
Windows ``<winbase.h>`` header. Use the Python :mod:`ast` module instead. |
| 22838 |
Patch by Victor Stinner. |
| 22839 |
|
| 22840 |
- bpo-43541: Fix a ``PyEval_EvalCodeEx()`` regression: fix reference |
| 22841 |
counting on builtins. Patch by Victor Stinner. |
| 22842 |
|
| 22843 |
- bpo-43244: Remove the ``symtable.h`` header file and the undocumented |
| 22844 |
functions: |
| 22845 |
|
| 22846 |
* ``PyST_GetScope()`` |
| 22847 |
* ``PySymtable_Build()`` |
| 22848 |
* ``PySymtable_BuildObject()`` |
| 22849 |
* ``PySymtable_Free()`` |
| 22850 |
* ``Py_SymtableString()`` |
| 22851 |
* ``Py_SymtableStringObject()`` |
| 22852 |
|
| 22853 |
The ``Py_SymtableString()`` function was part the stable ABI by mistake |
| 22854 |
but it could not be used, because the ``symtable.h`` header file was |
| 22855 |
excluded from the limited C API. |
| 22856 |
|
| 22857 |
The Python :mod:`symtable` module remains available and is unchanged. |
| 22858 |
|
| 22859 |
Patch by Victor Stinner. |
| 22860 |
|
| 22861 |
- bpo-43244: Remove the ``PyAST_Validate()`` function. It is no longer |
| 22862 |
possible to build a AST object (``mod_ty`` type) with the public C API. |
| 22863 |
The function was already excluded from the limited C API (:pep:`384`). |
| 22864 |
Patch by Victor Stinner. |
| 22865 |
|
| 22866 |
|
| 22867 |
What's New in Python 3.10.0 alpha 6? |
| 22868 |
==================================== |
| 22869 |
|
| 22870 |
*Release date: 2021-03-01* |
| 22871 |
|
| 22872 |
Security |
| 22873 |
-------- |
| 22874 |
|
| 22875 |
- bpo-42967: Fix web cache poisoning vulnerability by defaulting the query |
| 22876 |
args separator to ``&``, and allowing the user to choose a custom |
| 22877 |
separator. |
| 22878 |
|
| 22879 |
Core and Builtins |
| 22880 |
----------------- |
| 22881 |
|
| 22882 |
- bpo-43321: Fix ``SystemError`` raised when ``PyArg_Parse*()`` is used with |
| 22883 |
``#`` but without ``PY_SSIZE_T_CLEAN`` defined. |
| 22884 |
|
| 22885 |
- bpo-36346: ``PyArg_Parse*()`` functions now emits ``DeprecationWarning`` |
| 22886 |
when ``u`` or ``Z`` format is used. See :pep:`623` for detail. |
| 22887 |
|
| 22888 |
- bpo-43277: Add a new :c:func:`PySet_CheckExact` function to the C-API to |
| 22889 |
check if an object is an instance of :class:`set` but not an instance of a |
| 22890 |
subtype. Patch by Pablo Galindo. |
| 22891 |
|
| 22892 |
- bpo-42990: The :data:`types.FunctionType` constructor now inherits the |
| 22893 |
current builtins if the *globals* dictionary has no ``"__builtins__"`` |
| 22894 |
key, rather than using ``{"None": None}`` as builtins: same behavior as |
| 22895 |
:func:`eval` and :func:`exec` functions. Defining a function with ``def |
| 22896 |
function(...): ...`` in Python is not affected, globals cannot be |
| 22897 |
overridden with this syntax: it also inherits the current builtins. Patch |
| 22898 |
by Victor Stinner. |
| 22899 |
|
| 22900 |
- bpo-42990: Functions have a new ``__builtins__`` attribute which is used |
| 22901 |
to look for builtin symbols when a function is executed, instead of |
| 22902 |
looking into ``__globals__['__builtins__']``. Patch by Mark Shannon and |
| 22903 |
Victor Stinner. |
| 22904 |
|
| 22905 |
- bpo-43149: Improve the error message in the parser for exception groups |
| 22906 |
without parentheses. Patch by Pablo Galindo. |
| 22907 |
|
| 22908 |
- bpo-43121: Fixed an incorrect :exc:`SyntaxError` message for missing comma |
| 22909 |
in literals. Patch by Pablo Galindo. |
| 22910 |
|
| 22911 |
Library |
| 22912 |
------- |
| 22913 |
|
| 22914 |
- bpo-42819: :mod:`readline`: Explicitly disable bracketed paste in the |
| 22915 |
interactive interpreter, even if it's set in the inputrc, is enabled by |
| 22916 |
default (eg GNU Readline 8.1), or a user calls |
| 22917 |
``readline.read_init_file()``. The Python REPL has not implemented |
| 22918 |
bracketed paste support. Also, bracketed mode writes the ``"\x1b[?2004h"`` |
| 22919 |
escape sequence into stdout which causes test failures in applications |
| 22920 |
that don't support it. It can still be explicitly enabled by calling |
| 22921 |
``readline.parse_and_bind("set enable-bracketed-paste on")``. Patch by |
| 22922 |
Dustin Rodrigues. |
| 22923 |
|
| 22924 |
Core and Builtins |
| 22925 |
----------------- |
| 22926 |
|
| 22927 |
- bpo-42808: Simple calls to ``type(object)`` are now faster due to the |
| 22928 |
``vectorcall`` calling convention. Patch by Dennis Sweeney. |
| 22929 |
|
| 22930 |
- bpo-42217: Make the compiler merges same co_code and co_linetable objects |
| 22931 |
in a module like already did for co_consts. |
| 22932 |
|
| 22933 |
- bpo-41972: Substring search functions such as ``str1 in str2`` and |
| 22934 |
``str2.find(str1)`` now sometimes use the "Two-Way" string comparison |
| 22935 |
algorithm to avoid quadratic behavior on long strings. |
| 22936 |
|
| 22937 |
- bpo-42128: Implement :pep:`634` (structural pattern matching). Patch by |
| 22938 |
Brandt Bucher. |
| 22939 |
|
| 22940 |
Library |
| 22941 |
------- |
| 22942 |
|
| 22943 |
- bpo-40692: In the :class:`concurrent.futures.ProcessPoolExecutor`, |
| 22944 |
validate that :func:`multiprocess.synchronize` is available on a given |
| 22945 |
platform and rely on that check in the :mod:`concurrent.futures` test |
| 22946 |
suite so we can run tests that are unrelated to |
| 22947 |
:class:`ProcessPoolExecutor` on those platforms. |
| 22948 |
|
| 22949 |
Core and Builtins |
| 22950 |
----------------- |
| 22951 |
|
| 22952 |
- bpo-38302: If :func:`object.__ipow__` returns :data:`NotImplemented`, the |
| 22953 |
operator will correctly fall back to :func:`object.__pow__` and |
| 22954 |
:func:`object.__rpow__` as expected. |
| 22955 |
|
| 22956 |
Library |
| 22957 |
------- |
| 22958 |
|
| 22959 |
- bpo-43316: The ``python -m gzip`` command line application now properly |
| 22960 |
fails when detecting an unsupported extension. It exits with a non-zero |
| 22961 |
exit code and prints an error message to stderr. |
| 22962 |
|
| 22963 |
- bpo-43317: Set the chunk size for the ``gzip`` module main function to |
| 22964 |
io.DEFAULT_BUFFER_SIZE. This is slightly faster than the 1024 bytes |
| 22965 |
constant that was used previously. |
| 22966 |
|
| 22967 |
- bpo-43146: Handle None in single-arg versions of |
| 22968 |
:func:`~traceback.print_exception` and |
| 22969 |
:func:`~traceback.format_exception`. |
| 22970 |
|
| 22971 |
- bpo-43260: Fix TextIOWrapper can not flush internal buffer forever after |
| 22972 |
very large text is written. |
| 22973 |
|
| 22974 |
- bpo-43258: Prevent needless allocation of :mod:`sqlite3` aggregate |
| 22975 |
function context when no rows match an aggregate query. Patch by Erlend E. |
| 22976 |
Aasland. |
| 22977 |
|
| 22978 |
- bpo-43251: Improve :mod:`sqlite3` error handling: |
| 22979 |
``sqlite3_column_name()`` failures now result in :exc:`MemoryError`. Patch |
| 22980 |
by Erlend E. Aasland. |
| 22981 |
|
| 22982 |
- bpo-40956: Fix segfault in :meth:`sqlite3.Connection.backup` if no |
| 22983 |
argument was provided. The regression was introduced by PR 23838. Patch by |
| 22984 |
Erlend E. Aasland. |
| 22985 |
|
| 22986 |
- bpo-43172: The readline module now passes its tests when built directly |
| 22987 |
against libedit. Existing irreconcilable API differences remain in |
| 22988 |
:func:`readline.get_begidx` and :func:`readline.get_endidx` behavior based |
| 22989 |
on libreadline vs libedit use. |
| 22990 |
|
| 22991 |
- bpo-43163: Fix a bug in :mod:`codeop` that was causing it to not ask for |
| 22992 |
more input when multi-line snippets have unclosed parentheses. Patch by |
| 22993 |
Pablo Galindo |
| 22994 |
|
| 22995 |
- bpo-43162: deprecate unsupported ability to access enum members as |
| 22996 |
attributes of other enum members |
| 22997 |
|
| 22998 |
- bpo-43146: Fix recent regression in None argument handling in |
| 22999 |
:mod:`~traceback` module functions. |
| 23000 |
|
| 23001 |
- bpo-43102: The namedtuple __new__ method had its __builtins__ set to None |
| 23002 |
instead of an actual dictionary. This created problems for introspection |
| 23003 |
tools. |
| 23004 |
|
| 23005 |
- bpo-43106: Added :const:`~os.O_EVTONLY`, :const:`~os.O_FSYNC`, |
| 23006 |
:const:`~os.O_SYMLINK` and :const:`~os.O_NOFOLLOW_ANY` for macOS. Patch by |
| 23007 |
Donghee Na. |
| 23008 |
|
| 23009 |
- bpo-42960: Adds :const:`resource.RLIMIT_KQUEUES` constant from FreeBSD to |
| 23010 |
the :mod:`resource` module. |
| 23011 |
|
| 23012 |
- bpo-42151: Make the pure Python implementation of |
| 23013 |
:mod:`xml.etree.ElementTree` behave the same as the C implementation |
| 23014 |
(:mod:`!_elementree`) regarding default attribute values (by not setting |
| 23015 |
``specified_attributes=1``). |
| 23016 |
|
| 23017 |
- bpo-29753: In ctypes, now packed bitfields are calculated properly and the |
| 23018 |
first item of packed bitfields is now shrank correctly. |
| 23019 |
|
| 23020 |
Documentation |
| 23021 |
------------- |
| 23022 |
|
| 23023 |
- bpo-27646: Clarify that 'yield from <expr>' works with any iterable, not |
| 23024 |
just iterators. |
| 23025 |
|
| 23026 |
- bpo-36346: Update some deprecated unicode APIs which are documented as |
| 23027 |
"will be removed in 4.0" to "3.12". See :pep:`623` for detail. |
| 23028 |
|
| 23029 |
Tests |
| 23030 |
----- |
| 23031 |
|
| 23032 |
- bpo-43288: Fix test_importlib to correctly skip Unicode file tests if the |
| 23033 |
filesystem does not support them. |
| 23034 |
|
| 23035 |
Build |
| 23036 |
----- |
| 23037 |
|
| 23038 |
- bpo-43174: Windows build now uses ``/utf-8`` compiler option. |
| 23039 |
|
| 23040 |
- bpo-43103: Add a new configure ``--without-static-libpython`` option to |
| 23041 |
not build the ``libpythonMAJOR.MINOR.a`` static library and not install |
| 23042 |
the ``python.o`` object file. |
| 23043 |
|
| 23044 |
- bpo-13501: The configure script can now use *libedit* instead of |
| 23045 |
*readline* with the command line option ``--with-readline=editline``. |
| 23046 |
|
| 23047 |
- bpo-42603: Make configure script use pkg-config to detect the location of |
| 23048 |
Tcl/Tk headers and libraries, used to build tkinter. |
| 23049 |
|
| 23050 |
On macOS, a Tcl/Tk configuration provided by pkg-config will be preferred |
| 23051 |
over Tcl/Tk frameworks installed in ``/{System/,}Library/Frameworks``. If |
| 23052 |
both exist and the latter is preferred, the appropriate ``--with-tcltk-*`` |
| 23053 |
configuration options need to be explicitly set. |
| 23054 |
|
| 23055 |
- bpo-39448: Add the "regen-frozen" makefile target that regenerates the |
| 23056 |
code for the frozen ``__hello__`` module. |
| 23057 |
|
| 23058 |
Windows |
| 23059 |
------- |
| 23060 |
|
| 23061 |
- bpo-43155: :c:func:`PyCMethod_New` is now present in ``python3.lib``. |
| 23062 |
|
| 23063 |
macOS |
| 23064 |
----- |
| 23065 |
|
| 23066 |
- bpo-41837: Update macOS installer build to use OpenSSL 1.1.1j. |
| 23067 |
|
| 23068 |
IDLE |
| 23069 |
---- |
| 23070 |
|
| 23071 |
- bpo-43283: Document why printing to IDLE's Shell is often slower than |
| 23072 |
printing to a system terminal and that it can be made faster by |
| 23073 |
pre-formatting a single string before printing. |
| 23074 |
|
| 23075 |
C API |
| 23076 |
----- |
| 23077 |
|
| 23078 |
- bpo-43278: Always put compiler and system information on the first line of |
| 23079 |
the REPL welcome message. |
| 23080 |
|
| 23081 |
- bpo-43270: Remove the private ``_PyErr_OCCURRED()`` macro: use the public |
| 23082 |
:c:func:`PyErr_Occurred` function instead. |
| 23083 |
|
| 23084 |
- bpo-35134: Move odictobject.h, parser_interface.h, picklebufobject.h, |
| 23085 |
pydebug.h, and pyfpe.h into the cpython/ directory. They must not be |
| 23086 |
included directly, as they are already included by Python.h: :ref:`Include |
| 23087 |
Files <api-includes>`. |
| 23088 |
|
| 23089 |
- bpo-35134: Move pyarena.h, pyctype.h, and pytime.h into the cpython/ |
| 23090 |
directory. They must not be included directly, as they are already |
| 23091 |
included by Python.h: :ref:`Include Files <api-includes>`. |
| 23092 |
|
| 23093 |
- bpo-40170: :c:func:`PyExceptionClass_Name` is now always declared as a |
| 23094 |
function, in order to hide implementation details. The macro accessed |
| 23095 |
:c:member:`PyTypeObject.tp_name` directly. Patch by Erlend E. Aasland. |
| 23096 |
|
| 23097 |
- bpo-43239: The :c:func:`PyCFunction_New` function is now exported in the |
| 23098 |
ABI when compiled with ``-fvisibility=hidden``. |
| 23099 |
|
| 23100 |
- bpo-40170: :c:func:`PyIter_Check` is now always declared as a function, in |
| 23101 |
order to hide implementation details. The macro accessed |
| 23102 |
:c:member:`PyTypeObject.tp_iternext` directly. Patch by Erlend E. Aasland. |
| 23103 |
|
| 23104 |
- bpo-40170: Convert :c:func:`PyDescr_IsData` macro to a function to hide |
| 23105 |
implementation details: The macro accessed |
| 23106 |
:c:member:`PyTypeObject.tp_descr_set` directly. Patch by Erlend E. |
| 23107 |
Aasland. |
| 23108 |
|
| 23109 |
- bpo-43181: Convert :c:func:`PyObject_TypeCheck` macro to a static inline |
| 23110 |
function. Patch by Erlend E. Aasland. |
| 23111 |
|
| 23112 |
|
| 23113 |
What's New in Python 3.10.0 alpha 5? |
| 23114 |
==================================== |
| 23115 |
|
| 23116 |
*Release date: 2021-02-02* |
| 23117 |
|
| 23118 |
Security |
| 23119 |
-------- |
| 23120 |
|
| 23121 |
- bpo-42938: Avoid static buffers when computing the repr of |
| 23122 |
:class:`ctypes.c_double` and :class:`ctypes.c_longdouble` values. |
| 23123 |
|
| 23124 |
Core and Builtins |
| 23125 |
----------------- |
| 23126 |
|
| 23127 |
- bpo-42990: Refactor the ``PyEval_`` family of functions. |
| 23128 |
|
| 23129 |
* An new function ``_PyEval_Vector`` is added to simplify calls to Python from C. |
| 23130 |
* ``_PyEval_EvalCodeWithName`` is removed |
| 23131 |
* ``PyEval_EvalCodeEx`` is retained as part of the API, but is not used internally |
| 23132 |
|
| 23133 |
- bpo-38631: Replace :c:func:`Py_FatalError` calls in the compiler with |
| 23134 |
regular :exc:`SystemError` exceptions. Patch by Victor Stinner. |
| 23135 |
|
| 23136 |
- bpo-42997: Improve error message for missing ":" before blocks. Patch by |
| 23137 |
Pablo Galindo. |
| 23138 |
|
| 23139 |
- bpo-43017: Improve error message in the parser when using un-parenthesised |
| 23140 |
tuples in comprehensions. Patch by Pablo Galindo. |
| 23141 |
|
| 23142 |
- bpo-42986: Fix parser crash when reporting syntax errors in f-string with |
| 23143 |
newlines. Patch by Pablo Galindo. |
| 23144 |
|
| 23145 |
- bpo-40176: Syntax errors for unterminated string literals now point to the |
| 23146 |
start of the string instead of reporting EOF/EOL. |
| 23147 |
|
| 23148 |
- bpo-42927: The inline cache for ``LOAD_ATTR`` now also optimizes access to |
| 23149 |
attributes defined by ``__slots__``. This makes reading such attribute up |
| 23150 |
to 30% faster. |
| 23151 |
|
| 23152 |
- bpo-42864: Improve error messages in the parser when parentheses are not |
| 23153 |
closed. Patch by Pablo Galindo. |
| 23154 |
|
| 23155 |
- bpo-42924: Fix ``bytearray`` repetition incorrectly copying data from the |
| 23156 |
start of the buffer, even if the data is offset within the buffer (e.g. |
| 23157 |
after reassigning a slice at the start of the ``bytearray`` to a shorter |
| 23158 |
byte string). |
| 23159 |
|
| 23160 |
- bpo-42882: Fix the :c:func:`!_PyUnicode_FromId` function |
| 23161 |
(_Py_IDENTIFIER(var) API) when :c:func:`Py_Initialize` / |
| 23162 |
:c:func:`Py_Finalize` is called multiple times: preserve |
| 23163 |
``_PyRuntime.unicode_ids.next_index`` value. |
| 23164 |
|
| 23165 |
- bpo-42827: Fix a crash when working out the error line of a |
| 23166 |
:exc:`SyntaxError` in some multi-line expressions. |
| 23167 |
|
| 23168 |
- bpo-42823: frame.f_lineno is correct even if frame.f_trace is set to True |
| 23169 |
|
| 23170 |
Library |
| 23171 |
------- |
| 23172 |
|
| 23173 |
- bpo-37324: Remove deprecated aliases to |
| 23174 |
:ref:`collections-abstract-base-classes` from the :mod:`collections` |
| 23175 |
module. |
| 23176 |
|
| 23177 |
Core and Builtins |
| 23178 |
----------------- |
| 23179 |
|
| 23180 |
- bpo-41994: Fixed possible leak in ``import`` when ``sys.modules`` is not a |
| 23181 |
``dict``. |
| 23182 |
|
| 23183 |
- bpo-27772: In string formatting, preceding the *width* field by ``'0'`` no |
| 23184 |
longer affects the default alignment for strings. |
| 23185 |
|
| 23186 |
Library |
| 23187 |
------- |
| 23188 |
|
| 23189 |
- bpo-43108: Fixed a reference leak in the :mod:`curses` module. Patch by |
| 23190 |
Pablo Galindo |
| 23191 |
|
| 23192 |
- bpo-43077: Update the bundled pip to 21.0.1 and setuptools to 52.0.0. |
| 23193 |
|
| 23194 |
- bpo-41282: Deprecate ``distutils`` in documentation and add warning on |
| 23195 |
import. |
| 23196 |
|
| 23197 |
- bpo-43014: Improve performance of :mod:`tokenize` by 20-30%. Patch by |
| 23198 |
Anthony Sottile. |
| 23199 |
|
| 23200 |
- bpo-42323: Fix :func:`math.nextafter` for NaN on AIX. |
| 23201 |
|
| 23202 |
- bpo-42955: Add :data:`sys.stdlib_module_names`, containing the list of the |
| 23203 |
standard library module names. Patch by Victor Stinner. |
| 23204 |
|
| 23205 |
- bpo-42944: Fix ``random.Random.sample`` when ``counts`` argument is not |
| 23206 |
``None``. |
| 23207 |
|
| 23208 |
- bpo-42934: Use :class:`~traceback.TracebackException`'s new ``compact`` |
| 23209 |
param in :class:`~unittest.TestResult` to reduce time and memory consumed |
| 23210 |
by traceback formatting. |
| 23211 |
|
| 23212 |
- bpo-42931: Add :func:`randbytes` to ``random.__all__``. |
| 23213 |
|
| 23214 |
- bpo-38250: [Enum] Flags consisting of a single bit are now considered |
| 23215 |
canonical, and will be the only flags returned from listing and iterating |
| 23216 |
over a Flag class or a Flag member. Multi-bit flags are considered |
| 23217 |
aliases; they will be returned from lookups and operations that result in |
| 23218 |
their value. Iteration for both Flag and Flag members is in definition |
| 23219 |
order. |
| 23220 |
|
| 23221 |
- bpo-42877: Added the ``compact`` parameter to the constructor of |
| 23222 |
:class:`traceback.TracebackException` to reduce time and memory for use |
| 23223 |
cases that only need to call :func:`TracebackException.format` and |
| 23224 |
:func:`TracebackException.format_exception_only`. |
| 23225 |
|
| 23226 |
- bpo-42923: The :c:func:`Py_FatalError` function and the |
| 23227 |
:mod:`faulthandler` module now dump the list of extension modules on a |
| 23228 |
fatal error. |
| 23229 |
|
| 23230 |
- bpo-42848: Removed recursion from :class:`~traceback.TracebackException` |
| 23231 |
to allow it to handle long exception chains. |
| 23232 |
|
| 23233 |
- bpo-42901: [Enum] move member creation from ``EnumMeta.__new__`` to |
| 23234 |
``_proto_member.__set_name__``, allowing members to be created and visible |
| 23235 |
in ``__init_subclass__``. |
| 23236 |
|
| 23237 |
- bpo-42780: Fix os.set_inheritable() for O_PATH file descriptors on Linux. |
| 23238 |
|
| 23239 |
- bpo-42866: Fix a reference leak in the ``getcodec()`` function of CJK |
| 23240 |
codecs. Patch by Victor Stinner. |
| 23241 |
|
| 23242 |
- bpo-42846: Convert the 6 CJK codec extension modules (_codecs_cn, |
| 23243 |
_codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw) to the |
| 23244 |
multiphase initialization API (:pep:`489`). Patch by Victor Stinner. |
| 23245 |
|
| 23246 |
- bpo-42851: remove __init_subclass__ support for Enum members |
| 23247 |
|
| 23248 |
- bpo-42834: Make internal caches of the ``_json`` module compatible with |
| 23249 |
subinterpreters. |
| 23250 |
|
| 23251 |
- bpo-41748: Fix HTMLParser parsing rules for element attributes containing |
| 23252 |
commas with spaces. Patch by Karl Dubost. |
| 23253 |
|
| 23254 |
- bpo-40810: Require SQLite 3.7.15 or newer. Patch by Erlend E. Aasland. |
| 23255 |
|
| 23256 |
- bpo-1635741: Convert the _multibytecodec extension module (CJK codecs) to |
| 23257 |
multi-phase initialization (:pep:`489`). Patch by Erlend E. Aasland. |
| 23258 |
|
| 23259 |
- bpo-42802: The distutils ``bdist_wininst`` command deprecated in Python |
| 23260 |
3.8 has been removed. The distutils ``bdist_wheel`` command is now |
| 23261 |
recommended to distribute binary packages on Windows. |
| 23262 |
|
| 23263 |
- bpo-24464: The undocumented built-in function |
| 23264 |
``sqlite3.enable_shared_cache`` is now deprecated, scheduled for removal |
| 23265 |
in Python 3.12. Its use is strongly discouraged by the SQLite3 |
| 23266 |
documentation. Patch by Erlend E. Aasland. |
| 23267 |
|
| 23268 |
- bpo-42384: Make pdb populate sys.path[0] exactly the same as regular |
| 23269 |
python execution. |
| 23270 |
|
| 23271 |
- bpo-42383: Fix pdb: previously pdb would fail to restart the debugging |
| 23272 |
target if it was specified using a relative path and the current directory |
| 23273 |
changed. |
| 23274 |
|
| 23275 |
- bpo-42005: Fix CLI of :mod:`cProfile` and :mod:`profile` to catch |
| 23276 |
:exc:`BrokenPipeError`. |
| 23277 |
|
| 23278 |
- bpo-41604: Don't decrement the reference count of the previous user_ptr |
| 23279 |
when set_panel_userptr fails. |
| 23280 |
|
| 23281 |
- bpo-41149: Allow executing callables that have a boolean value of |
| 23282 |
``False`` when passed to :class:`Threading.thread` as the target. Patch |
| 23283 |
contributed by Barney Stratford. |
| 23284 |
|
| 23285 |
- bpo-38307: Add an 'end_lineno' attribute to the Class and Function objects |
| 23286 |
that appear in the tree returned by pyclbr functions. This and the |
| 23287 |
existing 'lineno' attribute define the extent of class and def statements. |
| 23288 |
Patch by Aviral Srivastava. |
| 23289 |
|
| 23290 |
- bpo-39273: The ``BUTTON5_*`` constants are now exposed in the |
| 23291 |
:mod:`curses` module if available. |
| 23292 |
|
| 23293 |
- bpo-33289: Correct call to :mod:`tkinter.colorchooser` to return RGB |
| 23294 |
triplet of ints instead of floats. Patch by Cheryl Sabella. |
| 23295 |
|
| 23296 |
Documentation |
| 23297 |
------------- |
| 23298 |
|
| 23299 |
- bpo-40304: Fix doc for type(name, bases, dict). Patch by Boris |
| 23300 |
Verkhovskiy and Éric Araujo. |
| 23301 |
|
| 23302 |
- bpo-42811: Updated importlib.util.resolve_name() doc to use |
| 23303 |
__spec__.parent instead of __package__. (Thanks Yair Frid.) |
| 23304 |
|
| 23305 |
Tests |
| 23306 |
----- |
| 23307 |
|
| 23308 |
- bpo-40823: Use :meth:`unittest.TestLoader().loadTestsFromTestCase` instead |
| 23309 |
of :meth:`unittest.makeSuite` in :mod:`sqlite3` tests. Patch by Erlend E. |
| 23310 |
Aasland. |
| 23311 |
|
| 23312 |
- bpo-40810: In :mod:`sqlite3`, fix ``CheckTraceCallbackContent`` for SQLite |
| 23313 |
pre 3.7.15. |
| 23314 |
|
| 23315 |
Build |
| 23316 |
----- |
| 23317 |
|
| 23318 |
- bpo-43031: Pass ``--timeout=$(TESTTIMEOUT)`` option to the default profile |
| 23319 |
task ``./python -m test --pgo`` command. |
| 23320 |
|
| 23321 |
- bpo-36143: ``make regen-all`` now also runs ``regen-keyword``. Patch by |
| 23322 |
Victor Stinner. |
| 23323 |
|
| 23324 |
- bpo-42874: Removed the grep -q and -E flags in the tzpath validation |
| 23325 |
section of the configure script to better accommodate users of some |
| 23326 |
platforms (specifically Solaris 10). |
| 23327 |
|
| 23328 |
- bpo-31904: Add library search path by wr-cc in add_cross_compiling_paths() |
| 23329 |
for VxWorks. |
| 23330 |
|
| 23331 |
- bpo-42856: Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` |
| 23332 |
script. If specified, the :mod:`ensurepip` module looks for ``setuptools`` |
| 23333 |
and ``pip`` wheel packages in this directory: if both are present, these |
| 23334 |
wheel packages are used instead of ensurepip bundled wheel packages. |
| 23335 |
|
| 23336 |
Some Linux distribution packaging policies recommend against bundling |
| 23337 |
dependencies. For example, Fedora installs wheel packages in the |
| 23338 |
``/usr/share/python-wheels/`` directory and don't install the |
| 23339 |
``ensurepip._bundled`` package. |
| 23340 |
|
| 23341 |
Windows |
| 23342 |
------- |
| 23343 |
|
| 23344 |
- bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i |
| 23345 |
|
| 23346 |
- bpo-42584: Upgrade Windows installer to use SQLite 3.34.0. |
| 23347 |
|
| 23348 |
macOS |
| 23349 |
----- |
| 23350 |
|
| 23351 |
- bpo-42504: Ensure that the value of |
| 23352 |
sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') is always a string, |
| 23353 |
even in when the value is parsable as an integer. |
| 23354 |
|
| 23355 |
IDLE |
| 23356 |
---- |
| 23357 |
|
| 23358 |
- bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, 2-process |
| 23359 |
mode. Patch by Ken Hilton. |
| 23360 |
|
| 23361 |
- bpo-33065: Fix problem debugging user classes with __repr__ method. |
| 23362 |
|
| 23363 |
- bpo-23544: Disable Debug=>Stack Viewer when user code is running or |
| 23364 |
Debugger is active, to prevent hang or crash. Patch by Zackery Spytz. |
| 23365 |
|
| 23366 |
- bpo-32631: Finish zzdummy example extension module: make menu entries |
| 23367 |
work; add docstrings and tests with 100% coverage. |
| 23368 |
|
| 23369 |
C API |
| 23370 |
----- |
| 23371 |
|
| 23372 |
- bpo-42979: When Python is built in debug mode (with C assertions), calling |
| 23373 |
a type slot like ``sq_length`` (``__len__()`` in Python) now fails with a |
| 23374 |
fatal error if the slot succeeded with an exception set, or failed with no |
| 23375 |
exception set. The error message contains the slot, the type name, and the |
| 23376 |
current exception (if an exception is set). Patch by Victor Stinner. |
| 23377 |
|
| 23378 |
- bpo-43030: Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on |
| 23379 |
platforms with signed :c:type:`wchar_t`. |
| 23380 |
|
| 23381 |
|
| 23382 |
What's New in Python 3.10.0 alpha 4? |
| 23383 |
==================================== |
| 23384 |
|
| 23385 |
*Release date: 2021-01-04* |
| 23386 |
|
| 23387 |
Core and Builtins |
| 23388 |
----------------- |
| 23389 |
|
| 23390 |
- bpo-42814: Fix undefined behavior in ``Objects/genericaliasobject.c``. |
| 23391 |
|
| 23392 |
- bpo-42806: Fix the column offsets for f-strings :mod:`ast` nodes |
| 23393 |
surrounded by parentheses and for nodes that spawn multiple lines. Patch |
| 23394 |
by Pablo Galindo. |
| 23395 |
|
| 23396 |
- bpo-40631: Fix regression where a single parenthesized starred expression |
| 23397 |
was a valid assignment target. |
| 23398 |
|
| 23399 |
- bpo-27794: Improve the error message for failed writes/deletes to property |
| 23400 |
objects. When possible, the attribute name is now shown. Patch provided by |
| 23401 |
Yurii Karabas. |
| 23402 |
|
| 23403 |
- bpo-42745: Make the type attribute lookup cache per-interpreter. Patch by |
| 23404 |
Victor Stinner. |
| 23405 |
|
| 23406 |
- bpo-42246: Jumps to jumps are not eliminated when it would break PEP 626. |
| 23407 |
|
| 23408 |
- bpo-42246: Make sure that the ``f_lasti`` and ``f_lineno`` attributes of a |
| 23409 |
frame are set correctly when an exception is raised or re-raised. Required |
| 23410 |
for PEP 626. |
| 23411 |
|
| 23412 |
- bpo-32381: The coding cookie (ex: ``# coding: latin1``) is now ignored in |
| 23413 |
the command passed to the :option:`-c` command line option. Patch by |
| 23414 |
Victor Stinner. |
| 23415 |
|
| 23416 |
- bpo-30858: Improve error location in expressions that contain assignments. |
| 23417 |
Patch by Pablo Galindo and Lysandros Nikolaou. |
| 23418 |
|
| 23419 |
- bpo-42615: Remove jump commands made redundant by the deletion of |
| 23420 |
unreachable bytecode blocks |
| 23421 |
|
| 23422 |
Library |
| 23423 |
------- |
| 23424 |
|
| 23425 |
- bpo-42639: Make the :mod:`atexit` module state per-interpreter. It is now |
| 23426 |
safe have more than one :mod:`atexit` module instance. Patch by Donghee Na |
| 23427 |
and Victor Stinner. |
| 23428 |
|
| 23429 |
Core and Builtins |
| 23430 |
----------------- |
| 23431 |
|
| 23432 |
- bpo-32381: Fix encoding name when running a ``.pyc`` file on Windows: |
| 23433 |
:c:func:`PyRun_SimpleFileExFlags()` now uses the correct encoding to |
| 23434 |
decode the filename. |
| 23435 |
|
| 23436 |
Library |
| 23437 |
------- |
| 23438 |
|
| 23439 |
- bpo-42195: The ``__args__`` of the parameterized generics for |
| 23440 |
:data:`typing.Callable` and :class:`collections.abc.Callable` are now |
| 23441 |
consistent. The ``__args__`` for :class:`collections.abc.Callable` are |
| 23442 |
now flattened while :data:`typing.Callable`'s have not changed. To allow |
| 23443 |
this change, :class:`types.GenericAlias` can now be subclassed and |
| 23444 |
``collections.abc.Callable``'s ``__class_getitem__`` will now return a |
| 23445 |
subclass of ``types.GenericAlias``. Tests for typing were also updated to |
| 23446 |
not subclass things like ``Callable[..., T]`` as that is not a valid base |
| 23447 |
class. Finally, both ``Callable``\ s no longer validate their |
| 23448 |
``argtypes``, in ``Callable[[argtypes], resulttype]`` to prepare for |
| 23449 |
:pep:`612`. Patch by Ken Jin. |
| 23450 |
|
| 23451 |
- bpo-40137: Convert functools module to use |
| 23452 |
:c:func:`PyType_FromModuleAndSpec`. |
| 23453 |
|
| 23454 |
- bpo-40077: Convert :mod:`array` to use heap types, and establish module |
| 23455 |
state for these. |
| 23456 |
|
| 23457 |
- bpo-42008: Fix _random.Random() seeding. |
| 23458 |
|
| 23459 |
- bpo-1635741: Port the :mod:`pyexpat` extension module to multi-phase |
| 23460 |
initialization (:pep:`489`). |
| 23461 |
|
| 23462 |
Core and Builtins |
| 23463 |
----------------- |
| 23464 |
|
| 23465 |
- bpo-40521: Make the Unicode dictionary of interned strings compatible with |
| 23466 |
subinterpreters. Patch by Victor Stinner. |
| 23467 |
|
| 23468 |
- bpo-39465: Make :c:func:`!_PyUnicode_FromId` function compatible with |
| 23469 |
subinterpreters. Each interpreter now has an array of identifier objects |
| 23470 |
(interned strings decoded from UTF-8). Patch by Victor Stinner. |
| 23471 |
|
| 23472 |
Library |
| 23473 |
------- |
| 23474 |
|
| 23475 |
- bpo-42257: Handle empty string in variable executable in |
| 23476 |
platform.libc_ver() |
| 23477 |
|
| 23478 |
- bpo-42772: randrange() now raises a TypeError when step is specified |
| 23479 |
without a stop argument. Formerly, it silently ignored the step argument. |
| 23480 |
|
| 23481 |
- bpo-42759: Fixed equality comparison of :class:`tkinter.Variable` and |
| 23482 |
:class:`tkinter.font.Font`. Objects which belong to different Tcl |
| 23483 |
interpreters are now always different, even if they have the same name. |
| 23484 |
|
| 23485 |
- bpo-42756: Configure LMTP Unix-domain socket to use socket global default |
| 23486 |
timeout when a timeout is not explicitly provided. |
| 23487 |
|
| 23488 |
- bpo-23328: Allow / character in username, password fields on _PROXY |
| 23489 |
envars. |
| 23490 |
|
| 23491 |
- bpo-42740: :func:`typing.get_args` and :func:`typing.get_origin` now |
| 23492 |
support :pep:`604` union types and :pep:`612` additions to ``Callable``. |
| 23493 |
|
| 23494 |
- bpo-42655: :mod:`subprocess` *extra_groups* is now correctly passed into |
| 23495 |
setgroups() system call. |
| 23496 |
|
| 23497 |
- bpo-42727: ``EnumMeta.__prepare__`` now accepts ``**kwds`` to properly |
| 23498 |
support ``__init_subclass__`` |
| 23499 |
|
| 23500 |
- bpo-38308: Add optional *weights* to *statistics.harmonic_mean()*. |
| 23501 |
|
| 23502 |
- bpo-42721: When simple query dialogs (:mod:`tkinter.simpledialog`), |
| 23503 |
message boxes (:mod:`tkinter.messagebox`) or color choose dialog |
| 23504 |
(:mod:`tkinter.colorchooser`) are created without arguments *master* and |
| 23505 |
*parent*, and the default root window is not yet created, and |
| 23506 |
:func:`~tkinter.NoDefaultRoot` was not called, a new temporal hidden root |
| 23507 |
window will be created automatically. It will not be set as the default |
| 23508 |
root window and will be destroyed right after closing the dialog window. |
| 23509 |
It will help to use these simple dialog windows in programs which do not |
| 23510 |
need other GUI. |
| 23511 |
|
| 23512 |
- bpo-25246: Optimized :meth:`collections.deque.remove`. |
| 23513 |
|
| 23514 |
- bpo-35728: Added a root parameter to :func:`tkinter.font.nametofont`. |
| 23515 |
|
| 23516 |
- bpo-15303: :mod:`tkinter` supports now widgets with boolean value False. |
| 23517 |
|
| 23518 |
- bpo-42681: Fixed range checks for color and pair numbers in :mod:`curses`. |
| 23519 |
|
| 23520 |
- bpo-42685: Improved placing of simple query windows in Tkinter (such as |
| 23521 |
:func:`tkinter.simpledialog.askinteger`). They are now centered at the |
| 23522 |
center of the parent window if it is specified and shown, otherwise at the |
| 23523 |
center of the screen. |
| 23524 |
|
| 23525 |
- bpo-9694: Argparse help no longer uses the confusing phrase, "optional |
| 23526 |
arguments". It uses "options" instead. |
| 23527 |
|
| 23528 |
- bpo-1635741: Port the :mod:`!_thread` extension module to the multiphase |
| 23529 |
initialization API (:pep:`489`) and convert its static types to heap |
| 23530 |
types. |
| 23531 |
|
| 23532 |
- bpo-37961: Fix crash in :func:`tracemalloc.Traceback.__repr__` (regressed |
| 23533 |
in Python 3.9). |
| 23534 |
|
| 23535 |
- bpo-42630: :mod:`tkinter` functions and constructors which need a default |
| 23536 |
root window raise now :exc:`RuntimeError` with descriptive message instead |
| 23537 |
of obscure :exc:`AttributeError` or :exc:`NameError` if it is not created |
| 23538 |
yet or cannot be created automatically. |
| 23539 |
|
| 23540 |
- bpo-42639: :func:`atexit._run_exitfuncs` now logs callback exceptions |
| 23541 |
using :data:`sys.unraisablehook`, rather than logging them directly into |
| 23542 |
:data:`sys.stderr` and raise the last exception. |
| 23543 |
|
| 23544 |
- bpo-42644: ``logging.disable`` will now validate the types and value of |
| 23545 |
its parameter. It also now accepts strings representing the levels (as |
| 23546 |
does ``logging.setLevel``) instead of only the numerical values. |
| 23547 |
|
| 23548 |
- bpo-42639: At Python exit, if a callback registered with |
| 23549 |
:func:`atexit.register` fails, its exception is now logged. Previously, |
| 23550 |
only some exceptions were logged, and the last exception was always |
| 23551 |
silently ignored. |
| 23552 |
|
| 23553 |
- bpo-36541: Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only |
| 23554 |
argument syntax. |
| 23555 |
|
| 23556 |
- bpo-42382: In ``importlib.metadata``: - ``EntryPoint`` objects now expose |
| 23557 |
a ``.dist`` object referencing the ``Distribution`` when constructed from |
| 23558 |
a ``Distribution``. - Add support for package discovery under package |
| 23559 |
normalization rules. - The object returned by ``metadata()`` now has a |
| 23560 |
formally defined protocol called ``PackageMetadata`` with declared support |
| 23561 |
for the ``.get_all()`` method. - Synced with importlib_metadata 3.3. |
| 23562 |
|
| 23563 |
- bpo-41877: A check is added against misspellings of autospect, auto_spec |
| 23564 |
and set_spec being passed as arguments to patch, patch.object and |
| 23565 |
create_autospec. |
| 23566 |
|
| 23567 |
- bpo-39717: [tarfile] update nested exception raising to use ``from None`` |
| 23568 |
or ``from e`` |
| 23569 |
|
| 23570 |
- bpo-41877: AttributeError for suspected misspellings of assertions on |
| 23571 |
mocks are now pointing out that the cause are misspelled assertions and |
| 23572 |
also what to do if the misspelling is actually an intended attribute name. |
| 23573 |
The unittest.mock document is also updated to reflect the current set of |
| 23574 |
recognised misspellings. |
| 23575 |
|
| 23576 |
- bpo-41559: Implemented :pep:`612`: added ``ParamSpec`` and ``Concatenate`` |
| 23577 |
to :mod:`typing`. Patch by Ken Jin. |
| 23578 |
|
| 23579 |
- bpo-42385: StrEnum: fix _generate_next_value_ to return a str |
| 23580 |
|
| 23581 |
- bpo-31904: Define THREAD_STACK_SIZE for VxWorks. |
| 23582 |
|
| 23583 |
- bpo-34750: [Enum] ``_EnumDict.update()`` is now supported. |
| 23584 |
|
| 23585 |
- bpo-42517: Enum: private names do not become members / do not generate |
| 23586 |
errors -- they remain normal attributes |
| 23587 |
|
| 23588 |
- bpo-42678: ``Enum``: call ``__init_subclass__`` after members have been |
| 23589 |
added |
| 23590 |
|
| 23591 |
- bpo-28964: :func:`ast.literal_eval` adds line number information (if |
| 23592 |
available) in error message for malformed nodes. |
| 23593 |
|
| 23594 |
- bpo-42470: :func:`random.sample` no longer warns on a sequence which is |
| 23595 |
also a set. |
| 23596 |
|
| 23597 |
- bpo-31904: :func:`posixpath.expanduser` returns the input *path* unchanged |
| 23598 |
if user home directory is None on VxWorks. |
| 23599 |
|
| 23600 |
- bpo-42388: Fix subprocess.check_output(..., input=None) behavior when |
| 23601 |
text=True to be consistent with that of the documentation and |
| 23602 |
universal_newlines=True. |
| 23603 |
|
| 23604 |
- bpo-34463: Fixed discrepancy between :mod:`traceback` and the interpreter |
| 23605 |
in formatting of SyntaxError with lineno not set (:mod:`traceback` was |
| 23606 |
changed to match interpreter). |
| 23607 |
|
| 23608 |
- bpo-42393: Raise :exc:`OverflowError` instead of silent truncation in |
| 23609 |
:meth:`socket.ntohs` and :meth:`socket.htons`. Silent truncation was |
| 23610 |
deprecated in Python 3.7. Patch by Erlend E. Aasland |
| 23611 |
|
| 23612 |
- bpo-42222: Harmonized :func:`random.randrange` argument handling to match |
| 23613 |
:func:`range`. |
| 23614 |
|
| 23615 |
* The integer test and conversion in ``randrange()`` now uses |
| 23616 |
:func:`operator.index`. |
| 23617 |
* Non-integer arguments to ``randrange()`` are deprecated. |
| 23618 |
* The ``ValueError`` is deprecated in favor of a ``TypeError``. |
| 23619 |
* It now runs a little faster than before. |
| 23620 |
|
| 23621 |
(Contributed by Raymond Hettinger and Serhiy Storchaka.) |
| 23622 |
|
| 23623 |
- bpo-42163: Restore compatibility for ``uname_result`` around deepcopy and |
| 23624 |
_replace. |
| 23625 |
|
| 23626 |
- bpo-42090: ``zipfile.Path.joinpath`` now accepts arbitrary arguments, same |
| 23627 |
as ``pathlib.Path.joinpath``. |
| 23628 |
|
| 23629 |
- bpo-1635741: Port the _csv module to the multi-phase initialization API |
| 23630 |
(:pep:`489`). |
| 23631 |
|
| 23632 |
- bpo-42059: :class:`typing.TypedDict` types created using the alternative |
| 23633 |
call-style syntax now correctly respect the ``total`` keyword argument |
| 23634 |
when setting their ``__required_keys__`` and ``__optional_keys__`` class |
| 23635 |
attributes. |
| 23636 |
|
| 23637 |
- bpo-41960: Add ``globalns`` and ``localns`` parameters to the |
| 23638 |
:func:`inspect.signature` and :meth:`inspect.Signature.from_callable`. |
| 23639 |
|
| 23640 |
- bpo-41907: fix ``format()`` behavior for ``IntFlag`` |
| 23641 |
|
| 23642 |
- bpo-41891: Ensure asyncio.wait_for waits for task completion |
| 23643 |
|
| 23644 |
- bpo-24792: Fixed bug where :mod:`zipimporter` sometimes reports an |
| 23645 |
incorrect cause of import errors. |
| 23646 |
|
| 23647 |
- bpo-31904: Fix site and sysconfig modules for VxWorks RTOS which has no |
| 23648 |
home directories. |
| 23649 |
|
| 23650 |
- bpo-41462: Add :func:`os.set_blocking` support for VxWorks RTOS. |
| 23651 |
|
| 23652 |
- bpo-40219: Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to |
| 23653 |
prevent hiding part of the content label. |
| 23654 |
|
| 23655 |
- bpo-37193: Fixed memory leak in ``socketserver.ThreadingMixIn`` introduced |
| 23656 |
in Python 3.7. |
| 23657 |
|
| 23658 |
- bpo-39068: Fix initialization race condition in :func:`a85encode` and |
| 23659 |
:func:`b85encode` in :mod:`base64`. Patch by Brandon Stansbury. |
| 23660 |
|
| 23661 |
Documentation |
| 23662 |
------------- |
| 23663 |
|
| 23664 |
- bpo-17140: Add documentation for the |
| 23665 |
:class:`multiprocessing.pool.ThreadPool` class. |
| 23666 |
|
| 23667 |
- bpo-34398: Prominently feature listings from the glossary in documentation |
| 23668 |
search results. Patch by Ammar Askar. |
| 23669 |
|
| 23670 |
Tests |
| 23671 |
----- |
| 23672 |
|
| 23673 |
- bpo-42794: Update test_nntplib to use official group name of news.aioe.org |
| 23674 |
for testing. Patch by Donghee Na. |
| 23675 |
|
| 23676 |
- bpo-31904: Skip some asyncio tests on VxWorks. |
| 23677 |
|
| 23678 |
- bpo-42641: Enhance ``test_select.test_select()``: it now takes 500 |
| 23679 |
milliseconds rather than 10 seconds. Use Python rather than a shell to |
| 23680 |
make the test more portable. |
| 23681 |
|
| 23682 |
- bpo-31904: Skip some tests in _test_all_chown_common() on VxWorks. |
| 23683 |
|
| 23684 |
- bpo-42199: Fix bytecode helper assertNotInBytecode. |
| 23685 |
|
| 23686 |
- bpo-41443: Add more attribute checking in test_posix.py |
| 23687 |
|
| 23688 |
- bpo-31904: Disable os.popen and impacted tests on VxWorks |
| 23689 |
|
| 23690 |
- bpo-41439: Port test_ssl and test_uuid to VxWorks RTOS. |
| 23691 |
|
| 23692 |
Build |
| 23693 |
----- |
| 23694 |
|
| 23695 |
- bpo-42692: Fix __builtin_available check on older compilers. Patch by |
| 23696 |
Joshua Root. |
| 23697 |
|
| 23698 |
- bpo-27640: Added ``--disable-test-modules`` option to the ``configure`` |
| 23699 |
script: don't build nor install test modules. Patch by Xavier de Gaye, |
| 23700 |
Thomas Petazzoni and Peixing Xin. |
| 23701 |
|
| 23702 |
- bpo-42604: Now all platforms use a value for the "EXT_SUFFIX" build |
| 23703 |
variable derived from SOABI (for instance in freeBSD, "EXT_SUFFIX" is now |
| 23704 |
".cpython-310d.so" instead of ".so"). Previously only Linux, Mac and |
| 23705 |
VxWorks were using a value for "EXT_SUFFIX" that included "SOABI". |
| 23706 |
|
| 23707 |
- bpo-42598: Fix implicit function declarations in configure which could |
| 23708 |
have resulted in incorrect configuration checks. Patch contributed by |
| 23709 |
Joshua Root. |
| 23710 |
|
| 23711 |
- bpo-31904: Enable libpython3.so for VxWorks. |
| 23712 |
|
| 23713 |
- bpo-29076: Add fish shell support to macOS installer. |
| 23714 |
|
| 23715 |
macOS |
| 23716 |
----- |
| 23717 |
|
| 23718 |
- bpo-42361: Update macOS installer build to use Tcl/Tk 8.6.11 (rc2, |
| 23719 |
expected to be final release). |
| 23720 |
|
| 23721 |
- bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i. |
| 23722 |
|
| 23723 |
- bpo-42584: Update macOS installer to use SQLite 3.34.0. |
| 23724 |
|
| 23725 |
Tools/Demos |
| 23726 |
----------- |
| 23727 |
|
| 23728 |
- bpo-42726: Fixed Python 3 compatibility issue with gdb/libpython.py |
| 23729 |
handling of attribute dictionaries. |
| 23730 |
|
| 23731 |
- bpo-42613: Fix ``freeze.py`` tool to use the prope config and library |
| 23732 |
directories. Patch by Victor Stinner. |
| 23733 |
|
| 23734 |
C API |
| 23735 |
----- |
| 23736 |
|
| 23737 |
- bpo-42591: Export the :c:func:`Py_FrozenMain` function: fix a Python 3.9.0 |
| 23738 |
regression. Python 3.9 uses ``-fvisibility=hidden`` and the function was |
| 23739 |
not exported explicitly and so not exported. |
| 23740 |
|
| 23741 |
- bpo-32381: Remove the private :c:func:`!_Py_fopen` function which is no |
| 23742 |
longer needed. Use :c:func:`!_Py_wfopen` or :c:func:`!_Py_fopen_obj` |
| 23743 |
instead. Patch by Victor Stinner. |
| 23744 |
|
| 23745 |
- bpo-1635741: Port :mod:`resource` extension module to module state |
| 23746 |
|
| 23747 |
- bpo-42111: Update the ``xxlimited`` module to be a better example of how |
| 23748 |
to use the limited C API. |
| 23749 |
|
| 23750 |
- bpo-40052: Fix an alignment build warning/error in function |
| 23751 |
``PyVectorcall_Function()``. Patch by Andreas Schneider, Antoine Pitrou |
| 23752 |
and Petr Viktorin. |
| 23753 |
|
| 23754 |
|
| 23755 |
What's New in Python 3.10.0 alpha 3? |
| 23756 |
==================================== |
| 23757 |
|
| 23758 |
*Release date: 2020-12-07* |
| 23759 |
|
| 23760 |
Security |
| 23761 |
-------- |
| 23762 |
|
| 23763 |
- bpo-40791: Add ``volatile`` to the accumulator variable in |
| 23764 |
``hmac.compare_digest``, making constant-time-defeating optimizations less |
| 23765 |
likely. |
| 23766 |
|
| 23767 |
Core and Builtins |
| 23768 |
----------------- |
| 23769 |
|
| 23770 |
- bpo-42576: ``types.GenericAlias`` will now raise a ``TypeError`` when |
| 23771 |
attempting to initialize with a keyword argument. Previously, this would |
| 23772 |
cause the interpreter to crash if the interpreter was compiled with debug |
| 23773 |
symbols. This does not affect interpreters compiled for release. Patch by |
| 23774 |
Ken Jin. |
| 23775 |
|
| 23776 |
- bpo-42536: Several built-in and standard library types now ensure that |
| 23777 |
their internal result tuples are always tracked by the :term:`garbage |
| 23778 |
collector <garbage collection>`: |
| 23779 |
|
| 23780 |
- :meth:`collections.OrderedDict.items() <collections.OrderedDict>` |
| 23781 |
|
| 23782 |
- :meth:`dict.items` |
| 23783 |
|
| 23784 |
- :func:`enumerate` |
| 23785 |
|
| 23786 |
- :func:`functools.reduce` |
| 23787 |
|
| 23788 |
- :func:`itertools.combinations` |
| 23789 |
|
| 23790 |
- :func:`itertools.combinations_with_replacement` |
| 23791 |
|
| 23792 |
- :func:`itertools.permutations` |
| 23793 |
|
| 23794 |
- :func:`itertools.product` |
| 23795 |
|
| 23796 |
- :func:`itertools.zip_longest` |
| 23797 |
|
| 23798 |
- :func:`zip` |
| 23799 |
|
| 23800 |
Previously, they could have become untracked by a prior garbage |
| 23801 |
collection. Patch by Brandt Bucher. |
| 23802 |
|
| 23803 |
- bpo-42500: Improve handling of exceptions near recursion limit. Converts a |
| 23804 |
number of Fatal Errors in RecursionErrors. |
| 23805 |
|
| 23806 |
- bpo-42246: PEP 626: After a return, the f_lineno attribute of a frame is |
| 23807 |
always the last line executed. |
| 23808 |
|
| 23809 |
- bpo-42435: Speed up comparison of bytes objects with non-bytes objects |
| 23810 |
when option :option:`-b` is specified. Speed up comparison of bytarray |
| 23811 |
objects with non-buffer object. |
| 23812 |
|
| 23813 |
Library |
| 23814 |
------- |
| 23815 |
|
| 23816 |
- bpo-1635741: Port the ``_warnings`` extension module to the multi-phase |
| 23817 |
initialization API (:pep:`489`). Patch by Victor Stinner. |
| 23818 |
|
| 23819 |
Core and Builtins |
| 23820 |
----------------- |
| 23821 |
|
| 23822 |
- bpo-41686: On Windows, the ``SIGINT`` event, ``_PyOS_SigintEvent()``, is |
| 23823 |
now created even if Python is configured to not install signal handlers |
| 23824 |
(if :c:member:`PyConfig.install_signal_handlers` equals to 0, or |
| 23825 |
``Py_InitializeEx(0)``). |
| 23826 |
|
| 23827 |
- bpo-42381: Allow assignment expressions in set literals and set |
| 23828 |
comprehensions as per PEP 572. Patch by Pablo Galindo. |
| 23829 |
|
| 23830 |
- bpo-42202: Change function parameters annotations internal representation |
| 23831 |
to tuple of strings. Patch provided by Yurii Karabas. |
| 23832 |
|
| 23833 |
- bpo-42374: Fix a regression introduced by the new parser, where an |
| 23834 |
unparenthesized walrus operator was not allowed within generator |
| 23835 |
expressions. |
| 23836 |
|
| 23837 |
- bpo-42316: Allow an unparenthesized walrus in subscript indexes. |
| 23838 |
|
| 23839 |
- bpo-42349: Make sure that the compiler front-end produces a well-formed |
| 23840 |
control flow graph. Be more aggressive in the compiler back-end, as it is |
| 23841 |
now safe to do so. |
| 23842 |
|
| 23843 |
- bpo-42296: On Windows, fix a regression in signal handling which prevented |
| 23844 |
to interrupt a program using CTRL+C. The signal handler can be run in a |
| 23845 |
thread different than the Python thread, in which case the test deciding |
| 23846 |
if the thread can handle signals is wrong. |
| 23847 |
|
| 23848 |
- bpo-42332: :class:`types.GenericAlias` objects can now be the targets of |
| 23849 |
weakrefs. |
| 23850 |
|
| 23851 |
- bpo-42282: Optimise constant subexpressions that appear as part of named |
| 23852 |
expressions (previously the AST optimiser did not descend into named |
| 23853 |
expressions). Patch by Nick Coghlan. |
| 23854 |
|
| 23855 |
- bpo-42266: Fixed a bug with the LOAD_ATTR opcode cache that was not |
| 23856 |
respecting monkey-patching a class-level attribute to make it a |
| 23857 |
descriptor. Patch by Pablo Galindo. |
| 23858 |
|
| 23859 |
Library |
| 23860 |
------- |
| 23861 |
|
| 23862 |
- bpo-40077: Convert :mod:`queue` to use heap types. |
| 23863 |
|
| 23864 |
Core and Builtins |
| 23865 |
----------------- |
| 23866 |
|
| 23867 |
- bpo-42246: Improved accuracy of line tracing events and f_lineno attribute |
| 23868 |
of Frame objects. See PEP 626 for details. |
| 23869 |
|
| 23870 |
Library |
| 23871 |
------- |
| 23872 |
|
| 23873 |
- bpo-40077: Convert :mod:`mmap` to use heap types. |
| 23874 |
|
| 23875 |
Core and Builtins |
| 23876 |
----------------- |
| 23877 |
|
| 23878 |
- bpo-42233: Allow ``GenericAlias`` objects to use :ref:`union type |
| 23879 |
expressions <types-union>`. This allows expressions like ``list[int] | |
| 23880 |
dict[float, str]`` where previously a ``TypeError`` would have been |
| 23881 |
thrown. This also fixes union type expressions not de-duplicating |
| 23882 |
``GenericAlias`` objects. (Contributed by Ken Jin in :issue:`42233`.) |
| 23883 |
|
| 23884 |
- bpo-26131: The import system triggers a ``ImportWarning`` when it falls |
| 23885 |
back to using ``load_module()``. |
| 23886 |
|
| 23887 |
Library |
| 23888 |
------- |
| 23889 |
|
| 23890 |
- bpo-5054: CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed. |
| 23891 |
Replace the special purpose getallmatchingheaders with generic get_all |
| 23892 |
method and add relevant tests. |
| 23893 |
|
| 23894 |
Original Patch by Martin Panter. Modified by Senthil Kumaran. |
| 23895 |
|
| 23896 |
- bpo-42562: Fix issue when dis failed to parse function that has no line |
| 23897 |
numbers. Patch provided by Yurii Karabas. |
| 23898 |
|
| 23899 |
- bpo-17735: :func:`inspect.findsource` now raises :exc:`OSError` instead of |
| 23900 |
:exc:`IndexError` when :attr:`co_lineno` of a code object is greater than |
| 23901 |
the file length. This can happen, for example, when a file is edited after |
| 23902 |
it was imported. PR by Irit Katriel. |
| 23903 |
|
| 23904 |
- bpo-42116: Fix handling of trailing comments by :func:`inspect.getsource`. |
| 23905 |
|
| 23906 |
- bpo-42532: Remove unexpected call of ``__bool__`` when passing a |
| 23907 |
``spec_arg`` argument to a Mock. |
| 23908 |
|
| 23909 |
- bpo-38200: Added itertools.pairwise() |
| 23910 |
|
| 23911 |
- bpo-41818: Fix test_master_read() so that it succeeds on all platforms |
| 23912 |
that either raise OSError or return b"" upon reading from master. |
| 23913 |
|
| 23914 |
- bpo-42487: ChainMap.__iter__ no longer calls __getitem__ on underlying |
| 23915 |
maps |
| 23916 |
|
| 23917 |
- bpo-42482: :class:`~traceback.TracebackException` no longer holds a |
| 23918 |
reference to the exception's traceback object. Consequently, instances of |
| 23919 |
TracebackException for equivalent but non-equal exceptions now compare as |
| 23920 |
equal. |
| 23921 |
|
| 23922 |
- bpo-41818: Make test_openpty() avoid unexpected success due to number of |
| 23923 |
rows and/or number of columns being == 0. |
| 23924 |
|
| 23925 |
- bpo-42392: Remove loop parameter from ``asyncio.subprocess`` and |
| 23926 |
``asyncio.tasks`` functions. Patch provided by Yurii Karabas. |
| 23927 |
|
| 23928 |
- bpo-42392: Remove loop parameter from ``asyncio.open_connection`` and |
| 23929 |
``asyncio.start_server`` functions. Patch provided by Yurii Karabas. |
| 23930 |
|
| 23931 |
- bpo-28468: Add :func:`platform.freedesktop_os_release` function to parse |
| 23932 |
freedesktop.org ``os-release`` files. |
| 23933 |
|
| 23934 |
- bpo-42299: Removed the ``formatter`` module, which was deprecated in |
| 23935 |
Python 3.4. It is somewhat obsolete, little used, and not tested. It was |
| 23936 |
originally scheduled to be removed in Python 3.6, but such removals were |
| 23937 |
delayed until after Python 2.7 EOL. Existing users should copy whatever |
| 23938 |
classes they use into their code. Patch by Donghee Na and and Terry J. |
| 23939 |
Reedy. |
| 23940 |
|
| 23941 |
- bpo-26131: Deprecate zipimport.zipimporter.load_module() in favour of |
| 23942 |
exec_module(). |
| 23943 |
|
| 23944 |
- bpo-41818: Updated tests for the pty library. test_basic() has been |
| 23945 |
changed to test_openpty(); this additionally checks if slave termios and |
| 23946 |
slave winsize are being set properly by pty.openpty(). In order to add |
| 23947 |
support for FreeBSD, NetBSD, OpenBSD, and Darwin, this also adds |
| 23948 |
test_master_read(), which demonstrates that pty.spawn() should not depend |
| 23949 |
on an OSError to exit from its copy loop. |
| 23950 |
|
| 23951 |
- bpo-42392: Remove loop parameter from ``__init__`` in all |
| 23952 |
``asyncio.locks`` and ``asyncio.Queue`` classes. Patch provided by Yurii |
| 23953 |
Karabas. |
| 23954 |
|
| 23955 |
- bpo-15450: Make :class:`filecmp.dircmp` respect subclassing. Now the |
| 23956 |
:attr:`filecmp.dircmp.subdirs` behaves as expected when subclassing |
| 23957 |
dircmp. |
| 23958 |
|
| 23959 |
- bpo-42413: The exception :exc:`socket.timeout` is now an alias of |
| 23960 |
:exc:`TimeoutError`. |
| 23961 |
|
| 23962 |
- bpo-31904: Support signal module on VxWorks. |
| 23963 |
|
| 23964 |
- bpo-42406: We fixed an issue in ``pickle.whichmodule`` in which importing |
| 23965 |
``multiprocessing`` could change the how pickle identifies which module an |
| 23966 |
object belongs to, potentially breaking the unpickling of those objects. |
| 23967 |
|
| 23968 |
- bpo-42403: Simplify the :mod:`importlib` external bootstrap code: |
| 23969 |
``importlib._bootstrap_external`` now uses regular imports to import |
| 23970 |
builtin modules. When it is imported, the builtin :func:`__import__` |
| 23971 |
function is already fully working and so can be used to import builtin |
| 23972 |
modules like :mod:`sys`. Patch by Victor Stinner. |
| 23973 |
|
| 23974 |
- bpo-1635741: Convert _sre module types to heap types (PEP 384). Patch by |
| 23975 |
Erlend E. Aasland. |
| 23976 |
|
| 23977 |
- bpo-42375: subprocess module update for DragonFlyBSD support. |
| 23978 |
|
| 23979 |
- bpo-41713: Port the ``_signal`` extension module to the multi-phase |
| 23980 |
initialization API (:pep:`489`). Patch by Victor Stinner and Mohamed |
| 23981 |
Koubaa. |
| 23982 |
|
| 23983 |
- bpo-37205: :func:`time.time`, :func:`time.perf_counter` and |
| 23984 |
:func:`time.monotonic` functions can no longer fail with a Python fatal |
| 23985 |
error, instead raise a regular Python exception on failure. |
| 23986 |
|
| 23987 |
- bpo-42328: Fixed :meth:`tkinter.ttk.Style.map`. The function accepts now |
| 23988 |
the representation of the default state as empty sequence (as returned by |
| 23989 |
``Style.map()``). The structure of the result is now the same on all |
| 23990 |
platform and does not depend on the value of ``wantobjects``. |
| 23991 |
|
| 23992 |
- bpo-42345: Fix various issues with ``typing.Literal`` parameter handling |
| 23993 |
(flatten, deduplicate, use type to cache key). Patch provided by Yurii |
| 23994 |
Karabas. |
| 23995 |
|
| 23996 |
- bpo-37205: :func:`time.perf_counter` on Windows and :func:`time.monotonic` |
| 23997 |
on macOS are now system-wide. Previously, they used an offset computed at |
| 23998 |
startup to reduce the precision loss caused by the float type. Use |
| 23999 |
:func:`time.perf_counter_ns` and :func:`time.monotonic_ns` added in Python |
| 24000 |
3.7 to avoid this precision loss. |
| 24001 |
|
| 24002 |
- bpo-42318: Fixed support of non-BMP characters in :mod:`tkinter` on macOS. |
| 24003 |
|
| 24004 |
- bpo-42350: Fix the :class:`threading.Thread` class at fork: do nothing if |
| 24005 |
the thread is already stopped (ex: fork called at Python exit). |
| 24006 |
Previously, an error was logged in the child process. |
| 24007 |
|
| 24008 |
- bpo-42333: Port _ssl extension module to heap types. |
| 24009 |
|
| 24010 |
- bpo-42014: The ``onerror`` callback from ``shutil.rmtree`` now receives |
| 24011 |
correct function when ``os.open`` fails. |
| 24012 |
|
| 24013 |
- bpo-42237: Fix ``os.sendfile()`` on illumos. |
| 24014 |
|
| 24015 |
- bpo-42308: Add :data:`threading.__excepthook__` to allow retrieving the |
| 24016 |
original value of :func:`threading.excepthook` in case it is set to a |
| 24017 |
broken or a different value. Patch by Mario Corchero. |
| 24018 |
|
| 24019 |
- bpo-42131: Implement PEP 451/spec methods on zipimport.zipimporter: |
| 24020 |
find_spec(), create_module(), and exec_module(). |
| 24021 |
|
| 24022 |
This also allows for the documented deprecation of find_loader(), |
| 24023 |
find_module(), and load_module(). |
| 24024 |
|
| 24025 |
- bpo-41877: Mock objects which are not unsafe will now raise an |
| 24026 |
AttributeError if an attribute with the prefix asert, aseert, or assrt is |
| 24027 |
accessed, in addition to this already happening for the prefixes assert or |
| 24028 |
assret. |
| 24029 |
|
| 24030 |
- bpo-42264: ``sqlite3.OptimizedUnicode`` has been undocumented and obsolete |
| 24031 |
since Python 3.3, when it was made an alias to :class:`str`. It is now |
| 24032 |
deprecated, scheduled for removal in Python 3.12. |
| 24033 |
|
| 24034 |
- bpo-42251: Added :func:`threading.gettrace` and |
| 24035 |
:func:`threading.getprofile` to retrieve the functions set by |
| 24036 |
:func:`threading.settrace` and :func:`threading.setprofile` respectively. |
| 24037 |
Patch by Mario Corchero. |
| 24038 |
|
| 24039 |
- bpo-42249: Fixed writing binary Plist files larger than 4 GiB. |
| 24040 |
|
| 24041 |
- bpo-42236: On Unix, the :func:`os.device_encoding` function now returns |
| 24042 |
``'UTF-8'`` rather than the device encoding if the :ref:`Python UTF-8 Mode |
| 24043 |
<utf8-mode>` is enabled. |
| 24044 |
|
| 24045 |
- bpo-41754: webbrowser: Ignore *NotADirectoryError* when calling |
| 24046 |
``xdg-settings``. |
| 24047 |
|
| 24048 |
- bpo-42183: Fix a stack overflow error for asyncio Task or Future repr(). |
| 24049 |
|
| 24050 |
The overflow occurs under some circumstances when a Task or Future |
| 24051 |
recursively returns itself. |
| 24052 |
|
| 24053 |
- bpo-42140: Improve asyncio.wait function to create the futures set just |
| 24054 |
one time. |
| 24055 |
|
| 24056 |
- bpo-42133: Update various modules in the stdlib to fall back on |
| 24057 |
``__spec__.loader`` when ``__loader__`` isn't defined on a module. |
| 24058 |
|
| 24059 |
- bpo-26131: The ``load_module()`` methods found in ``importlib`` now |
| 24060 |
trigger a ``DeprecationWarning``. |
| 24061 |
|
| 24062 |
- bpo-39825: Windows: Change ``sysconfig.get_config_var('EXT_SUFFIX')`` to |
| 24063 |
the expected full ``platform_tag.extension`` format. Previously it was |
| 24064 |
hard-coded to ``.pyd``, now it is compatible with ``distutils.sysconfig`` |
| 24065 |
and will result in something like ``.cp38-win_amd64.pyd``. This brings |
| 24066 |
windows into conformance with the other platforms. |
| 24067 |
|
| 24068 |
- bpo-26389: The :func:`traceback.format_exception`, |
| 24069 |
:func:`traceback.format_exception_only`, and |
| 24070 |
:func:`traceback.print_exception` functions can now take an exception |
| 24071 |
object as a positional-only argument. |
| 24072 |
|
| 24073 |
- bpo-41889: Enum: fix regression involving inheriting a multiply inherited |
| 24074 |
enum |
| 24075 |
|
| 24076 |
- bpo-41861: Convert :mod:`sqlite3` to use heap types (PEP 384). Patch by |
| 24077 |
Erlend E. Aasland. |
| 24078 |
|
| 24079 |
- bpo-40624: Added support for the XPath ``!=`` operator in xml.etree |
| 24080 |
|
| 24081 |
- bpo-28850: Fix :meth:`pprint.PrettyPrinter.format` overrides being ignored |
| 24082 |
for contents of small containers. The :func:`pprint._safe_repr` function |
| 24083 |
was removed. |
| 24084 |
|
| 24085 |
- bpo-41625: Expose the :c:func:`splice` as :func:`os.splice` in the |
| 24086 |
:mod:`os` module. Patch by Pablo Galindo |
| 24087 |
|
| 24088 |
- bpo-34215: Clarify the error message for |
| 24089 |
:exc:`asyncio.IncompleteReadError` when ``expected`` is ``None``. |
| 24090 |
|
| 24091 |
- bpo-41543: Add async context manager support for contextlib.nullcontext. |
| 24092 |
|
| 24093 |
- bpo-21041: :attr:`pathlib.PurePath.parents` now supports negative |
| 24094 |
indexing. Patch contributed by Yaroslav Pankovych. |
| 24095 |
|
| 24096 |
- bpo-41332: Added missing connect_accepted_socket() method to |
| 24097 |
``asyncio.AbstractEventLoop``. |
| 24098 |
|
| 24099 |
- bpo-12800: Extracting a symlink from a tarball should succeed and |
| 24100 |
overwrite the symlink if it already exists. The fix is to remove the |
| 24101 |
existing file or symlink before extraction. Based on patch by Chris AtLee, |
| 24102 |
Jeffrey Kintscher, and Senthil Kumaran. |
| 24103 |
|
| 24104 |
- bpo-40968: :mod:`urllib.request` and :mod:`http.client` now send |
| 24105 |
``http/1.1`` ALPN extension during TLS handshake when no custom context is |
| 24106 |
supplied. |
| 24107 |
|
| 24108 |
- bpo-41001: Add :func:`os.eventfd` to provide a low level interface for |
| 24109 |
Linux's event notification file descriptor. |
| 24110 |
|
| 24111 |
- bpo-40816: Add AsyncContextDecorator to contextlib to support async |
| 24112 |
context manager as a decorator. |
| 24113 |
|
| 24114 |
- bpo-40550: Fix time-of-check/time-of-action issue in |
| 24115 |
subprocess.Popen.send_signal. |
| 24116 |
|
| 24117 |
- bpo-39411: Add an ``is_async`` identifier to :mod:`pyclbr`'s ``Function`` |
| 24118 |
objects. Patch by Batuhan Taskaya |
| 24119 |
|
| 24120 |
- bpo-35498: Add slice support to :attr:`pathlib.PurePath.parents`. |
| 24121 |
|
| 24122 |
Documentation |
| 24123 |
------------- |
| 24124 |
|
| 24125 |
- bpo-42238: Tentative to deprecate ``make suspicious`` by first removing it |
| 24126 |
from the CI and documentation builds, but keeping it around for manual |
| 24127 |
uses. |
| 24128 |
|
| 24129 |
- bpo-42153: Fix the URL for the IMAP protocol documents. |
| 24130 |
|
| 24131 |
- bpo-41028: Language and version switchers, previously maintained in every |
| 24132 |
cpython branches, are now handled by docsbuild-script. |
| 24133 |
|
| 24134 |
Tests |
| 24135 |
----- |
| 24136 |
|
| 24137 |
- bpo-41473: Re-enable test_gdb on gdb 9.2 and newer: |
| 24138 |
https://bugzilla.redhat.com/show_bug.cgi?id=1866884 bug is fixed in gdb |
| 24139 |
10.1. |
| 24140 |
|
| 24141 |
- bpo-42553: Fix ``test_asyncio.test_call_later()`` race condition: don't |
| 24142 |
measure asyncio performance in the ``call_later()`` unit test. The test |
| 24143 |
failed randomly on the CI. |
| 24144 |
|
| 24145 |
- bpo-31904: Fix test_netrc on VxWorks: create temporary directories using |
| 24146 |
temp_cwd(). |
| 24147 |
|
| 24148 |
- bpo-31904: skip test_getaddrinfo_ipv6_scopeid_symbolic and |
| 24149 |
test_getnameinfo_ipv6_scopeid_symbolic on VxWorks |
| 24150 |
|
| 24151 |
- bpo-31904: skip test_test of test_mailcap on VxWorks |
| 24152 |
|
| 24153 |
- bpo-31904: add shell requirement for test_pipes |
| 24154 |
|
| 24155 |
- bpo-31904: skip some tests related to fifo on VxWorks |
| 24156 |
|
| 24157 |
- bpo-31904: Fix test_doctest.py failures for VxWorks. |
| 24158 |
|
| 24159 |
- bpo-40754: Include ``_testinternalcapi`` module in Windows installer for |
| 24160 |
test suite |
| 24161 |
|
| 24162 |
- bpo-41561: test_ssl: skip test_min_max_version_mismatch when TLS 1.0 is |
| 24163 |
not available |
| 24164 |
|
| 24165 |
- bpo-31904: Fix os module failures for VxWorks RTOS. |
| 24166 |
|
| 24167 |
- bpo-31904: Fix fifo test cases for VxWorks RTOS. |
| 24168 |
|
| 24169 |
Build |
| 24170 |
----- |
| 24171 |
|
| 24172 |
- bpo-31904: remove libnet dependency from detect_socket() for VxWorks |
| 24173 |
|
| 24174 |
- bpo-42398: Fix a race condition in "make regen-all" when make -jN option |
| 24175 |
is used to run jobs in parallel. The clinic.py script now only use atomic |
| 24176 |
write to write files. Moveover, generated files are now left unchanged if |
| 24177 |
the content does not change, to not change the file modification time. |
| 24178 |
|
| 24179 |
- bpo-41617: Fix building ``pycore_bitutils.h`` internal header on old clang |
| 24180 |
version without ``__builtin_bswap16()`` (ex: Xcode 4.6.3 on Mac OS X |
| 24181 |
10.7). Patch by Joshua Root and Victor Stinner. |
| 24182 |
|
| 24183 |
- bpo-38823: It is no longer possible to build the ``_ctypes`` extension |
| 24184 |
module without :c:type:`wchar_t` type: remove ``CTYPES_UNICODE`` macro. |
| 24185 |
Anyway, the :c:type:`wchar_t` type is required to build Python. Patch by |
| 24186 |
Victor Stinner. |
| 24187 |
|
| 24188 |
- bpo-42087: Support was removed for AIX 5.3 and below. See :issue:`40680`. |
| 24189 |
|
| 24190 |
- bpo-40998: Addressed three compiler warnings found by undefined behavior |
| 24191 |
sanitizer (ubsan). |
| 24192 |
|
| 24193 |
Windows |
| 24194 |
------- |
| 24195 |
|
| 24196 |
- bpo-42120: Remove macro definition of ``copysign`` (to ``_copysign``) in |
| 24197 |
headers. |
| 24198 |
|
| 24199 |
- bpo-38506: The Windows launcher now properly handles Python 3.10 when |
| 24200 |
listing installed Python versions. |
| 24201 |
|
| 24202 |
macOS |
| 24203 |
----- |
| 24204 |
|
| 24205 |
- bpo-42504: Fix build on macOS Big Sur when MACOSX_DEPLOYMENT_TARGET=11 |
| 24206 |
|
| 24207 |
- bpo-41116: Ensure distutils.unixxcompiler.find_library_file can find |
| 24208 |
system provided libraries on macOS 11. |
| 24209 |
|
| 24210 |
- bpo-41100: Add support for macOS 11 and Apple Silicon systems. |
| 24211 |
|
| 24212 |
It is now possible to build "Universal 2" binaries using |
| 24213 |
"--enable-universalsdk --with-universal-archs=universal2". |
| 24214 |
|
| 24215 |
Binaries build on later macOS versions can be deployed back to older |
| 24216 |
versions (tested up to macOS 10.9), when using the correct deployment |
| 24217 |
target. This is tested using Xcode 11 and later. |
| 24218 |
|
| 24219 |
- bpo-42232: Added Darwin specific madvise options to mmap module. |
| 24220 |
|
| 24221 |
- bpo-38443: The ``--enable-universalsdk`` and ``--with-universal-archs`` |
| 24222 |
options for the configure script now check that the specified |
| 24223 |
architectures can be used. |
| 24224 |
|
| 24225 |
IDLE |
| 24226 |
---- |
| 24227 |
|
| 24228 |
- bpo-42508: Keep IDLE running on macOS. Remove obsolete workaround that |
| 24229 |
prevented running files with shortcuts when using new universal2 |
| 24230 |
installers built on macOS 11. |
| 24231 |
|
| 24232 |
- bpo-42426: Fix reporting offset of the RE error in searchengine. |
| 24233 |
|
| 24234 |
- bpo-42415: Get docstrings for IDLE calltips more often by using |
| 24235 |
inspect.getdoc. |
| 24236 |
|
| 24237 |
Tools/Demos |
| 24238 |
----------- |
| 24239 |
|
| 24240 |
- bpo-42212: The smelly.py script now also checks the Python dynamic library |
| 24241 |
and extension modules, not only the Python static library. Make also the |
| 24242 |
script more verbose: explain what it does. |
| 24243 |
|
| 24244 |
- bpo-36310: Allow :file:`Tools/i18n/pygettext.py` to detect calls to |
| 24245 |
``gettext`` in f-strings. |
| 24246 |
|
| 24247 |
C API |
| 24248 |
----- |
| 24249 |
|
| 24250 |
- bpo-42423: The :c:func:`PyType_FromSpecWithBases` and |
| 24251 |
:c:func:`PyType_FromModuleAndSpec` functions now accept a single class as |
| 24252 |
the *bases* argument. |
| 24253 |
|
| 24254 |
- bpo-1635741: Port :mod:`select` extension module to multiphase |
| 24255 |
initialization (:pep:`489`). |
| 24256 |
|
| 24257 |
- bpo-1635741: Port _posixsubprocess extension module to multiphase |
| 24258 |
initialization (:pep:`489`). |
| 24259 |
|
| 24260 |
- bpo-1635741: Port _posixshmem extension module to multiphase |
| 24261 |
initialization (:pep:`489`) |
| 24262 |
|
| 24263 |
- bpo-1635741: Port _struct extension module to multiphase initialization |
| 24264 |
(:pep:`489`) |
| 24265 |
|
| 24266 |
- bpo-1635741: Port :mod:`!spwd` extension module to multiphase |
| 24267 |
initialization (:pep:`489`) |
| 24268 |
|
| 24269 |
- bpo-1635741: Port :mod:`gc` extension module to multiphase initialization |
| 24270 |
(:pep:`489`) |
| 24271 |
|
| 24272 |
- bpo-1635741: Port _queue extension module to multiphase initialization |
| 24273 |
(:pep:`489`) |
| 24274 |
|
| 24275 |
- bpo-39573: Convert :c:func:`Py_TYPE` and :c:func:`Py_SIZE` back to macros |
| 24276 |
to allow using them as an l-value. Many third party C extension modules |
| 24277 |
rely on the ability of using Py_TYPE() and Py_SIZE() to set an object type |
| 24278 |
and size: ``Py_TYPE(obj) = type;`` and ``Py_SIZE(obj) = size;``. |
| 24279 |
|
| 24280 |
- bpo-1635741: Port :mod:`symtable` extension module to multiphase |
| 24281 |
initialization (:pep:`489`) |
| 24282 |
|
| 24283 |
- bpo-1635741: Port :mod:`grp` and :mod:`pwd` extension modules to |
| 24284 |
multiphase initialization (:pep:`489`) |
| 24285 |
|
| 24286 |
- bpo-1635741: Port _random extension module to multiphase initialization |
| 24287 |
(:pep:`489`) |
| 24288 |
|
| 24289 |
- bpo-1635741: Port _hashlib extension module to multiphase initialization |
| 24290 |
(:pep:`489`) |
| 24291 |
|
| 24292 |
- bpo-41713: Removed the undocumented ``PyOS_InitInterrupts()`` function. |
| 24293 |
Initializing Python already implicitly installs signal handlers: see |
| 24294 |
:c:member:`PyConfig.install_signal_handlers`. Patch by Victor Stinner. |
| 24295 |
|
| 24296 |
- bpo-40170: The ``Py_TRASHCAN_BEGIN`` macro no longer accesses PyTypeObject |
| 24297 |
attributes, but now can get the condition by calling the new private |
| 24298 |
:c:func:`!_PyTrash_cond()` function which hides implementation details. |
| 24299 |
|
| 24300 |
- bpo-42260: :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, |
| 24301 |
:c:func:`Py_GetExecPrefix`, :c:func:`Py_GetProgramFullPath`, |
| 24302 |
:c:func:`Py_GetPythonHome` and :c:func:`Py_GetProgramName` functions now |
| 24303 |
return ``NULL`` if called before :c:func:`Py_Initialize` (before Python is |
| 24304 |
initialized). Use the new :ref:`Python Initialization Configuration API |
| 24305 |
<init-config>` to get the :ref:`Python Path Configuration. |
| 24306 |
<init-path-config>`. Patch by Victor Stinner. |
| 24307 |
|
| 24308 |
- bpo-42260: The :c:func:`PyConfig_Read` function now only parses |
| 24309 |
:c:member:`PyConfig.argv` arguments once: :c:member:`PyConfig.parse_argv` |
| 24310 |
is set to ``2`` after arguments are parsed. Since Python arguments are |
| 24311 |
strippped from :c:member:`PyConfig.argv`, parsing arguments twice would |
| 24312 |
parse the application options as Python options. |
| 24313 |
|
| 24314 |
- bpo-42262: Added :c:func:`Py_NewRef` and :c:func:`Py_XNewRef` functions to |
| 24315 |
increment the reference count of an object and return the object. Patch by |
| 24316 |
Victor Stinner. |
| 24317 |
|
| 24318 |
- bpo-42260: When :c:func:`Py_Initialize` is called twice, the second call |
| 24319 |
now updates more :mod:`sys` attributes for the configuration, rather than |
| 24320 |
only :data:`sys.argv`. Patch by Victor Stinner. |
| 24321 |
|
| 24322 |
- bpo-41832: The :c:func:`PyType_FromModuleAndSpec` function now accepts |
| 24323 |
NULL ``tp_doc`` slot. |
| 24324 |
|
| 24325 |
- bpo-1635741: Added :c:func:`PyModule_AddObjectRef` function: similar to |
| 24326 |
:c:func:`PyModule_AddObject` but don't steal a reference to the value on |
| 24327 |
success. Patch by Victor Stinner. |
| 24328 |
|
| 24329 |
- bpo-42171: The :c:macro:`METH_FASTCALL` calling convention is added to the |
| 24330 |
limited API. The functions :c:func:`PyModule_AddType`, |
| 24331 |
:c:func:`PyType_FromModuleAndSpec`, :c:func:`PyType_GetModule` and |
| 24332 |
:c:func:`PyType_GetModuleState` are added to the limited API on Windows. |
| 24333 |
|
| 24334 |
- bpo-42085: Add dedicated entry to PyAsyncMethods for sending values |
| 24335 |
|
| 24336 |
- bpo-41073: :c:func:`PyType_GetSlot()` can now accept static types. |
| 24337 |
|
| 24338 |
- bpo-30459: :c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and |
| 24339 |
:c:func:`PyCell_SET` macros can no longer be used as l-value or r-value. |
| 24340 |
For example, ``x = PyList_SET_ITEM(a, b, c)`` and ``PyList_SET_ITEM(a, b, |
| 24341 |
c) = x`` now fail with a compiler error. It prevents bugs like ``if |
| 24342 |
(PyList_SET_ITEM (a, b, c) < 0) ...`` test. Patch by Zackery Spytz and |
| 24343 |
Victor Stinner. |
| 24344 |
|
| 24345 |
|
| 24346 |
What's New in Python 3.10.0 alpha 2? |
| 24347 |
==================================== |
| 24348 |
|
| 24349 |
*Release date: 2020-11-03* |
| 24350 |
|
| 24351 |
Security |
| 24352 |
-------- |
| 24353 |
|
| 24354 |
- bpo-42103: Prevented potential DoS attack via CPU and RAM exhaustion when |
| 24355 |
processing malformed Apple Property List files in binary format. |
| 24356 |
|
| 24357 |
- bpo-42051: The :mod:`plistlib` module no longer accepts entity |
| 24358 |
declarations in XML plist files to avoid XML vulnerabilities. This should |
| 24359 |
not affect users as entity declarations are not used in regular plist |
| 24360 |
files. |
| 24361 |
|
| 24362 |
Core and Builtins |
| 24363 |
----------------- |
| 24364 |
|
| 24365 |
- bpo-42236: If the ``nl_langinfo(CODESET)`` function returns an empty |
| 24366 |
string, Python now uses UTF-8 as the filesystem encoding. Patch by Victor |
| 24367 |
Stinner. |
| 24368 |
|
| 24369 |
- bpo-42218: Fixed a bug in the PEG parser that was causing crashes in debug |
| 24370 |
mode. Now errors are checked in left-recursive rules to avoid cases where |
| 24371 |
such errors do not get handled in time and appear as long-distance crashes |
| 24372 |
in other places. |
| 24373 |
|
| 24374 |
- bpo-42214: Fixed a possible crash in the PEG parser when checking for the |
| 24375 |
'!=' token in the ``barry_as_flufl`` rule. Patch by Pablo Galindo. |
| 24376 |
|
| 24377 |
- bpo-42206: Propagate and raise the errors caused by |
| 24378 |
:c:func:`PyAST_Validate` in the parser. |
| 24379 |
|
| 24380 |
- bpo-41796: The :mod:`ast` module internal state is now per interpreter. |
| 24381 |
Patch by Victor Stinner. |
| 24382 |
|
| 24383 |
- bpo-42143: Fix handling of errors during creation of ``PyFunctionObject``, |
| 24384 |
which resulted in operations on uninitialized memory. Patch by Yonatan |
| 24385 |
Goldschmidt. |
| 24386 |
|
| 24387 |
- bpo-41659: Fix a bug in the parser, where a curly brace following a |
| 24388 |
``primary`` didn't fail immediately. This led to invalid expressions like |
| 24389 |
``a {b}`` to throw a :exc:`SyntaxError` with a wrong offset, or invalid |
| 24390 |
expressions ending with a curly brace like ``a {`` to not fail immediately |
| 24391 |
in the REPL. |
| 24392 |
|
| 24393 |
- bpo-42150: Fix possible buffer overflow in the new parser when checking |
| 24394 |
for continuation lines. Patch by Pablo Galindo. |
| 24395 |
|
| 24396 |
- bpo-42123: Run the parser two times. On the first run, disable all the |
| 24397 |
rules that only generate better error messages to gain performance. If |
| 24398 |
there's a parse failure, run the parser a second time with those enabled. |
| 24399 |
|
| 24400 |
- bpo-42093: The ``LOAD_ATTR`` instruction now uses new "per opcode cache" |
| 24401 |
mechanism and it is about 36% faster now. Patch by Pablo Galindo and Yury |
| 24402 |
Selivanov. |
| 24403 |
|
| 24404 |
- bpo-42030: Support for the legacy AIX-specific shared library loading |
| 24405 |
support has been removed. All versions of AIX since 4.3 have supported and |
| 24406 |
defaulted to using the common Unix mechanism instead. |
| 24407 |
|
| 24408 |
- bpo-41984: The garbage collector now tracks all user-defined classes. |
| 24409 |
Patch by Brandt Bucher. |
| 24410 |
|
| 24411 |
- bpo-41993: Fixed potential issues with removing not completely initialized |
| 24412 |
module from ``sys.modules`` when import fails. |
| 24413 |
|
| 24414 |
- bpo-41979: Star-unpacking is now allowed for with item's targets in the |
| 24415 |
PEG parser. |
| 24416 |
|
| 24417 |
- bpo-41974: Removed special methods ``__int__``, ``__float__``, |
| 24418 |
``__floordiv__``, ``__mod__``, ``__divmod__``, ``__rfloordiv__``, |
| 24419 |
``__rmod__`` and ``__rdivmod__`` of the :class:`complex` class. They |
| 24420 |
always raised a :exc:`TypeError`. |
| 24421 |
|
| 24422 |
- bpo-41902: Micro optimization when compute |
| 24423 |
:c:member:`~PySequenceMethods.sq_item` and |
| 24424 |
:c:member:`~PyMappingMethods.mp_subscript` of :class:`range`. Patch by |
| 24425 |
Donghee Na. |
| 24426 |
|
| 24427 |
- bpo-41894: When loading a native module and a load failure occurs, prevent |
| 24428 |
a possible UnicodeDecodeError when not running in a UTF-8 locale by |
| 24429 |
decoding the load error message using the current locale's encoding. |
| 24430 |
|
| 24431 |
- bpo-41902: Micro optimization for range.index if step is 1. Patch by |
| 24432 |
Donghee Na. |
| 24433 |
|
| 24434 |
Library |
| 24435 |
------- |
| 24436 |
|
| 24437 |
- bpo-41435: Add ``sys._current_exceptions()`` function to retrieve a |
| 24438 |
dictionary mapping each thread's identifier to the topmost exception |
| 24439 |
currently active in that thread at the time the function is called. |
| 24440 |
|
| 24441 |
Core and Builtins |
| 24442 |
----------------- |
| 24443 |
|
| 24444 |
- bpo-38605: Enable ``from __future__ import annotations`` (:pep:`563`) by |
| 24445 |
default. The values found in :attr:`~object.__annotations__` dicts are now |
| 24446 |
strings, for example ``{"x": "int"}`` instead of ``{"x": int}``. |
| 24447 |
|
| 24448 |
Library |
| 24449 |
------- |
| 24450 |
|
| 24451 |
- bpo-35455: On Solaris, :func:`~time.thread_time` is now implemented with |
| 24452 |
``gethrvtime()`` because ``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` is not |
| 24453 |
always available. Patch by Jakub Kulik. |
| 24454 |
|
| 24455 |
- bpo-42233: The :func:`repr` of :mod:`typing` types containing |
| 24456 |
:ref:`Generic Alias Types <types-genericalias>` previously did not show |
| 24457 |
the parameterized types in the ``GenericAlias``. They have now been |
| 24458 |
changed to do so. |
| 24459 |
|
| 24460 |
- bpo-29566: ``binhex.binhex()`` consistently writes macOS 9 line endings. |
| 24461 |
|
| 24462 |
- bpo-26789: The :class:`logging.FileHandler` class now keeps a reference to |
| 24463 |
the builtin :func:`open` function to be able to open or reopen the file |
| 24464 |
during Python finalization. Fix errors like: ``NameError: name 'open' is |
| 24465 |
not defined``. Patch by Victor Stinner. |
| 24466 |
|
| 24467 |
- bpo-42157: Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an |
| 24468 |
internal PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` |
| 24469 |
structure was moved to the internal C API. Patch by Victor Stinner. |
| 24470 |
|
| 24471 |
- bpo-42157: Convert the :mod:`unicodedata` extension module to the |
| 24472 |
multiphase initialization API (:pep:`489`) and convert the |
| 24473 |
``unicodedata.UCD`` static type to a heap type. Patch by Mohamed Koubaa |
| 24474 |
and Victor Stinner. |
| 24475 |
|
| 24476 |
- bpo-42146: Fix memory leak in :func:`subprocess.Popen` in case an uid |
| 24477 |
(gid) specified in ``user`` (``group``, ``extra_groups``) overflows |
| 24478 |
``uid_t`` (``gid_t``). |
| 24479 |
|
| 24480 |
- bpo-42103: :exc:`~plistlib.InvalidFileException` and :exc:`RecursionError` |
| 24481 |
are now the only errors caused by loading malformed binary Plist file |
| 24482 |
(previously ValueError and TypeError could be raised in some specific |
| 24483 |
cases). |
| 24484 |
|
| 24485 |
- bpo-41490: In ``importlib.resources``, ``.path`` method is more aggressive |
| 24486 |
about releasing handles to zipfile objects early, enabling use-cases like |
| 24487 |
certifi to leave the context open but delete the underlying zip file. |
| 24488 |
|
| 24489 |
- bpo-41052: Pickling heap types implemented in C with protocols 0 and 1 |
| 24490 |
raises now an error instead of producing incorrect data. |
| 24491 |
|
| 24492 |
- bpo-42089: In ``importlib.metadata.PackageNotFoundError``, make reference |
| 24493 |
to the package metadata being missing to improve the user experience. |
| 24494 |
|
| 24495 |
- bpo-41491: plistlib: fix parsing XML plists with hexadecimal integer |
| 24496 |
values |
| 24497 |
|
| 24498 |
- bpo-42065: Fix an incorrectly formatted error from |
| 24499 |
:meth:`!_codecs.charmap_decode` when called with a mapped value outside |
| 24500 |
the range of valid Unicode code points. PR by Max Bernstein. |
| 24501 |
|
| 24502 |
- bpo-41966: Fix pickling pure Python :class:`datetime.time` subclasses. |
| 24503 |
Patch by Dean Inwood. |
| 24504 |
|
| 24505 |
- bpo-19270: :meth:`sched.scheduler.cancel` will now cancel the correct |
| 24506 |
event, if two events with same priority are scheduled for the same time. |
| 24507 |
Patch by Bar Harel. |
| 24508 |
|
| 24509 |
- bpo-28660: :func:`textwrap.wrap` now attempts to break long words after |
| 24510 |
hyphens when ``break_long_words=True`` and ``break_on_hyphens=True``. |
| 24511 |
|
| 24512 |
- bpo-35823: Use ``vfork()`` instead of ``fork()`` for |
| 24513 |
:func:`subprocess.Popen` on Linux to improve performance in cases where it |
| 24514 |
is deemed safe. |
| 24515 |
|
| 24516 |
- bpo-42043: Add support for ``zipfile.Path`` inheritance. |
| 24517 |
``zipfile.Path.is_file()`` now returns False for non-existent names. |
| 24518 |
``zipfile.Path`` objects now expose a ``.filename`` attribute and rely on |
| 24519 |
that to resolve ``.name`` and ``.parent`` when the ``Path`` object is at |
| 24520 |
the root of the zipfile. |
| 24521 |
|
| 24522 |
- bpo-42021: Fix possible ref leaks in :mod:`sqlite3` module init. |
| 24523 |
|
| 24524 |
- bpo-39101: Fixed tests using IsolatedAsyncioTestCase from hanging on |
| 24525 |
BaseExceptions. |
| 24526 |
|
| 24527 |
- bpo-41976: Fixed a bug that was causing :func:`ctypes.util.find_library` |
| 24528 |
to return ``None`` when triying to locate a library in an environment when |
| 24529 |
gcc>=9 is available and ``ldconfig`` is not. Patch by Pablo Galindo |
| 24530 |
|
| 24531 |
- bpo-41943: Fix bug where TestCase.assertLogs doesn't correctly filter |
| 24532 |
messages by level. |
| 24533 |
|
| 24534 |
- bpo-41923: Implement :pep:`613`, introducing :data:`typing.TypeAlias` |
| 24535 |
annotation. |
| 24536 |
|
| 24537 |
- bpo-41905: A new function in abc: *update_abstractmethods* to re-calculate |
| 24538 |
an abstract class's abstract status. In addition, *dataclass* has been |
| 24539 |
changed to call this function. |
| 24540 |
|
| 24541 |
- bpo-23706: Added *newline* parameter to ``pathlib.Path.write_text()``. |
| 24542 |
|
| 24543 |
- bpo-41876: Tkinter font class repr uses font name |
| 24544 |
|
| 24545 |
- bpo-41831: ``str()`` for the ``type`` attribute of the ``tkinter.Event`` |
| 24546 |
object always returns now the numeric code returned by Tk instead of the |
| 24547 |
name of the event type. |
| 24548 |
|
| 24549 |
- bpo-39337: :func:`encodings.normalize_encoding` now ignores non-ASCII |
| 24550 |
characters. |
| 24551 |
|
| 24552 |
- bpo-41747: Ensure all methods that generated from |
| 24553 |
:func:`dataclasses.dataclass` objects now have the proper ``__qualname__`` |
| 24554 |
attribute referring to the class they belong to. Patch by Batuhan Taskaya. |
| 24555 |
|
| 24556 |
- bpo-30681: Handle exceptions caused by unparsable date headers when using |
| 24557 |
email "default" policy. Patch by Tim Bell, Georges Toth |
| 24558 |
|
| 24559 |
- bpo-41586: Add F_SETPIPE_SZ and F_GETPIPE_SZ to fcntl module. Allow |
| 24560 |
setting pipesize on subprocess.Popen. |
| 24561 |
|
| 24562 |
- bpo-41229: Add ``contextlib.aclosing`` for deterministic cleanup of async |
| 24563 |
generators which is analogous to ``contextlib.closing`` for non-async |
| 24564 |
generators. Patch by Joongi Kim and John Belmonte. |
| 24565 |
|
| 24566 |
- bpo-16396: Allow ``ctypes.wintypes`` to be imported on non-Windows |
| 24567 |
systems. |
| 24568 |
|
| 24569 |
- bpo-4356: Add a key function to the bisect module. |
| 24570 |
|
| 24571 |
- bpo-40592: :func:`shutil.which` now ignores empty entries in |
| 24572 |
:envvar:`PATHEXT` instead of treating them as a match. |
| 24573 |
|
| 24574 |
- bpo-40492: Fix ``--outfile`` for :mod:`cProfile` / :mod:`profile` not |
| 24575 |
writing the output file in the original directory when the program being |
| 24576 |
profiled changes the working directory. PR by Anthony Sottile. |
| 24577 |
|
| 24578 |
- bpo-34204: The :mod:`shelve` module now uses |
| 24579 |
:const:`pickle.DEFAULT_PROTOCOL` by default instead of :mod:`pickle` |
| 24580 |
protocol ``3``. |
| 24581 |
|
| 24582 |
- bpo-27321: Fixed KeyError exception when flattening an email to a string |
| 24583 |
attempts to replace a non-existent Content-Transfer-Encoding header. |
| 24584 |
|
| 24585 |
- bpo-38976: The :mod:`http.cookiejar` module now supports the parsing of |
| 24586 |
cookies in CURL-style cookiejar files through MozillaCookieJar on all |
| 24587 |
platforms. Previously, such cookie entries would be silently ignored when |
| 24588 |
loading a cookiejar with such entries. |
| 24589 |
|
| 24590 |
Additionally, the HTTP Only attribute is persisted in the object, and will |
| 24591 |
be correctly written to file if the MozillaCookieJar object is |
| 24592 |
subsequently dumped. |
| 24593 |
|
| 24594 |
Documentation |
| 24595 |
------------- |
| 24596 |
|
| 24597 |
- bpo-42061: Document __format__ functionality for IP addresses. |
| 24598 |
|
| 24599 |
- bpo-41910: Document the default implementation of ``object.__eq__``. |
| 24600 |
|
| 24601 |
- bpo-42010: Clarify that subscription expressions are also valid for |
| 24602 |
certain :term:`classes <class>` and :term:`types <type>` in the standard |
| 24603 |
library, and for user-defined classes and types if the classmethod |
| 24604 |
:meth:`__class_getitem__` is provided. |
| 24605 |
|
| 24606 |
- bpo-41805: Documented :ref:`generic alias type <types-genericalias>` and |
| 24607 |
:data:`types.GenericAlias`. Also added an entry in glossary for |
| 24608 |
:term:`generic types <generic type>`. |
| 24609 |
|
| 24610 |
- bpo-39693: Fix tarfile's extractfile documentation |
| 24611 |
|
| 24612 |
- bpo-39416: Document some restrictions on the default string |
| 24613 |
representations of numeric classes. |
| 24614 |
|
| 24615 |
Tests |
| 24616 |
----- |
| 24617 |
|
| 24618 |
- bpo-41739: Fix test_logging.test_race_between_set_target_and_flush(): the |
| 24619 |
test now waits until all threads complete to avoid leaking running |
| 24620 |
threads. |
| 24621 |
|
| 24622 |
- bpo-41970: Avoid a test failure in ``test_lib2to3`` if the module has |
| 24623 |
already imported at the time the test executes. Patch by Pablo Galindo. |
| 24624 |
|
| 24625 |
- bpo-41944: Tests for CJK codecs no longer call ``eval()`` on content |
| 24626 |
received via HTTP. |
| 24627 |
|
| 24628 |
- bpo-41306: Fixed a failure in ``test_tk.test_widgets.ScaleTest`` happening |
| 24629 |
when executing the test with Tk 8.6.10. |
| 24630 |
|
| 24631 |
Build |
| 24632 |
----- |
| 24633 |
|
| 24634 |
- bpo-38980: Add ``-fno-semantic-interposition`` to both the compile and |
| 24635 |
link line when building with ``--enable-optimizations``. Patch by Victor |
| 24636 |
Stinner and Pablo Galindo. |
| 24637 |
|
| 24638 |
Windows |
| 24639 |
------- |
| 24640 |
|
| 24641 |
- bpo-38439: Updates the icons for IDLE in the Windows Store package. |
| 24642 |
|
| 24643 |
- bpo-38252: Use 8-byte step to detect ASCII sequence in 64-bit Windows |
| 24644 |
build. |
| 24645 |
|
| 24646 |
- bpo-39107: Update Tcl and Tk to 8.6.10 in Windows installer. |
| 24647 |
|
| 24648 |
- bpo-41557: Update Windows installer to use SQLite 3.33.0. |
| 24649 |
|
| 24650 |
- bpo-38324: Avoid Unicode errors when accessing certain locale data on |
| 24651 |
Windows. |
| 24652 |
|
| 24653 |
macOS |
| 24654 |
----- |
| 24655 |
|
| 24656 |
- bpo-41471: Ignore invalid prefix lengths in system proxy excludes. |
| 24657 |
|
| 24658 |
IDLE |
| 24659 |
---- |
| 24660 |
|
| 24661 |
- bpo-33987: Mostly finish using ttk widgets, mainly for editor, settings, |
| 24662 |
and searches. Some patches by Mark Roseman. |
| 24663 |
|
| 24664 |
- bpo-40511: Typing opening and closing parentheses inside the parentheses |
| 24665 |
of a function call will no longer cause unnecessary "flashing" off and on |
| 24666 |
of an existing open call-tip, e.g. when typed in a string literal. |
| 24667 |
|
| 24668 |
- bpo-38439: Add a 256×256 pixel IDLE icon to the Windows .ico file. Created |
| 24669 |
by Andrew Clover. Remove the low-color gif variations from the .ico file. |
| 24670 |
|
| 24671 |
C API |
| 24672 |
----- |
| 24673 |
|
| 24674 |
- bpo-42157: The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule |
| 24675 |
API ``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. |
| 24676 |
Patch by Victor Stinner. |
| 24677 |
|
| 24678 |
- bpo-42015: Fix potential crash in deallocating method objects when |
| 24679 |
dynamically allocated :c:type:`PyMethodDef`'s lifetime is managed through |
| 24680 |
the ``self`` argument of a :c:type:`PyCFunction`. |
| 24681 |
|
| 24682 |
- bpo-40423: The :mod:`subprocess` module and ``os.closerange`` will now use |
| 24683 |
the ``close_range(low, high, flags)`` syscall when it is available for |
| 24684 |
more efficient closing of ranges of descriptors. |
| 24685 |
|
| 24686 |
- bpo-41845: :c:func:`PyObject_GenericGetDict` is available again in the |
| 24687 |
limited API when targeting 3.10 or later. |
| 24688 |
|
| 24689 |
- bpo-40422: Add ``_Py_closerange`` function to provide performant closing |
| 24690 |
of a range of file descriptors. |
| 24691 |
|
| 24692 |
- bpo-41986: :c:data:`!Py_FileSystemDefaultEncodeErrors` and |
| 24693 |
:c:data:`!Py_UTF8Mode` are available again in limited API. |
| 24694 |
|
| 24695 |
- bpo-41756: Add ``PyIter_Send`` function to allow sending value into |
| 24696 |
generator/coroutine/iterator without raising StopIteration exception to |
| 24697 |
signal return. |
| 24698 |
|
| 24699 |
- bpo-41784: Added ``PyUnicode_AsUTF8AndSize`` to the limited C API. |
| 24700 |
|
| 24701 |
|
| 24702 |
What's New in Python 3.10.0 alpha 1? |
| 24703 |
==================================== |
| 24704 |
|
| 24705 |
*Release date: 2020-10-05* |
| 24706 |
|
| 24707 |
Security |
| 24708 |
-------- |
| 24709 |
|
| 24710 |
- bpo-41304: Fixes ``python3x._pth`` being ignored on Windows, caused by the |
| 24711 |
fix for :issue:`29778` (:cve:`2020-15801`). |
| 24712 |
|
| 24713 |
- bpo-41162: Audit hooks are now cleared later during finalization to avoid |
| 24714 |
missing events. |
| 24715 |
|
| 24716 |
- bpo-29778: Ensure :file:`python3.dll` is loaded from correct locations |
| 24717 |
when Python is embedded (:cve:`2020-15523`). |
| 24718 |
|
| 24719 |
- bpo-41004: The __hash__() methods of ipaddress.IPv4Interface and |
| 24720 |
ipaddress.IPv6Interface incorrectly generated constant hash values of 32 |
| 24721 |
and 128 respectively. This resulted in always causing hash collisions. The |
| 24722 |
fix uses hash() to generate hash values for the tuple of (address, mask |
| 24723 |
length, network address). |
| 24724 |
|
| 24725 |
- bpo-39603: Prevent http header injection by rejecting control characters |
| 24726 |
in http.client.putrequest(...). |
| 24727 |
|
| 24728 |
Core and Builtins |
| 24729 |
----------------- |
| 24730 |
|
| 24731 |
- bpo-41909: Fixed stack overflow in :func:`issubclass` and |
| 24732 |
:func:`isinstance` when getting the ``__bases__`` attribute leads to |
| 24733 |
infinite recursion. |
| 24734 |
|
| 24735 |
- bpo-41922: Speed up calls to ``reversed()`` by using the :pep:`590` |
| 24736 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 24737 |
|
| 24738 |
- bpo-41873: Calls to ``float()`` are now faster due to the ``vectorcall`` |
| 24739 |
calling convention. Patch by Dennis Sweeney. |
| 24740 |
|
| 24741 |
- bpo-41870: Speed up calls to ``bool()`` by using the :pep:`590` |
| 24742 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 24743 |
|
| 24744 |
Library |
| 24745 |
------- |
| 24746 |
|
| 24747 |
- bpo-1635741: Port the :mod:`!_bisect` module to the multi-phase |
| 24748 |
initialization API (:pep:`489`). |
| 24749 |
|
| 24750 |
Core and Builtins |
| 24751 |
----------------- |
| 24752 |
|
| 24753 |
- bpo-39934: Correctly count control blocks in 'except' in compiler. Ensures |
| 24754 |
that a syntax error, rather a fatal error, occurs for deeply nested, named |
| 24755 |
exception handlers. |
| 24756 |
|
| 24757 |
- bpo-41780: Fix :meth:`__dir__` of :class:`types.GenericAlias`. Patch by |
| 24758 |
Batuhan Taskaya. |
| 24759 |
|
| 24760 |
Library |
| 24761 |
------- |
| 24762 |
|
| 24763 |
- bpo-1635741: Port the :mod:`!_lsprof` extension module to multi-phase |
| 24764 |
initialization (:pep:`489`). |
| 24765 |
|
| 24766 |
- bpo-1635741: Port the :mod:`cmath` extension module to multi-phase |
| 24767 |
initialization (:pep:`489`). |
| 24768 |
|
| 24769 |
- bpo-1635741: Port the :mod:`!_scproxy` extension module to multi-phase |
| 24770 |
initialization (:pep:`489`). |
| 24771 |
|
| 24772 |
- bpo-1635741: Port the :mod:`termios` extension module to multi-phase |
| 24773 |
initialization (:pep:`489`). |
| 24774 |
|
| 24775 |
- bpo-1635741: Convert the :mod:`!_sha256` extension module types to heap |
| 24776 |
types. |
| 24777 |
|
| 24778 |
Core and Builtins |
| 24779 |
----------------- |
| 24780 |
|
| 24781 |
- bpo-41690: Fix a possible stack overflow in the parser when parsing |
| 24782 |
functions and classes with a huge amount of arguments. Patch by Pablo |
| 24783 |
Galindo. |
| 24784 |
|
| 24785 |
Library |
| 24786 |
------- |
| 24787 |
|
| 24788 |
- bpo-1635741: Port the :mod:`!_overlapped` extension module to multi-phase |
| 24789 |
initialization (:pep:`489`). |
| 24790 |
|
| 24791 |
- bpo-1635741: Port the :mod:`!_curses_panel` extension module to |
| 24792 |
multi-phase initialization (:pep:`489`). |
| 24793 |
|
| 24794 |
- bpo-1635741: Port the :mod:`!_opcode` extension module to multi-phase |
| 24795 |
initialization (:pep:`489`). |
| 24796 |
|
| 24797 |
Core and Builtins |
| 24798 |
----------------- |
| 24799 |
|
| 24800 |
- bpo-41681: Fixes the wrong error description in the error raised by using |
| 24801 |
2 ``,`` in format string in f-string and :meth:`str.format`. |
| 24802 |
|
| 24803 |
Library |
| 24804 |
------- |
| 24805 |
|
| 24806 |
- bpo-41675: The implementation of :func:`signal.siginterrupt` now uses |
| 24807 |
:c:func:`!sigaction` (if it is available in the system) instead of the |
| 24808 |
deprecated :c:func:`!siginterrupt`. Patch by Pablo Galindo. |
| 24809 |
|
| 24810 |
Core and Builtins |
| 24811 |
----------------- |
| 24812 |
|
| 24813 |
- bpo-41670: Prevent line trace being skipped on platforms not compiled with |
| 24814 |
``USE_COMPUTED_GOTOS``. Fixes issue where some lines nested within a |
| 24815 |
try-except block were not being traced on Windows. |
| 24816 |
|
| 24817 |
- bpo-41654: Fix a crash that occurred when destroying subclasses of |
| 24818 |
:class:`MemoryError`. Patch by Pablo Galindo. |
| 24819 |
|
| 24820 |
Library |
| 24821 |
------- |
| 24822 |
|
| 24823 |
- bpo-1635741: Port the :mod:`zlib` extension module to multi-phase |
| 24824 |
initialization (:pep:`489`). |
| 24825 |
|
| 24826 |
Core and Builtins |
| 24827 |
----------------- |
| 24828 |
|
| 24829 |
- bpo-41631: The ``_ast`` module uses again a global state. Using a module |
| 24830 |
state per module instance is causing subtle practical problems. For |
| 24831 |
example, the Mercurial project replaces the ``__import__()`` function to |
| 24832 |
implement lazy import, whereas Python expected that ``import _ast`` always |
| 24833 |
return a fully initialized ``_ast`` module. |
| 24834 |
|
| 24835 |
Library |
| 24836 |
------- |
| 24837 |
|
| 24838 |
- bpo-40077: Convert :mod:`!_operator` to use :c:func:`PyType_FromSpec`. |
| 24839 |
|
| 24840 |
Core and Builtins |
| 24841 |
----------------- |
| 24842 |
|
| 24843 |
- bpo-1653741: Port :mod:`!_sha3` to multi-phase init. Convert static types |
| 24844 |
to heap types. |
| 24845 |
|
| 24846 |
Library |
| 24847 |
------- |
| 24848 |
|
| 24849 |
- bpo-1635741: Port the :mod:`!_blake2` extension module to the multi-phase |
| 24850 |
initialization API (:pep:`489`). |
| 24851 |
|
| 24852 |
Core and Builtins |
| 24853 |
----------------- |
| 24854 |
|
| 24855 |
- bpo-41533: Free the stack allocated in ``va_build_stack`` if |
| 24856 |
``do_mkstack`` fails and the stack is not a ``small_stack``. |
| 24857 |
|
| 24858 |
- bpo-41531: Fix a bug that was dropping keys when compiling dict literals |
| 24859 |
with more than 0xFFFF elements. Patch by Pablo Galindo. |
| 24860 |
|
| 24861 |
- bpo-41525: The output of ``python --help`` contains now only ASCII |
| 24862 |
characters. |
| 24863 |
|
| 24864 |
Library |
| 24865 |
------- |
| 24866 |
|
| 24867 |
- bpo-1635741: Port the :mod:`!_sha1`, :mod:`!_sha512`, and :mod:`!_md5` |
| 24868 |
extension modules to multi-phase initialization API (:pep:`489`). |
| 24869 |
|
| 24870 |
Core and Builtins |
| 24871 |
----------------- |
| 24872 |
|
| 24873 |
- bpo-41431: Optimize ``dict_merge()`` for copying dict (e.g. ``dict(d)`` |
| 24874 |
and ``{}.update(d)``). |
| 24875 |
|
| 24876 |
- bpo-41428: Implement PEP 604. This supports (int | str) etc. in place of |
| 24877 |
Union[str, int]. |
| 24878 |
|
| 24879 |
- bpo-41340: Removed fallback implementation for ``strdup``. |
| 24880 |
|
| 24881 |
- bpo-38156: Handle interrupts that come after EOF correctly in |
| 24882 |
``PyOS_StdioReadline``. |
| 24883 |
|
| 24884 |
- bpo-41342: :func:`round` with integer argument is now faster (9--60%). |
| 24885 |
|
| 24886 |
- bpo-41334: Constructors :func:`str`, :func:`bytes` and :func:`bytearray` |
| 24887 |
are now faster (around 30--40% for small objects). |
| 24888 |
|
| 24889 |
- bpo-41295: Resolve a regression in CPython 3.8.4 where defining |
| 24890 |
"__setattr__" in a multi-inheritance setup and calling up the hierarchy |
| 24891 |
chain could fail if builtins/extension types were involved in the base |
| 24892 |
types. |
| 24893 |
|
| 24894 |
- bpo-41323: Bytecode optimizations are performed directly on the control |
| 24895 |
flow graph. This will result in slightly more compact code objects in some |
| 24896 |
circumstances. |
| 24897 |
|
| 24898 |
- bpo-41247: Always cache the running loop holder when running |
| 24899 |
``asyncio.set_running_loop``. |
| 24900 |
|
| 24901 |
- bpo-41252: Fix incorrect refcounting in _ssl.c's |
| 24902 |
``_servername_callback()``. |
| 24903 |
|
| 24904 |
- bpo-1635741: Port :mod:`multiprocessing` to multi-phase initialization |
| 24905 |
|
| 24906 |
Library |
| 24907 |
------- |
| 24908 |
|
| 24909 |
- bpo-1635741: Port :mod:`winapi` to multiphase initialization |
| 24910 |
|
| 24911 |
Core and Builtins |
| 24912 |
----------------- |
| 24913 |
|
| 24914 |
- bpo-41215: Use non-NULL default values in the PEG parser keyword list to |
| 24915 |
overcome a bug that was preventing Python from being properly compiled |
| 24916 |
when using the XLC compiler. Patch by Pablo Galindo. |
| 24917 |
|
| 24918 |
- bpo-41218: Python 3.8.3 had a regression where compiling with |
| 24919 |
ast.PyCF_ALLOW_TOP_LEVEL_AWAIT would aggressively mark list comprehension |
| 24920 |
with CO_COROUTINE. Now only list comprehension making use of async/await |
| 24921 |
will tagged as so. |
| 24922 |
|
| 24923 |
Library |
| 24924 |
------- |
| 24925 |
|
| 24926 |
- bpo-1635741: Port :mod:`faulthandler` to multiphase initialization. |
| 24927 |
|
| 24928 |
- bpo-1635741: Port :mod:`sha256` to multiphase initialization |
| 24929 |
|
| 24930 |
Core and Builtins |
| 24931 |
----------------- |
| 24932 |
|
| 24933 |
- bpo-41175: Guard against a NULL pointer dereference within bytearrayobject |
| 24934 |
triggered by the ``bytearray() + bytearray()`` operation. |
| 24935 |
|
| 24936 |
- bpo-41100: add arm64 to the allowable Mac OS arches in mpdecimal.h |
| 24937 |
|
| 24938 |
- bpo-41094: Fix decoding errors with audit when open files with non-ASCII |
| 24939 |
names on non-UTF-8 locale. |
| 24940 |
|
| 24941 |
- bpo-39960: The "hackcheck" that prevents sneaking around a type's |
| 24942 |
__setattr__() by calling the superclass method was rewritten to allow C |
| 24943 |
implemented heap types. |
| 24944 |
|
| 24945 |
- bpo-41084: Prefix the error message with 'f-string: ', when parsing an |
| 24946 |
f-string expression which throws a :exc:`SyntaxError`. |
| 24947 |
|
| 24948 |
- bpo-40521: Empty frozensets are no longer singletons. |
| 24949 |
|
| 24950 |
- bpo-41076: Pre-feed the parser with the location of the f-string |
| 24951 |
expression, not the f-string itself, which allows us to skip the shifting |
| 24952 |
of the AST node locations after the parsing is completed. |
| 24953 |
|
| 24954 |
- bpo-41056: Fixes a reference to deallocated stack space during startup |
| 24955 |
when constructing sys.path involving a relative symlink when code was |
| 24956 |
supplied via -c. (discovered via Coverity) |
| 24957 |
|
| 24958 |
- bpo-41061: Fix incorrect expressions and asserts in hashtable code and |
| 24959 |
tests. |
| 24960 |
|
| 24961 |
- bpo-41052: Opt out serialization/deserialization for _random.Random |
| 24962 |
|
| 24963 |
- bpo-40939: Rename ``PyPegen*`` functions to ``PyParser*``, so that we can |
| 24964 |
remove the old set of ``PyParser*`` functions that were using the old |
| 24965 |
parser, but keep everything backwards-compatible. |
| 24966 |
|
| 24967 |
- bpo-35975: Stefan Behnel reported that cf_feature_version is used even |
| 24968 |
when PyCF_ONLY_AST is not set. This is against the intention and against |
| 24969 |
the documented behavior, so it's been fixed. |
| 24970 |
|
| 24971 |
- bpo-40939: Remove the remaining files from the old parser and the |
| 24972 |
:mod:`symbol` module. |
| 24973 |
|
| 24974 |
Library |
| 24975 |
------- |
| 24976 |
|
| 24977 |
- bpo-40077: Convert :mod:`!_bz2` to use :c:func:`PyType_FromSpec`. |
| 24978 |
|
| 24979 |
Core and Builtins |
| 24980 |
----------------- |
| 24981 |
|
| 24982 |
- bpo-41006: The ``encodings.latin_1`` module is no longer imported at |
| 24983 |
startup. Now it is only imported when it is the filesystem encoding or the |
| 24984 |
stdio encoding. |
| 24985 |
|
| 24986 |
- bpo-40636: :func:`zip` now supports :pep:`618`'s ``strict`` parameter, |
| 24987 |
which raises a :exc:`ValueError` if the arguments are exhausted at |
| 24988 |
different lengths. Patch by Brandt Bucher. |
| 24989 |
|
| 24990 |
- bpo-1635741: Port :mod:`!_gdbm` to multiphase initialization. |
| 24991 |
|
| 24992 |
- bpo-40985: Fix a bug that caused the :exc:`SyntaxError` text to be empty |
| 24993 |
when a file ends with a line ending in a line continuation character (i.e. |
| 24994 |
backslash). The error text should contain the text of the last line. |
| 24995 |
|
| 24996 |
- bpo-40958: Fix a possible buffer overflow in the PEG parser when gathering |
| 24997 |
information for emitting syntax errors. Patch by Pablo Galindo. |
| 24998 |
|
| 24999 |
- bpo-1635741: Port :mod:`!_dbm` to multiphase initialization. |
| 25000 |
|
| 25001 |
- bpo-40957: Fix refleak in _Py_fopen_obj() when PySys_Audit() fails |
| 25002 |
|
| 25003 |
Library |
| 25004 |
------- |
| 25005 |
|
| 25006 |
- bpo-40950: Add a state to the :mod:`!nis` module (:pep:`3121`) and apply |
| 25007 |
the multiphase initialization. Patch by Donghee Na. |
| 25008 |
|
| 25009 |
Core and Builtins |
| 25010 |
----------------- |
| 25011 |
|
| 25012 |
- bpo-40947: The Python :ref:`Path Configuration <init-path-config>` now |
| 25013 |
takes :c:member:`PyConfig.platlibdir` in account. |
| 25014 |
|
| 25015 |
- bpo-40939: Remove the old parser, the :mod:`parser` module and all |
| 25016 |
associated support code, command-line options and environment variables. |
| 25017 |
Patch by Pablo Galindo. |
| 25018 |
|
| 25019 |
- bpo-40847: Fix a bug where a line with only a line continuation character |
| 25020 |
is not considered a blank line at tokenizer level. In such cases, more |
| 25021 |
than a single ``NEWLINE`` token was emitted. The old parser was working |
| 25022 |
around the issue, but the new parser threw a :exc:`SyntaxError` for valid |
| 25023 |
input due to this. For example, an empty line following a line |
| 25024 |
continuation character was interpreted as a :exc:`SyntaxError`. |
| 25025 |
|
| 25026 |
- bpo-40890: Each dictionary view now has a ``mapping`` attribute that |
| 25027 |
provides a :class:`types.MappingProxyType` wrapping the original |
| 25028 |
dictionary. Patch contributed by Dennis Sweeney. |
| 25029 |
|
| 25030 |
- bpo-40889: Improved the performance of symmetric difference operations on |
| 25031 |
dictionary item views. Patch by Dennis Sweeney. |
| 25032 |
|
| 25033 |
- bpo-40904: Fix possible segfault in the new PEG parser when parsing |
| 25034 |
f-string containing yield statements with no value (:code:`f"{yield}"`). |
| 25035 |
Patch by Pablo Galindo |
| 25036 |
|
| 25037 |
- bpo-40903: Fixed a possible segfault in the new PEG parser when producing |
| 25038 |
error messages for invalid assignments of the form :code:`p=p=`. Patch by |
| 25039 |
Pablo Galindo |
| 25040 |
|
| 25041 |
- bpo-40880: Fix invalid memory read in the new parser when checking |
| 25042 |
newlines in string literals. Patch by Pablo Galindo. |
| 25043 |
|
| 25044 |
- bpo-40883: Fix memory leak in when parsing f-strings in the new parser. |
| 25045 |
Patch by Pablo Galindo |
| 25046 |
|
| 25047 |
- bpo-40870: Raise :exc:`ValueError` when validating custom AST's where the |
| 25048 |
constants ``True``, ``False`` and ``None`` are used within a |
| 25049 |
:class:`ast.Name` node. |
| 25050 |
|
| 25051 |
- bpo-40854: Allow overriding :data:`sys.platlibdir` via a new |
| 25052 |
:envvar:`PYTHONPLATLIBDIR` environment variable. |
| 25053 |
|
| 25054 |
- bpo-40826: Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set |
| 25055 |
an exception and pass the Python thread state when checking if there is a |
| 25056 |
pending signal. |
| 25057 |
|
| 25058 |
- bpo-1635741: Port :mod:`fcntl` to multiphase initialization. |
| 25059 |
|
| 25060 |
- bpo-19468: Delete unnecessary instance check in importlib.reload(). Patch |
| 25061 |
by Furkan Önder. |
| 25062 |
|
| 25063 |
- bpo-40824: Unexpected errors in calling the ``__iter__`` method are no |
| 25064 |
longer masked by ``TypeError`` in the :keyword:`in` operator and functions |
| 25065 |
:func:`~operator.contains`, :func:`~operator.indexOf` and |
| 25066 |
:func:`~operator.countOf` of the :mod:`operator` module. |
| 25067 |
|
| 25068 |
- bpo-40792: Attributes ``start``, ``stop`` and ``step`` of the |
| 25069 |
:class:`range` object now always has exact type :class:`int`. Previously, |
| 25070 |
they could have been an instance of a subclass of ``int``. |
| 25071 |
|
| 25072 |
- bpo-40780: Fix a corner case where g-style string formatting of a float |
| 25073 |
failed to remove trailing zeros. |
| 25074 |
|
| 25075 |
- bpo-38964: When there's a :exc:`SyntaxError` in the expression part of an |
| 25076 |
fstring, the filename attribute of the :exc:`SyntaxError` gets correctly |
| 25077 |
set to the name of the file the fstring resides in. |
| 25078 |
|
| 25079 |
- bpo-40750: Support the "-d" debug flag in the new PEG parser. Patch by |
| 25080 |
Pablo Galindo |
| 25081 |
|
| 25082 |
- bpo-40217: Instances of types created with |
| 25083 |
:c:func:`PyType_FromSpecWithBases` will no longer automatically visit |
| 25084 |
their class object when traversing references in the garbage collector. |
| 25085 |
The user is expected to manually visit the object's class. Patch by Pablo |
| 25086 |
Galindo. |
| 25087 |
|
| 25088 |
- bpo-39573: :c:func:`Py_TYPE()` is changed to the inline static function. |
| 25089 |
Patch by Donghee Na. |
| 25090 |
|
| 25091 |
- bpo-40696: Fix a hang that can arise after :meth:`generator.throw` due to |
| 25092 |
a cycle in the exception context chain. |
| 25093 |
|
| 25094 |
- bpo-40521: Each interpreter now its has own free lists, singletons and |
| 25095 |
caches: |
| 25096 |
|
| 25097 |
* Free lists: float, tuple, list, dict, frame, context, |
| 25098 |
asynchronous generator, MemoryError. |
| 25099 |
* Singletons: empty tuple, empty bytes string, empty Unicode string, |
| 25100 |
single byte character, single Unicode (latin1) character. |
| 25101 |
* Slice cache. |
| 25102 |
|
| 25103 |
They are no longer shared by all interpreters. |
| 25104 |
|
| 25105 |
- bpo-40679: Certain :exc:`TypeError` messages about missing or extra |
| 25106 |
arguments now include the function's :term:`qualified name`. Patch by |
| 25107 |
Dennis Sweeney. |
| 25108 |
|
| 25109 |
- bpo-29590: Make the stack trace correct after calling |
| 25110 |
:meth:`generator.throw` on a generator that has yielded from a ``yield |
| 25111 |
from``. |
| 25112 |
|
| 25113 |
- bpo-4022: Improve performance of generators by not raising internal |
| 25114 |
StopIteration. |
| 25115 |
|
| 25116 |
Library |
| 25117 |
------- |
| 25118 |
|
| 25119 |
- bpo-1635741: Port :mod:`mmap` to multiphase initialization. |
| 25120 |
|
| 25121 |
- bpo-1635741: Port :mod:`!_lzma` to multiphase initialization. |
| 25122 |
|
| 25123 |
Core and Builtins |
| 25124 |
----------------- |
| 25125 |
|
| 25126 |
- bpo-37999: Builtin and extension functions that take integer arguments no |
| 25127 |
longer accept :class:`~decimal.Decimal`\ s, :class:`~fractions.Fraction`\ |
| 25128 |
s and other objects that can be converted to integers only with a loss |
| 25129 |
(e.g. that have the :meth:`~object.__int__` method but do not have the |
| 25130 |
:meth:`~object.__index__` method). |
| 25131 |
|
| 25132 |
- bpo-29882: Add :meth:`int.bit_count`, counting the number of ones in the |
| 25133 |
binary representation of an integer. Patch by Niklas Fiekas. |
| 25134 |
|
| 25135 |
Library |
| 25136 |
------- |
| 25137 |
|
| 25138 |
- bpo-36982: Use ncurses extended color functions when available to support |
| 25139 |
terminals with 256 colors, and add the new function |
| 25140 |
:func:`curses.has_extended_color_support` to indicate whether extended |
| 25141 |
color support is provided by the underlying ncurses library. |
| 25142 |
|
| 25143 |
Core and Builtins |
| 25144 |
----------------- |
| 25145 |
|
| 25146 |
- bpo-19569: Add the private macros ``_Py_COMP_DIAG_PUSH``, |
| 25147 |
``_Py_COMP_DIAG_IGNORE_DEPR_DECLS``, and ``_Py_COMP_DIAG_POP``. |
| 25148 |
|
| 25149 |
- bpo-26680: The int type now supports the x.is_integer() method for |
| 25150 |
compatibility with float. |
| 25151 |
|
| 25152 |
Library |
| 25153 |
------- |
| 25154 |
|
| 25155 |
- bpo-41900: C14N 2.0 serialisation in xml.etree.ElementTree failed for |
| 25156 |
unprefixed attributes when a default namespace was defined. |
| 25157 |
|
| 25158 |
- bpo-41887: Strip leading spaces and tabs on :func:`ast.literal_eval`. Also |
| 25159 |
document stripping of spaces and tabs for :func:`eval`. |
| 25160 |
|
| 25161 |
- bpo-41773: Note in documentation that :func:`random.choices` doesn't |
| 25162 |
support non-finite weights, raise :exc:`ValueError` when given non-finite |
| 25163 |
weights. |
| 25164 |
|
| 25165 |
- bpo-41840: Fix a bug in the :mod:`symtable` module that was causing |
| 25166 |
module-scope global variables to not be reported as both local and global. |
| 25167 |
Patch by Pablo Galindo. |
| 25168 |
|
| 25169 |
- bpo-41842: Add :func:`codecs.unregister` function to unregister a codec |
| 25170 |
search function. |
| 25171 |
|
| 25172 |
- bpo-40564: In ``zipfile.Path``, mutate the passed ZipFile object type |
| 25173 |
instead of making a copy. Prevents issues when both the local copy and the |
| 25174 |
caller’s copy attempt to close the same file handle. |
| 25175 |
|
| 25176 |
- bpo-40670: More reliable validation of statements in |
| 25177 |
:class:`timeit.Timer`. It now accepts "empty" statements (only whitespaces |
| 25178 |
and comments) and rejects misindentent statements. |
| 25179 |
|
| 25180 |
- bpo-41833: The :class:`threading.Thread` constructor now uses the target |
| 25181 |
name if the *target* argument is specified but the *name* argument is |
| 25182 |
omitted. |
| 25183 |
|
| 25184 |
- bpo-41817: fix ``tkinter.EventType`` Enum so all members are strings, and |
| 25185 |
none are tuples |
| 25186 |
|
| 25187 |
- bpo-41810: :data:`types.EllipsisType`, :data:`types.NotImplementedType` |
| 25188 |
and :data:`types.NoneType` have been reintroduced, providing a new set of |
| 25189 |
types readily interpretable by static type checkers. |
| 25190 |
|
| 25191 |
- bpo-41815: Fix SQLite3 segfault when backing up closed database. Patch |
| 25192 |
contributed by Peter David McCormick. |
| 25193 |
|
| 25194 |
- bpo-41816: StrEnum added: it ensures that all members are already strings |
| 25195 |
or string candidates |
| 25196 |
|
| 25197 |
- bpo-41517: fix bug allowing Enums to be extended via multiple inheritance |
| 25198 |
|
| 25199 |
- bpo-39587: use the correct mix-in data type when constructing Enums |
| 25200 |
|
| 25201 |
- bpo-41792: Add is_typeddict function to typing.py to check if a type is a |
| 25202 |
TypedDict class |
| 25203 |
|
| 25204 |
Previously there was no way to check that without using private API. See |
| 25205 |
the `relevant issue in python/typing |
| 25206 |
<https://github.com/python/typing/issues/751>`_. |
| 25207 |
|
| 25208 |
- bpo-41789: Honor ``object`` overrides in ``Enum`` class creation |
| 25209 |
(specifically, ``__str__``, ``__repr__``, ``__format__``, and |
| 25210 |
``__reduce_ex__``). |
| 25211 |
|
| 25212 |
- bpo-32218: ``enum.Flag`` and ``enum.IntFlag`` members are now iterable. |
| 25213 |
|
| 25214 |
- bpo-39651: Fix a race condition in the ``call_soon_threadsafe()`` method |
| 25215 |
of ``asyncio.ProactorEventLoop``: do nothing if the self-pipe socket has |
| 25216 |
been closed. |
| 25217 |
|
| 25218 |
- bpo-1635741: Port the ``mashal`` extension module to the multi-phase |
| 25219 |
initialization API (:pep:`489`). |
| 25220 |
|
| 25221 |
- bpo-1635741: Port the ``_string`` extension module to the multi-phase |
| 25222 |
initialization API (:pep:`489`). |
| 25223 |
|
| 25224 |
- bpo-41732: Added an :term:`iterator` to :class:`memoryview`. |
| 25225 |
|
| 25226 |
- bpo-41720: Fixed :meth:`turtle.Vec2D.__rmul__` for arguments which are not |
| 25227 |
int or float. |
| 25228 |
|
| 25229 |
- bpo-41696: Fix handling of debug mode in :func:`asyncio.run`. This allows |
| 25230 |
setting ``PYTHONASYNCIODEBUG`` or ``-X dev`` to enable asyncio debug mode |
| 25231 |
when using :func:`asyncio.run`. |
| 25232 |
|
| 25233 |
- bpo-41687: Fix implementation of sendfile to be compatible with Solaris. |
| 25234 |
|
| 25235 |
- bpo-41662: No longer override exceptions raised in ``__len__()`` of a |
| 25236 |
sequence of parameters in :mod:`sqlite3` with |
| 25237 |
:exc:`~sqlite3.ProgrammingError`. |
| 25238 |
|
| 25239 |
- bpo-39010: Restarting a ``ProactorEventLoop`` on Windows no longer logs |
| 25240 |
spurious ``ConnectionResetErrors``. |
| 25241 |
|
| 25242 |
- bpo-41638: :exc:`~sqlite3.ProgrammingError` message for absent parameter |
| 25243 |
in :mod:`sqlite3` contains now the name of the parameter instead of its |
| 25244 |
index when parameters are supplied as a dict. |
| 25245 |
|
| 25246 |
- bpo-41662: Fixed crash when mutate list of parameters during iteration in |
| 25247 |
:mod:`sqlite3`. |
| 25248 |
|
| 25249 |
- bpo-41513: Improved the accuracy of math.hypot(). Internally, each step |
| 25250 |
is computed with extra precision so that the result is now almost always |
| 25251 |
correctly rounded. |
| 25252 |
|
| 25253 |
- bpo-41609: The pdb whatis command correctly reports instance methods as |
| 25254 |
'Method' rather than 'Function'. |
| 25255 |
|
| 25256 |
- bpo-39994: Fixed pprint's handling of dict subclasses that override |
| 25257 |
__repr__. |
| 25258 |
|
| 25259 |
- bpo-32751: When cancelling the task due to a timeout, |
| 25260 |
:meth:`asyncio.wait_for` will now wait until the cancellation is complete |
| 25261 |
also in the case when *timeout* is <= 0, like it does with positive |
| 25262 |
timeouts. |
| 25263 |
|
| 25264 |
- bpo-37658: :meth:`asyncio.wait_for` now properly handles races between |
| 25265 |
cancellation of itself and the completion of the wrapped awaitable. |
| 25266 |
|
| 25267 |
- bpo-40782: Change the method asyncio.AbstractEventLoop.run_in_executor to |
| 25268 |
not be a coroutine. |
| 25269 |
|
| 25270 |
- bpo-41520: Fix :mod:`codeop` regression that prevented turning compile |
| 25271 |
warnings into errors. |
| 25272 |
|
| 25273 |
- bpo-41528: turtle uses math module functions to convert degrees to radians |
| 25274 |
and vice versa and to calculate vector norm |
| 25275 |
|
| 25276 |
- bpo-41513: Minor algorithmic improvement to math.hypot() and math.dist() |
| 25277 |
giving small gains in speed and accuracy. |
| 25278 |
|
| 25279 |
- bpo-41503: Fixed a race between setTarget and flush in |
| 25280 |
logging.handlers.MemoryHandler. |
| 25281 |
|
| 25282 |
- bpo-41497: Fix potential UnicodeDecodeError in dis module. |
| 25283 |
|
| 25284 |
- bpo-41467: On Windows, fix asyncio ``recv_into()`` return value when the |
| 25285 |
socket/pipe is closed (:exc:`BrokenPipeError`): return ``0`` rather than |
| 25286 |
an empty byte string (``b''``). |
| 25287 |
|
| 25288 |
- bpo-41425: Make tkinter doc example runnable. |
| 25289 |
|
| 25290 |
- bpo-41421: Make an algebraic simplification to random.paretovariate(). It |
| 25291 |
now is slightly less subject to round-off error and is slightly faster. |
| 25292 |
Inputs that used to cause ZeroDivisionError now cause an OverflowError |
| 25293 |
instead. |
| 25294 |
|
| 25295 |
- bpo-41440: Add :func:`os.cpu_count` support for VxWorks RTOS. |
| 25296 |
|
| 25297 |
- bpo-41316: Fix the :mod:`tarfile` module to write only basename of TAR |
| 25298 |
file to GZIP compression header. |
| 25299 |
|
| 25300 |
- bpo-41384: Raise TclError instead of TypeError when an unknown option is |
| 25301 |
passed to tkinter.OptionMenu. |
| 25302 |
|
| 25303 |
- bpo-41317: Use add_done_callback() in asyncio.loop.sock_accept() to |
| 25304 |
unsubscribe reader early on cancellation. |
| 25305 |
|
| 25306 |
- bpo-41364: Reduce import overhead of :mod:`uuid`. |
| 25307 |
|
| 25308 |
- bpo-35328: Set the environment variable ``VIRTUAL_ENV_PROMPT`` at |
| 25309 |
:mod:`venv` activation. |
| 25310 |
|
| 25311 |
- bpo-41341: Recursive evaluation of ``typing.ForwardRef`` in |
| 25312 |
``get_type_hints``. |
| 25313 |
|
| 25314 |
- bpo-41344: Prevent creating :class:`shared_memory.SharedMemory` objects |
| 25315 |
with :code:`size=0`. |
| 25316 |
|
| 25317 |
- bpo-41333: :meth:`collections.OrderedDict.pop` is now 2 times faster. |
| 25318 |
|
| 25319 |
- bpo-41288: Unpickling invalid NEWOBJ_EX opcode with the C implementation |
| 25320 |
raises now UnpicklingError instead of crashing. |
| 25321 |
|
| 25322 |
- bpo-39017: Avoid infinite loop when reading specially crafted TAR files |
| 25323 |
using the tarfile module (:cve:`2019-20907`). |
| 25324 |
|
| 25325 |
- bpo-41273: Speed up any transport using ``_ProactorReadPipeTransport`` by |
| 25326 |
calling ``recv_into`` instead of ``recv``, thus not creating a new buffer |
| 25327 |
for each ``recv`` call in the transport's read loop. |
| 25328 |
|
| 25329 |
- bpo-41235: Fix the error handling in |
| 25330 |
:meth:`ssl.SSLContext.load_dh_params`. |
| 25331 |
|
| 25332 |
- bpo-41207: In distutils.spawn, restore expectation that DistutilsExecError |
| 25333 |
is raised when the command is not found. |
| 25334 |
|
| 25335 |
- bpo-29727: Register :class:`array.array` as a |
| 25336 |
:class:`~collections.abc.MutableSequence`. Patch by Pablo Galindo. |
| 25337 |
|
| 25338 |
- bpo-39168: Remove the ``__new__`` method of :class:`typing.Generic`. |
| 25339 |
|
| 25340 |
- bpo-41194: Fix a crash in the ``_ast`` module: it can no longer be loaded |
| 25341 |
more than once. It now uses a global state rather than a module state. |
| 25342 |
|
| 25343 |
- bpo-41195: Add read-only ssl.SSLContext.security_level attribute to |
| 25344 |
retrieve the context's security level. |
| 25345 |
|
| 25346 |
- bpo-41193: The ``write_history()`` atexit function of the readline |
| 25347 |
completer now ignores any :exc:`OSError` to ignore error if the filesystem |
| 25348 |
is read-only, instead of only ignoring :exc:`FileNotFoundError` and |
| 25349 |
:exc:`PermissionError`. |
| 25350 |
|
| 25351 |
- bpo-41182: selector: use DefaultSelector based upon implementation |
| 25352 |
|
| 25353 |
- bpo-41161: The decimal module now requires libmpdec-2.5.0. Users of |
| 25354 |
--with-system-libmpdec should update their system library. |
| 25355 |
|
| 25356 |
- bpo-40874: The decimal module now requires libmpdec-2.5.0. |
| 25357 |
|
| 25358 |
- bpo-41138: Fixed the :mod:`trace` module CLI for Python source files with |
| 25359 |
non-UTF-8 encoding. |
| 25360 |
|
| 25361 |
- bpo-31082: Use the term "iterable" in the docstring for |
| 25362 |
:func:`functools.reduce`. |
| 25363 |
|
| 25364 |
- bpo-40521: Remove freelist from collections.deque(). |
| 25365 |
|
| 25366 |
- bpo-31938: Fix default-value signatures of several functions in the |
| 25367 |
:mod:`select` module - by Anthony Sottile. |
| 25368 |
|
| 25369 |
- bpo-41068: Fixed reading files with non-ASCII names from ZIP archive |
| 25370 |
directly after writing them. |
| 25371 |
|
| 25372 |
- bpo-41058: :func:`pdb.find_function` now correctly determines the source |
| 25373 |
file encoding. |
| 25374 |
|
| 25375 |
- bpo-41056: Invalid file descriptor values are now prevented from being |
| 25376 |
passed to os.fpathconf. (discovered by Coverity) |
| 25377 |
|
| 25378 |
- bpo-41056: Fix a NULL pointer dereference within the ssl module during a |
| 25379 |
MemoryError in the keylog callback. (discovered by Coverity) |
| 25380 |
|
| 25381 |
- bpo-41056: Fixed an instance where a MemoryError within the zoneinfo |
| 25382 |
module might not be reported or not reported at its source. (found by |
| 25383 |
Coverity) |
| 25384 |
|
| 25385 |
- bpo-41048: :func:`mimetypes.read_mime_types` function reads the rule file |
| 25386 |
using UTF-8 encoding, not the locale encoding. Patch by Srinivas Reddy |
| 25387 |
Thatiparthy. |
| 25388 |
|
| 25389 |
- bpo-41043: Fixed the use of :func:`~glob.glob` in the stdlib: literal part |
| 25390 |
of the path is now always correctly escaped. |
| 25391 |
|
| 25392 |
- bpo-41025: Fixed an issue preventing the C implementation of |
| 25393 |
:class:`zoneinfo.ZoneInfo` from being subclassed. |
| 25394 |
|
| 25395 |
- bpo-35018: Add the :class:`xml.sax.handler.LexicalHandler` class that is |
| 25396 |
present in other SAX XML implementations. |
| 25397 |
|
| 25398 |
- bpo-41002: Improve performance of HTTPResponse.read with a given amount. |
| 25399 |
Patch by Bruce Merry. |
| 25400 |
|
| 25401 |
- bpo-40448: :mod:`ensurepip` now disables the use of ``pip`` cache when |
| 25402 |
installing the bundled versions of ``pip`` and ``setuptools``. Patch by |
| 25403 |
Krzysztof Konopko. |
| 25404 |
|
| 25405 |
- bpo-40967: Removed :meth:`!asyncio.Task.current_task` and |
| 25406 |
:meth:`!asyncio.Task.all_tasks`. Patch contributed by Rémi Lapeyre. |
| 25407 |
|
| 25408 |
- bpo-40924: Ensure ``importlib.resources.path`` returns an extant path for |
| 25409 |
the SourceFileLoader's resource reader. Avoids the regression identified |
| 25410 |
in master while a long-term solution is devised. |
| 25411 |
|
| 25412 |
- bpo-40955: Fix a minor memory leak in :mod:`subprocess` module when |
| 25413 |
extra_groups was specified. |
| 25414 |
|
| 25415 |
- bpo-40855: The standard deviation and variance functions in the statistics |
| 25416 |
module were ignoring their mu and xbar arguments. |
| 25417 |
|
| 25418 |
- bpo-40939: Use the new PEG parser when generating the stdlib |
| 25419 |
:mod:`keyword` module. |
| 25420 |
|
| 25421 |
- bpo-23427: Add :data:`sys.orig_argv` attribute: the list of the original |
| 25422 |
command line arguments passed to the Python executable. |
| 25423 |
|
| 25424 |
- bpo-33689: Ignore empty or whitespace-only lines in .pth files. This |
| 25425 |
matches the documentated behavior. Before, empty lines caused the |
| 25426 |
site-packages dir to appear multiple times in sys.path. By Ido Michael, |
| 25427 |
contributors Malcolm Smith and Tal Einat. |
| 25428 |
|
| 25429 |
- bpo-40884: Added a ``defaults`` parameter to :class:`logging.Formatter`, |
| 25430 |
to allow specifying default values for custom fields. Patch by Asaf Alon |
| 25431 |
and Bar Harel. |
| 25432 |
|
| 25433 |
- bpo-40876: Clarify error message in the :mod:`csv` module. |
| 25434 |
|
| 25435 |
- bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. |
| 25436 |
|
| 25437 |
- bpo-40807: Stop codeop._maybe_compile, used by code.InteractiveInterpreter |
| 25438 |
(and IDLE). from emitting each warning three times. |
| 25439 |
|
| 25440 |
- bpo-32604: Fix reference leak in the :mod:`select` module when the module |
| 25441 |
is imported in a subinterpreter. |
| 25442 |
|
| 25443 |
- bpo-39791: Built-in loaders (SourceFileLoader and ZipImporter) now supply |
| 25444 |
``TraversableResources`` implementations for ``ResourceReader``, and the |
| 25445 |
fallback function has been removed. |
| 25446 |
|
| 25447 |
- bpo-39314: :class:`rlcompleter.Completer` and the standard Python shell |
| 25448 |
now close the parenthesis for functions that take no arguments. Patch |
| 25449 |
contributed by Rémi Lapeyre. |
| 25450 |
|
| 25451 |
- bpo-17005: The topological sort functionality that was introduced |
| 25452 |
initially in the :mod:`functools` module has been moved to a new |
| 25453 |
:mod:`graphlib` module to better accommodate the new tools and keep the |
| 25454 |
original scope of the :mod:`functools` module. Patch by Pablo Galindo |
| 25455 |
|
| 25456 |
- bpo-40834: Fix truncate when sending str object |
| 25457 |
with_xxsubinterpreters.channel_send. |
| 25458 |
|
| 25459 |
- bpo-40755: Add rich comparisons to collections.Counter(). |
| 25460 |
|
| 25461 |
- bpo-26407: Unexpected errors in calling the ``__iter__`` method are no |
| 25462 |
longer masked by ``TypeError`` in :func:`csv.reader`, |
| 25463 |
:func:`csv.writer.writerow` and :meth:`csv.writer.writerows`. |
| 25464 |
|
| 25465 |
- bpo-39384: Fixed email.contentmanager to allow set_content() to set a null |
| 25466 |
string. |
| 25467 |
|
| 25468 |
- bpo-40744: The :mod:`sqlite3` module uses SQLite API functions that |
| 25469 |
require SQLite v3.7.3 or higher. This patch removes support for older |
| 25470 |
SQLite versions, and explicitly requires SQLite 3.7.3 both at build, |
| 25471 |
compile and runtime. Patch by Sergey Fedoseev and Erlend E. Aasland. |
| 25472 |
|
| 25473 |
- bpo-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time |
| 25474 |
to avoid errors on some compilers. |
| 25475 |
|
| 25476 |
- bpo-38488: Update ensurepip to install pip 20.1.1 and setuptools 47.1.0. |
| 25477 |
|
| 25478 |
- bpo-40792: The result of :func:`operator.index` now always has exact type |
| 25479 |
:class:`int`. Previously, the result could have been an instance of a |
| 25480 |
subclass of ``int``. |
| 25481 |
|
| 25482 |
- bpo-40767: :mod:`webbrowser` now properly finds the default browser in |
| 25483 |
pure Wayland systems by checking the WAYLAND_DISPLAY environment variable. |
| 25484 |
Patch contributed by Jérémy Attali. |
| 25485 |
|
| 25486 |
- bpo-40791: :func:`hashlib.compare_digest` uses OpenSSL's |
| 25487 |
``CRYPTO_memcmp()`` function when OpenSSL is available. |
| 25488 |
|
| 25489 |
- bpo-40795: :mod:`ctypes` module: If ctypes fails to convert the result of |
| 25490 |
a callback or if a ctypes callback function raises an exception, |
| 25491 |
sys.unraisablehook is now called with an exception set. Previously, the |
| 25492 |
error was logged into stderr by :c:func:`PyErr_Print`. |
| 25493 |
|
| 25494 |
- bpo-16995: Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` |
| 25495 |
to support the Base32 Encoding with Extended Hex Alphabet. |
| 25496 |
|
| 25497 |
- bpo-30008: Fix :mod:`ssl` code to be compatible with OpenSSL 1.1.x builds |
| 25498 |
that use ``no-deprecated`` and ``--api=1.1.0``. |
| 25499 |
|
| 25500 |
- bpo-30064: Fix asyncio ``loop.sock_*`` race condition issue |
| 25501 |
|
| 25502 |
- bpo-40759: Deprecate the :mod:`symbol` module. |
| 25503 |
|
| 25504 |
- bpo-40756: The second argument (extra) of ``LoggerAdapter.__init__`` now |
| 25505 |
defaults to None. |
| 25506 |
|
| 25507 |
- bpo-37129: Add a new :const:`os.RWF_APPEND` flag for :func:`os.pwritev`. |
| 25508 |
|
| 25509 |
- bpo-40737: Fix possible reference leak for :mod:`sqlite3` initialization. |
| 25510 |
|
| 25511 |
- bpo-40726: Handle cases where the ``end_lineno`` is ``None`` on |
| 25512 |
:func:`ast.increment_lineno`. |
| 25513 |
|
| 25514 |
- bpo-40698: ``distutils`` upload creates SHA2-256 and Blake2b-256 digests. |
| 25515 |
MD5 digests is skipped if platform blocks MD5. |
| 25516 |
|
| 25517 |
- bpo-40695: :mod:`hashlib` no longer falls back to builtin hash |
| 25518 |
implementations when OpenSSL provides a hash digest and the algorithm is |
| 25519 |
blocked by security policy. |
| 25520 |
|
| 25521 |
- bpo-9216: :func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP |
| 25522 |
constructor ``_hashlib.new()``. test_hashlib and test_smtplib handle |
| 25523 |
strict security policy better. |
| 25524 |
|
| 25525 |
- bpo-40614: :func:`ast.parse` will not parse self documenting expressions |
| 25526 |
in f-strings when passed ``feature_version`` is less than ``(3, 8)``. |
| 25527 |
|
| 25528 |
- bpo-40626: Add h5 file extension as MIME Type application/x-hdf5, as per |
| 25529 |
HDF Group recommendation for HDF5 formatted data files. Patch contributed |
| 25530 |
by Mark Schwab. |
| 25531 |
|
| 25532 |
- bpo-25920: On macOS, when building Python for macOS 10.4 and older, which |
| 25533 |
wasn't the case for python.org macOS installer, :func:`socket.getaddrinfo` |
| 25534 |
no longer uses an internal lock to prevent race conditions when calling |
| 25535 |
``getaddrinfo()`` which is thread-safe since macOS 10.5. Python 3.9 |
| 25536 |
requires macOS 10.6 or newer. The internal lock caused random hang on fork |
| 25537 |
when another thread was calling :func:`socket.getaddrinfo`. The lock was |
| 25538 |
also used on FreeBSD older than 5.3, OpenBSD older than 201311 and NetBSD |
| 25539 |
older than 4. |
| 25540 |
|
| 25541 |
- bpo-40671: Prepare ``_hashlib`` for :pep:`489` and use |
| 25542 |
:c:func:`PyModule_AddType`. |
| 25543 |
|
| 25544 |
- bpo-32309: Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is |
| 25545 |
mainly used for running IO-bound functions in a separate thread to avoid |
| 25546 |
blocking the event loop, and essentially works as a high-level version of |
| 25547 |
:meth:`~asyncio.loop.run_in_executor` that can directly take keyword |
| 25548 |
arguments. |
| 25549 |
|
| 25550 |
- bpo-36543: Restored the deprecated :mod:`xml.etree.cElementTree` module. |
| 25551 |
|
| 25552 |
- bpo-40611: :const:`~mmap.MAP_POPULATE` constant has now been added to the |
| 25553 |
list of exported :mod:`mmap` module flags. |
| 25554 |
|
| 25555 |
- bpo-39881: PEP 554 for use in the test suite. (Patch By Joannah Nanjekye) |
| 25556 |
|
| 25557 |
- bpo-13097: ``ctypes`` now raises an ``ArgumentError`` when a callback is |
| 25558 |
invoked with more than 1024 arguments. |
| 25559 |
|
| 25560 |
- bpo-39385: A new test assertion context-manager, |
| 25561 |
:func:`unittest.assertNoLogs` will ensure a given block of code emits no |
| 25562 |
log messages using the logging module. Contributed by Kit Yan Choi. |
| 25563 |
|
| 25564 |
- bpo-23082: Updated the error message and docs of PurePath.relative_to() to |
| 25565 |
better reflect the function behaviour. |
| 25566 |
|
| 25567 |
- bpo-40318: Use SQLite3 trace v2 API, if it is available. |
| 25568 |
|
| 25569 |
- bpo-40105: ZipFile truncates files to avoid corruption when a shorter |
| 25570 |
comment is provided in append ("a") mode. Patch by Jan Mazur. |
| 25571 |
|
| 25572 |
- bpo-40084: Fix ``Enum.__dir__``: dir(Enum.member) now includes attributes |
| 25573 |
as well as methods. |
| 25574 |
|
| 25575 |
- bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than |
| 25576 |
OSError when peer closes connection during TLS negotiation |
| 25577 |
|
| 25578 |
- bpo-39728: fix default ``_missing_`` so a duplicate ``ValueError`` is not |
| 25579 |
set as the ``__context__`` of the original ``ValueError``. |
| 25580 |
|
| 25581 |
- bpo-39244: Fixed :class:`multiprocessing.context.get_all_start_methods` to |
| 25582 |
properly return the default method first on macOS. |
| 25583 |
|
| 25584 |
- bpo-39040: Fix parsing of invalid mime headers parameters by collapsing |
| 25585 |
whitespace between encoded words in a bare-quote-string. |
| 25586 |
|
| 25587 |
- bpo-38731: Add ``--quiet`` option to command-line interface of |
| 25588 |
:mod:`py_compile`. Patch by Gregory Schevchenko. |
| 25589 |
|
| 25590 |
- bpo-35714: :exc:`struct.error` is now raised if there is a null character |
| 25591 |
in a :mod:`struct` format string. |
| 25592 |
|
| 25593 |
- bpo-38144: Added the *root_dir* and *dir_fd* parameters in |
| 25594 |
:func:`glob.glob`. |
| 25595 |
|
| 25596 |
- bpo-26543: Fix :meth:`IMAP4.noop` when debug mode is enabled (ex: |
| 25597 |
``imaplib.Debug = 3``). |
| 25598 |
|
| 25599 |
- bpo-12178: :func:`csv.writer` now correctly escapes *escapechar* when |
| 25600 |
input contains *escapechar*. Patch by Catalin Iacob, Berker Peksag, and |
| 25601 |
Itay Elbirt. |
| 25602 |
|
| 25603 |
- bpo-36290: AST nodes are now raising :exc:`TypeError` on conflicting |
| 25604 |
keyword arguments. Patch contributed by Rémi Lapeyre. |
| 25605 |
|
| 25606 |
- bpo-33944: Added site.py site-packages tracing in verbose mode. |
| 25607 |
|
| 25608 |
- bpo-35078: Refactor formatweekday, formatmonthname methods in |
| 25609 |
LocaleHTMLCalendar and LocaleTextCalendar classes in calendar module to |
| 25610 |
call the base class methods.This enables customizable CSS classes for |
| 25611 |
LocaleHTMLCalendar. Patch by Srinivas Reddy Thatiparthy |
| 25612 |
|
| 25613 |
- bpo-29620: :func:`~unittest.TestCase.assertWarns` no longer raises a |
| 25614 |
``RuntimeException`` when accessing a module's ``__warningregistry__`` |
| 25615 |
causes importation of a new module, or when a new module is imported in |
| 25616 |
another thread. Patch by Kernc. |
| 25617 |
|
| 25618 |
- bpo-31844: Remove ``ParserBase.error()`` method from the private and |
| 25619 |
undocumented ``_markupbase`` module. :class:`html.parser.HTMLParser` is |
| 25620 |
the only subclass of ``ParserBase`` and its ``error()`` implementation was |
| 25621 |
deprecated in Python 3.4 and removed in Python 3.5. |
| 25622 |
|
| 25623 |
- bpo-34226: Fix ``cgi.parse_multipart`` without content_length. Patch by |
| 25624 |
Roger Duran |
| 25625 |
|
| 25626 |
- bpo-33660: Fix pathlib.PosixPath to resolve a relative path located on the |
| 25627 |
root directory properly. |
| 25628 |
|
| 25629 |
- bpo-28557: Improve the error message for a misbehaving ``rawio.readinto`` |
| 25630 |
|
| 25631 |
- bpo-26680: The d.is_integer() method is added to the Decimal type, for |
| 25632 |
compatibility with other number types. |
| 25633 |
|
| 25634 |
- bpo-26680: The x.is_integer() method is incorporated into the abstract |
| 25635 |
types of the numeric tower, Real, Rational and Integral, with appropriate |
| 25636 |
default implementations. |
| 25637 |
|
| 25638 |
Documentation |
| 25639 |
------------- |
| 25640 |
|
| 25641 |
- bpo-41428: Add documentation for :pep:`604` (Allow writing union types as |
| 25642 |
``X | Y``). |
| 25643 |
|
| 25644 |
- bpo-41774: In Programming FAQ "Sequences (Tuples/Lists)" section, add "How |
| 25645 |
do you remove multiple items from a list". |
| 25646 |
|
| 25647 |
- bpo-35293: Fix RemovedInSphinx40Warning when building the documentation. |
| 25648 |
Patch by Donghee Na. |
| 25649 |
|
| 25650 |
- bpo-37149: Change Shipman tkinter doc link from archive.org to TkDocs. |
| 25651 |
(The doc has been removed from the NMT server.) The new link responds |
| 25652 |
much faster and includes a short explanatory note. |
| 25653 |
|
| 25654 |
- bpo-41726: Update the refcounts info of ``PyType_FromModuleAndSpec``. |
| 25655 |
|
| 25656 |
- bpo-41624: Fix the signature of :class:`typing.Coroutine`. |
| 25657 |
|
| 25658 |
- bpo-40204: Enable Sphinx 3.2 ``c_allow_pre_v3`` option and disable |
| 25659 |
``c_warn_on_allowed_pre_v3`` option to make the documentation compatible |
| 25660 |
with Sphinx 2 and Sphinx 3. |
| 25661 |
|
| 25662 |
- bpo-41045: Add documentation for debug feature of f-strings. |
| 25663 |
|
| 25664 |
- bpo-41314: Changed the release when ``from __future__ import annotations`` |
| 25665 |
becomes the default from ``4.0`` to ``3.10`` (following a change in PEP |
| 25666 |
563). |
| 25667 |
|
| 25668 |
- bpo-40979: Refactored typing.rst, arranging more than 70 classes, |
| 25669 |
functions, and decorators into new sub-sections. |
| 25670 |
|
| 25671 |
- bpo-40552: Fix in tutorial section 4.2. Code snippet is now correct. |
| 25672 |
|
| 25673 |
- bpo-39883: Make code, examples, and recipes in the Python documentation be |
| 25674 |
licensed under the more permissive BSD0 license in addition to the |
| 25675 |
existing Python 2.0 license. |
| 25676 |
|
| 25677 |
- bpo-37703: Updated Documentation to comprehensively elaborate on the |
| 25678 |
behaviour of gather.cancel() |
| 25679 |
|
| 25680 |
Tests |
| 25681 |
----- |
| 25682 |
|
| 25683 |
- bpo-41939: Fix test_site.test_license_exists_at_url(): call |
| 25684 |
``urllib.request.urlcleanup()`` to reset the global |
| 25685 |
``urllib.request._opener``. Patch by Victor Stinner. |
| 25686 |
|
| 25687 |
- bpo-41731: Make test_cmd_line_script pass with option '-vv'. |
| 25688 |
|
| 25689 |
- bpo-41602: Add tests for SIGINT handling in the runpy module. |
| 25690 |
|
| 25691 |
- bpo-41521: :mod:`test.support`: Rename ``blacklist`` parameter of |
| 25692 |
:func:`~test.support.check__all__` to ``not_exported``. |
| 25693 |
|
| 25694 |
- bpo-41477: Make ctypes optional in test_genericalias. |
| 25695 |
|
| 25696 |
- bpo-41085: Fix integer overflow in the :meth:`array.array.index` method on |
| 25697 |
64-bit Windows for index larger than ``2**31``. |
| 25698 |
|
| 25699 |
- bpo-41069: :data:`test.support.TESTFN` and the current directory for tests |
| 25700 |
when run via ``test.regrtest`` contain now non-ascii characters if |
| 25701 |
possible. |
| 25702 |
|
| 25703 |
- bpo-38377: On Linux, skip tests using multiprocessing if the current user |
| 25704 |
cannot create a file in ``/dev/shm/`` directory. Add the |
| 25705 |
:func:`~test.support.skip_if_broken_multiprocessing_synchronize` function |
| 25706 |
to the :mod:`test.support` module. |
| 25707 |
|
| 25708 |
- bpo-41009: Fix use of ``support.require_{linux|mac|freebsd}_version()`` |
| 25709 |
decorators as class decorator. |
| 25710 |
|
| 25711 |
- bpo-41003: Fix ``test_copyreg`` when ``numpy`` is installed: |
| 25712 |
``test.pickletester`` now saves/restores warnings filters when importing |
| 25713 |
``numpy``, to ignore filters installed by ``numpy``. |
| 25714 |
|
| 25715 |
- bpo-40964: Disable remote :mod:`imaplib` tests, host cyrus.andrew.cmu.edu |
| 25716 |
is blocking incoming connections. |
| 25717 |
|
| 25718 |
- bpo-40927: Fix test_binhex when run twice: it now uses |
| 25719 |
import_fresh_module() to ensure that it raises DeprecationWarning each |
| 25720 |
time. |
| 25721 |
|
| 25722 |
- bpo-17258: Skip some :mod:`multiprocessing` tests when MD5 hash digest is |
| 25723 |
blocked. |
| 25724 |
|
| 25725 |
- bpo-31904: Increase LOOPBACK_TIMEOUT to 10 for VxWorks RTOS. |
| 25726 |
|
| 25727 |
- bpo-38169: Increase code coverage for SharedMemory and ShareableList |
| 25728 |
|
| 25729 |
- bpo-34401: Make test_gdb properly run on HP-UX. Patch by Michael Osipov. |
| 25730 |
|
| 25731 |
Build |
| 25732 |
----- |
| 25733 |
|
| 25734 |
- bpo-38249: Update :c:macro:`Py_UNREACHABLE` to use __builtin_unreachable() |
| 25735 |
if only the compiler is able to use it. Patch by Donghee Na. |
| 25736 |
|
| 25737 |
- bpo-41617: Fix ``pycore_bitutils.h`` header file to support old clang |
| 25738 |
versions: ``__builtin_bswap16()`` is not available in LLVM clang 3.0. |
| 25739 |
|
| 25740 |
- bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. |
| 25741 |
|
| 25742 |
- bpo-36020: The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` |
| 25743 |
are now required to build Python. |
| 25744 |
|
| 25745 |
- bpo-40684: ``make install`` now uses the ``PLATLIBDIR`` variable for the |
| 25746 |
destination ``lib-dynload/`` directory when ``./configure |
| 25747 |
--with-platlibdir`` is used. |
| 25748 |
|
| 25749 |
- bpo-40683: Fixed an issue where the :mod:`zoneinfo` module and its tests |
| 25750 |
were not included when Python is installed with ``make``. |
| 25751 |
|
| 25752 |
Windows |
| 25753 |
------- |
| 25754 |
|
| 25755 |
- bpo-41744: Fixes automatic import of props file when using the Nuget |
| 25756 |
package. |
| 25757 |
|
| 25758 |
- bpo-41627: The user site directory for 32-bit now includes a ``-32`` |
| 25759 |
suffix to distinguish it from the 64-bit interpreter's directory. |
| 25760 |
|
| 25761 |
- bpo-41526: Fixed layout of final page of the installer by removing the |
| 25762 |
special thanks to Mark Hammond (with his permission). |
| 25763 |
|
| 25764 |
- bpo-41492: Fixes the description that appears in UAC prompts. |
| 25765 |
|
| 25766 |
- bpo-40948: Improve post-install message to direct people to the "py" |
| 25767 |
command. |
| 25768 |
|
| 25769 |
- bpo-41412: The installer will now fail to install on Windows 7 and Windows |
| 25770 |
8. Further, the UCRT dependency is now always downloaded on demand. |
| 25771 |
|
| 25772 |
- bpo-40741: Update Windows release to include SQLite 3.32.3. |
| 25773 |
|
| 25774 |
- bpo-41142: :mod:`!msilib` now supports creating CAB files with non-ASCII |
| 25775 |
file path and adding files with non-ASCII file path to them. |
| 25776 |
|
| 25777 |
- bpo-41074: Fixed support of non-ASCII names in functions |
| 25778 |
:func:`!msilib.OpenDatabase` and :func:`!msilib.init_database` and |
| 25779 |
non-ASCII SQL in method :meth:`!msilib.Database.OpenView`. |
| 25780 |
|
| 25781 |
- bpo-41039: Stable ABI redirection DLL (python3.dll) now uses ``#pragma |
| 25782 |
comment(linker)`` for re-exporting. |
| 25783 |
|
| 25784 |
- bpo-40164: Updates Windows OpenSSL to 1.1.1g |
| 25785 |
|
| 25786 |
- bpo-39631: Changes the registered MIME type for ``.py`` files on Windows |
| 25787 |
to ``text/x-python`` instead of ``text/plain``. |
| 25788 |
|
| 25789 |
- bpo-40677: Manually define IO_REPARSE_TAG_APPEXECLINK in case some old |
| 25790 |
Windows SDK doesn't have it. |
| 25791 |
|
| 25792 |
- bpo-37556: Extend py.exe help to mention overrides via venv, shebang, |
| 25793 |
environmental variables & ini files. |
| 25794 |
|
| 25795 |
macOS |
| 25796 |
----- |
| 25797 |
|
| 25798 |
- bpo-41557: Update macOS installer to use SQLite 3.33.0. |
| 25799 |
|
| 25800 |
- bpo-39580: Avoid opening Finder window if running installer from the |
| 25801 |
command line. Patch contributed by Rick Heil. |
| 25802 |
|
| 25803 |
- bpo-41100: Fix configure error when building on macOS 11. Note that the |
| 25804 |
current Python release was released shortly after the first developer |
| 25805 |
preview of macOS 11 (Big Sur); there are other known issues with building |
| 25806 |
and running on the developer preview. Big Sur is expected to be fully |
| 25807 |
supported in a future bugfix release of Python 3.8.x and with 3.9.0. |
| 25808 |
|
| 25809 |
- bpo-40741: Update macOS installer to use SQLite 3.32.3. |
| 25810 |
|
| 25811 |
- bpo-41005: fixed an XDG settings issue not allowing macos to open browser |
| 25812 |
in webbrowser.py |
| 25813 |
|
| 25814 |
- bpo-40741: Update macOS installer to use SQLite 3.32.2. |
| 25815 |
|
| 25816 |
IDLE |
| 25817 |
---- |
| 25818 |
|
| 25819 |
- bpo-41775: Use 'IDLE Shell' as shell title |
| 25820 |
|
| 25821 |
- bpo-35764: Rewrite the Calltips doc section. |
| 25822 |
|
| 25823 |
- bpo-40181: In calltips, stop reminding that '/' marks the end of |
| 25824 |
positional-only arguments. |
| 25825 |
|
| 25826 |
- bpo-41468: Improve IDLE run crash error message (which users should never |
| 25827 |
see). |
| 25828 |
|
| 25829 |
- bpo-41373: Save files loaded with no line ending, as when blank, or |
| 25830 |
different line endings, by setting its line ending to the system default. |
| 25831 |
Fix regression in 3.8.4 and 3.9.0b4. |
| 25832 |
|
| 25833 |
- bpo-41300: Save files with non-ascii chars. Fix regression released in |
| 25834 |
3.9.0b4 and 3.8.4. |
| 25835 |
|
| 25836 |
- bpo-37765: Add keywords to module name completion list. Rewrite |
| 25837 |
Completions section of IDLE doc. |
| 25838 |
|
| 25839 |
- bpo-41152: The encoding of ``stdin``, ``stdout`` and ``stderr`` in IDLE is |
| 25840 |
now always UTF-8. |
| 25841 |
|
| 25842 |
- bpo-41144: Make Open Module open a special module such as os.path. |
| 25843 |
|
| 25844 |
- bpo-39885: Make context menu Cut and Copy work again when right-clicking |
| 25845 |
within a selection. |
| 25846 |
|
| 25847 |
- bpo-40723: Make test_idle pass when run after import. |
| 25848 |
|
| 25849 |
C API |
| 25850 |
----- |
| 25851 |
|
| 25852 |
- bpo-41936: Removed undocumented macros ``Py_ALLOW_RECURSION`` and |
| 25853 |
``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the |
| 25854 |
:c:type:`PyInterpreterState` structure. |
| 25855 |
|
| 25856 |
- bpo-41692: The ``PyUnicode_InternImmortal()`` function is now deprecated |
| 25857 |
and will be removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` |
| 25858 |
instead. Patch by Victor Stinner. |
| 25859 |
|
| 25860 |
- bpo-41842: Add :c:func:`PyCodec_Unregister` function to unregister a codec |
| 25861 |
search function. |
| 25862 |
|
| 25863 |
- bpo-41834: Remove the ``_Py_CheckRecursionLimit`` variable: it has been |
| 25864 |
replaced by ``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` |
| 25865 |
structure. Patch by Victor Stinner. |
| 25866 |
|
| 25867 |
- bpo-41689: Types created with :c:func:`PyType_FromSpec` now make any |
| 25868 |
signature in their ``tp_doc`` slot accessible from ``__text_signature__``. |
| 25869 |
|
| 25870 |
- bpo-41524: Fix bug in :c:func:`PyOS_mystrnicmp` and |
| 25871 |
:c:func:`PyOS_mystricmp` that incremented pointers beyond the end of a |
| 25872 |
string. |
| 25873 |
|
| 25874 |
- bpo-41324: Add a minimal decimal capsule API. The API supports fast |
| 25875 |
conversions between Decimals up to 38 digits and their triple |
| 25876 |
representation as a C struct. |
| 25877 |
|
| 25878 |
- bpo-30155: Add :c:func:`PyDateTime_DATE_GET_TZINFO` and |
| 25879 |
:c:func:`PyDateTime_TIME_GET_TZINFO` macros for accessing the ``tzinfo`` |
| 25880 |
attributes of :class:`datetime.datetime` and :class:`datetime.time` |
| 25881 |
objects. |
| 25882 |
|
| 25883 |
- bpo-40170: Revert :c:func:`PyType_HasFeature` change: it reads again |
| 25884 |
directly the :c:member:`PyTypeObject.tp_flags` member when the limited C |
| 25885 |
API is not used, rather than always calling :c:func:`PyType_GetFlags` |
| 25886 |
which hides implementation details. |
| 25887 |
|
| 25888 |
- bpo-41123: Remove ``PyUnicode_AsUnicodeCopy``. |
| 25889 |
|
| 25890 |
- bpo-41123: Removed ``PyLong_FromUnicode()``. |
| 25891 |
|
| 25892 |
- bpo-41123: Removed ``PyUnicode_GetMax()``. |
| 25893 |
|
| 25894 |
- bpo-41123: Removed ``Py_UNICODE_str*`` functions manipulating |
| 25895 |
``Py_UNICODE*`` strings. |
| 25896 |
|
| 25897 |
- bpo-41103: ``PyObject_AsCharBuffer()``, ``PyObject_AsReadBuffer()``, |
| 25898 |
``PyObject_CheckReadBuffer()``, and ``PyObject_AsWriteBuffer()`` are |
| 25899 |
removed. Please migrate to new buffer protocol; |
| 25900 |
:c:func:`PyObject_GetBuffer` and :c:func:`PyBuffer_Release`. |
| 25901 |
|
| 25902 |
- bpo-36346: Raises DeprecationWarning for ``PyUnicode_FromUnicode(NULL, |
| 25903 |
size)`` and ``PyUnicode_FromStringAndSize(NULL, size)`` with ``size > 0``. |
| 25904 |
|
| 25905 |
- bpo-36346: Mark ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, |
| 25906 |
``PyUnicode_WSTR_LENGTH``, ``PyUnicode_FromUnicode``, |
| 25907 |
``PyUnicode_AsUnicode``, and ``PyUnicode_AsUnicodeAndSize`` as deprecated |
| 25908 |
in C. Remove ``Py_UNICODE_MATCH`` which was deprecated and broken since |
| 25909 |
Python 3.3. |
| 25910 |
|
| 25911 |
- bpo-40989: The :c:func:`PyObject_INIT` and :c:func:`PyObject_INIT_VAR` |
| 25912 |
macros become aliases to, respectively, :c:func:`PyObject_Init` and |
| 25913 |
:c:func:`PyObject_InitVar` functions. |
| 25914 |
|
| 25915 |
- bpo-36020: On Windows, ``#include "pyerrors.h"`` no longer defines |
| 25916 |
``snprintf`` and ``vsnprintf`` macros. |
| 25917 |
|
| 25918 |
- bpo-40943: The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use |
| 25919 |
:c:func:`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use |
| 25920 |
``#``: ``es#``, ``et#``, ``s#``, ``u#``, ``y#``, ``z#``, ``U#`` and |
| 25921 |
``Z#``. See :ref:`Parsing arguments and building values <arg-parsing>` and |
| 25922 |
the :pep:`353`. |
| 25923 |
|
| 25924 |
- bpo-40910: Export explicitly the :c:func:`Py_GetArgcArgv` function to the |
| 25925 |
C API and document the function. Previously, it was exported implicitly |
| 25926 |
which no longer works since Python is built with ``-fvisibility=hidden``. |
| 25927 |
|
| 25928 |
- bpo-40724: Allow defining buffer slots in type specs. |
| 25929 |
|
| 25930 |
- bpo-40679: Fix a ``_PyEval_EvalCode()`` crash if *qualname* argument is |
| 25931 |
NULL. |
| 25932 |
|
| 25933 |
- bpo-40839: Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had |
| 25934 |
been allowed for historical reason. It is no longer allowed. |
| 25935 |
|
| 25936 |
- bpo-40826: :c:func:`PyOS_InterruptOccurred` now fails with a fatal error |
| 25937 |
if it is called with the GIL released. |
| 25938 |
|
| 25939 |
- bpo-40792: The result of :c:func:`PyNumber_Index` now always has exact |
| 25940 |
type :class:`int`. Previously, the result could have been an instance of a |
| 25941 |
subclass of ``int``. |
| 25942 |
|
| 25943 |
- bpo-39573: Convert :c:func:`Py_REFCNT` and :c:func:`Py_SIZE` macros to |
| 25944 |
static inline functions. They cannot be used as l-value anymore: use |
| 25945 |
:c:func:`Py_SET_REFCNT` and :c:func:`Py_SET_SIZE` to set an object |
| 25946 |
reference count and size. This change is backward incompatible on purpose, |
| 25947 |
to prepare the C API for an opaque :c:type:`PyObject` structure. |
| 25948 |
|
| 25949 |
- bpo-40703: The PyType_FromSpec*() functions no longer overwrite the type's |
| 25950 |
"__module__" attribute if it is set via "Py_tp_members" or "Py_tp_getset". |
| 25951 |
|
| 25952 |
- bpo-39583: Remove superfluous "extern C" declarations from |
| 25953 |
``Include/cpython/*.h``. |
| 25954 |
|
| 25955 |
|
| 25956 |
What's New in Python 3.9.0 beta 1? |
| 25957 |
================================== |
| 25958 |
|
| 25959 |
*Release date: 2020-05-19* |
| 25960 |
|
| 25961 |
Security |
| 25962 |
-------- |
| 25963 |
|
| 25964 |
- bpo-40501: :mod:`uuid` no longer uses :mod:`ctypes` to load |
| 25965 |
:file:`libuuid` or :file:`rpcrt4.dll` at runtime. |
| 25966 |
|
| 25967 |
Core and Builtins |
| 25968 |
----------------- |
| 25969 |
|
| 25970 |
- bpo-40663: Correctly generate annotations where parentheses are omitted |
| 25971 |
but required (e.g: ``Type[(str, int, *other))]``. |
| 25972 |
|
| 25973 |
- bpo-40596: Fixed :meth:`str.isidentifier` for non-canonicalized strings |
| 25974 |
containing non-BMP characters on Windows. |
| 25975 |
|
| 25976 |
- bpo-40593: Improved syntax errors for invalid characters in source code. |
| 25977 |
|
| 25978 |
- bpo-40585: Fixed a bug when using :func:`codeop.compile_command` that was |
| 25979 |
causing exceptions to be swallowed with the new parser. Patch by Pablo |
| 25980 |
Galindo |
| 25981 |
|
| 25982 |
- bpo-40566: Apply :pep:`573` to :mod:`abc`. |
| 25983 |
|
| 25984 |
- bpo-40502: Initialize ``n->n_col_offset``. (Patch by Joannah Nanjekye) |
| 25985 |
|
| 25986 |
- bpo-40527: Fix command line argument parsing: no longer write errors |
| 25987 |
multiple times into stderr. |
| 25988 |
|
| 25989 |
- bpo-1635741: Port :mod:`errno` to multiphase initialization (:pep:`489`). |
| 25990 |
|
| 25991 |
- bpo-40523: Add pass-throughs for :func:`hash` and :func:`reversed` to |
| 25992 |
:class:`weakref.proxy` objects. Patch by Pablo Galindo. |
| 25993 |
|
| 25994 |
- bpo-1635741: Port :mod:`syslog` to multiphase initialization (:pep:`489`). |
| 25995 |
|
| 25996 |
- bpo-40246: Reporting a specialised error message for invalid string |
| 25997 |
prefixes, which was introduced in :issue:`40246`, is being reverted due to |
| 25998 |
backwards compatibility concerns for strings that immediately follow a |
| 25999 |
reserved keyword without whitespace between them. Constructs like |
| 26000 |
``bg="#d00" if clear else"#fca"`` were failing to parse, which is not an |
| 26001 |
acceptable breakage on such short notice. |
| 26002 |
|
| 26003 |
- bpo-40417: Fix imp module deprecation warning when PyImport_ReloadModule |
| 26004 |
is called. Patch by Robert Rouhani. |
| 26005 |
|
| 26006 |
- bpo-40408: Fixed support of nested type variables in GenericAlias (e.g. |
| 26007 |
``list[list[T]]``). |
| 26008 |
|
| 26009 |
- bpo-1635741: Port _stat module to multiphase initialization (:pep:`489`). |
| 26010 |
|
| 26011 |
- bpo-29587: Enable implicit exception chaining when calling |
| 26012 |
:meth:`generator.throw`. |
| 26013 |
|
| 26014 |
- bpo-40328: Add tools for generating mappings headers for CJKCodecs. |
| 26015 |
|
| 26016 |
- bpo-40228: Setting frame.f_lineno is now robust w.r.t. changes in the |
| 26017 |
source-to-bytecode compiler |
| 26018 |
|
| 26019 |
- bpo-38880: Added the ability to list interpreters associated with channel |
| 26020 |
ends in the internal subinterpreters module. |
| 26021 |
|
| 26022 |
- bpo-37986: Improve performance of :c:func:`PyLong_FromDouble` for values |
| 26023 |
that fit into :c:expr:`long`. |
| 26024 |
|
| 26025 |
Library |
| 26026 |
------- |
| 26027 |
|
| 26028 |
- bpo-40662: Fixed :func:`ast.get_source_segment` for ast nodes that have |
| 26029 |
incomplete location information. Patch by Irit Katriel. |
| 26030 |
|
| 26031 |
- bpo-40665: Convert :mod:`bisect` to use Argument Clinic. |
| 26032 |
|
| 26033 |
- bpo-40536: Added the :func:`~zoneinfo.available_timezones` function to the |
| 26034 |
:mod:`zoneinfo` module. Patch by Paul Ganssle. |
| 26035 |
|
| 26036 |
- bpo-40645: The :class:`hmac.HMAC` exposes internal implementation details. |
| 26037 |
The attributes ``digest_cons``, ``inner``, and ``outer`` are deprecated |
| 26038 |
and will be removed in the future. |
| 26039 |
|
| 26040 |
- bpo-40645: The internal module ``_hashlib`` wraps and exposes OpenSSL's |
| 26041 |
HMAC API. The new code will be used in Python 3.10 after the internal |
| 26042 |
implementation details of the pure Python HMAC module are no longer part |
| 26043 |
of the public API. |
| 26044 |
|
| 26045 |
- bpo-40637: Builtin hash modules can now be disabled or selectively enabled |
| 26046 |
with ``configure --with-builtin-hashlib-hashes=sha3,blake1`` or |
| 26047 |
``--without-builtin-hashlib-hashes``. |
| 26048 |
|
| 26049 |
- bpo-37630: The :mod:`hashlib` module can now use SHA3 hashes and SHAKE XOF |
| 26050 |
from OpenSSL when available. |
| 26051 |
|
| 26052 |
- bpo-40479: The :mod:`hashlib` now compiles with OpenSSL 3.0.0-alpha2. |
| 26053 |
|
| 26054 |
- bpo-40257: Revert changes to :func:`inspect.getdoc`. |
| 26055 |
|
| 26056 |
- bpo-40607: When cancelling a task due to timeout, :meth:`asyncio.wait_for` |
| 26057 |
will now propagate the exception if an error happens during cancellation. |
| 26058 |
Patch by Roman Skurikhin. |
| 26059 |
|
| 26060 |
- bpo-40612: Fix edge cases in SyntaxError formatting. If the offset is <= |
| 26061 |
0, no caret is printed. If the offset is > line length, the caret is |
| 26062 |
printed pointing just after the last character. |
| 26063 |
|
| 26064 |
- bpo-40597: If text content lines are longer than policy.max_line_length, |
| 26065 |
always use a content-encoding to make sure they are wrapped. |
| 26066 |
|
| 26067 |
- bpo-40571: Added functools.cache() as a simpler, more discoverable way to |
| 26068 |
access the unbounded cache variant of lru_cache(maxsize=None). |
| 26069 |
|
| 26070 |
- bpo-40503: :pep:`615`, the :mod:`zoneinfo` module. Adds support for the |
| 26071 |
IANA time zone database. |
| 26072 |
|
| 26073 |
- bpo-40397: Removed attributes ``__args__`` and ``__parameters__`` from |
| 26074 |
special generic aliases like ``typing.List`` (not subscripted). |
| 26075 |
|
| 26076 |
- bpo-40549: Convert posixmodule.c ("posix" or "nt" module) to the |
| 26077 |
multiphase initialization (PEP 489). |
| 26078 |
|
| 26079 |
- bpo-31033: Add a ``msg`` argument to :meth:`Future.cancel` and |
| 26080 |
:meth:`Task.cancel`. |
| 26081 |
|
| 26082 |
- bpo-40541: Added an optional *counts* parameter to random.sample(). |
| 26083 |
|
| 26084 |
- bpo-40515: The :mod:`ssl` and :mod:`hashlib` modules now actively check |
| 26085 |
that OpenSSL is build with thread support. Python 3.7.0 made thread |
| 26086 |
support mandatory and no longer works safely with a no-thread builds. |
| 26087 |
|
| 26088 |
- bpo-31033: When a :class:`asyncio.Task` is cancelled, the exception |
| 26089 |
traceback now chains all the way back to where the task was first |
| 26090 |
interrupted. |
| 26091 |
|
| 26092 |
- bpo-40504: :func:`functools.lru_cache` objects can now be the targets of |
| 26093 |
weakrefs. |
| 26094 |
|
| 26095 |
- bpo-40559: Fix possible memory leak in the C implementation of |
| 26096 |
:class:`asyncio.Task`. |
| 26097 |
|
| 26098 |
- bpo-40480: ``fnmatch.fnmatch()`` could take exponential time in the |
| 26099 |
presence of multiple ``*`` pattern characters. This was repaired by |
| 26100 |
generating more elaborate regular expressions to avoid futile |
| 26101 |
backtracking. |
| 26102 |
|
| 26103 |
- bpo-40495: :mod:`compileall` is now able to use hardlinks to prevent |
| 26104 |
duplicates in a case when ``.pyc`` files for different optimization levels |
| 26105 |
have the same content. |
| 26106 |
|
| 26107 |
- bpo-40457: The ssl module now support OpenSSL builds without TLS 1.0 and |
| 26108 |
1.1 methods. |
| 26109 |
|
| 26110 |
- bpo-40355: Improve error reporting in :func:`ast.literal_eval` in the |
| 26111 |
presence of malformed :class:`ast.Dict` nodes instead of silently ignoring |
| 26112 |
any non-conforming elements. Patch by Curtis Bucher. |
| 26113 |
|
| 26114 |
- bpo-40465: Deprecated the optional *random* argument to |
| 26115 |
*random.shuffle()*. |
| 26116 |
|
| 26117 |
- bpo-40459: :func:`platform.win32_ver` now produces correct *ptype* strings |
| 26118 |
instead of empty strings. |
| 26119 |
|
| 26120 |
- bpo-39435: The first argument of :func:`pickle.loads` is now |
| 26121 |
positional-only. |
| 26122 |
|
| 26123 |
- bpo-39305: Update :mod:`!nntplib` to merge :class:`!nntplib.NNTP` and |
| 26124 |
:class:`!nntplib._NNTPBase`. Patch by Donghee Na. |
| 26125 |
|
| 26126 |
- bpo-32494: Update :mod:`dbm.gnu` to use gdbm_count if possible when |
| 26127 |
calling :func:`len`. Patch by Donghee Na. |
| 26128 |
|
| 26129 |
- bpo-40453: Add ``isolated=True`` keyword-only parameter to |
| 26130 |
``_xxsubinterpreters.create()``. An isolated subinterpreter cannot spawn |
| 26131 |
threads, spawn a child process or call ``os.fork()``. |
| 26132 |
|
| 26133 |
- bpo-40286: Remove ``_random.Random.randbytes()``: the C implementation of |
| 26134 |
``randbytes()``. Implement the method in Python to ease subclassing: |
| 26135 |
``randbytes()`` now directly reuses ``getrandbits()``. |
| 26136 |
|
| 26137 |
- bpo-40394: Added default arguments to |
| 26138 |
:meth:`difflib.SequenceMatcher.find_longest_match`. |
| 26139 |
|
| 26140 |
- bpo-39995: Fix a race condition in concurrent.futures._ThreadWakeup: |
| 26141 |
access to _ThreadWakeup is now protected with the shutdown lock. |
| 26142 |
|
| 26143 |
- bpo-30966: ``Process.shutdown(wait=True)`` of :mod:`concurrent.futures` |
| 26144 |
now closes explicitly the result queue. |
| 26145 |
|
| 26146 |
- bpo-30966: Add a new :meth:`~multiprocessing.SimpleQueue.close` method to |
| 26147 |
the :class:`~multiprocessing.SimpleQueue` class to explicitly close the |
| 26148 |
queue. |
| 26149 |
|
| 26150 |
- bpo-39966: Revert bpo-25597. :class:`unittest.mock.MagicMock` with wraps' |
| 26151 |
set uses default return values for magic methods. |
| 26152 |
|
| 26153 |
- bpo-39791: Added ``files()`` function to importlib.resources with support |
| 26154 |
for subdirectories in package data, matching backport in |
| 26155 |
importlib_resources 1.5. |
| 26156 |
|
| 26157 |
- bpo-40375: :meth:`imaplib.IMAP4.unselect` is added. Patch by Donghee Na. |
| 26158 |
|
| 26159 |
- bpo-40389: ``repr()`` now returns ``typing.Optional[T]`` when called for |
| 26160 |
``typing.Union`` of two types, one of which is ``NoneType``. |
| 26161 |
|
| 26162 |
- bpo-40291: Add support for CAN_J1939 sockets (available on Linux 5.4+) |
| 26163 |
|
| 26164 |
- bpo-40273: :class:`types.MappingProxyType` is now reversible. |
| 26165 |
|
| 26166 |
- bpo-39075: The repr for :class:`types.SimpleNamespace` is now insertion |
| 26167 |
ordered rather than alphabetical. |
| 26168 |
|
| 26169 |
- bpo-40192: On AIX, :func:`~time.thread_time` is now implemented with |
| 26170 |
``thread_cputime()`` which has nanosecond resolution, rather than |
| 26171 |
``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` which has a resolution of 10 |
| 26172 |
milliseconds. Patch by Batuhan Taskaya. |
| 26173 |
|
| 26174 |
- bpo-40025: Raise TypeError when _generate_next_value_ is defined after |
| 26175 |
members. Patch by Ethan Onstott. |
| 26176 |
|
| 26177 |
- bpo-39058: In the argparse module, the repr for Namespace() and other |
| 26178 |
argument holders now displayed in the order attributes were added. |
| 26179 |
Formerly, it displayed in alphabetical order even though argument order is |
| 26180 |
preserved the user visible parts of the module. |
| 26181 |
|
| 26182 |
- bpo-24416: The ``isocalendar()`` methods of :class:`datetime.date` and |
| 26183 |
:class:`datetime.datetime` now return a :term:`named tuple` instead of a |
| 26184 |
:class:`tuple`. |
| 26185 |
|
| 26186 |
Documentation |
| 26187 |
------------- |
| 26188 |
|
| 26189 |
- bpo-34790: Add version of removal for explicit passing of coros to |
| 26190 |
``asyncio.wait()``'s documentation |
| 26191 |
|
| 26192 |
- bpo-40561: Provide docstrings for webbrowser open functions. |
| 26193 |
|
| 26194 |
- bpo-40499: Mention that :func:`asyncio.wait` requires a non-empty set of |
| 26195 |
awaitables. |
| 26196 |
|
| 26197 |
- bpo-39705: Tutorial example for sorted() in the Loop Techniques section is |
| 26198 |
given a better explanation. Also a new example is included to explain |
| 26199 |
sorted()'s basic behavior. |
| 26200 |
|
| 26201 |
- bpo-39435: Fix an incorrect signature for :func:`pickle.loads` in the docs |
| 26202 |
|
| 26203 |
Tests |
| 26204 |
----- |
| 26205 |
|
| 26206 |
- bpo-40055: distutils.tests now saves/restores warnings filters to leave |
| 26207 |
them unchanged. Importing tests imports docutils which imports |
| 26208 |
pkg_resources which adds a warnings filter. |
| 26209 |
|
| 26210 |
- bpo-40436: test_gdb and test.pythoninfo now check gdb command exit code. |
| 26211 |
|
| 26212 |
Build |
| 26213 |
----- |
| 26214 |
|
| 26215 |
- bpo-40653: Move _dirnameW out of HAVE_SYMLINK to fix a potential compiling |
| 26216 |
issue. |
| 26217 |
|
| 26218 |
- bpo-40514: Add ``--with-experimental-isolated-subinterpreters`` build |
| 26219 |
option to ``configure``: better isolate subinterpreters, experimental |
| 26220 |
build mode. |
| 26221 |
|
| 26222 |
Windows |
| 26223 |
------- |
| 26224 |
|
| 26225 |
- bpo-40650: Include winsock2.h in pytime.c for timeval. |
| 26226 |
|
| 26227 |
- bpo-40458: Increase reserved stack space to prevent overflow crash on |
| 26228 |
Windows. |
| 26229 |
|
| 26230 |
- bpo-39148: Add IPv6 support to :mod:`asyncio` datagram endpoints in |
| 26231 |
ProactorEventLoop. Change the raised exception for unknown address |
| 26232 |
families to ValueError as it's not coming from Windows API. |
| 26233 |
|
| 26234 |
macOS |
| 26235 |
----- |
| 26236 |
|
| 26237 |
- bpo-34956: When building Python on macOS from source, ``_tkinter`` now |
| 26238 |
links with non-system Tcl and Tk frameworks if they are installed in |
| 26239 |
``/Library/Frameworks``, as had been the case on older releases of macOS. |
| 26240 |
If a macOS SDK is explicitly configured, by using |
| 26241 |
``--enable-universalsdk=`` or ``-isysroot``, only the SDK itself is |
| 26242 |
searched. The default behavior can still be overridden with |
| 26243 |
``--with-tcltk-includes`` and ``--with-tcltk-libs``. |
| 26244 |
|
| 26245 |
- bpo-35569: Expose RFC 3542 IPv6 socket options. |
| 26246 |
|
| 26247 |
Tools/Demos |
| 26248 |
----------- |
| 26249 |
|
| 26250 |
- bpo-40479: Update multissltest helper to test with latest OpenSSL 1.0.2, |
| 26251 |
1.1.0, 1.1.1, and 3.0.0-alpha. |
| 26252 |
|
| 26253 |
- bpo-40431: Fix a syntax typo in ``turtledemo`` that now raises a |
| 26254 |
``SyntaxError``. |
| 26255 |
|
| 26256 |
- bpo-40163: Fix multissltest tool. OpenSSL has changed download URL for old |
| 26257 |
releases. The multissltest tool now tries to download from current and old |
| 26258 |
download URLs. |
| 26259 |
|
| 26260 |
C API |
| 26261 |
----- |
| 26262 |
|
| 26263 |
- bpo-39465: Remove the ``_PyUnicode_ClearStaticStrings()`` function from |
| 26264 |
the C API. |
| 26265 |
|
| 26266 |
- bpo-38787: Add PyCFunction_CheckExact() macro for exact type checks now |
| 26267 |
that we allow subtypes of PyCFunction, as well as PyCMethod_CheckExact() |
| 26268 |
and PyCMethod_Check() for the new PyCMethod subtype. |
| 26269 |
|
| 26270 |
- bpo-40545: Declare ``_PyErr_GetTopmostException()`` with ``PyAPI_FUNC()`` |
| 26271 |
to properly export the function in the C API. The function remains private |
| 26272 |
(``_Py``) prefix. |
| 26273 |
|
| 26274 |
- bpo-40412: Nullify inittab_copy during finalization, preventing future |
| 26275 |
interpreter initializations in an embedded situation from crashing. Patch |
| 26276 |
by Gregory Szorc. |
| 26277 |
|
| 26278 |
- bpo-40429: The :c:func:`PyThreadState_GetFrame` function now returns a |
| 26279 |
strong reference to the frame. |
| 26280 |
|
| 26281 |
- bpo-40428: Remove the following functions from the C API. Call |
| 26282 |
:c:func:`PyGC_Collect` explicitly to free all free lists. |
| 26283 |
|
| 26284 |
* ``PyAsyncGen_ClearFreeLists()`` |
| 26285 |
* ``PyContext_ClearFreeList()`` |
| 26286 |
* ``PyDict_ClearFreeList()`` |
| 26287 |
* ``PyFloat_ClearFreeList()`` |
| 26288 |
* ``PyFrame_ClearFreeList()`` |
| 26289 |
* ``PyList_ClearFreeList()`` |
| 26290 |
* ``PySet_ClearFreeList()`` |
| 26291 |
* ``PyTuple_ClearFreeList()`` |
| 26292 |
|
| 26293 |
- bpo-40421: New :c:func:`PyFrame_GetBack` function: get the frame next |
| 26294 |
outer frame. |
| 26295 |
|
| 26296 |
- bpo-40421: New :c:func:`PyFrame_GetCode` function: return a borrowed |
| 26297 |
reference to the frame code. |
| 26298 |
|
| 26299 |
- bpo-40217: Ensure that instances of types created with |
| 26300 |
:c:func:`PyType_FromSpecWithBases` will visit its class object when |
| 26301 |
traversing references in the garbage collector (implemented as an |
| 26302 |
extension of the provided :c:member:`~PyTypeObject.tp_traverse`). Patch by |
| 26303 |
Pablo Galindo. |
| 26304 |
|
| 26305 |
- bpo-38787: Module C state is now accessible from C-defined heap type |
| 26306 |
methods (:pep:`573`). Patch by Marcel Plch and Petr Viktorin. |
| 26307 |
|
| 26308 |
|
| 26309 |
What's New in Python 3.9.0 alpha 6? |
| 26310 |
=================================== |
| 26311 |
|
| 26312 |
*Release date: 2020-04-27* |
| 26313 |
|
| 26314 |
Security |
| 26315 |
-------- |
| 26316 |
|
| 26317 |
- bpo-40121: Fixes audit events raised on creating a new socket. |
| 26318 |
|
| 26319 |
- bpo-39073: Disallow CR or LF in email.headerregistry.Address arguments to |
| 26320 |
guard against header injection attacks. |
| 26321 |
|
| 26322 |
- bpo-39503: :cve:`2020-8492`: The |
| 26323 |
:class:`~urllib.request.AbstractBasicAuthHandler` class of the |
| 26324 |
:mod:`urllib.request` module uses an inefficient regular expression which |
| 26325 |
can be exploited by an attacker to cause a denial of service. Fix the |
| 26326 |
regex to prevent the catastrophic backtracking. Vulnerability reported by |
| 26327 |
Ben Caller and Matt Schwager. |
| 26328 |
|
| 26329 |
Core and Builtins |
| 26330 |
----------------- |
| 26331 |
|
| 26332 |
- bpo-40313: Improve the performance of bytes.hex(). |
| 26333 |
|
| 26334 |
- bpo-40334: Switch to a new parser, based on PEG. For more details see PEP |
| 26335 |
617. To temporarily switch back to the old parser, use ``-X oldparser`` or |
| 26336 |
``PYTHONOLDPARSER=1``. In Python 3.10 we will remove the old parser |
| 26337 |
completely, including the ``parser`` module (already deprecated) and |
| 26338 |
anything that depends on it. |
| 26339 |
|
| 26340 |
- bpo-40267: Fix the tokenizer to display the correct error message, when |
| 26341 |
there is a ``SyntaxError`` on the last input character and no newline |
| 26342 |
follows. It used to be ``unexpected EOF while parsing``, while it should |
| 26343 |
be ``invalid syntax``. |
| 26344 |
|
| 26345 |
- bpo-39522: Correctly unparse explicit ``u`` prefix for strings when |
| 26346 |
postponed evaluation for annotations activated. Patch by Batuhan Taskaya. |
| 26347 |
|
| 26348 |
- bpo-40246: Report a specialized error message, ``invalid string prefix``, |
| 26349 |
when the tokenizer encounters a string with an invalid prefix. |
| 26350 |
|
| 26351 |
- bpo-40082: Fix the signal handler: it now always uses the main |
| 26352 |
interpreter, rather than trying to get the current Python thread state. |
| 26353 |
|
| 26354 |
- bpo-37388: str.encode() and str.decode() no longer check the encoding and |
| 26355 |
errors in development mode or in debug mode during Python finalization. |
| 26356 |
The codecs machinery can no longer work on very late calls to str.encode() |
| 26357 |
and str.decode(). |
| 26358 |
|
| 26359 |
- bpo-40077: Fix possible refleaks in :mod:`!_json`, memo of PyScannerObject |
| 26360 |
should be traversed. |
| 26361 |
|
| 26362 |
- bpo-37207: Speed up calls to ``dict()`` by using the :pep:`590` |
| 26363 |
``vectorcall`` calling convention. |
| 26364 |
|
| 26365 |
- bpo-40141: Add column and line information to ``ast.keyword`` nodes. Patch |
| 26366 |
by Pablo Galindo. |
| 26367 |
|
| 26368 |
- bpo-1635741: Port :mod:`resource` to multiphase initialization |
| 26369 |
(:pep:`489`). |
| 26370 |
|
| 26371 |
- bpo-1635741: Port :mod:`math` to multiphase initialization (:pep:`489`). |
| 26372 |
|
| 26373 |
- bpo-1635741: Port _uuid module to multiphase initialization (:pep:`489`). |
| 26374 |
|
| 26375 |
- bpo-40077: Convert json module to use :c:func:`PyType_FromSpec`. |
| 26376 |
|
| 26377 |
- bpo-40067: Improve the error message for multiple star expressions in an |
| 26378 |
assignment. Patch by Furkan Onder |
| 26379 |
|
| 26380 |
- bpo-1635741: Port _functools module to multiphase initialization (PEP |
| 26381 |
489). Patch by Paulo Henrique Silva. |
| 26382 |
|
| 26383 |
- bpo-1635741: Port operator module to multiphase initialization (PEP 489). |
| 26384 |
Patch by Paulo Henrique Silva. |
| 26385 |
|
| 26386 |
- bpo-20526: Fix :c:func:`PyThreadState_Clear()`. ``PyThreadState.frame`` is |
| 26387 |
a borrowed reference, not a strong reference: ``PyThreadState_Clear()`` |
| 26388 |
must not call ``Py_CLEAR(tstate->frame)``. |
| 26389 |
|
| 26390 |
- bpo-1635741: Port time module to multiphase initialization (:pep:`489`). |
| 26391 |
Patch by Paulo Henrique Silva. |
| 26392 |
|
| 26393 |
- bpo-1635741: Port _weakref extension module to multiphase initialization |
| 26394 |
(:pep:`489`). |
| 26395 |
|
| 26396 |
- bpo-40020: Fix a leak and subsequent crash in parsetok.c caused by realloc |
| 26397 |
misuse on a rare codepath. |
| 26398 |
|
| 26399 |
- bpo-39939: Added str.removeprefix and str.removesuffix methods and |
| 26400 |
corresponding bytes, bytearray, and collections.UserString methods to |
| 26401 |
remove affixes from a string if present. See :pep:`616` for a full |
| 26402 |
description. Patch by Dennis Sweeney. |
| 26403 |
|
| 26404 |
- bpo-39481: Implement PEP 585. This supports list[int], tuple[str, ...] |
| 26405 |
etc. |
| 26406 |
|
| 26407 |
- bpo-32894: Support unparsing of infinity numbers in postponed annotations. |
| 26408 |
Patch by Batuhan Taşkaya. |
| 26409 |
|
| 26410 |
- bpo-37207: Speed up calls to ``list()`` by using the :pep:`590` |
| 26411 |
``vectorcall`` calling convention. Patch by Mark Shannon. |
| 26412 |
|
| 26413 |
Library |
| 26414 |
------- |
| 26415 |
|
| 26416 |
- bpo-40398: :func:`typing.get_args` now always returns an empty tuple for |
| 26417 |
special generic aliases. |
| 26418 |
|
| 26419 |
- bpo-40396: Functions :func:`typing.get_origin`, :func:`typing.get_args` |
| 26420 |
and :func:`typing.get_type_hints` support now generic aliases like |
| 26421 |
``list[int]``. |
| 26422 |
|
| 26423 |
- bpo-38061: Optimize the :mod:`subprocess` module on FreeBSD using |
| 26424 |
``closefrom()``. A single ``close(fd)`` syscall is cheap, but when |
| 26425 |
``sysconf(_SC_OPEN_MAX)`` is high, the loop calling ``close(fd)`` on each |
| 26426 |
file descriptor can take several milliseconds. |
| 26427 |
|
| 26428 |
The workaround on FreeBSD to improve performance was to load and mount the |
| 26429 |
fdescfs kernel module, but this is not enabled by default. |
| 26430 |
|
| 26431 |
Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans |
| 26432 |
(kevans) and Kubilay Kocak (koobs): |
| 26433 |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274 |
| 26434 |
|
| 26435 |
- bpo-38061: On FreeBSD, ``os.closerange(fd_low, fd_high)`` now calls |
| 26436 |
``closefrom(fd_low)`` if *fd_high* is greater than or equal to |
| 26437 |
``sysconf(_SC_OPEN_MAX)``. |
| 26438 |
|
| 26439 |
Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans |
| 26440 |
(kevans) and Kubilay Kocak (koobs): |
| 26441 |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274 |
| 26442 |
|
| 26443 |
- bpo-40360: The :mod:`!lib2to3` module is pending deprecation due to |
| 26444 |
:pep:`617`. |
| 26445 |
|
| 26446 |
- bpo-40138: Fix the Windows implementation of :func:`os.waitpid` for exit |
| 26447 |
code larger than ``INT_MAX >> 8``. The exit status is now interpreted as |
| 26448 |
an unsigned number. |
| 26449 |
|
| 26450 |
- bpo-39942: Set "__main__" as the default module name when "__name__" is |
| 26451 |
missing in :class:`typing.TypeVar`. Patch by Weipeng Hong. |
| 26452 |
|
| 26453 |
- bpo-40275: The :mod:`logging` package is now imported lazily in |
| 26454 |
:mod:`unittest` only when the :meth:`~unittest.TestCase.assertLogs` |
| 26455 |
assertion is used. |
| 26456 |
|
| 26457 |
- bpo-40275: The :mod:`asyncio` package is now imported lazily in |
| 26458 |
:mod:`unittest` only when the :class:`~unittest.IsolatedAsyncioTestCase` |
| 26459 |
class is used. |
| 26460 |
|
| 26461 |
- bpo-40330: In :meth:`ShareableList.__setitem__`, check the size of a new |
| 26462 |
string item after encoding it to utf-8, not before. |
| 26463 |
|
| 26464 |
- bpo-40148: Added :meth:`pathlib.Path.with_stem` to create a new Path with |
| 26465 |
the stem replaced. |
| 26466 |
|
| 26467 |
- bpo-40325: Deprecated support for set objects in random.sample(). |
| 26468 |
|
| 26469 |
- bpo-40257: Improved help for the :mod:`typing` module. Docstrings are now |
| 26470 |
shown for all special forms and special generic aliases (like ``Union`` |
| 26471 |
and ``List``). Using ``help()`` with generic alias like ``List[int]`` will |
| 26472 |
show the help for the correspondent concrete type (``list`` in this case). |
| 26473 |
|
| 26474 |
- bpo-40257: :func:`inspect.getdoc` no longer returns docstring inherited |
| 26475 |
from the type of the object or from parent class if it is a class if it is |
| 26476 |
not defined in the object itself. In :mod:`pydoc` the documentation string |
| 26477 |
is now shown not only for class, function, method etc, but for any object |
| 26478 |
that has its own ``__doc__`` attribute. |
| 26479 |
|
| 26480 |
- bpo-40287: Fixed ``SpooledTemporaryFile.seek()`` to return the position. |
| 26481 |
|
| 26482 |
- bpo-40290: Added zscore() to statistics.NormalDist(). |
| 26483 |
|
| 26484 |
- bpo-40282: Allow ``random.getrandbits(0)`` to succeed and to return 0. |
| 26485 |
|
| 26486 |
- bpo-40286: Add :func:`random.randbytes` function and |
| 26487 |
:meth:`random.Random.randbytes` method to generate random bytes. |
| 26488 |
|
| 26489 |
- bpo-40277: :func:`collections.namedtuple` now provides a human-readable |
| 26490 |
repr for its field accessors. |
| 26491 |
|
| 26492 |
- bpo-40270: The included copy of sqlite3 on Windows is now compiled with |
| 26493 |
the json extension. This allows the use of functions such as |
| 26494 |
``json_object``. |
| 26495 |
|
| 26496 |
- bpo-29255: Wait in ``KqueueSelector.select`` when no fds are registered |
| 26497 |
|
| 26498 |
- bpo-40260: Ensure :mod:`modulefinder` uses :func:`io.open_code` and |
| 26499 |
respects coding comments. |
| 26500 |
|
| 26501 |
- bpo-40234: Allow again to spawn daemon threads in subinterpreters (revert |
| 26502 |
change which denied them). |
| 26503 |
|
| 26504 |
- bpo-39207: Workers in :class:`~concurrent.futures.ProcessPoolExecutor` are |
| 26505 |
now spawned on demand, only when there are no available idle workers to |
| 26506 |
reuse. This optimizes startup overhead and reduces the amount of lost CPU |
| 26507 |
time to idle workers. Patch by Kyle Stanley. |
| 26508 |
|
| 26509 |
- bpo-40091: Fix a hang at fork in the logging module: the new private |
| 26510 |
_at_fork_reinit() method is now used to reinitialize locks at fork in the |
| 26511 |
child process. |
| 26512 |
|
| 26513 |
- bpo-40149: Implement traverse and clear slots in _abc._abc_data type. |
| 26514 |
|
| 26515 |
- bpo-40208: Remove deprecated :meth:`!symtable.SymbolTable.has_exec`. |
| 26516 |
|
| 26517 |
- bpo-40196: Fix a bug in the :mod:`symtable` module that was causing |
| 26518 |
incorrectly report global variables as local. Patch by Pablo Galindo. |
| 26519 |
|
| 26520 |
- bpo-40190: Add support for ``_SC_AIX_REALMEM`` to :func:`posix.sysconf`. |
| 26521 |
|
| 26522 |
- bpo-40182: Removed the ``_field_types`` attribute of the |
| 26523 |
:class:`typing.NamedTuple` class. |
| 26524 |
|
| 26525 |
- bpo-36517: Multiple inheritance with :class:`typing.NamedTuple` now raises |
| 26526 |
an error instead of silently ignoring other types. |
| 26527 |
|
| 26528 |
- bpo-40126: Fixed reverting multiple patches in unittest.mock. Patcher's |
| 26529 |
``__exit__()`` is now never called if its ``__enter__()`` is failed. |
| 26530 |
Returning true from ``__exit__()`` silences now the exception. |
| 26531 |
|
| 26532 |
- bpo-40094: CGIHTTPRequestHandler of http.server now logs the CGI script |
| 26533 |
exit code, rather than the CGI script exit status of os.waitpid(). For |
| 26534 |
example, if the script is killed by signal 11, it now logs: "CGI script |
| 26535 |
exit code -11." |
| 26536 |
|
| 26537 |
- bpo-40108: Improve the error message when triying to import a module using |
| 26538 |
:mod:`runpy` and incorrectly using the ".py" extension at the end of the |
| 26539 |
module name. Patch by Pablo Galindo. |
| 26540 |
|
| 26541 |
- bpo-40094: Add :func:`os.waitstatus_to_exitcode` function: convert a wait |
| 26542 |
status to an exit code. |
| 26543 |
|
| 26544 |
- bpo-40089: Fix threading._after_fork(): if fork was not called by a thread |
| 26545 |
spawned by threading.Thread, threading._after_fork() now creates a |
| 26546 |
_MainThread instance for _main_thread, instead of a _DummyThread instance. |
| 26547 |
|
| 26548 |
- bpo-40089: Add a private ``_at_fork_reinit()`` method to |
| 26549 |
:class:`!_thread.Lock`, :class:`!_thread.RLock`, :class:`threading.RLock` |
| 26550 |
and :class:`threading.Condition` classes: reinitialize the lock at fork in |
| 26551 |
the child process, reset the lock to the unlocked state. Rename also the |
| 26552 |
private ``_reset_internal_locks()`` method of :class:`threading.Event` to |
| 26553 |
``_at_fork_reinit()``. |
| 26554 |
|
| 26555 |
- bpo-25780: Expose :const:`~socket.CAN_RAW_JOIN_FILTERS` in the |
| 26556 |
:mod:`socket` module. |
| 26557 |
|
| 26558 |
- bpo-39503: :class:`~urllib.request.AbstractBasicAuthHandler` of |
| 26559 |
:mod:`urllib.request` now parses all WWW-Authenticate HTTP headers and |
| 26560 |
accepts multiple challenges per header: use the realm of the first Basic |
| 26561 |
challenge. |
| 26562 |
|
| 26563 |
- bpo-39812: Removed daemon threads from :mod:`concurrent.futures` by adding |
| 26564 |
an internal ``threading._register_atexit()``, which calls registered |
| 26565 |
functions prior to joining all non-daemon threads. This allows for |
| 26566 |
compatibility with subinterpreters, which don't support daemon threads. |
| 26567 |
|
| 26568 |
- bpo-40050: Fix ``importlib._bootstrap_external``: avoid creating a new |
| 26569 |
``winreg`` builtin module if it's already available in |
| 26570 |
:data:`sys.modules`, and remove redundant imports. |
| 26571 |
|
| 26572 |
- bpo-40014: Fix ``os.getgrouplist()``: if ``getgrouplist()`` function fails |
| 26573 |
because the group list is too small, retry with a larger group list. On |
| 26574 |
failure, the glibc implementation of ``getgrouplist()`` sets ``ngroups`` |
| 26575 |
to the total number of groups. For other implementations, double the group |
| 26576 |
list size. |
| 26577 |
|
| 26578 |
- bpo-40017: Add :const:`time.CLOCK_TAI` constant if the operating system |
| 26579 |
support it. |
| 26580 |
|
| 26581 |
- bpo-40016: In re docstring, clarify the relationship between inline and |
| 26582 |
argument compile flags. |
| 26583 |
|
| 26584 |
- bpo-39953: Update internal table of OpenSSL error codes in the ``ssl`` |
| 26585 |
module. |
| 26586 |
|
| 26587 |
- bpo-36144: Added :pep:`584` operators to |
| 26588 |
:class:`weakref.WeakValueDictionary`. |
| 26589 |
|
| 26590 |
- bpo-36144: Added :pep:`584` operators to |
| 26591 |
:class:`weakref.WeakKeyDictionary`. |
| 26592 |
|
| 26593 |
- bpo-38891: Fix linear runtime behaviour of the ``__getitem__`` and |
| 26594 |
``__setitem__`` methods in |
| 26595 |
:class:`multiprocessing.shared_memory.ShareableList`. This avoids |
| 26596 |
quadratic performance when iterating a ``ShareableList``. Patch by Thomas |
| 26597 |
Krennwallner. |
| 26598 |
|
| 26599 |
- bpo-39682: Remove undocumented support for *closing* a ``pathlib.Path`` |
| 26600 |
object via its context manager. The context manager magic methods remain, |
| 26601 |
but they are now a no-op, making ``Path`` objects immutable. |
| 26602 |
|
| 26603 |
- bpo-36144: Added :pep:`584` operators (``|`` and ``|=``) to |
| 26604 |
:class:`collections.ChainMap`. |
| 26605 |
|
| 26606 |
- bpo-39011: Normalization of line endings in ElementTree attributes was |
| 26607 |
removed, as line endings which were replaced by entity numbers should be |
| 26608 |
preserved in original form. |
| 26609 |
|
| 26610 |
- bpo-38410: Properly handle :func:`sys.audit` failures in |
| 26611 |
:func:`sys.set_asyncgen_hooks`. |
| 26612 |
|
| 26613 |
- bpo-36541: lib2to3 now recognizes named assignment expressions (the walrus |
| 26614 |
operator, ``:=``) |
| 26615 |
|
| 26616 |
- bpo-35967: In platform, delay the invocation of 'uname -p' until the |
| 26617 |
processor attribute is requested. |
| 26618 |
|
| 26619 |
- bpo-35113: :meth:`inspect.getsource` now returns correct source code for |
| 26620 |
inner class with same name as module level class. Decorators are also |
| 26621 |
returned as part of source of the class. Patch by Karthikeyan |
| 26622 |
Singaravelan. |
| 26623 |
|
| 26624 |
- bpo-33262: Deprecate passing None as an argument for :func:`shlex.split`'s |
| 26625 |
``s`` parameter. Patch by Zackery Spytz. |
| 26626 |
|
| 26627 |
- bpo-31758: Prevent crashes when using an uninitialized |
| 26628 |
``_elementtree.XMLParser`` object. Patch by Oren Milman. |
| 26629 |
|
| 26630 |
Documentation |
| 26631 |
------------- |
| 26632 |
|
| 26633 |
- bpo-27635: The pickle documentation incorrectly claimed that ``__new__`` |
| 26634 |
isn't called by default when unpickling. |
| 26635 |
|
| 26636 |
- bpo-39879: Updated :ref:`datamodel` docs to include :func:`dict` insertion |
| 26637 |
order preservation. Patch by Furkan Onder and Samy Lahfa. |
| 26638 |
|
| 26639 |
- bpo-38387: Document :c:macro:`PyDoc_STRVAR` macro in the C-API reference. |
| 26640 |
|
| 26641 |
- bpo-13743: Some methods within xml.dom.minidom.Element class are now |
| 26642 |
better documented. |
| 26643 |
|
| 26644 |
Tests |
| 26645 |
----- |
| 26646 |
|
| 26647 |
- bpo-31904: Set expected default encoding in test_c_locale_coercion.py for |
| 26648 |
VxWorks RTOS. |
| 26649 |
|
| 26650 |
- bpo-40162: Update Travis CI configuration to OpenSSL 1.1.1f. |
| 26651 |
|
| 26652 |
- bpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines. |
| 26653 |
|
| 26654 |
- bpo-40094: Add :func:`test.support.wait_process` function. |
| 26655 |
|
| 26656 |
- bpo-40003: ``test.bisect_cmd`` now copies Python command line options like |
| 26657 |
``-O`` or ``-W``. Moreover, emit a warning if ``test.bisect_cmd`` is used |
| 26658 |
with ``-w``/``--verbose2`` option. |
| 26659 |
|
| 26660 |
- bpo-39380: Add the encoding in :class:`ftplib.FTP` and |
| 26661 |
:class:`ftplib.FTP_TLS` to the constructor as keyword-only and change the |
| 26662 |
default from ``latin-1`` to ``utf-8`` to follow :rfc:`2640`. |
| 26663 |
|
| 26664 |
- bpo-39793: Use the same domain when testing ``make_msgid``. Patch by |
| 26665 |
Batuhan Taskaya. |
| 26666 |
|
| 26667 |
- bpo-1812: Fix newline handling in doctest.testfile when loading from a |
| 26668 |
package whose loader has a get_data method. Patch by Peter Donis. |
| 26669 |
|
| 26670 |
Build |
| 26671 |
----- |
| 26672 |
|
| 26673 |
- bpo-38360: Support single-argument form of macOS -isysroot flag. |
| 26674 |
|
| 26675 |
- bpo-40158: Fix CPython MSBuild Properties in NuGet Package |
| 26676 |
(build/native/python.props) |
| 26677 |
|
| 26678 |
- bpo-38527: Fix configure check on Solaris for "float word ordering": |
| 26679 |
sometimes, the correct "grep" command was not being used. Patch by Arnon |
| 26680 |
Yaari. |
| 26681 |
|
| 26682 |
Windows |
| 26683 |
------- |
| 26684 |
|
| 26685 |
- bpo-40164: Updates Windows to OpenSSL 1.1.1f |
| 26686 |
|
| 26687 |
- bpo-8901: Ignore the Windows registry when the ``-E`` option is used. |
| 26688 |
|
| 26689 |
macOS |
| 26690 |
----- |
| 26691 |
|
| 26692 |
- bpo-38329: python.org macOS installers now update the Current version |
| 26693 |
symlink of /Library/Frameworks/Python.framework/Versions for 3.9 installs. |
| 26694 |
Previously, Current was only updated for Python 2.x installs. This should |
| 26695 |
make it easier to embed Python 3 into other macOS applications. |
| 26696 |
|
| 26697 |
- bpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g. |
| 26698 |
|
| 26699 |
IDLE |
| 26700 |
---- |
| 26701 |
|
| 26702 |
- bpo-38439: Add a 256×256 pixel IDLE icon to support more modern |
| 26703 |
environments. Created by Andrew Clover. Delete the unused macOS idle.icns |
| 26704 |
icon file. |
| 26705 |
|
| 26706 |
- bpo-38689: IDLE will no longer freeze when inspect.signature fails when |
| 26707 |
fetching a calltip. |
| 26708 |
|
| 26709 |
Tools/Demos |
| 26710 |
----------- |
| 26711 |
|
| 26712 |
- bpo-40385: Removed the checkpyc.py tool. Please see compileall without |
| 26713 |
force mode as a potential alternative. |
| 26714 |
|
| 26715 |
- bpo-40179: Fixed translation of ``#elif`` in Argument Clinic. |
| 26716 |
|
| 26717 |
- bpo-40094: Fix ``which.py`` script exit code: it now uses |
| 26718 |
:func:`os.waitstatus_to_exitcode` to convert :func:`os.system` exit status |
| 26719 |
into an exit code. |
| 26720 |
|
| 26721 |
C API |
| 26722 |
----- |
| 26723 |
|
| 26724 |
- bpo-40241: Move the :c:type:`!PyGC_Head` structure to the internal C API. |
| 26725 |
|
| 26726 |
- bpo-40170: Convert :c:func:`PyObject_IS_GC` macro to a function to hide |
| 26727 |
implementation details. |
| 26728 |
|
| 26729 |
- bpo-40241: Add the functions :c:func:`PyObject_GC_IsTracked` and |
| 26730 |
:c:func:`PyObject_GC_IsFinalized` to the public API to allow to query if |
| 26731 |
Python objects are being currently tracked or have been already finalized |
| 26732 |
by the garbage collector respectively. Patch by Pablo Galindo. |
| 26733 |
|
| 26734 |
- bpo-40170: The :c:func:`!PyObject_NEW` macro becomes an alias to the |
| 26735 |
:c:func:`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro |
| 26736 |
becomes an alias to the :c:func:`PyObject_NewVar` macro, to hide |
| 26737 |
implementation details. They no longer access directly the |
| 26738 |
:c:member:`PyTypeObject.tp_basicsize` member. |
| 26739 |
|
| 26740 |
- bpo-40170: :c:func:`PyType_HasFeature` now always calls |
| 26741 |
:c:func:`PyType_GetFlags` to hide implementation details. Previously, it |
| 26742 |
accessed directly the :c:member:`PyTypeObject.tp_flags` member when the |
| 26743 |
limited C API was not used. |
| 26744 |
|
| 26745 |
- bpo-40170: Convert the :c:func:`!PyObject_GET_WEAKREFS_LISTPTR` macro to a |
| 26746 |
function to hide implementation details: the macro accessed directly to |
| 26747 |
the :c:member:`PyTypeObject.tp_weaklistoffset` member. |
| 26748 |
|
| 26749 |
- bpo-40170: Convert :c:func:`PyObject_CheckBuffer` macro to a function to |
| 26750 |
hide implementation details: the macro accessed directly the |
| 26751 |
:c:member:`PyTypeObject.tp_as_buffer` member. |
| 26752 |
|
| 26753 |
- bpo-40170: Always declare :c:func:`PyIndex_Check` as an opaque function to |
| 26754 |
hide implementation details: remove ``PyIndex_Check()`` macro. The macro |
| 26755 |
accessed directly the :c:member:`PyTypeObject.tp_as_number` member. |
| 26756 |
|
| 26757 |
- bpo-39947: Add :c:func:`PyThreadState_GetID` function: get the unique |
| 26758 |
identifier of a Python thread state. |
| 26759 |
|
| 26760 |
|
| 26761 |
What's New in Python 3.9.0 alpha 5? |
| 26762 |
=================================== |
| 26763 |
|
| 26764 |
*Release date: 2020-03-23* |
| 26765 |
|
| 26766 |
Security |
| 26767 |
-------- |
| 26768 |
|
| 26769 |
- bpo-38576: Disallow control characters in hostnames in http.client, |
| 26770 |
addressing :cve:`2019-18348`. Such potentially malicious header injection |
| 26771 |
URLs now cause a InvalidURL to be raised. |
| 26772 |
|
| 26773 |
Core and Builtins |
| 26774 |
----------------- |
| 26775 |
|
| 26776 |
- bpo-40010: Optimize pending calls in multithreaded applications. If a |
| 26777 |
thread different than the main thread schedules a pending call |
| 26778 |
(:c:func:`Py_AddPendingCall`), the bytecode evaluation loop is no longer |
| 26779 |
interrupted at each bytecode instruction to check for pending calls which |
| 26780 |
cannot be executed. Only the main thread can execute pending calls. |
| 26781 |
|
| 26782 |
Previously, the bytecode evaluation loop was interrupted at each |
| 26783 |
instruction until the main thread executes pending calls. |
| 26784 |
|
| 26785 |
- bpo-1635741: Port _weakref extension module to multiphase initialization |
| 26786 |
(:pep:`489`). |
| 26787 |
|
| 26788 |
- bpo-1635741: Port _collections module to multiphase initialization |
| 26789 |
(:pep:`489`). |
| 26790 |
|
| 26791 |
- bpo-40010: Optimize signal handling in multithreaded applications. If a |
| 26792 |
thread different than the main thread gets a signal, the bytecode |
| 26793 |
evaluation loop is no longer interrupted at each bytecode instruction to |
| 26794 |
check for pending signals which cannot be handled. Only the main thread of |
| 26795 |
the main interpreter can handle signals. |
| 26796 |
|
| 26797 |
Previously, the bytecode evaluation loop was interrupted at each |
| 26798 |
instruction until the main thread handles signals. |
| 26799 |
|
| 26800 |
- bpo-39984: If :c:func:`Py_AddPendingCall` is called in a subinterpreter, |
| 26801 |
the function is now scheduled to be called from the subinterpreter, rather |
| 26802 |
than being called from the main interpreter. Each subinterpreter now has |
| 26803 |
its own list of scheduled calls. |
| 26804 |
|
| 26805 |
- bpo-1635741: Port _heapq module to multiphase initialization. |
| 26806 |
|
| 26807 |
- bpo-1635741: Port itertools module to multiphase initialization |
| 26808 |
(:pep:`489`). |
| 26809 |
|
| 26810 |
- bpo-37207: Speed up calls to ``frozenset()`` by using the :pep:`590` |
| 26811 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 26812 |
|
| 26813 |
- bpo-39984: subinterpreters: Move |
| 26814 |
``_PyRuntimeState.ceval.tracing_possible`` to |
| 26815 |
``PyInterpreterState.ceval.tracing_possible``: each interpreter now has |
| 26816 |
its own variable. |
| 26817 |
|
| 26818 |
- bpo-37207: Speed up calls to ``set()`` by using the :pep:`590` |
| 26819 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 26820 |
|
| 26821 |
- bpo-1635741: Port _statistics module to multiphase initialization |
| 26822 |
(:pep:`489`). |
| 26823 |
|
| 26824 |
- bpo-39968: Use inline function to replace extension modules' |
| 26825 |
get_module_state macros. |
| 26826 |
|
| 26827 |
- bpo-39965: Correctly raise ``SyntaxError`` if *await* is used inside |
| 26828 |
non-async functions and ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set (like in the |
| 26829 |
asyncio REPL). Patch by Pablo Galindo. |
| 26830 |
|
| 26831 |
- bpo-39562: Allow executing asynchronous comprehensions on the top level |
| 26832 |
when the ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag is given. Patch by Batuhan |
| 26833 |
Taskaya. |
| 26834 |
|
| 26835 |
- bpo-37207: Speed up calls to ``tuple()`` by using the :pep:`590` |
| 26836 |
``vectorcall`` calling convention. Patch by Donghee Na. |
| 26837 |
|
| 26838 |
- bpo-38373: Changed list overallocation strategy. It no longer |
| 26839 |
overallocates if the new size is closer to overallocated size than to the |
| 26840 |
old size and adds padding. |
| 26841 |
|
| 26842 |
- bpo-39926: Update Unicode database to Unicode version 13.0.0. |
| 26843 |
|
| 26844 |
- bpo-19466: Clear the frames of daemon threads earlier during the Python |
| 26845 |
shutdown to call objects destructors. So "unclosed file" resource warnings |
| 26846 |
are now emitted for daemon threads in a more reliable way. |
| 26847 |
|
| 26848 |
- bpo-38894: Fix a bug that was causing incomplete results when calling |
| 26849 |
``pathlib.Path.glob`` in the presence of symlinks that point to files |
| 26850 |
where the user does not have read access. Patch by Pablo Galindo and Matt |
| 26851 |
Wozniski. |
| 26852 |
|
| 26853 |
- bpo-39877: Fix :c:func:`PyEval_RestoreThread` random crash at exit with |
| 26854 |
daemon threads. It now accesses the ``_PyRuntime`` variable directly |
| 26855 |
instead of using ``tstate->interp->runtime``, since ``tstate`` can be a |
| 26856 |
dangling pointer after :c:func:`Py_Finalize` has been called. Moreover, |
| 26857 |
the daemon thread now exits before trying to take the GIL. |
| 26858 |
|
| 26859 |
- bpo-39871: Fix a possible :exc:`SystemError` in |
| 26860 |
``math.{atan2,copysign,remainder}()`` when the first argument cannot be |
| 26861 |
converted to a :class:`float`. Patch by Zackery Spytz. |
| 26862 |
|
| 26863 |
- bpo-39776: Fix race condition where threads created by PyGILState_Ensure() |
| 26864 |
could get a duplicate id. |
| 26865 |
|
| 26866 |
This affects consumers of tstate->id like the contextvar caching |
| 26867 |
machinery, which could return invalid cached objects under heavy thread |
| 26868 |
load (observed in embedded scenarios). |
| 26869 |
|
| 26870 |
- bpo-39778: Fixed a crash due to incorrect handling of weak references in |
| 26871 |
``collections.OrderedDict`` classes. Patch by Pablo Galindo. |
| 26872 |
|
| 26873 |
- bpo-1635741: Port audioop extension module to multiphase initialization |
| 26874 |
(:pep:`489`). |
| 26875 |
|
| 26876 |
- bpo-39702: Relax :term:`decorator` grammar restrictions to allow any valid |
| 26877 |
expression (:pep:`614`). |
| 26878 |
|
| 26879 |
- bpo-38091: Tweak import deadlock detection code to not deadlock itself. |
| 26880 |
|
| 26881 |
- bpo-1635741: Port _locale extension module to multiphase initialization |
| 26882 |
(:pep:`489`). |
| 26883 |
|
| 26884 |
- bpo-39087: Optimize :c:func:`PyUnicode_AsUTF8` and |
| 26885 |
:c:func:`PyUnicode_AsUTF8AndSize` slightly when they need to create |
| 26886 |
internal UTF-8 cache. |
| 26887 |
|
| 26888 |
- bpo-39520: Fix unparsing of ext slices with no items (``foo[:,]``). Patch |
| 26889 |
by Batuhan Taskaya. |
| 26890 |
|
| 26891 |
- bpo-39220: Do not optimize annotations if 'from __future__ import |
| 26892 |
annotations' is used. Patch by Pablo Galindo. |
| 26893 |
|
| 26894 |
- bpo-35712: Using :data:`NotImplemented` in a boolean context has been |
| 26895 |
deprecated. Patch contributed by Josh Rosenberg. |
| 26896 |
|
| 26897 |
- bpo-22490: Don't leak environment variable ``__PYVENV_LAUNCHER__`` into |
| 26898 |
the interpreter session on macOS. |
| 26899 |
|
| 26900 |
Library |
| 26901 |
------- |
| 26902 |
|
| 26903 |
- bpo-39830: Add :class:`zipfile.Path` to ``__all__`` in the :mod:`zipfile` |
| 26904 |
module. |
| 26905 |
|
| 26906 |
- bpo-40000: Improved error messages for validation of ``ast.Constant`` |
| 26907 |
nodes. Patch by Batuhan Taskaya. |
| 26908 |
|
| 26909 |
- bpo-39999: ``__module__`` of the AST node classes is now set to "ast" |
| 26910 |
instead of "_ast". Added docstrings for dummy AST node classes and |
| 26911 |
deprecated attributes. |
| 26912 |
|
| 26913 |
- bpo-39991: :func:`uuid.getnode` now skips IPv6 addresses with the same |
| 26914 |
string length than a MAC address (17 characters): only use MAC addresses. |
| 26915 |
|
| 26916 |
- bpo-39988: Deprecated ``ast.AugLoad`` and ``ast.AugStore`` node classes |
| 26917 |
because they are no longer used. |
| 26918 |
|
| 26919 |
- bpo-39656: Ensure ``bin/python3.#`` is always present in virtual |
| 26920 |
environments on POSIX platforms - by Anthony Sottile. |
| 26921 |
|
| 26922 |
- bpo-39969: Deprecated ``ast.Param`` node class because it's no longer |
| 26923 |
used. Patch by Batuhan Taskaya. |
| 26924 |
|
| 26925 |
- bpo-39360: Ensure all workers exit when finalizing a |
| 26926 |
:class:`multiprocessing.Pool` implicitly via the module finalization |
| 26927 |
handlers of multiprocessing. This fixes a deadlock situation that can be |
| 26928 |
experienced when the Pool is not properly finalized via the context |
| 26929 |
manager or a call to ``multiprocessing.Pool.terminate``. Patch by Batuhan |
| 26930 |
Taskaya and Pablo Galindo. |
| 26931 |
|
| 26932 |
- bpo-35370: sys.settrace(), sys.setprofile() and _lsprof.Profiler.enable() |
| 26933 |
now properly report :c:func:`PySys_Audit` error if "sys.setprofile" or |
| 26934 |
"sys.settrace" audit event is denied. |
| 26935 |
|
| 26936 |
- bpo-39936: AIX: Fix _aix_support module when the subprocess is not |
| 26937 |
available, when building Python from scratch. It now uses new private |
| 26938 |
_bootsubprocess module, rather than having two implementations depending |
| 26939 |
if subprocess is available or not. So _aix_support.aix_platform() result |
| 26940 |
is now the same if subprocess is available or not. |
| 26941 |
|
| 26942 |
- bpo-36144: :class:`collections.OrderedDict` now implements ``|`` and |
| 26943 |
``|=`` (:pep:`584`). |
| 26944 |
|
| 26945 |
- bpo-39652: The column name found in ``sqlite3.Cursor.description`` is now |
| 26946 |
truncated on the first '[' only if the PARSE_COLNAMES option is set. |
| 26947 |
|
| 26948 |
- bpo-39915: Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has call |
| 26949 |
objects in the order of awaited arguments instead of using |
| 26950 |
:attr:`unittest.mock.Mock.call_args` which has the last value of the call. |
| 26951 |
Patch by Karthikeyan Singaravelan. |
| 26952 |
|
| 26953 |
- bpo-36144: Updated :data:`os.environ` and :data:`os.environb` to support |
| 26954 |
:pep:`584`'s merge (``|``) and update (``|=``) operators. |
| 26955 |
|
| 26956 |
- bpo-38662: The ``ensurepip`` module now invokes ``pip`` via the ``runpy`` |
| 26957 |
module. Hence it is no longer tightly coupled with the internal API of the |
| 26958 |
bundled ``pip`` version, allowing easier updates to a newer ``pip`` |
| 26959 |
version both internally and for distributors. |
| 26960 |
|
| 26961 |
- bpo-38075: Fix the :meth:`random.Random.seed` method when a :class:`bool` |
| 26962 |
is passed as the seed. |
| 26963 |
|
| 26964 |
- bpo-39916: More reliable use of ``os.scandir()`` in ``Path.glob()``. It no |
| 26965 |
longer emits a ResourceWarning when interrupted. |
| 26966 |
|
| 26967 |
- bpo-39850: :mod:`multiprocessing` now supports abstract socket addresses |
| 26968 |
(if abstract sockets are supported in the running platform). When creating |
| 26969 |
arbitrary addresses (like when default-constructing |
| 26970 |
:class:`multiprocessing.connection.Listener` objects) abstract sockets are |
| 26971 |
preferred to avoid the case when the temporary-file-generated address is |
| 26972 |
too large for an AF_UNIX socket address. Patch by Pablo Galindo. |
| 26973 |
|
| 26974 |
- bpo-36287: :func:`ast.dump` no longer outputs optional fields and |
| 26975 |
attributes with default values. The default values for optional fields and |
| 26976 |
attributes of AST nodes are now set as class attributes (e.g. |
| 26977 |
``Constant.kind`` is set to ``None``). |
| 26978 |
|
| 26979 |
- bpo-39889: Fixed :func:`ast.unparse` for extended slices containing a |
| 26980 |
single element (e.g. ``a[i:j,]``). Remove redundant tuples when index with |
| 26981 |
a tuple (e.g. ``a[i, j]``). |
| 26982 |
|
| 26983 |
- bpo-39828: Fix :mod:`json.tool` to catch :exc:`BrokenPipeError`. Patch by |
| 26984 |
Donghee Na. |
| 26985 |
|
| 26986 |
- bpo-13487: Avoid a possible *"RuntimeError: dictionary changed size during |
| 26987 |
iteration"* from :func:`inspect.getmodule` when it tried to loop through |
| 26988 |
:data:`sys.modules`. |
| 26989 |
|
| 26990 |
- bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode". |
| 26991 |
The "U" mode of open() is kept in Python 3.9 to ease transition from |
| 26992 |
Python 2.7, but will be removed in Python 3.10. |
| 26993 |
|
| 26994 |
- bpo-28577: The hosts method on 32-bit prefix length IPv4Networks and |
| 26995 |
128-bit prefix IPv6Networks now returns a list containing the single |
| 26996 |
Address instead of an empty list. |
| 26997 |
|
| 26998 |
- bpo-39826: Add getConnection method to logging HTTPHandler to enable |
| 26999 |
custom connections. |
| 27000 |
|
| 27001 |
- bpo-39763: Reimplement ``distutils.spawn.spawn`` function with the |
| 27002 |
:mod:`subprocess` module. |
| 27003 |
|
| 27004 |
- bpo-39794: Add --without-decimal-contextvar build option. This enables a |
| 27005 |
thread-local rather than a coroutine local context. |
| 27006 |
|
| 27007 |
- bpo-36144: :class:`collections.defaultdict` now implements ``|`` |
| 27008 |
(:pep:`584`). |
| 27009 |
|
| 27010 |
- bpo-39517: Fix runpy.run_path() when using pathlike objects |
| 27011 |
|
| 27012 |
- bpo-39775: Change ``inspect.Signature.parameters`` back to |
| 27013 |
``collections.OrderedDict``. This was changed to ``dict`` in Python |
| 27014 |
3.9.0a4. |
| 27015 |
|
| 27016 |
- bpo-39678: Refactor queue_manager in |
| 27017 |
:class:`concurrent.futures.ProcessPoolExecutor` to make it easier to |
| 27018 |
maintain. |
| 27019 |
|
| 27020 |
- bpo-39764: Fix AttributeError when calling get_stack on a PyAsyncGenObject |
| 27021 |
Task |
| 27022 |
|
| 27023 |
- bpo-39769: The :func:`compileall.compile_dir` function's *ddir* parameter |
| 27024 |
and the compileall command line flag ``-d`` no longer write the wrong |
| 27025 |
pathname to the generated pyc file for submodules beneath the root of the |
| 27026 |
directory tree being compiled. This fixes a regression introduced with |
| 27027 |
Python 3.5. |
| 27028 |
|
| 27029 |
- bpo-36144: :class:`types.MappingProxyType` objects now support the merge |
| 27030 |
(``|``) operator from :pep:`584`. |
| 27031 |
|
| 27032 |
- bpo-38691: The :mod:`importlib` module now ignores the |
| 27033 |
:envvar:`PYTHONCASEOK` environment variable when the :option:`-E` or |
| 27034 |
:option:`-I` command line options are being used. |
| 27035 |
|
| 27036 |
- bpo-39719: Remove :meth:`tempfile.SpooledTemporaryFile.softspace` as files |
| 27037 |
no longer have the ``softspace`` attribute in Python 3. Patch by Shantanu. |
| 27038 |
|
| 27039 |
- bpo-39667: Improve pathlib.Path compatibility on zipfile.Path and correct |
| 27040 |
performance degradation as found in zipp 3.0. |
| 27041 |
|
| 27042 |
- bpo-39638: Keep ASDL signatures in the docstrings for ``AST`` nodes. Patch |
| 27043 |
by Batuhan Taskaya |
| 27044 |
|
| 27045 |
- bpo-39639: Deprecated ``ast.Suite`` node class because it's no longer |
| 27046 |
used. Patch by Batuhan Taskaya. |
| 27047 |
|
| 27048 |
- bpo-39609: Add thread_name_prefix to default asyncio executor |
| 27049 |
|
| 27050 |
- bpo-39548: Fix handling of header in |
| 27051 |
:class:`urllib.request.AbstractDigestAuthHandler` when the optional |
| 27052 |
``qop`` parameter is not present. |
| 27053 |
|
| 27054 |
- bpo-39509: HTTP status codes ``103 EARLY_HINTS`` and ``425 TOO_EARLY`` are |
| 27055 |
added to :class:`http.HTTPStatus`. Patch by Donghee Na. |
| 27056 |
|
| 27057 |
- bpo-39507: Adding HTTP status 418 "I'm a Teapot" to HTTPStatus in http |
| 27058 |
library. Patch by Ross Rhodes. |
| 27059 |
|
| 27060 |
- bpo-39495: Remove default value from *attrs* parameter of |
| 27061 |
:meth:`xml.etree.ElementTree.TreeBuilder.start` for consistency between |
| 27062 |
Python and C implementations. |
| 27063 |
|
| 27064 |
- bpo-38971: Open issue in the BPO indicated a desire to make the |
| 27065 |
implementation of codecs.open() at parity with io.open(), which implements |
| 27066 |
a try/except to assure file stream gets closed before an exception is |
| 27067 |
raised. |
| 27068 |
|
| 27069 |
- bpo-38641: Added starred expressions support to ``return`` and ``yield`` |
| 27070 |
statements for ``lib2to3``. Patch by Vlad Emelianov. |
| 27071 |
|
| 27072 |
- bpo-37534: When using minidom module to generate XML documents the ability |
| 27073 |
to add Standalone Document Declaration is added. All the changes are made |
| 27074 |
to generate a document in compliance with Extensible Markup Language (XML) |
| 27075 |
1.0 (Fifth Edition) W3C Recommendation (available here: |
| 27076 |
https://www.w3.org/TR/xml/#sec-prolog-dtd). |
| 27077 |
|
| 27078 |
- bpo-34788: Add support for scoped IPv6 addresses to :mod:`ipaddress`. |
| 27079 |
Patch by Oleksandr Pavliuk. |
| 27080 |
|
| 27081 |
- bpo-34822: Simplified AST for subscription. Simple indices are now |
| 27082 |
represented by their value, extended slices are represented as tuples. |
| 27083 |
:mod:`ast` classes ``Index`` and ``ExtSlice`` are considered deprecated |
| 27084 |
and will be removed in future Python versions. In the meantime, |
| 27085 |
``Index(value)`` now returns a ``value`` itself, ``ExtSlice(slices)`` |
| 27086 |
returns ``Tuple(slices, Load())``. |
| 27087 |
|
| 27088 |
Documentation |
| 27089 |
------------- |
| 27090 |
|
| 27091 |
- bpo-39868: Updated the Language Reference for :pep:`572`. |
| 27092 |
|
| 27093 |
- bpo-13790: Change 'string' to 'specification' in format doc. |
| 27094 |
|
| 27095 |
- bpo-17422: The language reference no longer restricts default class |
| 27096 |
namespaces to dicts only. |
| 27097 |
|
| 27098 |
- bpo-39530: Fix misleading documentation about mixed-type numeric |
| 27099 |
comparisons. |
| 27100 |
|
| 27101 |
- bpo-39718: Update :mod:`token` documentation to reflect additions in |
| 27102 |
Python 3.8 |
| 27103 |
|
| 27104 |
- bpo-39677: Changed operand name of **MAKE_FUNCTION** from *argc* to |
| 27105 |
*flags* for module :mod:`dis` |
| 27106 |
|
| 27107 |
Tests |
| 27108 |
----- |
| 27109 |
|
| 27110 |
- bpo-40019: test_gdb now skips tests if it detects that gdb failed to read |
| 27111 |
debug information because the Python binary is optimized. |
| 27112 |
|
| 27113 |
- bpo-27807: ``test_site.test_startup_imports()`` is now skipped if a path |
| 27114 |
of :data:`sys.path` contains a ``.pth`` file. |
| 27115 |
|
| 27116 |
- bpo-26067: Do not fail test_shutil test_chown test when uid or gid of user |
| 27117 |
cannot be resolved to a name. |
| 27118 |
|
| 27119 |
- bpo-39855: test_subprocess.test_user() now skips the test on an user name |
| 27120 |
if the user name doesn't exist. For example, skip the test if the user |
| 27121 |
"nobody" doesn't exist on Linux. |
| 27122 |
|
| 27123 |
Build |
| 27124 |
----- |
| 27125 |
|
| 27126 |
- bpo-39761: Fix build with DTrace but without additional DFLAGS. |
| 27127 |
|
| 27128 |
- bpo-39763: setup.py now uses a basic implementation of the |
| 27129 |
:mod:`subprocess` module if the :mod:`subprocess` module is not available: |
| 27130 |
before required C extension modules are built. |
| 27131 |
|
| 27132 |
- bpo-1294959: Add ``--with-platlibdir`` option to the configure script: |
| 27133 |
name of the platform-specific library directory, stored in the new |
| 27134 |
:data:`sys.platlibdir` attribute. It is used to build the path of |
| 27135 |
platform-specific extension modules and the path of the standard library. |
| 27136 |
It is equal to ``"lib"`` on most platforms. On Fedora and SuSE, it is |
| 27137 |
equal to ``"lib64"`` on 64-bit platforms. Patch by Jan Matějek, Matěj |
| 27138 |
Cepl, Charalampos Stratakis and Victor Stinner. |
| 27139 |
|
| 27140 |
Windows |
| 27141 |
------- |
| 27142 |
|
| 27143 |
- bpo-39930: Ensures the required :file:`vcruntime140.dll` is included in |
| 27144 |
install packages. |
| 27145 |
|
| 27146 |
- bpo-39847: Avoid hang when computer is hibernated whilst waiting for a |
| 27147 |
mutex (for lock-related objects from :mod:`threading`) around 49-day |
| 27148 |
uptime. |
| 27149 |
|
| 27150 |
- bpo-38597: ``distutils`` will no longer statically link |
| 27151 |
:file:`vcruntime140.dll` when a redistributable version is unavailable. |
| 27152 |
All future releases of CPython will include a copy of this DLL to ensure |
| 27153 |
distributed extensions can continue to load. |
| 27154 |
|
| 27155 |
- bpo-38380: Update Windows builds to use SQLite 3.31.1 |
| 27156 |
|
| 27157 |
- bpo-39789: Update Windows release build machines to Visual Studio 2019 |
| 27158 |
(MSVC 14.2). |
| 27159 |
|
| 27160 |
- bpo-34803: Package for nuget.org now includes repository reference and |
| 27161 |
bundled icon image. |
| 27162 |
|
| 27163 |
macOS |
| 27164 |
----- |
| 27165 |
|
| 27166 |
- bpo-38380: Update macOS builds to use SQLite 3.31.1 |
| 27167 |
|
| 27168 |
IDLE |
| 27169 |
---- |
| 27170 |
|
| 27171 |
- bpo-27115: For 'Go to Line', use a Query box subclass with IDLE standard |
| 27172 |
behavior and improved error checking. |
| 27173 |
|
| 27174 |
- bpo-39885: Since clicking to get an IDLE context menu moves the cursor, |
| 27175 |
any text selection should be and now is cleared. |
| 27176 |
|
| 27177 |
- bpo-39852: Edit "Go to line" now clears any selection, preventing |
| 27178 |
accidental deletion. It also updates Ln and Col on the status bar. |
| 27179 |
|
| 27180 |
- bpo-39781: Selecting code context lines no longer causes a jump. |
| 27181 |
|
| 27182 |
Tools/Demos |
| 27183 |
----------- |
| 27184 |
|
| 27185 |
- bpo-36184: Port python-gdb.py to FreeBSD. python-gdb.py now checks for |
| 27186 |
"take_gil" function name to check if a frame tries to acquire the GIL, |
| 27187 |
instead of checking for "pthread_cond_timedwait" which is specific to |
| 27188 |
Linux and can be a different condition than the GIL. |
| 27189 |
|
| 27190 |
- bpo-38080: Added support to fix ``getproxies`` in the |
| 27191 |
:mod:`!lib2to3.fixes.fix_urllib` module. Patch by José Roberto Meza |
| 27192 |
Cabrera. |
| 27193 |
|
| 27194 |
C API |
| 27195 |
----- |
| 27196 |
|
| 27197 |
- bpo-40024: Add :c:func:`PyModule_AddType` helper function: add a type to a |
| 27198 |
module. Patch by Donghee Na. |
| 27199 |
|
| 27200 |
- bpo-39946: Remove ``_PyRuntime.getframe`` hook and remove |
| 27201 |
``_PyThreadState_GetFrame`` macro which was an alias to |
| 27202 |
``_PyRuntime.getframe``. They were only exposed by the internal C API. |
| 27203 |
Remove also ``PyThreadFrameGetter`` type. |
| 27204 |
|
| 27205 |
- bpo-39947: Add :c:func:`PyThreadState_GetFrame` function: get the current |
| 27206 |
frame of a Python thread state. |
| 27207 |
|
| 27208 |
- bpo-37207: Add _PyArg_NoKwnames helper function. Patch by Donghee Na. |
| 27209 |
|
| 27210 |
- bpo-39947: Add :c:func:`PyThreadState_GetInterpreter`: get the interpreter |
| 27211 |
of a Python thread state. |
| 27212 |
|
| 27213 |
- bpo-39947: Add :c:func:`PyInterpreterState_Get` function to the limited C |
| 27214 |
API. |
| 27215 |
|
| 27216 |
- bpo-35370: If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile` |
| 27217 |
or :c:func:`PyEval_SetTrace`, log the error as an unraisable exception. |
| 27218 |
|
| 27219 |
- bpo-39947: Move the static inline function flavor of |
| 27220 |
Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() to the internal C API: |
| 27221 |
they access PyThreadState attributes. The limited C API provides regular |
| 27222 |
functions which hide implementation details. |
| 27223 |
|
| 27224 |
- bpo-39947: Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END macro no longer |
| 27225 |
access PyThreadState attributes, but call new private _PyTrash_begin() and |
| 27226 |
_PyTrash_end() functions which hide implementation details. |
| 27227 |
|
| 27228 |
- bpo-39884: :c:func:`PyDescr_NewMethod` and :c:func:`PyCFunction_NewEx` now |
| 27229 |
include the method name in the SystemError "bad call flags" error message |
| 27230 |
to ease debug. |
| 27231 |
|
| 27232 |
- bpo-39877: Deprecated :c:func:`!PyEval_InitThreads` and |
| 27233 |
:c:func:`!PyEval_ThreadsInitialized`. Calling |
| 27234 |
:c:func:`!PyEval_InitThreads` now does nothing. |
| 27235 |
|
| 27236 |
- bpo-38249: :c:macro:`Py_UNREACHABLE` is now implemented with |
| 27237 |
``__builtin_unreachable()`` and analogs in release mode. |
| 27238 |
|
| 27239 |
- bpo-38643: :c:func:`PyNumber_ToBase` now raises a :exc:`SystemError` |
| 27240 |
instead of crashing when called with invalid base. |
| 27241 |
|
| 27242 |
- bpo-39882: The :c:func:`Py_FatalError` function is replaced with a macro |
| 27243 |
which logs automatically the name of the current function, unless the |
| 27244 |
``Py_LIMITED_API`` macro is defined. |
| 27245 |
|
| 27246 |
- bpo-39824: Extension modules: :c:member:`~PyModuleDef.m_traverse`, |
| 27247 |
:c:member:`~PyModuleDef.m_clear` and :c:member:`~PyModuleDef.m_free` |
| 27248 |
functions of :c:type:`PyModuleDef` are no longer called if the module |
| 27249 |
state was requested but is not allocated yet. This is the case immediately |
| 27250 |
after the module is created and before the module is executed |
| 27251 |
(:c:data:`Py_mod_exec` function). More precisely, these functions are not |
| 27252 |
called if :c:member:`~PyModuleDef.m_size` is greater than 0 and the module |
| 27253 |
state (as returned by :c:func:`PyModule_GetState`) is ``NULL``. |
| 27254 |
|
| 27255 |
Extension modules without module state (``m_size <= 0``) are not affected. |
| 27256 |
|
| 27257 |
- bpo-38913: Fixed segfault in ``Py_BuildValue()`` called with a format |
| 27258 |
containing "#" and undefined PY_SSIZE_T_CLEAN whwn an exception is set. |
| 27259 |
|
| 27260 |
- bpo-38500: Add a private API to get and set the frame evaluation function: |
| 27261 |
add :c:func:`_PyInterpreterState_GetEvalFrameFunc` and |
| 27262 |
:c:func:`_PyInterpreterState_SetEvalFrameFunc` C functions. The |
| 27263 |
:c:type:`_PyFrameEvalFunction` function type now takes a *tstate* |
| 27264 |
parameter. |
| 27265 |
|
| 27266 |
|
| 27267 |
What's New in Python 3.9.0 alpha 4? |
| 27268 |
=================================== |
| 27269 |
|
| 27270 |
*Release date: 2020-02-25* |
| 27271 |
|
| 27272 |
Security |
| 27273 |
-------- |
| 27274 |
|
| 27275 |
- bpo-39184: Add audit events to functions in ``fcntl``, ``msvcrt``, ``os``, |
| 27276 |
``resource``, ``shutil``, ``signal`` and ``syslog``. |
| 27277 |
|
| 27278 |
- bpo-39401: Avoid unsafe DLL load at startup on Windows 7 and earlier. |
| 27279 |
|
| 27280 |
- bpo-39184: Add audit events to command execution functions in os and pty |
| 27281 |
modules. |
| 27282 |
|
| 27283 |
Core and Builtins |
| 27284 |
----------------- |
| 27285 |
|
| 27286 |
- bpo-39382: Fix a use-after-free in the single inheritance path of |
| 27287 |
``issubclass()``, when the ``__bases__`` of an object has a single |
| 27288 |
reference, and so does its first item. Patch by Yonatan Goldschmidt. |
| 27289 |
|
| 27290 |
- bpo-39573: Update clinic tool to use :c:func:`Py_IS_TYPE`. Patch by |
| 27291 |
Donghee Na. |
| 27292 |
|
| 27293 |
- bpo-39619: Enable use of :func:`os.chroot` on HP-UX systems. |
| 27294 |
|
| 27295 |
- bpo-39573: Add :c:func:`Py_IS_TYPE` static inline function to check |
| 27296 |
whether the object *o* type is *type*. |
| 27297 |
|
| 27298 |
- bpo-39606: Fix regression caused by fix for bpo-39386, that prevented |
| 27299 |
calling ``aclose`` on an async generator that had already been closed or |
| 27300 |
exhausted. |
| 27301 |
|
| 27302 |
- bpo-39579: Change the ending column offset of ``Attribute`` nodes |
| 27303 |
constructed in ``ast_for_dotted_name`` to point at the end of the current |
| 27304 |
node and not at the end of the last ``NAME`` node. |
| 27305 |
|
| 27306 |
- bpo-1635741: Port _crypt extension module to multiphase initialization |
| 27307 |
(:pep:`489`). |
| 27308 |
|
| 27309 |
- bpo-1635741: Port _contextvars extension module to multiphase |
| 27310 |
initialization (:pep:`489`). |
| 27311 |
|
| 27312 |
- bpo-39510: Fix segfault in ``readinto()`` method on closed BufferedReader. |
| 27313 |
|
| 27314 |
- bpo-39502: Fix :func:`time.localtime` on 64-bit AIX to support years |
| 27315 |
before 1902 and after 2038. Patch by M Felt. |
| 27316 |
|
| 27317 |
- bpo-39492: Fix a reference cycle in the C Pickler that was preventing the |
| 27318 |
garbage collection of deleted, pickled objects. |
| 27319 |
|
| 27320 |
- bpo-39453: Fixed a possible crash in :meth:`list.__contains__` when a list |
| 27321 |
is changed during comparing items. Patch by Donghee Na. |
| 27322 |
|
| 27323 |
- bpo-39434: :term:`floor division` of float operation now has a better |
| 27324 |
performance. Also the message of :exc:`ZeroDivisionError` for this |
| 27325 |
operation is updated. Patch by Donghee Na. |
| 27326 |
|
| 27327 |
- bpo-1635741: Port _codecs extension module to multiphase initialization |
| 27328 |
(:pep:`489`). |
| 27329 |
|
| 27330 |
- bpo-1635741: Port _bz2 extension module to multiphase initialization |
| 27331 |
(:pep:`489`). |
| 27332 |
|
| 27333 |
- bpo-1635741: Port _abc extension module to multiphase initialization |
| 27334 |
(:pep:`489`). |
| 27335 |
|
| 27336 |
- bpo-39320: Replace two complex bytecodes for building dicts with two |
| 27337 |
simpler ones. The new bytecodes ``DICT_MERGE`` and ``DICT_UPDATE`` have |
| 27338 |
been added The old bytecodes ``BUILD_MAP_UNPACK`` and |
| 27339 |
``BUILD_MAP_UNPACK_WITH_CALL`` have been removed. |
| 27340 |
|
| 27341 |
- bpo-39219: Syntax errors raised in the tokenizer now always set correct |
| 27342 |
"text" and "offset" attributes. |
| 27343 |
|
| 27344 |
- bpo-36051: Drop the GIL during large ``bytes.join`` operations. Patch by |
| 27345 |
Bruce Merry. |
| 27346 |
|
| 27347 |
- bpo-38960: Fix DTrace build issues on FreeBSD. Patch by David Carlier. |
| 27348 |
|
| 27349 |
- bpo-37207: Speed up calls to ``range()`` by about 30%, by using the PEP |
| 27350 |
590 ``vectorcall`` calling convention. Patch by Mark Shannon. |
| 27351 |
|
| 27352 |
- bpo-36144: :class:`dict` (and :class:`collections.UserDict`) objects now |
| 27353 |
support PEP 584's merge (``|``) and update (``|=``) operators. Patch by |
| 27354 |
Brandt Bucher. |
| 27355 |
|
| 27356 |
- bpo-32856: Optimized the idiom for assignment a temporary variable in |
| 27357 |
comprehensions. Now ``for y in [expr]`` in comprehensions is as fast as a |
| 27358 |
simple assignment ``y = expr``. |
| 27359 |
|
| 27360 |
Library |
| 27361 |
------- |
| 27362 |
|
| 27363 |
- bpo-30566: Fix :exc:`IndexError` when trying to decode an invalid string |
| 27364 |
with punycode codec. |
| 27365 |
|
| 27366 |
- bpo-39649: Remove obsolete check for ``__args__`` in |
| 27367 |
``bdb.Bdb.format_stack_entry``. |
| 27368 |
|
| 27369 |
- bpo-39648: Expanded :func:`math.gcd` and :func:`math.lcm` to handle |
| 27370 |
multiple arguments. |
| 27371 |
|
| 27372 |
- bpo-39681: Fix a regression where the C pickle module wouldn't allow |
| 27373 |
unpickling from a file-like object that doesn't expose a readinto() |
| 27374 |
method. |
| 27375 |
|
| 27376 |
- bpo-35950: Raise :exc:`io.UnsupportedOperation` in |
| 27377 |
:meth:`io.BufferedReader.truncate` when it is called on a read-only |
| 27378 |
:class:`io.BufferedReader` instance. |
| 27379 |
|
| 27380 |
- bpo-39479: Add :func:`math.lcm` function: least common multiple. |
| 27381 |
|
| 27382 |
- bpo-39674: Revert "Do not expose abstract collection classes in the |
| 27383 |
collections module" change (bpo-25988). Aliases to ABC like |
| 27384 |
collections.Mapping are kept in Python 3.9 to ease transition from Python |
| 27385 |
2.7, but will be removed in Python 3.10. |
| 27386 |
|
| 27387 |
- bpo-39104: Fix hanging ProcessPoolExcutor on ``shutdown(wait=False)`` when |
| 27388 |
a task has failed pickling. |
| 27389 |
|
| 27390 |
- bpo-39627: Fixed TypedDict totality check for inherited keys. |
| 27391 |
|
| 27392 |
- bpo-39474: Fixed starting position of AST for expressions like ``(a)(b)``, |
| 27393 |
``(a)[b]`` and ``(a).b``. |
| 27394 |
|
| 27395 |
- bpo-21016: The :mod:`pydoc` and :mod:`trace` modules now use the |
| 27396 |
:mod:`sysconfig` module to get the path to the Python standard library, to |
| 27397 |
support uncommon installation path like ``/usr/lib64/python3.9/`` on |
| 27398 |
Fedora. Patch by Jan Matějek. |
| 27399 |
|
| 27400 |
- bpo-39590: Collections.deque now holds strong references during |
| 27401 |
deque.__contains__ and deque.count, fixing crashes. |
| 27402 |
|
| 27403 |
- bpo-39586: The distutils ``bdist_msi`` command is deprecated in Python |
| 27404 |
3.9, use ``bdist_wheel`` (wheel packages) instead. |
| 27405 |
|
| 27406 |
- bpo-39595: Improved performance of zipfile.Path for files with a large |
| 27407 |
number of entries. Also improved performance and fixed minor issue as |
| 27408 |
published with `importlib_metadata 1.5 |
| 27409 |
<https://importlib-metadata.readthedocs.io/en/latest/history.html#v1-5-0>`_. |
| 27410 |
|
| 27411 |
- bpo-39350: Fix regression in :class:`fractions.Fraction` if the numerator |
| 27412 |
and/or the denominator is an :class:`int` subclass. The :func:`math.gcd` |
| 27413 |
function is now used to normalize the *numerator* and *denominator*. |
| 27414 |
:func:`math.gcd` always return a :class:`int` type. Previously, the GCD |
| 27415 |
type depended on *numerator* and *denominator*. |
| 27416 |
|
| 27417 |
- bpo-39567: Added audit for :func:`os.walk`, :func:`os.fwalk`, |
| 27418 |
:meth:`pathlib.Path.glob` and :meth:`pathlib.Path.rglob`. |
| 27419 |
|
| 27420 |
- bpo-39559: Remove unused, undocumented argument ``getters`` from |
| 27421 |
:func:`uuid.getnode` |
| 27422 |
|
| 27423 |
- bpo-38149: :func:`sys.audit` is now called only once per call of |
| 27424 |
:func:`glob.glob` and :func:`glob.iglob`. |
| 27425 |
|
| 27426 |
- bpo-39546: Fix a regression in :class:`~argparse.ArgumentParser` where |
| 27427 |
``allow_abbrev=False`` was ignored for long options that used a prefix |
| 27428 |
character other than "-". |
| 27429 |
|
| 27430 |
- bpo-39450: Striped whitespace from docstring before returning it from |
| 27431 |
:func:`unittest.case.shortDescription`. |
| 27432 |
|
| 27433 |
- bpo-12915: A new function ``resolve_name`` has been added to the |
| 27434 |
``pkgutil`` module. This resolves a string of the form ``'a.b.c.d'`` or |
| 27435 |
``'a.b:c.d'`` to an object. In the example, ``a.b`` is a package/module |
| 27436 |
and ``c.d`` is an object within that package/module reached via recursive |
| 27437 |
attribute access. |
| 27438 |
|
| 27439 |
- bpo-39353: The :func:`binascii.crc_hqx` function is no longer deprecated. |
| 27440 |
|
| 27441 |
- bpo-39493: Mark ``typing.IO.closed`` as a property |
| 27442 |
|
| 27443 |
- bpo-39491: Add :data:`typing.Annotated` and ``include_extras`` parameter |
| 27444 |
to :func:`typing.get_type_hints` as part of :pep:`593`. Patch by Till |
| 27445 |
Varoquaux, documentation by Till Varoquaux and Konstantin Kashin. |
| 27446 |
|
| 27447 |
- bpo-39485: Fix a bug in :func:`unittest.mock.create_autospec` that would |
| 27448 |
complain about the wrong number of arguments for custom descriptors |
| 27449 |
defined in an extension module returning functions. |
| 27450 |
|
| 27451 |
- bpo-38932: Mock fully resets child objects on reset_mock(). Patch by |
| 27452 |
Vegard Stikbakke |
| 27453 |
|
| 27454 |
- bpo-39082: Allow AsyncMock to correctly patch static/class methods |
| 27455 |
|
| 27456 |
- bpo-39432: Implement PEP-489 algorithm for non-ascii "PyInit\_..." symbol |
| 27457 |
names in distutils to make it export the correct init symbol also on |
| 27458 |
Windows. |
| 27459 |
|
| 27460 |
- bpo-18819: Omit ``devmajor`` and ``devminor`` fields for non-device files |
| 27461 |
in :mod:`tarfile` archives, enabling bit-for-bit compatibility with GNU |
| 27462 |
``tar(1)``. |
| 27463 |
|
| 27464 |
- bpo-39349: Added a new *cancel_futures* parameter to |
| 27465 |
:meth:`concurrent.futures.Executor.shutdown` that cancels all pending |
| 27466 |
futures which have not started running, instead of waiting for them to |
| 27467 |
complete before shutting down the executor. |
| 27468 |
|
| 27469 |
- bpo-39274: ``bool(fraction.Fraction)`` now returns a boolean even if |
| 27470 |
(numerator != 0) does not return a boolean (ex: numpy number). |
| 27471 |
|
| 27472 |
- bpo-34793: Remove support for ``with (await asyncio.lock):`` and ``with |
| 27473 |
(yield from asyncio.lock):``. The same is correct for |
| 27474 |
``asyncio.Condition`` and ``asyncio.Semaphore``. |
| 27475 |
|
| 27476 |
- bpo-25597: Ensure, if ``wraps`` is supplied to |
| 27477 |
:class:`unittest.mock.MagicMock`, it is used to calculate return values |
| 27478 |
for the magic methods instead of using the default return values. Patch by |
| 27479 |
Karthikeyan Singaravelan. |
| 27480 |
|
| 27481 |
- bpo-36350: ``inspect.Signature.parameters`` and |
| 27482 |
``inspect.BoundArguments.arguments`` are now dicts instead of |
| 27483 |
OrderedDicts. Patch contributed by Rémi Lapeyre. |
| 27484 |
|
| 27485 |
- bpo-35727: Fix sys.exit() and sys.exit(None) exit code propagation when |
| 27486 |
used in multiprocessing.Process. |
| 27487 |
|
| 27488 |
- bpo-32173: * Add ``lazycache`` function to ``__all__``. * Use |
| 27489 |
``dict.clear`` to clear the cache. * Refactoring ``getline`` function and |
| 27490 |
``checkcache`` function. |
| 27491 |
|
| 27492 |
Documentation |
| 27493 |
------------- |
| 27494 |
|
| 27495 |
- bpo-17422: The language reference now specifies restrictions on class |
| 27496 |
namespaces. Adapted from a patch by Ethan Furman. |
| 27497 |
|
| 27498 |
- bpo-39572: Updated documentation of ``total`` flag of ``TypedDict``. |
| 27499 |
|
| 27500 |
- bpo-39654: In pyclbr doc, update 'class' to 'module' where appropriate and |
| 27501 |
add readmodule comment. Patch by Hakan Çelik. |
| 27502 |
|
| 27503 |
- bpo-39153: Clarify refcounting semantics for the following functions: - |
| 27504 |
PyObject_SetItem - PyMapping_SetItemString - PyDict_SetItem - |
| 27505 |
PyDict_SetItemString |
| 27506 |
|
| 27507 |
- bpo-39392: Explain that when filling with turtle, overlap regions may be |
| 27508 |
left unfilled. |
| 27509 |
|
| 27510 |
- bpo-39369: Update mmap readline method description. The fact that the |
| 27511 |
readline method does update the file position should not be ignored since |
| 27512 |
this might give the impression for the programmer that it doesn't update |
| 27513 |
it. |
| 27514 |
|
| 27515 |
- bpo-9056: Include subsection in TOC for PDF version of docs. |
| 27516 |
|
| 27517 |
Tests |
| 27518 |
----- |
| 27519 |
|
| 27520 |
- bpo-38325: Skip tests on non-BMP characters of test_winconsoleio. |
| 27521 |
|
| 27522 |
- bpo-39502: Skip test_zipfile.test_add_file_after_2107() if |
| 27523 |
:func:`time.localtime` fails with :exc:`OverflowError`. It is the case on |
| 27524 |
AIX 6.1 for example. |
| 27525 |
|
| 27526 |
Build |
| 27527 |
----- |
| 27528 |
|
| 27529 |
- bpo-39489: Remove ``COUNT_ALLOCS`` special build. |
| 27530 |
|
| 27531 |
Windows |
| 27532 |
------- |
| 27533 |
|
| 27534 |
- bpo-39553: Delete unused code related to SxS manifests. |
| 27535 |
|
| 27536 |
- bpo-39439: Honor the Python path when a virtualenv is active on Windows. |
| 27537 |
|
| 27538 |
- bpo-39393: Improve the error message when attempting to load a DLL with |
| 27539 |
unresolved dependencies. |
| 27540 |
|
| 27541 |
- bpo-38883: :meth:`~pathlib.Path.home` and :meth:`~pathlib.Path.expanduser` |
| 27542 |
on Windows now prefer :envvar:`USERPROFILE` and no longer use |
| 27543 |
:envvar:`HOME`, which is not normally set for regular user accounts. This |
| 27544 |
makes them again behave like :func:`os.path.expanduser`, which was changed |
| 27545 |
to ignore :envvar:`HOME` in 3.8, see :issue:`36264`. |
| 27546 |
|
| 27547 |
- bpo-39185: The build.bat script has additional options for very-quiet |
| 27548 |
output (-q) and very-verbose output (-vv) |
| 27549 |
|
| 27550 |
IDLE |
| 27551 |
---- |
| 27552 |
|
| 27553 |
- bpo-39663: Add tests for pyparse find_good_parse_start(). |
| 27554 |
|
| 27555 |
- bpo-39600: In the font configuration window, remove duplicated font names. |
| 27556 |
|
| 27557 |
- bpo-30780: Add remaining configdialog tests for buttons and highlights and |
| 27558 |
keys tabs. |
| 27559 |
|
| 27560 |
- bpo-39388: IDLE Settings Cancel button now cancels pending changes |
| 27561 |
|
| 27562 |
- bpo-38792: Close an IDLE shell calltip if a :exc:`KeyboardInterrupt` or |
| 27563 |
shell restart occurs. Patch by Zackery Spytz. |
| 27564 |
|
| 27565 |
C API |
| 27566 |
----- |
| 27567 |
|
| 27568 |
- bpo-35081: Move the ``bytes_methods.h`` header file to the internal C API |
| 27569 |
as ``pycore_bytes_methods.h``: it only contains private symbols (prefixed |
| 27570 |
by ``_Py``), except of the ``PyDoc_STRVAR_shared()`` macro. |
| 27571 |
|
| 27572 |
- bpo-35081: Move the ``dtoa.h`` header file to the internal C API as |
| 27573 |
``pycore_dtoa.h``: it only contains private functions (prefixed by |
| 27574 |
``_Py``). The :mod:`math` and :mod:`cmath` modules must now be compiled |
| 27575 |
with the ``Py_BUILD_CORE`` macro defined. |
| 27576 |
|
| 27577 |
- bpo-39573: Add :c:func:`Py_SET_SIZE` function to set the size of an |
| 27578 |
object. |
| 27579 |
|
| 27580 |
- bpo-39500: :c:func:`PyUnicode_IsIdentifier` does not call |
| 27581 |
:c:func:`Py_FatalError` anymore if the string is not ready. |
| 27582 |
|
| 27583 |
- bpo-39573: Add :c:func:`Py_SET_TYPE` function to set the type of an |
| 27584 |
object. |
| 27585 |
|
| 27586 |
- bpo-39573: Add a :c:func:`Py_SET_REFCNT` function to set the reference |
| 27587 |
counter of an object. |
| 27588 |
|
| 27589 |
- bpo-39542: Convert :c:func:`PyType_HasFeature`, :c:func:`PyType_Check` and |
| 27590 |
:c:func:`PyType_CheckExact` macros to static inline functions. |
| 27591 |
|
| 27592 |
- bpo-39542: In the limited C API, ``PyObject_INIT()`` and |
| 27593 |
``PyObject_INIT_VAR()`` are now defined as aliases to |
| 27594 |
:c:func:`PyObject_Init` and :c:func:`PyObject_InitVar` to make their |
| 27595 |
implementation opaque. It avoids to leak implementation details in the |
| 27596 |
limited C API. Exclude the following functions from the limited C API: |
| 27597 |
``_Py_NewReference()``, ``_Py_ForgetReference()``, |
| 27598 |
``_PyTraceMalloc_NewReference()`` and ``_Py_GetRefTotal()``. |
| 27599 |
|
| 27600 |
- bpo-39542: Exclude trashcan mechanism from the limited C API: it requires |
| 27601 |
access to PyTypeObject and PyThreadState structure fields, whereas these |
| 27602 |
structures are opaque in the limited C API. |
| 27603 |
|
| 27604 |
- bpo-39511: The :c:func:`PyThreadState_Clear` function now calls the |
| 27605 |
:c:member:`PyThreadState.on_delete` callback. Previously, that happened in |
| 27606 |
:c:func:`PyThreadState_Delete`. |
| 27607 |
|
| 27608 |
- bpo-38076: Fix to clear the interpreter state only after clearing module |
| 27609 |
globals to guarantee module state access from C Extensions during runtime |
| 27610 |
destruction |
| 27611 |
|
| 27612 |
- bpo-39245: The Vectorcall API (PEP 590) was made public, adding the |
| 27613 |
functions ``PyObject_Vectorcall``, ``PyObject_VectorcallMethod``, |
| 27614 |
``PyVectorcall_Function``, ``PyObject_CallOneArg``, |
| 27615 |
``PyObject_CallMethodNoArgs``, ``PyObject_CallMethodOneArg``, |
| 27616 |
``PyObject_FastCallDict``, and the flag ``Py_TPFLAGS_HAVE_VECTORCALL``. |
| 27617 |
|
| 27618 |
|
| 27619 |
What's New in Python 3.9.0 alpha 3? |
| 27620 |
=================================== |
| 27621 |
|
| 27622 |
*Release date: 2020-01-24* |
| 27623 |
|
| 27624 |
Core and Builtins |
| 27625 |
----------------- |
| 27626 |
|
| 27627 |
- bpo-39427: Document all possibilities for the ``-X`` options in the |
| 27628 |
command line help section. Patch by Pablo Galindo. |
| 27629 |
|
| 27630 |
- bpo-39421: Fix possible crashes when operating with the functions in the |
| 27631 |
:mod:`heapq` module and custom comparison operators. |
| 27632 |
|
| 27633 |
- bpo-39386: Prevent double awaiting of async iterator. |
| 27634 |
|
| 27635 |
- bpo-17005: Add :class:`functools.TopologicalSorter` to the |
| 27636 |
:mod:`functools` module to offers functionality to perform topological |
| 27637 |
sorting of graphs. Patch by Pablo Galindo, Tim Peters and Larry Hastings. |
| 27638 |
|
| 27639 |
- bpo-39320: Replace four complex bytecodes for building sequences with |
| 27640 |
three simpler ones. |
| 27641 |
|
| 27642 |
The following four bytecodes have been removed: |
| 27643 |
|
| 27644 |
* BUILD_LIST_UNPACK |
| 27645 |
* BUILD_TUPLE_UNPACK |
| 27646 |
* BUILD_SET_UNPACK |
| 27647 |
* BUILD_TUPLE_UNPACK_WITH_CALL |
| 27648 |
|
| 27649 |
The following three bytecodes have been added: |
| 27650 |
|
| 27651 |
* LIST_TO_TUPLE |
| 27652 |
* LIST_EXTEND |
| 27653 |
* SET_UPDATE |
| 27654 |
|
| 27655 |
- bpo-39336: Import loaders which publish immutable module objects can now |
| 27656 |
publish immutable packages in addition to individual modules. |
| 27657 |
|
| 27658 |
- bpo-39322: Added a new function :func:`gc.is_finalized` to check if an |
| 27659 |
object has been finalized by the garbage collector. Patch by Pablo |
| 27660 |
Galindo. |
| 27661 |
|
| 27662 |
- bpo-39048: Improve the displayed error message when incorrect types are |
| 27663 |
passed to ``async with`` statements by looking up the :meth:`__aenter__` |
| 27664 |
special method before the :meth:`__aexit__` special method when entering |
| 27665 |
an asynchronous context manager. Patch by Géry Ogam. |
| 27666 |
|
| 27667 |
- bpo-39235: Fix AST end location for lone generator expression in function |
| 27668 |
call, e.g. f(i for i in a). |
| 27669 |
|
| 27670 |
- bpo-39209: Correctly handle multi-line tokens in interactive mode. Patch |
| 27671 |
by Pablo Galindo. |
| 27672 |
|
| 27673 |
- bpo-1635741: Port _json extension module to multiphase initialization |
| 27674 |
(:pep:`489`). |
| 27675 |
|
| 27676 |
- bpo-39216: Fix constant folding optimization for positional only arguments |
| 27677 |
- by Anthony Sottile. |
| 27678 |
|
| 27679 |
- bpo-39215: Fix ``SystemError`` when nested function has annotation on |
| 27680 |
positional-only argument - by Anthony Sottile. |
| 27681 |
|
| 27682 |
- bpo-39200: Correct the error message when calling the :func:`min` or |
| 27683 |
:func:`max` with no arguments. Patch by Donghee Na. |
| 27684 |
|
| 27685 |
- bpo-39200: Correct the error message when trying to construct |
| 27686 |
:class:`range` objects with no arguments. Patch by Pablo Galindo. |
| 27687 |
|
| 27688 |
- bpo-39166: Fix incorrect line execution reporting in trace functions when |
| 27689 |
tracing the last iteration of asynchronous for loops. Patch by Pablo |
| 27690 |
Galindo. |
| 27691 |
|
| 27692 |
- bpo-39114: Fix incorrect line execution reporting in trace functions when |
| 27693 |
tracing exception handlers with name binding. Patch by Pablo Galindo. |
| 27694 |
|
| 27695 |
- bpo-39156: Split the COMPARE_OP bytecode instruction into four distinct |
| 27696 |
instructions. |
| 27697 |
|
| 27698 |
* COMPARE_OP for rich comparisons |
| 27699 |
* IS_OP for 'is' and 'is not' tests |
| 27700 |
* CONTAINS_OP for 'in' and 'is not' tests |
| 27701 |
* JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements. |
| 27702 |
|
| 27703 |
This improves the clarity of the interpreter and should provide a modest |
| 27704 |
speedup. |
| 27705 |
|
| 27706 |
- bpo-38588: Fix possible crashes in dict and list when calling |
| 27707 |
:c:func:`PyObject_RichCompareBool`. |
| 27708 |
|
| 27709 |
- bpo-13601: By default, ``sys.stderr`` is line-buffered now, even if |
| 27710 |
``stderr`` is redirected to a file. You can still make ``sys.stderr`` |
| 27711 |
unbuffered by passing the :option:`-u` command-line option or setting the |
| 27712 |
:envvar:`PYTHONUNBUFFERED` environment variable. |
| 27713 |
|
| 27714 |
(Contributed by Jendrik Seipp in bpo-13601.) |
| 27715 |
|
| 27716 |
- bpo-38610: Fix possible crashes in several list methods by holding strong |
| 27717 |
references to list elements when calling |
| 27718 |
:c:func:`PyObject_RichCompareBool`. |
| 27719 |
|
| 27720 |
- bpo-32021: Include brotli .br encoding in mimetypes encodings_map |
| 27721 |
|
| 27722 |
Library |
| 27723 |
------- |
| 27724 |
|
| 27725 |
- bpo-39430: Fixed race condition in lazy imports in :mod:`tarfile`. |
| 27726 |
|
| 27727 |
- bpo-39413: The :func:`os.unsetenv` function is now also available on |
| 27728 |
Windows. |
| 27729 |
|
| 27730 |
- bpo-39390: Fixed a regression with the ``ignore`` callback of |
| 27731 |
:func:`shutil.copytree`. The argument types are now ``str`` and |
| 27732 |
``List[str]`` again. |
| 27733 |
|
| 27734 |
- bpo-39395: The :func:`os.putenv` and :func:`os.unsetenv` functions are now |
| 27735 |
always available. |
| 27736 |
|
| 27737 |
- bpo-39406: If ``setenv()`` C function is available, :func:`os.putenv` is |
| 27738 |
now implemented with ``setenv()`` instead of ``putenv()``, so Python |
| 27739 |
doesn't have to handle the environment variable memory. |
| 27740 |
|
| 27741 |
- bpo-39396: Fix ``math.nextafter(-0.0, +0.0)`` on AIX 7.1. |
| 27742 |
|
| 27743 |
- bpo-29435: Allow :func:`tarfile.is_tarfile` to be used with file and |
| 27744 |
file-like objects, like :func:`zipfile.is_zipfile`. Patch by William |
| 27745 |
Woodruff. |
| 27746 |
|
| 27747 |
- bpo-39377: Removed ``encoding`` option from :func:`json.loads`. It has |
| 27748 |
been deprecated since Python 3.1. |
| 27749 |
|
| 27750 |
- bpo-39389: Write accurate compression level metadata in :mod:`gzip` |
| 27751 |
archives, rather than always signaling maximum compression. |
| 27752 |
|
| 27753 |
- bpo-39366: The previously deprecated ``xpath()`` and ``xgtitle()`` methods |
| 27754 |
of :class:`!nntplib.NNTP` have been removed. |
| 27755 |
|
| 27756 |
- bpo-39357: Remove the *buffering* parameter of :class:`bz2.BZ2File`. Since |
| 27757 |
Python 3.0, it was ignored and using it was emitting |
| 27758 |
:exc:`DeprecationWarning`. Pass an open file object, to control how the |
| 27759 |
file is opened. The *compresslevel* parameter becomes keyword-only. |
| 27760 |
|
| 27761 |
- bpo-39353: Deprecate binhex4 and hexbin4 standards. Deprecate the |
| 27762 |
:mod:`binhex` module and the following :mod:`binascii` functions: |
| 27763 |
:func:`~binascii.b2a_hqx`, :func:`~binascii.a2b_hqx`, |
| 27764 |
:func:`~binascii.rlecode_hqx`, :func:`~binascii.rledecode_hqx`, |
| 27765 |
:func:`~binascii.crc_hqx`. |
| 27766 |
|
| 27767 |
- bpo-39351: Remove ``base64.encodestring()`` and ``base64.decodestring()``, |
| 27768 |
aliases deprecated since Python 3.1: use :func:`base64.encodebytes` and |
| 27769 |
:func:`base64.decodebytes` instead. |
| 27770 |
|
| 27771 |
- bpo-39350: Remove ``fractions.gcd()`` function, deprecated since Python |
| 27772 |
3.5 (:issue:`22486`): use :func:`math.gcd` instead. |
| 27773 |
|
| 27774 |
- bpo-39329: :class:`~smtplib.LMTP` constructor now has an optional |
| 27775 |
*timeout* parameter. Patch by Donghee Na. |
| 27776 |
|
| 27777 |
- bpo-39313: Add a new ``exec_function`` option (*--exec-function* in the |
| 27778 |
CLI) to ``RefactoringTool`` for making ``exec`` a function. Patch by |
| 27779 |
Batuhan Taskaya. |
| 27780 |
|
| 27781 |
- bpo-39259: :class:`~ftplib.FTP_TLS` and :class:`~ftplib.FTP_TLS` now raise |
| 27782 |
a :class:`ValueError` if the given timeout for their constructor is zero |
| 27783 |
to prevent the creation of a non-blocking socket. Patch by Donghee Na. |
| 27784 |
|
| 27785 |
- bpo-39259: :class:`~smtplib.SMTP` and :class:`~smtplib.SMTP_SSL` now raise |
| 27786 |
a :class:`ValueError` if the given timeout for their constructor is zero |
| 27787 |
to prevent the creation of a non-blocking socket. Patch by Donghee Na. |
| 27788 |
|
| 27789 |
- bpo-39310: Add :func:`math.ulp`: return the value of the least significant |
| 27790 |
bit of a float. |
| 27791 |
|
| 27792 |
- bpo-39297: Improved performance of importlib.metadata distribution |
| 27793 |
discovery and resilients to inaccessible sys.path entries |
| 27794 |
(importlib_metadata v1.4.0). |
| 27795 |
|
| 27796 |
- bpo-39259: :class:`!NNTP` and :class:`!NNTP_SSL` now raise a |
| 27797 |
:class:`ValueError` if the given timeout for their constructor is zero to |
| 27798 |
prevent the creation of a non-blocking socket. Patch by Donghee Na. |
| 27799 |
|
| 27800 |
- bpo-38901: When you specify prompt='.' or equivalently python -m venv |
| 27801 |
--prompt . ... the basename of the current directory is used to set the |
| 27802 |
created venv's prompt when it's activated. |
| 27803 |
|
| 27804 |
- bpo-39288: Add :func:`math.nextafter`: return the next floating-point |
| 27805 |
value after *x* towards *y*. |
| 27806 |
|
| 27807 |
- bpo-39259: :class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a |
| 27808 |
:class:`ValueError` if the given timeout for their constructor is zero to |
| 27809 |
prevent the creation of a non-blocking socket. Patch by Donghee Na. |
| 27810 |
|
| 27811 |
- bpo-39242: Updated the Gmane domain from news.gmane.org to news.gmane.io |
| 27812 |
which is used for examples of :class:`!NNTP` news reader server and |
| 27813 |
nntplib tests. |
| 27814 |
|
| 27815 |
- bpo-35292: Proxy the ``SimpleHTTPRequestHandler.guess_type`` to |
| 27816 |
``mimetypes.guess_type`` so the ``mimetypes.init`` is called lazily to |
| 27817 |
avoid unnecessary costs when :mod:`http.server` module is imported. |
| 27818 |
|
| 27819 |
- bpo-39239: The :meth:`select.epoll.unregister` method no longer ignores |
| 27820 |
the :data:`~errno.EBADF` error. |
| 27821 |
|
| 27822 |
- bpo-38907: In http.server script, restore binding to IPv4 on Windows. |
| 27823 |
|
| 27824 |
- bpo-39152: Fix ttk.Scale.configure([name]) to return configuration tuple |
| 27825 |
for name or all options. Giovanni Lombardo contributed part of the patch. |
| 27826 |
|
| 27827 |
- bpo-39198: If an exception were to be thrown in ``Logger.isEnabledFor`` |
| 27828 |
(say, by asyncio timeouts or stopit) , the ``logging`` global lock may not |
| 27829 |
be released appropriately, resulting in deadlock. This change wraps that |
| 27830 |
block of code with ``try...finally`` to ensure the lock is released. |
| 27831 |
|
| 27832 |
- bpo-39191: Perform a check for running loop before starting a new task in |
| 27833 |
``loop.run_until_complete()`` to fail fast; it prevents the side effect of |
| 27834 |
new task spawning before exception raising. |
| 27835 |
|
| 27836 |
- bpo-38871: Correctly parenthesize filter-based statements that contain |
| 27837 |
lambda expressions in :mod:`!lib2to3`. Patch by Donghee Na. |
| 27838 |
|
| 27839 |
- bpo-39142: A change was made to logging.config.dictConfig to avoid |
| 27840 |
converting instances of named tuples to ConvertingTuple. It's assumed that |
| 27841 |
named tuples are too specialised to be treated like ordinary tuples; if a |
| 27842 |
user of named tuples requires ConvertingTuple functionality, they will |
| 27843 |
have to implement that themselves in their named tuple class. |
| 27844 |
|
| 27845 |
- bpo-39158: ast.literal_eval() now supports empty sets. |
| 27846 |
|
| 27847 |
- bpo-39129: Fix import path for ``asyncio.TimeoutError`` |
| 27848 |
|
| 27849 |
- bpo-39057: :func:`urllib.request.proxy_bypass_environment` now ignores |
| 27850 |
leading dots and no longer ignores a trailing newline. |
| 27851 |
|
| 27852 |
- bpo-39056: Fixed handling invalid warning category in the -W option. No |
| 27853 |
longer import the re module if it is not needed. |
| 27854 |
|
| 27855 |
- bpo-39055: :func:`base64.b64decode` with ``validate=True`` raises now a |
| 27856 |
binascii.Error if the input ends with a single ``\n``. |
| 27857 |
|
| 27858 |
- bpo-21600: Fix :func:`mock.patch.stopall` to stop active patches that were |
| 27859 |
created with :func:`mock.patch.dict`. |
| 27860 |
|
| 27861 |
- bpo-39019: Implement dummy ``__class_getitem__`` for |
| 27862 |
:class:`tempfile.SpooledTemporaryFile`. |
| 27863 |
|
| 27864 |
- bpo-39019: Implement dummy ``__class_getitem__`` for ``subprocess.Popen``, |
| 27865 |
``subprocess.CompletedProcess`` |
| 27866 |
|
| 27867 |
- bpo-38914: Adjusted the wording of the warning issued by distutils' |
| 27868 |
``check`` command when the ``author`` and ``maintainer`` fields are |
| 27869 |
supplied but no corresponding e-mail field (``author_email`` or |
| 27870 |
``maintainer_email``) is found. The wording now reflects the fact that |
| 27871 |
these fields are suggested, but not required. Patch by Juergen Gmach. |
| 27872 |
|
| 27873 |
- bpo-38878: Fixed __subclasshook__ of :class:`os.PathLike` to return a |
| 27874 |
correct result upon inheritance. Patch by Bar Harel. |
| 27875 |
|
| 27876 |
- bpo-38615: :class:`~imaplib.IMAP4` and :class:`~imaplib.IMAP4_SSL` now |
| 27877 |
have an optional *timeout* parameter for their constructors. Also, the |
| 27878 |
:meth:`~imaplib.IMAP4.open` method now has an optional *timeout* parameter |
| 27879 |
with this change. The overridden methods of :class:`~imaplib.IMAP4_SSL` |
| 27880 |
and :class:`~imaplib.IMAP4_stream` were applied to this change. Patch by |
| 27881 |
Donghee Na. |
| 27882 |
|
| 27883 |
- bpo-35182: Fixed :func:`Popen.communicate` subsequent call crash when the |
| 27884 |
child process has already closed any piped standard stream, but still |
| 27885 |
continues to be running. Patch by Andriy Maletsky. |
| 27886 |
|
| 27887 |
- bpo-38630: On Unix, :meth:`subprocess.Popen.send_signal` now polls the |
| 27888 |
process status. Polling reduces the risk of sending a signal to the wrong |
| 27889 |
process if the process completed, the :attr:`subprocess.Popen.returncode` |
| 27890 |
attribute is still ``None``, and the pid has been reassigned (recycled) to |
| 27891 |
a new different process. |
| 27892 |
|
| 27893 |
- bpo-38536: Removes trailing space in formatted currency with |
| 27894 |
``international=True`` and a locale with symbol following value. E.g. |
| 27895 |
``locale.currency(12.34, international=True)`` returned ``'12,34 EUR '`` |
| 27896 |
instead of ``'12,34 EUR'``. |
| 27897 |
|
| 27898 |
- bpo-38473: Use signature from inner mock for autospecced methods attached |
| 27899 |
with :func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan. |
| 27900 |
|
| 27901 |
- bpo-38361: Fixed an issue where ``ident`` could include a leading path |
| 27902 |
separator when :func:`syslog.openlog` was called without arguments. |
| 27903 |
|
| 27904 |
- bpo-38293: Add :func:`copy.copy` and :func:`copy.deepcopy` support to |
| 27905 |
:func:`property` objects. |
| 27906 |
|
| 27907 |
- bpo-37958: Added the pstats.Stats.get_profile_dict() method to return the |
| 27908 |
profile data as a StatsProfile instance. |
| 27909 |
|
| 27910 |
- bpo-28367: Termios magic constants for the following baud rates: - |
| 27911 |
B500000 - B576000 - B921600 - B1000000 - B1152000 - B1500000 - |
| 27912 |
B2000000 - B2500000 - B3000000 - B3500000 - B4000000 Patch by |
| 27913 |
Andrey Smirnov |
| 27914 |
|
| 27915 |
Documentation |
| 27916 |
------------- |
| 27917 |
|
| 27918 |
- bpo-39381: Mention in docs that :func:`asyncio.get_event_loop` implicitly |
| 27919 |
creates new event loop only if called from the main thread. |
| 27920 |
|
| 27921 |
- bpo-38918: Add an entry for ``__module__`` in the "function" & "method" |
| 27922 |
sections of the :mod:`inspect` docs' :ref:`inspect-types` table. |
| 27923 |
|
| 27924 |
- bpo-3530: In the :mod:`ast` module documentation, fix a misleading |
| 27925 |
``NodeTransformer`` example and add advice on when to use the |
| 27926 |
``fix_missing_locations`` function. |
| 27927 |
|
| 27928 |
Build |
| 27929 |
----- |
| 27930 |
|
| 27931 |
- bpo-39395: On non-Windows platforms, the :c:func:`setenv` and |
| 27932 |
:c:func:`unsetenv` functions are now required to build Python. |
| 27933 |
|
| 27934 |
- bpo-39160: Updated the documentation in ``./configure --help`` to show |
| 27935 |
default values, reference documentation where required and add additional |
| 27936 |
explanation where needed. |
| 27937 |
|
| 27938 |
- bpo-39144: The ctags and etags build targets both include Modules/_ctypes |
| 27939 |
and Python standard library source files. |
| 27940 |
|
| 27941 |
IDLE |
| 27942 |
---- |
| 27943 |
|
| 27944 |
- bpo-39050: Make IDLE Settings dialog Help button work again. |
| 27945 |
|
| 27946 |
- bpo-34118: Tag memoryview, range, and tuple as classes, the same as list, |
| 27947 |
etcetera, in the library manual built-in functions list. |
| 27948 |
|
| 27949 |
- bpo-32989: Add tests for editor newline_and_indent_event method. Remove |
| 27950 |
dead code from pyparse find_good_parse_start method. |
| 27951 |
|
| 27952 |
C API |
| 27953 |
----- |
| 27954 |
|
| 27955 |
- bpo-39372: Clean header files of interfaces defined but with no |
| 27956 |
implementation. The public API symbols being removed are: |
| 27957 |
``_PyBytes_InsertThousandsGroupingLocale``, |
| 27958 |
``_PyBytes_InsertThousandsGrouping``, ``_Py_InitializeFromArgs``, |
| 27959 |
``_Py_InitializeFromWideArgs``, ``_PyFloat_Repr``, ``_PyFloat_Digits``, |
| 27960 |
``_PyFloat_DigitsInit``, ``PyFrame_ExtendStack``, |
| 27961 |
``_PyAIterWrapper_Type``, ``PyNullImporter_Type``, ``PyCmpWrapper_Type``, |
| 27962 |
``PySortWrapper_Type``, ``PyNoArgsFunction``. |
| 27963 |
|
| 27964 |
- bpo-39164: Add a private ``_PyErr_GetExcInfo()`` function to retrieve |
| 27965 |
exception information of the specified Python thread state. |
| 27966 |
|
| 27967 |
|
| 27968 |
What's New in Python 3.9.0 alpha 2? |
| 27969 |
=================================== |
| 27970 |
|
| 27971 |
*Release date: 2019-12-18* |
| 27972 |
|
| 27973 |
Security |
| 27974 |
-------- |
| 27975 |
|
| 27976 |
- bpo-38945: Newline characters have been escaped when performing uu |
| 27977 |
encoding to prevent them from overflowing into to content section of the |
| 27978 |
encoded file. This prevents malicious or accidental modification of data |
| 27979 |
during the decoding process. |
| 27980 |
|
| 27981 |
- bpo-37228: Due to significant security concerns, the *reuse_address* |
| 27982 |
parameter of :meth:`asyncio.loop.create_datagram_endpoint` is no longer |
| 27983 |
supported. This is because of the behavior of ``SO_REUSEADDR`` in UDP. For |
| 27984 |
more details, see the documentation for |
| 27985 |
``loop.create_datagram_endpoint()``. (Contributed by Kyle Stanley, Antoine |
| 27986 |
Pitrou, and Yury Selivanov in :issue:`37228`.) |
| 27987 |
|
| 27988 |
- bpo-38804: Fixes a ReDoS vulnerability in :mod:`http.cookiejar`. Patch by |
| 27989 |
Ben Caller. |
| 27990 |
|
| 27991 |
Core and Builtins |
| 27992 |
----------------- |
| 27993 |
|
| 27994 |
- bpo-39028: Slightly improve the speed of keyword argument parsing with |
| 27995 |
many kwargs by strengthening the assumption that kwargs are interned |
| 27996 |
strings. |
| 27997 |
|
| 27998 |
- bpo-39080: Fix the value of *end_col_offset* for Starred Expression AST |
| 27999 |
nodes when they are among the elements in the *args* attribute of Call AST |
| 28000 |
nodes. |
| 28001 |
|
| 28002 |
- bpo-39031: When parsing an "elif" node, lineno and col_offset of the node |
| 28003 |
now point to the "elif" keyword and not to its condition, making it |
| 28004 |
consistent with the "if" node. Patch by Lysandros Nikolaou. |
| 28005 |
|
| 28006 |
- bpo-20443: In Python 3.9.0a1, sys.argv[0] was made an absolute path if a |
| 28007 |
filename was specified on the command line. Revert this change, since most |
| 28008 |
users expect sys.argv to be unmodified. |
| 28009 |
|
| 28010 |
- bpo-39008: :c:func:`PySys_Audit` now requires ``Py_ssize_t`` to be used |
| 28011 |
for size arguments in the format string, regardless of whether |
| 28012 |
``PY_SSIZE_T_CLEAN`` was defined at include time. |
| 28013 |
|
| 28014 |
- bpo-38673: In REPL mode, don't switch to PS2 if the line starts with |
| 28015 |
comment or whitespace. Based on work by Batuhan Taşkaya. |
| 28016 |
|
| 28017 |
- bpo-38922: Calling ``replace`` on a code object now raises the |
| 28018 |
``code.__new__`` audit event. |
| 28019 |
|
| 28020 |
- bpo-38920: Add audit hooks for when :func:`sys.excepthook` and |
| 28021 |
:func:`sys.unraisablehook` are invoked. |
| 28022 |
|
| 28023 |
- bpo-38892: Improve documentation for audit events table and functions. |
| 28024 |
|
| 28025 |
- bpo-38852: Set the thread stack size to 8 Mb for debug builds on android |
| 28026 |
platforms. |
| 28027 |
|
| 28028 |
- bpo-38858: Each Python subinterpreter now has its own "small integer |
| 28029 |
singletons": numbers in [-5; 257] range. It is no longer possible to |
| 28030 |
change the number of small integers at build time by overriding |
| 28031 |
``NSMALLNEGINTS`` and ``NSMALLPOSINTS`` macros: macros should now be |
| 28032 |
modified manually in ``pycore_pystate.h`` header file. |
| 28033 |
|
| 28034 |
- bpo-36854: The garbage collector state becomes per interpreter |
| 28035 |
(``PyInterpreterState.gc``), rather than being global |
| 28036 |
(``_PyRuntimeState.gc``). |
| 28037 |
|
| 28038 |
- bpo-38835: The ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` |
| 28039 |
macros are empty: they have been doing nothing for the last year, so stop |
| 28040 |
using them. |
| 28041 |
|
| 28042 |
- bpo-38328: Sped up the creation time of constant :class:`list` and |
| 28043 |
:class:`set` displays. Patch by Brandt Bucher. |
| 28044 |
|
| 28045 |
- bpo-38707: ``MainThread.native_id`` is now correctly reset in child |
| 28046 |
processes spawned using :class:`multiprocessing.Process`, instead of |
| 28047 |
retaining the parent's value. |
| 28048 |
|
| 28049 |
- bpo-38629: Added ``__floor__`` and ``__ceil__`` methods to float object. |
| 28050 |
Patch by Batuhan Taşkaya. |
| 28051 |
|
| 28052 |
- bpo-27145: int + int and int - int operators can now return small integer |
| 28053 |
singletons. Patch by hongweipeng. |
| 28054 |
|
| 28055 |
- bpo-38021: Provide a platform tag for AIX that is sufficient for PEP425 |
| 28056 |
binary distribution identification. Patch by Michael Felt. |
| 28057 |
|
| 28058 |
- bpo-35409: Ignore GeneratorExit exceptions when throwing an exception into |
| 28059 |
the aclose coroutine of an asynchronous generator. |
| 28060 |
|
| 28061 |
- bpo-33387: Removed WITH_CLEANUP_START, WITH_CLEANUP_FINISH, BEGIN_FINALLY, |
| 28062 |
END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Replaced with RERAISE |
| 28063 |
and WITH_EXCEPT_START bytecodes. The compiler now generates different code |
| 28064 |
for exceptional and non-exceptional branches for 'with' and 'try-except' |
| 28065 |
statements. For 'try-finally' statements the 'finally' block is replicated |
| 28066 |
for each exit from the 'try' body. |
| 28067 |
|
| 28068 |
Library |
| 28069 |
------- |
| 28070 |
|
| 28071 |
- bpo-39033: Fix :exc:`NameError` in :mod:`zipimport`. Patch by Karthikeyan |
| 28072 |
Singaravelan. |
| 28073 |
|
| 28074 |
- bpo-39022: Update importlib.metadata to include improvements from |
| 28075 |
importlib_metadata 1.3 including better serialization of EntryPoints and |
| 28076 |
improved documentation for custom finders. |
| 28077 |
|
| 28078 |
- bpo-39006: Fix asyncio when the ssl module is missing: only check for |
| 28079 |
ssl.SSLSocket instance if the ssl module is available. |
| 28080 |
|
| 28081 |
- bpo-38708: Fix a potential IndexError in email parser when parsing an |
| 28082 |
empty msg-id. |
| 28083 |
|
| 28084 |
- bpo-38698: Add a new ``InvalidMessageID`` token to email parser to |
| 28085 |
represent invalid Message-ID headers. Also, add defects when there is |
| 28086 |
remaining value after parsing the header. |
| 28087 |
|
| 28088 |
- bpo-38994: Implement ``__class_getitem__`` for ``os.PathLike``, |
| 28089 |
``pathlib.Path``. |
| 28090 |
|
| 28091 |
- bpo-38979: Return class from ``ContextVar.__class_getitem__`` to simplify |
| 28092 |
subclassing. |
| 28093 |
|
| 28094 |
- bpo-38978: Implement ``__class_getitem__`` on asyncio objects (Future, |
| 28095 |
Task, Queue). Patch by Batuhan Taskaya. |
| 28096 |
|
| 28097 |
- bpo-38916: :class:`array.array`: Remove ``tostring()`` and |
| 28098 |
``fromstring()`` methods. They were aliases to ``tobytes()`` and |
| 28099 |
``frombytes()``, deprecated since Python 3.2. |
| 28100 |
|
| 28101 |
- bpo-38986: Make repr of C accelerated TaskWakeupMethWrapper the same as of |
| 28102 |
pure Python version. |
| 28103 |
|
| 28104 |
- bpo-38982: Fix asyncio ``PidfdChildWatcher``: handle ``waitpid()`` error. |
| 28105 |
If ``waitpid()`` is called elsewhere, ``waitpid()`` call fails with |
| 28106 |
:exc:`ChildProcessError`: use return code 255 in this case, and log a |
| 28107 |
warning. It ensures that the pidfd file descriptor is closed if this error |
| 28108 |
occurs. |
| 28109 |
|
| 28110 |
- bpo-38529: Drop too noisy asyncio warning about deletion of a stream |
| 28111 |
without explicit ``.close()`` call. |
| 28112 |
|
| 28113 |
- bpo-27413: Added ability to pass through ``ensure_ascii`` options to |
| 28114 |
json.dumps in the ``json.tool`` command-line interface. |
| 28115 |
|
| 28116 |
- bpo-38634: The :mod:`readline` module now detects if Python is linked to |
| 28117 |
libedit at runtime on all platforms. Previously, the check was only done |
| 28118 |
on macOS. |
| 28119 |
|
| 28120 |
- bpo-33684: Fix ``json.tool`` failed to read a JSON file with non-ASCII |
| 28121 |
characters when locale encoding is not UTF-8. |
| 28122 |
|
| 28123 |
- bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id. |
| 28124 |
|
| 28125 |
parse_message_id() was improperly using a token defined inside an |
| 28126 |
exception handler, which was raising ``UnboundLocalError`` on parsing an |
| 28127 |
invalid value. Patch by Claudiu Popa. |
| 28128 |
|
| 28129 |
- bpo-38927: Use ``python -m pip`` instead of ``pip`` to upgrade |
| 28130 |
dependencies in venv. |
| 28131 |
|
| 28132 |
- bpo-26730: Fix ``SpooledTemporaryFile.rollover()`` might corrupt the file |
| 28133 |
when it is in text mode. Patch by Serhiy Storchaka. |
| 28134 |
|
| 28135 |
- bpo-38881: random.choices() now raises a ValueError when all the weights |
| 28136 |
are zero. |
| 28137 |
|
| 28138 |
- bpo-38876: Raise pickle.UnpicklingError when loading an item from memo for |
| 28139 |
invalid input. |
| 28140 |
|
| 28141 |
The previous code was raising a ``KeyError`` for both the Python and C |
| 28142 |
implementation. This was caused by the specified index of an invalid input |
| 28143 |
which did not exist in the memo structure, where the pickle stores what |
| 28144 |
objects it has seen. The malformed input would have caused either a |
| 28145 |
``BINGET`` or ``LONG_BINGET`` load from the memo, leading to a |
| 28146 |
``KeyError`` as the determined index was bogus. Patch by Claudiu Popa. |
| 28147 |
|
| 28148 |
- bpo-38688: Calling func:``shutil.copytree`` to copy a directory tree from |
| 28149 |
one directory to another subdirectory resulted in an endless loop and a |
| 28150 |
RecursionError. A fix was added to consume an iterator and create the list |
| 28151 |
of the entries to be copied, avoiding the recursion for newly created |
| 28152 |
directories. Patch by Bruno P. Kinoshita. |
| 28153 |
|
| 28154 |
- bpo-38863: Improve :func:`is_cgi` function in :mod:`http.server`, which |
| 28155 |
enables processing the case that cgi directory is a child of another |
| 28156 |
directory other than root. |
| 28157 |
|
| 28158 |
- bpo-37838: :meth:`typing.get_type_hints` properly handles functions |
| 28159 |
decorated with :meth:`functools.wraps`. |
| 28160 |
|
| 28161 |
- bpo-38870: Expose :func:`ast.unparse` as a function of the :mod:`ast` |
| 28162 |
module that can be used to unparse an :class:`ast.AST` object and produce |
| 28163 |
a string with code that would produce an equivalent :class:`ast.AST` |
| 28164 |
object when parsed. Patch by Pablo Galindo and Batuhan Taskaya. |
| 28165 |
|
| 28166 |
- bpo-38859: AsyncMock now returns StopAsyncIteration on the exhaustion of a |
| 28167 |
side_effects iterable. Since PEP-479 its Impossible to raise a |
| 28168 |
StopIteration exception from a coroutine. |
| 28169 |
|
| 28170 |
- bpo-38857: AsyncMock fix for return values that are awaitable types. This |
| 28171 |
also covers side_effect iterable values that happened to be awaitable, and |
| 28172 |
wraps callables that return an awaitable type. Before these awaitables |
| 28173 |
were being awaited instead of being returned as is. |
| 28174 |
|
| 28175 |
- bpo-38834: :class:`typing.TypedDict` subclasses now track which keys are |
| 28176 |
optional using the ``__required_keys__`` and ``__optional_keys__`` |
| 28177 |
attributes, to enable runtime validation by downstream projects. Patch by |
| 28178 |
Zac Hatfield-Dodds. |
| 28179 |
|
| 28180 |
- bpo-38821: Fix unhandled exceptions in :mod:`argparse` when |
| 28181 |
internationalizing error messages for arguments with ``nargs`` set to |
| 28182 |
special (non-integer) values. Patch by Federico Bond. |
| 28183 |
|
| 28184 |
- bpo-38820: Make Python compatible with OpenSSL 3.0.0. |
| 28185 |
:func:`ssl.SSLSocket.getpeercert` no longer returns IPv6 addresses with a |
| 28186 |
trailing new line. |
| 28187 |
|
| 28188 |
- bpo-38811: Fix an unhandled exception in :mod:`pathlib` when |
| 28189 |
:meth:`os.link` is missing. Patch by Toke Høiland-Jørgensen. |
| 28190 |
|
| 28191 |
- bpo-38686: Added support for multiple ``qop`` values in |
| 28192 |
:class:`urllib.request.AbstractDigestAuthHandler`. |
| 28193 |
|
| 28194 |
- bpo-38712: Add the Linux-specific :func:`signal.pidfd_send_signal` |
| 28195 |
function, which allows sending a signal to a process identified by a file |
| 28196 |
descriptor rather than a pid. |
| 28197 |
|
| 28198 |
- bpo-38348: Add ``-i`` and ``--indent`` (indentation level), and |
| 28199 |
``--no-type-comments`` (type comments) command line options to ast parsing |
| 28200 |
tool. |
| 28201 |
|
| 28202 |
- bpo-37523: Change :class:`zipfile.ZipExtFile` to raise ``ValueError`` when |
| 28203 |
trying to access the underlying file object after it has been closed. This |
| 28204 |
new behavior is consistent with how accessing closed files is handled in |
| 28205 |
other parts of Python. |
| 28206 |
|
| 28207 |
- bpo-38045: Improve the performance of :func:`enum._decompose` in |
| 28208 |
:mod:`enum`. Patch by hongweipeng. |
| 28209 |
|
| 28210 |
- bpo-36820: Break cycle generated when saving an exception in socket.py, |
| 28211 |
codeop.py and dyld.py as they keep alive not only the exception but user |
| 28212 |
objects through the ``__traceback__`` attribute. Patch by Mario Corchero. |
| 28213 |
|
| 28214 |
- bpo-36406: Handle namespace packages in :mod:`doctest`. Patch by |
| 28215 |
Karthikeyan Singaravelan. |
| 28216 |
|
| 28217 |
- bpo-34776: Fix dataclasses to support forward references in type |
| 28218 |
annotations |
| 28219 |
|
| 28220 |
- bpo-20928: ElementTree supports recursive XInclude processing. Patch by |
| 28221 |
Stefan Behnel. |
| 28222 |
|
| 28223 |
- bpo-29636: Add whitespace options for formatting JSON with the |
| 28224 |
``json.tool`` CLI. The following mutually exclusive options are now |
| 28225 |
supported: ``--indent`` for setting the indent level in spaces; ``--tab`` |
| 28226 |
for indenting with tabs; ``--no-indent`` for suppressing newlines; and |
| 28227 |
``--compact`` for suppressing all whitespace. The default behavior remains |
| 28228 |
the same as ``--indent=4``. |
| 28229 |
|
| 28230 |
Documentation |
| 28231 |
------------- |
| 28232 |
|
| 28233 |
- bpo-38928: Correct when venv's ``upgrade_dependencies()`` and |
| 28234 |
``--upgrade-deps`` are added. |
| 28235 |
|
| 28236 |
- bpo-38899: Update documentation to state that to activate virtual |
| 28237 |
environments under fish one should use ``source``, not ``.`` as documented |
| 28238 |
at https://fishshell.com/docs/current/cmds/source.html. |
| 28239 |
|
| 28240 |
- bpo-22377: Improves documentation of the values that |
| 28241 |
:meth:`datetime.datetime.strptime` accepts for ``%Z``. Patch by Karl |
| 28242 |
Dubost. |
| 28243 |
|
| 28244 |
Tests |
| 28245 |
----- |
| 28246 |
|
| 28247 |
- bpo-38546: Fix test_ressources_gced_in_workers() of |
| 28248 |
test_concurrent_futures: explicitly stop the manager to prevent leaking a |
| 28249 |
child process running in the background after the test completes. |
| 28250 |
|
| 28251 |
- bpo-38546: Multiprocessing and concurrent.futures tests now stop the |
| 28252 |
resource tracker process when tests complete. |
| 28253 |
|
| 28254 |
- bpo-38614: Replace hardcoded timeout constants in tests with new |
| 28255 |
:mod:`test.support` constants: :data:`~test.support.LOOPBACK_TIMEOUT`, |
| 28256 |
:data:`~test.support.INTERNET_TIMEOUT`, |
| 28257 |
:data:`~test.support.SHORT_TIMEOUT` and |
| 28258 |
:data:`~test.support.LONG_TIMEOUT`. It becomes easier to adjust these four |
| 28259 |
timeout constants for all tests at once, rather than having to adjust |
| 28260 |
every single test file. |
| 28261 |
|
| 28262 |
- bpo-38547: Fix test_pty: if the process is the session leader, closing the |
| 28263 |
master file descriptor raises a SIGHUP signal: simply ignore SIGHUP when |
| 28264 |
running the tests. |
| 28265 |
|
| 28266 |
- bpo-38992: Fix a test for :func:`math.fsum` that was failing due to |
| 28267 |
constant folding. |
| 28268 |
|
| 28269 |
- bpo-38991: :mod:`test.support`: |
| 28270 |
:func:`~test.support.run_python_until_end`, |
| 28271 |
:func:`~test.support.assert_python_ok` and |
| 28272 |
:func:`~test.support.assert_python_failure` functions no longer strip |
| 28273 |
whitespaces from stderr. Remove ``test.support.strip_python_stderr()`` |
| 28274 |
function. |
| 28275 |
|
| 28276 |
- bpo-38965: Fix test_faulthandler on GCC 10. Use the "volatile" keyword in |
| 28277 |
``faulthandler._stack_overflow()`` to prevent tail call optimization on |
| 28278 |
any compiler, rather than relying on compiler specific pragma. |
| 28279 |
|
| 28280 |
- bpo-38875: test_capi: trashcan tests now require the test "cpu" resource. |
| 28281 |
|
| 28282 |
- bpo-38841: Skip asyncio test_create_datagram_endpoint_existing_sock_unix |
| 28283 |
on platforms lacking a functional bind() for named unix domain sockets. |
| 28284 |
|
| 28285 |
- bpo-38692: Skip the test_posix.test_pidfd_open() test if |
| 28286 |
``os.pidfd_open()`` fails with a :exc:`PermissionError`. This situation |
| 28287 |
can happen in a Linux sandbox using a syscall whitelist which doesn't |
| 28288 |
allow the ``pidfd_open()`` syscall yet. |
| 28289 |
|
| 28290 |
- bpo-38839: Fix some unused functions in tests. Patch by Adam Johnson. |
| 28291 |
|
| 28292 |
- bpo-38669: Raise :exc:`TypeError` when passing target as a string with |
| 28293 |
:meth:`unittest.mock.patch.object`. |
| 28294 |
|
| 28295 |
- bpo-37957: test.regrtest now can receive a list of test patterns to ignore |
| 28296 |
(using the -i/--ignore argument) or a file with a list of patterns to |
| 28297 |
ignore (using the --ignore-file argument). Patch by Pablo Galindo. |
| 28298 |
|
| 28299 |
Build |
| 28300 |
----- |
| 28301 |
|
| 28302 |
- bpo-37404: :mod:`asyncio` now raises :exc:`TypeError` when calling |
| 28303 |
incompatible methods with an :class:`ssl.SSLSocket` socket. Patch by Ido |
| 28304 |
Michael. |
| 28305 |
|
| 28306 |
- bpo-36500: Added an optional "regen" project to the Visual Studio solution |
| 28307 |
that will regenerate all grammar, tokens, and opcodes. |
| 28308 |
|
| 28309 |
Windows |
| 28310 |
------- |
| 28311 |
|
| 28312 |
- bpo-39007: Add auditing events to functions in :mod:`winreg`. |
| 28313 |
|
| 28314 |
- bpo-33125: Add support for building and releasing Windows ARM64 packages. |
| 28315 |
|
| 28316 |
macOS |
| 28317 |
----- |
| 28318 |
|
| 28319 |
- bpo-37931: Fixed a crash on OSX dynamic builds that occurred when |
| 28320 |
re-initializing the posix module after a Py_Finalize if the environment |
| 28321 |
had changed since the previous ``import posix``. Patch by Benoît Hudson. |
| 28322 |
|
| 28323 |
IDLE |
| 28324 |
---- |
| 28325 |
|
| 28326 |
- bpo-38944: Escape key now closes IDLE completion windows. Patch by Johnny |
| 28327 |
Najera. |
| 28328 |
|
| 28329 |
- bpo-38943: Fix IDLE autocomplete windows not always appearing on some |
| 28330 |
systems. Patch by Johnny Najera. |
| 28331 |
|
| 28332 |
- bpo-38862: 'Strip Trailing Whitespace' on the Format menu removes extra |
| 28333 |
newlines at the end of non-shell files. |
| 28334 |
|
| 28335 |
- bpo-38636: Fix IDLE Format menu tab toggle and file indent width. These |
| 28336 |
functions (default shortcuts Alt-T and Alt-U) were mistakenly disabled in |
| 28337 |
3.7.5 and 3.8.0. |
| 28338 |
|
| 28339 |
C API |
| 28340 |
----- |
| 28341 |
|
| 28342 |
- bpo-38896: Remove ``PyUnicode_ClearFreeList()`` function: the Unicode free |
| 28343 |
list has been removed in Python 3.3. |
| 28344 |
|
| 28345 |
- bpo-37340: Remove ``PyMethod_ClearFreeList()`` and |
| 28346 |
``PyCFunction_ClearFreeList()`` functions: the free lists of bound method |
| 28347 |
objects have been removed. |
| 28348 |
|
| 28349 |
- bpo-38835: Exclude ``PyFPE_START_PROTECT()`` and ``PyFPE_END_PROTECT()`` |
| 28350 |
macros of ``pyfpe.h`` from ``Py_LIMITED_API`` (stable API). |
| 28351 |
|
| 28352 |
|
| 28353 |
What's New in Python 3.9.0 alpha 1? |
| 28354 |
=================================== |
| 28355 |
|
| 28356 |
*Release date: 2019-11-19* |
| 28357 |
|
| 28358 |
Security |
| 28359 |
-------- |
| 28360 |
|
| 28361 |
- bpo-38722: :mod:`runpy` now uses :meth:`io.open_code` to open code files. |
| 28362 |
Patch by Jason Killen. |
| 28363 |
|
| 28364 |
- bpo-38622: Add additional audit events for the :mod:`ctypes` module. |
| 28365 |
|
| 28366 |
- bpo-38418: Fixes audit event for :func:`os.system` to be named |
| 28367 |
``os.system``. |
| 28368 |
|
| 28369 |
- bpo-38243: Escape the server title of |
| 28370 |
:class:`xmlrpc.server.DocXMLRPCServer` when rendering the document page as |
| 28371 |
HTML. (Contributed by Donghee Na in :issue:`38243`.) |
| 28372 |
|
| 28373 |
- bpo-38174: Update vendorized expat library version to 2.2.8, which |
| 28374 |
resolves :cve:`2019-15903`. |
| 28375 |
|
| 28376 |
- bpo-37764: Fixes email._header_value_parser.get_unstructured going into an |
| 28377 |
infinite loop for a specific case in which the email header does not have |
| 28378 |
trailing whitespace, and the case in which it contains an invalid encoded |
| 28379 |
word. Patch by Ashwin Ramaswami. |
| 28380 |
|
| 28381 |
- bpo-37461: Fix an infinite loop when parsing specially crafted email |
| 28382 |
headers. Patch by Abhilash Raj. |
| 28383 |
|
| 28384 |
- bpo-37363: Adds audit events for the range of supported run commands (see |
| 28385 |
:ref:`using-on-general`). |
| 28386 |
|
| 28387 |
- bpo-37463: ssl.match_hostname() no longer accepts IPv4 addresses with |
| 28388 |
additional text after the address and only quad-dotted notation without |
| 28389 |
trailing whitespaces. Some inet_aton() implementations ignore whitespace |
| 28390 |
and all data after whitespace, e.g. '127.0.0.1 whatever'. |
| 28391 |
|
| 28392 |
- bpo-37363: Adds audit events for :mod:`ensurepip`, :mod:`ftplib`, |
| 28393 |
:mod:`glob`, :mod:`imaplib`, :mod:`!nntplib`, :mod:`pdb`, :mod:`poplib`, |
| 28394 |
:mod:`shutil`, :mod:`smtplib`, :mod:`sqlite3`, :mod:`subprocess`, |
| 28395 |
:mod:`!telnetlib`, :mod:`tempfile` and :mod:`webbrowser`, as well as |
| 28396 |
:func:`os.listdir`, :func:`os.scandir` and :func:`breakpoint`. |
| 28397 |
|
| 28398 |
- bpo-37364: :func:`io.open_code` is now used when reading :file:`.pth` |
| 28399 |
files. |
| 28400 |
|
| 28401 |
- bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer |
| 28402 |
|
| 28403 |
- bpo-34155: Fix parsing of invalid email addresses with more than one ``@`` |
| 28404 |
(e.g. a@[email protected].) to not return the part before 2nd ``@`` as valid email |
| 28405 |
address. Patch by maxking & jpic. |
| 28406 |
|
| 28407 |
Core and Builtins |
| 28408 |
----------------- |
| 28409 |
|
| 28410 |
- bpo-38631: Replace ``Py_FatalError()`` call with a regular |
| 28411 |
:exc:`RuntimeError` exception in :meth:`float.__getformat__`. |
| 28412 |
|
| 28413 |
- bpo-38639: Optimized :func:`math.floor`, :func:`math.ceil` and |
| 28414 |
:func:`math.trunc` for floats. |
| 28415 |
|
| 28416 |
- bpo-38640: Fixed a bug in the compiler that was causing to raise in the |
| 28417 |
presence of break statements and continue statements inside always false |
| 28418 |
while loops. Patch by Pablo Galindo. |
| 28419 |
|
| 28420 |
- bpo-38613: Optimized some set operations (e.g. ``|``, ``^``, and ``-``) of |
| 28421 |
``dict_keys``. ``d.keys() | other`` was slower than ``set(d) | other`` but |
| 28422 |
they are almost same performance for now. |
| 28423 |
|
| 28424 |
- bpo-28029: ``"".replace("", s, n)`` now returns ``s`` instead of an empty |
| 28425 |
string for all non-zero ``n``. There are similar changes for |
| 28426 |
:class:`bytes` and :class:`bytearray` objects. |
| 28427 |
|
| 28428 |
- bpo-38535: Fixed line numbers and column offsets for AST nodes for calls |
| 28429 |
without arguments in decorators. |
| 28430 |
|
| 28431 |
- bpo-38525: Fix a segmentation fault when using reverse iterators of empty |
| 28432 |
``dict`` objects. Patch by Donghee Na and Inada Naoki. |
| 28433 |
|
| 28434 |
- bpo-38465: :class:`bytearray`, :class:`~array.array` and |
| 28435 |
:class:`~mmap.mmap` objects allow now to export more than ``2**31`` |
| 28436 |
buffers at a time. |
| 28437 |
|
| 28438 |
- bpo-38469: Fixed a bug where the scope of named expressions was not being |
| 28439 |
resolved correctly in the presence of the *global* keyword. Patch by Pablo |
| 28440 |
Galindo. |
| 28441 |
|
| 28442 |
- bpo-38437: Activate the ``GC_DEBUG`` macro for debug builds of the |
| 28443 |
interpreter (when ``Py_DEBUG`` is set). Patch by Pablo Galindo. |
| 28444 |
|
| 28445 |
- bpo-38379: When the garbage collector makes a collection in which some |
| 28446 |
objects resurrect (they are reachable from outside the isolated cycles |
| 28447 |
after the finalizers have been executed), do not block the collection of |
| 28448 |
all objects that are still unreachable. Patch by Pablo Galindo and Tim |
| 28449 |
Peters. |
| 28450 |
|
| 28451 |
- bpo-38379: When cyclic garbage collection (gc) runs finalizers that |
| 28452 |
resurrect unreachable objects, the current gc run ends, without collecting |
| 28453 |
any cyclic trash. However, the statistics reported by ``collect()`` and |
| 28454 |
``get_stats()`` claimed that all cyclic trash found was collected, and |
| 28455 |
that the resurrected objects were collected. Changed the stats to report |
| 28456 |
that none were collected. |
| 28457 |
|
| 28458 |
- bpo-38392: In debug mode, :c:func:`PyObject_GC_Track` now calls |
| 28459 |
``tp_traverse()`` of the object type to ensure that the object is valid: |
| 28460 |
test that objects visited by ``tp_traverse()`` are valid. |
| 28461 |
|
| 28462 |
- bpo-38210: Remove unnecessary intersection and update set operation in |
| 28463 |
dictview with empty set. (Contributed by Donghee Na in :issue:`38210`.) |
| 28464 |
|
| 28465 |
- bpo-38402: Check the error from the system's underlying ``crypt`` or |
| 28466 |
``crypt_r``. |
| 28467 |
|
| 28468 |
- bpo-37474: On FreeBSD, Python no longer calls ``fedisableexcept()`` at |
| 28469 |
startup to control the floating-point control mode. The call became |
| 28470 |
useless since FreeBSD 6: it became the default mode. |
| 28471 |
|
| 28472 |
- bpo-38006: Fix a bug due to the interaction of weakrefs and the cyclic |
| 28473 |
garbage collector. We must clear any weakrefs in garbage in order to |
| 28474 |
prevent their callbacks from executing and causing a crash. |
| 28475 |
|
| 28476 |
- bpo-38317: Fix warnings options priority: ``PyConfig.warnoptions`` has the |
| 28477 |
highest priority, as stated in the :pep:`587`. |
| 28478 |
|
| 28479 |
- bpo-38310: Predict ``BUILD_MAP_UNPACK_WITH_CALL`` -> ``CALL_FUNCTION_EX`` |
| 28480 |
opcode pairs in the main interpreter loop. Patch by Brandt Bucher. |
| 28481 |
|
| 28482 |
- bpo-36871: Improve error handling for the assert_has_calls and |
| 28483 |
assert_has_awaits methods of mocks. Fixed a bug where any errors |
| 28484 |
encountered while binding the expected calls to the mock's spec were |
| 28485 |
silently swallowed, leading to misleading error output. |
| 28486 |
|
| 28487 |
- bpo-11410: Better control over symbol visibility is provided through use |
| 28488 |
of the visibility attributes available in gcc >= 4.0, provided in a |
| 28489 |
uniform way across POSIX and Windows. The POSIX build files have been |
| 28490 |
updated to compile with -fvisibility=hidden, minimising exported symbols. |
| 28491 |
|
| 28492 |
- bpo-38219: Optimized the :class:`dict` constructor and the |
| 28493 |
:meth:`~dict.update` method for the case when the argument is a dict. |
| 28494 |
|
| 28495 |
- bpo-38236: Python now dumps path configuration if it fails to import the |
| 28496 |
Python codecs of the filesystem and stdio encodings. |
| 28497 |
|
| 28498 |
- bpo-38013: Allow to call ``async_generator_athrow().throw(...)`` even for |
| 28499 |
non-started async generator helper. It fixes annoying warning at the end |
| 28500 |
of :func:`asyncio.run` call. |
| 28501 |
|
| 28502 |
- bpo-38124: Fix an off-by-one error in PyState_AddModule that could cause |
| 28503 |
out-of-bounds memory access. |
| 28504 |
|
| 28505 |
- bpo-38116: The select module is now PEP-384 compliant and no longer has |
| 28506 |
static state |
| 28507 |
|
| 28508 |
- bpo-38113: ast module updated to PEP-384 and all statics removed |
| 28509 |
|
| 28510 |
- bpo-38076: The struct module is now PEP-384 compatible |
| 28511 |
|
| 28512 |
- bpo-38075: The random module is now PEP-384 compatible |
| 28513 |
|
| 28514 |
- bpo-38074: zlib module made PEP-384 compatible |
| 28515 |
|
| 28516 |
- bpo-38073: Make pwd extension module PEP-384 compatible |
| 28517 |
|
| 28518 |
- bpo-38072: grp module made PEP-384 compatible |
| 28519 |
|
| 28520 |
- bpo-38069: Make _posixsubprocess PEP-384 compatible |
| 28521 |
|
| 28522 |
- bpo-38071: Make termios extension module PEP-384 compatible |
| 28523 |
|
| 28524 |
- bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID. |
| 28525 |
|
| 28526 |
- bpo-36946: Fix possible signed integer overflow when handling slices. |
| 28527 |
Patch by hongweipeng. |
| 28528 |
|
| 28529 |
- bpo-37994: Fixed silencing arbitrary errors if an attribute lookup fails |
| 28530 |
in several sites. Only AttributeError should be silenced. |
| 28531 |
|
| 28532 |
- bpo-8425: Optimize set difference_update for the case when the other set |
| 28533 |
is much larger than the base set. (Suggested by Evgeny Kapun with code |
| 28534 |
contributed by Michele Orrù). |
| 28535 |
|
| 28536 |
- bpo-37966: The implementation of :func:`~unicodedata.is_normalized` has |
| 28537 |
been greatly sped up on strings that aren't normalized, by implementing |
| 28538 |
the full normalization-quick-check algorithm from the Unicode standard. |
| 28539 |
|
| 28540 |
- bpo-37947: Adjust correctly the recursion level in the symtable generation |
| 28541 |
for named expressions. Patch by Pablo Galindo. |
| 28542 |
|
| 28543 |
- bpo-37812: The ``CHECK_SMALL_INT`` macro used inside |
| 28544 |
:file:`Object/longobject.c` has been replaced with an explicit ``return`` |
| 28545 |
at each call site. |
| 28546 |
|
| 28547 |
- bpo-37751: Fix :func:`codecs.lookup` to normalize the encoding name the |
| 28548 |
same way than :func:`encodings.normalize_encoding`, except that |
| 28549 |
:func:`codecs.lookup` also converts the name to lower case. |
| 28550 |
|
| 28551 |
- bpo-37830: Fixed compilation of :keyword:`break` and :keyword:`continue` |
| 28552 |
in the :keyword:`finally` block when the corresponding :keyword:`try` |
| 28553 |
block contains :keyword:`return` with a non-constant value. |
| 28554 |
|
| 28555 |
- bpo-20490: Improve import error message for partially initialized module |
| 28556 |
on circular ``from`` imports - by Anthony Sottile. |
| 28557 |
|
| 28558 |
- bpo-37840: Fix handling of negative indices in |
| 28559 |
:c:member:`~PySequenceMethods.sq_item` of :class:`bytearray`. Patch by |
| 28560 |
Sergey Fedoseev. |
| 28561 |
|
| 28562 |
- bpo-37802: Slightly improve performance of |
| 28563 |
:c:func:`PyLong_FromUnsignedLong`, :c:func:`PyLong_FromUnsignedLongLong` |
| 28564 |
and :c:func:`PyLong_FromSize_t`. Patch by Sergey Fedoseev. |
| 28565 |
|
| 28566 |
- bpo-37409: Ensure explicit relative imports from interactive sessions and |
| 28567 |
scripts (having no parent package) always raise ImportError, rather than |
| 28568 |
treating the current module as the package. Patch by Ben Lewis. |
| 28569 |
|
| 28570 |
- bpo-32912: Reverted :issue:`32912`: emitting :exc:`SyntaxWarning` instead |
| 28571 |
of :exc:`DeprecationWarning` for invalid escape sequences in string and |
| 28572 |
bytes literals. |
| 28573 |
|
| 28574 |
- bpo-37757: :pep:`572`: As described in the PEP, assignment expressions now |
| 28575 |
raise :exc:`SyntaxError` when their interaction with comprehension scoping |
| 28576 |
results in an ambiguous target scope. |
| 28577 |
|
| 28578 |
The ``TargetScopeError`` subclass originally proposed by the PEP has been |
| 28579 |
removed in favour of just raising regular syntax errors for the disallowed |
| 28580 |
cases. |
| 28581 |
|
| 28582 |
- bpo-36279: Fix potential use of uninitialized memory in :func:`os.wait3`. |
| 28583 |
|
| 28584 |
- bpo-36311: Decoding bytes objects larger than 2GiB is faster and no longer |
| 28585 |
fails when a multibyte characters spans a chunk boundary. |
| 28586 |
|
| 28587 |
- bpo-34880: The :keyword:`assert` statement now works properly if the |
| 28588 |
:exc:`AssertionError` exception is being shadowed. Patch by Zackery Spytz. |
| 28589 |
|
| 28590 |
- bpo-37340: Removed object cache (``free_list``) for bound method objects. |
| 28591 |
Temporary bound method objects are less used than before thanks to the |
| 28592 |
``LOAD_METHOD`` opcode and the ``_PyObject_VectorcallMethod`` C API. |
| 28593 |
|
| 28594 |
- bpo-37648: Fixed minor inconsistency in :meth:`list.__contains__`, |
| 28595 |
:meth:`tuple.__contains__` and a few other places. The collection's item |
| 28596 |
is now always at the left and the needle is on the right of ``==``. |
| 28597 |
|
| 28598 |
- bpo-37444: Update differing exception between :meth:`builtins.__import__` |
| 28599 |
and :meth:`importlib.__import__`. |
| 28600 |
|
| 28601 |
- bpo-37619: When adding a wrapper descriptor from one class to a different |
| 28602 |
class (for example, setting ``__add__ = str.__add__`` on an ``int`` |
| 28603 |
subclass), an exception is correctly raised when the operator is called. |
| 28604 |
|
| 28605 |
- bpo-37593: Swap the positions of the *posonlyargs* and *args* parameters |
| 28606 |
in the constructor of :class:`ast.parameters` nodes. |
| 28607 |
|
| 28608 |
- bpo-37543: Optimized pymalloc for non PGO build. |
| 28609 |
|
| 28610 |
- bpo-37537: Compute allocated pymalloc blocks inside |
| 28611 |
_Py_GetAllocatedBlocks(). This slows down _Py_GetAllocatedBlocks() but |
| 28612 |
gives a small speedup to _PyObject_Malloc() and _PyObject_Free(). |
| 28613 |
|
| 28614 |
- bpo-37467: Fix :func:`sys.excepthook` and :c:func:`PyErr_Display` if a |
| 28615 |
filename is a bytes string. For example, for a SyntaxError exception where |
| 28616 |
the filename attribute is a bytes string. |
| 28617 |
|
| 28618 |
- bpo-37433: Fix ``SyntaxError`` indicator printing too many spaces for |
| 28619 |
multi-line strings - by Anthony Sottile. |
| 28620 |
|
| 28621 |
- bpo-37417: :meth:`bytearray.extend` now correctly handles errors that |
| 28622 |
arise during iteration. Patch by Brandt Bucher. |
| 28623 |
|
| 28624 |
- bpo-37414: The undocumented ``sys.callstats()`` function has been removed. |
| 28625 |
Since Python 3.7, it was deprecated and always returned ``None``. It |
| 28626 |
required a special build option ``CALL_PROFILE`` which was already removed |
| 28627 |
in Python 3.7. |
| 28628 |
|
| 28629 |
- bpo-37392: Remove ``sys.getcheckinterval()`` and |
| 28630 |
``sys.setcheckinterval()`` functions. They were deprecated since Python |
| 28631 |
3.2. Use :func:`sys.getswitchinterval` and :func:`sys.setswitchinterval` |
| 28632 |
instead. Remove also ``check_interval`` field of the |
| 28633 |
``PyInterpreterState`` structure. |
| 28634 |
|
| 28635 |
- bpo-37388: In development mode and in debug build, *encoding* and *errors* |
| 28636 |
arguments are now checked on string encoding and decoding operations. |
| 28637 |
Examples: :func:`open`, :meth:`str.encode` and :meth:`bytes.decode`. |
| 28638 |
|
| 28639 |
By default, for best performances, the *errors* argument is only checked |
| 28640 |
at the first encoding/decoding error, and the *encoding* argument is |
| 28641 |
sometimes ignored for empty strings. |
| 28642 |
|
| 28643 |
- bpo-37348: Optimized decoding short ASCII string with UTF-8 and ascii |
| 28644 |
codecs. ``b"foo".decode()`` is about 15% faster. Patch by Inada Naoki. |
| 28645 |
|
| 28646 |
- bpo-24214: Improved support of the surrogatepass error handler in the |
| 28647 |
UTF-8 and UTF-16 incremental decoders. |
| 28648 |
|
| 28649 |
- bpo-37330: :func:`open`, :func:`io.open`, :func:`codecs.open` and |
| 28650 |
:class:`fileinput.FileInput` no longer accept ``'U'`` ("universal |
| 28651 |
newline") in the file mode. This flag was deprecated since Python 3.3. |
| 28652 |
|
| 28653 |
- bpo-35224: Reverse evaluation order of key: value in dict comprehensions |
| 28654 |
as proposed in PEP 572. I.e. in ``{k: v for ...}``, ``k`` will be |
| 28655 |
evaluated before ``v``. |
| 28656 |
|
| 28657 |
- bpo-37316: Fix the :c:func:`PySys_Audit` call in :class:`mmap.mmap`. |
| 28658 |
|
| 28659 |
- bpo-37300: Remove an unnecessary Py_XINCREF in classobject.c. |
| 28660 |
|
| 28661 |
- bpo-37269: Fix a bug in the peephole optimizer that was not treating |
| 28662 |
correctly constant conditions with binary operators. Patch by Pablo |
| 28663 |
Galindo. |
| 28664 |
|
| 28665 |
- bpo-20443: Python now gets the absolute path of the script filename |
| 28666 |
specified on the command line (ex: "python3 script.py"): the __file__ |
| 28667 |
attribute of the __main__ module and sys.path[0] become an absolute path, |
| 28668 |
rather than a relative path. |
| 28669 |
|
| 28670 |
- bpo-37257: Python's small object allocator (``obmalloc.c``) now allows (no |
| 28671 |
more than) one empty arena to remain available for immediate reuse, |
| 28672 |
without returning it to the OS. This prevents thrashing in simple loops |
| 28673 |
where an arena could be created and destroyed anew on each iteration. |
| 28674 |
|
| 28675 |
- bpo-37231: The dispatching of type slots to special methods (for example |
| 28676 |
calling ``__mul__`` when doing ``x * y``) has been made faster. |
| 28677 |
|
| 28678 |
- bpo-36974: Implemented separate vectorcall functions for every calling |
| 28679 |
convention of builtin functions and methods. This improves performance for |
| 28680 |
calls. |
| 28681 |
|
| 28682 |
- bpo-37213: Handle correctly negative line offsets in the peephole |
| 28683 |
optimizer. Patch by Pablo Galindo. |
| 28684 |
|
| 28685 |
- bpo-37219: Remove erroneous optimization for empty set differences. |
| 28686 |
|
| 28687 |
- bpo-15913: Implement :c:func:`PyBuffer_SizeFromFormat()` function |
| 28688 |
(previously documented but not implemented): call :func:`struct.calcsize`. |
| 28689 |
Patch by Joannah Nanjekye. |
| 28690 |
|
| 28691 |
- bpo-36922: Slot functions optimize any callable with |
| 28692 |
``Py_TPFLAGS_METHOD_DESCRIPTOR`` instead of only instances of |
| 28693 |
``function``. |
| 28694 |
|
| 28695 |
- bpo-36974: The slot ``tp_vectorcall_offset`` is inherited unconditionally |
| 28696 |
to support ``super().__call__()`` when the base class uses vectorcall. |
| 28697 |
|
| 28698 |
- bpo-37160: :func:`threading.get_native_id` now also supports NetBSD. |
| 28699 |
|
| 28700 |
- bpo-37077: Add :func:`threading.get_native_id` support for AIX. Patch by |
| 28701 |
M. Felt |
| 28702 |
|
| 28703 |
- bpo-36781: :func:`sum` has been optimized for boolean values. |
| 28704 |
|
| 28705 |
- bpo-34556: Add ``--upgrade-deps`` to venv module. Patch by Cooper Ry Lees |
| 28706 |
|
| 28707 |
- bpo-20523: ``pdb.Pdb`` supports ~/.pdbrc in Windows 7. Patch by Tim Hopper |
| 28708 |
and Dan Lidral-Porter. |
| 28709 |
|
| 28710 |
- bpo-35551: Updated encodings: - Removed the "tis260" encoding, which was |
| 28711 |
an alias for the nonexistent "tactis" codec. - Added "mac_centeuro" as an |
| 28712 |
alias for the mac_latin2 encoding. |
| 28713 |
|
| 28714 |
- bpo-19072: The :class:`classmethod` decorator can now wrap other |
| 28715 |
descriptors such as property objects. Adapted from a patch written by |
| 28716 |
Graham Dumpleton. |
| 28717 |
|
| 28718 |
- bpo-27575: Improve speed of dictview intersection by directly using set |
| 28719 |
intersection logic. Patch by David Su. |
| 28720 |
|
| 28721 |
- bpo-30773: Prohibit parallel running of aclose() / asend() / athrow(). Fix |
| 28722 |
ag_running to reflect the actual running status of the AG. |
| 28723 |
|
| 28724 |
Library |
| 28725 |
------- |
| 28726 |
|
| 28727 |
- bpo-36589: The :func:`curses.update_lines_cols` function now returns |
| 28728 |
``None`` instead of ``1`` on success. |
| 28729 |
|
| 28730 |
- bpo-38807: Update :exc:`TypeError` messages for :meth:`os.path.join` to |
| 28731 |
include :class:`os.PathLike` objects as acceptable input types. |
| 28732 |
|
| 28733 |
- bpo-38724: Add a repr for ``subprocess.Popen`` objects. Patch by Andrey |
| 28734 |
Doroschenko. |
| 28735 |
|
| 28736 |
- bpo-38786: pydoc now recognizes and parses HTTPS URLs. Patch by python273. |
| 28737 |
|
| 28738 |
- bpo-38785: Prevent asyncio from crashing if parent ``__init__`` is not |
| 28739 |
called from a constructor of object derived from ``asyncio.Future``. |
| 28740 |
|
| 28741 |
- bpo-38723: :mod:`pdb` now uses :meth:`io.open_code` to trigger auditing |
| 28742 |
events. |
| 28743 |
|
| 28744 |
- bpo-27805: Allow opening pipes and other non-seekable files in append mode |
| 28745 |
with :func:`open`. |
| 28746 |
|
| 28747 |
- bpo-38438: Simplify the :mod:`argparse` usage message for ``nargs="*"``. |
| 28748 |
|
| 28749 |
- bpo-38761: WeakSet is now registered as a collections.abc.MutableSet. |
| 28750 |
|
| 28751 |
- bpo-38716: logging: change RotatingHandler namer and rotator to |
| 28752 |
class-level attributes. This stops __init__ from setting them to None in |
| 28753 |
the case where a subclass defines them with eponymous methods. |
| 28754 |
|
| 28755 |
- bpo-38713: Add :const:`os.P_PIDFD` constant, which may be passed to |
| 28756 |
:func:`os.waitid` to wait on a Linux process file descriptor. |
| 28757 |
|
| 28758 |
- bpo-38692: Add :class:`asyncio.PidfdChildWatcher`, a Linux-specific child |
| 28759 |
watcher implementation that polls process file descriptors. |
| 28760 |
|
| 28761 |
- bpo-38692: Expose the Linux ``pidfd_open`` syscall as |
| 28762 |
:func:`os.pidfd_open`. |
| 28763 |
|
| 28764 |
- bpo-38602: Added constants :const:`~fcntl.F_OFD_GETLK`, |
| 28765 |
:const:`~fcntl.F_OFD_SETLK` and :const:`~fcntl.F_OFD_SETLKW` to the |
| 28766 |
:mod:`fcntl` module. Patch by Donghee Na. |
| 28767 |
|
| 28768 |
- bpo-38334: Fixed seeking backward on an encrypted |
| 28769 |
:class:`zipfile.ZipExtFile`. |
| 28770 |
|
| 28771 |
- bpo-38312: Add :func:`curses.get_escdelay`, :func:`curses.set_escdelay`, |
| 28772 |
:func:`curses.get_tabsize`, and :func:`curses.set_tabsize` functions - by |
| 28773 |
Anthony Sottile. |
| 28774 |
|
| 28775 |
- bpo-38586: Now :func:`~logging.config.fileConfig` correctly sets the .name |
| 28776 |
of handlers loaded. |
| 28777 |
|
| 28778 |
- bpo-38565: Add new cache_parameters() method for functools.lru_cache() to |
| 28779 |
better support pickling. |
| 28780 |
|
| 28781 |
- bpo-34679: asynci.ProactorEventLoop.close() now only calls |
| 28782 |
signal.set_wakeup_fd() in the main thread. |
| 28783 |
|
| 28784 |
- bpo-31202: The case the result of :func:`pathlib.WindowsPath.glob` matches |
| 28785 |
now the case of the pattern for literal parts. |
| 28786 |
|
| 28787 |
- bpo-36321: Remove misspelled attribute. The 3.8 changelog noted that this |
| 28788 |
would be removed in 3.9. |
| 28789 |
|
| 28790 |
- bpo-38521: Fixed erroneous equality comparison in statistics.NormalDist(). |
| 28791 |
|
| 28792 |
- bpo-38493: Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for |
| 28793 |
:attr:`si_code`. Patch by Donghee Na. |
| 28794 |
|
| 28795 |
- bpo-38478: Fixed a bug in :meth:`inspect.signature.bind` that was causing |
| 28796 |
it to fail when handling a keyword argument with same name as |
| 28797 |
positional-only parameter. Patch by Pablo Galindo. |
| 28798 |
|
| 28799 |
- bpo-33604: Fixed ``hmac.new`` and ``hmac.HMAC`` to raise TypeError instead |
| 28800 |
of ValueError when the digestmod parameter, now required in 3.8, is |
| 28801 |
omitted. Also clarified the hmac module documentation and docstrings. |
| 28802 |
|
| 28803 |
- bpo-38378: Parameters *out* and *in* of :func:`os.sendfile` was renamed to |
| 28804 |
*out_fd* and *in_fd*. |
| 28805 |
|
| 28806 |
- bpo-38417: Added support for setting the umask in the child process to the |
| 28807 |
subprocess module on POSIX systems. |
| 28808 |
|
| 28809 |
- bpo-38449: Revert PR 15522, which introduces a regression in |
| 28810 |
:meth:`mimetypes.guess_type` due to improper handling of filenames as |
| 28811 |
urls. |
| 28812 |
|
| 28813 |
- bpo-38431: Fix ``__repr__`` method for :class:`dataclasses.InitVar` to |
| 28814 |
support typing objects, patch by Samuel Colvin. |
| 28815 |
|
| 28816 |
- bpo-38109: Add missing :const:`stat.S_IFDOOR`, :const:`stat.S_IFPORT`, |
| 28817 |
:const:`stat.S_IFWHT`, :func:`stat.S_ISDOOR`, :func:`stat.S_ISPORT`, and |
| 28818 |
:func:`stat.S_ISWHT` values to the Python implementation of :mod:`stat`. |
| 28819 |
|
| 28820 |
- bpo-38422: Clarify docstrings of pathlib suffix(es) |
| 28821 |
|
| 28822 |
- bpo-38405: Nested subclasses of :class:`typing.NamedTuple` are now |
| 28823 |
pickleable. |
| 28824 |
|
| 28825 |
- bpo-38332: Prevent :exc:`KeyError` thrown by |
| 28826 |
:func:`!_encoded_words.decode` when given an encoded-word with invalid |
| 28827 |
content-type encoding from propagating all the way to |
| 28828 |
:func:`email.message.get`. |
| 28829 |
|
| 28830 |
- bpo-38371: Deprecated the ``split()`` method in |
| 28831 |
:class:`!_tkinter.TkappType` in favour of the ``splitlist()`` method which |
| 28832 |
has more consistent and predictable behavior. |
| 28833 |
|
| 28834 |
- bpo-38341: Add :exc:`smtplib.SMTPNotSupportedError` to the :mod:`smtplib` |
| 28835 |
exported names. |
| 28836 |
|
| 28837 |
- bpo-38319: sendfile() used in socket and shutil modules was raising |
| 28838 |
OverflowError for files >= 2GiB on 32-bit architectures. (patch by |
| 28839 |
Giampaolo Rodola) |
| 28840 |
|
| 28841 |
- bpo-38242: Revert the new asyncio Streams API |
| 28842 |
|
| 28843 |
- bpo-13153: OS native encoding is now used for converting between Python |
| 28844 |
strings and Tcl objects. This allows to display, copy and paste to |
| 28845 |
clipboard emoji and other non-BMP characters. Converting strings from Tcl |
| 28846 |
to Python and back now never fails (except MemoryError). |
| 28847 |
|
| 28848 |
- bpo-38019: Correctly handle pause/resume reading of closed asyncio unix |
| 28849 |
pipe. |
| 28850 |
|
| 28851 |
- bpo-38163: Child mocks will now detect their type as either synchronous or |
| 28852 |
asynchronous, asynchronous child mocks will be AsyncMocks and synchronous |
| 28853 |
child mocks will be either MagicMock or Mock (depending on their parent |
| 28854 |
type). |
| 28855 |
|
| 28856 |
- bpo-38161: Removes _AwaitEvent from AsyncMock. |
| 28857 |
|
| 28858 |
- bpo-38216: Allow the rare code that wants to send invalid http requests |
| 28859 |
from the ``http.client`` library a way to do so. The fixes for bpo-30458 |
| 28860 |
led to breakage for some projects that were relying on this ability to |
| 28861 |
test their own behavior in the face of bad requests. |
| 28862 |
|
| 28863 |
- bpo-28286: Deprecate opening :class:`~gzip.GzipFile` for writing |
| 28864 |
implicitly. Always specify the *mode* argument for writing. |
| 28865 |
|
| 28866 |
- bpo-38108: Any synchronous magic methods on an AsyncMock now return a |
| 28867 |
MagicMock. Any asynchronous magic methods on a MagicMock now return an |
| 28868 |
AsyncMock. |
| 28869 |
|
| 28870 |
- bpo-38265: Update the *length* parameter of :func:`os.pread` to accept |
| 28871 |
:c:type:`Py_ssize_t` instead of :c:expr:`int`. |
| 28872 |
|
| 28873 |
- bpo-38112: :mod:`compileall` has a higher default recursion limit and new |
| 28874 |
command-line arguments for path manipulation, symlinks handling, and |
| 28875 |
multiple optimization levels. |
| 28876 |
|
| 28877 |
- bpo-38248: asyncio: Fix inconsistent immediate Task cancellation |
| 28878 |
|
| 28879 |
- bpo-38237: The arguments for the builtin pow function are more |
| 28880 |
descriptive. They can now also be passed in as keywords. |
| 28881 |
|
| 28882 |
- bpo-34002: Improve efficiency in parts of email package by changing |
| 28883 |
while-pop to a for loop, using isdisjoint instead of set intersections. |
| 28884 |
|
| 28885 |
- bpo-38191: Constructors of :class:`~typing.NamedTuple` and |
| 28886 |
:class:`~typing.TypedDict` types now accept arbitrary keyword argument |
| 28887 |
names, including "cls", "self", "typename", "_typename", "fields" and |
| 28888 |
"_fields". |
| 28889 |
|
| 28890 |
- bpo-38155: Add ``__all__`` to :mod:`datetime`. Patch by Tahia Khan. |
| 28891 |
|
| 28892 |
- bpo-38185: Fixed case-insensitive string comparison in |
| 28893 |
:class:`sqlite3.Row` indexing. |
| 28894 |
|
| 28895 |
- bpo-38136: Changes AsyncMock call count and await count to be two |
| 28896 |
different counters. Now await count only counts when a coroutine has been |
| 28897 |
awaited, not when it has been called, and vice-versa. Update the |
| 28898 |
documentation around this. |
| 28899 |
|
| 28900 |
- bpo-37828: Fix default mock name in |
| 28901 |
:meth:`unittest.mock.Mock.assert_called` exceptions. Patch by Abraham |
| 28902 |
Toriz Cruz. |
| 28903 |
|
| 28904 |
- bpo-38175: Fix a memory leak in comparison of :class:`sqlite3.Row` |
| 28905 |
objects. |
| 28906 |
|
| 28907 |
- bpo-33936: _hashlib no longer calls obsolete OpenSSL initialization |
| 28908 |
function with OpenSSL 1.1.0+. |
| 28909 |
|
| 28910 |
- bpo-34706: Preserve subclassing in inspect.Signature.from_callable. |
| 28911 |
|
| 28912 |
- bpo-38153: Names of hashing algorithms from OpenSSL are now normalized to |
| 28913 |
follow Python's naming conventions. For example OpenSSL uses sha3-512 |
| 28914 |
instead of sha3_512 or blake2b512 instead of blake2b. |
| 28915 |
|
| 28916 |
- bpo-38115: Fix a bug in dis.findlinestarts() where it would return invalid |
| 28917 |
bytecode offsets. Document that a code object's co_lnotab can contain |
| 28918 |
invalid bytecode offsets. |
| 28919 |
|
| 28920 |
- bpo-38148: Add slots to :mod:`asyncio` transport classes, which can reduce |
| 28921 |
memory usage. |
| 28922 |
|
| 28923 |
- bpo-38142: The _hashlib OpenSSL wrapper extension module is now PEP-384 |
| 28924 |
compliant. |
| 28925 |
|
| 28926 |
- bpo-9216: hashlib constructors now support usedforsecurity flag to signal |
| 28927 |
that a hashing algorithm is not used in a security context. |
| 28928 |
|
| 28929 |
- bpo-36991: Fixes a potential incorrect AttributeError exception escaping |
| 28930 |
ZipFile.extract() in some unsupported input error situations. |
| 28931 |
|
| 28932 |
- bpo-38134: Remove obsolete copy of PBKDF2_HMAC_fast. All supported OpenSSL |
| 28933 |
versions contain a fast implementation. |
| 28934 |
|
| 28935 |
- bpo-38132: The OpenSSL hashlib wrapper uses a simpler implementation. |
| 28936 |
Several Macros and pointless caches are gone. The hash name now comes from |
| 28937 |
OpenSSL's EVP. The algorithm name stays the same, except it is now always |
| 28938 |
lower case. |
| 28939 |
|
| 28940 |
- bpo-38008: Fix parent class check in protocols to correctly identify the |
| 28941 |
module that provides a builtin protocol, instead of assuming they all come |
| 28942 |
from the :mod:`collections.abc` module |
| 28943 |
|
| 28944 |
- bpo-34037: For :mod:`asyncio`, add a new coroutine |
| 28945 |
:meth:`loop.shutdown_default_executor`. The new coroutine provides an API |
| 28946 |
to schedule an executor shutdown that waits on the threadpool to finish |
| 28947 |
closing. Also, :func:`asyncio.run` has been updated to utilize the new |
| 28948 |
coroutine. Patch by Kyle Stanley. |
| 28949 |
|
| 28950 |
- bpo-37405: Fixed regression bug for socket.getsockname() for non-CAN_ISOTP |
| 28951 |
AF_CAN address family sockets by returning a 1-tuple instead of string. |
| 28952 |
|
| 28953 |
- bpo-38121: Update parameter names on functions in importlib.metadata |
| 28954 |
matching the changes in the 0.22 release of importlib_metadata. |
| 28955 |
|
| 28956 |
- bpo-38110: The os.closewalk() implementation now uses the libc fdwalk() |
| 28957 |
API on platforms where it is available. |
| 28958 |
|
| 28959 |
- bpo-38093: Fixes AsyncMock so it doesn't crash when used with |
| 28960 |
AsyncContextManagers or AsyncIterators. |
| 28961 |
|
| 28962 |
- bpo-37488: Add warning to :meth:`datetime.utctimetuple`, |
| 28963 |
:meth:`datetime.utcnow` and :meth:`datetime.utcfromtimestamp` . |
| 28964 |
|
| 28965 |
- bpo-35640: Allow passing a :term:`path-like object` as ``directory`` |
| 28966 |
argument to the :class:`http.server.SimpleHTTPRequestHandler` class. Patch |
| 28967 |
by Géry Ogam. |
| 28968 |
|
| 28969 |
- bpo-38086: Update importlib.metadata with changes from `importlib_metadata |
| 28970 |
0.21 |
| 28971 |
<https://gitlab.com/python-devs/importlib_metadata/blob/0.21/importlib_metadata/docs/changelog.rst>`_. |
| 28972 |
|
| 28973 |
- bpo-37251: Remove ``__code__`` check in AsyncMock that incorrectly |
| 28974 |
evaluated function specs as async objects but failed to evaluate classes |
| 28975 |
with ``__await__`` but no ``__code__`` attribute defined as async objects. |
| 28976 |
|
| 28977 |
- bpo-38037: Fix reference counters in the :mod:`signal` module. |
| 28978 |
|
| 28979 |
- bpo-38066: Hide internal asyncio.Stream methods: feed_eof(), feed_data(), |
| 28980 |
set_exception() and set_transport(). |
| 28981 |
|
| 28982 |
- bpo-38059: inspect.py now uses sys.exit() instead of exit() |
| 28983 |
|
| 28984 |
- bpo-38049: Added command-line interface for the :mod:`ast` module. |
| 28985 |
|
| 28986 |
- bpo-37953: In :mod:`typing`, improved the ``__hash__`` and ``__eq__`` |
| 28987 |
methods for :class:`ForwardReferences`. |
| 28988 |
|
| 28989 |
- bpo-38026: Fixed :func:`inspect.getattr_static` used ``isinstance`` while |
| 28990 |
it should avoid dynamic lookup. |
| 28991 |
|
| 28992 |
- bpo-35923: Update :class:`importlib.machinery.BuiltinImporter` to use |
| 28993 |
``loader._ORIGIN`` instead of a hardcoded value. Patch by Donghee Na. |
| 28994 |
|
| 28995 |
- bpo-38010: In ``importlib.metadata`` sync with ``importlib_metadata`` |
| 28996 |
0.20, clarifying behavior of ``files()`` and fixing issue where only one |
| 28997 |
requirement was returned for ``requires()`` on ``dist-info`` packages. |
| 28998 |
|
| 28999 |
- bpo-38006: weakref.WeakValueDictionary defines a local remove() function |
| 29000 |
used as callback for weak references. This function was created with a |
| 29001 |
closure. Modify the implementation to avoid the closure. |
| 29002 |
|
| 29003 |
- bpo-37995: Added the *indent* option to :func:`ast.dump` which allows it |
| 29004 |
to produce a multiline indented output. |
| 29005 |
|
| 29006 |
- bpo-34410: Fixed a crash in the :func:`tee` iterator when re-enter it. |
| 29007 |
RuntimeError is now raised in this case. |
| 29008 |
|
| 29009 |
- bpo-37140: Fix a ctypes regression of Python 3.8. When a ctypes.Structure |
| 29010 |
is passed by copy to a function, ctypes internals created a temporary |
| 29011 |
object which had the side effect of calling the structure finalizer |
| 29012 |
(__del__) twice. The Python semantics requires a finalizer to be called |
| 29013 |
exactly once. Fix ctypes internals to no longer call the finalizer twice. |
| 29014 |
|
| 29015 |
- bpo-37587: ``_json.scanstring`` is now up to 3x faster when there are many |
| 29016 |
backslash escaped characters in the JSON string. |
| 29017 |
|
| 29018 |
- bpo-37834: Prevent shutil.rmtree exception when built on non-Windows |
| 29019 |
system without fd system call support, like older versions of macOS. |
| 29020 |
|
| 29021 |
- bpo-10978: Semaphores and BoundedSemaphores can now release more than one |
| 29022 |
waiting thread at a time. |
| 29023 |
|
| 29024 |
- bpo-37972: Subscripts to the ``unittest.mock.call`` objects now receive |
| 29025 |
the same chaining mechanism as any other custom attributes, so that the |
| 29026 |
following usage no longer raises a ``TypeError``: |
| 29027 |
|
| 29028 |
``call().foo().__getitem__('bar')`` |
| 29029 |
|
| 29030 |
Patch by blhsing |
| 29031 |
|
| 29032 |
- bpo-37965: Fix C compiler warning caused by |
| 29033 |
distutils.ccompiler.CCompiler.has_function. |
| 29034 |
|
| 29035 |
- bpo-37964: Add ``F_GETPATH`` command to :mod:`fcntl`. |
| 29036 |
|
| 29037 |
- bpo-37960: ``repr()`` of buffered and text streams now silences only |
| 29038 |
expected exceptions when get the value of "name" and "mode" attributes. |
| 29039 |
|
| 29040 |
- bpo-37961: Add a ``total_nframe`` field to the traces collected by the |
| 29041 |
tracemalloc module. This field indicates the original number of frames |
| 29042 |
before it was truncated. |
| 29043 |
|
| 29044 |
- bpo-37951: Most features of the subprocess module now work again in |
| 29045 |
subinterpreters. Only *preexec_fn* is restricted in subinterpreters. |
| 29046 |
|
| 29047 |
- bpo-36205: Fix the rusage implementation of time.process_time() to |
| 29048 |
correctly report the sum of the system and user CPU time. |
| 29049 |
|
| 29050 |
- bpo-37950: Fix :func:`ast.dump` when call with incompletely initialized |
| 29051 |
node. |
| 29052 |
|
| 29053 |
- bpo-34679: Restores instantiation of Windows IOCP event loops from the |
| 29054 |
non-main thread. |
| 29055 |
|
| 29056 |
- bpo-36917: Add default implementation of the |
| 29057 |
:meth:`ast.NodeVisitor.visit_Constant` method which emits a deprecation |
| 29058 |
warning and calls corresponding methods ``visit_Num()``, ``visit_Str()``, |
| 29059 |
etc. |
| 29060 |
|
| 29061 |
- bpo-37798: Update test_statistics.py to verify that the statistics module |
| 29062 |
works well for both C and Python implementations. Patch by Donghee Na |
| 29063 |
|
| 29064 |
- bpo-26589: Added a new status code to the http module: 451 |
| 29065 |
UNAVAILABLE_FOR_LEGAL_REASONS |
| 29066 |
|
| 29067 |
- bpo-37915: Fix a segmentation fault that appeared when comparing instances |
| 29068 |
of ``datetime.timezone`` and ``datetime.tzinfo`` objects. Patch by Pablo |
| 29069 |
Galindo. |
| 29070 |
|
| 29071 |
- bpo-32554: Deprecate having random.seed() call hash on arbitrary types. |
| 29072 |
|
| 29073 |
- bpo-9938: Add optional keyword argument ``exit_on_error`` for |
| 29074 |
:class:`ArgumentParser`. |
| 29075 |
|
| 29076 |
- bpo-37851: The :mod:`faulthandler` module no longer allocates its |
| 29077 |
alternative stack at Python startup. Now the stack is only allocated at |
| 29078 |
the first faulthandler usage. |
| 29079 |
|
| 29080 |
- bpo-32793: Fix a duplicated debug message when |
| 29081 |
:meth:`smtplib.SMTP.connect` is called. |
| 29082 |
|
| 29083 |
- bpo-37885: venv: Don't generate unset variable warning on deactivate. |
| 29084 |
|
| 29085 |
- bpo-37868: Fix dataclasses.is_dataclass when given an instance that never |
| 29086 |
raises AttributeError in __getattr__. That is, an object that returns |
| 29087 |
something for __dataclass_fields__ even if it's not a dataclass. |
| 29088 |
|
| 29089 |
- bpo-37811: Fix ``socket`` module's ``socket.connect(address)`` function |
| 29090 |
being unable to establish connection in case of interrupted system call. |
| 29091 |
The problem was observed on all OSes which ``poll(2)`` system call can |
| 29092 |
take only non-negative integers and -1 as a timeout value. |
| 29093 |
|
| 29094 |
- bpo-37863: Optimizations for Fraction.__hash__ suggested by Tim Peters. |
| 29095 |
|
| 29096 |
- bpo-21131: Fix ``faulthandler.register(chain=True)`` stack. faulthandler |
| 29097 |
now allocates a dedicated stack of ``SIGSTKSZ*2`` bytes, instead of just |
| 29098 |
``SIGSTKSZ`` bytes. Calling the previous signal handler in faulthandler |
| 29099 |
signal handler uses more than ``SIGSTKSZ`` bytes of stack memory on some |
| 29100 |
platforms. |
| 29101 |
|
| 29102 |
- bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() Patch by |
| 29103 |
Donghee Na |
| 29104 |
|
| 29105 |
- bpo-37804: Remove the deprecated method ``threading.Thread.isAlive()``. |
| 29106 |
Patch by Donghee Na. |
| 29107 |
|
| 29108 |
- bpo-37819: Add Fraction.as_integer_ratio() to match the corresponding |
| 29109 |
methods in bool, int, float, and decimal. |
| 29110 |
|
| 29111 |
- bpo-14465: Add an xml.etree.ElementTree.indent() function for |
| 29112 |
pretty-printing XML trees. Contributed by Stefan Behnel. |
| 29113 |
|
| 29114 |
- bpo-37810: Fix :mod:`difflib` ``?`` hint in diff output when dealing with |
| 29115 |
tabs. Patch by Anthony Sottile. |
| 29116 |
|
| 29117 |
- bpo-37772: In ``zipfile.Path``, when adding implicit dirs, ensure that |
| 29118 |
ancestral directories are added and that duplicates are excluded. |
| 29119 |
|
| 29120 |
- bpo-18578: Renamed and documented ``test.bytecode_helper`` as |
| 29121 |
``test.support.bytecode_helper``. Patch by Joannah Nanjekye. |
| 29122 |
|
| 29123 |
- bpo-37785: Fix xgettext warnings in :mod:`argparse`. |
| 29124 |
|
| 29125 |
- bpo-34488: :meth:`writelines` method of :class:`io.BytesIO` is now |
| 29126 |
slightly faster when many small lines are passed. Patch by Sergey |
| 29127 |
Fedoseev. |
| 29128 |
|
| 29129 |
- bpo-37449: ``ensurepip`` now uses ``importlib.resources.read_binary()`` to |
| 29130 |
read data instead of ``pkgutil.get_data()``. Patch by Joannah Nanjekye. |
| 29131 |
|
| 29132 |
- bpo-28292: Mark calendar.py helper functions as being private. The |
| 29133 |
follows PEP 8 guidance to maintain the style conventions in the module and |
| 29134 |
it addresses a known case of user confusion. |
| 29135 |
|
| 29136 |
- bpo-18049: Add definition of THREAD_STACK_SIZE for AIX in |
| 29137 |
Python/thread_pthread.h The default thread stacksize caused crashes with |
| 29138 |
the default recursion limit Patch by M Felt |
| 29139 |
|
| 29140 |
- bpo-37742: The logging.getLogger() API now returns the root logger when |
| 29141 |
passed the name 'root', whereas previously it returned a non-root logger |
| 29142 |
named 'root'. This could affect cases where user code explicitly wants a |
| 29143 |
non-root logger named 'root', or instantiates a logger using |
| 29144 |
logging.getLogger(__name__) in some top-level module called 'root.py'. |
| 29145 |
|
| 29146 |
- bpo-37738: Fix the implementation of curses ``addch(str, color_pair)``: |
| 29147 |
pass the color pair to ``setcchar()``, instead of always passing 0 as the |
| 29148 |
color pair. |
| 29149 |
|
| 29150 |
- bpo-37723: Fix performance regression on regular expression parsing with |
| 29151 |
huge character sets. Patch by Yann Vaginay. |
| 29152 |
|
| 29153 |
- bpo-35943: The function :c:func:`PyImport_GetModule` now ensures any |
| 29154 |
module it returns is fully initialized. Patch by Joannah Nanjekye. |
| 29155 |
|
| 29156 |
- bpo-32178: Fix IndexError in :mod:`email` package when trying to parse |
| 29157 |
invalid address fields starting with ``:``. |
| 29158 |
|
| 29159 |
- bpo-37268: The :mod:`parser` module is deprecated and will be removed in |
| 29160 |
future versions of Python. |
| 29161 |
|
| 29162 |
- bpo-11953: Completing WSA* error codes in :mod:`socket`. |
| 29163 |
|
| 29164 |
- bpo-37685: Fixed comparisons of :class:`datetime.timedelta` and |
| 29165 |
:class:`datetime.timezone`. |
| 29166 |
|
| 29167 |
- bpo-37697: Synchronize ``importlib.metadata`` with `importlib_metadata |
| 29168 |
0.19 |
| 29169 |
<https://gitlab.com/python-devs/importlib_metadata/-/milestones/20>`_, |
| 29170 |
improving handling of EGG-INFO files and fixing a crash when entry point |
| 29171 |
names contained colons. |
| 29172 |
|
| 29173 |
- bpo-37695: Correct :func:`curses.unget_wch` error message. Patch by |
| 29174 |
Anthony Sottile. |
| 29175 |
|
| 29176 |
- bpo-37689: Add :meth:`is_relative_to` in :class:`PurePath` to determine |
| 29177 |
whether or not one path is relative to another. |
| 29178 |
|
| 29179 |
- bpo-29553: Fixed :meth:`argparse.ArgumentParser.format_usage` for mutually |
| 29180 |
exclusive groups. Patch by Andrew Nester. |
| 29181 |
|
| 29182 |
- bpo-37691: Let math.dist() accept coordinates as sequences (or iterables) |
| 29183 |
rather than just tuples. |
| 29184 |
|
| 29185 |
- bpo-37685: Fixed ``__eq__``, ``__lt__`` etc implementations in some |
| 29186 |
classes. They now return :data:`NotImplemented` for unsupported type of |
| 29187 |
the other operand. This allows the other operand to play role (for example |
| 29188 |
the equality comparison with :data:`~unittest.mock.ANY` will return |
| 29189 |
``True``). |
| 29190 |
|
| 29191 |
- bpo-37354: Make Activate.ps1 Powershell script static to allow for signing |
| 29192 |
it. |
| 29193 |
|
| 29194 |
- bpo-37664: Update wheels bundled with ensurepip (pip 19.2.3 and setuptools |
| 29195 |
41.2.0) |
| 29196 |
|
| 29197 |
- bpo-37663: Bring consistency to venv shell activation scripts by always |
| 29198 |
using __VENV_PROMPT__. |
| 29199 |
|
| 29200 |
- bpo-37642: Allowed the pure Python implementation of |
| 29201 |
:class:`datetime.timezone` to represent sub-minute offsets close to |
| 29202 |
minimum and maximum boundaries, specifically in the ranges (23:59, 24:00) |
| 29203 |
and (-23:59, 24:00). Patch by Ngalim Siregar |
| 29204 |
|
| 29205 |
- bpo-36161: In :mod:`posix`, use ``ttyname_r`` instead of ``ttyname`` for |
| 29206 |
thread safety. |
| 29207 |
|
| 29208 |
- bpo-36324: Make internal attributes for statistics.NormalDist() private. |
| 29209 |
|
| 29210 |
- bpo-37555: Fix ``NonCallableMock._call_matcher`` returning tuple instead |
| 29211 |
of ``_Call`` object when ``self._spec_signature`` exists. Patch by |
| 29212 |
Elizabeth Uselton |
| 29213 |
|
| 29214 |
- bpo-29446: Make ``from tkinter import *`` import only the expected |
| 29215 |
objects. |
| 29216 |
|
| 29217 |
- bpo-16970: Adding a value error when an invalid value in passed to nargs |
| 29218 |
Patch by Robert Leenders |
| 29219 |
|
| 29220 |
- bpo-34443: Exceptions from :mod:`enum` now use the ``__qualname`` of the |
| 29221 |
enum class in the exception message instead of the ``__name__``. |
| 29222 |
|
| 29223 |
- bpo-37491: Fix ``IndexError`` when parsing email headers with unexpectedly |
| 29224 |
ending bare-quoted string value. Patch by Abhilash Raj. |
| 29225 |
|
| 29226 |
- bpo-37587: Make json.loads faster for long strings. (Patch by Marco |
| 29227 |
Paolini) |
| 29228 |
|
| 29229 |
- bpo-18378: Recognize "UTF-8" as a valid value for LC_CTYPE in |
| 29230 |
locale._parse_localename. |
| 29231 |
|
| 29232 |
- bpo-37579: Return :exc:`NotImplemented` in Python implementation of |
| 29233 |
``__eq__`` for :class:`~datetime.timedelta` and :class:`~datetime.time` |
| 29234 |
when the other object being compared is not of the same type to match C |
| 29235 |
implementation. Patch by Karthikeyan Singaravelan. |
| 29236 |
|
| 29237 |
- bpo-21478: Record calls to parent when autospecced object is attached to a |
| 29238 |
mock using :func:`unittest.mock.attach_mock`. Patch by Karthikeyan |
| 29239 |
Singaravelan. |
| 29240 |
|
| 29241 |
- bpo-37531: "python3 -m test -jN --timeout=TIMEOUT" now kills a worker |
| 29242 |
process if it runs longer than *TIMEOUT* seconds. |
| 29243 |
|
| 29244 |
- bpo-37482: Fix serialization of display name in originator or destination |
| 29245 |
address fields with both encoded words and special chars. |
| 29246 |
|
| 29247 |
- bpo-36993: Improve error reporting for corrupt zip files with bad zip64 |
| 29248 |
extra data. Patch by Daniel Hillier. |
| 29249 |
|
| 29250 |
- bpo-37502: pickle.loads() no longer raises TypeError when the buffers |
| 29251 |
argument is set to None |
| 29252 |
|
| 29253 |
- bpo-37520: Correct behavior for zipfile.Path.parent when the path object |
| 29254 |
identifies a subdirectory. |
| 29255 |
|
| 29256 |
- bpo-18374: Fix the ``.col_offset`` attribute of nested :class:`ast.BinOp` |
| 29257 |
instances which had a too large value in some situations. |
| 29258 |
|
| 29259 |
- bpo-37424: Fixes a possible hang when using a timeout on |
| 29260 |
``subprocess.run()`` while capturing output. If the child process spawned |
| 29261 |
its own children or otherwise connected its stdout or stderr handles with |
| 29262 |
another process, we could hang after the timeout was reached and our child |
| 29263 |
was killed when attempting to read final output from the pipes. |
| 29264 |
|
| 29265 |
- bpo-37421: Fix :func:`multiprocessing.util.get_temp_dir` finalizer: clear |
| 29266 |
also the 'tempdir' configuration of the current process, so next call to |
| 29267 |
``get_temp_dir()`` will create a new temporary directory, rather than |
| 29268 |
reusing the removed temporary directory. |
| 29269 |
|
| 29270 |
- bpo-37481: The distutils ``bdist_wininst`` command is deprecated in Python |
| 29271 |
3.8, use ``bdist_wheel`` (wheel packages) instead. |
| 29272 |
|
| 29273 |
- bpo-37479: When ``Enum.__str__`` is overridden in a derived class, the |
| 29274 |
override will be used by ``Enum.__format__`` regardless of whether mixin |
| 29275 |
classes are present. |
| 29276 |
|
| 29277 |
- bpo-37440: http.client now enables TLS 1.3 post-handshake authentication |
| 29278 |
for default context or if a cert_file is passed to HTTPSConnection. |
| 29279 |
|
| 29280 |
- bpo-37437: Update vendorized expat version to 2.2.7. |
| 29281 |
|
| 29282 |
- bpo-37428: SSLContext.post_handshake_auth = True no longer sets |
| 29283 |
SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the |
| 29284 |
option is documented as ignored for clients, OpenSSL implicitly enables |
| 29285 |
cert chain validation when the flag is set. |
| 29286 |
|
| 29287 |
- bpo-37420: :func:`os.sched_setaffinity` now correctly handles errors that |
| 29288 |
arise during iteration over its ``mask`` argument. Patch by Brandt Bucher. |
| 29289 |
|
| 29290 |
- bpo-37412: The :func:`os.getcwdb` function now uses the UTF-8 encoding on |
| 29291 |
Windows, rather than the ANSI code page: see :pep:`529` for the rationale. |
| 29292 |
The function is no longer deprecated on Windows. |
| 29293 |
|
| 29294 |
- bpo-37406: The sqlite3 module now raises TypeError, rather than |
| 29295 |
ValueError, if operation argument type is not str: execute(), |
| 29296 |
executemany() and calling a connection. |
| 29297 |
|
| 29298 |
- bpo-29412: Fix IndexError in parsing a header value ending unexpectedly. |
| 29299 |
Patch by Abhilash Raj. |
| 29300 |
|
| 29301 |
- bpo-36546: The *dist* argument for statistics.quantiles() is now |
| 29302 |
positional only. The current name doesn't reflect that the argument can be |
| 29303 |
either a dataset or a distribution. Marking the parameter as positional |
| 29304 |
avoids confusion and makes it possible to change the name later. |
| 29305 |
|
| 29306 |
- bpo-37394: Fix a bug that was causing the :mod:`queue` module to fail if |
| 29307 |
the accelerator module was not available. Patch by Pablo Galindo. |
| 29308 |
|
| 29309 |
- bpo-37376: :mod:`pprint` now has support for |
| 29310 |
:class:`types.SimpleNamespace`. Patch by Carl Bordum Hansen. |
| 29311 |
|
| 29312 |
- bpo-26967: An :class:`~argparse.ArgumentParser` with |
| 29313 |
``allow_abbrev=False`` no longer disables grouping of short flags, such as |
| 29314 |
``-vv``, but only disables abbreviation of long flags as documented. Patch |
| 29315 |
by Zac Hatfield-Dodds. |
| 29316 |
|
| 29317 |
- bpo-37212: :func:`unittest.mock.call` now preserves the order of keyword |
| 29318 |
arguments in repr output. Patch by Karthikeyan Singaravelan. |
| 29319 |
|
| 29320 |
- bpo-37372: Fix error unpickling datetime.time objects from Python 2 with |
| 29321 |
seconds>=24. Patch by Justin Blanchard. |
| 29322 |
|
| 29323 |
- bpo-37345: Add formal support for UDPLITE sockets. Support was present |
| 29324 |
before, but it is now easier to detect support with ``hasattr(socket, |
| 29325 |
'IPPROTO_UDPLITE')`` and there are constants defined for each of the |
| 29326 |
values needed: ``socket.IPPROTO_UDPLITE``, ``UDPLITE_SEND_CSCOV``, and |
| 29327 |
``UDPLITE_RECV_CSCOV``. Patch by Gabe Appleton. |
| 29328 |
|
| 29329 |
- bpo-37358: Optimized ``functools.partial`` by using vectorcall. |
| 29330 |
|
| 29331 |
- bpo-37347: :meth:`sqlite3.Connection.create_aggregate`, |
| 29332 |
:meth:`sqlite3.Connection.create_function`, |
| 29333 |
:meth:`sqlite3.Connection.set_authorizer`, |
| 29334 |
:meth:`sqlite3.Connection.set_progress_handler` |
| 29335 |
:meth:`sqlite3.Connection.set_trace_callback` methods lead to segfaults if |
| 29336 |
some of these methods are called twice with an equal object but not the |
| 29337 |
same. Now callbacks are stored more carefully. Patch by Aleksandr Balezin. |
| 29338 |
|
| 29339 |
- bpo-37163: The *obj* argument of :func:`dataclasses.replace` is |
| 29340 |
positional-only now. |
| 29341 |
|
| 29342 |
- bpo-37085: Add the optional Linux SocketCAN Broadcast Manager constants, |
| 29343 |
used as flags to configure the BCM behaviour, in the socket module. Patch |
| 29344 |
by Karl Ding. |
| 29345 |
|
| 29346 |
- bpo-37328: ``HTMLParser.unescape`` is removed. It was undocumented and |
| 29347 |
deprecated since Python 3.4. |
| 29348 |
|
| 29349 |
- bpo-37305: Add .webmanifest -> application/manifest+json to list of |
| 29350 |
recognized file types and content type headers |
| 29351 |
|
| 29352 |
- bpo-37320: ``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` |
| 29353 |
alias to ``sunau.open()``, and ``wave.openfp()`` alias to ``wave.open()`` |
| 29354 |
have been removed. They were deprecated since Python 3.7. |
| 29355 |
|
| 29356 |
- bpo-37315: Deprecated accepting floats with integral value (like ``5.0``) |
| 29357 |
in :func:`math.factorial`. |
| 29358 |
|
| 29359 |
- bpo-37312: ``_dummy_thread`` and ``dummy_threading`` modules have been |
| 29360 |
removed. These modules were deprecated since Python 3.7 which requires |
| 29361 |
threading support. |
| 29362 |
|
| 29363 |
- bpo-33972: Email with single part but content-type set to ``multipart/*`` |
| 29364 |
doesn't raise AttributeError anymore. |
| 29365 |
|
| 29366 |
- bpo-37280: Use threadpool for reading from file for sendfile fallback |
| 29367 |
mode. |
| 29368 |
|
| 29369 |
- bpo-37279: Fix asyncio sendfile support when sendfile sends extra data in |
| 29370 |
fallback mode. |
| 29371 |
|
| 29372 |
- bpo-19865: :func:`ctypes.create_unicode_buffer` now also supports non-BMP |
| 29373 |
characters on platforms with 16-bit :c:type:`wchar_t` (for example, |
| 29374 |
Windows and AIX). |
| 29375 |
|
| 29376 |
- bpo-37266: In a subinterpreter, spawning a daemon thread now raises an |
| 29377 |
exception. Daemon threads were never supported in subinterpreters. |
| 29378 |
Previously, the subinterpreter finalization crashed with a Python fatal |
| 29379 |
error if a daemon thread was still running. |
| 29380 |
|
| 29381 |
- bpo-37210: Allow pure Python implementation of :mod:`pickle` to work even |
| 29382 |
when the C :mod:`!_pickle` module is unavailable. |
| 29383 |
|
| 29384 |
- bpo-21872: Fix :mod:`lzma`: module decompresses data incompletely. When |
| 29385 |
decompressing a FORMAT_ALONE format file, and it doesn't have the end |
| 29386 |
marker, sometimes the last one to dozens bytes can't be output. Patch by |
| 29387 |
Ma Lin. |
| 29388 |
|
| 29389 |
- bpo-35922: Fix :meth:`RobotFileParser.crawl_delay` and |
| 29390 |
:meth:`RobotFileParser.request_rate` to return ``None`` rather than raise |
| 29391 |
:exc:`AttributeError` when no relevant rule is defined in the robots.txt |
| 29392 |
file. Patch by Rémi Lapeyre. |
| 29393 |
|
| 29394 |
- bpo-35766: Change the format of feature_version to be a (major, minor) |
| 29395 |
tuple. |
| 29396 |
|
| 29397 |
- bpo-36607: Eliminate :exc:`RuntimeError` raised by |
| 29398 |
:func:`asyncio.all_tasks` if internal tasks weak set is changed by another |
| 29399 |
thread during iteration. |
| 29400 |
|
| 29401 |
- bpo-18748: :class:`!_pyio.IOBase` destructor now does nothing if getting |
| 29402 |
the ``closed`` attribute fails to better mimic :class:`!_io.IOBase` |
| 29403 |
finalizer. |
| 29404 |
|
| 29405 |
- bpo-36402: Fix a race condition at Python shutdown when waiting for |
| 29406 |
threads. Wait until the Python thread state of all non-daemon threads get |
| 29407 |
deleted (join all non-daemon threads), rather than just wait until |
| 29408 |
non-daemon Python threads complete. |
| 29409 |
|
| 29410 |
- bpo-37206: Default values which cannot be represented as Python objects no |
| 29411 |
longer improperly represented as ``None`` in function signatures. |
| 29412 |
|
| 29413 |
- bpo-37111: Added ``encoding`` and ``errors`` keyword parameters to |
| 29414 |
``logging.basicConfig``. |
| 29415 |
|
| 29416 |
- bpo-12144: Ensure cookies with ``expires`` attribute are handled in |
| 29417 |
:meth:`CookieJar.make_cookies`. |
| 29418 |
|
| 29419 |
- bpo-34886: Fix an unintended ValueError from :func:`subprocess.run` when |
| 29420 |
checking for conflicting *input* and *stdin* or *capture_output* and |
| 29421 |
*stdout* or *stderr* args when they were explicitly provided but with |
| 29422 |
``None`` values within a passed in ``**kwargs`` dict rather than as passed |
| 29423 |
directly by name. Patch contributed by Rémi Lapeyre. |
| 29424 |
|
| 29425 |
- bpo-37173: The exception message for ``inspect.getfile()`` now correctly |
| 29426 |
reports the passed class rather than the builtins module. |
| 29427 |
|
| 29428 |
- bpo-37178: Give math.perm() a one argument form that means the same as |
| 29429 |
math.factorial(). |
| 29430 |
|
| 29431 |
- bpo-37178: For math.perm(n, k), let k default to n, giving the same result |
| 29432 |
as factorial. |
| 29433 |
|
| 29434 |
- bpo-37165: Converted _collections._count_elements to use the Argument |
| 29435 |
Clinic. |
| 29436 |
|
| 29437 |
- bpo-34767: Do not always create a :class:`collections.deque` in |
| 29438 |
:class:`asyncio.Lock`. |
| 29439 |
|
| 29440 |
- bpo-37158: Speed-up statistics.fmean() by switching from a function to a |
| 29441 |
generator. |
| 29442 |
|
| 29443 |
- bpo-34282: Remove ``Enum._convert`` method, deprecated in 3.8. |
| 29444 |
|
| 29445 |
- bpo-37150: ``argparse._ActionsContainer.add_argument`` now throws error, |
| 29446 |
if someone accidentally pass FileType class object instead of instance of |
| 29447 |
FileType as ``type`` argument. |
| 29448 |
|
| 29449 |
- bpo-28724: The socket module now has the :func:`socket.send_fds` and |
| 29450 |
:func:`socket.recv.fds` methods. Contributed by Joannah Nanjekye, Shinya |
| 29451 |
Okano and Victor Stinner. |
| 29452 |
|
| 29453 |
- bpo-35621: Support running asyncio subprocesses when execution event loop |
| 29454 |
in a thread on UNIX. |
| 29455 |
|
| 29456 |
- bpo-36520: Lengthy email headers with UTF-8 characters are now properly |
| 29457 |
encoded when they are folded. Patch by Jeffrey Kintscher. |
| 29458 |
|
| 29459 |
- bpo-30835: Fixed a bug in email parsing where a message with invalid bytes |
| 29460 |
in content-transfer-encoding of a multipart message can cause an |
| 29461 |
AttributeError. Patch by Andrew Donnellan. |
| 29462 |
|
| 29463 |
- bpo-31163: pathlib.Path instance's rename and replace methods now return |
| 29464 |
the new Path instance. |
| 29465 |
|
| 29466 |
- bpo-25068: :class:`urllib.request.ProxyHandler` now lowercases the keys of |
| 29467 |
the passed dictionary. |
| 29468 |
|
| 29469 |
- bpo-26185: Fix :func:`repr` on empty :class:`ZipInfo` object. Patch by |
| 29470 |
Mickaël Schoentgen. |
| 29471 |
|
| 29472 |
- bpo-21315: Email headers containing RFC2047 encoded words are parsed |
| 29473 |
despite the missing whitespace, and a defect registered. Also missing |
| 29474 |
trailing whitespace after encoded words is now registered as a defect. |
| 29475 |
|
| 29476 |
- bpo-31904: Port test_datetime to VxWorks: skip zoneinfo tests on VxWorks |
| 29477 |
|
| 29478 |
- bpo-35805: Add parser for Message-ID header and add it to default |
| 29479 |
HeaderRegistry. This should prevent folding of Message-ID using RFC 2048 |
| 29480 |
encoded words. |
| 29481 |
|
| 29482 |
- bpo-36871: Ensure method signature is used instead of constructor |
| 29483 |
signature of a class while asserting mock object against method calls. |
| 29484 |
Patch by Karthikeyan Singaravelan. |
| 29485 |
|
| 29486 |
- bpo-35070: posix.getgrouplist() now works correctly when the user belongs |
| 29487 |
to NGROUPS_MAX supplemental groups. Patch by Jeffrey Kintscher. |
| 29488 |
|
| 29489 |
- bpo-31783: Fix race condition in ThreadPoolExecutor when worker threads |
| 29490 |
are created during interpreter shutdown. |
| 29491 |
|
| 29492 |
- bpo-36582: Fix ``UserString.encode()`` to correctly return ``bytes`` |
| 29493 |
rather than a ``UserString`` instance. |
| 29494 |
|
| 29495 |
- bpo-32424: Deprecate xml.etree.ElementTree.Element.copy() in favor of |
| 29496 |
copy.copy(). |
| 29497 |
|
| 29498 |
Patch by Gordon P. Hemsley |
| 29499 |
|
| 29500 |
- bpo-36564: Fix infinite loop in email header folding logic that would be |
| 29501 |
triggered when an email policy's max_line_length is not long enough to |
| 29502 |
include the required markup and any values in the message. Patch by Paul |
| 29503 |
Ganssle |
| 29504 |
|
| 29505 |
- bpo-36543: Removed methods Element.getchildren(), Element.getiterator() |
| 29506 |
and ElementTree.getiterator() and the xml.etree.cElementTree module. |
| 29507 |
|
| 29508 |
- bpo-36409: Remove the old plistlib API deprecated in Python 3.4 |
| 29509 |
|
| 29510 |
- bpo-36302: distutils sorts source file lists so that Extension .so files |
| 29511 |
build more reproducibly by default |
| 29512 |
|
| 29513 |
- bpo-36250: Ignore ``ValueError`` from ``signal`` with ``interaction`` in |
| 29514 |
non-main thread. |
| 29515 |
|
| 29516 |
- bpo-36046: Added ``user``, ``group`` and ``extra_groups`` parameters to |
| 29517 |
the subprocess.Popen constructor. Patch by Patrick McLean. |
| 29518 |
|
| 29519 |
- bpo-32627: Fix compile error when ``_uuid`` headers conflicting included. |
| 29520 |
|
| 29521 |
- bpo-35800: Deprecate ``smtpd.MailmanProxy`` ready for future removal. |
| 29522 |
|
| 29523 |
- bpo-35168: :attr:`shlex.shlex.punctuation_chars` is now a read-only |
| 29524 |
property. |
| 29525 |
|
| 29526 |
- bpo-8538: Add support for boolean actions like ``--foo`` and ``--no-foo`` |
| 29527 |
to argparse. Patch contributed by Rémi Lapeyre. |
| 29528 |
|
| 29529 |
- bpo-20504: Fixes a bug in :mod:`!cgi` module when a multipart/form-data |
| 29530 |
request has no ``Content-Length`` header. |
| 29531 |
|
| 29532 |
- bpo-25988: The abstract base classes in :mod:`collections.abc` no longer |
| 29533 |
are exposed in the regular :mod:`collections` module. |
| 29534 |
|
| 29535 |
- bpo-11122: Distutils won't check for rpmbuild in specified paths only. |
| 29536 |
|
| 29537 |
- bpo-34775: Division handling of PurePath now returns NotImplemented |
| 29538 |
instead of raising a TypeError when passed something other than an |
| 29539 |
instance of str or PurePath. Patch by Roger Aiudi. |
| 29540 |
|
| 29541 |
- bpo-34749: :func:`binascii.a2b_base64` is now up to 2 times faster. Patch |
| 29542 |
by Sergey Fedoseev. |
| 29543 |
|
| 29544 |
- bpo-34519: Add additional aliases for HP Roman 8. Patch by Michael Osipov. |
| 29545 |
|
| 29546 |
- bpo-28009: Fix uuid.getnode() on platforms with '.' as MAC Addr delimiter |
| 29547 |
as well fix for MAC Addr format that omits a leading 0 in MAC Addr values. |
| 29548 |
Currently, AIX is the only know platform with these settings. Patch by |
| 29549 |
Michael Felt. |
| 29550 |
|
| 29551 |
- bpo-30618: Add :meth:`~pathlib.Path.readlink`. Patch by Girts Folkmanis. |
| 29552 |
|
| 29553 |
- bpo-32498: Made :func:`urllib.parse.unquote` accept bytes in addition to |
| 29554 |
strings. Patch by Stein Karlsen. |
| 29555 |
|
| 29556 |
- bpo-33348: lib2to3 now recognizes expressions after ``*`` and ``**`` like |
| 29557 |
in ``f(*[] or [])``. |
| 29558 |
|
| 29559 |
- bpo-32689: Update :func:`shutil.move` function to allow for Path objects |
| 29560 |
to be used as source argument. Patch by Emily Morehouse and Maxwell |
| 29561 |
"5.13b" McKinnon. |
| 29562 |
|
| 29563 |
- bpo-32820: Added ``__format__`` to IPv4 and IPv6 classes. Always outputs |
| 29564 |
a fully zero-padded string. Supports b/x/n modifiers (bin/hex/native |
| 29565 |
format). Native format for IPv4 is bin, native format for IPv6 is hex. |
| 29566 |
Also supports '#' and '_' modifiers. |
| 29567 |
|
| 29568 |
- bpo-27657: Fix urllib.parse.urlparse() with numeric paths. A string like |
| 29569 |
"path:80" is no longer parsed as a path but as a scheme ("path") and a |
| 29570 |
path ("80"). |
| 29571 |
|
| 29572 |
- bpo-4963: Fixed non-deterministic behavior related to mimetypes extension |
| 29573 |
mapping and module reinitialization. |
| 29574 |
|
| 29575 |
Documentation |
| 29576 |
------------- |
| 29577 |
|
| 29578 |
- bpo-21767: Explicitly mention abc support in functools.singledispatch |
| 29579 |
|
| 29580 |
- bpo-38816: Provides more details about the interaction between |
| 29581 |
:c:func:`fork` and CPython's runtime, focusing just on the C-API. This |
| 29582 |
includes cautions about where :c:func:`fork` should and shouldn't be |
| 29583 |
called. |
| 29584 |
|
| 29585 |
- bpo-38351: Modernize :mod:`email` examples from %-formatting to f-strings. |
| 29586 |
|
| 29587 |
- bpo-38778: Document the fact that :exc:`RuntimeError` is raised if |
| 29588 |
:meth:`os.fork` is called in a subinterpreter. |
| 29589 |
|
| 29590 |
- bpo-38592: Add Brazilian Portuguese to the language switcher at Python |
| 29591 |
Documentation website. |
| 29592 |
|
| 29593 |
- bpo-38294: Add list of no-longer-escaped chars to re.escape documentation |
| 29594 |
|
| 29595 |
- bpo-38053: Modernized the plistlib documentation |
| 29596 |
|
| 29597 |
- bpo-26868: Fix example usage of :c:func:`PyModule_AddObject` to properly |
| 29598 |
handle errors. |
| 29599 |
|
| 29600 |
- bpo-36797: Fix a dead link in the distutils API Reference. |
| 29601 |
|
| 29602 |
- bpo-37977: Warn more strongly and clearly about pickle insecurity |
| 29603 |
|
| 29604 |
- bpo-37979: Added a link to dateutil.parser.isoparse in the |
| 29605 |
datetime.fromisoformat documentation. Patch by Paul Ganssle |
| 29606 |
|
| 29607 |
- bpo-12707: Deprecate info(), geturl(), getcode() methods in favor of the |
| 29608 |
headers, url, and status properties, respectively, for HTTPResponse and |
| 29609 |
addinfourl. Also deprecate the code attribute of addinfourl in favor of |
| 29610 |
the status attribute. Patch by Ashwin Ramaswami |
| 29611 |
|
| 29612 |
- bpo-37937: Mention ``frame.f_trace`` in :func:`sys.settrace` docs. |
| 29613 |
|
| 29614 |
- bpo-37878: Make :c:func:`PyThreadState_DeleteCurrent` Internal. |
| 29615 |
|
| 29616 |
- bpo-37759: Beginning edits to Whatsnew 3.8 |
| 29617 |
|
| 29618 |
- bpo-37726: Stop recommending getopt in the tutorial for command line |
| 29619 |
argument parsing and promote argparse. |
| 29620 |
|
| 29621 |
- bpo-32910: Remove implementation-specific behaviour of how venv's |
| 29622 |
Deactivate works. |
| 29623 |
|
| 29624 |
- bpo-37256: Fix wording of arguments for :class:`Request` in |
| 29625 |
:mod:`urllib.request` |
| 29626 |
|
| 29627 |
- bpo-37284: Add a brief note to indicate that any new |
| 29628 |
``sys.implementation`` required attributes must go through the PEP |
| 29629 |
process. |
| 29630 |
|
| 29631 |
- bpo-30088: Documented that :class:`mailbox.Maildir` constructor doesn't |
| 29632 |
attempt to verify the maildir folder layout correctness. Patch by |
| 29633 |
Sviatoslav Sydorenko. |
| 29634 |
|
| 29635 |
- bpo-37521: Fix ``importlib`` examples to insert any newly created modules |
| 29636 |
via importlib.util.module_from_spec() immediately into sys.modules instead |
| 29637 |
of after calling loader.exec_module(). |
| 29638 |
|
| 29639 |
Thanks to Benjamin Mintz for finding the bug. |
| 29640 |
|
| 29641 |
- bpo-37456: Slash ('/') is now part of syntax. |
| 29642 |
|
| 29643 |
- bpo-37487: Fix PyList_GetItem index description to include 0. |
| 29644 |
|
| 29645 |
- bpo-37149: Replace the dead link to the Tkinter 8.5 reference by John |
| 29646 |
Shipman, New Mexico Tech, with a link to the archive.org copy. |
| 29647 |
|
| 29648 |
- bpo-37478: Added possible exceptions to the description of os.chdir(). |
| 29649 |
|
| 29650 |
- bpo-34903: Documented that in :meth:`datetime.datetime.strptime`, the |
| 29651 |
leading zero in some two-digit formats is optional. Patch by Mike Gleen. |
| 29652 |
|
| 29653 |
- bpo-36260: Add decompression pitfalls to zipfile module documentation. |
| 29654 |
|
| 29655 |
- bpo-37004: In the documentation for difflib, a note was added explicitly |
| 29656 |
warning that the results of SequenceMatcher's ratio method may depend on |
| 29657 |
the order of the input strings. |
| 29658 |
|
| 29659 |
- bpo-36960: Restructured the :mod:`datetime` docs in the interest of making |
| 29660 |
them more user-friendly and improving readability. Patch by Brad Solomon. |
| 29661 |
|
| 29662 |
- bpo-36487: Make C-API docs clear about what the "main" interpreter is. |
| 29663 |
|
| 29664 |
- bpo-23460: The documentation for decimal string formatting using the |
| 29665 |
``:g`` specifier has been updated to reflect the correct exponential |
| 29666 |
notation cutoff point. Original patch contributed by Tuomas Suutari. |
| 29667 |
|
| 29668 |
- bpo-35803: Document and test that ``tempfile`` functions may accept a |
| 29669 |
:term:`path-like object` for the ``dir`` argument. Patch by Anthony |
| 29670 |
Sottile. |
| 29671 |
|
| 29672 |
- bpo-33944: Added a note about the intended use of code in .pth files. |
| 29673 |
|
| 29674 |
- bpo-34293: Fix the Doc/Makefile regarding PAPER environment variable and |
| 29675 |
PDF builds |
| 29676 |
|
| 29677 |
- bpo-25237: Add documentation for tkinter modules |
| 29678 |
|
| 29679 |
Tests |
| 29680 |
----- |
| 29681 |
|
| 29682 |
- bpo-38614: Fix test_communicate() of test_asyncio.test_subprocess: use |
| 29683 |
``support.LONG_TIMEOUT`` (5 minutes), instead of just 1 minute. |
| 29684 |
|
| 29685 |
- bpo-38614: Add timeout constants to :mod:`test.support`: |
| 29686 |
:data:`~test.support.LOOPBACK_TIMEOUT`, |
| 29687 |
:data:`~test.support.INTERNET_TIMEOUT`, |
| 29688 |
:data:`~test.support.SHORT_TIMEOUT` and |
| 29689 |
:data:`~test.support.LONG_TIMEOUT`. |
| 29690 |
|
| 29691 |
- bpo-38502: test.regrtest now uses process groups in the multiprocessing |
| 29692 |
mode (-jN command line option) if process groups are available: if |
| 29693 |
:func:`os.setsid` and :func:`os.killpg` functions are available. |
| 29694 |
|
| 29695 |
- bpo-35998: Fix a race condition in test_asyncio.test_start_tls_server_1(). |
| 29696 |
Previously, there was a race condition between the test main() function |
| 29697 |
which replaces the protocol and the test ServerProto protocol which sends |
| 29698 |
ANSWER once it gets HELLO. Now, only the test main() function is |
| 29699 |
responsible to send data, ServerProto no longer sends data. |
| 29700 |
|
| 29701 |
- bpo-38470: Fix ``test_compileall.test_compile_dir_maxlevels()`` on Windows |
| 29702 |
without long path support: only create 3 subdirectories instead of between |
| 29703 |
20 and 100 subdirectories. |
| 29704 |
|
| 29705 |
- bpo-37531: On timeout, regrtest no longer attempts to call |
| 29706 |
``popen.communicate()`` again: it can hang until all child processes using |
| 29707 |
stdout and stderr pipes completes. Kill the worker process and ignores its |
| 29708 |
output. Change also the faulthandler timeout of the main process from 1 |
| 29709 |
minute to 5 minutes, for Python slowest buildbots. |
| 29710 |
|
| 29711 |
- bpo-38239: Fix test_gdb for Link Time Optimization (LTO) builds. |
| 29712 |
|
| 29713 |
- bpo-38275: test_ssl now handles disabled TLS/SSL versions better. |
| 29714 |
OpenSSL's crypto policy and run-time settings are recognized and tests for |
| 29715 |
disabled versions are skipped. Tests also accept more TLS minimum_versions |
| 29716 |
for platforms that override OpenSSL's default with strict settings. |
| 29717 |
|
| 29718 |
- bpo-38271: The private keys for test_ssl were encrypted with 3DES in |
| 29719 |
traditional PKCS#5 format. 3DES and the digest algorithm of PKCS#5 are |
| 29720 |
blocked by some strict crypto policies. Use PKCS#8 format with AES256 |
| 29721 |
encryption instead. |
| 29722 |
|
| 29723 |
- bpo-38270: test.support now has a helper function to check for |
| 29724 |
availability of a hash digest function. Several tests are refactored avoid |
| 29725 |
MD5 and use SHA256 instead. Other tests are marked to use MD5 and skipped |
| 29726 |
when MD5 is disabled. |
| 29727 |
|
| 29728 |
- bpo-37123: Multiprocessing test test_mymanager() now also expects |
| 29729 |
-SIGTERM, not only exitcode 0. BaseManager._finalize_manager() sends |
| 29730 |
SIGTERM to the manager process if it takes longer than 1 second to stop, |
| 29731 |
which happens on slow buildbots. |
| 29732 |
|
| 29733 |
- bpo-38212: Multiprocessing tests: increase |
| 29734 |
test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds. |
| 29735 |
|
| 29736 |
- bpo-38117: Test with OpenSSL 1.1.1d |
| 29737 |
|
| 29738 |
- bpo-38018: Increase code coverage for multiprocessing.shared_memory. |
| 29739 |
|
| 29740 |
- bpo-37805: Add tests for json.dump(..., skipkeys=True). Patch by Donghee |
| 29741 |
Na. |
| 29742 |
|
| 29743 |
- bpo-37531: Enhance regrtest multiprocess timeout: write a message when |
| 29744 |
killing a worker process, catch popen.kill() and popen.wait() exceptions, |
| 29745 |
put a timeout on the second call to popen.communicate(). |
| 29746 |
|
| 29747 |
- bpo-37876: Add tests for ROT-13 codec. |
| 29748 |
|
| 29749 |
- bpo-36833: Added tests for :samp:`PyDateTime_{xxx}_GET_{xxx}()` macros of |
| 29750 |
the C API of the :mod:`datetime` module. Patch by Joannah Nanjekye. |
| 29751 |
|
| 29752 |
- bpo-37558: Fix test_shared_memory_cleaned_after_process_termination name |
| 29753 |
handling |
| 29754 |
|
| 29755 |
- bpo-37526: Add :func:`test.support.catch_threading_exception`: context |
| 29756 |
manager catching :class:`threading.Thread` exception using |
| 29757 |
:func:`threading.excepthook`. |
| 29758 |
|
| 29759 |
- bpo-37421: test_concurrent_futures now explicitly stops the ForkServer |
| 29760 |
instance if it's running. |
| 29761 |
|
| 29762 |
- bpo-37421: multiprocessing tests now stop the ForkServer instance if it's |
| 29763 |
running: close the "alive" file descriptor to ask the server to stop and |
| 29764 |
then remove its UNIX address. |
| 29765 |
|
| 29766 |
- bpo-37421: test_distutils.test_build_ext() is now able to remove the |
| 29767 |
temporary directory on Windows: don't import the newly built C extension |
| 29768 |
("xx") in the current process, but test it in a separated process. |
| 29769 |
|
| 29770 |
- bpo-37421: test_concurrent_futures now cleans up multiprocessing to remove |
| 29771 |
immediately temporary directories created by |
| 29772 |
multiprocessing.util.get_temp_dir(). |
| 29773 |
|
| 29774 |
- bpo-37421: test_winconsoleio doesn't leak a temporary file anymore: use |
| 29775 |
tempfile.TemporaryFile() to remove it when the test completes. |
| 29776 |
|
| 29777 |
- bpo-37421: multiprocessing tests now explicitly call ``_run_finalizers()`` |
| 29778 |
to immediately remove temporary directories created by tests. |
| 29779 |
|
| 29780 |
- bpo-37421: urllib.request tests now call |
| 29781 |
:func:`~urllib.request.urlcleanup` to remove temporary files created by |
| 29782 |
``urlretrieve()`` tests and to clear the ``_opener`` global variable set |
| 29783 |
by ``urlopen()`` and functions calling indirectly ``urlopen()``. |
| 29784 |
|
| 29785 |
- bpo-37472: Remove ``Lib/test/outstanding_bugs.py``. |
| 29786 |
|
| 29787 |
- bpo-37199: Fix test failures when IPv6 is unavailable or disabled. |
| 29788 |
|
| 29789 |
- bpo-19696: Replace deprecated method "random.choose" with "random.choice" |
| 29790 |
in "test_pkg_import.py". |
| 29791 |
|
| 29792 |
- bpo-37335: Remove no longer necessary code from c locale coercion tests |
| 29793 |
|
| 29794 |
- bpo-37421: Fix test_shutil to no longer leak temporary files. |
| 29795 |
|
| 29796 |
- bpo-37411: Fix test_wsgiref.testEnviron() to no longer depend on the |
| 29797 |
environment variables (don't fail if "X" variable is set). |
| 29798 |
|
| 29799 |
- bpo-37400: Fix test_os.test_chown(): use os.getgroups() rather than |
| 29800 |
grp.getgrall() to get groups. Rename also the test to test_chown_gid(). |
| 29801 |
|
| 29802 |
- bpo-37359: Add --cleanup option to python3 -m test to remove |
| 29803 |
``test_python_*`` directories of previous failed jobs. Add "make |
| 29804 |
cleantest" to run ``python3 -m test --cleanup``. |
| 29805 |
|
| 29806 |
- bpo-37362: test_gdb no longer fails if it gets an "unexpected" message on |
| 29807 |
stderr: it now ignores stderr. The purpose of test_gdb is to test that |
| 29808 |
python-gdb.py commands work as expected, not to test gdb. |
| 29809 |
|
| 29810 |
- bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() |
| 29811 |
|
| 29812 |
- bpo-37278: Fix test_asyncio ProactorLoopCtrlC: join the thread to prevent |
| 29813 |
leaking a running thread and leaking a reference. |
| 29814 |
|
| 29815 |
- bpo-37261: Fix :func:`test.support.catch_unraisable_exception`: its |
| 29816 |
__exit__() method now ignores unraisable exception raised when clearing |
| 29817 |
its ``unraisable`` attribute. |
| 29818 |
|
| 29819 |
- bpo-37069: regrtest now uses :func:`sys.unraisablehook` to mark a test as |
| 29820 |
"environment altered" (ENV_CHANGED) if it emits an "unraisable exception". |
| 29821 |
Moreover, regrtest logs a warning in this case. |
| 29822 |
|
| 29823 |
Use ``python3 -m test --fail-env-changed`` to catch unraisable exceptions |
| 29824 |
in tests. |
| 29825 |
|
| 29826 |
- bpo-37252: Fix assertions in ``test_close`` and |
| 29827 |
``test_events_mask_overflow`` devpoll tests. |
| 29828 |
|
| 29829 |
- bpo-37169: Rewrite ``_PyObject_IsFreed()`` unit tests. |
| 29830 |
|
| 29831 |
- bpo-37153: ``test_venv.test_multiprocessing()`` now explicitly calls |
| 29832 |
``pool.terminate()`` to wait until the pool completes. |
| 29833 |
|
| 29834 |
- bpo-34001: Make test_ssl pass with LibreSSL. LibreSSL handles minimum and |
| 29835 |
maximum TLS version differently than OpenSSL. |
| 29836 |
|
| 29837 |
- bpo-36919: Make ``test_source_encoding.test_issue2301`` implementation |
| 29838 |
independent. The test will work now for both CPython and IronPython. |
| 29839 |
|
| 29840 |
- bpo-30202: Update ``test.test_importlib.test_abc`` to test |
| 29841 |
``find_spec()``. |
| 29842 |
|
| 29843 |
- bpo-28009: Modify the test_uuid logic to test when a program is available |
| 29844 |
AND can be used to obtain a MACADDR as basis for an UUID. Patch by M. Felt |
| 29845 |
|
| 29846 |
- bpo-34596: Fallback to a default reason when :func:`unittest.skip` is |
| 29847 |
uncalled. Patch by Naitree Zhu. |
| 29848 |
|
| 29849 |
Build |
| 29850 |
----- |
| 29851 |
|
| 29852 |
- bpo-38809: On Windows, build scripts will now recognize and use python.exe |
| 29853 |
from an active virtual env. |
| 29854 |
|
| 29855 |
- bpo-38684: Fix _hashlib build when Blake2 is disabled, but OpenSSL |
| 29856 |
supports it. |
| 29857 |
|
| 29858 |
- bpo-38468: Misc/python-config.in now uses ``getvar()`` for all still |
| 29859 |
existing ``sysconfig.get_config_var()`` calls. Patch by Joannah Nanjekye. |
| 29860 |
|
| 29861 |
- bpo-37415: Fix stdatomic.h header check for ICC compiler: the ICC |
| 29862 |
implementation lacks atomic_uintptr_t type which is needed by Python. |
| 29863 |
|
| 29864 |
- bpo-38301: In Solaris family, we must be sure to use ``-D_REENTRANT``. |
| 29865 |
Patch by Jesús Cea Avión. |
| 29866 |
|
| 29867 |
- bpo-36002: Locate ``llvm-profdata`` and ``llvm-ar`` binaries using |
| 29868 |
``AC_PATH_TOOL`` rather than ``AC_PATH_TARGET_TOOL``. |
| 29869 |
|
| 29870 |
- bpo-37936: The :file:`.gitignore` file systematically keeps "rooted", with |
| 29871 |
a non-trailing slash, all the rules that are meant to apply to files in a |
| 29872 |
specific place in the repo. Previously, when the intended file to ignore |
| 29873 |
happened to be at the root of the repo, we'd most often accidentally also |
| 29874 |
ignore files and directories with the same name anywhere in the tree. |
| 29875 |
|
| 29876 |
- bpo-37760: The :file:`Tools/unicode/makeunicodedata.py` script, which is |
| 29877 |
used for converting information from the Unicode Character Database into |
| 29878 |
generated code and data used by the methods of :class:`str` and by the |
| 29879 |
:mod:`unicodedata` module, now handles each character's data as a |
| 29880 |
``dataclass`` with named attributes, rather than a length-18 list of |
| 29881 |
different fields. |
| 29882 |
|
| 29883 |
- bpo-37936: The :file:`.gitignore` file no longer applies to any files that |
| 29884 |
are in fact tracked in the Git repository. Patch by Greg Price. |
| 29885 |
|
| 29886 |
- bpo-37725: Change "clean" makefile target to also clean the program guided |
| 29887 |
optimization (PGO) data. Previously you would have to use "make clean" |
| 29888 |
and "make profile-removal", or "make clobber". |
| 29889 |
|
| 29890 |
- bpo-37707: Mark some individual tests to skip when --pgo is used. The |
| 29891 |
tests marked increase the PGO task time significantly and likely don't |
| 29892 |
help improve optimization of the final executable. |
| 29893 |
|
| 29894 |
- bpo-36044: Reduce the number of unit tests run for the PGO generation |
| 29895 |
task. This speeds up the task by a factor of about 15x. Running the full |
| 29896 |
unit test suite is slow. This change may result in a slightly less |
| 29897 |
optimized build since not as many code branches will be executed. If you |
| 29898 |
are willing to wait for the much slower build, the old behavior can be |
| 29899 |
restored using './configure [..] PROFILE_TASK="-m test --pgo-extended"'. |
| 29900 |
We make no guarantees as to which PGO task set produces a faster build. |
| 29901 |
Users who care should run their own relevant benchmarks as results can |
| 29902 |
depend on the environment, workload, and compiler tool chain. |
| 29903 |
|
| 29904 |
- bpo-37468: ``make install`` no longer installs ``wininst-*.exe`` files |
| 29905 |
used by distutils bdist_wininst: bdist_wininst only works on Windows. |
| 29906 |
|
| 29907 |
- bpo-37189: Many :samp:`PyRun_{XXX}()` functions like |
| 29908 |
:c:func:`PyRun_String` were no longer exported in ``libpython38.dll`` by |
| 29909 |
mistake. Export them again to fix the ABI compatibility. |
| 29910 |
|
| 29911 |
- bpo-25361: Enables use of SSE2 instructions in Windows 32-bit build. |
| 29912 |
|
| 29913 |
- bpo-36210: Update optional extension module detection for AIX. ossaudiodev |
| 29914 |
and spwd are not applicable for AIX, and are no longer reported as |
| 29915 |
missing. 3rd-party packaging of ncurses (with ASIS support) conflicts with |
| 29916 |
officially supported AIX curses library, so configure AIX to use |
| 29917 |
libcurses.a. However, skip trying to build _curses_panel. |
| 29918 |
|
| 29919 |
patch by M Felt |
| 29920 |
|
| 29921 |
Windows |
| 29922 |
------- |
| 29923 |
|
| 29924 |
- bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C |
| 29925 |
drive |
| 29926 |
|
| 29927 |
- bpo-38453: Ensure ntpath.realpath() correctly resolves relative paths. |
| 29928 |
|
| 29929 |
- bpo-38519: Restores the internal C headers that were missing from the |
| 29930 |
nuget.org and Microsoft Store packages. |
| 29931 |
|
| 29932 |
- bpo-38492: Remove ``pythonw.exe`` dependency on the Microsoft C++ runtime. |
| 29933 |
|
| 29934 |
- bpo-38344: Fix error message in activate.bat |
| 29935 |
|
| 29936 |
- bpo-38359: Ensures ``pyw.exe`` launcher reads correct registry key. |
| 29937 |
|
| 29938 |
- bpo-38355: Fixes ``ntpath.realpath`` failing on ``sys.executable``. |
| 29939 |
|
| 29940 |
- bpo-38117: Update bundled OpenSSL to 1.1.1d |
| 29941 |
|
| 29942 |
- bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual |
| 29943 |
environment. |
| 29944 |
|
| 29945 |
- bpo-38133: Allow py.exe launcher to locate installations from the |
| 29946 |
Microsoft Store and improve display of active virtual environments. |
| 29947 |
|
| 29948 |
- bpo-38114: The ``pip.ini`` is no longer included in the Nuget package. |
| 29949 |
|
| 29950 |
- bpo-32592: Set Windows 8 as the minimum required version for API support |
| 29951 |
|
| 29952 |
- bpo-36634: :func:`os.cpu_count` now returns active processors rather than |
| 29953 |
maximum processors. |
| 29954 |
|
| 29955 |
- bpo-36634: venv activate.bat now works when the existing variables contain |
| 29956 |
double quote characters. |
| 29957 |
|
| 29958 |
- bpo-38081: Prevent error calling :func:`os.path.realpath` on ``'NUL'``. |
| 29959 |
|
| 29960 |
- bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath. |
| 29961 |
|
| 29962 |
- bpo-38088: Fixes distutils not finding vcruntime140.dll with only the v142 |
| 29963 |
toolset installed. |
| 29964 |
|
| 29965 |
- bpo-37283: Ensure command-line and unattend.xml setting override |
| 29966 |
previously detected states in Windows installer. |
| 29967 |
|
| 29968 |
- bpo-38030: Fixes :func:`os.stat` failing for block devices on Windows |
| 29969 |
|
| 29970 |
- bpo-38020: Fixes potential crash when calling :func:`os.readlink` (or |
| 29971 |
indirectly through :func:`~os.path.realpath`) on a file that is not a |
| 29972 |
supported link. |
| 29973 |
|
| 29974 |
- bpo-37705: Improve the implementation of ``winerror_to_errno()``. |
| 29975 |
|
| 29976 |
- bpo-37549: :func:`os.dup` no longer fails for standard streams on Windows |
| 29977 |
7. |
| 29978 |
|
| 29979 |
- bpo-1311: The ``nul`` file on Windows now returns True from |
| 29980 |
:func:`~os.path.exists` and a valid result from :func:`os.stat` with |
| 29981 |
``S_IFCHR`` set. |
| 29982 |
|
| 29983 |
- bpo-9949: Enable support for following symlinks in :func:`os.realpath`. |
| 29984 |
|
| 29985 |
- bpo-37834: Treat all name surrogate reparse points on Windows in |
| 29986 |
:func:`os.lstat` and other reparse points as regular files in |
| 29987 |
:func:`os.stat`. |
| 29988 |
|
| 29989 |
- bpo-36266: Add the module name in the formatted error message when DLL |
| 29990 |
load fail happens during module import in |
| 29991 |
``_PyImport_FindSharedFuncptrWindows()``. Patch by Srinivas Nyayapati. |
| 29992 |
|
| 29993 |
- bpo-25172: Trying to import the :mod:`!crypt` module on Windows will |
| 29994 |
result in an :exc:`ImportError` with a message explaining that the module |
| 29995 |
isn't supported on Windows. On other platforms, if the underlying |
| 29996 |
``_crypt`` module is not available, the ImportError will include a message |
| 29997 |
explaining the problem. |
| 29998 |
|
| 29999 |
- bpo-37778: Fixes the icons used for file associations to the Microsoft |
| 30000 |
Store package. |
| 30001 |
|
| 30002 |
- bpo-37734: Fix use of registry values to launch Python from Microsoft |
| 30003 |
Store app. |
| 30004 |
|
| 30005 |
- bpo-37702: Fix memory leak on Windows in creating an SSLContext object or |
| 30006 |
running ``urllib.request.urlopen('https://...')``. |
| 30007 |
|
| 30008 |
- bpo-37672: Switch Windows Store package's pip to use bundled |
| 30009 |
:file:`pip.ini` instead of :envvar:`PIP_USER` variable. |
| 30010 |
|
| 30011 |
- bpo-10945: Officially drop support for creating bdist_wininst installers |
| 30012 |
on non-Windows systems. |
| 30013 |
|
| 30014 |
- bpo-37445: Include the ``FORMAT_MESSAGE_IGNORE_INSERTS`` flag in |
| 30015 |
``FormatMessageW()`` calls. |
| 30016 |
|
| 30017 |
- bpo-37369: Fixes path for :data:`sys.executable` when running from the |
| 30018 |
Microsoft Store. |
| 30019 |
|
| 30020 |
- bpo-37380: Don't collect unfinished processes with ``subprocess._active`` |
| 30021 |
on Windows to cleanup later. Patch by Ruslan Kuprieiev. |
| 30022 |
|
| 30023 |
- bpo-37351: Removes libpython38.a from standard Windows distribution. |
| 30024 |
|
| 30025 |
- bpo-35360: Update Windows builds to use SQLite 3.28.0. |
| 30026 |
|
| 30027 |
- bpo-37267: On Windows, :func:`os.dup` no longer creates an inheritable fd |
| 30028 |
when handling a character file. |
| 30029 |
|
| 30030 |
- bpo-36779: Ensure ``time.tzname`` is correct on Windows when the active |
| 30031 |
code page is set to CP_UTF7 or CP_UTF8. |
| 30032 |
|
| 30033 |
- bpo-32587: Make :const:`winreg.REG_MULTI_SZ` support zero-length strings. |
| 30034 |
|
| 30035 |
- bpo-28269: Replace use of :c:func:`strcasecmp` for the system function |
| 30036 |
:c:func:`!_stricmp`. Patch by Minmin Gong. |
| 30037 |
|
| 30038 |
- bpo-36590: Add native Bluetooth RFCOMM support to socket module. |
| 30039 |
|
| 30040 |
macOS |
| 30041 |
----- |
| 30042 |
|
| 30043 |
- bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. |
| 30044 |
|
| 30045 |
- bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests |
| 30046 |
optional |
| 30047 |
|
| 30048 |
- bpo-18049: Increase the default stack size of threads from 5MB to 16MB on |
| 30049 |
macOS, to match the stack size of the main thread. This avoids crashes on |
| 30050 |
deep recursion in threads. |
| 30051 |
|
| 30052 |
- bpo-34602: Avoid test suite failures on macOS by no longer calling |
| 30053 |
resource.setrlimit to increase the process stack size limit at runtime. |
| 30054 |
The runtime change is no longer needed since the interpreter is being |
| 30055 |
built with a larger default stack size. |
| 30056 |
|
| 30057 |
- bpo-35360: Update macOS installer to use SQLite 3.28.0. |
| 30058 |
|
| 30059 |
- bpo-34631: Updated OpenSSL to 1.1.1c in macOS installer. |
| 30060 |
|
| 30061 |
IDLE |
| 30062 |
---- |
| 30063 |
|
| 30064 |
- bpo-26353: Stop adding newline when saving an IDLE shell window. |
| 30065 |
|
| 30066 |
- bpo-4630: Add an option to toggle IDLE's cursor blink for shell, editor, |
| 30067 |
and output windows. See Settings, General, Window Preferences, Cursor |
| 30068 |
Blink. Patch by Zackery Spytz. |
| 30069 |
|
| 30070 |
- bpo-38598: Do not try to compile IDLE shell or output windows |
| 30071 |
|
| 30072 |
- bpo-36698: IDLE no longer fails when write non-encodable characters to |
| 30073 |
stderr. It now escapes them with a backslash, as the regular Python |
| 30074 |
interpreter. Added the ``errors`` field to the standard streams. |
| 30075 |
|
| 30076 |
- bpo-35379: When exiting IDLE, catch any AttributeError. One happens when |
| 30077 |
EditorWindow.close is called twice. Printing a traceback, when IDLE is |
| 30078 |
run from a terminal, is useless and annoying. |
| 30079 |
|
| 30080 |
- bpo-38183: To avoid problems, test_idle ignores the user config directory. |
| 30081 |
It no longer tries to create or access .idlerc or any files within. Users |
| 30082 |
must run IDLE to discover problems with saving settings. |
| 30083 |
|
| 30084 |
- bpo-38077: IDLE no longer adds 'argv' to the user namespace when |
| 30085 |
initializing it. This bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4. |
| 30086 |
|
| 30087 |
- bpo-38041: Shell restart lines now fill the window width, always start |
| 30088 |
with '=', and avoid wrapping unnecessarily. The line will still wrap if |
| 30089 |
the included file name is long relative to the width. |
| 30090 |
|
| 30091 |
- bpo-35771: To avoid occasional spurious test_idle failures on slower |
| 30092 |
machines, increase the ``hover_delay`` in test_tooltip. |
| 30093 |
|
| 30094 |
- bpo-37824: Properly handle user input warnings in IDLE shell. Cease |
| 30095 |
turning SyntaxWarnings into SyntaxErrors. |
| 30096 |
|
| 30097 |
- bpo-37929: IDLE Settings dialog now closes properly when there is no shell |
| 30098 |
window. |
| 30099 |
|
| 30100 |
- bpo-37902: Add mousewheel scrolling for IDLE module, path, and stack |
| 30101 |
browsers. Patch by George Zhang. |
| 30102 |
|
| 30103 |
- bpo-37849: Fixed completions list appearing too high or low when shown |
| 30104 |
above the current line. |
| 30105 |
|
| 30106 |
- bpo-36419: Refactor IDLE autocomplete and improve testing. |
| 30107 |
|
| 30108 |
- bpo-37748: Reorder the Run menu. Put the most common choice, Run Module, |
| 30109 |
at the top. |
| 30110 |
|
| 30111 |
- bpo-37692: Improve highlight config sample with example shell interaction |
| 30112 |
and better labels for shell elements. |
| 30113 |
|
| 30114 |
- bpo-37628: Settings dialog no longer expands with font size. |
| 30115 |
|
| 30116 |
- bpo-37627: Initialize the Customize Run dialog with the command line |
| 30117 |
arguments most recently entered before. The user can optionally edit |
| 30118 |
before submitting them. |
| 30119 |
|
| 30120 |
- bpo-33610: Fix code context not showing the correct context when first |
| 30121 |
toggled on. |
| 30122 |
|
| 30123 |
- bpo-37530: Optimize code context to reduce unneeded background activity. |
| 30124 |
Font and highlight changes now occur along with text changes instead of |
| 30125 |
after a random delay. |
| 30126 |
|
| 30127 |
- bpo-27452: Cleanup ``config.py`` by inlining ``RemoveFile`` and |
| 30128 |
simplifying the handling of ``file`` in ``CreateConfigHandlers``. |
| 30129 |
|
| 30130 |
- bpo-37325: Fix tab focus traversal order for help source and custom run |
| 30131 |
dialogs. |
| 30132 |
|
| 30133 |
- bpo-37321: Both subprocess connection error messages now refer to the |
| 30134 |
'Startup failure' section of the IDLE doc. |
| 30135 |
|
| 30136 |
- bpo-17535: Add optional line numbers for IDLE editor windows. Windows |
| 30137 |
open without line numbers unless set otherwise in the General tab of the |
| 30138 |
configuration dialog. |
| 30139 |
|
| 30140 |
- bpo-26806: To compensate for stack frames added by IDLE and avoid possible |
| 30141 |
problems with low recursion limits, add 30 to limits in the user code |
| 30142 |
execution process. Subtract 30 when reporting recursion limits to make |
| 30143 |
this addition mostly transparent. |
| 30144 |
|
| 30145 |
- bpo-37177: Properly 'attach' search dialogs to their main window so that |
| 30146 |
they behave like other dialogs and do not get hidden behind their main |
| 30147 |
window. |
| 30148 |
|
| 30149 |
- bpo-37039: Adjust "Zoom Height" to individual screens by momentarily |
| 30150 |
maximizing the window on first use with a particular screen. Changing |
| 30151 |
screen settings may invalidate the saved height. While a window is |
| 30152 |
maximized, "Zoom Height" has no effect. |
| 30153 |
|
| 30154 |
- bpo-35763: Make calltip reminder about '/' meaning positional-only less |
| 30155 |
obtrusive by only adding it when there is room on the first line. |
| 30156 |
|
| 30157 |
- bpo-5680: Add 'Run... Customized' to the Run menu to run a module with |
| 30158 |
customized settings. Any 'command line arguments' entered are added to |
| 30159 |
sys.argv. One can suppress the normal Shell main module restart. |
| 30160 |
|
| 30161 |
- bpo-36390: Gather Format menu functions into format.py. Combine |
| 30162 |
paragraph.py, rstrip.py, and format methods from editor.py. |
| 30163 |
|
| 30164 |
Tools/Demos |
| 30165 |
----------- |
| 30166 |
|
| 30167 |
- bpo-38118: Update Valgrind suppression file to ignore a false alarm in |
| 30168 |
:c:func:`PyUnicode_Decode` when using GCC builtin strcmp(). |
| 30169 |
|
| 30170 |
- bpo-38347: pathfix.py: Assume all files that end on '.py' are Python |
| 30171 |
scripts when working recursively. |
| 30172 |
|
| 30173 |
- bpo-37803: pdb's ``--help`` and ``--version`` long options now work. |
| 30174 |
|
| 30175 |
- bpo-37942: Improve ArgumentClinic converter for floats. |
| 30176 |
|
| 30177 |
- bpo-37704: Remove ``Tools/scripts/h2py.py``: use cffi to access a C API in |
| 30178 |
Python. |
| 30179 |
|
| 30180 |
- bpo-37675: 2to3 now works when run from a zipped standard library. |
| 30181 |
|
| 30182 |
- bpo-37034: Argument Clinic now uses the argument name on errors with |
| 30183 |
keyword-only argument instead of their position. Patch contributed by Rémi |
| 30184 |
Lapeyre. |
| 30185 |
|
| 30186 |
- bpo-37064: Add option -k to pathscript.py script: preserve shebang flags. |
| 30187 |
Add option -a to pathscript.py script: add flags. |
| 30188 |
|
| 30189 |
C API |
| 30190 |
----- |
| 30191 |
|
| 30192 |
- bpo-37633: Re-export some function compatibility wrappers for macros in |
| 30193 |
``pythonrun.h``. |
| 30194 |
|
| 30195 |
- bpo-38644: Provide :c:func:`Py_EnterRecursiveCall` and |
| 30196 |
:c:func:`Py_LeaveRecursiveCall` as regular functions for the limited API. |
| 30197 |
Previously, there were defined as macros, but these macros didn't work |
| 30198 |
with the limited API which cannot access ``PyThreadState.recursion_depth`` |
| 30199 |
field. Remove ``_Py_CheckRecursionLimit`` from the stable ABI. |
| 30200 |
|
| 30201 |
- bpo-38650: The global variable :c:data:`PyStructSequence_UnnamedField` is |
| 30202 |
now a constant and refers to a constant string. |
| 30203 |
|
| 30204 |
- bpo-38540: Fixed possible leak in :c:func:`PyArg_Parse` and similar |
| 30205 |
functions for format units ``"es#"`` and ``"et#"`` when the macro |
| 30206 |
:c:macro:`PY_SSIZE_T_CLEAN` is not defined. |
| 30207 |
|
| 30208 |
- bpo-38395: Fix a crash in :class:`weakref.proxy` objects due to incorrect |
| 30209 |
lifetime management when calling some associated methods that may delete |
| 30210 |
the last reference to object being referenced by the proxy. Patch by Pablo |
| 30211 |
Galindo. |
| 30212 |
|
| 30213 |
- bpo-36389: The ``_PyObject_CheckConsistency()`` function is now also |
| 30214 |
available in release mode. For example, it can be used to debug a crash in |
| 30215 |
the ``visit_decref()`` function of the GC. |
| 30216 |
|
| 30217 |
- bpo-38266: Revert the removal of PyThreadState_DeleteCurrent() with |
| 30218 |
documentation. |
| 30219 |
|
| 30220 |
- bpo-38303: Update audioop extension module to use the stable ABI |
| 30221 |
(PEP-384). Patch by Tyler Kieft. |
| 30222 |
|
| 30223 |
- bpo-38234: :c:func:`!Py_SetPath` now sets :data:`sys.executable` to the |
| 30224 |
program full path (:c:func:`Py_GetProgramFullPath`) rather than to the |
| 30225 |
program name (:c:func:`Py_GetProgramName`). |
| 30226 |
|
| 30227 |
- bpo-38234: Python ignored arguments passed to :c:func:`!Py_SetPath`, |
| 30228 |
:c:func:`!Py_SetPythonHome` and :c:func:`!Py_SetProgramName`: fix Python |
| 30229 |
initialization to use specified arguments. |
| 30230 |
|
| 30231 |
- bpo-38205: The :c:func:`Py_UNREACHABLE` macro now calls |
| 30232 |
:c:func:`Py_FatalError`. |
| 30233 |
|
| 30234 |
- bpo-38140: Make dict and weakref offsets opaque for C heap types by |
| 30235 |
passing the offsets through PyMemberDef |
| 30236 |
|
| 30237 |
- bpo-15088: The C function ``PyGen_NeedsFinalizing`` has been removed. It |
| 30238 |
was not documented, tested or used anywhere within CPython after the |
| 30239 |
implementation of :pep:`442`. Patch by Joannah Nanjekye. (Patch by Joannah |
| 30240 |
Nanjekye) |
| 30241 |
|
| 30242 |
- bpo-36763: Options added by ``PySys_AddXOption()`` are now handled the |
| 30243 |
same way than ``PyConfig.xoptions`` and command line ``-X`` options. |
| 30244 |
|
| 30245 |
- bpo-37926: Fix a crash in ``PySys_SetArgvEx(0, NULL, 0)``. |
| 30246 |
|
| 30247 |
- bpo-37879: Fix subtype_dealloc to suppress the type decref when the base |
| 30248 |
type is a C heap type |
| 30249 |
|
| 30250 |
- bpo-37645: Add :c:func:`!_PyObject_FunctionStr` to get a user-friendly |
| 30251 |
string representation of a function-like object. Patch by Jeroen Demeyer. |
| 30252 |
|
| 30253 |
- bpo-29548: The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, |
| 30254 |
``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are |
| 30255 |
deprecated. Use :c:func:`PyObject_Call` and its variants instead. |
| 30256 |
|
| 30257 |
- bpo-37151: ``PyCFunction_Call`` is now a deprecated alias of |
| 30258 |
:c:func:`PyObject_Call`. |
| 30259 |
|
| 30260 |
- bpo-37540: The vectorcall protocol now requires that the caller passes |
| 30261 |
only strings as keyword names. |
| 30262 |
|
| 30263 |
- bpo-37207: The vectorcall protocol is now enabled for ``type`` objects: |
| 30264 |
set ``tp_vectorcall`` to a vectorcall function to be used instead of |
| 30265 |
``tp_new`` and ``tp_init`` when calling the class itself. |
| 30266 |
|
| 30267 |
- bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API. |
| 30268 |
|
| 30269 |
- bpo-37483: Add new function ``_PyObject_CallOneArg`` for calling an object |
| 30270 |
with one positional argument. |
| 30271 |
|
| 30272 |
- bpo-36763: Add :c:func:`PyConfig_SetWideStringList` function. |
| 30273 |
|
| 30274 |
- bpo-37337: Add fast functions for calling methods: |
| 30275 |
:c:func:`!_PyObject_VectorcallMethod`, |
| 30276 |
:c:func:`!_PyObject_CallMethodNoArgs` and |
| 30277 |
:c:func:`!_PyObject_CallMethodOneArg`. |
| 30278 |
|
| 30279 |
- bpo-28805: The :c:macro:`METH_FASTCALL` calling convention has been |
| 30280 |
documented. |
| 30281 |
|
| 30282 |
- bpo-37221: The new function :c:func:`!PyCode_NewWithPosOnlyArgs` allows to |
| 30283 |
create code objects like :c:func:`!PyCode_New`, but with an extra |
| 30284 |
*posonlyargcount* parameter for indicating the number of positonal-only |
| 30285 |
arguments. |
| 30286 |
|
| 30287 |
- bpo-37215: Fix dtrace issue introduce by bpo-36842 |
| 30288 |
|
| 30289 |
- bpo-37194: Add a new public :c:func:`PyObject_CallNoArgs` function to the |
| 30290 |
C API: call a callable Python object without any arguments. It is the most |
| 30291 |
efficient way to call a callback without any argument. On x86-64, for |
| 30292 |
example, ``PyObject_CallFunctionObjArgs(func, NULL)`` allocates 960 bytes |
| 30293 |
on the stack per call, whereas ``PyObject_CallNoArgs(func)`` only |
| 30294 |
allocates 624 bytes per call. |
| 30295 |
|
| 30296 |
- bpo-37170: Fix the cast on error in |
| 30297 |
:c:func:`PyLong_AsUnsignedLongLongMask()`. |
| 30298 |
|
| 30299 |
- bpo-35381: Convert posixmodule.c statically allocated types |
| 30300 |
``DirEntryType`` and ``ScandirIteratorType`` to heap-allocated types. |
| 30301 |
|
| 30302 |
- bpo-34331: Use singular/plural noun in error message when instantiating an |
| 30303 |
abstract class with non-overridden abstract method(s). |
| 30304 |
|
| 30305 |
|
| 30306 |
What's New in Python 3.8.0 beta 1? |
| 30307 |
================================== |
| 30308 |
|
| 30309 |
*Release date: 2019-06-04* |
| 30310 |
|
| 30311 |
Security |
| 30312 |
-------- |
| 30313 |
|
| 30314 |
- bpo-35907: :cve:`2019-9948`: Avoid file reading by disallowing |
| 30315 |
``local-file://`` and ``local_file://`` URL schemes in |
| 30316 |
``URLopener().open()`` and ``URLopener().retrieve()`` of |
| 30317 |
:mod:`urllib.request`. |
| 30318 |
|
| 30319 |
- bpo-33529: Prevent fold function used in email header encoding from |
| 30320 |
entering infinite loop when there are too many non-ASCII characters in a |
| 30321 |
header. |
| 30322 |
|
| 30323 |
- bpo-33164: Updated blake2 implementation which uses secure memset |
| 30324 |
implementation provided by platform. |
| 30325 |
|
| 30326 |
Core and Builtins |
| 30327 |
----------------- |
| 30328 |
|
| 30329 |
- bpo-35814: Allow unpacking in the right hand side of annotated |
| 30330 |
assignments. In particular, ``t: Tuple[int, ...] = x, y, *z`` is now |
| 30331 |
allowed. |
| 30332 |
|
| 30333 |
- bpo-37126: All structseq objects are now tracked by the garbage collector. |
| 30334 |
Patch by Pablo Galindo. |
| 30335 |
|
| 30336 |
- bpo-37122: Make the *co_argcount* attribute of code objects represent the |
| 30337 |
total number of positional arguments (including positional-only |
| 30338 |
arguments). The value of *co_posonlyargcount* can be used to distinguish |
| 30339 |
which arguments are positional only, and the difference (*co_argcount* - |
| 30340 |
*co_posonlyargcount*) is the number of positional-or-keyword arguments. |
| 30341 |
Patch by Pablo Galindo. |
| 30342 |
|
| 30343 |
- bpo-20092: Constructors of :class:`int`, :class:`float` and |
| 30344 |
:class:`complex` will now use the :meth:`~object.__index__` special |
| 30345 |
method, if available and the corresponding method :meth:`~object.__int__`, |
| 30346 |
:meth:`~object.__float__` or :meth:`~object.__complex__` is not available. |
| 30347 |
|
| 30348 |
- bpo-37087: Add native thread ID (TID) support to OpenBSD. |
| 30349 |
|
| 30350 |
- bpo-26219: Implemented per opcode cache mechanism and ``LOAD_GLOBAL`` |
| 30351 |
instruction use it. ``LOAD_GLOBAL`` is now about 40% faster. Contributed |
| 30352 |
by Yury Selivanov, and Inada Naoki. |
| 30353 |
|
| 30354 |
- bpo-37072: Fix crash in PyAST_FromNodeObject() when flags is NULL. |
| 30355 |
|
| 30356 |
- bpo-37029: Freeing a great many small objects could take time quadratic in |
| 30357 |
the number of arenas, due to using linear search to keep ``obmalloc.c``'s |
| 30358 |
list of usable arenas sorted by order of number of free memory pools. |
| 30359 |
This is accomplished without search now, leaving the worst-case time |
| 30360 |
linear in the number of arenas. For programs where this quite visibly |
| 30361 |
matters (typically with more than 100 thousand small objects alive |
| 30362 |
simultaneously), this can greatly reduce the time needed to release their |
| 30363 |
memory. |
| 30364 |
|
| 30365 |
- bpo-26423: Fix possible overflow in ``wrap_lenfunc()`` when ``sizeof(long) |
| 30366 |
< sizeof(Py_ssize_t)`` (e.g., 64-bit Windows). |
| 30367 |
|
| 30368 |
- bpo-37050: Improve the AST for "debug" f-strings, which use '=' to print |
| 30369 |
out the source of the expression being evaluated. Delete expr_text from |
| 30370 |
the FormattedValue node, and instead use a Constant string node (possibly |
| 30371 |
merged with adjacent constant expressions inside the f-string). |
| 30372 |
|
| 30373 |
- bpo-22385: The ``bytes.hex``, ``bytearray.hex``, and ``memoryview.hex`` |
| 30374 |
methods as well as the ``binascii.hexlify`` and ``b2a_hex`` functions now |
| 30375 |
have the ability to include an optional separator between hex bytes. This |
| 30376 |
functionality was inspired by MicroPython's hexlify implementation. |
| 30377 |
|
| 30378 |
- bpo-26836: Add :func:`os.memfd_create`. |
| 30379 |
|
| 30380 |
- bpo-37032: Added new ``replace()`` method to the code type |
| 30381 |
(:class:`types.CodeType`). |
| 30382 |
|
| 30383 |
- bpo-37007: Implement :func:`socket.if_nameindex`, |
| 30384 |
:func:`socket.if_nametoindex`, and :func:`socket.if_indextoname` on |
| 30385 |
Windows. |
| 30386 |
|
| 30387 |
- bpo-36829: :c:func:`PyErr_WriteUnraisable` now creates a traceback object |
| 30388 |
if there is no current traceback. Moreover, call |
| 30389 |
:c:func:`PyErr_NormalizeException` and :c:func:`PyException_SetTraceback` |
| 30390 |
to normalize the exception value. Ignore any error. |
| 30391 |
|
| 30392 |
- bpo-36878: Only accept text after ``# type: ignore`` if the first |
| 30393 |
character is ASCII. This is to disallow things like ``# type: ignoreé``. |
| 30394 |
|
| 30395 |
- bpo-36878: Store text appearing after a ``# type: ignore`` comment in the |
| 30396 |
AST. For example a type ignore like ``# type: ignore[E1000]`` will have |
| 30397 |
the string ``"[E1000]"`` stored in its AST node. |
| 30398 |
|
| 30399 |
- bpo-2180: Treat line continuation at EOF as a ``SyntaxError`` by Anthony |
| 30400 |
Sottile. |
| 30401 |
|
| 30402 |
- bpo-36907: Fix a crash when calling a C function with a keyword dict |
| 30403 |
(``f(**kwargs)``) and changing the dict ``kwargs`` while that function is |
| 30404 |
running. |
| 30405 |
|
| 30406 |
- bpo-36946: Fix possible signed integer overflow when handling slices. |
| 30407 |
|
| 30408 |
- bpo-36826: Add NamedExpression kind support to ast_unparse.c |
| 30409 |
|
| 30410 |
- bpo-1875: A :exc:`SyntaxError` is now raised if a code blocks that will be |
| 30411 |
optimized away (e.g. if conditions that are always false) contains syntax |
| 30412 |
errors. Patch by Pablo Galindo. |
| 30413 |
|
| 30414 |
- bpo-36027: Allow computation of modular inverses via three-argument |
| 30415 |
``pow``: the second argument is now permitted to be negative in the case |
| 30416 |
where the first and third arguments are relatively prime. |
| 30417 |
|
| 30418 |
- bpo-36861: Update the Unicode database to version 12.1.0. |
| 30419 |
|
| 30420 |
- bpo-28866: Avoid caching attributes of classes which type defines mro() to |
| 30421 |
avoid a hard cache invalidation problem. |
| 30422 |
|
| 30423 |
- bpo-36851: The ``FrameType`` stack is now correctly cleaned up if the |
| 30424 |
execution ends with a return and the stack is not empty. |
| 30425 |
|
| 30426 |
- bpo-34616: The ``compile()`` builtin functions now support the |
| 30427 |
``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag, which allow to compile sources |
| 30428 |
that contains top-level ``await``, ``async with`` or ``async for``. This |
| 30429 |
is useful to evaluate async-code from with an already async functions; for |
| 30430 |
example in a custom REPL. |
| 30431 |
|
| 30432 |
- bpo-36842: Implement PEP 578, adding sys.audit, io.open_code and related |
| 30433 |
APIs. |
| 30434 |
|
| 30435 |
- bpo-27639: Correct return type for UserList slicing operations. Patch by |
| 30436 |
Michael Blahay, Erick Cervantes, and vaultah |
| 30437 |
|
| 30438 |
- bpo-36737: Move PyRuntimeState.warnings into per-interpreter state (via |
| 30439 |
"module state"). |
| 30440 |
|
| 30441 |
- bpo-36793: Removed ``__str__`` implementations from builtin types |
| 30442 |
:class:`bool`, :class:`int`, :class:`float`, :class:`complex` and few |
| 30443 |
classes from the standard library. They now inherit ``__str__()`` from |
| 30444 |
:class:`object`. |
| 30445 |
|
| 30446 |
- bpo-36817: Add a ``=`` feature f-strings for debugging. This can precede |
| 30447 |
``!s``, ``!r``, or ``!a``. It produces the text of the expression, |
| 30448 |
followed by an equal sign, followed by the repr of the value of the |
| 30449 |
expression. So ``f'{3*9+15=}'`` would be equal to the string |
| 30450 |
``'3*9+15=42'``. If ``=`` is specified, the default conversion is set to |
| 30451 |
``!r``, unless a format spec is given, in which case the formatting |
| 30452 |
behavior is unchanged, and __format__ will be used. |
| 30453 |
|
| 30454 |
- bpo-24048: Save the live exception during import.c's ``remove_module()``. |
| 30455 |
|
| 30456 |
- bpo-27987: pymalloc returns memory blocks aligned by 16 bytes, instead of |
| 30457 |
8 bytes, on 64-bit platforms to conform x86-64 ABI. Recent compilers |
| 30458 |
assume this alignment more often. Patch by Inada Naoki. |
| 30459 |
|
| 30460 |
- bpo-36601: A long-since-meaningless check for ``getpid() == main_pid`` was |
| 30461 |
removed from Python's internal C signal handler. |
| 30462 |
|
| 30463 |
- bpo-36594: Fix incorrect use of ``%p`` in format strings. Patch by Zackery |
| 30464 |
Spytz. |
| 30465 |
|
| 30466 |
- bpo-36045: ``builtins.help()`` now prefixes ``async`` for async functions. |
| 30467 |
|
| 30468 |
- bpo-36084: Add native thread ID (TID) to threading.Thread objects |
| 30469 |
(supported platforms: Windows, FreeBSD, Linux, macOS) |
| 30470 |
|
| 30471 |
- bpo-36035: Added fix for broken symlinks in combination with pathlib |
| 30472 |
|
| 30473 |
- bpo-35983: Added new trashcan macros to deal with a double deallocation |
| 30474 |
that could occur when the ``tp_dealloc`` of a subclass calls the |
| 30475 |
``tp_dealloc`` of a base class and that base class uses the trashcan |
| 30476 |
mechanism. Patch by Jeroen Demeyer. |
| 30477 |
|
| 30478 |
- bpo-20602: Do not clear :data:`sys.flags` and :data:`sys.float_info` |
| 30479 |
during shutdown. Patch by Zackery Spytz. |
| 30480 |
|
| 30481 |
- bpo-26826: Expose :func:`copy_file_range` as a low level API in the |
| 30482 |
:mod:`os` module. |
| 30483 |
|
| 30484 |
- bpo-32388: Remove cross-version binary compatibility requirement in |
| 30485 |
tp_flags. |
| 30486 |
|
| 30487 |
- bpo-31862: Port binascii to PEP 489 multiphase initialization. Patch by |
| 30488 |
Marcel Plch. |
| 30489 |
|
| 30490 |
Library |
| 30491 |
------- |
| 30492 |
|
| 30493 |
- bpo-37128: Added :func:`math.perm`. |
| 30494 |
|
| 30495 |
- bpo-37120: Add SSLContext.num_tickets to control the number of TLSv1.3 |
| 30496 |
session tickets. |
| 30497 |
|
| 30498 |
- bpo-12202: Fix the error handling in |
| 30499 |
:meth:`!msilib.SummaryInformation.GetProperty`. Patch by Zackery Spytz. |
| 30500 |
|
| 30501 |
- bpo-26835: The fcntl module now contains file sealing constants for |
| 30502 |
sealing of memfds. |
| 30503 |
|
| 30504 |
- bpo-29262: Add ``get_origin()`` and ``get_args()`` introspection helpers |
| 30505 |
to ``typing`` module. |
| 30506 |
|
| 30507 |
- bpo-12639: :meth:`!msilib.Directory.start_component` no longer fails if |
| 30508 |
*keyfile* is not ``None``. |
| 30509 |
|
| 30510 |
- bpo-36999: Add the ``asyncio.Task.get_coro()`` method to publicly expose |
| 30511 |
the tasks's coroutine object. |
| 30512 |
|
| 30513 |
- bpo-35246: Make :func:`asyncio.create_subprocess_exec` accept path-like |
| 30514 |
arguments. |
| 30515 |
|
| 30516 |
- bpo-35279: Change default *max_workers* of ``ThreadPoolExecutor`` from |
| 30517 |
``cpu_count() * 5`` to ``min(32, cpu_count() + 4)``. Previous value was |
| 30518 |
unreasonably large on many cores machines. |
| 30519 |
|
| 30520 |
- bpo-37076: :func:`_thread.start_new_thread` now logs uncaught exception |
| 30521 |
raised by the function using :func:`sys.unraisablehook`, rather than |
| 30522 |
:func:`sys.excepthook`, so the hook gets access to the function which |
| 30523 |
raised the exception. |
| 30524 |
|
| 30525 |
- bpo-33725: On macOS, the :mod:`multiprocessing` module now uses *spawn* |
| 30526 |
start method by default. |
| 30527 |
|
| 30528 |
- bpo-37054: Fix destructor :class:`!_pyio.BytesIO` and |
| 30529 |
:class:`!_pyio.TextIOWrapper`: initialize their ``_buffer`` attribute as |
| 30530 |
soon as possible (in the class body), because it's used by ``__del__()`` |
| 30531 |
which calls ``close()``. |
| 30532 |
|
| 30533 |
- bpo-37058: PEP 544: Add ``Protocol`` and ``@runtime_checkable`` to the |
| 30534 |
``typing`` module. |
| 30535 |
|
| 30536 |
- bpo-36933: The functions ``sys.set_coroutine_wrapper`` and |
| 30537 |
``sys.get_coroutine_wrapper`` that were deprecated and marked for removal |
| 30538 |
in 3.8 have been removed. |
| 30539 |
|
| 30540 |
- bpo-37047: Handle late binding and attribute access in |
| 30541 |
:class:`unittest.mock.AsyncMock` setup for autospeccing. Document newly |
| 30542 |
implemented async methods in :class:`unittest.mock.MagicMock`. |
| 30543 |
|
| 30544 |
- bpo-37049: PEP 589: Add ``TypedDict`` to the ``typing`` module. |
| 30545 |
|
| 30546 |
- bpo-37046: PEP 586: Add ``Literal`` to the ``typing`` module. |
| 30547 |
|
| 30548 |
- bpo-37045: PEP 591: Add ``Final`` qualifier and ``@final`` decorator to |
| 30549 |
the ``typing`` module. |
| 30550 |
|
| 30551 |
- bpo-37035: Don't log OSError based exceptions if a fatal error has |
| 30552 |
occurred in asyncio transport. Peer can generate almost any OSError, user |
| 30553 |
cannot avoid these exceptions by fixing own code. Errors are still |
| 30554 |
propagated to user code, it's just logging them is pointless and pollute |
| 30555 |
asyncio logs. |
| 30556 |
|
| 30557 |
- bpo-37001: :func:`symtable.symtable` now accepts the same input types for |
| 30558 |
source code as the built-in :func:`compile` function. Patch by Dino |
| 30559 |
Viehland. |
| 30560 |
|
| 30561 |
- bpo-37028: Implement asyncio REPL |
| 30562 |
|
| 30563 |
- bpo-37027: Return safe to use proxy socket object from |
| 30564 |
transport.get_extra_info('socket') |
| 30565 |
|
| 30566 |
- bpo-32528: Make asyncio.CancelledError a BaseException. |
| 30567 |
|
| 30568 |
This will address the common mistake many asyncio users make: an "except |
| 30569 |
Exception" clause breaking Tasks cancellation. |
| 30570 |
|
| 30571 |
In addition to this change, we stop inheriting asyncio.TimeoutError and |
| 30572 |
asyncio.InvalidStateError from their concurrent.futures.* counterparts. |
| 30573 |
There's no point for these exceptions to share the inheritance chain. |
| 30574 |
|
| 30575 |
- bpo-1230540: Add a new :func:`threading.excepthook` function which handles |
| 30576 |
uncaught :meth:`threading.Thread.run` exception. It can be overridden to |
| 30577 |
control how uncaught :meth:`threading.Thread.run` exceptions are handled. |
| 30578 |
|
| 30579 |
- bpo-36996: Handle :func:`unittest.mock.patch` used as a decorator on async |
| 30580 |
functions. |
| 30581 |
|
| 30582 |
- bpo-37008: Add support for calling :func:`next` with the mock resulting |
| 30583 |
from :func:`unittest.mock.mock_open` |
| 30584 |
|
| 30585 |
- bpo-27737: Allow whitespace only header encoding in ``email.header`` - by |
| 30586 |
Batuhan Taskaya |
| 30587 |
|
| 30588 |
- bpo-36969: PDB command ``args`` now display positional only arguments. |
| 30589 |
Patch contributed by Rémi Lapeyre. |
| 30590 |
|
| 30591 |
- bpo-36969: PDB command ``args`` now display keyword only arguments. Patch |
| 30592 |
contributed by Rémi Lapeyre. |
| 30593 |
|
| 30594 |
- bpo-36983: Add missing names to ``typing.__all__``: ``ChainMap``, |
| 30595 |
``ForwardRef``, ``OrderedDict`` - by Anthony Sottile. |
| 30596 |
|
| 30597 |
- bpo-36972: Add SupportsIndex protocol to the typing module to allow type |
| 30598 |
checking to detect classes that can be passed to ``hex()``, ``oct()`` and |
| 30599 |
``bin()``. |
| 30600 |
|
| 30601 |
- bpo-32972: Implement ``unittest.IsolatedAsyncioTestCase`` to help testing |
| 30602 |
asyncio-based code. |
| 30603 |
|
| 30604 |
- bpo-36952: :func:`fileinput.input` and :class:`fileinput.FileInput` |
| 30605 |
**bufsize** argument has been removed (was deprecated and ignored since |
| 30606 |
Python 3.6), and as a result the **mode** and **openhook** arguments have |
| 30607 |
been made keyword-only. |
| 30608 |
|
| 30609 |
- bpo-36952: Starting with Python 3.3, importing ABCs from |
| 30610 |
:mod:`collections` is deprecated, and import should be done from |
| 30611 |
:mod:`collections.abc`. Still being able to import from :mod:`collections` |
| 30612 |
was marked for removal in 3.8, but has been delayed to 3.9; documentation |
| 30613 |
and ``DeprecationWarning`` clarified. |
| 30614 |
|
| 30615 |
- bpo-36949: Implement __repr__ for WeakSet objects. |
| 30616 |
|
| 30617 |
- bpo-36948: Fix :exc:`NameError` in |
| 30618 |
:meth:`urllib.request.URLopener.retrieve`. Patch by Karthikeyan |
| 30619 |
Singaravelan. |
| 30620 |
|
| 30621 |
- bpo-33524: Fix the folding of email header when the max_line_length is 0 |
| 30622 |
or None and the header contains non-ascii characters. Contributed by |
| 30623 |
Licht Takeuchi (@Licht-T). |
| 30624 |
|
| 30625 |
- bpo-24564: :func:`shutil.copystat` now ignores :const:`errno.EINVAL` on |
| 30626 |
:func:`os.setxattr` which may occur when copying files on filesystems |
| 30627 |
without extended attributes support. |
| 30628 |
|
| 30629 |
Original patch by Giampaolo Rodola, updated by Ying Wang. |
| 30630 |
|
| 30631 |
- bpo-36888: Python child processes can now access the status of their |
| 30632 |
parent process using multiprocessing.process.parent_process |
| 30633 |
|
| 30634 |
- bpo-36921: Deprecate ``@coroutine`` for sake of ``async def``. |
| 30635 |
|
| 30636 |
- bpo-25652: Fix bug in ``__rmod__`` of ``UserString`` - by Batuhan Taskaya. |
| 30637 |
|
| 30638 |
- bpo-36916: Remove a message about an unhandled exception in a task when |
| 30639 |
writer.write() is used without await and writer.drain() fails with an |
| 30640 |
exception. |
| 30641 |
|
| 30642 |
- bpo-36889: Introduce :class:`asyncio.Stream` class that merges |
| 30643 |
:class:`asyncio.StreamReader` and :class:`asyncio.StreamWriter` |
| 30644 |
functionality. :class:`asyncio.Stream` can work in readonly, writeonly and |
| 30645 |
readwrite modes. Provide :func:`asyncio.connect`, |
| 30646 |
:func:`asyncio.connect_unix`, :func:`asyncio.connect_read_pipe` and |
| 30647 |
:func:`asyncio.connect_write_pipe` factories to open |
| 30648 |
:class:`asyncio.Stream` connections. Provide :class:`asyncio.StreamServer` |
| 30649 |
and :class:`UnixStreamServer` to serve servers with asyncio.Stream API. |
| 30650 |
Modify :func:`asyncio.create_subprocess_shell` and |
| 30651 |
:func:`asyncio.create_subprocess_exec` to use :class:`asyncio.Stream` |
| 30652 |
instead of deprecated :class:`StreamReader` and :class:`StreamWriter`. |
| 30653 |
Deprecate :class:`asyncio.StreamReader` and :class:`asyncio.StreamWriter`. |
| 30654 |
Deprecate usage of private classes, e.g. |
| 30655 |
:class:`asyncio.FlowControlMixing` and |
| 30656 |
:class:`asyncio.StreamReaderProtocol` outside of asyncio package. |
| 30657 |
|
| 30658 |
- bpo-36845: Added validation of integer prefixes to the construction of IP |
| 30659 |
networks and interfaces in the ipaddress module. |
| 30660 |
|
| 30661 |
- bpo-23378: Add an extend action to argparser. |
| 30662 |
|
| 30663 |
- bpo-36867: Fix a bug making a SharedMemoryManager instance and its parent |
| 30664 |
process use two separate resource_tracker processes. |
| 30665 |
|
| 30666 |
- bpo-23896: Adds a grammar to lib2to3.pygram that contains exec as a |
| 30667 |
function not as statement. |
| 30668 |
|
| 30669 |
- bpo-36895: The function ``time.clock()`` was deprecated in 3.3 in favor of |
| 30670 |
``time.perf_counter()`` and marked for removal in 3.8, it has removed. |
| 30671 |
|
| 30672 |
- bpo-35545: Fix asyncio discarding IPv6 scopes when ensuring hostname |
| 30673 |
resolutions internally |
| 30674 |
|
| 30675 |
- bpo-36887: Add new function :func:`math.isqrt` to compute integer square |
| 30676 |
roots. |
| 30677 |
|
| 30678 |
- bpo-34632: Introduce the ``importlib.metadata`` module with (provisional) |
| 30679 |
support for reading metadata from third-party packages. |
| 30680 |
|
| 30681 |
- bpo-36878: When using ``type_comments=True`` in ``ast.parse``, treat ``# |
| 30682 |
type: ignore`` followed by a non-alphanumeric character and then arbitrary |
| 30683 |
text as a type ignore, instead of requiring nothing but whitespace or |
| 30684 |
another comment. This is to permit formations such as ``# type: |
| 30685 |
ignore[E1000]``. |
| 30686 |
|
| 30687 |
- bpo-36778: ``cp65001`` encoding (Windows code page 65001) becomes an alias |
| 30688 |
to ``utf_8`` encoding. |
| 30689 |
|
| 30690 |
- bpo-36867: The multiprocessing.resource_tracker replaces the |
| 30691 |
multiprocessing.semaphore_tracker module. Other than semaphores, |
| 30692 |
resource_tracker also tracks shared_memory segments. |
| 30693 |
|
| 30694 |
- bpo-30262: The ``Cache`` and ``Statement`` objects of the :mod:`sqlite3` |
| 30695 |
module are not exposed to the user. Patch by Aviv Palivoda. |
| 30696 |
|
| 30697 |
- bpo-24538: In ``shutil.copystat()``, first copy extended file attributes |
| 30698 |
and then file permissions, since extended attributes can only be set on |
| 30699 |
the destination while it is still writeable. |
| 30700 |
|
| 30701 |
- bpo-36829: Add new :func:`sys.unraisablehook` function which can be |
| 30702 |
overridden to control how "unraisable exceptions" are handled. It is |
| 30703 |
called when an exception has occurred but there is no way for Python to |
| 30704 |
handle it. For example, when a destructor raises an exception or during |
| 30705 |
garbage collection (:func:`gc.collect`). |
| 30706 |
|
| 30707 |
- bpo-36832: Introducing ``zipfile.Path``, a pathlib-compatible wrapper for |
| 30708 |
traversing zip files. |
| 30709 |
|
| 30710 |
- bpo-36814: Fix an issue where os.posix_spawnp() would incorrectly raise a |
| 30711 |
TypeError when file_actions is None. |
| 30712 |
|
| 30713 |
- bpo-33110: Handle exceptions raised by functions added by |
| 30714 |
concurrent.futures add_done_callback correctly when the Future has already |
| 30715 |
completed. |
| 30716 |
|
| 30717 |
- bpo-26903: Limit ``max_workers`` in ``ProcessPoolExecutor`` to 61 to work |
| 30718 |
around a WaitForMultipleObjects limitation. |
| 30719 |
|
| 30720 |
- bpo-36813: Fix :class:`~logging.handlers.QueueListener` to call |
| 30721 |
``queue.task_done()`` upon stopping. Patch by Bar Harel. |
| 30722 |
|
| 30723 |
- bpo-36806: Forbid creation of asyncio stream objects like StreamReader, |
| 30724 |
StreamWriter, Process, and their protocols outside of asyncio package. |
| 30725 |
|
| 30726 |
- bpo-36802: Provide both sync and async calls for StreamWriter.write() and |
| 30727 |
StreamWriter.close() |
| 30728 |
|
| 30729 |
- bpo-36801: Properly handle SSL connection closing in asyncio |
| 30730 |
StreamWriter.drain() call. |
| 30731 |
|
| 30732 |
- bpo-36785: Implement PEP 574 (pickle protocol 5 with out-of-band buffers). |
| 30733 |
|
| 30734 |
- bpo-36772: functools.lru_cache() can now be used as a straight decorator |
| 30735 |
in addition to its existing usage as a function that returns a decorator. |
| 30736 |
|
| 30737 |
- bpo-6584: Add a :exc:`~gzip.BadGzipFile` exception to the :mod:`gzip` |
| 30738 |
module. |
| 30739 |
|
| 30740 |
- bpo-36748: Optimized write buffering in C implementation of |
| 30741 |
``TextIOWrapper``. Writing ASCII string to ``TextIOWrapper`` with ascii, |
| 30742 |
latin1, or utf-8 encoding is about 20% faster. Patch by Inada Naoki. |
| 30743 |
|
| 30744 |
- bpo-8138: Don't mark ``wsgiref.simple_server.SimpleServer`` as |
| 30745 |
multi-threaded since ``wsgiref.simple_server.WSGIServer`` is |
| 30746 |
single-threaded. |
| 30747 |
|
| 30748 |
- bpo-22640: :func:`py_compile.compile` now supports silent mode. Patch by |
| 30749 |
Joannah Nanjekye |
| 30750 |
|
| 30751 |
- bpo-29183: Fix double exceptions in :class:`wsgiref.handlers.BaseHandler` |
| 30752 |
by calling its :meth:`~wsgiref.handlers.BaseHandler.close` method only |
| 30753 |
when no exception is raised. |
| 30754 |
|
| 30755 |
- bpo-36548: Improved the repr of regular expression flags. |
| 30756 |
|
| 30757 |
- bpo-36542: The signature of Python functions can now be overridden by |
| 30758 |
specifying the ``__text_signature__`` attribute. |
| 30759 |
|
| 30760 |
- bpo-36533: Reinitialize logging.Handler locks in forked child processes |
| 30761 |
instead of attempting to acquire them all in the parent before forking |
| 30762 |
only to be released in the child process. The acquire/release pattern was |
| 30763 |
leading to deadlocks in code that has implemented any form of chained |
| 30764 |
logging handlers that depend upon one another as the lock acquisition |
| 30765 |
order cannot be guaranteed. |
| 30766 |
|
| 30767 |
- bpo-35252: Throw a TypeError instead of an AssertionError when using an |
| 30768 |
invalid type annotation with singledispatch. |
| 30769 |
|
| 30770 |
- bpo-35900: Allow reduction methods to return a 6-item tuple where the 6th |
| 30771 |
item specifies a custom state-setting method that's called instead of the |
| 30772 |
regular ``__setstate__`` method. |
| 30773 |
|
| 30774 |
- bpo-35900: enable custom reduction callback registration for functions and |
| 30775 |
classes in _pickle.c, using the new Pickler's attribute |
| 30776 |
``reducer_override`` |
| 30777 |
|
| 30778 |
- bpo-36368: Fix a bug crashing SharedMemoryManager instances in interactive |
| 30779 |
sessions after a ctrl-c (KeyboardInterrupt) was sent |
| 30780 |
|
| 30781 |
- bpo-31904: Fix mmap fail for VxWorks |
| 30782 |
|
| 30783 |
- bpo-27497: :meth:`csv.DictWriter.writeheader` now returns the return value |
| 30784 |
of the underlying :meth:`csv.Writer.writerow` method. Patch contributed by |
| 30785 |
Ashish Nitin Patil. |
| 30786 |
|
| 30787 |
- bpo-36239: Parsing .mo files now ignores comments starting and ending with |
| 30788 |
#-#-#-#-#. |
| 30789 |
|
| 30790 |
- bpo-26707: Enable plistlib to read and write binary plist files that were |
| 30791 |
created as a KeyedArchive file. Specifically, this allows the plistlib to |
| 30792 |
process 0x80 tokens as UID objects. |
| 30793 |
|
| 30794 |
- bpo-31904: Add posix module support for VxWorks. |
| 30795 |
|
| 30796 |
- bpo-35125: Asyncio: Remove inner callback on outer cancellation in shield |
| 30797 |
|
| 30798 |
- bpo-35721: Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec` leaks |
| 30799 |
file descriptors if ``Popen`` fails and called with |
| 30800 |
``stdin=subprocess.PIPE``. Patch by Niklas Fiekas. |
| 30801 |
|
| 30802 |
- bpo-31855: :func:`unittest.mock.mock_open` results now respects the |
| 30803 |
argument of read([size]). Patch contributed by Rémi Lapeyre. |
| 30804 |
|
| 30805 |
- bpo-35431: Implement :func:`math.comb` that returns binomial coefficient, |
| 30806 |
that computes the number of ways to choose k items from n items without |
| 30807 |
repetition and without order. Patch by Yash Aggarwal and Keller Fuchs. |
| 30808 |
|
| 30809 |
- bpo-26660: Fixed permission errors in |
| 30810 |
:class:`~tempfile.TemporaryDirectory` clean up. Previously |
| 30811 |
``TemporaryDirectory.cleanup()`` failed when non-writeable or |
| 30812 |
non-searchable files or directories were created inside a temporary |
| 30813 |
directory. |
| 30814 |
|
| 30815 |
- bpo-34271: Add debugging helpers to ssl module. It's now possible to dump |
| 30816 |
key material and to trace TLS protocol. The default and stdlib contexts |
| 30817 |
also support SSLKEYLOGFILE env var. |
| 30818 |
|
| 30819 |
- bpo-26467: Added AsyncMock to support using unittest to mock asyncio |
| 30820 |
coroutines. Patch by Lisa Roach. |
| 30821 |
|
| 30822 |
- bpo-33569: dataclasses.InitVar: Exposes the type used to create the init |
| 30823 |
var. |
| 30824 |
|
| 30825 |
- bpo-34424: Fix serialization of messages containing encoded strings when |
| 30826 |
the policy.linesep is set to a multi-character string. Patch by Jens |
| 30827 |
Troeger. |
| 30828 |
|
| 30829 |
- bpo-34303: Performance of :func:`functools.reduce` is slightly improved. |
| 30830 |
Patch by Sergey Fedoseev. |
| 30831 |
|
| 30832 |
- bpo-33361: Fix a bug in :class:`codecs.StreamRecoder` where seeking might |
| 30833 |
leave old data in a buffer and break subsequent read calls. Patch by Ammar |
| 30834 |
Askar. |
| 30835 |
|
| 30836 |
- bpo-22454: The :mod:`shlex` module now exposes :func:`shlex.join`, the |
| 30837 |
inverse of :func:`shlex.split`. Patch by Bo Bayles. |
| 30838 |
|
| 30839 |
- bpo-31922: :meth:`asyncio.AbstractEventLoop.create_datagram_endpoint`: Do |
| 30840 |
not connect UDP socket when broadcast is allowed. This allows to receive |
| 30841 |
replies after a UDP broadcast. |
| 30842 |
|
| 30843 |
- bpo-24882: Change ThreadPoolExecutor to use existing idle threads before |
| 30844 |
spinning up new ones. |
| 30845 |
|
| 30846 |
- bpo-31961: Added support for bytes and path-like objects in |
| 30847 |
:func:`subprocess.Popen` on Windows. The *args* parameter now accepts a |
| 30848 |
:term:`path-like object` if *shell* is ``False`` and a sequence containing |
| 30849 |
bytes and path-like objects. The *executable* parameter now accepts a |
| 30850 |
bytes and :term:`path-like object`. The *cwd* parameter now accepts a |
| 30851 |
bytes object. Based on patch by Anders Lorentsen. |
| 30852 |
|
| 30853 |
- bpo-33123: :class:`pathlib.Path.unlink` now accepts a *missing_ok* |
| 30854 |
parameter to avoid a :exc:`FileNotFoundError` from being raised. Patch by |
| 30855 |
Robert Buchholz. |
| 30856 |
|
| 30857 |
- bpo-32941: Allow :class:`mmap.mmap` objects to access the madvise() system |
| 30858 |
call (through :meth:`mmap.mmap.madvise`). |
| 30859 |
|
| 30860 |
- bpo-22102: Added support for ZIP files with disks set to 0. Such files are |
| 30861 |
commonly created by builtin tools on Windows when use ZIP64 extension. |
| 30862 |
Patch by Francisco Facioni. |
| 30863 |
|
| 30864 |
- bpo-32515: trace.py can now run modules via python3 -m trace -t --module |
| 30865 |
module_name |
| 30866 |
|
| 30867 |
- bpo-32299: Changed :func:`unittest.mock.patch.dict` to return the patched |
| 30868 |
dictionary when used as context manager. Patch by Vadim Tsander. |
| 30869 |
|
| 30870 |
- bpo-27141: Added a ``__copy__()`` to ``collections.UserList`` and |
| 30871 |
``collections.UserDict`` in order to correctly implement shallow copying |
| 30872 |
of the objects. Patch by Bar Harel. |
| 30873 |
|
| 30874 |
- bpo-31829: ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) are now |
| 30875 |
escaped in protocol 0 pickles of Unicode strings. This allows to load them |
| 30876 |
without loss from files open in text mode in Python 2. |
| 30877 |
|
| 30878 |
- bpo-23395: ``_thread.interrupt_main()`` now avoids setting the Python |
| 30879 |
error status if the ``SIGINT`` signal is ignored or not handled by Python. |
| 30880 |
|
| 30881 |
Documentation |
| 30882 |
------------- |
| 30883 |
|
| 30884 |
- bpo-36896: Clarify that some types have unstable constructor signature |
| 30885 |
between Python versions. |
| 30886 |
|
| 30887 |
- bpo-36686: Improve documentation of the stdin, stdout, and stderr |
| 30888 |
arguments of the ``asyncio.subprocess_exec`` function to specify which |
| 30889 |
values are supported. Also mention that decoding as text is not supported. |
| 30890 |
|
| 30891 |
Add a few tests to verify that the various values passed to the std* |
| 30892 |
arguments actually work. |
| 30893 |
|
| 30894 |
- bpo-36984: Improve version added references in ``typing`` module - by |
| 30895 |
Anthony Sottile. |
| 30896 |
|
| 30897 |
- bpo-36868: What's new now mentions SSLContext.hostname_checks_common_name |
| 30898 |
instead of SSLContext.host_flags. |
| 30899 |
|
| 30900 |
- bpo-35924: Add a note to the ``curses.addstr()`` documentation to warn |
| 30901 |
that multiline strings can cause segfaults because of an ncurses bug. |
| 30902 |
|
| 30903 |
- bpo-36783: Added C API Documentation for Time_FromTimeAndFold and |
| 30904 |
PyDateTime_FromDateAndTimeAndFold as per PEP 495. Patch by Edison |
| 30905 |
Abahurire. |
| 30906 |
|
| 30907 |
- bpo-36797: More of the legacy distutils documentation has been either |
| 30908 |
pruned, or else more clearly marked as being retained solely until the |
| 30909 |
setuptools documentation covers it independently. |
| 30910 |
|
| 30911 |
- bpo-22865: Add detail to the documentation on the ``pty.spawn`` function. |
| 30912 |
|
| 30913 |
- bpo-35397: Remove deprecation and document urllib.parse.unwrap(). Patch |
| 30914 |
contributed by Rémi Lapeyre. |
| 30915 |
|
| 30916 |
- bpo-32995: Added the context variable in glossary. |
| 30917 |
|
| 30918 |
- bpo-33519: Clarify that ``copy()`` is not part of the ``MutableSequence`` |
| 30919 |
ABC. |
| 30920 |
|
| 30921 |
- bpo-33482: Make ``codecs.StreamRecoder.writelines`` take a list of bytes. |
| 30922 |
|
| 30923 |
- bpo-25735: Added documentation for func factorial to indicate that returns |
| 30924 |
integer values |
| 30925 |
|
| 30926 |
- bpo-20285: Expand object.__doc__ (docstring) to make it clearer. Modify |
| 30927 |
pydoc.py so that help(object) lists object methods (for other classes, |
| 30928 |
help omits methods of the object base class.) |
| 30929 |
|
| 30930 |
Tests |
| 30931 |
----- |
| 30932 |
|
| 30933 |
- bpo-37069: Modify test_coroutines, test_cprofile, test_generators, |
| 30934 |
test_raise, test_ssl and test_yield_from to use |
| 30935 |
:func:`test.support.catch_unraisable_exception` rather than |
| 30936 |
:func:`test.support.captured_stderr`. |
| 30937 |
|
| 30938 |
- bpo-37098: Fix test_memfd_create on older Linux Kernels. |
| 30939 |
|
| 30940 |
- bpo-37081: Test with OpenSSL 1.1.1c |
| 30941 |
|
| 30942 |
- bpo-36829: Add :func:`test.support.catch_unraisable_exception`: context |
| 30943 |
manager catching unraisable exception using :func:`sys.unraisablehook`. |
| 30944 |
|
| 30945 |
- bpo-36915: The main regrtest process now always removes all temporary |
| 30946 |
directories of worker processes even if they crash or if they are killed |
| 30947 |
on KeyboardInterrupt (CTRL+c). |
| 30948 |
|
| 30949 |
- bpo-36719: "python3 -m test -jN ..." now continues the execution of next |
| 30950 |
tests when a worker process crash (CHILD_ERROR state). Previously, the |
| 30951 |
test suite stopped immediately. Use --failfast to stop at the first error. |
| 30952 |
|
| 30953 |
- bpo-36816: Update Lib/test/selfsigned_pythontestdotnet.pem to match |
| 30954 |
self-signed.pythontest.net's new TLS certificate. |
| 30955 |
|
| 30956 |
- bpo-35925: Skip httplib and nntplib networking tests when they would |
| 30957 |
otherwise fail due to a modern OS or distro with a default OpenSSL policy |
| 30958 |
of rejecting connections to servers with weak certificates. |
| 30959 |
|
| 30960 |
- bpo-36782: Add tests for several C API functions in the :mod:`datetime` |
| 30961 |
module. Patch by Edison Abahurire. |
| 30962 |
|
| 30963 |
- bpo-36342: Fix test_multiprocessing in test_venv if platform lacks |
| 30964 |
functioning sem_open. |
| 30965 |
|
| 30966 |
Build |
| 30967 |
----- |
| 30968 |
|
| 30969 |
- bpo-36721: To embed Python into an application, a new ``--embed`` option |
| 30970 |
must be passed to ``python3-config --libs --embed`` to get ``-lpython3.8`` |
| 30971 |
(link the application to libpython). To support both 3.8 and older, try |
| 30972 |
``python3-config --libs --embed`` first and fallback to ``python3-config |
| 30973 |
--libs`` (without ``--embed``) if the previous command fails. |
| 30974 |
|
| 30975 |
Add a pkg-config ``python-3.8-embed`` module to embed Python into an |
| 30976 |
application: ``pkg-config python-3.8-embed --libs`` includes |
| 30977 |
``-lpython3.8``. To support both 3.8 and older, try ``pkg-config |
| 30978 |
python-X.Y-embed --libs`` first and fallback to ``pkg-config python-X.Y |
| 30979 |
--libs`` (without ``--embed``) if the previous command fails (replace |
| 30980 |
``X.Y`` with the Python version). |
| 30981 |
|
| 30982 |
On the other hand, ``pkg-config python3.8 --libs`` no longer contains |
| 30983 |
``-lpython3.8``. C extensions must not be linked to libpython (except on |
| 30984 |
Android, case handled by the script); this change is backward incompatible |
| 30985 |
on purpose. |
| 30986 |
|
| 30987 |
- bpo-36786: "make install" now runs compileall in parallel. |
| 30988 |
|
| 30989 |
Windows |
| 30990 |
------- |
| 30991 |
|
| 30992 |
- bpo-36965: include of STATUS_CONTROL_C_EXIT without depending on MSC |
| 30993 |
compiler |
| 30994 |
|
| 30995 |
- bpo-35926: Update to OpenSSL 1.1.1b for Windows. |
| 30996 |
|
| 30997 |
- bpo-29883: Add Windows support for UDP transports for the Proactor Event |
| 30998 |
Loop. Patch by Adam Meily. |
| 30999 |
|
| 31000 |
- bpo-33407: The :c:macro:`Py_DEPRECATED()` macro has been implemented for |
| 31001 |
MSVC. |
| 31002 |
|
| 31003 |
macOS |
| 31004 |
----- |
| 31005 |
|
| 31006 |
- bpo-36231: Support building Python on macOS without /usr/include |
| 31007 |
installed. As of macOS 10.14, system header files are only available |
| 31008 |
within an SDK provided by either the Command Line Tools or the Xcode app. |
| 31009 |
|
| 31010 |
IDLE |
| 31011 |
---- |
| 31012 |
|
| 31013 |
- bpo-35610: Replace now redundant .context_use_ps1 with .prompt_last_line. |
| 31014 |
This finishes change started in bpo-31858. |
| 31015 |
|
| 31016 |
- bpo-37038: Make idlelib.run runnable; add test clause. |
| 31017 |
|
| 31018 |
- bpo-36958: Print any argument other than None or int passed to SystemExit |
| 31019 |
or sys.exit(). |
| 31020 |
|
| 31021 |
- bpo-36807: When saving a file, call os.fsync() so bits are flushed to e.g. |
| 31022 |
USB drive. |
| 31023 |
|
| 31024 |
- bpo-32411: In browser.py, remove extraneous sorting by line number since |
| 31025 |
dictionary was created in line number order. |
| 31026 |
|
| 31027 |
Tools/Demos |
| 31028 |
----------- |
| 31029 |
|
| 31030 |
- bpo-37053: Handle strings like u"bar" correctly in |
| 31031 |
Tools/parser/unparse.py. Patch by Chih-Hsuan Yen. |
| 31032 |
|
| 31033 |
C API |
| 31034 |
----- |
| 31035 |
|
| 31036 |
- bpo-36763: Implement the :pep:`587` "Python Initialization Configuration". |
| 31037 |
|
| 31038 |
- bpo-36379: Fix crashes when attempting to use the *modulo* parameter when |
| 31039 |
``__ipow__`` is implemented in C. |
| 31040 |
|
| 31041 |
- bpo-37107: Update :c:func:`PyObject_CallMethodObjArgs` and |
| 31042 |
``_PyObject_CallMethodIdObjArgs`` to use ``_PyObject_GetMethod`` to avoid |
| 31043 |
creating a bound method object in many cases. Patch by Michael J. |
| 31044 |
Sullivan. |
| 31045 |
|
| 31046 |
- bpo-36974: Implement :pep:`590`: Vectorcall: a fast calling protocol for |
| 31047 |
CPython. This is a new protocol to optimize calls of custom callable |
| 31048 |
objects. |
| 31049 |
|
| 31050 |
- bpo-36763: ``Py_Main()`` now returns the exitcode rather than calling |
| 31051 |
``Py_Exit(exitcode)`` when calling ``PyErr_Print()`` if the current |
| 31052 |
exception type is ``SystemExit``. |
| 31053 |
|
| 31054 |
- bpo-36922: Add new type flag ``Py_TPFLAGS_METHOD_DESCRIPTOR`` for objects |
| 31055 |
behaving like unbound methods. These are objects supporting the |
| 31056 |
optimization given by the ``LOAD_METHOD``/``CALL_METHOD`` opcodes. See PEP |
| 31057 |
590. |
| 31058 |
|
| 31059 |
- bpo-36728: The :c:func:`!PyEval_ReInitThreads` function has been removed |
| 31060 |
from the C API. It should not be called explicitly: use |
| 31061 |
:c:func:`PyOS_AfterFork_Child` instead. |
| 31062 |
|
| 31063 |
|
| 31064 |
What's New in Python 3.8.0 alpha 4? |
| 31065 |
=================================== |
| 31066 |
|
| 31067 |
*Release date: 2019-05-06* |
| 31068 |
|
| 31069 |
Security |
| 31070 |
-------- |
| 31071 |
|
| 31072 |
- bpo-36742: Fixes mishandling of pre-normalization characters in |
| 31073 |
urlsplit(). |
| 31074 |
|
| 31075 |
- bpo-30458: Address :cve:`2019-9740` by disallowing URL paths with embedded |
| 31076 |
whitespace or control characters through into the underlying http client |
| 31077 |
request. Such potentially malicious header injection URLs now cause an |
| 31078 |
http.client.InvalidURL exception to be raised. |
| 31079 |
|
| 31080 |
- bpo-35755: :func:`shutil.which` now uses ``os.confstr("CS_PATH")`` if |
| 31081 |
available and if the :envvar:`PATH` environment variable is not set. |
| 31082 |
Remove also the current directory from :data:`posixpath.defpath`. On Unix, |
| 31083 |
:func:`shutil.which` and the :mod:`subprocess` module no longer search the |
| 31084 |
executable in the current directory if the :envvar:`PATH` environment |
| 31085 |
variable is not set. |
| 31086 |
|
| 31087 |
Core and Builtins |
| 31088 |
----------------- |
| 31089 |
|
| 31090 |
- bpo-36722: In debug build, import now also looks for C extensions compiled |
| 31091 |
in release mode and for C extensions compiled in the stable ABI. |
| 31092 |
|
| 31093 |
- bpo-32849: Fix Python Initialization code on FreeBSD to detect properly |
| 31094 |
when stdin file descriptor (fd 0) is invalid. |
| 31095 |
|
| 31096 |
- bpo-36623: Remove parser headers and related function declarations that |
| 31097 |
lack implementations after the removal of pgen. |
| 31098 |
|
| 31099 |
- bpo-20180: ``dict.pop()`` is now up to 33% faster thanks to Argument |
| 31100 |
Clinic. Patch by Inada Naoki. |
| 31101 |
|
| 31102 |
- bpo-36611: Debug memory allocators: disable serialno field by default from |
| 31103 |
debug hooks on Python memory allocators to reduce the memory footprint by |
| 31104 |
5%. Enable :mod:`tracemalloc` to get the traceback where a memory block |
| 31105 |
has been allocated when a fatal memory error is logged to decide where to |
| 31106 |
put a breakpoint. Compile Python with ``PYMEM_DEBUG_SERIALNO`` defined to |
| 31107 |
get back the field. |
| 31108 |
|
| 31109 |
- bpo-36588: On AIX, :data:`sys.platform` doesn't contain the major version |
| 31110 |
anymore. Always return ``'aix'``, instead of ``'aix3'`` .. ``'aix7'``. |
| 31111 |
Since older Python versions include the version number, it is recommended |
| 31112 |
to always use ``sys.platform.startswith('aix')``. Contributed by M. Felt. |
| 31113 |
|
| 31114 |
- bpo-36549: Change str.capitalize to use titlecase for the first character |
| 31115 |
instead of uppercase. |
| 31116 |
|
| 31117 |
- bpo-36540: Implement :pep:`570` (Python positional-only parameters). Patch |
| 31118 |
by Pablo Galindo. |
| 31119 |
|
| 31120 |
- bpo-36475: :c:func:`!PyEval_AcquireLock` and |
| 31121 |
:c:func:`!PyEval_AcquireThread` now terminate the current thread if called |
| 31122 |
while the interpreter is finalizing, making them consistent with |
| 31123 |
:c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, and |
| 31124 |
:c:func:`PyGILState_Ensure`. |
| 31125 |
|
| 31126 |
- bpo-36504: Fix signed integer overflow in _ctypes.c's |
| 31127 |
``PyCArrayType_new()``. |
| 31128 |
|
| 31129 |
- bpo-20844: Fix running script with encoding cookie and LF line ending may |
| 31130 |
fail on Windows. |
| 31131 |
|
| 31132 |
- bpo-24214: Fixed support of the surrogatepass error handler in the UTF-8 |
| 31133 |
incremental decoder. |
| 31134 |
|
| 31135 |
- bpo-36452: Changing ``dict`` keys during iteration of the dict itself, |
| 31136 |
``keys()``, ``values()``, or ``items()`` will now be detected in certain |
| 31137 |
corner cases where keys are deleted/added so that the number of keys isn't |
| 31138 |
changed. A ``RuntimeError`` will be raised after ``len(dict)`` iterations. |
| 31139 |
Contributed by Thomas Perl. |
| 31140 |
|
| 31141 |
- bpo-36459: Fix a possible double ``PyMem_FREE()`` due to tokenizer.c's |
| 31142 |
``tok_nextc()``. |
| 31143 |
|
| 31144 |
- bpo-36433: Fixed TypeError message in classmethoddescr_call. |
| 31145 |
|
| 31146 |
- bpo-36430: Fix a possible reference leak in :func:`itertools.count`. |
| 31147 |
|
| 31148 |
- bpo-36440: Include node names in ``ParserError`` messages, instead of |
| 31149 |
numeric IDs. Patch by A. Skrobov. |
| 31150 |
|
| 31151 |
- bpo-36143: Regenerate :mod:`keyword` from the Grammar and Tokens file |
| 31152 |
using pgen. Patch by Pablo Galindo. |
| 31153 |
|
| 31154 |
- bpo-18372: Add missing :c:func:`PyObject_GC_Track` calls in the |
| 31155 |
:mod:`pickle` module. Patch by Zackery Spytz. |
| 31156 |
|
| 31157 |
Library |
| 31158 |
------- |
| 31159 |
|
| 31160 |
- bpo-35952: Fix pythoninfo when the compiler is missing. |
| 31161 |
|
| 31162 |
- bpo-28238: The ``.find*()`` methods of xml.etree.ElementTree can now |
| 31163 |
search for wildcards like ``{*}tag`` and ``{ns}*`` that match a tag in any |
| 31164 |
namespace or all tags in a namespace. Patch by Stefan Behnel. |
| 31165 |
|
| 31166 |
- bpo-26978: ``pathlib.path.link_to()`` is now implemented. It creates a |
| 31167 |
hard link pointing to a path. |
| 31168 |
|
| 31169 |
- bpo-1613500: :class:`fileinput.FileInput` now uses the input file mode to |
| 31170 |
correctly set the output file mode (previously it was hardcoded to |
| 31171 |
``'w'``) when ``inplace=True`` is passed to its constructor. |
| 31172 |
|
| 31173 |
- bpo-36734: Fix compilation of ``faulthandler.c`` on HP-UX. Initialize |
| 31174 |
``stack_t current_stack`` to zero using ``memset()``. |
| 31175 |
|
| 31176 |
- bpo-13611: The xml.etree.ElementTree packages gained support for C14N 2.0 |
| 31177 |
serialisation. Patch by Stefan Behnel. |
| 31178 |
|
| 31179 |
- bpo-36669: Add missing matrix multiplication operator support to |
| 31180 |
weakref.proxy. |
| 31181 |
|
| 31182 |
- bpo-36676: The XMLParser() in xml.etree.ElementTree provides namespace |
| 31183 |
prefix context to the parser target if it defines the callback methods |
| 31184 |
"start_ns()" and/or "end_ns()". Patch by Stefan Behnel. |
| 31185 |
|
| 31186 |
- bpo-36673: The TreeBuilder and XMLPullParser in xml.etree.ElementTree |
| 31187 |
gained support for parsing comments and processing instructions. Patch by |
| 31188 |
Stefan Behnel. |
| 31189 |
|
| 31190 |
- bpo-36650: The C version of functools.lru_cache() was treating calls with |
| 31191 |
an empty ``**kwargs`` dictionary as being distinct from calls with no |
| 31192 |
keywords at all. This did not result in an incorrect answer, but it did |
| 31193 |
trigger an unexpected cache miss. |
| 31194 |
|
| 31195 |
- bpo-28552: Fix ``distutils.sysconfig`` if :data:`sys.executable` is |
| 31196 |
``None`` or an empty string: use :func:`os.getcwd` to initialize |
| 31197 |
``project_base``. Fix also the distutils build command: don't use |
| 31198 |
:data:`sys.executable` if it is ``None`` or an empty string. |
| 31199 |
|
| 31200 |
- bpo-35755: :func:`shutil.which` and ``distutils.spawn.find_executable`` |
| 31201 |
now use ``os.confstr("CS_PATH")`` if available instead of |
| 31202 |
:data:`os.defpath`, if the ``PATH`` environment variable is not set. |
| 31203 |
Moreover, don't use ``os.confstr("CS_PATH")`` nor :data:`os.defpath` if |
| 31204 |
the ``PATH`` environment variable is set to an empty string. |
| 31205 |
|
| 31206 |
- bpo-25430: improve performance of ``IPNetwork.__contains__()`` |
| 31207 |
|
| 31208 |
- bpo-30485: Path expressions in xml.etree.ElementTree can now avoid |
| 31209 |
explicit namespace prefixes for tags (or the "{namespace}tag" notation) by |
| 31210 |
passing a default namespace with an empty string prefix. |
| 31211 |
|
| 31212 |
- bpo-36613: Fix :mod:`asyncio` wait() not removing callback if exception |
| 31213 |
|
| 31214 |
- bpo-36598: Fix ``isinstance`` check for Mock objects with spec when the |
| 31215 |
code is executed under tracing. Patch by Karthikeyan Singaravelan. |
| 31216 |
|
| 31217 |
- bpo-18748: In development mode (:option:`-X` ``dev``) and in debug build, |
| 31218 |
the :class:`io.IOBase` destructor now logs ``close()`` exceptions. These |
| 31219 |
exceptions are silent by default in release mode. |
| 31220 |
|
| 31221 |
- bpo-36575: The ``_lsprof`` module now uses internal timer same to |
| 31222 |
``time.perf_counter()`` by default. ``gettimeofday(2)`` was used on Unix. |
| 31223 |
New timer has better resolution on most Unix platforms and timings are no |
| 31224 |
longer impacted by system clock updates since ``perf_counter()`` is |
| 31225 |
monotonic. Patch by Inada Naoki. |
| 31226 |
|
| 31227 |
- bpo-33461: ``json.loads`` now emits ``DeprecationWarning`` when |
| 31228 |
``encoding`` option is specified. Patch by Matthias Bussonnier. |
| 31229 |
|
| 31230 |
- bpo-36559: The random module now prefers the lean internal _sha512 module |
| 31231 |
over hashlib for seed(version=2) to optimize import time. |
| 31232 |
|
| 31233 |
- bpo-17561: Set backlog=None as the default for socket.create_server. |
| 31234 |
|
| 31235 |
- bpo-34373: Fix :func:`time.mktime` error handling on AIX for year before |
| 31236 |
1970. |
| 31237 |
|
| 31238 |
- bpo-36232: Improve error message when trying to open existing DBM database |
| 31239 |
that actually doesn't exist. Patch by Marco Rougeth. |
| 31240 |
|
| 31241 |
- bpo-36546: Add statistics.quantiles() |
| 31242 |
|
| 31243 |
- bpo-36050: Optimized ``http.client.HTTPResponse.read()`` for large |
| 31244 |
response. Patch by Inada Naoki. |
| 31245 |
|
| 31246 |
- bpo-36522: If *debuglevel* is set to >0 in :mod:`http.client`, print all |
| 31247 |
values for headers with multiple values for the same header name. Patch by |
| 31248 |
Matt Houglum. |
| 31249 |
|
| 31250 |
- bpo-36492: Deprecated passing required arguments like *func* as keyword |
| 31251 |
arguments in functions which should accept arbitrary keyword arguments and |
| 31252 |
pass them to other function. Arbitrary keyword arguments (even with names |
| 31253 |
"self" and "func") can now be passed to these functions if the required |
| 31254 |
arguments are passed as positional arguments. |
| 31255 |
|
| 31256 |
- bpo-27181: Add statistics.geometric_mean(). |
| 31257 |
|
| 31258 |
- bpo-30427: ``os.path.normcase()`` relies on ``os.fspath()`` to check the |
| 31259 |
type of its argument. Redundant checks have been removed from its |
| 31260 |
``posixpath.normcase()`` and ``ntpath.normcase()`` implementations. Patch |
| 31261 |
by Wolfgang Maier. |
| 31262 |
|
| 31263 |
- bpo-36385: Stop rejecting IPv4 octets for being ambiguously octal. Leading |
| 31264 |
zeros are ignored, and no longer are assumed to specify octal octets. |
| 31265 |
Octets are always decimal numbers. Octets must still be no more than three |
| 31266 |
digits, including leading zeroes. |
| 31267 |
|
| 31268 |
- bpo-36434: Errors during writing to a ZIP file no longer prevent to |
| 31269 |
properly close it. |
| 31270 |
|
| 31271 |
- bpo-36407: Fixed wrong indentation writing for CDATA section in |
| 31272 |
xml.dom.minidom. Patch by Vladimir Surjaninov. |
| 31273 |
|
| 31274 |
- bpo-36326: inspect.getdoc() can now find docstrings for member objects |
| 31275 |
when __slots__ is a dictionary. |
| 31276 |
|
| 31277 |
- bpo-36366: Calling ``stop()`` on an unstarted or stopped |
| 31278 |
:func:`unittest.mock.patch` object will now return ``None`` instead of |
| 31279 |
raising :exc:`RuntimeError`, making the method idempotent. Patch by |
| 31280 |
Karthikeyan Singaravelan. |
| 31281 |
|
| 31282 |
- bpo-36348: The :meth:`imap.IMAP4.logout` method no longer ignores silently |
| 31283 |
arbitrary exceptions. |
| 31284 |
|
| 31285 |
- bpo-31904: Add time module support and fix test_time failures for VxWorks. |
| 31286 |
|
| 31287 |
- bpo-36227: Added support for keyword arguments ``default_namespace`` and |
| 31288 |
``xml_declaration`` in functions ``ElementTree.tostring()`` and |
| 31289 |
``ElementTree.tostringlist()``. |
| 31290 |
|
| 31291 |
- bpo-36004: Added new alternate constructors |
| 31292 |
:meth:`datetime.date.fromisocalendar` and |
| 31293 |
:meth:`datetime.datetime.fromisocalendar`, which construct date objects |
| 31294 |
from ISO year, week number and weekday; these are the inverse of each |
| 31295 |
class's ``isocalendar`` method. Patch by Paul Ganssle. |
| 31296 |
|
| 31297 |
- bpo-35936: :mod:`modulefinder` no longer depends on the deprecated |
| 31298 |
:mod:`imp` module, and the initializer for |
| 31299 |
:class:`modulefinder.ModuleFinder` now has immutable default arguments. |
| 31300 |
Patch by Brandt Bucher. |
| 31301 |
|
| 31302 |
- bpo-35376: :mod:`modulefinder` correctly handles modules that have the |
| 31303 |
same name as a bad package. Patch by Brandt Bucher. |
| 31304 |
|
| 31305 |
- bpo-17396: :mod:`modulefinder` no longer crashes when encountering syntax |
| 31306 |
errors in followed imports. Patch by Brandt Bucher. |
| 31307 |
|
| 31308 |
- bpo-35934: Added :meth:`~socket.create_server` and |
| 31309 |
:meth:`~socket.has_dualstack_ipv6` convenience functions to automate the |
| 31310 |
necessary tasks usually involved when creating a server socket, including |
| 31311 |
accepting both IPv4 and IPv6 connections on the same socket. (Contributed |
| 31312 |
by Giampaolo Rodola in :issue:`17561`.) |
| 31313 |
|
| 31314 |
- bpo-23078: Add support for :func:`classmethod` and :func:`staticmethod` to |
| 31315 |
:func:`unittest.mock.create_autospec`. Initial patch by Felipe Ochoa. |
| 31316 |
|
| 31317 |
- bpo-35416: Fix potential resource warnings in distutils. Patch by Mickaël |
| 31318 |
Schoentgen. |
| 31319 |
|
| 31320 |
- bpo-25451: Add transparency methods to :class:`tkinter.PhotoImage`. Patch |
| 31321 |
by Zackery Spytz. |
| 31322 |
|
| 31323 |
- bpo-35082: Don't return deleted attributes when calling dir on a |
| 31324 |
:class:`unittest.mock.Mock`. |
| 31325 |
|
| 31326 |
- bpo-34547: :class:`wsgiref.handlers.BaseHandler` now handles abrupt client |
| 31327 |
connection terminations gracefully. Patch by Petter Strandmark. |
| 31328 |
|
| 31329 |
- bpo-31658: :func:`xml.sax.parse` now supports :term:`path-like <path-like |
| 31330 |
object>`. Patch by Mickaël Schoentgen. |
| 31331 |
|
| 31332 |
- bpo-34139: Remove stale unix datagram socket before binding |
| 31333 |
|
| 31334 |
- bpo-33530: Implemented Happy Eyeballs in ``asyncio.create_connection()``. |
| 31335 |
Added two new arguments, *happy_eyeballs_delay* and *interleave*, to |
| 31336 |
specify Happy Eyeballs behavior. |
| 31337 |
|
| 31338 |
- bpo-33291: Do not raise AttributeError when calling the inspect functions |
| 31339 |
isgeneratorfunction, iscoroutinefunction, isasyncgenfunction on a method |
| 31340 |
created from an arbitrary callable. Instead, return False. |
| 31341 |
|
| 31342 |
- bpo-31310: Fix the multiprocessing.semaphore_tracker so it is reused by |
| 31343 |
child processes |
| 31344 |
|
| 31345 |
- bpo-31292: Fix ``setup.py check --restructuredtext`` for files containing |
| 31346 |
``include`` directives. |
| 31347 |
|
| 31348 |
Documentation |
| 31349 |
------------- |
| 31350 |
|
| 31351 |
- bpo-36625: Remove obsolete comments from docstrings in fractions.Fraction |
| 31352 |
|
| 31353 |
- bpo-30840: Document relative imports |
| 31354 |
|
| 31355 |
- bpo-36523: Add docstring for io.IOBase.writelines(). |
| 31356 |
|
| 31357 |
- bpo-36425: New documentation translation: `Simplified Chinese |
| 31358 |
<https://docs.python.org/zh-cn/>`_. |
| 31359 |
|
| 31360 |
- bpo-36345: Avoid the duplication of code from ``Tools/scripts/serve.py`` |
| 31361 |
in using the :rst:dir:`literalinclude` directive for the basic |
| 31362 |
wsgiref-based web server in the documentation of :mod:`wsgiref`. |
| 31363 |
Contributed by Stéphane Wirtel. |
| 31364 |
|
| 31365 |
- bpo-36345: Using the code of the ``Tools/scripts/serve.py`` script as an |
| 31366 |
example in the :mod:`wsgiref` documentation. Contributed by Stéphane |
| 31367 |
Wirtel. |
| 31368 |
|
| 31369 |
- bpo-36157: Added documentation for PyInterpreterState_Main(). |
| 31370 |
|
| 31371 |
- bpo-33043: Updates the docs.python.org page with the addition of a |
| 31372 |
'Contributing to Docs' link at the end of the page (between 'Reporting |
| 31373 |
Bugs' and 'About Documentation'). Updates the 'Found a Bug' page with |
| 31374 |
additional links and information in the Documentation Bugs section. |
| 31375 |
|
| 31376 |
- bpo-35581: @typing.type_check_only now allows type stubs to mark functions |
| 31377 |
and classes not available during runtime. |
| 31378 |
|
| 31379 |
- bpo-33832: Add glossary entry for 'magic method'. |
| 31380 |
|
| 31381 |
- bpo-32913: Added re.Match.groupdict example to regex HOWTO. |
| 31382 |
|
| 31383 |
Tests |
| 31384 |
----- |
| 31385 |
|
| 31386 |
- bpo-36719: regrtest now always detects uncollectable objects. Previously, |
| 31387 |
the check was only enabled by ``--findleaks``. The check now also works |
| 31388 |
with ``-jN/--multiprocess N``. ``--findleaks`` becomes a deprecated alias |
| 31389 |
to ``--fail-env-changed``. |
| 31390 |
|
| 31391 |
- bpo-36725: When using multiprocessing mode (-jN), regrtest now better |
| 31392 |
reports errors if a worker process fails, and it exits immediately on a |
| 31393 |
worker thread failure or when interrupted. |
| 31394 |
|
| 31395 |
- bpo-36454: Change test_time.test_monotonic() to test only the lower bound |
| 31396 |
of elapsed time after a sleep command rather than the upper bound. This |
| 31397 |
prevents unnecessary test failures on slow buildbots. Patch by Victor |
| 31398 |
Stinner. |
| 31399 |
|
| 31400 |
- bpo-32424: Improve test coverage for xml.etree.ElementTree. Patch by |
| 31401 |
Gordon P. Hemsley. |
| 31402 |
|
| 31403 |
- bpo-32424: Fix typo in test_cyclic_gc() test for xml.etree.ElementTree. |
| 31404 |
Patch by Gordon P. Hemsley. |
| 31405 |
|
| 31406 |
- bpo-36635: Add a new :mod:`!_testinternalcapi` module to test the internal |
| 31407 |
C API. |
| 31408 |
|
| 31409 |
- bpo-36629: Fix ``test_imap4_host_default_value()`` of ``test_imaplib``: |
| 31410 |
catch also :const:`errno.ENETUNREACH` error. |
| 31411 |
|
| 31412 |
- bpo-36611: Fix ``test_sys.test_getallocatedblocks()`` when |
| 31413 |
:mod:`tracemalloc` is enabled. |
| 31414 |
|
| 31415 |
- bpo-36560: Fix reference leak hunting in regrtest: compute also deltas (of |
| 31416 |
reference count, allocated memory blocks, file descriptor count) during |
| 31417 |
warmup, to ensure that everything is initialized before starting to hunt |
| 31418 |
reference leaks. |
| 31419 |
|
| 31420 |
- bpo-36565: Fix reference hunting (``python3 -m test -R 3:3``) when Python |
| 31421 |
has no built-in abc module. |
| 31422 |
|
| 31423 |
- bpo-31904: Port test_resource to VxWorks: skip tests cases setting |
| 31424 |
RLIMIT_FSIZE and RLIMIT_CPU. |
| 31425 |
|
| 31426 |
- bpo-31904: Fix test_tabnanny on VxWorks: adjust ENOENT error message. |
| 31427 |
|
| 31428 |
- bpo-36436: Fix ``_testcapi.pymem_buffer_overflow()``: handle memory |
| 31429 |
allocation failure. |
| 31430 |
|
| 31431 |
- bpo-31904: Fix test_utf8_mode on VxWorks: Python always use UTF-8 on |
| 31432 |
VxWorks. |
| 31433 |
|
| 31434 |
- bpo-36341: Fix tests that may fail with PermissionError upon calling |
| 31435 |
bind() on AF_UNIX sockets. |
| 31436 |
|
| 31437 |
Build |
| 31438 |
----- |
| 31439 |
|
| 31440 |
- bpo-36747: Remove the stale scriptsinstall Makefile target. |
| 31441 |
|
| 31442 |
- bpo-21536: On Unix, C extensions are no longer linked to libpython except |
| 31443 |
on Android and Cygwin. |
| 31444 |
|
| 31445 |
It is now possible for a statically linked Python to load a C extension |
| 31446 |
built using a shared library Python. |
| 31447 |
|
| 31448 |
When Python is embedded, ``libpython`` must not be loaded with |
| 31449 |
``RTLD_LOCAL``, but ``RTLD_GLOBAL`` instead. Previously, using |
| 31450 |
``RTLD_LOCAL``, it was already not possible to load C extensions which |
| 31451 |
were not linked to ``libpython``, such as C extensions of the standard |
| 31452 |
library built by the ``*shared*`` section of ``Modules/Setup``. |
| 31453 |
|
| 31454 |
distutils, python-config and python-config.py have been modified. |
| 31455 |
|
| 31456 |
- bpo-36707: ``./configure --with-pymalloc`` no longer adds the ``m`` flag |
| 31457 |
to SOABI (sys.implementation.cache_tag). Enabling or disabling pymalloc |
| 31458 |
has no impact on the ABI. |
| 31459 |
|
| 31460 |
- bpo-36635: Change ``PyAPI_FUNC(type)``, ``PyAPI_DATA(type)`` and |
| 31461 |
``PyMODINIT_FUNC`` macros of ``pyport.h`` when ``Py_BUILD_CORE_MODULE`` is |
| 31462 |
defined. The ``Py_BUILD_CORE_MODULE`` define must be now be used to build |
| 31463 |
a C extension as a dynamic library accessing Python internals: export the |
| 31464 |
:samp:`PyInit_{xxx}()` function in DLL exports on Windows. |
| 31465 |
|
| 31466 |
- bpo-31904: Don't build the ``_crypt`` extension on VxWorks. |
| 31467 |
|
| 31468 |
- bpo-36618: Add ``-fmax-type-align=8`` to CFLAGS when clang compiler is |
| 31469 |
detected. The pymalloc memory allocator aligns memory on 8 bytes. On |
| 31470 |
x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS |
| 31471 |
instruction which can lead to segmentation fault. Instruct clang that |
| 31472 |
Python is limited to alignment on 8 bytes to use MOVUPS instruction |
| 31473 |
instead: slower but don't trigger a SIGSEGV if the memory is not aligned |
| 31474 |
on 16 bytes. Sadly, the flag must be added to ``CFLAGS`` and not just |
| 31475 |
``CFLAGS_NODIST``, since third party C extensions can have the same issue. |
| 31476 |
|
| 31477 |
- bpo-36605: ``make tags`` and ``make TAGS`` now also parse |
| 31478 |
``Modules/_io/*.c`` and ``Modules/_io/*.h``. |
| 31479 |
|
| 31480 |
- bpo-36465: Release builds and debug builds are now ABI compatible: |
| 31481 |
defining the ``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` |
| 31482 |
macro, which introduces the only ABI incompatibility. The |
| 31483 |
``Py_TRACE_REFS`` macro, which adds the :func:`sys.getobjects` function |
| 31484 |
and the :envvar:`PYTHONDUMPREFS` environment variable, can be set using |
| 31485 |
the new ``./configure --with-trace-refs`` build option. |
| 31486 |
|
| 31487 |
- bpo-36577: setup.py now correctly reports missing OpenSSL headers and |
| 31488 |
libraries again. |
| 31489 |
|
| 31490 |
- bpo-36544: Fix regression introduced in bpo-36146 refactoring setup.py |
| 31491 |
|
| 31492 |
- bpo-36508: ``python-config --ldflags`` no longer includes flags of the |
| 31493 |
``LINKFORSHARED`` variable. The ``LINKFORSHARED`` variable must only be |
| 31494 |
used to build executables. |
| 31495 |
|
| 31496 |
- bpo-36503: Remove references to "aix3" and "aix4". Patch by M. Felt. |
| 31497 |
|
| 31498 |
Windows |
| 31499 |
------- |
| 31500 |
|
| 31501 |
- bpo-35920: Added platform.win32_edition() and platform.win32_is_iot(). |
| 31502 |
Added support for cross-compiling packages for Windows ARM32. Skip tests |
| 31503 |
that are not expected to work on Windows IoT Core ARM32. |
| 31504 |
|
| 31505 |
- bpo-36649: Remove trailing spaces for registry keys when installed via the |
| 31506 |
Store. |
| 31507 |
|
| 31508 |
- bpo-34144: Fixed activate.bat to correctly update codepage when chcp.com |
| 31509 |
returns dots in output. Patch by Lorenz Mende. |
| 31510 |
|
| 31511 |
- bpo-36509: Added preset-iot layout for Windows IoT ARM containers. This |
| 31512 |
layout doesn't contain UI components like tkinter or IDLE. It also doesn't |
| 31513 |
contain files to support on-target builds since Windows ARM32 builds must |
| 31514 |
be cross-compiled when using MSVC. |
| 31515 |
|
| 31516 |
- bpo-35941: enum_certificates function of the ssl module now returns |
| 31517 |
certificates from all available certificate stores inside windows in a |
| 31518 |
query instead of returning only certificates from the system wide |
| 31519 |
certificate store. This includes certificates from these certificate |
| 31520 |
stores: local machine, local machine enterprise, local machine group |
| 31521 |
policy, current user, current user group policy, services, users. |
| 31522 |
ssl.enum_crls() function is changed in the same way to return all |
| 31523 |
certificate revocation lists inside the windows certificate revocation |
| 31524 |
list stores. |
| 31525 |
|
| 31526 |
- bpo-36441: Fixes creating a venv when debug binaries are installed. |
| 31527 |
|
| 31528 |
- bpo-36085: Enable better DLL resolution on Windows by using safe DLL |
| 31529 |
search paths and adding :func:`os.add_dll_directory`. |
| 31530 |
|
| 31531 |
- bpo-36010: Add the venv standard library module to the nuget distribution |
| 31532 |
for Windows. |
| 31533 |
|
| 31534 |
- bpo-29515: Add the following socket module constants on Windows: |
| 31535 |
IPPROTO_AH IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_ESP |
| 31536 |
IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_HOPOPTS IPPROTO_ICLFXBM |
| 31537 |
IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGMP IPPROTO_IGP IPPROTO_IPV4 |
| 31538 |
IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_ND IPPROTO_NONE IPPROTO_PGM |
| 31539 |
IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_SCTP |
| 31540 |
IPPROTO_ST |
| 31541 |
|
| 31542 |
- bpo-35947: Added current version of libffi to cpython-source-deps. Change |
| 31543 |
_ctypes to use current version of libffi on Windows. |
| 31544 |
|
| 31545 |
- bpo-34060: Report system load when running test suite on Windows. Patch by |
| 31546 |
Ammar Askar. Based on prior work by Jeremy Kloth. |
| 31547 |
|
| 31548 |
- bpo-31512: With the Windows 10 Creators Update, non-elevated users can now |
| 31549 |
create symlinks as long as the computer has Developer Mode enabled. |
| 31550 |
|
| 31551 |
macOS |
| 31552 |
----- |
| 31553 |
|
| 31554 |
- bpo-34602: Avoid failures setting macOS stack resource limit with |
| 31555 |
resource.setrlimit. This reverts an earlier fix for bpo-18075 which forced |
| 31556 |
a non-default stack size when building the interpreter executable on |
| 31557 |
macOS. |
| 31558 |
|
| 31559 |
IDLE |
| 31560 |
---- |
| 31561 |
|
| 31562 |
- bpo-36429: Fix starting IDLE with pyshell. Add idlelib.pyshell alias at |
| 31563 |
top; remove pyshell alias at bottom. Remove obsolete __name__=='__main__' |
| 31564 |
command. |
| 31565 |
|
| 31566 |
Tools/Demos |
| 31567 |
----------- |
| 31568 |
|
| 31569 |
- bpo-14546: Fix the argument handling in Tools/scripts/lll.py. |
| 31570 |
|
| 31571 |
C API |
| 31572 |
----- |
| 31573 |
|
| 31574 |
- bpo-36763: Fix memory leak in :c:func:`!Py_SetStandardStreamEncoding`: |
| 31575 |
release memory if the function is called twice. |
| 31576 |
|
| 31577 |
- bpo-36641: :c:expr:`PyDoc_VAR(name)` and :c:expr:`PyDoc_STRVAR(name,str)` |
| 31578 |
now create ``static const char name[]`` instead of ``static char name[]``. |
| 31579 |
Patch by Inada Naoki. |
| 31580 |
|
| 31581 |
- bpo-36389: Change the value of ``CLEANBYTE``, ``DEADDYTE`` and |
| 31582 |
``FORBIDDENBYTE`` internal constants used by debug hooks on Python memory |
| 31583 |
allocators (:c:func:`PyMem_SetupDebugHooks` function). Byte patterns |
| 31584 |
``0xCB``, ``0xDB`` and ``0xFB`` have been replaced with ``0xCD``, ``0xDD`` |
| 31585 |
and ``0xFD`` to use the same values than Windows CRT debug ``malloc()`` |
| 31586 |
and ``free()``. |
| 31587 |
|
| 31588 |
- bpo-36443: Since Python 3.7.0, calling :c:func:`Py_DecodeLocale` before |
| 31589 |
:c:func:`Py_Initialize` produces mojibake if the ``LC_CTYPE`` locale is |
| 31590 |
coerced and/or if the UTF-8 Mode is enabled by the user configuration. The |
| 31591 |
LC_CTYPE coercion and UTF-8 Mode are now disabled by default to fix the |
| 31592 |
mojibake issue. They must now be enabled explicitly (opt-in) using the new |
| 31593 |
:c:func:`!_Py_PreInitialize` API with ``_PyPreConfig``. |
| 31594 |
|
| 31595 |
- bpo-36025: Fixed an accidental change to the datetime C API where the |
| 31596 |
arguments to the :c:func:`PyDate_FromTimestamp` function were incorrectly |
| 31597 |
interpreted as a single timestamp rather than an arguments tuple, which |
| 31598 |
causes existing code to start raising :exc:`TypeError`. The |
| 31599 |
backwards-incompatible change was only present in alpha releases of Python |
| 31600 |
3.8. Patch by Paul Ganssle. |
| 31601 |
|
| 31602 |
- bpo-35810: Modify ``PyObject_Init`` to correctly increase the refcount of |
| 31603 |
heap-allocated Type objects. Also fix the refcounts of the heap-allocated |
| 31604 |
types that were either doing this manually or not decreasing the type's |
| 31605 |
refcount in tp_dealloc |
| 31606 |
|
| 31607 |
|
| 31608 |
What's New in Python 3.8.0 alpha 3? |
| 31609 |
=================================== |
| 31610 |
|
| 31611 |
*Release date: 2019-03-25* |
| 31612 |
|
| 31613 |
Security |
| 31614 |
-------- |
| 31615 |
|
| 31616 |
- bpo-36216: Changes urlsplit() to raise ValueError when the URL contains |
| 31617 |
characters that decompose under IDNA encoding (NFKC-normalization) into |
| 31618 |
characters that affect how the URL is parsed. |
| 31619 |
|
| 31620 |
- bpo-35121: Don't send cookies of domain A without Domain attribute to |
| 31621 |
domain B when domain A is a suffix match of domain B while using a |
| 31622 |
cookiejar with :class:`http.cookiejar.DefaultCookiePolicy` policy. Patch |
| 31623 |
by Karthikeyan Singaravelan. |
| 31624 |
|
| 31625 |
Core and Builtins |
| 31626 |
----------------- |
| 31627 |
|
| 31628 |
- bpo-36421: Fix a possible double decref in _ctypes.c's |
| 31629 |
``PyCArrayType_new()``. |
| 31630 |
|
| 31631 |
- bpo-36412: Fix a possible crash when creating a new dictionary. |
| 31632 |
|
| 31633 |
- bpo-36398: Fix a possible crash in ``structseq_repr()``. |
| 31634 |
|
| 31635 |
- bpo-36256: Fix bug in parsermodule when parsing a state in a DFA that has |
| 31636 |
two or more arcs with labels of the same type. Patch by Pablo Galindo. |
| 31637 |
|
| 31638 |
- bpo-36365: repr(structseq) is no longer limited to 512 bytes. |
| 31639 |
|
| 31640 |
- bpo-36374: Fix a possible null pointer dereference in |
| 31641 |
``merge_consts_recursive()``. Patch by Zackery Spytz. |
| 31642 |
|
| 31643 |
- bpo-36236: At Python initialization, the current directory is no longer |
| 31644 |
prepended to :data:`sys.path` if it has been removed. |
| 31645 |
|
| 31646 |
- bpo-36352: Python initialization now fails with an error, rather than |
| 31647 |
silently truncating paths, if a path is too long. |
| 31648 |
|
| 31649 |
- bpo-36301: Python initialization now fails if decoding ``pybuilddir.txt`` |
| 31650 |
configuration file fails at startup. |
| 31651 |
|
| 31652 |
- bpo-36333: Fix leak in _PyRuntimeState_Fini. Contributed by Stéphane |
| 31653 |
Wirtel. |
| 31654 |
|
| 31655 |
- bpo-36332: The builtin :func:`compile` can now handle AST objects that |
| 31656 |
contain assignment expressions. Patch by Pablo Galindo. |
| 31657 |
|
| 31658 |
- bpo-36282: Improved error message for too much positional arguments in |
| 31659 |
some builtin functions. |
| 31660 |
|
| 31661 |
- bpo-30040: New empty dict uses fewer memory for now. It used more memory |
| 31662 |
than empty dict created by ``dict.clear()``. And empty dict creation and |
| 31663 |
deletion is about 2x faster. Patch by Inada Naoki. |
| 31664 |
|
| 31665 |
- bpo-36262: Fix an unlikely memory leak on conversion from string to float |
| 31666 |
in the function ``_Py_dg_strtod()`` used by ``float(str)``, |
| 31667 |
``complex(str)``, :func:`pickle.load`, :func:`marshal.load`, etc. |
| 31668 |
|
| 31669 |
- bpo-36252: Update Unicode databases to version 12.0.0. |
| 31670 |
|
| 31671 |
- bpo-36218: Fix a segfault occurring when sorting a list of heterogeneous |
| 31672 |
values. Patch contributed by Rémi Lapeyre and Elliot Gorokhovsky. |
| 31673 |
|
| 31674 |
- bpo-36188: Cleaned up left-over vestiges of Python 2 unbound method |
| 31675 |
handling in method objects and documentation. Patch by Martijn Pieters |
| 31676 |
|
| 31677 |
- bpo-36124: Add a new interpreter-specific dict and expose it in the C-API |
| 31678 |
via PyInterpreterState_GetDict(). This parallels PyThreadState_GetDict(). |
| 31679 |
However, extension modules should continue using PyModule_GetState() for |
| 31680 |
their own internal per-interpreter state. |
| 31681 |
|
| 31682 |
- bpo-35975: Add a ``feature_version`` flag to ``ast.parse()`` (documented) |
| 31683 |
and ``compile()`` (hidden) that allows tweaking the parser to support |
| 31684 |
older versions of the grammar. In particular, if ``feature_version`` is 5 |
| 31685 |
or 6, the hacks for the ``async`` and ``await`` keyword from PEP 492 are |
| 31686 |
reinstated. (For 7 or higher, these are unconditionally treated as |
| 31687 |
keywords, but they are still special tokens rather than ``NAME`` tokens |
| 31688 |
that the parser driver recognizes.) |
| 31689 |
|
| 31690 |
- bpo-31904: Use UTF-8 as the system encoding on VxWorks. |
| 31691 |
|
| 31692 |
- bpo-36048: The :meth:`~object.__index__` special method will be used |
| 31693 |
instead of :meth:`~object.__int__` for implicit conversion of Python |
| 31694 |
numbers to C integers. Using the ``__int__()`` method in implicit |
| 31695 |
conversions has been deprecated. |
| 31696 |
|
| 31697 |
- bpo-35808: Retire pgen and use a modified version of pgen2 to generate the |
| 31698 |
parser. Patch by Pablo Galindo. |
| 31699 |
|
| 31700 |
Library |
| 31701 |
------- |
| 31702 |
|
| 31703 |
- bpo-36401: The class documentation created by pydoc now has a separate |
| 31704 |
section for readonly properties. |
| 31705 |
|
| 31706 |
- bpo-36320: The typing.NamedTuple() class has deprecated the _field_types |
| 31707 |
attribute in favor of the __annotations__ attribute which carried the same |
| 31708 |
information. Also, both attributes were converted from OrderedDict to a |
| 31709 |
regular dict. |
| 31710 |
|
| 31711 |
- bpo-34745: Fix :mod:`asyncio` ssl memory issues caused by circular |
| 31712 |
references |
| 31713 |
|
| 31714 |
- bpo-36324: Add method to statistics.NormalDist for computing the inverse |
| 31715 |
cumulative normal distribution. |
| 31716 |
|
| 31717 |
- bpo-36321: collections.namedtuple() misspelled the name of an attribute. |
| 31718 |
To be consistent with typing.NamedTuple, the attribute name should have |
| 31719 |
been "_field_defaults" instead of "_fields_defaults". For backwards |
| 31720 |
compatibility, both spellings are now created. The misspelled version may |
| 31721 |
be removed in the future. |
| 31722 |
|
| 31723 |
- bpo-36297: "unicode_internal" codec is removed. It was deprecated since |
| 31724 |
Python 3.3. Patch by Inada Naoki. |
| 31725 |
|
| 31726 |
- bpo-36298: Raise ModuleNotFoundError in pyclbr when a module can't be |
| 31727 |
found. Thanks to 'mental' for the bug report. |
| 31728 |
|
| 31729 |
- bpo-36268: Switch the default format used for writing tars with |
| 31730 |
:mod:`tarfile` to the modern POSIX.1-2001 pax standard, from the |
| 31731 |
vendor-specific GNU. Contributed by C.A.M. Gerlach. |
| 31732 |
|
| 31733 |
- bpo-36285: Fix integer overflows in the array module. Patch by Stephan |
| 31734 |
Hohe. |
| 31735 |
|
| 31736 |
- bpo-31904: Add _signal module support for VxWorks. |
| 31737 |
|
| 31738 |
- bpo-36272: :mod:`logging` does not silently ignore RecursionError anymore. |
| 31739 |
Patch contributed by Rémi Lapeyre. |
| 31740 |
|
| 31741 |
- bpo-36280: Add a kind field to ast.Constant. It is 'u' if the literal has |
| 31742 |
a 'u' prefix (i.e. a Python 2 style unicode literal), else None. |
| 31743 |
|
| 31744 |
- bpo-35931: The :mod:`pdb` ``debug`` command now gracefully handles all |
| 31745 |
exceptions. |
| 31746 |
|
| 31747 |
- bpo-36251: Fix format strings used for stderrprinter and re.Match reprs. |
| 31748 |
Patch by Stephan Hohe. |
| 31749 |
|
| 31750 |
- bpo-36235: Fix ``CFLAGS`` in ``customize_compiler()`` of |
| 31751 |
``distutils.sysconfig``: when the ``CFLAGS`` environment variable is |
| 31752 |
defined, don't override ``CFLAGS`` variable with the ``OPT`` variable |
| 31753 |
anymore. Initial patch written by David Malcolm. |
| 31754 |
|
| 31755 |
- bpo-35807: Update ensurepip to install pip 19.0.3 and setuptools 40.8.0. |
| 31756 |
|
| 31757 |
- bpo-36139: Release GIL when closing :class:`~mmap.mmap` objects. |
| 31758 |
|
| 31759 |
- bpo-36179: Fix two unlikely reference leaks in _hashopenssl. The leaks |
| 31760 |
only occur in out-of-memory cases. |
| 31761 |
|
| 31762 |
- bpo-36169: Add overlap() method to statistics.NormalDist. Computes the |
| 31763 |
overlapping coefficient for two normal distributions. |
| 31764 |
|
| 31765 |
- bpo-36103: Default buffer size used by ``shutil.copyfileobj()`` is changed |
| 31766 |
from 16 KiB to 64 KiB on non-Windows platform to reduce system call |
| 31767 |
overhead. Contributed by Inada Naoki. |
| 31768 |
|
| 31769 |
- bpo-36130: Fix ``pdb`` with ``skip=...`` when stepping into a frame |
| 31770 |
without a ``__name__`` global. Patch by Anthony Sottile. |
| 31771 |
|
| 31772 |
- bpo-35652: shutil.copytree(copy_function=...) erroneously pass DirEntry |
| 31773 |
instead of a path string. |
| 31774 |
|
| 31775 |
- bpo-35178: Ensure custom :func:`warnings.formatwarning` function can |
| 31776 |
receive ``line`` as positional argument. Based on patch by Tashrif Billah. |
| 31777 |
|
| 31778 |
- bpo-36106: Resolve potential name clash with libm's sinpi(). Patch by |
| 31779 |
Dmitrii Pasechnik. |
| 31780 |
|
| 31781 |
- bpo-36091: Clean up reference to async generator in Lib/types. Patch by |
| 31782 |
Henry Chen. |
| 31783 |
|
| 31784 |
- bpo-36043: :class:`FileCookieJar` supports :term:`path-like object`. |
| 31785 |
Contributed by Stéphane Wirtel |
| 31786 |
|
| 31787 |
- bpo-35899: Enum has been fixed to correctly handle empty strings and |
| 31788 |
strings with non-Latin characters (ie. 'α', 'א') without crashing. |
| 31789 |
Original patch contributed by Maxwell. Assisted by Stéphane Wirtel. |
| 31790 |
|
| 31791 |
- bpo-21269: Add ``args`` and ``kwargs`` properties to mock call objects. |
| 31792 |
Contributed by Kumar Akshay. |
| 31793 |
|
| 31794 |
- bpo-30670: ``pprint.pp`` has been added to pretty-print objects with |
| 31795 |
dictionary keys being sorted with their insertion order by default. |
| 31796 |
Parameter *sort_dicts* has been added to ``pprint.pprint``, |
| 31797 |
``pprint.pformat`` and ``pprint.PrettyPrinter``. Contributed by Rémi |
| 31798 |
Lapeyre. |
| 31799 |
|
| 31800 |
- bpo-35843: Implement ``__getitem__`` for ``_NamespacePath``. Patch by |
| 31801 |
Anthony Sottile. |
| 31802 |
|
| 31803 |
- bpo-35802: Clean up code which checked presence of ``os.stat`` / |
| 31804 |
``os.lstat`` / ``os.chmod`` which are always present. Patch by Anthony |
| 31805 |
Sottile. |
| 31806 |
|
| 31807 |
- bpo-35715: Librates the return value of a ProcessPoolExecutor |
| 31808 |
_process_worker after it's no longer needed to free memory |
| 31809 |
|
| 31810 |
- bpo-35493: Use :func:`multiprocessing.connection.wait` instead of polling |
| 31811 |
each 0.2 seconds for worker updates in :class:`multiprocessing.Pool`. |
| 31812 |
Patch by Pablo Galindo. |
| 31813 |
|
| 31814 |
- bpo-35661: Store the venv prompt in pyvenv.cfg. |
| 31815 |
|
| 31816 |
- bpo-35121: Don't set cookie for a request when the request path is a |
| 31817 |
prefix match of the cookie's path attribute but doesn't end with "/". |
| 31818 |
Patch by Karthikeyan Singaravelan. |
| 31819 |
|
| 31820 |
- bpo-21478: Calls to a child function created with |
| 31821 |
:func:`unittest.mock.create_autospec` should propagate to the parent. |
| 31822 |
Patch by Karthikeyan Singaravelan. |
| 31823 |
|
| 31824 |
- bpo-35198: Fix C++ extension compilation on AIX |
| 31825 |
|
| 31826 |
Documentation |
| 31827 |
------------- |
| 31828 |
|
| 31829 |
- bpo-36329: Declare the path of the Python binary for the usage of |
| 31830 |
``Tools/scripts/serve.py`` when executing ``make -C Doc/ serve``. |
| 31831 |
Contributed by Stéphane Wirtel |
| 31832 |
|
| 31833 |
- bpo-36138: Improve documentation about converting datetime.timedelta to |
| 31834 |
scalars. |
| 31835 |
|
| 31836 |
- bpo-21314: A new entry was added to the Core Language Section of the |
| 31837 |
Programming FAQ, which explaines the usage of slash(/) in the signature of |
| 31838 |
a function. Patch by Lysandros Nikolaou |
| 31839 |
|
| 31840 |
Tests |
| 31841 |
----- |
| 31842 |
|
| 31843 |
- bpo-36234: test_posix.PosixUidGidTests: add tests for invalid uid/gid type |
| 31844 |
(str). Initial patch written by David Malcolm. |
| 31845 |
|
| 31846 |
- bpo-29571: Fix ``test_re.test_locale_flag()``: use |
| 31847 |
``locale.getpreferredencoding()`` rather than ``locale.getlocale()`` to |
| 31848 |
get the locale encoding. With some locales, ``locale.getlocale()`` returns |
| 31849 |
the wrong encoding. |
| 31850 |
|
| 31851 |
- bpo-36123: Fix race condition in test_socket. |
| 31852 |
|
| 31853 |
Build |
| 31854 |
----- |
| 31855 |
|
| 31856 |
- bpo-36356: Fix leaks that led to build failure when configured with |
| 31857 |
address sanitizer. |
| 31858 |
|
| 31859 |
- bpo-36146: Add ``TEST_EXTENSIONS`` constant to ``setup.py`` to allow to |
| 31860 |
not build test extensions like ``_testcapi``. |
| 31861 |
|
| 31862 |
- bpo-36146: Fix setup.py on macOS: only add ``/usr/include/ffi`` to include |
| 31863 |
directories of _ctypes, not for all extensions. |
| 31864 |
|
| 31865 |
- bpo-31904: Enable build system to cross-build for VxWorks RTOS. |
| 31866 |
|
| 31867 |
Windows |
| 31868 |
------- |
| 31869 |
|
| 31870 |
- bpo-36312: Fixed decoders for the following code pages: 50220, 50221, |
| 31871 |
50222, 50225, 50227, 50229, 57002 through 57011, 65000 and 42. |
| 31872 |
|
| 31873 |
- bpo-36264: Don't honor POSIX ``HOME`` in ``os.path.expanduser`` on |
| 31874 |
windows. Patch by Anthony Sottile. |
| 31875 |
|
| 31876 |
- bpo-24643: Fix name collisions due to ``#define timezone _timezone`` in |
| 31877 |
PC/pyconfig.h. |
| 31878 |
|
| 31879 |
IDLE |
| 31880 |
---- |
| 31881 |
|
| 31882 |
- bpo-36405: Use dict unpacking in idlelib. |
| 31883 |
|
| 31884 |
- bpo-36396: Remove fgBg param of idlelib.config.GetHighlight(). This param |
| 31885 |
was only used twice and changed the return type. |
| 31886 |
|
| 31887 |
- bpo-36176: Fix IDLE autocomplete & calltip popup colors. Prevent conflicts |
| 31888 |
with Linux dark themes (and slightly darken calltip background). |
| 31889 |
|
| 31890 |
- bpo-23205: For the grep module, add tests for findfiles, refactor |
| 31891 |
findfiles to be a module-level function, and refactor findfiles to use |
| 31892 |
os.walk. |
| 31893 |
|
| 31894 |
- bpo-23216: Add docstrings to IDLE search modules. |
| 31895 |
|
| 31896 |
- bpo-36152: Remove colorizer.ColorDelegator.close_when_done and the |
| 31897 |
corresponding argument of .close(). In IDLE, both have always been None |
| 31898 |
or False since 2007. |
| 31899 |
|
| 31900 |
- bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Patch |
| 31901 |
by Kevin Walzer. |
| 31902 |
|
| 31903 |
- bpo-36096: Refactor class variables to instance variables in colorizer. |
| 31904 |
|
| 31905 |
- bpo-30348: Increase test coverage of idlelib.autocomplete by 30%. Patch by |
| 31906 |
Louie Lu |
| 31907 |
|
| 31908 |
Tools/Demos |
| 31909 |
----------- |
| 31910 |
|
| 31911 |
- bpo-35132: Fix py-list and py-bt commands of python-gdb.py on gdb7. |
| 31912 |
|
| 31913 |
- bpo-32217: Fix freeze script on Windows. |
| 31914 |
|
| 31915 |
C API |
| 31916 |
----- |
| 31917 |
|
| 31918 |
- bpo-36381: Raise ``DeprecationWarning`` when '#' formats are used for |
| 31919 |
building or parsing values without ``PY_SSIZE_T_CLEAN``. |
| 31920 |
|
| 31921 |
- bpo-36142: The whole coreconfig.h header is now excluded from |
| 31922 |
Py_LIMITED_API. Move functions definitions into a new internal |
| 31923 |
pycore_coreconfig.h header. |
| 31924 |
|
| 31925 |
|
| 31926 |
What's New in Python 3.8.0 alpha 2? |
| 31927 |
=================================== |
| 31928 |
|
| 31929 |
*Release date: 2019-02-25* |
| 31930 |
|
| 31931 |
Core and Builtins |
| 31932 |
----------------- |
| 31933 |
|
| 31934 |
- bpo-36052: Raise a :exc:`SyntaxError` when assigning a value to |
| 31935 |
``__debug__`` with the Assignment Operator. Contributed by Stéphane Wirtel |
| 31936 |
and Pablo Galindo. |
| 31937 |
|
| 31938 |
- bpo-36012: Doubled the speed of class variable writes. When a non-dunder |
| 31939 |
attribute was updated, there was an unnecessary call to update slots. |
| 31940 |
|
| 31941 |
- bpo-35942: The error message emitted when returning invalid types from |
| 31942 |
``__fspath__`` in interfaces that allow passing :class:`~os.PathLike` |
| 31943 |
objects has been improved and now it does explain the origin of the error. |
| 31944 |
|
| 31945 |
- bpo-36016: ``gc.get_objects`` can now receive an optional parameter |
| 31946 |
indicating a generation to get objects from. Patch by Pablo Galindo. |
| 31947 |
|
| 31948 |
- bpo-1054041: When the main interpreter exits due to an uncaught |
| 31949 |
KeyboardInterrupt, the process now exits in the appropriate manner for its |
| 31950 |
parent process to detect that a SIGINT or ^C terminated the process. This |
| 31951 |
allows shells and batch scripts to understand that the user has asked them |
| 31952 |
to stop. |
| 31953 |
|
| 31954 |
- bpo-35992: Fix ``__class_getitem__()`` not being called on a class with a |
| 31955 |
custom non-subscriptable metaclass. |
| 31956 |
|
| 31957 |
- bpo-35993: Fix a crash on fork when using subinterpreters. Contributed by |
| 31958 |
Stéphane Wirtel |
| 31959 |
|
| 31960 |
- bpo-35991: Fix a potential double free in Modules/_randommodule.c. |
| 31961 |
|
| 31962 |
- bpo-35961: Fix a crash in slice_richcompare(): use strong references |
| 31963 |
rather than stolen references for the two temporary internal tuples. |
| 31964 |
|
| 31965 |
- bpo-35911: Enable the creation of cell objects by adding a |
| 31966 |
``cell.__new__`` method, and expose the type ``cell`` in ``Lib/types.py`` |
| 31967 |
under the name CellType. Patch by Pierre Glaser. |
| 31968 |
|
| 31969 |
- bpo-12822: Use monotonic clock for ``pthread_cond_timedwait`` when |
| 31970 |
``pthread_condattr_setclock`` and ``CLOCK_MONOTONIC`` are available. |
| 31971 |
|
| 31972 |
- bpo-15248: The compiler emits now syntax warnings in the case when a comma |
| 31973 |
is likely missed before tuple or list. |
| 31974 |
|
| 31975 |
- bpo-35886: The implementation of PyInterpreterState has been moved into |
| 31976 |
the internal header files (guarded by Py_BUILD_CORE). |
| 31977 |
|
| 31978 |
- bpo-31506: Clarify the errors reported when ``object.__new__`` and |
| 31979 |
``object.__init__`` receive more than one argument. Contributed by Sanyam |
| 31980 |
Khurana. |
| 31981 |
|
| 31982 |
- bpo-35724: Signal-handling is now guaranteed to happen relative to the |
| 31983 |
main interpreter. |
| 31984 |
|
| 31985 |
- bpo-33608: We added a new internal _Py_AddPendingCall() that operates |
| 31986 |
relative to the provided interpreter. This allows us to use the existing |
| 31987 |
implementation to ask another interpreter to do work that cannot be done |
| 31988 |
in the current interpreter, like decref an object the other interpreter |
| 31989 |
owns. The existing Py_AddPendingCall() only operates relative to the main |
| 31990 |
interpreter. |
| 31991 |
|
| 31992 |
- bpo-33989: Fix a possible crash in :meth:`list.sort` when sorting objects |
| 31993 |
with ``ob_type->tp_richcompare == NULL``. Patch by Zackery Spytz. |
| 31994 |
|
| 31995 |
Library |
| 31996 |
------- |
| 31997 |
|
| 31998 |
- bpo-35512: :func:`unittest.mock.patch.dict` used as a decorator with |
| 31999 |
string target resolves the target during function call instead of during |
| 32000 |
decorator construction. Patch by Karthikeyan Singaravelan. |
| 32001 |
|
| 32002 |
- bpo-36018: Add statistics.NormalDist, a tool for creating and manipulating |
| 32003 |
normal distributions of random variable. Features a composite class that |
| 32004 |
treats the mean and standard deviation of measurement data as single |
| 32005 |
entity. |
| 32006 |
|
| 32007 |
- bpo-35904: Added statistics.fmean() as a faster, floating-point variant of |
| 32008 |
the existing mean() function. |
| 32009 |
|
| 32010 |
- bpo-35918: Removed broken ``has_key`` method from |
| 32011 |
multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre. |
| 32012 |
|
| 32013 |
- bpo-18283: Add support for bytes to :func:`shutil.which`. |
| 32014 |
|
| 32015 |
- bpo-35960: Fix :func:`dataclasses.field` throwing away empty mapping |
| 32016 |
objects passed as metadata. |
| 32017 |
|
| 32018 |
- bpo-35500: Write expected and actual call parameters on separate lines in |
| 32019 |
:meth:`unittest.mock.Mock.assert_called_with` assertion errors. |
| 32020 |
Contributed by Susan Su. |
| 32021 |
|
| 32022 |
- bpo-35931: The :mod:`pdb` ``debug`` command now gracefully handles syntax |
| 32023 |
errors. |
| 32024 |
|
| 32025 |
- bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred |
| 32026 |
address based on the bind parameter. Now default bind or binding to a name |
| 32027 |
may bind to IPv6 or dual-stack, depending on the environment. |
| 32028 |
|
| 32029 |
- bpo-35321: Set ``__spec__.origin`` of ``_frozen_importlib`` to frozen so |
| 32030 |
that it matches the behavior of ``_frozen_importlib_external``. Patch by |
| 32031 |
Nina Zakharenko. |
| 32032 |
|
| 32033 |
- bpo-35378: Fix a reference issue inside :class:`multiprocessing.Pool` that |
| 32034 |
caused the pool to remain alive if it was deleted without being closed or |
| 32035 |
terminated explicitly. A new strong reference is added to the pool |
| 32036 |
iterators to link the lifetime of the pool to the lifetime of its |
| 32037 |
iterators so the pool does not get destroyed if a pool iterator is still |
| 32038 |
alive. |
| 32039 |
|
| 32040 |
- bpo-34294: re module, fix wrong capturing groups in rare cases. |
| 32041 |
:func:`re.search`, :func:`re.findall`, :func:`re.sub` and other functions |
| 32042 |
that scan through string looking for a match, should reset capturing |
| 32043 |
groups between two match attempts. Patch by Ma Lin. |
| 32044 |
|
| 32045 |
- bpo-35615: :mod:`weakref`: Fix a RuntimeError when copying a |
| 32046 |
WeakKeyDictionary or a WeakValueDictionary, due to some keys or values |
| 32047 |
disappearing while iterating. |
| 32048 |
|
| 32049 |
- bpo-35606: Implement :func:`math.prod` as analogous function to |
| 32050 |
:func:`sum` that returns the product of a 'start' value (default: 1) times |
| 32051 |
an iterable of numbers. Patch by Pablo Galindo. |
| 32052 |
|
| 32053 |
- bpo-32417: Performing arithmetic between :class:`datetime.datetime` |
| 32054 |
subclasses and :class:`datetime.timedelta` now returns an object of the |
| 32055 |
same type as the :class:`datetime.datetime` subclass. As a result, |
| 32056 |
:meth:`datetime.datetime.astimezone` and alternate constructors like |
| 32057 |
:meth:`datetime.datetime.now` and :meth:`datetime.fromtimestamp` called |
| 32058 |
with a ``tz`` argument now *also* retain their subclass. |
| 32059 |
|
| 32060 |
- bpo-35153: Add *headers* optional keyword-only parameter to |
| 32061 |
:class:`xmlrpc.client.ServerProxy`, :class:`xmlrpc.client.Transport` and |
| 32062 |
:class:`xmlrpc.client.SafeTransport`. Patch by Cédric Krier. |
| 32063 |
|
| 32064 |
- bpo-34572: Fix C implementation of pickle.loads to use importlib's locking |
| 32065 |
mechanisms, and thereby avoid using partially loaded modules. Patch by Tim |
| 32066 |
Burgess. |
| 32067 |
|
| 32068 |
Documentation |
| 32069 |
------------- |
| 32070 |
|
| 32071 |
- bpo-36083: Fix formatting of --check-hash-based-pycs options in the |
| 32072 |
manpage Synopsis. |
| 32073 |
|
| 32074 |
- bpo-36007: Bump minimum sphinx version to 1.8. Patch by Anthony Sottile. |
| 32075 |
|
| 32076 |
- bpo-22062: Update documentation and docstrings for pathlib. Original patch |
| 32077 |
by Mike Short. |
| 32078 |
|
| 32079 |
Tests |
| 32080 |
----- |
| 32081 |
|
| 32082 |
- bpo-27313: Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa |
| 32083 |
Tk. |
| 32084 |
|
| 32085 |
- bpo-36019: Add test.support.TEST_HTTP_URL and replace references of |
| 32086 |
http://www.example.com by this new constant. Contributed by Stéphane |
| 32087 |
Wirtel. |
| 32088 |
|
| 32089 |
- bpo-36037: Fix test_ssl for strict OpenSSL configuration like RHEL8 strict |
| 32090 |
crypto policy. Use older TLS version for minimum TLS version of the server |
| 32091 |
SSL context if needed, to test TLS version older than default minimum TLS |
| 32092 |
version. |
| 32093 |
|
| 32094 |
- bpo-35798: Added :func:`test.support.check_syntax_warning`. |
| 32095 |
|
| 32096 |
- bpo-35505: Make test_imap4_host_default_value independent on whether the |
| 32097 |
local IMAP server is running. |
| 32098 |
|
| 32099 |
- bpo-35917: multiprocessing: provide unit tests for SyncManager and |
| 32100 |
SharedMemoryManager classes + all the shareable types which are supposed |
| 32101 |
to be supported by them. (patch by Giampaolo Rodola) |
| 32102 |
|
| 32103 |
- bpo-35704: Skip ``test_shutil.test_unpack_archive_xztar`` to prevent a |
| 32104 |
MemoryError on 32-bit AIX when MAXDATA setting is less than 0x20000000. |
| 32105 |
|
| 32106 |
Patch by Michael Felt (aixtools) |
| 32107 |
|
| 32108 |
- bpo-34720: Assert m_state != NULL to mimic GC traversal functions that do |
| 32109 |
not correctly handle module creation when the module state has not been |
| 32110 |
created. |
| 32111 |
|
| 32112 |
Windows |
| 32113 |
------- |
| 32114 |
|
| 32115 |
- bpo-35976: Added ARM build support to Windows build files in PCBuild. |
| 32116 |
|
| 32117 |
- bpo-35692: ``pathlib`` no longer raises when checking file and directory |
| 32118 |
existence on drives that are not ready |
| 32119 |
|
| 32120 |
- bpo-35872: Uses the base Python executable when invoking venv in a virtual |
| 32121 |
environment |
| 32122 |
|
| 32123 |
- bpo-35873: Prevents venv paths being inherited by child processes |
| 32124 |
|
| 32125 |
- bpo-35299: Fix sysconfig detection of the source directory and distutils |
| 32126 |
handling of pyconfig.h during PGO profiling |
| 32127 |
|
| 32128 |
IDLE |
| 32129 |
---- |
| 32130 |
|
| 32131 |
- bpo-24310: IDLE -- Document settings dialog font tab sample. |
| 32132 |
|
| 32133 |
- bpo-35833: Revise IDLE doc for control codes sent to Shell. Add a code |
| 32134 |
example block. |
| 32135 |
|
| 32136 |
- bpo-35689: Add docstrings and unittests for colorizer.py. |
| 32137 |
|
| 32138 |
|
| 32139 |
What's New in Python 3.8.0 alpha 1? |
| 32140 |
=================================== |
| 32141 |
|
| 32142 |
*Release date: 2019-02-03* |
| 32143 |
|
| 32144 |
Security |
| 32145 |
-------- |
| 32146 |
|
| 32147 |
- bpo-35746: :cve:`2019-5010`: Fix a NULL pointer deref in ssl module. The |
| 32148 |
cert parser did not handle CRL distribution points with empty DP or URI |
| 32149 |
correctly. A malicious or buggy certificate can result into segfault. |
| 32150 |
Vulnerability (TALOS-2018-0758) reported by Colin Read and Nicolas Edet of |
| 32151 |
Cisco. |
| 32152 |
|
| 32153 |
- bpo-34812: The :option:`-I` command line option (run Python in isolated |
| 32154 |
mode) is now also copied by the :mod:`multiprocessing` and ``distutils`` |
| 32155 |
modules when spawning child processes. Previously, only :option:`-E` and |
| 32156 |
:option:`-s` options (enabled by :option:`-I`) were copied. |
| 32157 |
|
| 32158 |
- bpo-34791: The xml.sax and xml.dom.domreg no longer use environment |
| 32159 |
variables to override parser implementations when |
| 32160 |
sys.flags.ignore_environment is set by -E or -I arguments. |
| 32161 |
|
| 32162 |
- bpo-17239: The xml.sax and xml.dom.minidom parsers no longer processes |
| 32163 |
external entities by default. External DTD and ENTITY declarations no |
| 32164 |
longer load files or create network connections. |
| 32165 |
|
| 32166 |
- bpo-34623: :cve:`2018-14647`: The C accelerated _elementtree module now |
| 32167 |
initializes hash randomization salt from _Py_HashSecret instead of |
| 32168 |
libexpat's default CSPRNG. |
| 32169 |
|
| 32170 |
- bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds. |
| 32171 |
|
| 32172 |
- bpo-33871: Fixed sending the part of the file in :func:`os.sendfile` on |
| 32173 |
macOS. Using the *trailers* argument could cause sending more bytes from |
| 32174 |
the input file than was specified. |
| 32175 |
|
| 32176 |
- bpo-32533: Fixed thread-safety of error handling in _ssl. |
| 32177 |
|
| 32178 |
- bpo-33136: Harden ssl module against LibreSSL :cve:`2018-8970`. |
| 32179 |
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new |
| 32180 |
test ensures that NULL bytes are not allowed. |
| 32181 |
|
| 32182 |
- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows |
| 32183 |
|
| 32184 |
- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic |
| 32185 |
backtracking. These regexes formed potential DOS vectors (REDOS). They |
| 32186 |
have been refactored. This resolves :cve:`2018-1060` and :cve:`2018-1061`. |
| 32187 |
Patch by Jamie Davis. |
| 32188 |
|
| 32189 |
- bpo-28414: The ssl module now allows users to perform their own IDN |
| 32190 |
en/decoding when using SNI. |
| 32191 |
|
| 32192 |
Core and Builtins |
| 32193 |
----------------- |
| 32194 |
|
| 32195 |
- bpo-35877: Make parenthesis optional for named expressions in while |
| 32196 |
statement. Patch by Karthikeyan Singaravelan. |
| 32197 |
|
| 32198 |
- bpo-35814: Allow same right hand side expressions in annotated assignments |
| 32199 |
as in normal ones. In particular, ``x: Tuple[int, int] = 1, 2`` (without |
| 32200 |
parentheses on the right) is now allowed. |
| 32201 |
|
| 32202 |
- bpo-35766: Add the option to parse PEP 484 type comments in the ast |
| 32203 |
module. (Off by default.) This is merging the key functionality of the |
| 32204 |
third party fork thereof, |
| 32205 |
[typed_ast](https://github.com/python/typed_ast). |
| 32206 |
|
| 32207 |
- bpo-35713: Reorganize Python initialization to get working exceptions and |
| 32208 |
sys.stderr earlier. |
| 32209 |
|
| 32210 |
- bpo-33416: Add end line and end column position information to the Python |
| 32211 |
AST nodes. This is a C-level backwards incompatible change. |
| 32212 |
|
| 32213 |
- bpo-35720: Fixed a minor memory leak in pymain_parse_cmdline_impl function |
| 32214 |
in Modules/main.c |
| 32215 |
|
| 32216 |
- bpo-35634: ``func(**kwargs)`` will now raise an error when ``kwargs`` is a |
| 32217 |
mapping containing multiple entries with the same key. An error was |
| 32218 |
already raised when other keyword arguments are passed before ``**kwargs`` |
| 32219 |
since Python 3.6. |
| 32220 |
|
| 32221 |
- bpo-35623: Fix a crash when sorting very long lists. Patch by Stephan |
| 32222 |
Hohe. |
| 32223 |
|
| 32224 |
- bpo-35214: clang Memory Sanitizer build instrumentation was added to work |
| 32225 |
around false positives from posix, socket, time, test_io, and |
| 32226 |
test_faulthandler. |
| 32227 |
|
| 32228 |
- bpo-35560: Fix an assertion error in :func:`format` in debug build for |
| 32229 |
floating-point formatting with "n" format, zero padding and small width. |
| 32230 |
Release build is not impacted. Patch by Karthikeyan Singaravelan. |
| 32231 |
|
| 32232 |
- bpo-35552: Format characters ``%s`` and ``%V`` in |
| 32233 |
:c:func:`PyUnicode_FromFormat` and ``%s`` in :c:func:`PyBytes_FromFormat` |
| 32234 |
no longer read memory past the limit if *precision* is specified. |
| 32235 |
|
| 32236 |
- bpo-35504: Fix segfaults and :exc:`SystemError`\ s when deleting certain |
| 32237 |
attributes. Patch by Zackery Spytz. |
| 32238 |
|
| 32239 |
- bpo-35504: Fixed a SystemError when delete the characters_written |
| 32240 |
attribute of an OSError. |
| 32241 |
|
| 32242 |
- bpo-35494: Improved syntax error messages for unbalanced parentheses in |
| 32243 |
f-string. |
| 32244 |
|
| 32245 |
- bpo-35444: Fixed error handling in pickling methods when fail to look up |
| 32246 |
builtin "getattr". Sped up pickling iterators. |
| 32247 |
|
| 32248 |
- bpo-35436: Fix various issues with memory allocation error handling. |
| 32249 |
Patch by Zackery Spytz. |
| 32250 |
|
| 32251 |
- bpo-35423: Separate the signal handling trigger in the eval loop from the |
| 32252 |
"pending calls" machinery. There is no semantic change and the difference |
| 32253 |
in performance is insignificant. |
| 32254 |
|
| 32255 |
- bpo-35357: Internal attributes' names of unittest.mock._Call and |
| 32256 |
unittest.mock.MagicProxy (name, parent & from_kall) are now prefixed with |
| 32257 |
_mock_ in order to prevent clashes with widely used object attributes. |
| 32258 |
Fixed minor typo in test function name. |
| 32259 |
|
| 32260 |
- bpo-35372: Fixed the code page decoder for input longer than 2 GiB |
| 32261 |
containing undecodable bytes. |
| 32262 |
|
| 32263 |
- bpo-35336: Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the |
| 32264 |
C locale if the LC_CTYPE locale is "C". |
| 32265 |
|
| 32266 |
- bpo-31241: The *lineno* and *col_offset* attributes of AST nodes for list |
| 32267 |
comprehensions, generator expressions and tuples are now point to the |
| 32268 |
opening parenthesis or square brace. For tuples without parenthesis they |
| 32269 |
point to the position of the first item. |
| 32270 |
|
| 32271 |
- bpo-33954: For :meth:`str.format`, :meth:`float.__format__` and |
| 32272 |
:meth:`complex.__format__` methods for non-ASCII decimal point when using |
| 32273 |
the "n" formatter. |
| 32274 |
|
| 32275 |
- bpo-35269: Fix a possible segfault involving a newly created coroutine. |
| 32276 |
Patch by Zackery Spytz. |
| 32277 |
|
| 32278 |
- bpo-35224: Implement :pep:`572` (assignment expressions). Patch by Emily |
| 32279 |
Morehouse. |
| 32280 |
|
| 32281 |
- bpo-32492: Speed up :func:`namedtuple` attribute access by 1.6x using a C |
| 32282 |
fast-path for the name descriptors. Patch by Pablo Galindo. |
| 32283 |
|
| 32284 |
- bpo-35214: Fixed an out of bounds memory access when parsing a truncated |
| 32285 |
unicode escape sequence at the end of a string such as ``'\N'``. It would |
| 32286 |
read one byte beyond the end of the memory allocation. |
| 32287 |
|
| 32288 |
- bpo-35214: The interpreter and extension modules have had annotations |
| 32289 |
added so that they work properly under clang's Memory Sanitizer. A new |
| 32290 |
configure flag --with-memory-sanitizer has been added to make test builds |
| 32291 |
of this nature easier to perform. |
| 32292 |
|
| 32293 |
- bpo-35193: Fix an off by one error in the bytecode peephole optimizer |
| 32294 |
where it could read bytes beyond the end of bounds of an array when |
| 32295 |
removing unreachable code. This bug was present in every release of Python |
| 32296 |
3.6 and 3.7 until now. |
| 32297 |
|
| 32298 |
- bpo-35169: Improved error messages for forbidden assignments. |
| 32299 |
|
| 32300 |
- bpo-34022: Fix handling of hash-based bytecode files in :mod:`zipimport`. |
| 32301 |
Patch by Elvis Pranskevichus. |
| 32302 |
|
| 32303 |
- bpo-28401: Debug builds will no longer to attempt to import extension |
| 32304 |
modules built for the ABI as they were never compatible to begin with. |
| 32305 |
Patch by Stefano Rivera. |
| 32306 |
|
| 32307 |
- bpo-29341: Clarify in the docstrings of :mod:`os` methods that path-like |
| 32308 |
objects are also accepted as input parameters. |
| 32309 |
|
| 32310 |
- bpo-35050: :mod:`socket`: Fix off-by-one bug in length check for |
| 32311 |
``AF_ALG`` name and type. |
| 32312 |
|
| 32313 |
- bpo-29743: Raise :exc:`ValueError` instead of :exc:`OverflowError` in case |
| 32314 |
of a negative ``_length_`` in a :class:`ctypes.Array` subclass. Also |
| 32315 |
raise :exc:`TypeError` instead of :exc:`AttributeError` for non-integer |
| 32316 |
``_length_``. Original patch by Oren Milman. |
| 32317 |
|
| 32318 |
- bpo-16806: Fix ``lineno`` and ``col_offset`` for multi-line string tokens. |
| 32319 |
|
| 32320 |
- bpo-35029: :exc:`SyntaxWarning` raised as an exception at code generation |
| 32321 |
time will be now replaced with a :exc:`SyntaxError` for better error |
| 32322 |
reporting. |
| 32323 |
|
| 32324 |
- bpo-34983: Expose :meth:`symtable.Symbol.is_nonlocal` in the symtable |
| 32325 |
module. Patch by Pablo Galindo. |
| 32326 |
|
| 32327 |
- bpo-34974: :class:`bytes` and :class:`bytearray` constructors no longer |
| 32328 |
convert unexpected exceptions (e.g. :exc:`MemoryError` and |
| 32329 |
:exc:`KeyboardInterrupt`) to :exc:`TypeError`. |
| 32330 |
|
| 32331 |
- bpo-34939: Allow annotated names in module namespace that are declared |
| 32332 |
global before the annotation happens. Patch by Pablo Galindo. |
| 32333 |
|
| 32334 |
- bpo-34973: Fixed crash in :func:`bytes` when the :class:`list` argument is |
| 32335 |
mutated while it is iterated. |
| 32336 |
|
| 32337 |
- bpo-34876: The *lineno* and *col_offset* attributes of the AST for |
| 32338 |
decorated function and class refer now to the position of the |
| 32339 |
corresponding ``def``, ``async def`` and ``class`` instead of the position |
| 32340 |
of the first decorator. This leads to more correct line reporting in |
| 32341 |
tracing. This is the only case when the position of child AST nodes can |
| 32342 |
precede the position of the parent AST node. |
| 32343 |
|
| 32344 |
- bpo-34879: Fix a possible null pointer dereference in bytesobject.c. |
| 32345 |
Patch by Zackery Spytz. |
| 32346 |
|
| 32347 |
- bpo-34784: Fix the implementation of PyStructSequence_NewType in order to |
| 32348 |
create heap allocated StructSequences. |
| 32349 |
|
| 32350 |
- bpo-32912: A :exc:`SyntaxWarning` is now emitted instead of a |
| 32351 |
:exc:`DeprecationWarning` for invalid escape sequences in string and bytes |
| 32352 |
literals. |
| 32353 |
|
| 32354 |
- bpo-34854: Fixed a crash in compiling string annotations containing a |
| 32355 |
lambda with a keyword-only argument that doesn't have a default value. |
| 32356 |
|
| 32357 |
- bpo-34850: The compiler now produces a :exc:`SyntaxWarning` when identity |
| 32358 |
checks (``is`` and ``is not``) are used with certain types of literals |
| 32359 |
(e.g. strings, ints). These can often work by accident in CPython, but |
| 32360 |
are not guaranteed by the language spec. The warning advises users to use |
| 32361 |
equality tests (``==`` and ``!=``) instead. |
| 32362 |
|
| 32363 |
- bpo-34824: Fix a possible null pointer dereference in Modules/_ssl.c. |
| 32364 |
Patch by Zackery Spytz. |
| 32365 |
|
| 32366 |
- bpo-30156: The C function ``property_descr_get()`` uses a "cached" tuple |
| 32367 |
to optimize function calls. But this tuple can be discovered in debug mode |
| 32368 |
with :func:`sys.getobjects`. Remove the optimization, it's not really |
| 32369 |
worth it and it causes 3 different crashes last years. |
| 32370 |
|
| 32371 |
- bpo-34762: Fix contextvars C API to use PyObject* pointer types. |
| 32372 |
|
| 32373 |
- bpo-34751: The hash function for tuples is now based on xxHash which gives |
| 32374 |
better collision results on (formerly) pathological cases. Additionally, |
| 32375 |
on 64-bit systems it improves tuple hashes in general. Patch by Jeroen |
| 32376 |
Demeyer with substantial contributions by Tim Peters. |
| 32377 |
|
| 32378 |
- bpo-34735: Fix a memory leak in Modules/timemodule.c. Patch by Zackery |
| 32379 |
Spytz. |
| 32380 |
|
| 32381 |
- bpo-34683: Fixed a bug where some SyntaxError error pointed to locations |
| 32382 |
that were off-by-one. |
| 32383 |
|
| 32384 |
- bpo-34651: Only allow the main interpreter to fork. The avoids the |
| 32385 |
possibility of affecting the main interpreter, which is critical to |
| 32386 |
operation of the runtime. |
| 32387 |
|
| 32388 |
- bpo-34653: Remove unused function PyParser_SimpleParseStringFilename. |
| 32389 |
|
| 32390 |
- bpo-32236: Warn that line buffering is not supported if :func:`open` is |
| 32391 |
called with binary mode and ``buffering=1``. |
| 32392 |
|
| 32393 |
- bpo-34641: Further restrict the syntax of the left-hand side of keyword |
| 32394 |
arguments in function calls. In particular, ``f((keyword)=arg)`` is now |
| 32395 |
disallowed. |
| 32396 |
|
| 32397 |
- bpo-34637: Make the *start* argument to *sum()* visible as a keyword |
| 32398 |
argument. |
| 32399 |
|
| 32400 |
- bpo-1621: Do not assume signed integer overflow behavior (C undefined |
| 32401 |
behavior) when performing set hash table resizing. |
| 32402 |
|
| 32403 |
- bpo-34588: Fix an off-by-one in the recursive call pruning feature of |
| 32404 |
traceback formatting. |
| 32405 |
|
| 32406 |
- bpo-34485: On Windows, the LC_CTYPE is now set to the user preferred |
| 32407 |
locale at startup. Previously, the LC_CTYPE locale was "C" at startup, but |
| 32408 |
changed when calling setlocale(LC_CTYPE, "") or setlocale(LC_ALL, ""). |
| 32409 |
|
| 32410 |
- bpo-34485: Standard streams like sys.stdout now use the "surrogateescape" |
| 32411 |
error handler, instead of "strict", on the POSIX locale (when the C locale |
| 32412 |
is not coerced and the UTF-8 Mode is disabled). |
| 32413 |
|
| 32414 |
- bpo-34485: Fix the error handler of standard streams like sys.stdout: |
| 32415 |
PYTHONIOENCODING=":" is now ignored instead of setting the error handler |
| 32416 |
to "strict". |
| 32417 |
|
| 32418 |
- bpo-34485: Python now gets the locale encoding with C code to initialize |
| 32419 |
the encoding of standard streams like sys.stdout. Moreover, the encoding |
| 32420 |
is now initialized to the Python codec name to get a normalized encoding |
| 32421 |
name and to ensure that the codec is loaded. The change avoids importing |
| 32422 |
_bootlocale and _locale modules at startup by default. |
| 32423 |
|
| 32424 |
- bpo-34527: On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also |
| 32425 |
forces the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if |
| 32426 |
the LC_CTYPE locale is "C". |
| 32427 |
|
| 32428 |
- bpo-34527: The UTF-8 Mode is now also enabled by the "POSIX" locale, not |
| 32429 |
only by the "C" locale. |
| 32430 |
|
| 32431 |
- bpo-34403: On HP-UX with C or POSIX locale, sys.getfilesystemencoding() |
| 32432 |
now returns "ascii" instead of "roman8" (when the UTF-8 Mode is disabled |
| 32433 |
and the C locale is not coerced). |
| 32434 |
|
| 32435 |
- bpo-34523: The Python filesystem encoding is now read earlier during the |
| 32436 |
Python initialization. |
| 32437 |
|
| 32438 |
- bpo-12458: Tracebacks show now correct line number for subexpressions in |
| 32439 |
multiline expressions. Tracebacks show now the line number of the first |
| 32440 |
line for multiline expressions instead of the line number of the last |
| 32441 |
subexpression. |
| 32442 |
|
| 32443 |
- bpo-34408: Prevent a null pointer dereference and resource leakage in |
| 32444 |
``PyInterpreterState_New()``. |
| 32445 |
|
| 32446 |
- bpo-34400: Fix undefined behavior in parsetok.c. Patch by Zackery Spytz. |
| 32447 |
|
| 32448 |
- bpo-33073: Added as_integer_ratio to ints to make them more interoperable |
| 32449 |
with floats. |
| 32450 |
|
| 32451 |
- bpo-34377: Update valgrind suppression list to use |
| 32452 |
``_PyObject_Free``/``_PyObject_Realloc`` instead of |
| 32453 |
``PyObject_Free``/``PyObject_Realloc``. |
| 32454 |
|
| 32455 |
- bpo-34353: Added the "socket" option in the ``stat.filemode()`` Python |
| 32456 |
implementation to match the C implementation. |
| 32457 |
|
| 32458 |
- bpo-34320: Fix ``dict(od)`` didn't copy iteration order of OrderedDict. |
| 32459 |
|
| 32460 |
- bpo-34113: Fixed crash on debug builds when opcode stack was adjusted with |
| 32461 |
negative numbers. Patch by Constantin Petrisor. |
| 32462 |
|
| 32463 |
- bpo-34100: Compiler now merges constants in tuples and frozensets |
| 32464 |
recursively. Code attributes like ``co_names`` are merged too. |
| 32465 |
|
| 32466 |
- bpo-34151: Performance of list concatenation, repetition and slicing |
| 32467 |
operations is slightly improved. Patch by Sergey Fedoseev. |
| 32468 |
|
| 32469 |
- bpo-34170: -X dev: it is now possible to override the memory allocator |
| 32470 |
using PYTHONMALLOC even if the developer mode is enabled. |
| 32471 |
|
| 32472 |
- bpo-33237: Improved :exc:`AttributeError` message for partially |
| 32473 |
initialized module. |
| 32474 |
|
| 32475 |
- bpo-34149: Fix min and max functions to get default behavior when key is |
| 32476 |
None. |
| 32477 |
|
| 32478 |
- bpo-34125: Profiling of unbound built-in methods now works when |
| 32479 |
``**kwargs`` is given. |
| 32480 |
|
| 32481 |
- bpo-34141: Optimized pickling atomic types (None, bool, int, float, bytes, |
| 32482 |
str). |
| 32483 |
|
| 32484 |
- bpo-34126: Fix crashes when profiling certain invalid calls of unbound |
| 32485 |
methods. Patch by Jeroen Demeyer. |
| 32486 |
|
| 32487 |
- bpo-24618: Fixed reading invalid memory when create the code object with |
| 32488 |
too small varnames tuple or too large argument counts. |
| 32489 |
|
| 32490 |
- bpo-34068: In :meth:`io.IOBase.close`, ensure that the |
| 32491 |
:attr:`~io.IOBase.closed` attribute is not set with a live exception. |
| 32492 |
Patch by Zackery Spytz and Serhiy Storchaka. |
| 32493 |
|
| 32494 |
- bpo-34087: Fix buffer overflow while converting unicode to numeric values. |
| 32495 |
|
| 32496 |
- bpo-34080: Fixed a memory leak in the compiler when it raised some |
| 32497 |
uncommon errors during tokenizing. |
| 32498 |
|
| 32499 |
- bpo-34066: Disabled interruption by Ctrl-C between calling ``open()`` and |
| 32500 |
entering a **with** block in ``with open()``. |
| 32501 |
|
| 32502 |
- bpo-34042: Fix dict.copy() to maintain correct total refcount (as reported |
| 32503 |
by sys.gettotalrefcount()). |
| 32504 |
|
| 32505 |
- bpo-33418: Fix potential memory leak in function object when it creates |
| 32506 |
reference cycle. |
| 32507 |
|
| 32508 |
- bpo-33985: Implement contextvars.ContextVar.name attribute. |
| 32509 |
|
| 32510 |
- bpo-33956: Update vendored Expat library copy to version 2.2.5. |
| 32511 |
|
| 32512 |
- bpo-24596: Decref the module object in :c:func:`PyRun_SimpleFileExFlags` |
| 32513 |
before calling :c:func:`PyErr_Print()`. Patch by Zackery Spytz. |
| 32514 |
|
| 32515 |
- bpo-33451: Close directly executed pyc files before calling |
| 32516 |
``PyEval_EvalCode()``. |
| 32517 |
|
| 32518 |
- bpo-1617161: The hash of :class:`BuiltinMethodType` instances (methods of |
| 32519 |
built-in classes) now depends on the hash of the identity of *__self__* |
| 32520 |
instead of its value. The hash and equality of :class:`ModuleType` and |
| 32521 |
:class:`MethodWrapperType` instances (methods of user-defined classes and |
| 32522 |
some methods of built-in classes like ``str.__add__``) now depend on the |
| 32523 |
hash and equality of the identity of *__self__* instead of its value. |
| 32524 |
:class:`MethodWrapperType` instances no longer support ordering. |
| 32525 |
|
| 32526 |
- bpo-33824: Fix "LC_ALL=C python3.7 -V": reset properly the command line |
| 32527 |
parser when the encoding changes after reading the Python configuration. |
| 32528 |
|
| 32529 |
- bpo-33803: Fix a crash in hamt.c caused by enabling GC tracking for an |
| 32530 |
object that hadn't all of its fields set to NULL. |
| 32531 |
|
| 32532 |
- bpo-33738: Seven macro incompatibilities with the Limited API were fixed, |
| 32533 |
and the macros :c:func:`PyIter_Check`, :c:func:`PyIndex_Check` and |
| 32534 |
:c:func:`PyExceptionClass_Name` were added as functions. A script for |
| 32535 |
automatic macro checks was added. |
| 32536 |
|
| 32537 |
- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() |
| 32538 |
correctly |
| 32539 |
|
| 32540 |
- bpo-30167: ``PyRun_SimpleFileExFlags`` removes ``__cached__`` from module |
| 32541 |
in addition to ``__file__``. |
| 32542 |
|
| 32543 |
- bpo-33706: Fix a crash in Python initialization when parsing the command |
| 32544 |
line options. Thanks Christoph Gohlke for the bug report and the fix! |
| 32545 |
|
| 32546 |
- bpo-33597: Reduce ``PyGC_Head`` size from 3 words to 2 words. |
| 32547 |
|
| 32548 |
- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter |
| 32549 |
shutdown even when there was a custom handler set previously. Patch by |
| 32550 |
Philipp Kerling. |
| 32551 |
|
| 32552 |
- bpo-33622: Fixed a leak when the garbage collector fails to add an object |
| 32553 |
with the ``__del__`` method or referenced by it into the |
| 32554 |
:data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an |
| 32555 |
exception is set and preserves it. |
| 32556 |
|
| 32557 |
- bpo-33462: Make dict and dict views reversible. Patch by Rémi Lapeyre. |
| 32558 |
|
| 32559 |
- bpo-23722: A :exc:`RuntimeError` is now raised when the custom metaclass |
| 32560 |
doesn't provide the ``__classcell__`` entry in the namespace passed to |
| 32561 |
``type.__new__``. A :exc:`DeprecationWarning` was emitted in Python |
| 32562 |
3.6--3.7. |
| 32563 |
|
| 32564 |
- bpo-33499: Add :envvar:`PYTHONPYCACHEPREFIX` environment variable and |
| 32565 |
:option:`-X` ``pycache_prefix`` command-line option to set an alternate |
| 32566 |
root directory for writing module bytecode cache files. |
| 32567 |
|
| 32568 |
- bpo-25711: The :mod:`zipimport` module has been rewritten in pure Python. |
| 32569 |
|
| 32570 |
- bpo-33509: Fix module_globals parameter of warnings.warn_explicit(): don't |
| 32571 |
crash if module_globals is not a dict. |
| 32572 |
|
| 32573 |
- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c. |
| 32574 |
|
| 32575 |
- bpo-33475: Fixed miscellaneous bugs in converting annotations to strings |
| 32576 |
and optimized parentheses in the string representation. |
| 32577 |
|
| 32578 |
- bpo-20104: Added support for the ``setpgroup``, ``resetids``, |
| 32579 |
``setsigmask``, ``setsigdef`` and ``scheduler`` parameters of |
| 32580 |
``posix_spawn``. Patch by Pablo Galindo. |
| 32581 |
|
| 32582 |
- bpo-33391: Fix a leak in set_symmetric_difference(). |
| 32583 |
|
| 32584 |
- bpo-33363: Raise a SyntaxError for ``async with`` and ``async for`` |
| 32585 |
statements outside of async functions. |
| 32586 |
|
| 32587 |
- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer. |
| 32588 |
|
| 32589 |
- bpo-33128: Fix a bug that causes PathFinder to appear twice on |
| 32590 |
sys.meta_path. Patch by Pablo Galindo Salgado. |
| 32591 |
|
| 32592 |
- bpo-33331: Modules imported last are now cleared first at interpreter |
| 32593 |
shutdown. |
| 32594 |
|
| 32595 |
- bpo-33312: Fixed clang ubsan (undefined behavior sanitizer) warnings in |
| 32596 |
dictobject.c by adjusting how the internal struct _dictkeysobject shared |
| 32597 |
keys structure is declared. |
| 32598 |
|
| 32599 |
- bpo-33305: Improved syntax error messages for invalid numerical literals. |
| 32600 |
|
| 32601 |
- bpo-33306: Improved syntax error messages for unbalanced parentheses. |
| 32602 |
|
| 32603 |
- bpo-33234: The list constructor will pre-size and not over-allocate when |
| 32604 |
the input length is known. |
| 32605 |
|
| 32606 |
- bpo-33270: Intern the names for all anonymous code objects. Patch by |
| 32607 |
Zackery Spytz. |
| 32608 |
|
| 32609 |
- bpo-30455: The C and Python code and the documentation related to tokens |
| 32610 |
are now generated from a single source file :file:`Grammar/Tokens`. |
| 32611 |
|
| 32612 |
- bpo-33176: Add a ``toreadonly()`` method to memoryviews. |
| 32613 |
|
| 32614 |
- bpo-33231: Fix potential memory leak in ``normalizestring()``. |
| 32615 |
|
| 32616 |
- bpo-33205: Change dict growth function from |
| 32617 |
``round_up_to_power_2(used*2+hashtable_size/2)`` to |
| 32618 |
``round_up_to_power_2(used*3)``. Previously, dict is shrinked only when |
| 32619 |
``used == 0``. Now dict has more chance to be shrinked. |
| 32620 |
|
| 32621 |
- bpo-29922: Improved error messages in 'async with' when ``__aenter__()`` |
| 32622 |
or ``__aexit__()`` return non-awaitable object. |
| 32623 |
|
| 32624 |
- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized |
| 32625 |
when copying from key-sharing dict. |
| 32626 |
|
| 32627 |
- bpo-33053: When using the -m switch, sys.path[0] is now explicitly |
| 32628 |
expanded as the *starting* working directory, rather than being left as |
| 32629 |
the empty path (which allows imports from the current working directory at |
| 32630 |
the time of the import) |
| 32631 |
|
| 32632 |
- bpo-33138: Changed standard error message for non-pickleable and |
| 32633 |
non-copyable types. It now says "cannot pickle" instead of "can't pickle" |
| 32634 |
or "cannot serialize". |
| 32635 |
|
| 32636 |
- bpo-33018: Improve consistency of errors raised by ``issubclass()`` when |
| 32637 |
called with a non-class and an abstract base class as the first and second |
| 32638 |
arguments, respectively. Patch by Josh Bronson. |
| 32639 |
|
| 32640 |
- bpo-33083: ``math.factorial`` no longer accepts arguments that are not |
| 32641 |
int-like. Patch by Pablo Galindo. |
| 32642 |
|
| 32643 |
- bpo-33041: Added new opcode :opcode:`END_ASYNC_FOR` and fixes the |
| 32644 |
following issues: |
| 32645 |
|
| 32646 |
* Setting global :exc:`StopAsyncIteration` no longer breaks ``async for`` |
| 32647 |
loops. |
| 32648 |
* Jumping into an ``async for`` loop is now disabled. |
| 32649 |
* Jumping out of an ``async for`` loop no longer corrupts the stack. |
| 32650 |
|
| 32651 |
- bpo-25750: Fix rare Python crash due to bad refcounting in |
| 32652 |
``type_getattro()`` if a descriptor deletes itself from the class. Patch |
| 32653 |
by Jeroen Demeyer. |
| 32654 |
|
| 32655 |
- bpo-33041: Fixed bytecode generation for "async for" with a complex |
| 32656 |
target. A StopAsyncIteration raised on assigning or unpacking will be now |
| 32657 |
propagated instead of stopping the iteration. |
| 32658 |
|
| 32659 |
- bpo-33026: Fixed jumping out of "with" block by setting f_lineno. |
| 32660 |
|
| 32661 |
- bpo-33005: Fix a crash on fork when using a custom memory allocator (ex: |
| 32662 |
using PYTHONMALLOC env var). _PyGILState_Reinit() and |
| 32663 |
_PyInterpreterState_Enable() now use the default RAW memory allocator to |
| 32664 |
allocate a new interpreters mutex on fork. |
| 32665 |
|
| 32666 |
- bpo-32911: Due to unexpected compatibility issues discovered during |
| 32667 |
downstream beta testing, reverted :issue:`29463`. ``docstring`` field is |
| 32668 |
removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes |
| 32669 |
which was added in 3.7a1. Docstring expression is restored as a first |
| 32670 |
statement in their body. Based on patch by Inada Naoki. |
| 32671 |
|
| 32672 |
- bpo-17288: Prevent jumps from 'return' and 'exception' trace events. |
| 32673 |
|
| 32674 |
- bpo-32946: Importing names from already imported module with "from ... |
| 32675 |
import ..." is now 30% faster if the module is not a package. |
| 32676 |
|
| 32677 |
- bpo-32932: Make error message more revealing when there are non-str |
| 32678 |
objects in ``__all__``. |
| 32679 |
|
| 32680 |
- bpo-32925: Optimized iterating and containing test for literal lists |
| 32681 |
consisting of non-constants: ``x in [a, b]`` and ``for x in [a, b]``. The |
| 32682 |
case of all constant elements already was optimized. |
| 32683 |
|
| 32684 |
- bpo-32889: Update Valgrind suppression list to account for the rename of |
| 32685 |
``Py_ADDRESS_IN_RANG`` to ``address_in_range``. |
| 32686 |
|
| 32687 |
- bpo-32836: Don't use temporary variables in cases of list/dict/set |
| 32688 |
comprehensions |
| 32689 |
|
| 32690 |
- bpo-31356: Remove the new API added in bpo-31356 (gc.ensure_disabled() |
| 32691 |
context manager). |
| 32692 |
|
| 32693 |
- bpo-32305: For namespace packages, ensure that both ``__file__`` and |
| 32694 |
``__spec__.origin`` are set to None. |
| 32695 |
|
| 32696 |
- bpo-32303: Make sure ``__spec__.loader`` matches ``__loader__`` for |
| 32697 |
namespace packages. |
| 32698 |
|
| 32699 |
- bpo-32711: Fix the warning messages for Python/ast_unparse.c. Patch by |
| 32700 |
Stéphane Wirtel |
| 32701 |
|
| 32702 |
- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by |
| 32703 |
write out-of-bound errors when using customized decode error handlers. |
| 32704 |
|
| 32705 |
- bpo-32489: A :keyword:`continue` statement is now allowed in the |
| 32706 |
:keyword:`finally` clause. |
| 32707 |
|
| 32708 |
- bpo-17611: Simplified the interpreter loop by moving the logic of |
| 32709 |
unrolling the stack of blocks into the compiler. The compiler emits now |
| 32710 |
explicit instructions for adjusting the stack of values and calling the |
| 32711 |
cleaning up code for :keyword:`break`, :keyword:`continue` and |
| 32712 |
:keyword:`return`. |
| 32713 |
|
| 32714 |
Removed opcodes :opcode:`BREAK_LOOP`, :opcode:`CONTINUE_LOOP`, |
| 32715 |
:opcode:`SETUP_LOOP` and :opcode:`SETUP_EXCEPT`. Added new opcodes |
| 32716 |
:opcode:`ROT_FOUR`, :opcode:`BEGIN_FINALLY` and :opcode:`CALL_FINALLY` and |
| 32717 |
:opcode:`POP_FINALLY`. Changed the behavior of :opcode:`END_FINALLY` and |
| 32718 |
:opcode:`WITH_CLEANUP_START`. |
| 32719 |
|
| 32720 |
- bpo-32285: New function unicodedata.is_normalized, which can check whether |
| 32721 |
a string is in a specific normal form. |
| 32722 |
|
| 32723 |
- bpo-10544: Yield expressions are now disallowed in comprehensions and |
| 32724 |
generator expressions except the expression for the outermost iterable. |
| 32725 |
|
| 32726 |
- bpo-32117: Iterable unpacking is now allowed without parentheses in yield |
| 32727 |
and return statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David |
| 32728 |
Cuthbert for the change and Jordan Chapman for added tests. |
| 32729 |
|
| 32730 |
- bpo-31902: Fix the ``col_offset`` attribute for ast nodes |
| 32731 |
``ast.AsyncFor``, ``ast.AsyncFunctionDef``, and ``ast.AsyncWith``. |
| 32732 |
Previously, ``col_offset`` pointed to the keyword after ``async``. |
| 32733 |
|
| 32734 |
- bpo-25862: Fix assertion failures in the ``tell()`` method of |
| 32735 |
``io.TextIOWrapper``. Patch by Zackery Spytz. |
| 32736 |
|
| 32737 |
- bpo-21983: Fix a crash in ``ctypes.cast()`` in case the type argument is a |
| 32738 |
ctypes structured data type. Patch by Eryk Sun and Oren Milman. |
| 32739 |
|
| 32740 |
- bpo-31577: Fix a crash in ``os.utime()`` in case of a bad ns argument. |
| 32741 |
Patch by Oren Milman. |
| 32742 |
|
| 32743 |
- bpo-29832: Remove references to 'getsockaddrarg' from various socket error |
| 32744 |
messages. Patch by Oren Milman. |
| 32745 |
|
| 32746 |
Library |
| 32747 |
------- |
| 32748 |
|
| 32749 |
- bpo-35845: Add 'order' parameter to memoryview.tobytes(). |
| 32750 |
|
| 32751 |
- bpo-35864: The _asdict() method for collections.namedtuple now returns a |
| 32752 |
regular dict instead of an OrderedDict. |
| 32753 |
|
| 32754 |
- bpo-35537: An ExitStack is now used internally within subprocess.Popen to |
| 32755 |
clean up pipe file handles. No behavior change in normal operation. But if |
| 32756 |
closing one handle were ever to cause an exception, the others will now be |
| 32757 |
closed instead of leaked. (patch by Giampaolo Rodola) |
| 32758 |
|
| 32759 |
- bpo-35847: RISC-V needed the CTYPES_PASS_BY_REF_HACK. Fixes ctypes |
| 32760 |
Structure test_pass_by_value. |
| 32761 |
|
| 32762 |
- bpo-35813: Shared memory submodule added to multiprocessing to avoid need |
| 32763 |
for serialization between processes |
| 32764 |
|
| 32765 |
- bpo-35780: Fix lru_cache() errors arising in recursive, reentrant, or |
| 32766 |
multi-threaded code. These errors could result in orphan links and in the |
| 32767 |
cache being trapped in a state with fewer than the specified maximum |
| 32768 |
number of links. Fix handling of negative maxsize which should have been |
| 32769 |
treated as zero. Fix errors in toggling the "full" status flag. Fix |
| 32770 |
misordering of links when errors are encountered. Sync-up the C code and |
| 32771 |
pure Python code for the space saving path in functions with a single |
| 32772 |
positional argument. In this common case, the space overhead of an lru |
| 32773 |
cache entry is reduced by almost half. Fix counting of cache misses. In |
| 32774 |
error cases, the miss count was out of sync with the actual number of |
| 32775 |
times the underlying user function was called. |
| 32776 |
|
| 32777 |
- bpo-35537: :func:`os.posix_spawn` and :func:`os.posix_spawnp` now have a |
| 32778 |
*setsid* parameter. |
| 32779 |
|
| 32780 |
- bpo-23846: :class:`asyncio.ProactorEventLoop` now catches and logs send |
| 32781 |
errors when the self-pipe is full. |
| 32782 |
|
| 32783 |
- bpo-34323: :mod:`asyncio`: Enhance ``IocpProactor.close()`` log: wait 1 |
| 32784 |
second before the first log, then log every second. Log also the number of |
| 32785 |
seconds since ``close()`` was called. |
| 32786 |
|
| 32787 |
- bpo-35674: Add a new :func:`os.posix_spawnp` function. Patch by Joannah |
| 32788 |
Nanjekye. |
| 32789 |
|
| 32790 |
- bpo-35733: ``ast.Constant(boolean)`` no longer an instance of |
| 32791 |
:class:`ast.Num`. Patch by Anthony Sottile. |
| 32792 |
|
| 32793 |
- bpo-35726: QueueHandler.prepare() now makes a copy of the record before |
| 32794 |
modifying and enqueueing it, to avoid affecting other handlers in the |
| 32795 |
chain. |
| 32796 |
|
| 32797 |
- bpo-35719: Sped up multi-argument :mod:`math` functions atan2(), |
| 32798 |
copysign(), remainder() and hypot() by 1.3--2.5 times. |
| 32799 |
|
| 32800 |
- bpo-35717: Fix KeyError exception raised when using enums and compile. |
| 32801 |
Patch contributed by Rémi Lapeyre. |
| 32802 |
|
| 32803 |
- bpo-35699: Fixed detection of Visual Studio Build Tools 2017 in distutils |
| 32804 |
|
| 32805 |
- bpo-32710: Fix memory leaks in asyncio ProactorEventLoop on overlapped |
| 32806 |
operation failure. |
| 32807 |
|
| 32808 |
- bpo-35702: The :const:`time.CLOCK_UPTIME_RAW` constant is now available |
| 32809 |
for macOS 10.12. |
| 32810 |
|
| 32811 |
- bpo-32710: Fix a memory leak in asyncio in the ProactorEventLoop when |
| 32812 |
``ReadFile()`` or ``WSASend()`` overlapped operation fail immediately: |
| 32813 |
release the internal buffer. |
| 32814 |
|
| 32815 |
- bpo-35682: Fix ``asyncio.ProactorEventLoop.sendfile()``: don't attempt to |
| 32816 |
set the result of an internal future if it's already done. |
| 32817 |
|
| 32818 |
- bpo-35283: Add a deprecated warning for the |
| 32819 |
:meth:`threading.Thread.isAlive` method. Patch by Donghee Na. |
| 32820 |
|
| 32821 |
- bpo-35664: Improve operator.itemgetter() performance by 33% with optimized |
| 32822 |
argument handling and with adding a fast path for the common case of a |
| 32823 |
single non-negative integer index into a tuple (which is the typical use |
| 32824 |
case in the standard library). |
| 32825 |
|
| 32826 |
- bpo-35643: Fixed a SyntaxWarning: invalid escape sequence in |
| 32827 |
Modules/_sha3/cleanup.py. Patch by Mickaël Schoentgen. |
| 32828 |
|
| 32829 |
- bpo-35619: Improved support of custom data descriptors in :func:`help` and |
| 32830 |
:mod:`pydoc`. |
| 32831 |
|
| 32832 |
- bpo-28503: The ``crypt`` module now internally uses the ``crypt_r()`` |
| 32833 |
library function instead of ``crypt()`` when available. |
| 32834 |
|
| 32835 |
- bpo-35614: Fixed help() on metaclasses. Patch by Sanyam Khurana. |
| 32836 |
|
| 32837 |
- bpo-35568: Expose ``raise(signum)`` as ``raise_signal`` |
| 32838 |
|
| 32839 |
- bpo-35588: The floor division and modulo operations and the :func:`divmod` |
| 32840 |
function on :class:`fractions.Fraction` types are 2--4x faster. Patch by |
| 32841 |
Stefan Behnel. |
| 32842 |
|
| 32843 |
- bpo-35585: Speed-up building enums by value, e.g. http.HTTPStatus(200). |
| 32844 |
|
| 32845 |
- bpo-30561: random.gammavariate(1.0, beta) now computes the same result as |
| 32846 |
random.expovariate(1.0 / beta). This synchronizes the two algorithms and |
| 32847 |
eliminates some idiosyncrasies in the old implementation. It does however |
| 32848 |
produce a difference stream of random variables than it used to. |
| 32849 |
|
| 32850 |
- bpo-35537: The :mod:`subprocess` module can now use the |
| 32851 |
:func:`os.posix_spawn` function in some cases for better performance. |
| 32852 |
|
| 32853 |
- bpo-35526: Delaying the 'joke' of barry_as_FLUFL.mandatory to Python |
| 32854 |
version 4.0 |
| 32855 |
|
| 32856 |
- bpo-35523: Remove :mod:`ctypes` callback workaround: no longer create a |
| 32857 |
callback at startup. Avoid SELinux alert on ``import ctypes`` and ``import |
| 32858 |
uuid``. |
| 32859 |
|
| 32860 |
- bpo-31784: :func:`uuid.uuid1` now calls :func:`time.time_ns` rather than |
| 32861 |
``int(time.time() * 1e9)``. |
| 32862 |
|
| 32863 |
- bpo-35513: :class:`~unittest.runner.TextTestRunner` of |
| 32864 |
:mod:`unittest.runner` now uses :func:`time.perf_counter` rather than |
| 32865 |
:func:`time.time` to measure the execution time of a test: |
| 32866 |
:func:`time.time` can go backwards, whereas :func:`time.perf_counter` is |
| 32867 |
monotonic. |
| 32868 |
|
| 32869 |
- bpo-35502: Fixed reference leaks in |
| 32870 |
:class:`xml.etree.ElementTree.TreeBuilder` in case of unfinished building |
| 32871 |
of the tree (in particular when an error was raised during parsing XML). |
| 32872 |
|
| 32873 |
- bpo-35348: Make :func:`platform.architecture` parsing of ``file`` command |
| 32874 |
output more reliable: add the ``-b`` option to the ``file`` command to |
| 32875 |
omit the filename, force the usage of the C locale, and search also the |
| 32876 |
"shared object" pattern. |
| 32877 |
|
| 32878 |
- bpo-35491: :mod:`multiprocessing`: Add ``Pool.__repr__()`` and enhance |
| 32879 |
``BaseProcess.__repr__()`` (add pid and parent pid) to ease debugging. |
| 32880 |
Pool state constant values are now strings instead of integers, for |
| 32881 |
example ``RUN`` value becomes ``'RUN'`` instead of ``0``. |
| 32882 |
|
| 32883 |
- bpo-35477: :meth:`multiprocessing.Pool.__enter__` now fails if the pool is |
| 32884 |
not running: ``with pool:`` fails if used more than once. |
| 32885 |
|
| 32886 |
- bpo-31446: Copy command line that was passed to CreateProcessW since this |
| 32887 |
function can change the content of the input buffer. |
| 32888 |
|
| 32889 |
- bpo-35471: Python 2.4 dropped MacOS 9 support. The macpath module was |
| 32890 |
deprecated in Python 3.7. The module is now removed. |
| 32891 |
|
| 32892 |
- bpo-23057: Unblock Proactor event loop when keyboard interrupt is received |
| 32893 |
on Windows |
| 32894 |
|
| 32895 |
- bpo-35052: Fix xml.dom.minidom cloneNode() on a document with an entity: |
| 32896 |
pass the correct arguments to the user data handler of an entity. |
| 32897 |
|
| 32898 |
- bpo-20239: Allow repeated assignment deletion of |
| 32899 |
:class:`unittest.mock.Mock` attributes. Patch by Pablo Galindo. |
| 32900 |
|
| 32901 |
- bpo-17185: Set ``__signature__`` on mock for :mod:`inspect` to get |
| 32902 |
signature. Patch by Karthikeyan Singaravelan. |
| 32903 |
|
| 32904 |
- bpo-35445: Memory errors during creating posix.environ no longer ignored. |
| 32905 |
|
| 32906 |
- bpo-35415: Validate fileno= argument to socket.socket(). |
| 32907 |
|
| 32908 |
- bpo-35424: :class:`multiprocessing.Pool` destructor now emits |
| 32909 |
:exc:`ResourceWarning` if the pool is still running. |
| 32910 |
|
| 32911 |
- bpo-35330: When a :class:`Mock` instance was used to wrap an object, if |
| 32912 |
``side_effect`` is used in one of the mocks of it methods, don't call the |
| 32913 |
original implementation and return the result of using the side effect the |
| 32914 |
same way that it is done with return_value. |
| 32915 |
|
| 32916 |
- bpo-35346: Drop Mac OS 9 and Rhapsody support from the :mod:`platform` |
| 32917 |
module. Rhapsody last release was in 2000. Mac OS 9 last release was in |
| 32918 |
2001. |
| 32919 |
|
| 32920 |
- bpo-10496: :func:`~distutils.utils.check_environ` of ``distutils.utils`` |
| 32921 |
now catches :exc:`KeyError` on calling :func:`pwd.getpwuid`: don't create |
| 32922 |
the ``HOME`` environment variable in this case. |
| 32923 |
|
| 32924 |
- bpo-10496: :func:`posixpath.expanduser` now returns the input *path* |
| 32925 |
unchanged if the ``HOME`` environment variable is not set and the current |
| 32926 |
user has no home directory (if the current user identifier doesn't exist |
| 32927 |
in the password database). This change fix the :mod:`site` module if the |
| 32928 |
current user doesn't exist in the password database (if the user has no |
| 32929 |
home directory). |
| 32930 |
|
| 32931 |
- bpo-35389: :func:`platform.libc_ver` now uses |
| 32932 |
``os.confstr('CS_GNU_LIBC_VERSION')`` if available and the *executable* |
| 32933 |
parameter is not set. |
| 32934 |
|
| 32935 |
- bpo-35394: Add empty slots to asyncio abstract protocols. |
| 32936 |
|
| 32937 |
- bpo-35310: Fix a bug in :func:`select.select` where, in some cases, the |
| 32938 |
file descriptor sequences were returned unmodified after a signal |
| 32939 |
interruption, even though the file descriptors might not be ready yet. |
| 32940 |
:func:`select.select` will now always return empty lists if a timeout has |
| 32941 |
occurred. Patch by Oran Avraham. |
| 32942 |
|
| 32943 |
- bpo-35380: Enable TCP_NODELAY on Windows for proactor asyncio event loop. |
| 32944 |
|
| 32945 |
- bpo-35341: Add generic version of ``collections.OrderedDict`` to the |
| 32946 |
``typing`` module. Patch by Ismo Toijala. |
| 32947 |
|
| 32948 |
- bpo-35371: Fixed possible crash in ``os.utime()`` on Windows when pass |
| 32949 |
incorrect arguments. |
| 32950 |
|
| 32951 |
- bpo-35346: :func:`platform.uname` now redirects ``stderr`` to |
| 32952 |
:data:`os.devnull` when running external programs like ``cmd /c ver``. |
| 32953 |
|
| 32954 |
- bpo-35066: Previously, calling the strftime() method on a datetime object |
| 32955 |
with a trailing '%' in the format string would result in an exception. |
| 32956 |
However, this only occurred when the datetime C module was being used; the |
| 32957 |
python implementation did not match this behavior. Datetime is now PEP-399 |
| 32958 |
compliant, and will not throw an exception on a trailing '%'. |
| 32959 |
|
| 32960 |
- bpo-35345: The function ``platform.popen`` has been removed, it was |
| 32961 |
deprecated since Python 3.3: use :func:`os.popen` instead. |
| 32962 |
|
| 32963 |
- bpo-35344: On macOS, :func:`platform.platform` now uses |
| 32964 |
:func:`platform.mac_ver`, if it returns a non-empty release string, to get |
| 32965 |
the macOS version rather than the darwin version. |
| 32966 |
|
| 32967 |
- bpo-35312: Make ``lib2to3.pgen2.parse.ParseError`` round-trip pickle-able. |
| 32968 |
Patch by Anthony Sottile. |
| 32969 |
|
| 32970 |
- bpo-35308: Fix regression in ``webbrowser`` where default browsers may be |
| 32971 |
preferred over browsers in the ``BROWSER`` environment variable. |
| 32972 |
|
| 32973 |
- bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff. |
| 32974 |
Original patch by R. David Murray & Jairo Trad. Enhanced by Sanyam |
| 32975 |
Khurana. |
| 32976 |
|
| 32977 |
- bpo-28604: :func:`locale.localeconv` now sets temporarily the ``LC_CTYPE`` |
| 32978 |
locale to the ``LC_MONETARY`` locale if the two locales are different and |
| 32979 |
monetary strings are non-ASCII. This temporary change affects other |
| 32980 |
threads. |
| 32981 |
|
| 32982 |
- bpo-35277: Update ensurepip to install pip 18.1 and setuptools 40.6.2. |
| 32983 |
|
| 32984 |
- bpo-24209: Adds IPv6 support when invoking http.server directly. |
| 32985 |
|
| 32986 |
- bpo-35226: Recursively check arguments when testing for equality of |
| 32987 |
:class:`unittest.mock.call` objects and add note that tracking of |
| 32988 |
parameters used to create ancestors of mocks in ``mock_calls`` is not |
| 32989 |
possible. |
| 32990 |
|
| 32991 |
- bpo-29564: The warnings module now suggests to enable tracemalloc if the |
| 32992 |
source is specified, the tracemalloc module is available, but tracemalloc |
| 32993 |
is not tracing memory allocations. |
| 32994 |
|
| 32995 |
- bpo-35189: Modify the following fnctl function to retry if interrupted by |
| 32996 |
a signal (EINTR): flock, lockf, fnctl |
| 32997 |
|
| 32998 |
- bpo-30064: Use add_done_callback() in sock_* asyncio API to unsubscribe |
| 32999 |
reader/writer early on calcellation. |
| 33000 |
|
| 33001 |
- bpo-35186: Removed the "built with" comment added when ``setup.py upload`` |
| 33002 |
is used with either ``bdist_rpm`` or ``bdist_dumb``. |
| 33003 |
|
| 33004 |
- bpo-35152: Allow sending more than 2 GB at once on a multiprocessing |
| 33005 |
connection on non-Windows systems. |
| 33006 |
|
| 33007 |
- bpo-35062: Fix incorrect parsing of |
| 33008 |
:class:`io.IncrementalNewlineDecoder`'s *translate* argument. |
| 33009 |
|
| 33010 |
- bpo-35065: Remove ``StreamReaderProtocol._untrack_reader``. The call to |
| 33011 |
``_untrack_reader`` is currently performed too soon, causing the protocol |
| 33012 |
to forget about the reader before ``connection_lost`` can run and feed the |
| 33013 |
EOF to the reader. |
| 33014 |
|
| 33015 |
- bpo-34160: ElementTree and minidom now preserve the attribute order |
| 33016 |
specified by the user. |
| 33017 |
|
| 33018 |
- bpo-35079: Improve difflib.SequenceManager.get_matching_blocks doc by |
| 33019 |
adding 'non-overlapping' and changing '!=' to '<'. |
| 33020 |
|
| 33021 |
- bpo-33710: Deprecated ``l*gettext()`` functions and methods in the |
| 33022 |
:mod:`gettext` module. They return encoded bytes instead of Unicode |
| 33023 |
strings and are artifacts from Python 2 times. Also deprecated functions |
| 33024 |
and methods related to setting the charset for ``l*gettext()`` functions |
| 33025 |
and methods. |
| 33026 |
|
| 33027 |
- bpo-35017: :meth:`socketserver.BaseServer.serve_forever` now exits |
| 33028 |
immediately if it's :meth:`~socketserver.BaseServer.shutdown` method is |
| 33029 |
called while it is polling for new events. |
| 33030 |
|
| 33031 |
- bpo-35024: ``importlib`` no longer logs ``wrote <bytecode path>`` |
| 33032 |
redundantly after ``(created|could not create) <bytecode path>`` is |
| 33033 |
already logged. Patch by Quentin Agren. |
| 33034 |
|
| 33035 |
- bpo-35047: ``unittest.mock`` now includes mock calls in exception messages |
| 33036 |
if ``assert_not_called``, ``assert_called_once``, or |
| 33037 |
``assert_called_once_with`` fails. Patch by Petter Strandmark. |
| 33038 |
|
| 33039 |
- bpo-31047: Fix ``ntpath.abspath`` regression where it didn't remove a |
| 33040 |
trailing separator on Windows. Patch by Tim Graham. |
| 33041 |
|
| 33042 |
- bpo-35053: tracemalloc now tries to update the traceback when an object is |
| 33043 |
reused from a "free list" (optimization for faster object creation, used |
| 33044 |
by the builtin list type for example). |
| 33045 |
|
| 33046 |
- bpo-31553: Add the --json-lines option to json.tool. Patch by hongweipeng. |
| 33047 |
|
| 33048 |
- bpo-34794: Fixed a leak in Tkinter when pass the Python wrapper around |
| 33049 |
Tcl_Obj back to Tcl/Tk. |
| 33050 |
|
| 33051 |
- bpo-34909: Enum: fix grandchildren subclassing when parent mixed with |
| 33052 |
concrete data types. |
| 33053 |
|
| 33054 |
- bpo-35022: :class:`unittest.mock.MagicMock` now supports the |
| 33055 |
``__fspath__`` method (from :class:`os.PathLike`). |
| 33056 |
|
| 33057 |
- bpo-35008: Fixed references leaks when call the ``__setstate__()`` method |
| 33058 |
of :class:`xml.etree.ElementTree.Element` in the C implementation for |
| 33059 |
already initialized element. |
| 33060 |
|
| 33061 |
- bpo-23420: Verify the value for the parameter '-s' of the cProfile CLI. |
| 33062 |
Patch by Robert Kuska |
| 33063 |
|
| 33064 |
- bpo-33947: dataclasses now handle recursive reprs without raising |
| 33065 |
RecursionError. |
| 33066 |
|
| 33067 |
- bpo-34890: Make :func:`inspect.iscoroutinefunction`, |
| 33068 |
:func:`inspect.isgeneratorfunction` and :func:`inspect.isasyncgenfunction` |
| 33069 |
work with :func:`functools.partial`. Patch by Pablo Galindo. |
| 33070 |
|
| 33071 |
- bpo-34521: Use :func:`socket.CMSG_SPACE` to calculate ancillary data size |
| 33072 |
instead of :func:`socket.CMSG_LEN` in |
| 33073 |
:func:`multiprocessing.reduction.recvfds` as :rfc:`3542` requires the use |
| 33074 |
of the former for portable applications. |
| 33075 |
|
| 33076 |
- bpo-31522: The ``mailbox.mbox.get_string`` function *from_* parameter can |
| 33077 |
now successfully be set to a non-default value. |
| 33078 |
|
| 33079 |
- bpo-34970: Protect tasks weak set manipulation in ``asyncio.all_tasks()`` |
| 33080 |
|
| 33081 |
- bpo-34969: gzip: Add --fast, --best on the gzip CLI, these parameters will |
| 33082 |
be used for the fast compression method (quick) or the best method |
| 33083 |
compress (slower, but smaller file). Also, change the default compression |
| 33084 |
level to 6 (tradeoff). |
| 33085 |
|
| 33086 |
- bpo-16965: The 2to3 ``execfile`` fixer now opens the file with mode |
| 33087 |
``'rb'``. Patch by Zackery Spytz. |
| 33088 |
|
| 33089 |
- bpo-34966: :mod:`pydoc` now supports aliases not only to methods defined |
| 33090 |
in the end class, but also to inherited methods. The docstring is not |
| 33091 |
duplicated for aliases. |
| 33092 |
|
| 33093 |
- bpo-34926: :meth:`mimetypes.MimeTypes.guess_type` now accepts |
| 33094 |
:term:`path-like object` in addition to url strings. Patch by Mayank |
| 33095 |
Asthana. |
| 33096 |
|
| 33097 |
- bpo-23831: Add ``moveto()`` method to the ``tkinter.Canvas`` widget. Patch |
| 33098 |
by Juliette Monsel. |
| 33099 |
|
| 33100 |
- bpo-34941: Methods ``find()``, ``findtext()`` and ``findall()`` of the |
| 33101 |
``Element`` class in the :mod:`xml.etree.ElementTree` module are now able |
| 33102 |
to find children which are instances of ``Element`` subclasses. |
| 33103 |
|
| 33104 |
- bpo-32680: :class:`smtplib.SMTP` objects now always have a ``sock`` |
| 33105 |
attribute present |
| 33106 |
|
| 33107 |
- bpo-34769: Fix for async generators not finalizing when event loop is in |
| 33108 |
debug mode and garbage collector runs in another thread. |
| 33109 |
|
| 33110 |
- bpo-34936: Fix ``TclError`` in ``tkinter.Spinbox.selection_element()``. |
| 33111 |
Patch by Juliette Monsel. |
| 33112 |
|
| 33113 |
- bpo-34829: Add methods ``selection_from``, ``selection_range``, |
| 33114 |
``selection_present`` and ``selection_to`` to the ``tkinter.Spinbox`` for |
| 33115 |
consistency with the ``tkinter.Entry`` widget. Patch by Juliette Monsel. |
| 33116 |
|
| 33117 |
- bpo-34911: Added *secure_protocols* argument to |
| 33118 |
*http.cookiejar.DefaultCookiePolicy* to allow for tweaking of protocols |
| 33119 |
and also to add support by default for *wss*, the secure websocket |
| 33120 |
protocol. |
| 33121 |
|
| 33122 |
- bpo-34922: Fixed integer overflow in the :meth:`~hashlib.shake.digest` and |
| 33123 |
:meth:`~hashlib.shake.hexdigest` methods for the SHAKE algorithm in the |
| 33124 |
:mod:`hashlib` module. |
| 33125 |
|
| 33126 |
- bpo-34925: 25% speedup in argument parsing for the functions in the bisect |
| 33127 |
module. |
| 33128 |
|
| 33129 |
- bpo-34900: Fixed :meth:`unittest.TestCase.debug` when used to call test |
| 33130 |
methods with subtests. Patch by Bruno Oliveira. |
| 33131 |
|
| 33132 |
- bpo-34844: logging.Formatter enhancement - Ensure styles and fmt matches |
| 33133 |
in logging.Formatter - Added validate method in each format style class: |
| 33134 |
StrFormatStyle, PercentStyle, StringTemplateStyle. - This method is called |
| 33135 |
in the constructor of logging.Formatter class - Also re-raise the KeyError |
| 33136 |
in the format method of each style class, so it would a bit clear that |
| 33137 |
it's an error with the invalid format fields. |
| 33138 |
|
| 33139 |
- bpo-34897: Adjust test.support.missing_compiler_executable check so that a |
| 33140 |
nominal command name of "" is ignored. Patch by Michael Felt. |
| 33141 |
|
| 33142 |
- bpo-34871: Fix inspect module polluted ``sys.modules`` when parsing |
| 33143 |
``__text_signature__`` of callable. |
| 33144 |
|
| 33145 |
- bpo-34898: Add ``mtime`` argument to ``gzip.compress`` for reproducible |
| 33146 |
output. Patch by Guo Ci Teo. |
| 33147 |
|
| 33148 |
- bpo-28441: On Cygwin and MinGW, ensure that ``sys.executable`` always |
| 33149 |
includes the full filename in the path, including the ``.exe`` suffix |
| 33150 |
(unless it is a symbolic link). |
| 33151 |
|
| 33152 |
- bpo-34866: Adding ``max_num_fields`` to ``cgi.FieldStorage`` to make DOS |
| 33153 |
attacks harder by limiting the number of ``MiniFieldStorage`` objects |
| 33154 |
created by ``FieldStorage``. |
| 33155 |
|
| 33156 |
- bpo-34711: http.server ensures it reports HTTPStatus.NOT_FOUND when the |
| 33157 |
local path ends with "/" and is not a directory, even if the underlying OS |
| 33158 |
(e.g. AIX) accepts such paths as a valid file reference. Patch by Michael |
| 33159 |
Felt. |
| 33160 |
|
| 33161 |
- bpo-34872: Fix self-cancellation in C implementation of asyncio.Task |
| 33162 |
|
| 33163 |
- bpo-34849: Don't log waiting for ``selector.select`` in asyncio loop |
| 33164 |
iteration. The waiting is pretty normal for any asyncio program, logging |
| 33165 |
its time just adds a noise to logs without any useful information |
| 33166 |
provided. |
| 33167 |
|
| 33168 |
- bpo-34022: The :envvar:`SOURCE_DATE_EPOCH` environment variable no longer |
| 33169 |
overrides the value of the *invalidation_mode* argument to |
| 33170 |
:func:`py_compile.compile`, and determines its default value instead. |
| 33171 |
|
| 33172 |
- bpo-34819: Use a monotonic clock to compute timeouts in |
| 33173 |
:meth:`Executor.map` and :func:`as_completed`, in order to prevent |
| 33174 |
timeouts from deviating when the system clock is adjusted. |
| 33175 |
|
| 33176 |
- bpo-34758: Add .wasm -> application/wasm to list of recognized file types |
| 33177 |
and content type headers |
| 33178 |
|
| 33179 |
- bpo-34789: :func:`xml.sax.make_parser` now accepts any iterable as its |
| 33180 |
*parser_list* argument. Patch by Andrés Delfino. |
| 33181 |
|
| 33182 |
- bpo-34334: In :class:`QueueHandler`, clear ``exc_text`` from |
| 33183 |
:class:`LogRecord` to prevent traceback from being written twice. |
| 33184 |
|
| 33185 |
- bpo-34687: On Windows, asyncio now uses ProactorEventLoop, instead of |
| 33186 |
SelectorEventLoop, by default. |
| 33187 |
|
| 33188 |
- bpo-5950: Support reading zip files with archive comments in |
| 33189 |
:mod:`zipimport`. |
| 33190 |
|
| 33191 |
- bpo-32892: The parser now represents all constants as |
| 33192 |
:class:`ast.Constant` instead of using specific constant AST types |
| 33193 |
(``Num``, ``Str``, ``Bytes``, ``NameConstant`` and ``Ellipsis``). These |
| 33194 |
classes are considered deprecated and will be removed in future Python |
| 33195 |
versions. |
| 33196 |
|
| 33197 |
- bpo-34728: Add deprecation warning when ``loop`` is used in methods: |
| 33198 |
``asyncio.sleep``, ``asyncio.wait`` and ``asyncio.wait_for``. |
| 33199 |
|
| 33200 |
- bpo-34738: ZIP files created by ``distutils`` will now include entries for |
| 33201 |
directories. |
| 33202 |
|
| 33203 |
- bpo-34659: Add an optional *initial* argument to itertools.accumulate(). |
| 33204 |
|
| 33205 |
- bpo-29577: Support multiple mixin classes when creating Enums. |
| 33206 |
|
| 33207 |
- bpo-34670: Add SSLContext.post_handshake_auth and |
| 33208 |
SSLSocket.verify_client_post_handshake for TLS 1.3's post handshake |
| 33209 |
authentication feature. |
| 33210 |
|
| 33211 |
- bpo-32718: The Activate.ps1 script from venv works with PowerShell Core |
| 33212 |
6.1 and is now available under all operating systems. |
| 33213 |
|
| 33214 |
- bpo-31177: Fix bug that prevented using :meth:`reset_mock |
| 33215 |
<unittest.mock.Mock.reset_mock>` on mock instances with deleted attributes |
| 33216 |
|
| 33217 |
- bpo-34672: Add a workaround, so the ``'Z'`` :func:`time.strftime` |
| 33218 |
specifier on the musl C library can work in some cases. |
| 33219 |
|
| 33220 |
- bpo-34666: Implement ``asyncio.StreamWriter.awrite`` and |
| 33221 |
``asyncio.StreamWriter.aclose()`` coroutines. Methods are needed for |
| 33222 |
providing a consistent stream API with control flow switched on by |
| 33223 |
default. |
| 33224 |
|
| 33225 |
- bpo-6721: Acquire the logging module's commonly used internal locks while |
| 33226 |
fork()ing to avoid deadlocks in the child process. |
| 33227 |
|
| 33228 |
- bpo-34658: Fix a rare interpreter unhandled exception state SystemError |
| 33229 |
only seen when using subprocess with a preexec_fn while an after_parent |
| 33230 |
handler has been registered with os.register_at_fork and the fork system |
| 33231 |
call fails. |
| 33232 |
|
| 33233 |
- bpo-34652: Ensure :func:`os.lchmod` is never defined on Linux. |
| 33234 |
|
| 33235 |
- bpo-34638: Store a weak reference to stream reader to break strong |
| 33236 |
references loop between reader and protocol. It allows to detect and |
| 33237 |
close the socket if the stream is deleted (garbage collected) without |
| 33238 |
``close()`` call. |
| 33239 |
|
| 33240 |
- bpo-34536: ``Enum._missing_``: raise ``ValueError`` if None returned and |
| 33241 |
``TypeError`` if non-member is returned. |
| 33242 |
|
| 33243 |
- bpo-34636: Speed up re scanning of many non-matching characters for \s \w |
| 33244 |
and \d within bytes objects. (microoptimization) |
| 33245 |
|
| 33246 |
- bpo-24412: Add :func:`~unittest.addModuleCleanup` and |
| 33247 |
:meth:`~unittest.TestCase.addClassCleanup` to unittest to support cleanups |
| 33248 |
for :func:`~unittest.setUpModule` and |
| 33249 |
:meth:`~unittest.TestCase.setUpClass`. Patch by Lisa Roach. |
| 33250 |
|
| 33251 |
- bpo-34630: Don't log SSL certificate errors in asyncio code (connection |
| 33252 |
error logging is skipped already). |
| 33253 |
|
| 33254 |
- bpo-32490: Prevent filename duplication in :mod:`subprocess` exception |
| 33255 |
messages. Patch by Zackery Spytz. |
| 33256 |
|
| 33257 |
- bpo-34363: dataclasses.asdict() and .astuple() now handle namedtuples |
| 33258 |
correctly. |
| 33259 |
|
| 33260 |
- bpo-34625: Update vendorized expat library version to 2.2.6. |
| 33261 |
|
| 33262 |
- bpo-32270: The subprocess module no longer mistakenly closes redirected |
| 33263 |
fds even when they were in pass_fds when outside of the default {0, 1, 2} |
| 33264 |
set. |
| 33265 |
|
| 33266 |
- bpo-34622: Create a dedicated ``asyncio.CancelledError``, |
| 33267 |
``asyncio.InvalidStateError`` and ``asyncio.TimeoutError`` exception |
| 33268 |
classes. Inherit them from corresponding exceptions from |
| 33269 |
``concurrent.futures`` package. Extract ``asyncio`` exceptions into a |
| 33270 |
separate file. |
| 33271 |
|
| 33272 |
- bpo-34610: Fixed iterator of :class:`multiprocessing.managers.DictProxy`. |
| 33273 |
|
| 33274 |
- bpo-34421: Fix distutils logging for non-ASCII strings. This caused |
| 33275 |
installation issues on Windows. |
| 33276 |
|
| 33277 |
- bpo-34604: Fix possible mojibake in the error message of ``pwd.getpwnam`` |
| 33278 |
and ``grp.getgrnam`` using string representation because of invisible |
| 33279 |
characters or trailing whitespaces. Patch by William Grzybowski. |
| 33280 |
|
| 33281 |
- bpo-30977: Make uuid.UUID use ``__slots__`` to reduce its memory |
| 33282 |
footprint. Based on original patch by Wouter Bolsterlee. |
| 33283 |
|
| 33284 |
- bpo-34574: OrderedDict iterators are not exhausted during pickling |
| 33285 |
anymore. Patch by Sergey Fedoseev. |
| 33286 |
|
| 33287 |
- bpo-8110: Refactored :mod:`subprocess` to check for Windows-specific |
| 33288 |
modules rather than ``sys.platform == 'win32'``. |
| 33289 |
|
| 33290 |
- bpo-34530: ``distutils.spawn.find_executable()`` now falls back on |
| 33291 |
:data:`os.defpath` if the ``PATH`` environment variable is not set. |
| 33292 |
|
| 33293 |
- bpo-34563: On Windows, fix multiprocessing.Connection for very large read: |
| 33294 |
fix _winapi.PeekNamedPipe() and _winapi.ReadFile() for read larger than |
| 33295 |
INT_MAX (usually ``2**31-1``). |
| 33296 |
|
| 33297 |
- bpo-34558: Correct typo in Lib/ctypes/_aix.py |
| 33298 |
|
| 33299 |
- bpo-34282: Move ``Enum._convert`` to ``EnumMeta._convert_`` and fix enum |
| 33300 |
members getting shadowed by parent attributes. |
| 33301 |
|
| 33302 |
- bpo-22872: When the queue is closed, :exc:`ValueError` is now raised by |
| 33303 |
:meth:`multiprocessing.Queue.put` and :meth:`multiprocessing.Queue.get` |
| 33304 |
instead of :exc:`AssertionError` and :exc:`OSError`, respectively. Patch |
| 33305 |
by Zackery Spytz. |
| 33306 |
|
| 33307 |
- bpo-34515: Fix parsing non-ASCII identifiers in |
| 33308 |
:mod:`!lib2to3.pgen2.tokenize` (:pep:`3131`). |
| 33309 |
|
| 33310 |
- bpo-13312: Avoids a possible integer underflow (undefined behavior) in the |
| 33311 |
time module's year handling code when passed a very low negative year |
| 33312 |
value. |
| 33313 |
|
| 33314 |
- bpo-34472: Improved compatibility for streamed files in :mod:`zipfile`. |
| 33315 |
Previously an optional signature was not being written and certain ZIP |
| 33316 |
applications were not supported. Patch by Silas Sewell. |
| 33317 |
|
| 33318 |
- bpo-34454: Fix the .fromisoformat() methods of datetime types crashing |
| 33319 |
when given unicode with non-UTF-8-encodable code points. Specifically, |
| 33320 |
datetime.fromisoformat() now accepts surrogate unicode code points used as |
| 33321 |
the separator. Report and tests by Alexey Izbyshev, patch by Paul Ganssle. |
| 33322 |
|
| 33323 |
- bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks. |
| 33324 |
Patch by Vladimir Matveev. |
| 33325 |
|
| 33326 |
- bpo-34171: Running the :mod:`trace` module no longer creates the |
| 33327 |
``trace.cover`` file. |
| 33328 |
|
| 33329 |
- bpo-34441: Fix crash when an ``ABC``-derived class with invalid |
| 33330 |
``__subclasses__`` is passed as the second argument to :func:`issubclass`. |
| 33331 |
Patch by Alexey Izbyshev. |
| 33332 |
|
| 33333 |
- bpo-34427: Fix infinite loop in ``a.extend(a)`` for ``MutableSequence`` |
| 33334 |
subclasses. |
| 33335 |
|
| 33336 |
- bpo-34412: Make :func:`signal.strsignal` work on HP-UX. Patch by Michael |
| 33337 |
Osipov. |
| 33338 |
|
| 33339 |
- bpo-20849: shutil.copytree now accepts a new ``dirs_exist_ok`` keyword |
| 33340 |
argument. Patch by Josh Bronson. |
| 33341 |
|
| 33342 |
- bpo-31715: Associate ``.mjs`` file extension with |
| 33343 |
``application/javascript`` MIME Type. |
| 33344 |
|
| 33345 |
- bpo-34384: :func:`os.readlink` now accepts :term:`path-like <path-like |
| 33346 |
object>` and :class:`bytes` objects on Windows. |
| 33347 |
|
| 33348 |
- bpo-22602: The UTF-7 decoder now raises :exc:`UnicodeDecodeError` for |
| 33349 |
ill-formed sequences starting with "+" (as specified in RFC 2152). Patch |
| 33350 |
by Zackery Spytz. |
| 33351 |
|
| 33352 |
- bpo-2122: The :meth:`mmap.flush() <mmap.mmap.flush>` method now returns |
| 33353 |
``None`` on success, raises an exception on error under all platforms. |
| 33354 |
|
| 33355 |
- bpo-34341: Appending to the ZIP archive with the ZIP64 extension no longer |
| 33356 |
grows the size of extra fields of existing entries. |
| 33357 |
|
| 33358 |
- bpo-34333: Fix %-formatting in :meth:`pathlib.PurePath.with_suffix` when |
| 33359 |
formatting an error message. |
| 33360 |
|
| 33361 |
- bpo-18540: The :class:`imaplib.IMAP4` and :class:`imaplib.IMAP4_SSL` |
| 33362 |
classes now resolve to the local host IP correctly when the default value |
| 33363 |
of *host* parameter (``''``) is used. |
| 33364 |
|
| 33365 |
- bpo-26502: Implement ``traceback.FrameSummary.__len__()`` method to |
| 33366 |
preserve compatibility with the old tuple API. |
| 33367 |
|
| 33368 |
- bpo-34318: :func:`~unittest.TestCase.assertRaises`, |
| 33369 |
:func:`~unittest.TestCase.assertRaisesRegex`, |
| 33370 |
:func:`~unittest.TestCase.assertWarns` and |
| 33371 |
:func:`~unittest.TestCase.assertWarnsRegex` no longer success if the |
| 33372 |
passed callable is None. They no longer ignore unknown keyword arguments |
| 33373 |
in the context manager mode. A DeprecationWarning was raised in these |
| 33374 |
cases since Python 3.5. |
| 33375 |
|
| 33376 |
- bpo-9372: Deprecate :meth:`~object.__getitem__` methods of |
| 33377 |
:class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper` |
| 33378 |
and :class:`fileinput.FileInput`. |
| 33379 |
|
| 33380 |
- bpo-33613: Fix a race condition in ``multiprocessing.semaphore_tracker`` |
| 33381 |
when the tracker receives SIGINT before it can register signal handlers |
| 33382 |
for ignoring it. |
| 33383 |
|
| 33384 |
- bpo-34248: Report filename in the exception raised when the database file |
| 33385 |
cannot be opened by :func:`dbm.gnu.open` and :func:`dbm.ndbm.open` due to |
| 33386 |
OS-related error. Patch by Zsolt Cserna. |
| 33387 |
|
| 33388 |
- bpo-33089: Add math.dist() to compute the Euclidean distance between two |
| 33389 |
points. |
| 33390 |
|
| 33391 |
- bpo-34246: :meth:`smtplib.SMTP.send_message` no longer modifies the |
| 33392 |
content of the *mail_options* argument. Patch by Pablo S. Blum de Aguiar. |
| 33393 |
|
| 33394 |
- bpo-31047: Fix ``ntpath.abspath`` for invalid paths on windows. Patch by |
| 33395 |
Franz Woellert. |
| 33396 |
|
| 33397 |
- bpo-32321: Add pure Python fallback for functools.reduce. Patch by Robert |
| 33398 |
Wright. |
| 33399 |
|
| 33400 |
- bpo-34270: The default asyncio task class now always has a name which can |
| 33401 |
be get or set using two new methods (:meth:`~asyncio.Task.get_name` and |
| 33402 |
:meth:`~asyncio.Task.set_name`) and is visible in the :func:`repr` output. |
| 33403 |
An initial name can also be set using the new ``name`` keyword argument to |
| 33404 |
:func:`asyncio.create_task` or the |
| 33405 |
:meth:`~asyncio.AbstractEventLoop.create_task` method of the event loop. |
| 33406 |
If no initial name is set, the default Task implementation generates a |
| 33407 |
name like ``Task-1`` using a monotonic counter. |
| 33408 |
|
| 33409 |
- bpo-34263: asyncio's event loop will not pass timeouts longer than one day |
| 33410 |
to epoll/select etc. |
| 33411 |
|
| 33412 |
- bpo-34035: Fix several AttributeError in zipfile seek() methods. Patch by |
| 33413 |
Mickaël Schoentgen. |
| 33414 |
|
| 33415 |
- bpo-32215: Fix performance regression in :mod:`sqlite3` when a DML |
| 33416 |
statement appeared in a different line than the rest of the SQL query. |
| 33417 |
|
| 33418 |
- bpo-34075: Deprecate passing non-ThreadPoolExecutor instances to |
| 33419 |
:meth:`AbstractEventLoop.set_default_executor`. |
| 33420 |
|
| 33421 |
- bpo-34251: Restore ``msilib.Win64`` to preserve backwards compatibility |
| 33422 |
since it's already used by ``distutils``' ``bdist_msi`` command. |
| 33423 |
|
| 33424 |
- bpo-19891: Ignore errors caused by missing / non-writable homedir while |
| 33425 |
writing history during exit of an interactive session. Patch by Anthony |
| 33426 |
Sottile. |
| 33427 |
|
| 33428 |
- bpo-33089: Enhanced math.hypot() to support more than two dimensions. |
| 33429 |
|
| 33430 |
- bpo-34228: tracemalloc: PYTHONTRACEMALLOC=0 environment variable and -X |
| 33431 |
tracemalloc=0 command line option are now allowed to disable explicitly |
| 33432 |
tracemalloc at startup. |
| 33433 |
|
| 33434 |
- bpo-13041: Use :func:`shutil.get_terminal_size` to calculate the terminal |
| 33435 |
width correctly in the ``argparse.HelpFormatter`` class. Initial patch by |
| 33436 |
Zbyszek Jędrzejewski-Szmek. |
| 33437 |
|
| 33438 |
- bpo-34213: Allow frozen dataclasses to have a field named "object". |
| 33439 |
Previously this conflicted with an internal use of "object". |
| 33440 |
|
| 33441 |
- bpo-34052: :meth:`sqlite3.Connection.create_aggregate`, |
| 33442 |
:meth:`sqlite3.Connection.create_function`, |
| 33443 |
:meth:`sqlite3.Connection.set_authorizer`, |
| 33444 |
:meth:`sqlite3.Connection.set_progress_handler` methods raises TypeError |
| 33445 |
when unhashable objects are passed as callable. These methods now don't |
| 33446 |
pass such objects to SQLite API. Previous behavior could lead to |
| 33447 |
segfaults. Patch by Sergey Fedoseev. |
| 33448 |
|
| 33449 |
- bpo-34197: Attributes *skipinitialspace*, *doublequote* and *strict* of |
| 33450 |
the *dialect* attribute of the :mod:`csv` reader are now :class:`bool` |
| 33451 |
instances instead of integers 0 or 1. |
| 33452 |
|
| 33453 |
- bpo-32788: Errors other than :exc:`TypeError` raised in methods |
| 33454 |
``__adapt__()`` and ``__conform__()`` in the :mod:`sqlite3` module are now |
| 33455 |
propagated to the user. |
| 33456 |
|
| 33457 |
- bpo-21446: The ``reload`` fixer now uses :func:`importlib.reload` instead |
| 33458 |
of deprecated :func:`!imp.reload`. |
| 33459 |
|
| 33460 |
- bpo-940286: pydoc's ``Helper.showtopic()`` method now prints the cross |
| 33461 |
references of a topic correctly. |
| 33462 |
|
| 33463 |
- bpo-34164: :func:`base64.b32decode` could raise UnboundLocalError or |
| 33464 |
OverflowError for incorrect padding. Now it always raises |
| 33465 |
:exc:`base64.Error` in these cases. |
| 33466 |
|
| 33467 |
- bpo-33729: Fixed issues with arguments parsing in :mod:`hashlib`. |
| 33468 |
|
| 33469 |
- bpo-34097: ZipFile can zip files older than 1980-01-01 and newer than |
| 33470 |
2107-12-31 using a new ``strict_timestamps`` parameter at the cost of |
| 33471 |
setting the timestamp to the limit. |
| 33472 |
|
| 33473 |
- bpo-34108: Remove extraneous CR in 2to3 refactor. |
| 33474 |
|
| 33475 |
- bpo-34070: Make sure to only check if the handle is a tty, when opening a |
| 33476 |
file with ``buffering=-1``. |
| 33477 |
|
| 33478 |
- bpo-27494: Reverted :issue:`27494`. 2to3 rejects now a trailing comma in |
| 33479 |
generator expressions. |
| 33480 |
|
| 33481 |
- bpo-33967: functools.singledispatch now raises TypeError instead of |
| 33482 |
IndexError when no positional arguments are passed. |
| 33483 |
|
| 33484 |
- bpo-34041: Add the parameter *deterministic* to the |
| 33485 |
:meth:`sqlite3.Connection.create_function` method. Patch by Sergey |
| 33486 |
Fedoseev. |
| 33487 |
|
| 33488 |
- bpo-34056: Ensure the loader shim created by ``imp.load_module`` always |
| 33489 |
returns bytes from its ``get_data()`` function. This fixes using |
| 33490 |
``imp.load_module`` with :pep:`552` hash-based pycs. |
| 33491 |
|
| 33492 |
- bpo-34054: The multiprocessing module now uses the monotonic clock |
| 33493 |
:func:`time.monotonic` instead of the system clock :func:`time.time` to |
| 33494 |
implement timeout. |
| 33495 |
|
| 33496 |
- bpo-34043: Optimize tarfile uncompress performance about 15% when gzip is |
| 33497 |
used. |
| 33498 |
|
| 33499 |
- bpo-34044: ``subprocess.Popen`` now copies the *startupinfo* argument to |
| 33500 |
leave it unchanged: it will modify the copy, so that the same |
| 33501 |
``STARTUPINFO`` object can be used multiple times. |
| 33502 |
|
| 33503 |
- bpo-34010: Fixed a performance regression for reading streams with |
| 33504 |
tarfile. The buffered read should use a list, instead of appending to a |
| 33505 |
bytes object. |
| 33506 |
|
| 33507 |
- bpo-34019: webbrowser: Correct the arguments passed to Opera Browser when |
| 33508 |
opening a new URL using the ``webbrowser`` module. Patch by Bumsik Kim. |
| 33509 |
|
| 33510 |
- bpo-34003: csv.DictReader now creates dicts instead of OrderedDicts. Patch |
| 33511 |
by Michael Selik. |
| 33512 |
|
| 33513 |
- bpo-33978: Closed existing logging handlers before reconfiguration via |
| 33514 |
fileConfig and dictConfig. Patch by Karthikeyan Singaravelan. |
| 33515 |
|
| 33516 |
- bpo-14117: Make minor tweaks to turtledemo. The 'wikipedia' example is now |
| 33517 |
'rosette', describing what it draws. The 'penrose' print output is |
| 33518 |
reduced. The'1024' output of 'tree' is eliminated. |
| 33519 |
|
| 33520 |
- bpo-33974: Fixed passing lists and tuples of strings containing special |
| 33521 |
characters ``"``, ``\``, ``{``, ``}`` and ``\n`` as options to |
| 33522 |
:mod:`~tkinter.ttk` widgets. |
| 33523 |
|
| 33524 |
- bpo-27500: Fix getaddrinfo to resolve IPv6 addresses correctly. |
| 33525 |
|
| 33526 |
- bpo-24567: Improve random.choices() to handle subnormal input weights that |
| 33527 |
could occasionally trigger an IndexError. |
| 33528 |
|
| 33529 |
- bpo-33871: Fixed integer overflow in :func:`os.readv`, :func:`os.writev`, |
| 33530 |
:func:`os.preadv` and :func:`os.pwritev` and in :func:`os.sendfile` with |
| 33531 |
*headers* or *trailers* arguments (on BSD-based OSes and macOS). |
| 33532 |
|
| 33533 |
- bpo-25007: Add :func:`copy.copy` and :func:`copy.deepcopy` support to zlib |
| 33534 |
compressors and decompressors. Patch by Zackery Spytz. |
| 33535 |
|
| 33536 |
- bpo-33929: multiprocessing: Fix a race condition in Popen of |
| 33537 |
multiprocessing.popen_spawn_win32. The child process now duplicates the |
| 33538 |
read end of pipe instead of "stealing" it. Previously, the read end of |
| 33539 |
pipe was "stolen" by the child process, but it leaked a handle if the |
| 33540 |
child process had been terminated before it could steal the handle from |
| 33541 |
the parent process. |
| 33542 |
|
| 33543 |
- bpo-33899: Tokenize module now implicitly emits a NEWLINE when provided |
| 33544 |
with input that does not have a trailing new line. This behavior now |
| 33545 |
matches what the C tokenizer does internally. Contributed by Ammar Askar. |
| 33546 |
|
| 33547 |
- bpo-33897: Added a 'force' keyword argument to logging.basicConfig(). |
| 33548 |
|
| 33549 |
- bpo-33695: :func:`shutil.copytree` uses :func:`os.scandir` function and |
| 33550 |
all copy functions depending from it use cached :func:`os.stat` values. |
| 33551 |
The speedup for copying a directory with 8000 files is around +9% on |
| 33552 |
Linux, +20% on Windows and + 30% on a Windows SMB share. Also the number |
| 33553 |
of :func:`os.stat` syscalls is reduced by 38% making |
| 33554 |
:func:`shutil.copytree` especially faster on network filesystems. |
| 33555 |
(Contributed by Giampaolo Rodola' in :issue:`33695`.) |
| 33556 |
|
| 33557 |
- bpo-33916: bz2 and lzma: When Decompressor.__init__() is called twice, |
| 33558 |
free the old lock to not leak memory. |
| 33559 |
|
| 33560 |
- bpo-32568: Make select.epoll() and its documentation consistent regarding |
| 33561 |
*sizehint* and *flags*. |
| 33562 |
|
| 33563 |
- bpo-33833: Fixed bug in asyncio where ProactorSocketTransport logs |
| 33564 |
AssertionError if force closed during write. |
| 33565 |
|
| 33566 |
- bpo-33663: Convert content length to string before putting to header. |
| 33567 |
|
| 33568 |
- bpo-33721: :mod:`os.path` functions that return a boolean result like |
| 33569 |
:func:`~os.path.exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`, |
| 33570 |
:func:`~os.path.isfile`, :func:`~os.path.islink`, and |
| 33571 |
:func:`~os.path.ismount`, and :mod:`pathlib.Path` methods that return a |
| 33572 |
boolean result like :meth:`~pathlib.Path.exists`, |
| 33573 |
:meth:`~pathlib.Path.is_dir`, :meth:`~pathlib.Path.is_file`, |
| 33574 |
:meth:`~pathlib.Path.is_mount`, :meth:`~pathlib.Path.is_symlink`, |
| 33575 |
:meth:`~pathlib.Path.is_block_device`, |
| 33576 |
:meth:`~pathlib.Path.is_char_device`, :meth:`~pathlib.Path.is_fifo`, |
| 33577 |
:meth:`~pathlib.Path.is_socket` now return ``False`` instead of raising |
| 33578 |
:exc:`ValueError` or its subclasses :exc:`UnicodeEncodeError` and |
| 33579 |
:exc:`UnicodeDecodeError` for paths that contain characters or bytes |
| 33580 |
unrepresentable at the OS level. |
| 33581 |
|
| 33582 |
- bpo-26544: Fixed implementation of :func:`platform.libc_ver`. It almost |
| 33583 |
always returned version '2.9' for glibc. |
| 33584 |
|
| 33585 |
- bpo-33843: Remove deprecated ``cgi.escape``, ``cgi.parse_qs`` and |
| 33586 |
``cgi.parse_qsl``. |
| 33587 |
|
| 33588 |
- bpo-33842: Remove ``tarfile.filemode`` which is deprecated since Python |
| 33589 |
3.3. |
| 33590 |
|
| 33591 |
- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by |
| 33592 |
Steve Weber. |
| 33593 |
|
| 33594 |
- bpo-33805: Improve error message of dataclasses.replace() when an InitVar |
| 33595 |
is not specified |
| 33596 |
|
| 33597 |
- bpo-33687: Fix the call to ``os.chmod()`` for ``uu.decode()`` if a mode is |
| 33598 |
given or decoded. Patch by Timo Furrer. |
| 33599 |
|
| 33600 |
- bpo-33812: Datetime instance d with non-None tzinfo, but with |
| 33601 |
d.tzinfo.utcoffset(d) returning None is now treated as naive by the |
| 33602 |
astimezone() method. |
| 33603 |
|
| 33604 |
- bpo-32108: In configparser, don't clear section when it is assigned to |
| 33605 |
itself. |
| 33606 |
|
| 33607 |
- bpo-27397: Make email module properly handle invalid-length base64 |
| 33608 |
strings. |
| 33609 |
|
| 33610 |
- bpo-33578: Implement multibyte encoder/decoder state methods |
| 33611 |
|
| 33612 |
- bpo-30805: Avoid race condition with debug logging |
| 33613 |
|
| 33614 |
- bpo-33476: Fix _header_value_parser.py when address group is missing final |
| 33615 |
';'. Contributed by Enrique Perez-Terron |
| 33616 |
|
| 33617 |
- bpo-33694: asyncio: Fix a race condition causing data loss on |
| 33618 |
pause_reading()/resume_reading() when using the ProactorEventLoop. |
| 33619 |
|
| 33620 |
- bpo-32493: Correct test for ``uuid_enc_be`` availability in |
| 33621 |
``configure.ac``. Patch by Michael Felt. |
| 33622 |
|
| 33623 |
- bpo-33792: Add asyncio.WindowsSelectorEventLoopPolicy and |
| 33624 |
asyncio.WindowsProactorEventLoopPolicy. |
| 33625 |
|
| 33626 |
- bpo-33274: W3C DOM Level 1 specifies return value of |
| 33627 |
Element.removeAttributeNode() as "The Attr node that was removed." |
| 33628 |
xml.dom.minidom now complies with this requirement. |
| 33629 |
|
| 33630 |
- bpo-33778: Update ``unicodedata``'s database to Unicode version 11.0.0. |
| 33631 |
|
| 33632 |
- bpo-33165: Added a stacklevel parameter to logging calls to allow use of |
| 33633 |
wrapper/helper functions for logging APIs. |
| 33634 |
|
| 33635 |
- bpo-33770: improve base64 exception message for encoded inputs of invalid |
| 33636 |
length |
| 33637 |
|
| 33638 |
- bpo-33769: asyncio/start_tls: Fix error message; cancel callbacks in case |
| 33639 |
of an unhandled error; mark SSLTransport as closed if it is aborted. |
| 33640 |
|
| 33641 |
- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence |
| 33642 |
operations now raise :exc:`TypeError` instead of :exc:`SystemError` when |
| 33643 |
performed on :class:`mmap.mmap` objects. Patch by Zackery Spytz. |
| 33644 |
|
| 33645 |
- bpo-33734: asyncio/ssl: Fix AttributeError, increase default handshake |
| 33646 |
timeout |
| 33647 |
|
| 33648 |
- bpo-31014: Fixed creating a controller for :mod:`webbrowser` when a user |
| 33649 |
specifies a path to an entry in the BROWSER environment variable. Based |
| 33650 |
on patch by John Still. |
| 33651 |
|
| 33652 |
- bpo-2504: Add gettext.pgettext() and variants. |
| 33653 |
|
| 33654 |
- bpo-33197: Add description property for _ParameterKind |
| 33655 |
|
| 33656 |
- bpo-32751: When cancelling the task due to a timeout, |
| 33657 |
:meth:`asyncio.wait_for` will now wait until the cancellation is complete. |
| 33658 |
|
| 33659 |
- bpo-32684: Fix gather to propagate cancellation of itself even with |
| 33660 |
return_exceptions. |
| 33661 |
|
| 33662 |
- bpo-33654: Support protocol type switching in SSLTransport.set_protocol(). |
| 33663 |
|
| 33664 |
- bpo-33674: Pause the transport as early as possible to further reduce the |
| 33665 |
risk of data_received() being called before connection_made(). |
| 33666 |
|
| 33667 |
- bpo-33671: :func:`shutil.copyfile`, :func:`shutil.copy`, |
| 33668 |
:func:`shutil.copy2`, :func:`shutil.copytree` and :func:`shutil.move` use |
| 33669 |
platform-specific fast-copy syscalls on Linux and macOS in order to copy |
| 33670 |
the file more efficiently. On Windows :func:`shutil.copyfile` uses a |
| 33671 |
bigger default buffer size (1 MiB instead of 16 KiB) and a |
| 33672 |
:func:`memoryview`-based variant of :func:`shutil.copyfileobj` is used. |
| 33673 |
The speedup for copying a 512MiB file is about +26% on Linux, +50% on |
| 33674 |
macOS and +40% on Windows. Also, much less CPU cycles are consumed. |
| 33675 |
(Contributed by Giampaolo Rodola' in :issue:`25427`.) |
| 33676 |
|
| 33677 |
- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of |
| 33678 |
asyncio.sslproto: start immediately the handshake instead of using |
| 33679 |
call_soon(). Previously, data_received() could be called before the |
| 33680 |
handshake started, causing the handshake to hang or fail. |
| 33681 |
|
| 33682 |
- bpo-31647: Fixed bug where calling write_eof() on a |
| 33683 |
_SelectorSocketTransport after it's already closed raises AttributeError. |
| 33684 |
|
| 33685 |
- bpo-32610: Make asyncio.all_tasks() return only pending tasks. |
| 33686 |
|
| 33687 |
- bpo-32410: Avoid blocking on file IO in sendfile fallback code |
| 33688 |
|
| 33689 |
- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor |
| 33690 |
|
| 33691 |
- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines |
| 33692 |
|
| 33693 |
- bpo-33654: Fix transport.set_protocol() to support switching between |
| 33694 |
asyncio.Protocol and asyncio.BufferedProtocol. Fix loop.start_tls() to |
| 33695 |
work with asyncio.BufferedProtocols. |
| 33696 |
|
| 33697 |
- bpo-33652: Pickles of type variables and subscripted generics are now |
| 33698 |
future-proof and compatible with older Python versions. |
| 33699 |
|
| 33700 |
- bpo-32493: Fixed :func:`uuid.uuid1` on FreeBSD. |
| 33701 |
|
| 33702 |
- bpo-33238: Add ``InvalidStateError`` to :mod:`concurrent.futures`. |
| 33703 |
``Future.set_result`` and ``Future.set_exception`` now raise |
| 33704 |
``InvalidStateError`` if the futures are not pending or running. Patch by |
| 33705 |
Jason Haydaman. |
| 33706 |
|
| 33707 |
- bpo-33618: Finalize and document preliminary and experimental TLS 1.3 |
| 33708 |
support with OpenSSL 1.1.1 |
| 33709 |
|
| 33710 |
- bpo-33625: Release GIL on ``grp.getgrnam``, ``grp.getgrgid``, |
| 33711 |
``pwd.getpwnam`` and ``pwd.getpwuid`` if reentrant variants of these |
| 33712 |
functions are available. Patch by William Grzybowski. |
| 33713 |
|
| 33714 |
- bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ |
| 33715 |
|
| 33716 |
- bpo-11874: Use a better regex when breaking usage into wrappable parts. |
| 33717 |
Avoids bogus assertion errors from custom metavar strings. |
| 33718 |
|
| 33719 |
- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder |
| 33720 |
that prevented the cache of parsed strings from clearing after finishing |
| 33721 |
the decoding. Based on patch by c-fos. |
| 33722 |
|
| 33723 |
- bpo-33604: Remove HMAC default to md5 marked for removal in 3.8 (removal |
| 33724 |
originally planned in 3.6, bump to 3.8 in PR 7062). |
| 33725 |
|
| 33726 |
- bpo-33582: Emit a deprecation warning for inspect.formatargspec |
| 33727 |
|
| 33728 |
- bpo-21145: Add ``functools.cached_property`` decorator, for computed |
| 33729 |
properties cached for the life of the instance. |
| 33730 |
|
| 33731 |
- bpo-33570: Change TLS 1.3 cipher suite settings for compatibility with |
| 33732 |
OpenSSL 1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 ciphers |
| 33733 |
enabled by default. |
| 33734 |
|
| 33735 |
- bpo-28556: Do not simplify arguments to ``typing.Union``. Now |
| 33736 |
``Union[Manager, Employee]`` is not simplified to ``Employee`` at runtime. |
| 33737 |
Such simplification previously caused several bugs and limited |
| 33738 |
possibilities for introspection. |
| 33739 |
|
| 33740 |
- bpo-12486: :func:`tokenize.generate_tokens` is now documented as a public |
| 33741 |
API to tokenize unicode strings. It was previously present but |
| 33742 |
undocumented. |
| 33743 |
|
| 33744 |
- bpo-33540: Add a new ``block_on_close`` class attribute to |
| 33745 |
``ForkingMixIn`` and ``ThreadingMixIn`` classes of :mod:`socketserver`. |
| 33746 |
|
| 33747 |
- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP |
| 33748 |
locations |
| 33749 |
|
| 33750 |
- bpo-33109: argparse subparsers are once again not required by default, |
| 33751 |
reverting the change in behavior introduced by bpo-26510 in 3.7.0a2. |
| 33752 |
|
| 33753 |
- bpo-33541: Remove unused private method ``_strptime.LocaleTime.__pad`` |
| 33754 |
(a.k.a. ``_LocaleTime__pad``). |
| 33755 |
|
| 33756 |
- bpo-33536: dataclasses.make_dataclass now checks for invalid field names |
| 33757 |
and duplicate fields. Also, added a check for invalid field |
| 33758 |
specifications. |
| 33759 |
|
| 33760 |
- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on |
| 33761 |
Windows. Patch by Zvi Effron |
| 33762 |
|
| 33763 |
- bpo-26819: Fix race condition with ``ReadTransport.resume_reading`` in |
| 33764 |
Windows proactor event loop. |
| 33765 |
|
| 33766 |
- Fix failure in ``typing.get_type_hints()`` when ClassVar was provided as a |
| 33767 |
string forward reference. |
| 33768 |
|
| 33769 |
- bpo-33516: :class:`unittest.mock.MagicMock` now supports the ``__round__`` |
| 33770 |
magic method. |
| 33771 |
|
| 33772 |
- bpo-28612: Added support for Site Maps to urllib's ``RobotFileParser`` as |
| 33773 |
:meth:`RobotFileParser.site_maps() |
| 33774 |
<urllib.robotparser.RobotFileParser.site_maps>`. Patch by Lady Red, based |
| 33775 |
on patch by Peter Wirtz. |
| 33776 |
|
| 33777 |
- bpo-28167: Remove platform.linux_distribution, which was deprecated since |
| 33778 |
3.5. |
| 33779 |
|
| 33780 |
- bpo-33504: Switch the default dictionary implementation for |
| 33781 |
:mod:`configparser` from :class:`collections.OrderedDict` to the standard |
| 33782 |
:class:`dict` type. |
| 33783 |
|
| 33784 |
- bpo-33505: Optimize asyncio.ensure_future() by reordering if checks: 1.17x |
| 33785 |
faster. |
| 33786 |
|
| 33787 |
- bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in |
| 33788 |
FieldStorage use the given errors (needed for Twisted). Patch by Amber |
| 33789 |
Brown. |
| 33790 |
|
| 33791 |
- bpo-29235: The :class:`cProfile.Profile` class can now be used as a |
| 33792 |
context manager. Patch by Scott Sanderson. |
| 33793 |
|
| 33794 |
- bpo-33495: Change dataclasses.Fields repr to use the repr of each of its |
| 33795 |
members, instead of str. This makes it more clear what each field |
| 33796 |
actually represents. This is especially true for the 'type' member. |
| 33797 |
|
| 33798 |
- bpo-26103: Correct ``inspect.isdatadescriptor`` to look for ``__set__`` or |
| 33799 |
``__delete__``. Patch by Aaron Hall. |
| 33800 |
|
| 33801 |
- bpo-29209: Removed the ``doctype()`` method and the *html* parameter of |
| 33802 |
the constructor of :class:`~xml.etree.ElementTree.XMLParser`. The |
| 33803 |
``doctype()`` method defined in a subclass will no longer be called. |
| 33804 |
Deprecated methods ``getchildren()`` and ``getiterator()`` in the |
| 33805 |
:mod:`~xml.etree.ElementTree` module emit now a :exc:`DeprecationWarning` |
| 33806 |
instead of :exc:`PendingDeprecationWarning`. |
| 33807 |
|
| 33808 |
- bpo-33453: Fix dataclasses to work if using literal string type |
| 33809 |
annotations or if using PEP 563 "Postponed Evaluation of Annotations". |
| 33810 |
Only specific string prefixes are detected for both ClassVar ("ClassVar" |
| 33811 |
and "typing.ClassVar") and InitVar ("InitVar" and "dataclasses.InitVar"). |
| 33812 |
|
| 33813 |
- bpo-28556: Minor fixes in typing module: add annotations to |
| 33814 |
``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in |
| 33815 |
``Generic.__new__``. Original PRs by Paulius Šarka and Chad Dombrova. |
| 33816 |
|
| 33817 |
- bpo-33365: Print the header values besides the header keys instead just |
| 33818 |
the header keys if *debuglevel* is set to >0 in :mod:`http.client`. Patch |
| 33819 |
by Marco Strigl. |
| 33820 |
|
| 33821 |
- bpo-20087: Updated alias mapping with glibc 2.27 supported locales. |
| 33822 |
|
| 33823 |
- bpo-33422: Fix trailing quotation marks getting deleted when looking up |
| 33824 |
byte/string literals on pydoc. Patch by Andrés Delfino. |
| 33825 |
|
| 33826 |
- bpo-28167: The function ``platform.linux_distribution`` and |
| 33827 |
``platform.dist`` now trigger a ``DeprecationWarning`` and have been |
| 33828 |
marked for removal in Python 3.8 |
| 33829 |
|
| 33830 |
- bpo-33281: Fix ctypes.util.find_library regression on macOS. |
| 33831 |
|
| 33832 |
- bpo-33311: Text and html output generated by cgitb does not display |
| 33833 |
parentheses if the current call is done directly in the module. Patch by |
| 33834 |
Stéphane Blondon. |
| 33835 |
|
| 33836 |
- bpo-27300: The file classes in *tempfile* now accept an *errors* parameter |
| 33837 |
that complements the already existing *encoding*. Patch by Stephan Hohe. |
| 33838 |
|
| 33839 |
- bpo-32933: :func:`unittest.mock.mock_open` now supports iteration over the |
| 33840 |
file contents. Patch by Tony Flury. |
| 33841 |
|
| 33842 |
- bpo-33217: Raise :exc:`TypeError` when looking up non-Enum objects in Enum |
| 33843 |
classes and Enum members. |
| 33844 |
|
| 33845 |
- bpo-33197: Update error message when constructing invalid |
| 33846 |
inspect.Parameters Patch by Donghee Na. |
| 33847 |
|
| 33848 |
- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database |
| 33849 |
object when it is called with a single argument. |
| 33850 |
|
| 33851 |
- bpo-33375: The warnings module now finds the Python file associated with a |
| 33852 |
warning from the code object, rather than the frame's global namespace. |
| 33853 |
This is consistent with how tracebacks and pdb find filenames, and should |
| 33854 |
work better for dynamically executed code. |
| 33855 |
|
| 33856 |
- bpo-33336: ``imaplib`` now allows ``MOVE`` command in ``IMAP4.uid()`` (RFC |
| 33857 |
6851: IMAP MOVE Extension) and potentially as a name of supported method |
| 33858 |
of ``IMAP4`` object. |
| 33859 |
|
| 33860 |
- bpo-32455: Added *jump* parameter to :func:`dis.stack_effect`. |
| 33861 |
|
| 33862 |
- bpo-27485: Rename and deprecate undocumented functions in |
| 33863 |
:func:`urllib.parse`. |
| 33864 |
|
| 33865 |
- bpo-33332: Add ``signal.valid_signals()`` to expose the POSIX sigfillset() |
| 33866 |
functionality. |
| 33867 |
|
| 33868 |
- bpo-33251: ``ConfigParser.items()`` was fixed so that key-value pairs |
| 33869 |
passed in via :func:`vars` are not included in the resulting output. |
| 33870 |
|
| 33871 |
- bpo-33329: Fix multiprocessing regression on newer glibcs |
| 33872 |
|
| 33873 |
- bpo-33334: :func:`dis.stack_effect` now supports all defined opcodes |
| 33874 |
including NOP and EXTENDED_ARG. |
| 33875 |
|
| 33876 |
- bpo-991266: Fix quoting of the ``Comment`` attribute of |
| 33877 |
:class:`http.cookies.SimpleCookie`. |
| 33878 |
|
| 33879 |
- bpo-33131: Upgrade bundled version of pip to 10.0.1. |
| 33880 |
|
| 33881 |
- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST |
| 33882 |
object to a tree of tuples or lists with ``line_info=False`` and |
| 33883 |
``col_info=True``. |
| 33884 |
|
| 33885 |
- bpo-23403: lib2to3 now uses pickle protocol 4 for pre-computed grammars. |
| 33886 |
|
| 33887 |
- bpo-33266: lib2to3 now recognizes ``rf'...'`` strings. |
| 33888 |
|
| 33889 |
- bpo-11594: Ensure line-endings are respected when using lib2to3. |
| 33890 |
|
| 33891 |
- bpo-33254: Have :func:`importlib.resources.contents` and |
| 33892 |
:meth:`importlib.abc.ResourceReader.contents` return an :term:`iterable` |
| 33893 |
instead of an :term:`iterator`. |
| 33894 |
|
| 33895 |
- bpo-33265: ``contextlib.ExitStack`` and ``contextlib.AsyncExitStack`` now |
| 33896 |
use a method instead of a wrapper function for exit callbacks. |
| 33897 |
|
| 33898 |
- bpo-33263: Fix FD leak in ``_SelectorSocketTransport`` Patch by Vlad |
| 33899 |
Starostin. |
| 33900 |
|
| 33901 |
- bpo-33256: Fix display of ``<module>`` call in the html produced by |
| 33902 |
``cgitb.html()``. Patch by Stéphane Blondon. |
| 33903 |
|
| 33904 |
- bpo-33144: ``random.Random()`` and its subclassing mechanism got optimized |
| 33905 |
to check only once at class/subclass instantiation time whether its |
| 33906 |
``getrandbits()`` method can be relied on by other methods, including |
| 33907 |
``randrange()``, for the generation of arbitrarily large random integers. |
| 33908 |
Patch by Wolfgang Maier. |
| 33909 |
|
| 33910 |
- bpo-33185: Fixed regression when running pydoc with the :option:`-m` |
| 33911 |
switch. (The regression was introduced in 3.7.0b3 by the resolution of |
| 33912 |
:issue:`33053`) |
| 33913 |
|
| 33914 |
This fix also changed pydoc to add ``os.getcwd()`` to :data:`sys.path` |
| 33915 |
when necessary, rather than adding ``"."``. |
| 33916 |
|
| 33917 |
- bpo-29613: Added support for the ``SameSite`` cookie flag to the |
| 33918 |
``http.cookies`` module. |
| 33919 |
|
| 33920 |
- bpo-33169: Delete entries of ``None`` in :data:`sys.path_importer_cache` |
| 33921 |
when :meth:`importlib.machinery.invalidate_caches` is called. |
| 33922 |
|
| 33923 |
- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty |
| 33924 |
sequences consistently even when called from subclasses without a |
| 33925 |
``getrandbits()`` implementation. |
| 33926 |
|
| 33927 |
- bpo-33224: Update difflib.mdiff() for :pep:`479`. Convert an uncaught |
| 33928 |
StopIteration in a generator into a return-statement. |
| 33929 |
|
| 33930 |
- bpo-33209: End framing at the end of C implementation of |
| 33931 |
:func:`pickle.Pickler.dump`. |
| 33932 |
|
| 33933 |
- bpo-32861: The urllib.robotparser's ``__str__`` representation now |
| 33934 |
includes wildcard entries and the "Crawl-delay" and "Request-rate" fields. |
| 33935 |
Also removes extra newlines that were being appended to the end of the |
| 33936 |
string. Patch by Michael Lazar. |
| 33937 |
|
| 33938 |
- bpo-23403: ``DEFAULT_PROTOCOL`` in :mod:`pickle` was bumped to 4. Protocol |
| 33939 |
4 is described in :pep:`3154` and available since Python 3.4. It offers |
| 33940 |
better performance and smaller size compared to protocol 3 introduced in |
| 33941 |
Python 3.0. |
| 33942 |
|
| 33943 |
- bpo-20104: Improved error handling and fixed a reference leak in |
| 33944 |
:func:`os.posix_spawn`. |
| 33945 |
|
| 33946 |
- bpo-33106: Deleting a key from a read-only dbm database raises module |
| 33947 |
specific error instead of KeyError. |
| 33948 |
|
| 33949 |
- bpo-33175: In dataclasses, Field.__set_name__ now looks up the |
| 33950 |
__set_name__ special method on the class, not the instance, of the default |
| 33951 |
value. |
| 33952 |
|
| 33953 |
- bpo-32380: Create functools.singledispatchmethod to support generic single |
| 33954 |
dispatch on descriptors and methods. |
| 33955 |
|
| 33956 |
- bpo-33141: Have Field objects pass through __set_name__ to their default |
| 33957 |
values, if they have their own __set_name__. |
| 33958 |
|
| 33959 |
- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false |
| 33960 |
boolean value. Note iid=0 and iid=False would be same. Patch by Garvit |
| 33961 |
Khatri. |
| 33962 |
|
| 33963 |
- bpo-32873: Treat type variables and special typing forms as immutable by |
| 33964 |
copy and pickle. This fixes several minor issues and inconsistencies, and |
| 33965 |
improves backwards compatibility with Python 3.6. |
| 33966 |
|
| 33967 |
- bpo-33134: When computing dataclass's __hash__, use the lookup table to |
| 33968 |
contain the function which returns the __hash__ value. This is an |
| 33969 |
improvement over looking up a string, and then testing that string to see |
| 33970 |
what to do. |
| 33971 |
|
| 33972 |
- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1. |
| 33973 |
|
| 33974 |
- bpo-32505: Raise TypeError if a member variable of a dataclass is of type |
| 33975 |
Field, but doesn't have a type annotation. |
| 33976 |
|
| 33977 |
- bpo-33078: Fix the failure on OSX caused by the tests relying on |
| 33978 |
sem_getvalue |
| 33979 |
|
| 33980 |
- bpo-33116: Add 'Field' to dataclasses.__all__. |
| 33981 |
|
| 33982 |
- bpo-32896: Fix an error where subclassing a dataclass with a field that |
| 33983 |
uses a default_factory would generate an incorrect class. |
| 33984 |
|
| 33985 |
- bpo-33100: Dataclasses: If a field has a default value that's a |
| 33986 |
MemberDescriptorType, then it's from that field being in __slots__, not an |
| 33987 |
actual default value. |
| 33988 |
|
| 33989 |
- bpo-32953: If a non-dataclass inherits from a frozen dataclass, allow |
| 33990 |
attributes to be added to the derived class. Only attributes from the |
| 33991 |
frozen dataclass cannot be assigned to. Require all dataclasses in a |
| 33992 |
hierarchy to be either all frozen or all non-frozen. |
| 33993 |
|
| 33994 |
- bpo-33097: Raise RuntimeError when ``executor.submit`` is called during |
| 33995 |
interpreter shutdown. |
| 33996 |
|
| 33997 |
- bpo-32968: Modulo and floor division involving Fraction and float should |
| 33998 |
return float. |
| 33999 |
|
| 34000 |
- bpo-33061: Add missing ``NoReturn`` to ``__all__`` in typing.py |
| 34001 |
|
| 34002 |
- bpo-33078: Fix the size handling in multiprocessing.Queue when a pickling |
| 34003 |
error occurs. |
| 34004 |
|
| 34005 |
- bpo-33064: lib2to3 now properly supports trailing commas after ``*args`` |
| 34006 |
and ``**kwargs`` in function signatures. |
| 34007 |
|
| 34008 |
- bpo-33056: FIX properly close leaking fds in |
| 34009 |
concurrent.futures.ProcessPoolExecutor. |
| 34010 |
|
| 34011 |
- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all |
| 34012 |
threads when calling mmap.mmap(), os.urandom(), and random.seed(). Patch |
| 34013 |
by Nir Soffer. |
| 34014 |
|
| 34015 |
- bpo-31804: Avoid failing in multiprocessing.Process if the standard |
| 34016 |
streams are closed or None at exit. |
| 34017 |
|
| 34018 |
- bpo-33034: Providing an explicit error message when casting the port |
| 34019 |
property to anything that is not an integer value using ``urlparse()`` and |
| 34020 |
``urlsplit()``. Patch by Matt Eaton. |
| 34021 |
|
| 34022 |
- bpo-30249: Improve struct.unpack_from() exception messages for problems |
| 34023 |
with the buffer size and offset. |
| 34024 |
|
| 34025 |
- bpo-33037: Skip sending/receiving data after SSL transport closing. |
| 34026 |
|
| 34027 |
- bpo-27683: Fix a regression in :mod:`ipaddress` that result of |
| 34028 |
:meth:`hosts` is empty when the network is constructed by a tuple |
| 34029 |
containing an integer mask and only 1 bit left for addresses. |
| 34030 |
|
| 34031 |
- bpo-22674: Add the strsignal() function in the signal module that returns |
| 34032 |
the system description of the given signal, as returned by strsignal(3). |
| 34033 |
|
| 34034 |
- bpo-32999: Fix C implementation of ``ABC.__subclasscheck__(cls, |
| 34035 |
subclass)`` crashed when ``subclass`` is not a type object. |
| 34036 |
|
| 34037 |
- bpo-33009: Fix inspect.signature() for single-parameter partialmethods. |
| 34038 |
|
| 34039 |
- bpo-32969: Expose several missing constants in zlib and fix corresponding |
| 34040 |
documentation. |
| 34041 |
|
| 34042 |
- bpo-32056: Improved exceptions raised for invalid number of channels and |
| 34043 |
sample width when read an audio file in modules :mod:`!aifc`, :mod:`wave` |
| 34044 |
and :mod:`!sunau`. |
| 34045 |
|
| 34046 |
- bpo-32970: Improved disassembly of the MAKE_FUNCTION instruction. |
| 34047 |
|
| 34048 |
- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in |
| 34049 |
subprocess if another low descriptor is closed. |
| 34050 |
|
| 34051 |
- bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen |
| 34052 |
classes, and also disallow inheriting non-frozen from frozen classes. This |
| 34053 |
restriction will be relaxed at a future date. |
| 34054 |
|
| 34055 |
- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch |
| 34056 |
by Joffrey Fuhrer. |
| 34057 |
|
| 34058 |
- bpo-32257: The ssl module now contains OP_NO_RENEGOTIATION constant, |
| 34059 |
available with OpenSSL 1.1.0h or 1.1.1. |
| 34060 |
|
| 34061 |
- bpo-32951: Direct instantiation of SSLSocket and SSLObject objects is now |
| 34062 |
prohibited. The constructors were never documented, tested, or designed as |
| 34063 |
public constructors. Users were suppose to use ssl.wrap_socket() or |
| 34064 |
SSLContext. |
| 34065 |
|
| 34066 |
- bpo-32929: Remove the tri-state parameter "hash", and add the boolean |
| 34067 |
"unsafe_hash". If unsafe_hash is True, add a __hash__ function, but if a |
| 34068 |
__hash__ exists, raise TypeError. If unsafe_hash is False, add a __hash__ |
| 34069 |
based on the values of eq= and frozen=. The unsafe_hash=False behavior is |
| 34070 |
the same as the old hash=None behavior. unsafe_hash=False is the default, |
| 34071 |
just as hash=None used to be. |
| 34072 |
|
| 34073 |
- bpo-32947: Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3 |
| 34074 |
for future compatibility with OpenSSL 1.1.1. |
| 34075 |
|
| 34076 |
- bpo-32146: Document the interaction between frozen executables and the |
| 34077 |
spawn and forkserver start methods in multiprocessing. |
| 34078 |
|
| 34079 |
- bpo-30622: The ssl module now detects missing NPN support in LibreSSL. |
| 34080 |
|
| 34081 |
- bpo-32922: dbm.open() now encodes filename with the filesystem encoding |
| 34082 |
rather than default encoding. |
| 34083 |
|
| 34084 |
- bpo-32759: Free unused arenas in multiprocessing.heap. |
| 34085 |
|
| 34086 |
- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3`` |
| 34087 |
syscall exists or not. |
| 34088 |
|
| 34089 |
- bpo-32556: nt._getfinalpathname, nt._getvolumepathname and |
| 34090 |
nt._getdiskusage now correctly convert from bytes. |
| 34091 |
|
| 34092 |
- bpo-21060: Rewrite confusing message from setup.py upload from "No dist |
| 34093 |
file created in earlier command" to the more helpful "Must create and |
| 34094 |
upload files in one command". |
| 34095 |
|
| 34096 |
- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a |
| 34097 |
:exc:`ValueError` instead of canceling the first scheduled function. |
| 34098 |
Patch by Cheryl Sabella. |
| 34099 |
|
| 34100 |
- bpo-32852: Make sure sys.argv remains as a list when running trace. |
| 34101 |
|
| 34102 |
- bpo-31333: ``_abc`` module is added. It is a speedup module with C |
| 34103 |
implementations for various functions and methods in ``abc``. Creating an |
| 34104 |
ABC subclass and calling ``isinstance`` or ``issubclass`` with an ABC |
| 34105 |
subclass are up to 1.5x faster. In addition, this makes Python start-up up |
| 34106 |
to 10% faster. |
| 34107 |
|
| 34108 |
Note that the new implementation hides internal registry and caches, |
| 34109 |
previously accessible via private attributes ``_abc_registry``, |
| 34110 |
``_abc_cache``, and ``_abc_negative_cache``. There are three debugging |
| 34111 |
helper methods that can be used instead ``_dump_registry``, |
| 34112 |
``_abc_registry_clear``, and ``_abc_caches_clear``. |
| 34113 |
|
| 34114 |
- bpo-32841: Fixed ``asyncio.Condition`` issue which silently ignored |
| 34115 |
cancellation after notifying and cancelling a conditional lock. Patch by |
| 34116 |
Bar Harel. |
| 34117 |
|
| 34118 |
- bpo-32819: ssl.match_hostname() has been simplified and no longer depends |
| 34119 |
on re and ipaddress module for wildcard and IP addresses. Error reporting |
| 34120 |
for invalid wildcards has been improved. |
| 34121 |
|
| 34122 |
- bpo-19675: ``multiprocessing.Pool`` no longer leaks processes if its |
| 34123 |
initialization fails. |
| 34124 |
|
| 34125 |
- bpo-32394: socket: Remove |
| 34126 |
TCP_FASTOPEN,TCP_KEEPCNT,TCP_KEEPIDLE,TCP_KEEPINTVL flags on older version |
| 34127 |
Windows during run-time. |
| 34128 |
|
| 34129 |
- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules. |
| 34130 |
(Contributed by Oren Milman) |
| 34131 |
|
| 34132 |
- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when |
| 34133 |
only the last field is quoted. Patch by Jake Davis. |
| 34134 |
|
| 34135 |
- bpo-30688: Added support of ``\N{name}`` escapes in regular expressions. |
| 34136 |
Based on patch by Jonathan Eunice. |
| 34137 |
|
| 34138 |
- bpo-32792: collections.ChainMap() preserves the order of the underlying |
| 34139 |
mappings. |
| 34140 |
|
| 34141 |
- bpo-32775: :func:`fnmatch.translate` no longer produces patterns which |
| 34142 |
contain set operations. Sets starting with '[' or containing '--', '&&', |
| 34143 |
'~~' or '||' will be interpreted differently in regular expressions in |
| 34144 |
future versions. Currently they emit warnings. fnmatch.translate() now |
| 34145 |
avoids producing patterns containing such sets by accident. |
| 34146 |
|
| 34147 |
- bpo-32622: Implement native fast sendfile for Windows proactor event loop. |
| 34148 |
|
| 34149 |
- bpo-32777: Fix a rare but potential pre-exec child process deadlock in |
| 34150 |
subprocess on POSIX systems when marking file descriptors inheritable on |
| 34151 |
exec in the child process. This bug appears to have been introduced in |
| 34152 |
3.4. |
| 34153 |
|
| 34154 |
- bpo-32647: The ctypes module used to depend on indirect linking for |
| 34155 |
dlopen. The shared extension is now explicitly linked against libdl on |
| 34156 |
platforms with dl. |
| 34157 |
|
| 34158 |
- bpo-32749: A :mod:`dbm.dumb` database opened with flags 'r' is now |
| 34159 |
read-only. :func:`dbm.dumb.open` with flags 'r' and 'w' no longer creates |
| 34160 |
a database if it does not exist. |
| 34161 |
|
| 34162 |
- bpo-32741: Implement ``asyncio.TimerHandle.when()`` method. |
| 34163 |
|
| 34164 |
- bpo-32691: Use mod_spec.parent when running modules with pdb |
| 34165 |
|
| 34166 |
- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring |
| 34167 |
and locking the same lock multiple times, without it being free. Patch by |
| 34168 |
Bar Harel. |
| 34169 |
|
| 34170 |
- bpo-32727: Do not include name field in SMTP envelope from address. Patch |
| 34171 |
by Stéphane Wirtel |
| 34172 |
|
| 34173 |
- bpo-31453: Add TLSVersion constants and SSLContext.maximum_version / |
| 34174 |
minimum_version attributes. The new API wraps OpenSSL 1.1 |
| 34175 |
https://web.archive.org/web/20180309043602/https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html |
| 34176 |
feature. |
| 34177 |
|
| 34178 |
- bpo-24334: Internal implementation details of ssl module were cleaned up. |
| 34179 |
The SSLSocket has one less layer of indirection. Owner and session |
| 34180 |
information are now handled by the SSLSocket and SSLObject constructor. |
| 34181 |
Channel binding implementation has been simplified. |
| 34182 |
|
| 34183 |
- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND |
| 34184 |
chunk is not found. Patch by Zackery Spytz. |
| 34185 |
|
| 34186 |
- bpo-32585: Add Ttk spinbox widget to :mod:`tkinter.ttk`. Patch by Alan D |
| 34187 |
Moore. |
| 34188 |
|
| 34189 |
- bpo-32512: :mod:`profile` CLI accepts ``-m module_name`` as an alternative |
| 34190 |
to script path. |
| 34191 |
|
| 34192 |
- bpo-8525: help() on a type now displays builtin subclasses. This is |
| 34193 |
intended primarily to help with notification of more specific exception |
| 34194 |
subclasses. |
| 34195 |
|
| 34196 |
Patch by Sanyam Khurana. |
| 34197 |
|
| 34198 |
- bpo-31639: http.server now exposes a ThreadingHTTPServer class and uses it |
| 34199 |
when the module is run with ``-m`` to cope with web browsers pre-opening |
| 34200 |
sockets. |
| 34201 |
|
| 34202 |
- bpo-29877: compileall: import ProcessPoolExecutor only when needed, |
| 34203 |
preventing hangs on low resource platforms |
| 34204 |
|
| 34205 |
- bpo-32221: Various functions returning tuple containing IPv6 addresses now |
| 34206 |
omit ``%scope`` part since the same information is already encoded in |
| 34207 |
*scopeid* tuple item. Especially this speeds up :func:`socket.recvfrom` |
| 34208 |
when it receives multicast packet since useless resolving of network |
| 34209 |
interface name is omitted. |
| 34210 |
|
| 34211 |
- bpo-32147: :func:`binascii.unhexlify` is now up to 2 times faster. Patch |
| 34212 |
by Sergey Fedoseev. |
| 34213 |
|
| 34214 |
- bpo-30693: The TarFile class now recurses directories in a reproducible |
| 34215 |
way. |
| 34216 |
|
| 34217 |
- bpo-30693: The ZipFile class now recurses directories in a reproducible |
| 34218 |
way. |
| 34219 |
|
| 34220 |
- bpo-31680: Added :data:`curses.ncurses_version`. |
| 34221 |
|
| 34222 |
- bpo-31908: Fix output of cover files for ``trace`` module command-line |
| 34223 |
tool. Previously emitted cover files only when ``--missing`` option was |
| 34224 |
used. Patch by Michael Selik. |
| 34225 |
|
| 34226 |
- bpo-31608: Raise a ``TypeError`` instead of crashing if a |
| 34227 |
``collections.deque`` subclass returns a non-deque from ``__new__``. Patch |
| 34228 |
by Oren Milman. |
| 34229 |
|
| 34230 |
- bpo-31425: Add support for sockets of the AF_QIPCRTR address family, |
| 34231 |
supported by the Linux kernel. This is used to communicate with services, |
| 34232 |
such as GPS or radio, running on Qualcomm devices. Patch by Bjorn |
| 34233 |
Andersson. |
| 34234 |
|
| 34235 |
- bpo-22005: Implemented unpickling instances of |
| 34236 |
:class:`~datetime.datetime`, :class:`~datetime.date` and |
| 34237 |
:class:`~datetime.time` pickled by Python 2. ``encoding='latin1'`` should |
| 34238 |
be used for successful decoding. |
| 34239 |
|
| 34240 |
- bpo-27645: :class:`sqlite3.Connection` now exposes a |
| 34241 |
:class:`~sqlite3.Connection.backup` method, if the underlying SQLite |
| 34242 |
library is at version 3.6.11 or higher. Patch by Lele Gaifax. |
| 34243 |
|
| 34244 |
- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`. Patch by Segev Finer. |
| 34245 |
|
| 34246 |
- bpo-31508: Removed support of arguments in |
| 34247 |
``tkinter.ttk.Treeview.selection``. It was deprecated in 3.6. Use |
| 34248 |
specialized methods like ``selection_set`` for changing the selection. |
| 34249 |
|
| 34250 |
- bpo-29456: Fix bugs in hangul normalization: u1176, u11a7 and u11c3 |
| 34251 |
|
| 34252 |
Documentation |
| 34253 |
------------- |
| 34254 |
|
| 34255 |
- bpo-21257: Document :func:`http.client.parse_headers`. |
| 34256 |
|
| 34257 |
- bpo-34764: Improve example of iter() with 2nd sentinel argument. |
| 34258 |
|
| 34259 |
- bpo-35564: Explicitly set master_doc variable in conf.py for compliance |
| 34260 |
with Sphinx 2.0 |
| 34261 |
|
| 34262 |
- bpo-35511: Specified that profile.Profile class doesn't not support enable |
| 34263 |
or disable methods. Also, elaborated that Profile object as a context |
| 34264 |
manager is only supported in cProfile module. |
| 34265 |
|
| 34266 |
- bpo-10536: Enhance the gettext docs. Patch by Éric Araujo |
| 34267 |
|
| 34268 |
- bpo-35089: Remove mention of ``typing.io`` and ``typing.re``. Their types |
| 34269 |
should be imported from ``typing`` directly. |
| 34270 |
|
| 34271 |
- bpo-35038: Fix the documentation about an unexisting ``f_restricted`` |
| 34272 |
attribute in the frame object. Patch by Stéphane Wirtel |
| 34273 |
|
| 34274 |
- bpo-35042: Replace PEP XYZ by the pep role and allow to use the direct |
| 34275 |
links to the PEPs. |
| 34276 |
|
| 34277 |
- bpo-35044: Fix the documentation with the role ``exc`` for the |
| 34278 |
appropriated exception. Patch by Stéphane Wirtel |
| 34279 |
|
| 34280 |
- bpo-35035: Rename documentation for :mod:`email.utils` to |
| 34281 |
``email.utils.rst``. |
| 34282 |
|
| 34283 |
- bpo-34967: Use app.add_object_type() instead of the deprecated Sphinx |
| 34284 |
function app.description_unit() |
| 34285 |
|
| 34286 |
- bpo-34913: Add documentation about the new command line interface of the |
| 34287 |
gzip module. |
| 34288 |
|
| 34289 |
- bpo-32174: chm document displays non-ASCII characters properly on some |
| 34290 |
MBCS Windows systems. |
| 34291 |
|
| 34292 |
- bpo-11233: Create availability directive for documentation. Original |
| 34293 |
patch by Georg Brandl. |
| 34294 |
|
| 34295 |
- bpo-34790: Document how passing coroutines to asyncio.wait() can be |
| 34296 |
confusing. |
| 34297 |
|
| 34298 |
- bpo-34552: Make clear that ``==`` operator sometimes is equivalent to |
| 34299 |
``is``. The ``<``, ``<=``, ``>`` and ``>=`` operators are only defined |
| 34300 |
where they make sense. |
| 34301 |
|
| 34302 |
- bpo-28617: Fixed info in the stdtypes docs concerning the types that |
| 34303 |
support membership tests. |
| 34304 |
|
| 34305 |
- bpo-20177: Migrate datetime.date.fromtimestamp to Argument Clinic. Patch |
| 34306 |
by Tim Hoffmann. |
| 34307 |
|
| 34308 |
- bpo-34065: Fix wrongly written basicConfig documentation markup syntax |
| 34309 |
|
| 34310 |
- bpo-33460: replaced ellipsis with correct error codes in tutorial chapter |
| 34311 |
3. |
| 34312 |
|
| 34313 |
- bpo-33847: Add '@' operator entry to index. |
| 34314 |
|
| 34315 |
- bpo-33409: Clarified the relationship between :pep:`538`'s |
| 34316 |
PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode. |
| 34317 |
|
| 34318 |
- bpo-33197: Add versionadded tag to the documentation of |
| 34319 |
ParameterKind.description |
| 34320 |
|
| 34321 |
- bpo-17045: Improve the C-API doc for PyTypeObject. This includes adding |
| 34322 |
several quick-reference tables and a lot of missing slot/typedef entries. |
| 34323 |
The existing entries were also cleaned up with a slightly more consistent |
| 34324 |
format. |
| 34325 |
|
| 34326 |
- bpo-33736: Improve the documentation of :func:`asyncio.open_connection`, |
| 34327 |
:func:`asyncio.start_server` and their UNIX socket counterparts. |
| 34328 |
|
| 34329 |
- bpo-23859: Document that ``asyncio.wait()`` does not cancel its futures on |
| 34330 |
timeout. |
| 34331 |
|
| 34332 |
- bpo-32436: Document :pep:`567` changes to asyncio. |
| 34333 |
|
| 34334 |
- bpo-33604: Update HMAC md5 default to a DeprecationWarning, bump removal |
| 34335 |
to 3.8. |
| 34336 |
|
| 34337 |
- bpo-33594: Document ``getargspec``, ``from_function`` and ``from_builtin`` |
| 34338 |
as deprecated in their respective docstring, and include version since |
| 34339 |
deprecation in DeprecationWarning message. |
| 34340 |
|
| 34341 |
- bpo-33503: Fix broken pypi link |
| 34342 |
|
| 34343 |
- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``. |
| 34344 |
|
| 34345 |
- bpo-33487: BZ2file now emit a DeprecationWarning when buffering=None is |
| 34346 |
passed, the deprecation message and documentation also now explicitly |
| 34347 |
state it is deprecated since 3.0. |
| 34348 |
|
| 34349 |
- bpo-33378: Add Korean language switcher for https://docs.python.org/3/ |
| 34350 |
|
| 34351 |
- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be |
| 34352 |
just any value. |
| 34353 |
|
| 34354 |
- bpo-33201: Modernize documentation for writing C extension types. |
| 34355 |
|
| 34356 |
- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document. |
| 34357 |
``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is |
| 34358 |
missed in the document. |
| 34359 |
|
| 34360 |
- bpo-33126: Document PyBuffer_ToContiguous(). |
| 34361 |
|
| 34362 |
- bpo-27212: Modify documentation for the :func:`islice` recipe to consume |
| 34363 |
initial values up to the start index. |
| 34364 |
|
| 34365 |
- bpo-28247: Update :mod:`zipapp` documentation to describe how to make |
| 34366 |
standalone applications. |
| 34367 |
|
| 34368 |
- bpo-18802: Documentation changes for ipaddress. Patch by Jon Foster and |
| 34369 |
Berker Peksag. |
| 34370 |
|
| 34371 |
- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder`` |
| 34372 |
implements ``MetaPathFinder``. (Patch by Himanshu Lakhara) |
| 34373 |
|
| 34374 |
- bpo-28124: The ssl module function ssl.wrap_socket() has been |
| 34375 |
de-emphasized and deprecated in favor of the more secure and efficient |
| 34376 |
SSLContext.wrap_socket() method. |
| 34377 |
|
| 34378 |
- bpo-17232: Clarify docs for -O and -OO. Patch by Terry Reedy. |
| 34379 |
|
| 34380 |
- bpo-32436: Add documentation for the contextvars module (PEP 567). |
| 34381 |
|
| 34382 |
- bpo-32800: Update link to w3c doc for xml default namespaces. |
| 34383 |
|
| 34384 |
- bpo-11015: Update :mod:`test.support` documentation. |
| 34385 |
|
| 34386 |
- bpo-32613: Update the faq/windows.html to use the py command from PEP 397 |
| 34387 |
instead of python. |
| 34388 |
|
| 34389 |
- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get` |
| 34390 |
method raises :exc:`AttributeError`. |
| 34391 |
|
| 34392 |
- bpo-32614: Modify RE examples in documentation to use raw strings to |
| 34393 |
prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight |
| 34394 |
the deprecation. |
| 34395 |
|
| 34396 |
- bpo-20709: Remove the paragraph where we explain that os.utime() does not |
| 34397 |
support a directory as path under Windows. Patch by Jan-Philip Gehrcke |
| 34398 |
|
| 34399 |
- bpo-32722: Remove the bad example in the tutorial of the Generator |
| 34400 |
Expression. Patch by Stéphane Wirtel |
| 34401 |
|
| 34402 |
- bpo-31972: Improve docstrings for ``pathlib.PurePath`` subclasses. |
| 34403 |
|
| 34404 |
- bpo-30607: Use the externalized ``python-docs-theme`` package when |
| 34405 |
building the documentation. |
| 34406 |
|
| 34407 |
- bpo-8243: Add a note about curses.addch and curses.addstr exception |
| 34408 |
behavior when writing outside a window, or pad. |
| 34409 |
|
| 34410 |
- bpo-32337: Update documentation related with ``dict`` order. |
| 34411 |
|
| 34412 |
- bpo-25041: Document ``AF_PACKET`` in the :mod:`socket` module. |
| 34413 |
|
| 34414 |
- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED |
| 34415 |
flags for ssl.SSLContext.verify_mode. |
| 34416 |
|
| 34417 |
Tests |
| 34418 |
----- |
| 34419 |
|
| 34420 |
- bpo-35772: Fix sparse file tests of test_tarfile on ppc64 with the tmpfs |
| 34421 |
filesystem. Fix the function testing if the filesystem supports sparse |
| 34422 |
files: create a file which contains data and "holes", instead of creating |
| 34423 |
a file which contains no data. tmpfs effective block size is a page size |
| 34424 |
(tmpfs lives in the page cache). RHEL uses 64 KiB pages on aarch64, ppc64, |
| 34425 |
ppc64le, only s390x and x86_64 use 4 KiB pages, whereas the test punch |
| 34426 |
holes of 4 KiB. |
| 34427 |
|
| 34428 |
- bpo-35045: Make ssl tests less strict and also accept TLSv1 as system |
| 34429 |
default. The changes unbreaks test_min_max_version on Fedora 29. |
| 34430 |
|
| 34431 |
- bpo-32710: ``test_asyncio/test_sendfile.py`` now resets the event loop |
| 34432 |
policy using :func:`tearDownModule` as done in other tests, to prevent a |
| 34433 |
warning when running tests on Windows. |
| 34434 |
|
| 34435 |
- bpo-33717: test.pythoninfo now logs information of all clocks, not only |
| 34436 |
time.time() and time.perf_counter(). |
| 34437 |
|
| 34438 |
- bpo-35488: Add a test to pathlib's Path.match() to verify it does not |
| 34439 |
support glob-style ** recursive pattern matching. |
| 34440 |
|
| 34441 |
- bpo-31731: Fix a race condition in ``check_interrupted_write()`` of |
| 34442 |
test_io: create directly the thread with SIGALRM signal blocked, rather |
| 34443 |
than blocking the signal later from the thread. Previously, it was |
| 34444 |
possible that the thread gets the signal before the signal is blocked. |
| 34445 |
|
| 34446 |
- bpo-35424: Fix test_multiprocessing_main_handling: use |
| 34447 |
:class:`multiprocessing.Pool` with a context manager and then explicitly |
| 34448 |
join the pool. |
| 34449 |
|
| 34450 |
- bpo-35519: Rename :mod:`test.bisect` module to :mod:`test.bisect_cmd` to |
| 34451 |
avoid conflict with :mod:`bisect` module when running directly a test like |
| 34452 |
``./python Lib/test/test_xmlrpc.py``. |
| 34453 |
|
| 34454 |
- bpo-35513: Replace :func:`time.time` with :func:`time.monotonic` in tests |
| 34455 |
to measure time delta. |
| 34456 |
|
| 34457 |
- bpo-34279: :func:`test.support.run_unittest` no longer raise |
| 34458 |
:exc:`TestDidNotRun` if the test result contains skipped tests. The |
| 34459 |
exception is now only raised if no test have been run and no test have |
| 34460 |
been skipped. |
| 34461 |
|
| 34462 |
- bpo-35412: Add testcase to ``test_future4``: check unicode literal. |
| 34463 |
|
| 34464 |
- bpo-26704: Added test demonstrating double-patching of an instance method. |
| 34465 |
Patch by Anthony Sottile. |
| 34466 |
|
| 34467 |
- bpo-33725: test_multiprocessing_fork may crash on recent versions of |
| 34468 |
macOS. Until the issue is resolved, skip the test on macOS. |
| 34469 |
|
| 34470 |
- bpo-35352: Modify test_asyncio to use the certificate set from the test |
| 34471 |
directory. |
| 34472 |
|
| 34473 |
- bpo-35317: Fix ``mktime()`` overflow error in ``test_email``: run |
| 34474 |
``test_localtime_daylight_true_dst_true()`` and |
| 34475 |
``test_localtime_daylight_false_dst_true()`` with a specific timezone. |
| 34476 |
|
| 34477 |
- bpo-21263: After several reports that test_gdb does not work properly on |
| 34478 |
macOS and since gdb is not shipped by default anymore, test_gdb is now |
| 34479 |
skipped on macOS when LLVM Clang has been used to compile Python. Patch by |
| 34480 |
Lysandros Nikolaou |
| 34481 |
|
| 34482 |
- bpo-34279: regrtest issue a warning when no tests have been executed in a |
| 34483 |
particular test file. Also, a new final result state is issued if no test |
| 34484 |
have been executed across all test files. Patch by Pablo Galindo. |
| 34485 |
|
| 34486 |
- bpo-34962: make docstest in Doc now passes., and is enforced in CI |
| 34487 |
|
| 34488 |
- bpo-23596: Use argparse for the command line of the gzip module. Patch by |
| 34489 |
Antony Lee |
| 34490 |
|
| 34491 |
- bpo-34537: Fix ``test_gdb.test_strings()`` when ``LC_ALL=C`` and GDB was |
| 34492 |
compiled with Python 3.6 or earlier. |
| 34493 |
|
| 34494 |
- bpo-34587: test_socket: Remove RDSTest.testCongestion(). The test tries to |
| 34495 |
fill the receiver's socket buffer and expects an error. But the RDS |
| 34496 |
protocol doesn't require that. Moreover, the Linux implementation of RDS |
| 34497 |
expects that the producer of the messages reduces its rate, it's not the |
| 34498 |
role of the receiver to trigger an error. The test fails on Fedora 28 by |
| 34499 |
design, so just remove it. |
| 34500 |
|
| 34501 |
- bpo-34661: Fix test_shutil if unzip doesn't support -t. |
| 34502 |
|
| 34503 |
- bpo-34200: Fixed non-deterministic flakiness of test_pkg by not using the |
| 34504 |
scary test.support.module_cleanup() logic to save and restore sys.modules |
| 34505 |
contents between test cases. |
| 34506 |
|
| 34507 |
- bpo-34569: The experimental PEP 554 data channels now correctly pass |
| 34508 |
negative PyLong objects between subinterpreters on 32-bit systems. Patch |
| 34509 |
by Michael Felt. |
| 34510 |
|
| 34511 |
- bpo-34594: Fix usage of hardcoded ``errno`` values in the tests. |
| 34512 |
|
| 34513 |
- bpo-34579: Fix test_embed for AIX Patch by Michael Felt |
| 34514 |
|
| 34515 |
- bpo-34542: Use 3072 RSA keys and SHA-256 signature for test certs and |
| 34516 |
keys. |
| 34517 |
|
| 34518 |
- bpo-11193: Remove special condition for AIX in |
| 34519 |
``test_subprocess.test_undecodable_env`` |
| 34520 |
|
| 34521 |
- bpo-34347: Fix ``test_utf8_mode.test_cmd_line`` for AIX |
| 34522 |
|
| 34523 |
- bpo-34490: On AIX with AF_UNIX family sockets getsockname() does not |
| 34524 |
provide 'sockname', so skip calls to transport.get_extra_info('sockname') |
| 34525 |
|
| 34526 |
- bpo-34391: Fix ftplib test for TLS 1.3 by reading from data socket. |
| 34527 |
|
| 34528 |
- bpo-11192: Fix ``test_socket`` on AIX 6.1 and later IPv6 zone id supports |
| 34529 |
only supported by ``inet_pton6_zone()``. Switch to runtime-based |
| 34530 |
``platform.system()`` to establish current platform rather than build-time |
| 34531 |
based ``sys.platform()`` |
| 34532 |
|
| 34533 |
- bpo-34399: Update all RSA keys and DH params to use at least 2048 bits. |
| 34534 |
|
| 34535 |
- bpo-34373: Fix ``test_mktime`` and ``test_pthread_getcpuclickid`` tests |
| 34536 |
for AIX Add range checking for ``_PyTime_localtime`` for AIX Patch by |
| 34537 |
Michael Felt |
| 34538 |
|
| 34539 |
- bpo-11191: Skip the distutils test 'test_search_cpp' when using XLC as |
| 34540 |
compiler patch by aixtools (Michael Felt) |
| 34541 |
|
| 34542 |
- Improved an error message when mock assert_has_calls fails. |
| 34543 |
|
| 34544 |
- bpo-33746: Fix test_unittest when run in verbose mode. |
| 34545 |
|
| 34546 |
- bpo-33901: Fix test_dbm_gnu on macOS with gdbm 1.15: add a larger value to |
| 34547 |
make sure that the file size changes. |
| 34548 |
|
| 34549 |
- bpo-33873: Fix a bug in ``regrtest`` that caused an extra test to run if |
| 34550 |
--huntrleaks/-R was used. Exit with error in case that invalid parameters |
| 34551 |
are specified to --huntrleaks/-R (at least one warmup run and one |
| 34552 |
repetition must be used). |
| 34553 |
|
| 34554 |
- bpo-33562: Check that a global asyncio event loop policy is not left |
| 34555 |
behind by any tests. |
| 34556 |
|
| 34557 |
- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that |
| 34558 |
might be due to running on ZFS. |
| 34559 |
|
| 34560 |
- bpo-32962: Fixed test_gdb when Python is compiled with flags -mcet |
| 34561 |
-fcf-protection -O0. |
| 34562 |
|
| 34563 |
- bpo-33358: Fix ``test_embed.test_pre_initialization_sys_options()`` when |
| 34564 |
the interpreter is built with ``--enable-shared``. |
| 34565 |
|
| 34566 |
- bpo-32872: Avoid regrtest compatibility issue with namespace packages. |
| 34567 |
|
| 34568 |
- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport |
| 34569 |
of ``KqueueSelector`` loop was not being closed. |
| 34570 |
|
| 34571 |
- bpo-32663: Making sure the ``SMTPUTF8SimTests`` class of tests gets run in |
| 34572 |
``test_smtplib.py``. |
| 34573 |
|
| 34574 |
- bpo-27643: Test_C test case needs "signed short" bitfields, but the IBM |
| 34575 |
XLC compiler (on AIX) does not support this Skip the code and test when |
| 34576 |
AIX and XLC are used |
| 34577 |
|
| 34578 |
Applicable to Python2-2.7 and later |
| 34579 |
|
| 34580 |
- bpo-19417: Add test_bdb.py. |
| 34581 |
|
| 34582 |
- bpo-31809: Add tests to verify connection with secp ECDH curves. |
| 34583 |
|
| 34584 |
Build |
| 34585 |
----- |
| 34586 |
|
| 34587 |
- bpo-34691: The _contextvars module is now built into the core Python |
| 34588 |
library on Windows. |
| 34589 |
|
| 34590 |
- bpo-35683: Improved Azure Pipelines build steps and now verifying layouts |
| 34591 |
correctly |
| 34592 |
|
| 34593 |
- bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj |
| 34594 |
|
| 34595 |
- bpo-35550: Fix incorrect Solaris #ifdef checks to look for __sun && __SVR4 |
| 34596 |
instead of sun when compiling. |
| 34597 |
|
| 34598 |
- bpo-35499: ``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with |
| 34599 |
``CFLAGS``. It now adds profile-guided optimization (PGO) flags to |
| 34600 |
``CFLAGS_NODIST``: existing ``CFLAGS_NODIST`` flags are kept. |
| 34601 |
|
| 34602 |
- bpo-35257: Avoid leaking the linker flags from Link Time Optimizations |
| 34603 |
(LTO) into distutils when compiling C extensions. |
| 34604 |
|
| 34605 |
- bpo-35351: When building Python with clang and LTO, LTO flags are no |
| 34606 |
longer passed into CFLAGS to build third-party C extensions through |
| 34607 |
distutils. |
| 34608 |
|
| 34609 |
- bpo-35139: Fix a compiler error when statically linking ``pyexpat`` in |
| 34610 |
``Modules/Setup``. |
| 34611 |
|
| 34612 |
- bpo-35059: PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline |
| 34613 |
("/Ob1" option) in pyproject.props in Debug mode to expand functions |
| 34614 |
marked as inline. This change should make Python compiled in Debug mode a |
| 34615 |
little bit faster on Windows. |
| 34616 |
|
| 34617 |
- bpo-35011: Restores the use of pyexpatns.h to isolate our embedded copy of |
| 34618 |
the expat C library so that its symbols do not conflict at link or dynamic |
| 34619 |
loading time with an embedding application or other extension modules with |
| 34620 |
their own version of libexpat. |
| 34621 |
|
| 34622 |
- bpo-28015: Have --with-lto works correctly with clang. |
| 34623 |
|
| 34624 |
- bpo-34765: Update the outdated install-sh file to the latest revision from |
| 34625 |
automake v1.16.1 |
| 34626 |
|
| 34627 |
- bpo-34585: Check for floating-point byte order in configure.ac using |
| 34628 |
compilation tests instead of executing code, so that these checks work in |
| 34629 |
cross-compiled builds. |
| 34630 |
|
| 34631 |
- bpo-34710: Fixed SSL module build with OpenSSL & pedantic CFLAGS. |
| 34632 |
|
| 34633 |
- bpo-34582: Add JUnit XML output for regression tests and update Azure |
| 34634 |
DevOps builds. |
| 34635 |
|
| 34636 |
- bpo-34081: Make Sphinx warnings as errors in the Docs Makefile. |
| 34637 |
|
| 34638 |
- bpo-34555: Fix for case where it was not possible to have both |
| 34639 |
``HAVE_LINUX_VM_SOCKETS_H`` and ``HAVE_SOCKADDR_ALG`` be undefined. |
| 34640 |
|
| 34641 |
- bpo-33015: Fix an undefined behaviour in the pthread implementation of |
| 34642 |
:c:func:`PyThread_start_new_thread`: add a function wrapper to always |
| 34643 |
return ``NULL``. |
| 34644 |
|
| 34645 |
- bpo-34245: The Python shared library is now installed with write |
| 34646 |
permission (mode 0755), which is the standard way of installing such |
| 34647 |
libraries. |
| 34648 |
|
| 34649 |
- bpo-34121: Fix detection of C11 atomic support on clang. |
| 34650 |
|
| 34651 |
- bpo-32430: Rename Modules/Setup.dist to Modules/Setup, and remove the |
| 34652 |
necessity to copy the former manually to the latter when updating the |
| 34653 |
local source tree. |
| 34654 |
|
| 34655 |
- bpo-30345: Add -g to LDFLAGS when compiling with LTO to get debug symbols. |
| 34656 |
|
| 34657 |
- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from |
| 34658 |
``OPT``. This option emitted annoying warnings when building extension |
| 34659 |
modules written in C++. |
| 34660 |
|
| 34661 |
- bpo-33614: Ensures module definition files for the stable ABI on Windows |
| 34662 |
are correctly regenerated. |
| 34663 |
|
| 34664 |
- bpo-33648: The --with-c-locale-warning configuration flag has been |
| 34665 |
removed. It has had no effect for about a year. |
| 34666 |
|
| 34667 |
- bpo-33522: Enable CI builds on Visual Studio Team Services at |
| 34668 |
https://python.visualstudio.com/cpython |
| 34669 |
|
| 34670 |
- bpo-33512: configure's check for "long double" has been simplified |
| 34671 |
|
| 34672 |
- bpo-33483: C compiler is now correctly detected from the standard |
| 34673 |
environment variables. --without-gcc and --with-icc options have been |
| 34674 |
removed. |
| 34675 |
|
| 34676 |
- bpo-33394: Enable the verbose build for extension modules, when GNU make |
| 34677 |
is passed macros on the command line. |
| 34678 |
|
| 34679 |
- bpo-33393: Update config.guess and config.sub files. |
| 34680 |
|
| 34681 |
- bpo-33377: Add new triplets for mips r6 and riscv variants (used in |
| 34682 |
extension suffixes). |
| 34683 |
|
| 34684 |
- bpo-32232: By default, modules configured in ``Modules/Setup`` are no |
| 34685 |
longer built with ``-DPy_BUILD_CORE``. Instead, modules that specifically |
| 34686 |
need that preprocessor definition include it in their individual entries. |
| 34687 |
|
| 34688 |
- bpo-33182: The embedding tests can once again be built with clang 6.0 |
| 34689 |
|
| 34690 |
- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. |
| 34691 |
|
| 34692 |
- bpo-33012: gcc 8 has added a new warning heuristic to detect invalid |
| 34693 |
function casts and a stock python build seems to hit that warning quite |
| 34694 |
often. The most common is the cast of a METH_NOARGS function (that uses |
| 34695 |
just one argument) to a PyCFunction. Fix this by adding a dummy argument |
| 34696 |
to all functions that implement METH_NOARGS. |
| 34697 |
|
| 34698 |
- bpo-32898: Fix the python debug build when using COUNT_ALLOCS. |
| 34699 |
|
| 34700 |
- bpo-29442: Replace optparse with argparse in setup.py |
| 34701 |
|
| 34702 |
Windows |
| 34703 |
------- |
| 34704 |
|
| 34705 |
- bpo-35890: Fix API calling consistency of GetVersionEx and wcstok. |
| 34706 |
|
| 34707 |
- bpo-32560: The ``py`` launcher now forwards its ``STARTUPINFO`` structure |
| 34708 |
to child processes. |
| 34709 |
|
| 34710 |
- bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows |
| 34711 |
|
| 34712 |
- bpo-35811: Avoid propagating venv settings when launching via py.exe |
| 34713 |
|
| 34714 |
- bpo-35797: Fix default executable used by the multiprocessing module |
| 34715 |
|
| 34716 |
- bpo-35758: Allow building on ARM with MSVC. |
| 34717 |
|
| 34718 |
- bpo-29734: Fix handle leaks in os.stat on Windows. |
| 34719 |
|
| 34720 |
- bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport |
| 34721 |
restrictions. |
| 34722 |
|
| 34723 |
- bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple |
| 34724 |
times. |
| 34725 |
|
| 34726 |
- bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 |
| 34727 |
|
| 34728 |
- bpo-35401: Updates Windows build to OpenSSL 1.1.0j |
| 34729 |
|
| 34730 |
- bpo-34977: venv on Windows will now use a python.exe redirector rather |
| 34731 |
than copying the actual binaries from the base environment. |
| 34732 |
|
| 34733 |
- bpo-34977: Adds support for building a Windows App Store package |
| 34734 |
|
| 34735 |
- bpo-35067: Remove _distutils_findvs module and use vswhere.exe instead. |
| 34736 |
|
| 34737 |
- bpo-32557: Allow shutil.disk_usage to take a file path on Windows |
| 34738 |
|
| 34739 |
- bpo-34770: Fix a possible null pointer dereference in pyshellext.cpp. |
| 34740 |
|
| 34741 |
- bpo-34603: Fix returning structs from functions produced by MSVC |
| 34742 |
|
| 34743 |
- bpo-34581: Guard MSVC-specific code in socketmodule.c with ``#ifdef |
| 34744 |
_MSC_VER``. |
| 34745 |
|
| 34746 |
- bpo-34532: Fixes exit code of list version arguments for py.exe. |
| 34747 |
|
| 34748 |
- bpo-34062: Fixed the '--list' and '--list-paths' arguments for the py.exe |
| 34749 |
launcher |
| 34750 |
|
| 34751 |
- bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. |
| 34752 |
|
| 34753 |
- bpo-34011: A suite of code has been changed which copied across DLLs and |
| 34754 |
init.tcl from the running Python location into a venv being created. These |
| 34755 |
copies are needed only when running from a Python source build, and the |
| 34756 |
copying code is now only run when that is the case, rather than whenever a |
| 34757 |
venv is created. |
| 34758 |
|
| 34759 |
- bpo-34006: Revert line length limit for Windows help docs. The line-length |
| 34760 |
limit is not needed because the pages appear in a separate app rather than |
| 34761 |
on a browser tab. It can also interact badly with the DPI setting. |
| 34762 |
|
| 34763 |
- bpo-31546: Restore running PyOS_InputHook while waiting for user input at |
| 34764 |
the prompt. The restores integration of interactive GUI windows (such as |
| 34765 |
Matplotlib figures) with the prompt on Windows. |
| 34766 |
|
| 34767 |
- bpo-30237: Output error when ReadConsole is canceled by |
| 34768 |
CancelSynchronousIo instead of crashing. |
| 34769 |
|
| 34770 |
- bpo-33895: GIL is released while calling functions that acquire Windows |
| 34771 |
loader lock. |
| 34772 |
|
| 34773 |
- bpo-33720: Reduces maximum marshal recursion depth on release builds. |
| 34774 |
|
| 34775 |
- bpo-29097: Fix bug where :meth:`datetime.fromtimestamp` erroneously throws |
| 34776 |
an :exc:`OSError` on Windows for values between 0 and 86400. Patch by |
| 34777 |
Ammar Askar. |
| 34778 |
|
| 34779 |
- bpo-33316: PyThread_release_lock always fails |
| 34780 |
|
| 34781 |
- bpo-33184: Update Windows installer to use OpenSSL 1.1.0h. |
| 34782 |
|
| 34783 |
- bpo-32890: Fix usage of GetLastError() instead of errno in os.execve() and |
| 34784 |
os.truncate(). |
| 34785 |
|
| 34786 |
- bpo-33016: Fix potential use of uninitialized memory in |
| 34787 |
nt._getfinalpathname |
| 34788 |
|
| 34789 |
- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current |
| 34790 |
directory is set to a UNC path. |
| 34791 |
|
| 34792 |
- bpo-32901: Update Tcl and Tk versions to 8.6.8 |
| 34793 |
|
| 34794 |
- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. |
| 34795 |
|
| 34796 |
- bpo-32409: Ensures activate.bat can handle Unicode contents. |
| 34797 |
|
| 34798 |
- bpo-32457: Improves handling of denormalized executable path when |
| 34799 |
launching Python. |
| 34800 |
|
| 34801 |
- bpo-32370: Use the correct encoding for ipconfig output in the uuid |
| 34802 |
module. Patch by Segev Finer. |
| 34803 |
|
| 34804 |
- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly |
| 34805 |
treating the ``PrintNameOffset`` field of the reparse data buffer as a |
| 34806 |
number of characters instead of bytes. Patch by Craig Holmquist and SSE4. |
| 34807 |
|
| 34808 |
- bpo-1104: Correctly handle string length in |
| 34809 |
``msilib.SummaryInfo.GetProperty()`` to prevent it from truncating the |
| 34810 |
last character. |
| 34811 |
|
| 34812 |
macOS |
| 34813 |
----- |
| 34814 |
|
| 34815 |
- bpo-35401: Update macOS installer to use OpenSSL 1.1.0j. |
| 34816 |
|
| 34817 |
- bpo-35025: Properly guard the use of the ``CLOCK_GETTIME`` et al. macros |
| 34818 |
in ``timemodule`` on macOS. |
| 34819 |
|
| 34820 |
- bpo-24658: On macOS, fix reading from and writing into a file with a size |
| 34821 |
larger than 2 GiB. |
| 34822 |
|
| 34823 |
- bpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds. |
| 34824 |
|
| 34825 |
- bpo-33635: In macOS stat on some file descriptors (/dev/fd/3 f.e) will |
| 34826 |
result in bad file descriptor OSError. Guard against this exception was |
| 34827 |
added in is_dir, is_file and similar methods. DirEntry.is_dir can also |
| 34828 |
throw this exception so _RecursiveWildcardSelector._iterate_directories |
| 34829 |
was also extended with the same error ignoring pattern. |
| 34830 |
|
| 34831 |
- bpo-13631: The .editrc file in user's home directory is now processed |
| 34832 |
correctly during the readline initialization through editline emulation on |
| 34833 |
macOS. |
| 34834 |
|
| 34835 |
- bpo-33184: Update macOS installer build to use OpenSSL 1.1.0h. |
| 34836 |
|
| 34837 |
- bpo-32726: Build and link with private copy of Tcl/Tk 8.6 for the macOS |
| 34838 |
10.6+ installer. The 10.9+ installer variant already does this. This |
| 34839 |
means that the Python 3.7 provided by the python.org macOS installers no |
| 34840 |
longer need or use any external versions of Tcl/Tk, either system-provided |
| 34841 |
or user-installed, such as ActiveTcl. |
| 34842 |
|
| 34843 |
- bpo-32901: Update macOS 10.9+ installer to Tcl/Tk 8.6.8. |
| 34844 |
|
| 34845 |
- bpo-31903: In :mod:`!_scproxy`, drop the GIL when calling into |
| 34846 |
``SystemConfiguration`` to avoid deadlocks. |
| 34847 |
|
| 34848 |
IDLE |
| 34849 |
---- |
| 34850 |
|
| 34851 |
- bpo-35770: IDLE macosx deletes Options => Configure IDLE. It previously |
| 34852 |
deleted Window => Zoom Height by mistake. (Zoom Height is now on the |
| 34853 |
Options menu). On Mac, the settings dialog is accessed via Preferences on |
| 34854 |
the IDLE menu. |
| 34855 |
|
| 34856 |
- bpo-35769: Change IDLE's new file name from 'Untitled' to 'untitled' |
| 34857 |
|
| 34858 |
- bpo-35660: Fix imports in idlelib.window. |
| 34859 |
|
| 34860 |
- bpo-35641: Proper format ``calltip`` when the function has no docstring. |
| 34861 |
|
| 34862 |
- bpo-33987: Use ttk Frame for ttk widgets. |
| 34863 |
|
| 34864 |
- bpo-34055: Fix erroneous 'smart' indents and newlines in IDLE Shell. |
| 34865 |
|
| 34866 |
- bpo-35591: Find Selection now works when selection not found. |
| 34867 |
|
| 34868 |
- bpo-35196: Speed up squeezer line counting. |
| 34869 |
|
| 34870 |
- bpo-35598: Update config_key: use PEP 8 names and ttk widgets, make some |
| 34871 |
objects global, and add tests. |
| 34872 |
|
| 34873 |
- bpo-28097: Add Previous/Next History entries to Shell menu. |
| 34874 |
|
| 34875 |
- bpo-35208: Squeezer now properly counts wrapped lines before newlines. |
| 34876 |
|
| 34877 |
- bpo-35555: Gray out Code Context menu entry when it's not applicable. |
| 34878 |
|
| 34879 |
- bpo-35521: Document the IDLE editor code context feature. Add some |
| 34880 |
internal references within the IDLE doc. |
| 34881 |
|
| 34882 |
- bpo-22703: The Code Context menu label now toggles between Show/Hide Code |
| 34883 |
Context. The Zoom Height menu now toggles between Zoom/Restore Height. |
| 34884 |
Zoom Height has moved from the Window menu to the Options menu. |
| 34885 |
|
| 34886 |
- bpo-35213: Where appropriate, use 'macOS' in idlelib. |
| 34887 |
|
| 34888 |
- bpo-34864: On macOS, warn if the system preference "Prefer tabs when |
| 34889 |
opening documents" is set to "Always". |
| 34890 |
|
| 34891 |
- bpo-34864: Document two IDLE on MacOS issues. The System Preferences Dock |
| 34892 |
"prefer tabs always" setting disables some IDLE features. Menus are a bit |
| 34893 |
different than as described for Windows and Linux. |
| 34894 |
|
| 34895 |
- bpo-35202: Remove unused imports from lib/idlelib |
| 34896 |
|
| 34897 |
- bpo-33000: Document that IDLE's shell has no line limit. A program that |
| 34898 |
runs indefinitely can overfill memory. |
| 34899 |
|
| 34900 |
- bpo-23220: Explain how IDLE's Shell displays output. |
| 34901 |
|
| 34902 |
- bpo-35099: Improve the doc about IDLE running user code. The section is |
| 34903 |
renamed from "IDLE -- console differences" is renamed "Running user code". |
| 34904 |
It mostly covers the implications of using custom :samp:`sys.std{xxx}` |
| 34905 |
objects. |
| 34906 |
|
| 34907 |
- bpo-35097: Add IDLE doc subsection explaining editor windows. Topics |
| 34908 |
include opening, title and status bar, .py* extension, and running. |
| 34909 |
|
| 34910 |
- bpo-35093: Document the IDLE document viewer in the IDLE doc. Add a |
| 34911 |
paragraph in "Help and preferences", "Help sources" subsection. |
| 34912 |
|
| 34913 |
- bpo-35088: Update idlelib.help.copy_string docstring. We now use git and |
| 34914 |
backporting instead of hg and forward merging. |
| 34915 |
|
| 34916 |
- bpo-35087: Update idlelib help files for the current doc build. The main |
| 34917 |
change is the elimination of chapter-section numbers. |
| 34918 |
|
| 34919 |
- bpo-34548: Use configured color theme for read-only text views. |
| 34920 |
|
| 34921 |
- bpo-1529353: Enable "squeezing" of long outputs in the shell, to avoid |
| 34922 |
performance degradation and to clean up the history without losing it. |
| 34923 |
Squeezed outputs may be copied, viewed in a separate window, and |
| 34924 |
"unsqueezed". |
| 34925 |
|
| 34926 |
- bpo-34047: Fixed mousewheel scrolling direction on macOS. |
| 34927 |
|
| 34928 |
- bpo-34275: Make IDLE calltips always visible on Mac. Some MacOS-tk |
| 34929 |
combinations need .update_idletasks(). Patch by Kevin Walzer. |
| 34930 |
|
| 34931 |
- bpo-34120: Fix unresponsiveness after closing certain windows and dialogs. |
| 34932 |
|
| 34933 |
- bpo-33975: Avoid small type when running htests. Since part of the purpose |
| 34934 |
of human-viewed tests is to determine that widgets look right, it is |
| 34935 |
important that they look the same for testing as when running IDLE. |
| 34936 |
|
| 34937 |
- bpo-33905: Add test for idlelib.stackview.StackBrowser. |
| 34938 |
|
| 34939 |
- bpo-33924: Change mainmenu.menudefs key 'windows' to 'window'. Every other |
| 34940 |
menudef key is lowercase version of main menu entry. |
| 34941 |
|
| 34942 |
- bpo-33906: Rename idlelib.windows as window Match Window on the main menu |
| 34943 |
and remove last plural module name. |
| 34944 |
|
| 34945 |
- bpo-33917: Fix and document idlelib/idle_test/template.py. The revised |
| 34946 |
file compiles, runs, and tests OK. idle_test/README.txt explains how to |
| 34947 |
use it to create new IDLE test files. |
| 34948 |
|
| 34949 |
- bpo-33904: IDLE: In rstrip, rename class RstripExtension as Rstrip |
| 34950 |
|
| 34951 |
- bpo-33907: For consistency and clarity, rename an IDLE module and classes. |
| 34952 |
Module calltips and its class CallTips are now calltip and Calltip. In |
| 34953 |
module calltip_w, class CallTip is now CalltipWindow. |
| 34954 |
|
| 34955 |
- bpo-33856: Add "help" in the welcome message of IDLE |
| 34956 |
|
| 34957 |
- bpo-33839: IDLE: refactor ToolTip and CallTip and add documentation and |
| 34958 |
tests |
| 34959 |
|
| 34960 |
- bpo-33855: Minimally test all IDLE modules. Add missing files, import |
| 34961 |
module, instantiate classes, and check coverage. Check existing files. |
| 34962 |
|
| 34963 |
- bpo-33656: On Windows, add API call saying that tk scales for DPI. On |
| 34964 |
Windows 8.1+ or 10, with DPI compatibility properties of the Python binary |
| 34965 |
unchanged, and a monitor resolution greater than 96 DPI, this should make |
| 34966 |
text and lines sharper. It should otherwise have no effect. |
| 34967 |
|
| 34968 |
- bpo-33768: Clicking on a context line moves that line to the top of the |
| 34969 |
editor window. |
| 34970 |
|
| 34971 |
- bpo-33763: IDLE: Use read-only text widget for code context instead of |
| 34972 |
label widget. |
| 34973 |
|
| 34974 |
- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel |
| 34975 |
and scrollbar slider moved text by a fixed number of pixels, resulting in |
| 34976 |
partial lines at the top of the editor box. The change also applies to |
| 34977 |
the shell and grep output windows, but not to read-only text views. |
| 34978 |
|
| 34979 |
- bpo-33679: Enable theme-specific color configuration for Code Context. Use |
| 34980 |
the Highlights tab to see the setting for built-in themes or add settings |
| 34981 |
to custom themes. |
| 34982 |
|
| 34983 |
- bpo-33642: Display up to maxlines non-blank lines for Code Context. If |
| 34984 |
there is no current context, show a single blank line. |
| 34985 |
|
| 34986 |
- bpo-33628: IDLE: Cleanup codecontext.py and its test. |
| 34987 |
|
| 34988 |
- bpo-33564: IDLE's code context now recognizes async as a block opener. |
| 34989 |
|
| 34990 |
- bpo-21474: Update word/identifier definition from ascii to unicode. In |
| 34991 |
text and entry boxes, this affects selection by double-click, movement |
| 34992 |
left/right by control-left/right, and deletion left/right by |
| 34993 |
control-BACKSPACE/DEL. |
| 34994 |
|
| 34995 |
- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string |
| 34996 |
prefix cannot be paired with either 'r' or 'f'. Consistently color as much |
| 34997 |
of the prefix, starting at the right, as is valid. Revise and extend |
| 34998 |
colorizer test. |
| 34999 |
|
| 35000 |
- bpo-32984: Set ``__file__`` while running a startup file. Like Python, |
| 35001 |
IDLE optionally runs one startup file in the Shell window before |
| 35002 |
presenting the first interactive input prompt. For IDLE, ``-s`` runs a |
| 35003 |
file named in environmental variable :envvar:`IDLESTARTUP` or |
| 35004 |
:envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``. Python sets |
| 35005 |
``__file__`` to the startup file name before running the file and unsets |
| 35006 |
it before the first prompt. IDLE now does the same when run normally, |
| 35007 |
without the ``-n`` option. |
| 35008 |
|
| 35009 |
- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse. |
| 35010 |
|
| 35011 |
- bpo-32916: Change ``str`` to ``code`` in pyparse. |
| 35012 |
|
| 35013 |
- bpo-32905: Remove unused code in pyparse module. |
| 35014 |
|
| 35015 |
- bpo-32874: Add tests for pyparse. |
| 35016 |
|
| 35017 |
- bpo-32837: Using the system and place-dependent default encoding for |
| 35018 |
open() is a bad idea for IDLE's system and location-independent files. |
| 35019 |
|
| 35020 |
- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI |
| 35021 |
test test_file_buttons() only looks at initial ascii-only lines, but |
| 35022 |
failed on systems where open() defaults to 'ascii' because readline() |
| 35023 |
internally reads and decodes far enough ahead to encounter a non-ascii |
| 35024 |
character in CREDITS.txt. |
| 35025 |
|
| 35026 |
- bpo-32831: Add docstrings and tests for codecontext. |
| 35027 |
|
| 35028 |
- bpo-32765: Update configdialog General tab docstring to add new widgets to |
| 35029 |
the widget list. |
| 35030 |
|
| 35031 |
Tools/Demos |
| 35032 |
----------- |
| 35033 |
|
| 35034 |
- bpo-35884: Add a benchmark script for timing various ways to access |
| 35035 |
variables: ``Tools/scripts/var_access_benchmark.py``. |
| 35036 |
|
| 35037 |
- bpo-34989: python-gdb.py now handles errors on computing the line number |
| 35038 |
of a Python frame. |
| 35039 |
|
| 35040 |
- bpo-20260: Argument Clinic now has non-bitwise unsigned int converters. |
| 35041 |
|
| 35042 |
- bpo-32962: python-gdb now catches ``UnicodeDecodeError`` exceptions when |
| 35043 |
calling ``string()``. |
| 35044 |
|
| 35045 |
- bpo-32962: python-gdb now catches ValueError on read_var(): when Python |
| 35046 |
has no debug symbols for example. |
| 35047 |
|
| 35048 |
- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as |
| 35049 |
docstrings and translatable strings, and rejects bytes literals and |
| 35050 |
f-string expressions. |
| 35051 |
|
| 35052 |
- bpo-31920: Fixed handling directories as arguments in the ``pygettext`` |
| 35053 |
script. Based on patch by Oleg Krasnikov. |
| 35054 |
|
| 35055 |
- bpo-29673: Fix pystackv and pystack gdbinit macros. |
| 35056 |
|
| 35057 |
- bpo-25427: Remove the pyvenv script in favor of ``python3 -m venv`` in |
| 35058 |
order to lower confusion as to what Python interpreter a virtual |
| 35059 |
environment will be created for. |
| 35060 |
|
| 35061 |
- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable |
| 35062 |
automatic backup creation (files with ``~`` suffix). |
| 35063 |
|
| 35064 |
- bpo-32222: Fix pygettext not extracting docstrings for functions with type |
| 35065 |
annotated arguments. Patch by Toby Harradine. |
| 35066 |
|
| 35067 |
- bpo-31583: Fix 2to3 for using with --add-suffix option but without |
| 35068 |
--output-dir option for relative path to files in current directory. |
| 35069 |
|
| 35070 |
C API |
| 35071 |
----- |
| 35072 |
|
| 35073 |
- bpo-35713: The :c:func:`!PyByteArray_Init` and :c:func:`!PyByteArray_Fini` |
| 35074 |
functions have been removed. They did nothing since Python 2.7.4 and |
| 35075 |
Python 3.2.0, were excluded from the limited API (stable ABI), and were |
| 35076 |
not documented. |
| 35077 |
|
| 35078 |
- bpo-33817: Fixed :c:func:`_PyBytes_Resize` for empty bytes objects. |
| 35079 |
|
| 35080 |
- bpo-35322: Fix memory leak in :c:func:`PyUnicode_EncodeLocale` and |
| 35081 |
:c:func:`PyUnicode_EncodeFSDefault` on error handling. |
| 35082 |
|
| 35083 |
- bpo-35059: The following C macros have been converted to static inline |
| 35084 |
functions: :c:func:`Py_INCREF`, :c:func:`Py_DECREF`, :c:func:`Py_XINCREF`, |
| 35085 |
:c:func:`Py_XDECREF`, :c:func:`PyObject_INIT`, |
| 35086 |
:c:func:`PyObject_INIT_VAR`. |
| 35087 |
|
| 35088 |
- bpo-35296: ``make install`` now also installs the internal API: |
| 35089 |
``Include/internal/*.h`` header files. |
| 35090 |
|
| 35091 |
- bpo-35081: Internal APIs surrounded by ``#ifdef Py_BUILD_CORE`` have been |
| 35092 |
moved from ``Include/*.h`` headers to new header files |
| 35093 |
``Include/internal/pycore_*.h``. |
| 35094 |
|
| 35095 |
- bpo-35259: Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) |
| 35096 |
based on Py_LIMITED_API. Patch by Arthur Neufeld. |
| 35097 |
|
| 35098 |
- bpo-35081: The :c:func:`!_PyObject_GC_TRACK` and |
| 35099 |
:c:func:`!_PyObject_GC_UNTRACK` macros have been removed from the public C |
| 35100 |
API. |
| 35101 |
|
| 35102 |
- bpo-35134: Creation of a new ``Include/cpython/`` subdirectory. |
| 35103 |
|
| 35104 |
- bpo-34725: Adds _Py_SetProgramFullPath so embedders may override |
| 35105 |
sys.executable |
| 35106 |
|
| 35107 |
- bpo-34910: Ensure that :c:func:`PyObject_Print` always returns ``-1`` on |
| 35108 |
error. Patch by Zackery Spytz. |
| 35109 |
|
| 35110 |
- bpo-34523: Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 |
| 35111 |
encoding on Windows if Py_LegacyWindowsFSEncodingFlag is zero. |
| 35112 |
|
| 35113 |
- bpo-34193: Fix pluralization in TypeError messages in getargs.c and |
| 35114 |
typeobject.c: '1 argument' instead of '1 arguments' and '1 element' |
| 35115 |
instead of '1 elements'. |
| 35116 |
|
| 35117 |
- bpo-34127: Return grammatically correct error message based on argument |
| 35118 |
count. Patch by Karthikeyan Singaravelan. |
| 35119 |
|
| 35120 |
- bpo-23927: Fixed :exc:`SystemError` in |
| 35121 |
:c:func:`PyArg_ParseTupleAndKeywords` when the ``w*`` format unit is used |
| 35122 |
for optional parameter. |
| 35123 |
|
| 35124 |
- bpo-32455: Added :c:func:`PyCompile_OpcodeStackEffectWithJump`. |
| 35125 |
|
| 35126 |
- bpo-34008: Py_Main() can again be called after Py_Initialize(), as in |
| 35127 |
Python 3.6. |
| 35128 |
|
| 35129 |
- bpo-32500: Fixed error messages for :c:func:`PySequence_Size`, |
| 35130 |
:c:func:`PySequence_GetItem`, :c:func:`PySequence_SetItem` and |
| 35131 |
:c:func:`PySequence_DelItem` called with a mapping and |
| 35132 |
:c:func:`PyMapping_Size` called with a sequence. |
| 35133 |
|
| 35134 |
- bpo-33818: :c:func:`PyExceptionClass_Name` will now return ``const char |
| 35135 |
*`` instead of ``char *``. |
| 35136 |
|
| 35137 |
- bpo-33042: Embedding applications may once again call |
| 35138 |
PySys_ResetWarnOptions, PySys_AddWarnOption, and PySys_AddXOption prior to |
| 35139 |
calling Py_Initialize. |
| 35140 |
|
| 35141 |
- bpo-32374: Document that m_traverse for multi-phase initialized modules |
| 35142 |
can be called with m_state=NULL, and add a sanity check |
| 35143 |
|
| 35144 |
- bpo-30863: :c:func:`PyUnicode_AsWideChar` and |
| 35145 |
:c:func:`PyUnicode_AsWideCharString` no longer cache the ``wchar_t*`` |
| 35146 |
representation of string objects. |
| 35147 |
|
| 35148 |
|
| 35149 |
What's New in Python 3.7.0 final? |
| 35150 |
================================= |
| 35151 |
|
| 35152 |
*Release date: 2018-06-27* |
| 35153 |
|
| 35154 |
Library |
| 35155 |
------- |
| 35156 |
|
| 35157 |
- bpo-33851: Fix :func:`ast.get_docstring` for a node that lacks a |
| 35158 |
docstring. |
| 35159 |
|
| 35160 |
C API |
| 35161 |
----- |
| 35162 |
|
| 35163 |
- bpo-33932: Calling Py_Initialize() twice does nothing, instead of failing |
| 35164 |
with a fatal error: restore the Python 3.6 behaviour. |
| 35165 |
|
| 35166 |
|
| 35167 |
What's New in Python 3.7.0 release candidate 1? |
| 35168 |
=============================================== |
| 35169 |
|
| 35170 |
*Release date: 2018-06-12* |
| 35171 |
|
| 35172 |
Core and Builtins |
| 35173 |
----------------- |
| 35174 |
|
| 35175 |
- bpo-33803: Fix a crash in hamt.c caused by enabling GC tracking for an |
| 35176 |
object that hadn't all of its fields set to NULL. |
| 35177 |
|
| 35178 |
- bpo-33706: Fix a crash in Python initialization when parsing the command |
| 35179 |
line options. Thanks Christoph Gohlke for the bug report and the fix! |
| 35180 |
|
| 35181 |
- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter |
| 35182 |
shutdown even when there was a custom handler set previously. Patch by |
| 35183 |
Philipp Kerling. |
| 35184 |
|
| 35185 |
- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c. |
| 35186 |
|
| 35187 |
Library |
| 35188 |
------- |
| 35189 |
|
| 35190 |
- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by |
| 35191 |
Steve Weber. |
| 35192 |
|
| 35193 |
- bpo-33812: Datetime instance d with non-None tzinfo, but with |
| 35194 |
d.tzinfo.utcoffset(d) returning None is now treated as naive by the |
| 35195 |
astimezone() method. |
| 35196 |
|
| 35197 |
- bpo-30805: Avoid race condition with debug logging |
| 35198 |
|
| 35199 |
- bpo-33694: asyncio: Fix a race condition causing data loss on |
| 35200 |
pause_reading()/resume_reading() when using the ProactorEventLoop. |
| 35201 |
|
| 35202 |
- bpo-32493: Correct test for ``uuid_enc_be`` availability in |
| 35203 |
``configure.ac``. Patch by Michael Felt. |
| 35204 |
|
| 35205 |
- bpo-33792: Add asyncio.WindowsSelectorEventLoopPolicy and |
| 35206 |
asyncio.WindowsProactorEventLoopPolicy. |
| 35207 |
|
| 35208 |
- bpo-33778: Update ``unicodedata``'s database to Unicode version 11.0.0. |
| 35209 |
|
| 35210 |
- bpo-33770: improve base64 exception message for encoded inputs of invalid |
| 35211 |
length |
| 35212 |
|
| 35213 |
- bpo-33769: asyncio/start_tls: Fix error message; cancel callbacks in case |
| 35214 |
of an unhandled error; mark SSLTransport as closed if it is aborted. |
| 35215 |
|
| 35216 |
- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence |
| 35217 |
operations now raise :exc:`TypeError` instead of :exc:`SystemError` when |
| 35218 |
performed on :class:`mmap.mmap` objects. Patch by Zackery Spytz. |
| 35219 |
|
| 35220 |
- bpo-33734: asyncio/ssl: Fix AttributeError, increase default handshake |
| 35221 |
timeout |
| 35222 |
|
| 35223 |
- bpo-11874: Use a better regex when breaking usage into wrappable parts. |
| 35224 |
Avoids bogus assertion errors from custom metavar strings. |
| 35225 |
|
| 35226 |
- bpo-33582: Emit a deprecation warning for inspect.formatargspec |
| 35227 |
|
| 35228 |
Documentation |
| 35229 |
------------- |
| 35230 |
|
| 35231 |
- bpo-33409: Clarified the relationship between :pep:`538`'s |
| 35232 |
PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode. |
| 35233 |
|
| 35234 |
- bpo-33736: Improve the documentation of :func:`asyncio.open_connection`, |
| 35235 |
:func:`asyncio.start_server` and their UNIX socket counterparts. |
| 35236 |
|
| 35237 |
- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED |
| 35238 |
flags for ssl.SSLContext.verify_mode. |
| 35239 |
|
| 35240 |
Build |
| 35241 |
----- |
| 35242 |
|
| 35243 |
- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from |
| 35244 |
``OPT``. This option emitted annoying warnings when building extension |
| 35245 |
modules written in C++. |
| 35246 |
|
| 35247 |
Windows |
| 35248 |
------- |
| 35249 |
|
| 35250 |
- bpo-33720: Reduces maximum marshal recursion depth on release builds. |
| 35251 |
|
| 35252 |
IDLE |
| 35253 |
---- |
| 35254 |
|
| 35255 |
- bpo-33656: On Windows, add API call saying that tk scales for DPI. On |
| 35256 |
Windows 8.1+ or 10, with DPI compatibility properties of the Python binary |
| 35257 |
unchanged, and a monitor resolution greater than 96 DPI, this should make |
| 35258 |
text and lines sharper. It should otherwise have no effect. |
| 35259 |
|
| 35260 |
- bpo-33768: Clicking on a context line moves that line to the top of the |
| 35261 |
editor window. |
| 35262 |
|
| 35263 |
- bpo-33763: IDLE: Use read-only text widget for code context instead of |
| 35264 |
label widget. |
| 35265 |
|
| 35266 |
- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel |
| 35267 |
and scrollbar slider moved text by a fixed number of pixels, resulting in |
| 35268 |
partial lines at the top of the editor box. The change also applies to |
| 35269 |
the shell and grep output windows, but not to read-only text views. |
| 35270 |
|
| 35271 |
- bpo-33679: Enable theme-specific color configuration for Code Context. Use |
| 35272 |
the Highlights tab to see the setting for built-in themes or add settings |
| 35273 |
to custom themes. |
| 35274 |
|
| 35275 |
- bpo-33642: Display up to maxlines non-blank lines for Code Context. If |
| 35276 |
there is no current context, show a single blank line. |
| 35277 |
|
| 35278 |
|
| 35279 |
What's New in Python 3.7.0 beta 5? |
| 35280 |
================================== |
| 35281 |
|
| 35282 |
*Release date: 2018-05-30* |
| 35283 |
|
| 35284 |
Core and Builtins |
| 35285 |
----------------- |
| 35286 |
|
| 35287 |
- bpo-33622: Fixed a leak when the garbage collector fails to add an object |
| 35288 |
with the ``__del__`` method or referenced by it into the |
| 35289 |
:data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an |
| 35290 |
exception is set and preserves it. |
| 35291 |
|
| 35292 |
- bpo-33509: Fix module_globals parameter of warnings.warn_explicit(): don't |
| 35293 |
crash if module_globals is not a dict. |
| 35294 |
|
| 35295 |
- bpo-20104: The new ``os.posix_spawn`` added in 3.7.0b1 was removed as we |
| 35296 |
are still working on what the API should look like. Expect this in 3.8 |
| 35297 |
instead. |
| 35298 |
|
| 35299 |
- bpo-33475: Fixed miscellaneous bugs in converting annotations to strings |
| 35300 |
and optimized parentheses in the string representation. |
| 35301 |
|
| 35302 |
- bpo-33391: Fix a leak in set_symmetric_difference(). |
| 35303 |
|
| 35304 |
- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer. |
| 35305 |
|
| 35306 |
- bpo-32911: Due to unexpected compatibility issues discovered during |
| 35307 |
downstream beta testing, reverted :issue:`29463`. ``docstring`` field is |
| 35308 |
removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes |
| 35309 |
which was added in 3.7a1. Docstring expression is restored as a first |
| 35310 |
statement in their body. Based on patch by Inada Naoki. |
| 35311 |
|
| 35312 |
- bpo-21983: Fix a crash in ``ctypes.cast()`` in case the type argument is a |
| 35313 |
ctypes structured data type. Patch by Eryk Sun and Oren Milman. |
| 35314 |
|
| 35315 |
Library |
| 35316 |
------- |
| 35317 |
|
| 35318 |
- bpo-32751: When cancelling the task due to a timeout, |
| 35319 |
:meth:`asyncio.wait_for` will now wait until the cancellation is complete. |
| 35320 |
|
| 35321 |
- bpo-32684: Fix gather to propagate cancellation of itself even with |
| 35322 |
return_exceptions. |
| 35323 |
|
| 35324 |
- bpo-33654: Support protocol type switching in SSLTransport.set_protocol(). |
| 35325 |
|
| 35326 |
- bpo-33674: Pause the transport as early as possible to further reduce the |
| 35327 |
risk of data_received() being called before connection_made(). |
| 35328 |
|
| 35329 |
- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of |
| 35330 |
asyncio.sslproto: start immediately the handshake instead of using |
| 35331 |
call_soon(). Previously, data_received() could be called before the |
| 35332 |
handshake started, causing the handshake to hang or fail. |
| 35333 |
|
| 35334 |
- bpo-31647: Fixed bug where calling write_eof() on a |
| 35335 |
_SelectorSocketTransport after it's already closed raises AttributeError. |
| 35336 |
|
| 35337 |
- bpo-32610: Make asyncio.all_tasks() return only pending tasks. |
| 35338 |
|
| 35339 |
- bpo-32410: Avoid blocking on file IO in sendfile fallback code |
| 35340 |
|
| 35341 |
- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor |
| 35342 |
|
| 35343 |
- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines |
| 35344 |
|
| 35345 |
- bpo-33654: Fix transport.set_protocol() to support switching between |
| 35346 |
asyncio.Protocol and asyncio.BufferedProtocol. Fix loop.start_tls() to |
| 35347 |
work with asyncio.BufferedProtocols. |
| 35348 |
|
| 35349 |
- bpo-33652: Pickles of type variables and subscripted generics are now |
| 35350 |
future-proof and compatible with older Python versions. |
| 35351 |
|
| 35352 |
- bpo-32493: Fixed :func:`uuid.uuid1` on FreeBSD. |
| 35353 |
|
| 35354 |
- bpo-33618: Finalize and document preliminary and experimental TLS 1.3 |
| 35355 |
support with OpenSSL 1.1.1 |
| 35356 |
|
| 35357 |
- bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ |
| 35358 |
|
| 35359 |
- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder |
| 35360 |
that prevented the cache of parsed strings from clearing after finishing |
| 35361 |
the decoding. Based on patch by c-fos. |
| 35362 |
|
| 35363 |
- bpo-33570: Change TLS 1.3 cipher suite settings for compatibility with |
| 35364 |
OpenSSL 1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 ciphers |
| 35365 |
enabled by default. |
| 35366 |
|
| 35367 |
- bpo-28556: Do not simplify arguments to ``typing.Union``. Now |
| 35368 |
``Union[Manager, Employee]`` is not simplified to ``Employee`` at runtime. |
| 35369 |
Such simplification previously caused several bugs and limited |
| 35370 |
possibilities for introspection. |
| 35371 |
|
| 35372 |
- bpo-33540: Add a new ``block_on_close`` class attribute to |
| 35373 |
``ForkingMixIn`` and ``ThreadingMixIn`` classes of :mod:`socketserver`. |
| 35374 |
|
| 35375 |
- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP |
| 35376 |
locations |
| 35377 |
|
| 35378 |
- bpo-33109: argparse subparsers are once again not required by default, |
| 35379 |
reverting the change in behavior introduced by bpo-26510 in 3.7.0a2. |
| 35380 |
|
| 35381 |
- bpo-33536: dataclasses.make_dataclass now checks for invalid field names |
| 35382 |
and duplicate fields. Also, added a check for invalid field |
| 35383 |
specifications. |
| 35384 |
|
| 35385 |
- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on |
| 35386 |
Windows. Patch by Zvi Effron |
| 35387 |
|
| 35388 |
- bpo-26819: Fix race condition with ``ReadTransport.resume_reading`` in |
| 35389 |
Windows proactor event loop. |
| 35390 |
|
| 35391 |
- Fix failure in ``typing.get_type_hints()`` when ClassVar was provided as a |
| 35392 |
string forward reference. |
| 35393 |
|
| 35394 |
- bpo-33505: Optimize asyncio.ensure_future() by reordering if checks: 1.17x |
| 35395 |
faster. |
| 35396 |
|
| 35397 |
- bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in |
| 35398 |
FieldStorage use the given errors (needed for Twisted). Patch by Amber |
| 35399 |
Brown. |
| 35400 |
|
| 35401 |
- bpo-33495: Change dataclasses.Fields repr to use the repr of each of its |
| 35402 |
members, instead of str. This makes it more clear what each field |
| 35403 |
actually represents. This is especially true for the 'type' member. |
| 35404 |
|
| 35405 |
- bpo-33453: Fix dataclasses to work if using literal string type |
| 35406 |
annotations or if using PEP 563 "Postponed Evaluation of Annotations". |
| 35407 |
Only specific string prefixes are detected for both ClassVar ("ClassVar" |
| 35408 |
and "typing.ClassVar") and InitVar ("InitVar" and "dataclasses.InitVar"). |
| 35409 |
|
| 35410 |
- bpo-28556: Minor fixes in typing module: add annotations to |
| 35411 |
``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in |
| 35412 |
``Generic.__new__``. Original PRs by Paulius Šarka and Chad Dombrova. |
| 35413 |
|
| 35414 |
- bpo-20087: Updated alias mapping with glibc 2.27 supported locales. |
| 35415 |
|
| 35416 |
- bpo-33422: Fix trailing quotation marks getting deleted when looking up |
| 35417 |
byte/string literals on pydoc. Patch by Andrés Delfino. |
| 35418 |
|
| 35419 |
- bpo-28167: The function ``platform.linux_distribution`` and |
| 35420 |
``platform.dist`` now trigger a ``DeprecationWarning`` and have been |
| 35421 |
marked for removal in Python 3.8 |
| 35422 |
|
| 35423 |
- bpo-33197: Update error message when constructing invalid |
| 35424 |
inspect.Parameters Patch by Donghee Na. |
| 35425 |
|
| 35426 |
- bpo-33263: Fix FD leak in ``_SelectorSocketTransport`` Patch by Vlad |
| 35427 |
Starostin. |
| 35428 |
|
| 35429 |
- bpo-32861: The urllib.robotparser's ``__str__`` representation now |
| 35430 |
includes wildcard entries and the "Crawl-delay" and "Request-rate" fields. |
| 35431 |
Patch by Michael Lazar. |
| 35432 |
|
| 35433 |
- bpo-32257: The ssl module now contains OP_NO_RENEGOTIATION constant, |
| 35434 |
available with OpenSSL 1.1.0h or 1.1.1. |
| 35435 |
|
| 35436 |
- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`. Patch by Segev Finer. |
| 35437 |
|
| 35438 |
Documentation |
| 35439 |
------------- |
| 35440 |
|
| 35441 |
- bpo-23859: Document that ``asyncio.wait()`` does not cancel its futures on |
| 35442 |
timeout. |
| 35443 |
|
| 35444 |
- bpo-32436: Document :pep:`567` changes to asyncio. |
| 35445 |
|
| 35446 |
- bpo-33604: Update HMAC md5 default to a DeprecationWarning, bump removal |
| 35447 |
to 3.8. |
| 35448 |
|
| 35449 |
- bpo-33503: Fix broken pypi link |
| 35450 |
|
| 35451 |
- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``. |
| 35452 |
|
| 35453 |
Tests |
| 35454 |
----- |
| 35455 |
|
| 35456 |
- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that |
| 35457 |
might be due to running on ZFS. |
| 35458 |
|
| 35459 |
- bpo-32604: Remove the _xxsubinterpreters module (meant for testing) and |
| 35460 |
associated helpers. This module was originally added recently in 3.7b1. |
| 35461 |
|
| 35462 |
Build |
| 35463 |
----- |
| 35464 |
|
| 35465 |
- bpo-33614: Ensures module definition files for the stable ABI on Windows |
| 35466 |
are correctly regenerated. |
| 35467 |
|
| 35468 |
- bpo-33522: Enable CI builds on Visual Studio Team Services at |
| 35469 |
https://python.visualstudio.com/cpython |
| 35470 |
|
| 35471 |
- bpo-33012: Add ``-Wno-cast-function-type`` for gcc 8 for silencing |
| 35472 |
warnings about function casts like casting to PyCFunction in method |
| 35473 |
definition lists. |
| 35474 |
|
| 35475 |
macOS |
| 35476 |
----- |
| 35477 |
|
| 35478 |
- bpo-13631: The .editrc file in user's home directory is now processed |
| 35479 |
correctly during the readline initialization through editline emulation on |
| 35480 |
macOS. |
| 35481 |
|
| 35482 |
IDLE |
| 35483 |
---- |
| 35484 |
|
| 35485 |
- bpo-33628: IDLE: Cleanup codecontext.py and its test. |
| 35486 |
|
| 35487 |
- bpo-33564: IDLE's code context now recognizes async as a block opener. |
| 35488 |
|
| 35489 |
- bpo-32831: Add docstrings and tests for codecontext. |
| 35490 |
|
| 35491 |
|
| 35492 |
What's New in Python 3.7.0 beta 4? |
| 35493 |
================================== |
| 35494 |
|
| 35495 |
*Release date: 2018-05-02* |
| 35496 |
|
| 35497 |
Core and Builtins |
| 35498 |
----------------- |
| 35499 |
|
| 35500 |
- bpo-33363: Raise a SyntaxError for ``async with`` and ``async for`` |
| 35501 |
statements outside of async functions. |
| 35502 |
|
| 35503 |
- bpo-33128: Fix a bug that causes PathFinder to appear twice on |
| 35504 |
sys.meta_path. Patch by Pablo Galindo Salgado. |
| 35505 |
|
| 35506 |
- bpo-33312: Fixed clang ubsan (undefined behavior sanitizer) warnings in |
| 35507 |
dictobject.c by adjusting how the internal struct _dictkeysobject shared |
| 35508 |
keys structure is declared. |
| 35509 |
|
| 35510 |
- bpo-33231: Fix potential memory leak in ``normalizestring()``. |
| 35511 |
|
| 35512 |
- bpo-33205: Change dict growth function from |
| 35513 |
``round_up_to_power_2(used*2+hashtable_size/2)`` to |
| 35514 |
``round_up_to_power_2(used*3)``. Previously, dict is shrinked only when |
| 35515 |
``used == 0``. Now dict has more chance to be shrinked. |
| 35516 |
|
| 35517 |
- bpo-29922: Improved error messages in 'async with' when ``__aenter__()`` |
| 35518 |
or ``__aexit__()`` return non-awaitable object. |
| 35519 |
|
| 35520 |
- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized |
| 35521 |
when copying from key-sharing dict. |
| 35522 |
|
| 35523 |
Library |
| 35524 |
------- |
| 35525 |
|
| 35526 |
- bpo-33281: Fix ctypes.util.find_library regression on macOS. |
| 35527 |
|
| 35528 |
- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database |
| 35529 |
object when it is called with a single argument. |
| 35530 |
|
| 35531 |
- bpo-33329: Fix multiprocessing regression on newer glibcs |
| 35532 |
|
| 35533 |
- bpo-991266: Fix quoting of the ``Comment`` attribute of |
| 35534 |
:class:`http.cookies.SimpleCookie`. |
| 35535 |
|
| 35536 |
- bpo-33131: Upgrade bundled version of pip to 10.0.1. |
| 35537 |
|
| 35538 |
- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST |
| 35539 |
object to a tree of tuples or lists with ``line_info=False`` and |
| 35540 |
``col_info=True``. |
| 35541 |
|
| 35542 |
- bpo-33266: lib2to3 now recognizes ``rf'...'`` strings. |
| 35543 |
|
| 35544 |
- bpo-11594: Ensure line-endings are respected when using lib2to3. |
| 35545 |
|
| 35546 |
- bpo-33254: Have :func:`importlib.resources.contents` and |
| 35547 |
:meth:`importlib.abc.ResourceReader.contents` return an :term:`iterable` |
| 35548 |
instead of an :term:`iterator`. |
| 35549 |
|
| 35550 |
- bpo-33256: Fix display of ``<module>`` call in the html produced by |
| 35551 |
``cgitb.html()``. Patch by Stéphane Blondon. |
| 35552 |
|
| 35553 |
- bpo-33185: Fixed regression when running pydoc with the :option:`-m` |
| 35554 |
switch. (The regression was introduced in 3.7.0b3 by the resolution of |
| 35555 |
:issue:`33053`) This fix also changed pydoc to add ``os.getcwd()`` to |
| 35556 |
:data:`sys.path` when necessary, rather than adding ``"."``. |
| 35557 |
|
| 35558 |
- bpo-33169: Delete entries of ``None`` in :data:`sys.path_importer_cache` |
| 35559 |
when :meth:`importlib.machinery.invalidate_caches` is called. |
| 35560 |
|
| 35561 |
- bpo-33217: Deprecate looking up non-Enum objects in Enum classes and Enum |
| 35562 |
members (will raise :exc:`TypeError` in 3.8+). |
| 35563 |
|
| 35564 |
- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty |
| 35565 |
sequences consistently even when called from subclasses without a |
| 35566 |
``getrandbits()`` implementation. |
| 35567 |
|
| 35568 |
- bpo-33224: Update difflib.mdiff() for :pep:`479`. Convert an uncaught |
| 35569 |
StopIteration in a generator into a return-statement. |
| 35570 |
|
| 35571 |
- bpo-33209: End framing at the end of C implementation of |
| 35572 |
:func:`pickle.Pickler.dump`. |
| 35573 |
|
| 35574 |
- bpo-20104: Improved error handling and fixed a reference leak in |
| 35575 |
:func:`os.posix_spawn`. |
| 35576 |
|
| 35577 |
- bpo-33175: In dataclasses, Field.__set_name__ now looks up the |
| 35578 |
__set_name__ special method on the class, not the instance, of the default |
| 35579 |
value. |
| 35580 |
|
| 35581 |
- bpo-33097: Raise RuntimeError when ``executor.submit`` is called during |
| 35582 |
interpreter shutdown. |
| 35583 |
|
| 35584 |
- bpo-31908: Fix output of cover files for ``trace`` module command-line |
| 35585 |
tool. Previously emitted cover files only when ``--missing`` option was |
| 35586 |
used. Patch by Michael Selik. |
| 35587 |
|
| 35588 |
Documentation |
| 35589 |
------------- |
| 35590 |
|
| 35591 |
- bpo-33378: Add Korean language switcher for https://docs.python.org/3/ |
| 35592 |
|
| 35593 |
- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be |
| 35594 |
just any value. |
| 35595 |
|
| 35596 |
- bpo-33201: Modernize documentation for writing C extension types. |
| 35597 |
|
| 35598 |
- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document. |
| 35599 |
``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is |
| 35600 |
missed in the document. |
| 35601 |
|
| 35602 |
- bpo-8243: Add a note about curses.addch and curses.addstr exception |
| 35603 |
behavior when writing outside a window, or pad. |
| 35604 |
|
| 35605 |
- bpo-32337: Update documentation related with ``dict`` order. |
| 35606 |
|
| 35607 |
Tests |
| 35608 |
----- |
| 35609 |
|
| 35610 |
- bpo-33358: Fix ``test_embed.test_pre_initialization_sys_options()`` when |
| 35611 |
the interpreter is built with ``--enable-shared``. |
| 35612 |
|
| 35613 |
Build |
| 35614 |
----- |
| 35615 |
|
| 35616 |
- bpo-33394: Enable the verbose build for extension modules, when GNU make |
| 35617 |
is passed macros on the command line. |
| 35618 |
|
| 35619 |
- bpo-33393: Update config.guess and config.sub files. |
| 35620 |
|
| 35621 |
- bpo-33377: Add new triplets for mips r6 and riscv variants (used in |
| 35622 |
extension suffixes). |
| 35623 |
|
| 35624 |
- bpo-32232: By default, modules configured in ``Modules/Setup`` are no |
| 35625 |
longer built with ``-DPy_BUILD_CORE``. Instead, modules that specifically |
| 35626 |
need that preprocessor definition include it in their individual entries. |
| 35627 |
|
| 35628 |
- bpo-33182: The embedding tests can once again be built with clang 6.0 |
| 35629 |
|
| 35630 |
Windows |
| 35631 |
------- |
| 35632 |
|
| 35633 |
- bpo-33184: Update Windows installer to use OpenSSL 1.1.0h. |
| 35634 |
|
| 35635 |
macOS |
| 35636 |
----- |
| 35637 |
|
| 35638 |
- bpo-33184: Update macOS installer build to use OpenSSL 1.1.0h. |
| 35639 |
|
| 35640 |
IDLE |
| 35641 |
---- |
| 35642 |
|
| 35643 |
- bpo-21474: Update word/identifier definition from ascii to unicode. In |
| 35644 |
text and entry boxes, this affects selection by double-click, movement |
| 35645 |
left/right by control-left/right, and deletion left/right by |
| 35646 |
control-BACKSPACE/DEL. |
| 35647 |
|
| 35648 |
- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string |
| 35649 |
prefix cannot be paired with either 'r' or 'f'. Consistently color as much |
| 35650 |
of the prefix, starting at the right, as is valid. Revise and extend |
| 35651 |
colorizer test. |
| 35652 |
|
| 35653 |
Tools/Demos |
| 35654 |
----------- |
| 35655 |
|
| 35656 |
- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as |
| 35657 |
docstrings and translatable strings, and rejects bytes literals and |
| 35658 |
f-string expressions. |
| 35659 |
|
| 35660 |
- bpo-31920: Fixed handling directories as arguments in the ``pygettext`` |
| 35661 |
script. Based on patch by Oleg Krasnikov. |
| 35662 |
|
| 35663 |
- bpo-29673: Fix pystackv and pystack gdbinit macros. |
| 35664 |
|
| 35665 |
- bpo-31583: Fix 2to3 for using with --add-suffix option but without |
| 35666 |
--output-dir option for relative path to files in current directory. |
| 35667 |
|
| 35668 |
|
| 35669 |
What's New in Python 3.7.0 beta 3? |
| 35670 |
================================== |
| 35671 |
|
| 35672 |
*Release date: 2018-03-29* |
| 35673 |
|
| 35674 |
Security |
| 35675 |
-------- |
| 35676 |
|
| 35677 |
- bpo-33136: Harden ssl module against LibreSSL :cve:`2018-8970`. |
| 35678 |
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new |
| 35679 |
test ensures that NULL bytes are not allowed. |
| 35680 |
|
| 35681 |
- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows |
| 35682 |
|
| 35683 |
- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic |
| 35684 |
backtracking. These regexes formed potential DOS vectors (REDOS). They |
| 35685 |
have been refactored. This resolves :cve:`2018-1060` and :cve:`2018-1061`. |
| 35686 |
Patch by Jamie Davis. |
| 35687 |
|
| 35688 |
Core and Builtins |
| 35689 |
----------------- |
| 35690 |
|
| 35691 |
- bpo-33053: When using the -m switch, sys.path[0] is now explicitly |
| 35692 |
expanded as the *starting* working directory, rather than being left as |
| 35693 |
the empty path (which allows imports from the current working directory at |
| 35694 |
the time of the import) |
| 35695 |
|
| 35696 |
- bpo-33018: Improve consistency of errors raised by ``issubclass()`` when |
| 35697 |
called with a non-class and an abstract base class as the first and second |
| 35698 |
arguments, respectively. Patch by Josh Bronson. |
| 35699 |
|
| 35700 |
- bpo-33041: Fixed jumping when the function contains an ``async for`` loop. |
| 35701 |
|
| 35702 |
- bpo-33026: Fixed jumping out of "with" block by setting f_lineno. |
| 35703 |
|
| 35704 |
- bpo-33005: Fix a crash on fork when using a custom memory allocator (ex: |
| 35705 |
using PYTHONMALLOC env var). _PyGILState_Reinit() and |
| 35706 |
_PyInterpreterState_Enable() now use the default RAW memory allocator to |
| 35707 |
allocate a new interpreters mutex on fork. |
| 35708 |
|
| 35709 |
- bpo-17288: Prevent jumps from 'return' and 'exception' trace events. |
| 35710 |
|
| 35711 |
- bpo-32836: Don't use temporary variables in cases of list/dict/set |
| 35712 |
comprehensions |
| 35713 |
|
| 35714 |
Library |
| 35715 |
------- |
| 35716 |
|
| 35717 |
- bpo-33141: Have Field objects pass through __set_name__ to their default |
| 35718 |
values, if they have their own __set_name__. |
| 35719 |
|
| 35720 |
- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false |
| 35721 |
boolean value. Note iid=0 and iid=False would be same. Patch by Garvit |
| 35722 |
Khatri. |
| 35723 |
|
| 35724 |
- bpo-32873: Treat type variables and special typing forms as immutable by |
| 35725 |
copy and pickle. This fixes several minor issues and inconsistencies, and |
| 35726 |
improves backwards compatibility with Python 3.6. |
| 35727 |
|
| 35728 |
- bpo-33134: When computing dataclass's __hash__, use the lookup table to |
| 35729 |
contain the function which returns the __hash__ value. This is an |
| 35730 |
improvement over looking up a string, and then testing that string to see |
| 35731 |
what to do. |
| 35732 |
|
| 35733 |
- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1. |
| 35734 |
|
| 35735 |
- bpo-32505: Raise TypeError if a member variable of a dataclass is of type |
| 35736 |
Field, but doesn't have a type annotation. |
| 35737 |
|
| 35738 |
- bpo-33078: Fix the failure on OSX caused by the tests relying on |
| 35739 |
sem_getvalue |
| 35740 |
|
| 35741 |
- bpo-33116: Add 'Field' to dataclasses.__all__. |
| 35742 |
|
| 35743 |
- bpo-32896: Fix an error where subclassing a dataclass with a field that |
| 35744 |
uses a default_factory would generate an incorrect class. |
| 35745 |
|
| 35746 |
- bpo-33100: Dataclasses: If a field has a default value that's a |
| 35747 |
MemberDescriptorType, then it's from that field being in __slots__, not an |
| 35748 |
actual default value. |
| 35749 |
|
| 35750 |
- bpo-32953: If a non-dataclass inherits from a frozen dataclass, allow |
| 35751 |
attributes to be added to the derived class. Only attributes from the |
| 35752 |
frozen dataclass cannot be assigned to. Require all dataclasses in a |
| 35753 |
hierarchy to be either all frozen or all non-frozen. |
| 35754 |
|
| 35755 |
- bpo-33061: Add missing ``NoReturn`` to ``__all__`` in typing.py |
| 35756 |
|
| 35757 |
- bpo-33078: Fix the size handling in multiprocessing.Queue when a pickling |
| 35758 |
error occurs. |
| 35759 |
|
| 35760 |
- bpo-33064: lib2to3 now properly supports trailing commas after ``*args`` |
| 35761 |
and ``**kwargs`` in function signatures. |
| 35762 |
|
| 35763 |
- bpo-33056: FIX properly close leaking fds in |
| 35764 |
concurrent.futures.ProcessPoolExecutor. |
| 35765 |
|
| 35766 |
- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all |
| 35767 |
threads when calling mmap.mmap(), os.urandom(), and random.seed(). Patch |
| 35768 |
by Nir Soffer. |
| 35769 |
|
| 35770 |
- bpo-31804: Avoid failing in multiprocessing.Process if the standard |
| 35771 |
streams are closed or None at exit. |
| 35772 |
|
| 35773 |
- bpo-33037: Skip sending/receiving data after SSL transport closing. |
| 35774 |
|
| 35775 |
- bpo-27683: Fix a regression in :mod:`ipaddress` that result of |
| 35776 |
:meth:`hosts` is empty when the network is constructed by a tuple |
| 35777 |
containing an integer mask and only 1 bit left for addresses. |
| 35778 |
|
| 35779 |
- bpo-32999: Fix C implementation of ``ABC.__subclasscheck__(cls, |
| 35780 |
subclass)`` crashed when ``subclass`` is not a type object. |
| 35781 |
|
| 35782 |
- bpo-33009: Fix inspect.signature() for single-parameter partialmethods. |
| 35783 |
|
| 35784 |
- bpo-32969: Expose several missing constants in zlib and fix corresponding |
| 35785 |
documentation. |
| 35786 |
|
| 35787 |
- bpo-32056: Improved exceptions raised for invalid number of channels and |
| 35788 |
sample width when read an audio file in modules :mod:`!aifc`, :mod:`wave` |
| 35789 |
and :mod:`!sunau`. |
| 35790 |
|
| 35791 |
- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in |
| 35792 |
subprocess if another low descriptor is closed. |
| 35793 |
|
| 35794 |
- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a |
| 35795 |
:exc:`ValueError` instead of canceling the first scheduled function. |
| 35796 |
Patch by Cheryl Sabella. |
| 35797 |
|
| 35798 |
- bpo-31639: http.server now exposes a ThreadedHTTPServer class and uses it |
| 35799 |
when the module is run with ``-m`` to cope with web browsers pre-opening |
| 35800 |
sockets. |
| 35801 |
|
| 35802 |
- bpo-27645: :class:`sqlite3.Connection` now exposes a |
| 35803 |
:class:`~sqlite3.Connection.backup` method, if the underlying SQLite |
| 35804 |
library is at version 3.6.11 or higher. Patch by Lele Gaifax. |
| 35805 |
|
| 35806 |
Documentation |
| 35807 |
------------- |
| 35808 |
|
| 35809 |
- bpo-33126: Document PyBuffer_ToContiguous(). |
| 35810 |
|
| 35811 |
- bpo-27212: Modify documentation for the :func:`islice` recipe to consume |
| 35812 |
initial values up to the start index. |
| 35813 |
|
| 35814 |
- bpo-28247: Update :mod:`zipapp` documentation to describe how to make |
| 35815 |
standalone applications. |
| 35816 |
|
| 35817 |
- bpo-18802: Documentation changes for ipaddress. Patch by Jon Foster and |
| 35818 |
Berker Peksag. |
| 35819 |
|
| 35820 |
- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder`` |
| 35821 |
implements ``MetaPathFinder``. (Patch by Himanshu Lakhara) |
| 35822 |
|
| 35823 |
Tests |
| 35824 |
----- |
| 35825 |
|
| 35826 |
- bpo-32872: Avoid regrtest compatibility issue with namespace packages. |
| 35827 |
|
| 35828 |
- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport |
| 35829 |
of ``KqueueSelector`` loop was not being closed. |
| 35830 |
|
| 35831 |
- bpo-19417: Add test_bdb.py. |
| 35832 |
|
| 35833 |
Build |
| 35834 |
----- |
| 35835 |
|
| 35836 |
- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. |
| 35837 |
|
| 35838 |
Windows |
| 35839 |
------- |
| 35840 |
|
| 35841 |
- bpo-33016: Fix potential use of uninitialized memory in |
| 35842 |
nt._getfinalpathname |
| 35843 |
|
| 35844 |
- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current |
| 35845 |
directory is set to a UNC path. |
| 35846 |
|
| 35847 |
macOS |
| 35848 |
----- |
| 35849 |
|
| 35850 |
- bpo-32726: Build and link with private copy of Tcl/Tk 8.6 for the macOS |
| 35851 |
10.6+ installer. The 10.9+ installer variant already does this. This |
| 35852 |
means that the Python 3.7 provided by the python.org macOS installers no |
| 35853 |
longer need or use any external versions of Tcl/Tk, either system-provided |
| 35854 |
or user-installed, such as ActiveTcl. |
| 35855 |
|
| 35856 |
IDLE |
| 35857 |
---- |
| 35858 |
|
| 35859 |
- bpo-32984: Set ``__file__`` while running a startup file. Like Python, |
| 35860 |
IDLE optionally runs one startup file in the Shell window before |
| 35861 |
presenting the first interactive input prompt. For IDLE, ``-s`` runs a |
| 35862 |
file named in environmental variable :envvar:`IDLESTARTUP` or |
| 35863 |
:envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``. Python sets |
| 35864 |
``__file__`` to the startup file name before running the file and unsets |
| 35865 |
it before the first prompt. IDLE now does the same when run normally, |
| 35866 |
without the ``-n`` option. |
| 35867 |
|
| 35868 |
- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse. |
| 35869 |
|
| 35870 |
Tools/Demos |
| 35871 |
----------- |
| 35872 |
|
| 35873 |
- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable |
| 35874 |
automatic backup creation (files with ``~`` suffix). |
| 35875 |
|
| 35876 |
C API |
| 35877 |
----- |
| 35878 |
|
| 35879 |
- bpo-33042: Embedding applications may once again call |
| 35880 |
PySys_ResetWarnOptions, PySys_AddWarnOption, and PySys_AddXOption prior to |
| 35881 |
calling Py_Initialize. |
| 35882 |
|
| 35883 |
- bpo-32374: Document that m_traverse for multi-phase initialized modules |
| 35884 |
can be called with m_state=NULL, and add a sanity check |
| 35885 |
|
| 35886 |
|
| 35887 |
What's New in Python 3.7.0 beta 2? |
| 35888 |
================================== |
| 35889 |
|
| 35890 |
*Release date: 2018-02-27* |
| 35891 |
|
| 35892 |
Security |
| 35893 |
-------- |
| 35894 |
|
| 35895 |
- bpo-28414: The ssl module now allows users to perform their own IDN |
| 35896 |
en/decoding when using SNI. |
| 35897 |
|
| 35898 |
Core and Builtins |
| 35899 |
----------------- |
| 35900 |
|
| 35901 |
- bpo-32889: Update Valgrind suppression list to account for the rename of |
| 35902 |
``Py_ADDRESS_IN_RANG`` to ``address_in_range``. |
| 35903 |
|
| 35904 |
- bpo-31356: Remove the new API added in bpo-31356 (gc.ensure_disabled() |
| 35905 |
context manager). |
| 35906 |
|
| 35907 |
- bpo-32305: For namespace packages, ensure that both ``__file__`` and |
| 35908 |
``__spec__.origin`` are set to None. |
| 35909 |
|
| 35910 |
- bpo-32303: Make sure ``__spec__.loader`` matches ``__loader__`` for |
| 35911 |
namespace packages. |
| 35912 |
|
| 35913 |
- bpo-32711: Fix the warning messages for Python/ast_unparse.c. Patch by |
| 35914 |
Stéphane Wirtel |
| 35915 |
|
| 35916 |
- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by |
| 35917 |
write out-of-bound errors when using customized decode error handlers. |
| 35918 |
|
| 35919 |
Library |
| 35920 |
------- |
| 35921 |
|
| 35922 |
- bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen |
| 35923 |
classes, and also disallow inheriting non-frozen from frozen classes. This |
| 35924 |
restriction will be relaxed at a future date. |
| 35925 |
|
| 35926 |
- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch |
| 35927 |
by Joffrey Fuhrer. |
| 35928 |
|
| 35929 |
- bpo-32951: Direct instantiation of SSLSocket and SSLObject objects is now |
| 35930 |
prohibited. The constructors were never documented, tested, or designed as |
| 35931 |
public constructors. Users were suppose to use ssl.wrap_socket() or |
| 35932 |
SSLContext. |
| 35933 |
|
| 35934 |
- bpo-32929: Remove the tri-state parameter "hash", and add the boolean |
| 35935 |
"unsafe_hash". If unsafe_hash is True, add a __hash__ function, but if a |
| 35936 |
__hash__ exists, raise TypeError. If unsafe_hash is False, add a __hash__ |
| 35937 |
based on the values of eq= and frozen=. The unsafe_hash=False behavior is |
| 35938 |
the same as the old hash=None behavior. unsafe_hash=False is the default, |
| 35939 |
just as hash=None used to be. |
| 35940 |
|
| 35941 |
- bpo-32947: Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3 |
| 35942 |
for future compatibility with OpenSSL 1.1.1. |
| 35943 |
|
| 35944 |
- bpo-30622: The ssl module now detects missing NPN support in LibreSSL. |
| 35945 |
|
| 35946 |
- bpo-32922: dbm.open() now encodes filename with the filesystem encoding |
| 35947 |
rather than default encoding. |
| 35948 |
|
| 35949 |
- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3`` |
| 35950 |
syscall exists or not. |
| 35951 |
|
| 35952 |
- bpo-32556: nt._getfinalpathname, nt._getvolumepathname and |
| 35953 |
nt._getdiskusage now correctly convert from bytes. |
| 35954 |
|
| 35955 |
- bpo-25988: Emit a :exc:`DeprecationWarning` when using or importing an ABC |
| 35956 |
directly from :mod:`collections` rather than from :mod:`collections.abc`. |
| 35957 |
|
| 35958 |
- bpo-21060: Rewrite confusing message from setup.py upload from "No dist |
| 35959 |
file created in earlier command" to the more helpful "Must create and |
| 35960 |
upload files in one command". |
| 35961 |
|
| 35962 |
- bpo-32852: Make sure sys.argv remains as a list when running trace. |
| 35963 |
|
| 35964 |
- bpo-31333: ``_abc`` module is added. It is a speedup module with C |
| 35965 |
implementations for various functions and methods in ``abc``. Creating an |
| 35966 |
ABC subclass and calling ``isinstance`` or ``issubclass`` with an ABC |
| 35967 |
subclass are up to 1.5x faster. In addition, this makes Python start-up up |
| 35968 |
to 10% faster. Note that the new implementation hides internal registry |
| 35969 |
and caches, previously accessible via private attributes |
| 35970 |
``_abc_registry``, ``_abc_cache``, and ``_abc_negative_cache``. There are |
| 35971 |
three debugging helper methods that can be used instead |
| 35972 |
``_dump_registry``, ``_abc_registry_clear``, and ``_abc_caches_clear``. |
| 35973 |
|
| 35974 |
- bpo-32841: Fixed ``asyncio.Condition`` issue which silently ignored |
| 35975 |
cancellation after notifying and cancelling a conditional lock. Patch by |
| 35976 |
Bar Harel. |
| 35977 |
|
| 35978 |
- bpo-32819: ssl.match_hostname() has been simplified and no longer depends |
| 35979 |
on re and ipaddress module for wildcard and IP addresses. Error reporting |
| 35980 |
for invalid wildcards has been improved. |
| 35981 |
|
| 35982 |
- bpo-32394: socket: Remove |
| 35983 |
TCP_FASTOPEN,TCP_KEEPCNT,TCP_KEEPIDLE,TCP_KEEPINTVL flags on older version |
| 35984 |
Windows during run-time. |
| 35985 |
|
| 35986 |
- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules. |
| 35987 |
(Contributed by Oren Milman) |
| 35988 |
|
| 35989 |
- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when |
| 35990 |
only the last field is quoted. Patch by Jake Davis. |
| 35991 |
|
| 35992 |
- bpo-32792: collections.ChainMap() preserves the order of the underlying |
| 35993 |
mappings. |
| 35994 |
|
| 35995 |
- bpo-32775: :func:`fnmatch.translate` no longer produces patterns which |
| 35996 |
contain set operations. Sets starting with '[' or containing '--', '&&', |
| 35997 |
'~~' or '||' will be interpreted differently in regular expressions in |
| 35998 |
future versions. Currently they emit warnings. fnmatch.translate() now |
| 35999 |
avoids producing patterns containing such sets by accident. |
| 36000 |
|
| 36001 |
- bpo-32622: Implement native fast sendfile for Windows proactor event loop. |
| 36002 |
|
| 36003 |
- bpo-32777: Fix a rare but potential pre-exec child process deadlock in |
| 36004 |
subprocess on POSIX systems when marking file descriptors inheritable on |
| 36005 |
exec in the child process. This bug appears to have been introduced in |
| 36006 |
3.4. |
| 36007 |
|
| 36008 |
- bpo-32647: The ctypes module used to depend on indirect linking for |
| 36009 |
dlopen. The shared extension is now explicitly linked against libdl on |
| 36010 |
platforms with dl. |
| 36011 |
|
| 36012 |
- bpo-32741: Implement ``asyncio.TimerHandle.when()`` method. |
| 36013 |
|
| 36014 |
- bpo-32691: Use mod_spec.parent when running modules with pdb |
| 36015 |
|
| 36016 |
- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring |
| 36017 |
and locking the same lock multiple times, without it being free. Patch by |
| 36018 |
Bar Harel. |
| 36019 |
|
| 36020 |
- bpo-32727: Do not include name field in SMTP envelope from address. Patch |
| 36021 |
by Stéphane Wirtel |
| 36022 |
|
| 36023 |
- bpo-31453: Add TLSVersion constants and SSLContext.maximum_version / |
| 36024 |
minimum_version attributes. The new API wraps OpenSSL 1.1 |
| 36025 |
https://web.archive.org/web/20180309043602/https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html |
| 36026 |
feature. |
| 36027 |
|
| 36028 |
- bpo-24334: Internal implementation details of ssl module were cleaned up. |
| 36029 |
The SSLSocket has one less layer of indirection. Owner and session |
| 36030 |
information are now handled by the SSLSocket and SSLObject constructor. |
| 36031 |
Channel binding implementation has been simplified. |
| 36032 |
|
| 36033 |
- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND |
| 36034 |
chunk is not found. Patch by Zackery Spytz. |
| 36035 |
|
| 36036 |
- bpo-32585: Add Ttk spinbox widget to :mod:`tkinter.ttk`. Patch by Alan D |
| 36037 |
Moore. |
| 36038 |
|
| 36039 |
- bpo-32221: Various functions returning tuple containing IPv6 addresses now |
| 36040 |
omit ``%scope`` part since the same information is already encoded in |
| 36041 |
*scopeid* tuple item. Especially this speeds up :func:`socket.recvfrom` |
| 36042 |
when it receives multicast packet since useless resolving of network |
| 36043 |
interface name is omitted. |
| 36044 |
|
| 36045 |
- bpo-30693: The TarFile class now recurses directories in a reproducible |
| 36046 |
way. |
| 36047 |
|
| 36048 |
- bpo-30693: The ZipFile class now recurses directories in a reproducible |
| 36049 |
way. |
| 36050 |
|
| 36051 |
Documentation |
| 36052 |
------------- |
| 36053 |
|
| 36054 |
- bpo-28124: The ssl module function ssl.wrap_socket() has been |
| 36055 |
de-emphasized and deprecated in favor of the more secure and efficient |
| 36056 |
SSLContext.wrap_socket() method. |
| 36057 |
|
| 36058 |
- bpo-17232: Clarify docs for -O and -OO. Patch by Terry Reedy. |
| 36059 |
|
| 36060 |
- bpo-32436: Add documentation for the contextvars module (PEP 567). |
| 36061 |
|
| 36062 |
- bpo-32800: Update link to w3c doc for xml default namespaces. |
| 36063 |
|
| 36064 |
- bpo-11015: Update :mod:`test.support` documentation. |
| 36065 |
|
| 36066 |
- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get` |
| 36067 |
method raises :exc:`AttributeError`. |
| 36068 |
|
| 36069 |
- bpo-32614: Modify RE examples in documentation to use raw strings to |
| 36070 |
prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight |
| 36071 |
the deprecation. |
| 36072 |
|
| 36073 |
- bpo-31972: Improve docstrings for ``pathlib.PurePath`` subclasses. |
| 36074 |
|
| 36075 |
Tests |
| 36076 |
----- |
| 36077 |
|
| 36078 |
- bpo-31809: Add tests to verify connection with secp ECDH curves. |
| 36079 |
|
| 36080 |
Build |
| 36081 |
----- |
| 36082 |
|
| 36083 |
- bpo-32898: Fix the python debug build when using COUNT_ALLOCS. |
| 36084 |
|
| 36085 |
Windows |
| 36086 |
------- |
| 36087 |
|
| 36088 |
- bpo-32901: Update Tcl and Tk versions to 8.6.8 |
| 36089 |
|
| 36090 |
- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. |
| 36091 |
|
| 36092 |
- bpo-32409: Ensures activate.bat can handle Unicode contents. |
| 36093 |
|
| 36094 |
- bpo-32457: Improves handling of denormalized executable path when |
| 36095 |
launching Python. |
| 36096 |
|
| 36097 |
- bpo-32370: Use the correct encoding for ipconfig output in the uuid |
| 36098 |
module. Patch by Segev Finer. |
| 36099 |
|
| 36100 |
- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly |
| 36101 |
treating the ``PrintNameOffset`` field of the reparse data buffer as a |
| 36102 |
number of characters instead of bytes. Patch by Craig Holmquist and SSE4. |
| 36103 |
|
| 36104 |
macOS |
| 36105 |
----- |
| 36106 |
|
| 36107 |
- bpo-32901: Update macOS 10.9+ installer to Tcl/Tk 8.6.8. |
| 36108 |
|
| 36109 |
IDLE |
| 36110 |
---- |
| 36111 |
|
| 36112 |
- bpo-32916: Change ``str`` to ``code`` in pyparse. |
| 36113 |
|
| 36114 |
- bpo-32905: Remove unused code in pyparse module. |
| 36115 |
|
| 36116 |
- bpo-32874: Add tests for pyparse. |
| 36117 |
|
| 36118 |
- bpo-32837: Using the system and place-dependent default encoding for |
| 36119 |
open() is a bad idea for IDLE's system and location-independent files. |
| 36120 |
|
| 36121 |
- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI |
| 36122 |
test test_file_buttons() only looks at initial ascii-only lines, but |
| 36123 |
failed on systems where open() defaults to 'ascii' because readline() |
| 36124 |
internally reads and decodes far enough ahead to encounter a non-ascii |
| 36125 |
character in CREDITS.txt. |
| 36126 |
|
| 36127 |
- bpo-32765: Update configdialog General tab docstring to add new widgets to |
| 36128 |
the widget list. |
| 36129 |
|
| 36130 |
Tools/Demos |
| 36131 |
----------- |
| 36132 |
|
| 36133 |
- bpo-32222: Fix pygettext not extracting docstrings for functions with type |
| 36134 |
annotated arguments. Patch by Toby Harradine. |
| 36135 |
|
| 36136 |
|
| 36137 |
What's New in Python 3.7.0 beta 1? |
| 36138 |
================================== |
| 36139 |
|
| 36140 |
*Release date: 2018-01-30* |
| 36141 |
|
| 36142 |
Core and Builtins |
| 36143 |
----------------- |
| 36144 |
|
| 36145 |
- bpo-32703: Fix coroutine's ResourceWarning when there's an active error |
| 36146 |
set when it's being finalized. |
| 36147 |
|
| 36148 |
- bpo-32650: Pdb and other debuggers dependent on bdb.py will correctly step |
| 36149 |
over (next command) native coroutines. Patch by Pablo Galindo. |
| 36150 |
|
| 36151 |
- bpo-28685: Optimize list.sort() and sorted() by using type specialized |
| 36152 |
comparisons when possible. |
| 36153 |
|
| 36154 |
- bpo-32685: Improve suggestion when the Python 2 form of print statement is |
| 36155 |
either present on the same line as the header of a compound statement or |
| 36156 |
else terminated by a semi-colon instead of a newline. Patch by Nitish |
| 36157 |
Chandra. |
| 36158 |
|
| 36159 |
- bpo-32697: Python now explicitly preserves the definition order of |
| 36160 |
keyword-only parameters. It's always preserved their order, but this |
| 36161 |
behavior was never guaranteed before; this behavior is now guaranteed and |
| 36162 |
tested. |
| 36163 |
|
| 36164 |
- bpo-32690: The locals() dictionary now displays in the lexical order that |
| 36165 |
variables were defined. Previously, the order was reversed. |
| 36166 |
|
| 36167 |
- bpo-32677: Add ``.isascii()`` method to ``str``, ``bytes`` and |
| 36168 |
``bytearray``. It can be used to test that string contains only ASCII |
| 36169 |
characters. |
| 36170 |
|
| 36171 |
- bpo-32670: Enforce :pep:`479` for all code. This means that manually |
| 36172 |
raising a StopIteration exception from a generator is prohibited for all |
| 36173 |
code, regardless of whether 'from __future__ import generator_stop' was |
| 36174 |
used or not. |
| 36175 |
|
| 36176 |
- bpo-32591: Added built-in support for tracking the origin of coroutine |
| 36177 |
objects; see sys.set_coroutine_origin_tracking_depth and |
| 36178 |
CoroutineType.cr_origin. This replaces the asyncio debug mode's use of |
| 36179 |
coroutine wrapping for native coroutine objects. |
| 36180 |
|
| 36181 |
- bpo-31368: Expose preadv and pwritev system calls in the os module. Patch |
| 36182 |
by Pablo Galindo |
| 36183 |
|
| 36184 |
- bpo-32544: ``hasattr(obj, name)`` and ``getattr(obj, name, default)`` are |
| 36185 |
about 4 times faster than before when ``name`` is not found and ``obj`` |
| 36186 |
doesn't override ``__getattr__`` or ``__getattribute__``. |
| 36187 |
|
| 36188 |
- bpo-26163: Improved frozenset() hash to create more distinct hash values |
| 36189 |
when faced with datasets containing many similar values. |
| 36190 |
|
| 36191 |
- bpo-32550: Remove the STORE_ANNOTATION bytecode. |
| 36192 |
|
| 36193 |
- bpo-20104: Expose posix_spawn as a low level API in the os module. |
| 36194 |
(removed before 3.7.0rc1) |
| 36195 |
|
| 36196 |
- bpo-24340: Fixed estimation of the code stack size. |
| 36197 |
|
| 36198 |
- bpo-32436: Implement :pep:`567` Context Variables. |
| 36199 |
|
| 36200 |
- bpo-18533: ``repr()`` on a dict containing its own ``values()`` or |
| 36201 |
``items()`` no longer raises ``RecursionError``; OrderedDict similarly. |
| 36202 |
Instead, use ``...``, as for other recursive structures. Patch by Ben |
| 36203 |
North. |
| 36204 |
|
| 36205 |
- bpo-20891: Py_Initialize() now creates the GIL. The GIL is no longer |
| 36206 |
created "on demand" to fix a race condition when PyGILState_Ensure() is |
| 36207 |
called in a non-Python thread. |
| 36208 |
|
| 36209 |
- bpo-32028: Leading whitespace is now correctly ignored when generating |
| 36210 |
suggestions for converting Py2 print statements to Py3 builtin print |
| 36211 |
function calls. Patch by Sanyam Khurana. |
| 36212 |
|
| 36213 |
- bpo-31179: Make dict.copy() up to 5.5 times faster. |
| 36214 |
|
| 36215 |
- bpo-31113: Get rid of recursion in the compiler for normal control flow. |
| 36216 |
|
| 36217 |
Library |
| 36218 |
------- |
| 36219 |
|
| 36220 |
- bpo-25988: Deprecate exposing the contents of collections.abc in the |
| 36221 |
regular collections module. |
| 36222 |
|
| 36223 |
- bpo-31429: The default cipher suite selection of the ssl module now uses a |
| 36224 |
blacklist approach rather than a hard-coded whitelist. Python no longer |
| 36225 |
re-enables ciphers that have been blocked by OpenSSL security update. |
| 36226 |
Default cipher suite selection can be configured on compile time. |
| 36227 |
|
| 36228 |
- bpo-30306: contextlib.contextmanager now releases the arguments passed to |
| 36229 |
the underlying generator as soon as the context manager is entered. |
| 36230 |
Previously it would keep them alive for as long as the context manager was |
| 36231 |
alive, even when not being used as a function decorator. Patch by Martin |
| 36232 |
Teichmann. |
| 36233 |
|
| 36234 |
- bpo-21417: Added support for setting the compression level for |
| 36235 |
zipfile.ZipFile. |
| 36236 |
|
| 36237 |
- bpo-32251: Implement asyncio.BufferedProtocol (provisional API). |
| 36238 |
|
| 36239 |
- bpo-32513: In dataclasses, allow easier overriding of dunder methods |
| 36240 |
without specifying decorator parameters. |
| 36241 |
|
| 36242 |
- bpo-32660: :mod:`termios` makes available ``FIONREAD``, ``FIONCLEX``, |
| 36243 |
``FIOCLEX``, ``FIOASYNC`` and ``FIONBIO`` also under Solaris/derivatives. |
| 36244 |
|
| 36245 |
- bpo-27931: Fix email address header parsing error when the username is an |
| 36246 |
empty quoted string. Patch by Xiang Zhang. |
| 36247 |
|
| 36248 |
- bpo-32659: Under Solaris and derivatives, :class:`os.stat_result` provides |
| 36249 |
a st_fstype attribute. |
| 36250 |
|
| 36251 |
- bpo-32662: Implement Server.start_serving(), Server.serve_forever(), and |
| 36252 |
Server.is_serving() methods. Add 'start_serving' keyword parameter to |
| 36253 |
loop.create_server() and loop.create_unix_server(). |
| 36254 |
|
| 36255 |
- bpo-32391: Implement :meth:`asyncio.StreamWriter.wait_closed` and |
| 36256 |
:meth:`asyncio.StreamWriter.is_closing` methods |
| 36257 |
|
| 36258 |
- bpo-32643: Make Task._step, Task._wakeup and Future._schedule_callbacks |
| 36259 |
methods private. |
| 36260 |
|
| 36261 |
- bpo-32630: Refactor decimal module to use contextvars to store decimal |
| 36262 |
context. |
| 36263 |
|
| 36264 |
- bpo-32622: Add :meth:`asyncio.AbstractEventLoop.sendfile` method. |
| 36265 |
|
| 36266 |
- bpo-32304: distutils' upload command no longer corrupts tar files ending |
| 36267 |
with a CR byte, and no longer tries to convert CR to CRLF in any of the |
| 36268 |
upload text fields. |
| 36269 |
|
| 36270 |
- bpo-32502: uuid.uuid1 no longer raises an exception if a 64-bit hardware |
| 36271 |
address is encountered. |
| 36272 |
|
| 36273 |
- bpo-32596: ``concurrent.futures`` imports ``ThreadPoolExecutor`` and |
| 36274 |
``ProcessPoolExecutor`` lazily (using :pep:`562`). It makes ``import |
| 36275 |
asyncio`` about 15% faster because asyncio uses only |
| 36276 |
``ThreadPoolExecutor`` by default. |
| 36277 |
|
| 36278 |
- bpo-31801: Add ``_ignore_`` to ``Enum`` so temporary variables can be used |
| 36279 |
during class construction without being turned into members. |
| 36280 |
|
| 36281 |
- bpo-32576: Use queue.SimpleQueue() in places where it can be invoked from |
| 36282 |
a weakref callback. |
| 36283 |
|
| 36284 |
- bpo-32574: Fix memory leak in asyncio.Queue, when the queue has limited |
| 36285 |
size and it is full, the cancelation of queue.put() can cause a memory |
| 36286 |
leak. Patch by: José Melero. |
| 36287 |
|
| 36288 |
- bpo-32521: The nis module is now compatible with new libnsl and headers |
| 36289 |
location. |
| 36290 |
|
| 36291 |
- bpo-32467: collections.abc.ValuesView now inherits from |
| 36292 |
collections.abc.Collection. |
| 36293 |
|
| 36294 |
- bpo-32473: Improve ABCMeta._dump_registry() output readability |
| 36295 |
|
| 36296 |
- bpo-32102: New argument ``capture_output`` for subprocess.run |
| 36297 |
|
| 36298 |
- bpo-32521: glibc has removed Sun RPC. Use replacement libtirpc headers and |
| 36299 |
library in nis module. |
| 36300 |
|
| 36301 |
- bpo-32493: UUID module fixes build for FreeBSD/OpenBSD |
| 36302 |
|
| 36303 |
- bpo-32503: Pickling with protocol 4 no longer creates too small frames. |
| 36304 |
|
| 36305 |
- bpo-29237: Create enum for pstats sorting options |
| 36306 |
|
| 36307 |
- bpo-32454: Add close(fd) function to the socket module. |
| 36308 |
|
| 36309 |
- bpo-25942: The subprocess module is now more graceful when handling a |
| 36310 |
Ctrl-C KeyboardInterrupt during subprocess.call, subprocess.run, or a |
| 36311 |
Popen context manager. It now waits a short amount of time for the child |
| 36312 |
(presumed to have also gotten the SIGINT) to exit, before continuing the |
| 36313 |
KeyboardInterrupt exception handling. This still includes a SIGKILL in |
| 36314 |
the call() and run() APIs, but at least the child had a chance first. |
| 36315 |
|
| 36316 |
- bpo-32433: The hmac module now has hmac.digest(), which provides an |
| 36317 |
optimized HMAC digest. |
| 36318 |
|
| 36319 |
- bpo-28134: Sockets now auto-detect family, type and protocol from file |
| 36320 |
descriptor by default. |
| 36321 |
|
| 36322 |
- bpo-32404: Fix bug where :meth:`datetime.datetime.fromtimestamp` did not |
| 36323 |
call __new__ in :class:`datetime.datetime` subclasses. |
| 36324 |
|
| 36325 |
- bpo-32403: Improved speed of :class:`datetime.date` and |
| 36326 |
:class:`datetime.datetime` alternate constructors. |
| 36327 |
|
| 36328 |
- bpo-32228: Ensure that ``truncate()`` preserves the file position (as |
| 36329 |
reported by ``tell()``) after writes longer than the buffer size. |
| 36330 |
|
| 36331 |
- bpo-32410: Implement ``loop.sock_sendfile`` for asyncio event loop. |
| 36332 |
|
| 36333 |
- bpo-22908: Added seek and tell to the ZipExtFile class. This only works if |
| 36334 |
the file object used to open the zipfile is seekable. |
| 36335 |
|
| 36336 |
- bpo-32373: Add socket.getblocking() method. |
| 36337 |
|
| 36338 |
- bpo-32248: Add :mod:`importlib.resources` and |
| 36339 |
:class:`importlib.abc.ResourceReader` as the unified API for reading |
| 36340 |
resources contained within packages. Loaders wishing to support resource |
| 36341 |
reading must implement the :meth:`get_resource_reader` method. File-based |
| 36342 |
and zipimport-based loaders both implement these APIs. |
| 36343 |
:class:`importlib.abc.ResourceLoader` is deprecated in favor of these new |
| 36344 |
APIs. |
| 36345 |
|
| 36346 |
- bpo-32320: collections.namedtuple() now supports default values. |
| 36347 |
|
| 36348 |
- bpo-29302: Add contextlib.AsyncExitStack. Patch by Alexander Mohr and Ilya |
| 36349 |
Kulakov. |
| 36350 |
|
| 36351 |
- bpo-31961: *Removed in Python 3.7.0b2.* The *args* argument of |
| 36352 |
subprocess.Popen can now be a :term:`path-like object`. If *args* is given |
| 36353 |
as a sequence, it's first element can now be a :term:`path-like object` as |
| 36354 |
well. |
| 36355 |
|
| 36356 |
- bpo-31900: The :func:`locale.localeconv` function now sets temporarily the |
| 36357 |
``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode |
| 36358 |
``decimal_point`` and ``thousands_sep`` byte strings if they are non-ASCII |
| 36359 |
or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the |
| 36360 |
``LC_CTYPE`` locale. This temporary change affects other threads. Same |
| 36361 |
change for the :meth:`str.format` method when formatting a number |
| 36362 |
(:class:`int`, :class:`float`, :class:`float` and subclasses) with the |
| 36363 |
``n`` type (ex: ``'{:n}'.format(1234)``). |
| 36364 |
|
| 36365 |
- bpo-31853: Use super().method instead of socket.method in SSLSocket. They |
| 36366 |
were there most likely for legacy reasons. |
| 36367 |
|
| 36368 |
- bpo-31399: The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() |
| 36369 |
and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. |
| 36370 |
Subject common name fallback can be disabled with |
| 36371 |
SSLContext.hostname_checks_common_name. |
| 36372 |
|
| 36373 |
- bpo-14976: Add a queue.SimpleQueue class, an unbounded FIFO queue with a |
| 36374 |
reentrant C implementation of put(). |
| 36375 |
|
| 36376 |
Documentation |
| 36377 |
------------- |
| 36378 |
|
| 36379 |
- bpo-32724: Add references to some commands in the documentation of Pdb. |
| 36380 |
Patch by Stéphane Wirtel |
| 36381 |
|
| 36382 |
- bpo-32649: Complete the C API documentation, profiling and tracing part |
| 36383 |
with the newly added per-opcode events. |
| 36384 |
|
| 36385 |
- bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile and |
| 36386 |
their C-API counterparts regarding which type of events are received in |
| 36387 |
each function. Patch by Pablo Galindo Salgado. |
| 36388 |
|
| 36389 |
Tests |
| 36390 |
----- |
| 36391 |
|
| 36392 |
- bpo-32721: Fix test_hashlib to not fail if the _md5 module is not built. |
| 36393 |
|
| 36394 |
- bpo-28414: Add test cases for IDNA 2003 and 2008 host names. IDNA 2003 |
| 36395 |
internationalized host names are working since bpo-31399 has landed. IDNA |
| 36396 |
2008 are still broken. |
| 36397 |
|
| 36398 |
- bpo-32604: Add a new "_xxsubinterpreters" extension module that exposes |
| 36399 |
the existing subinterpreter C-API and a new cross-interpreter data sharing |
| 36400 |
mechanism. The module is primarily intended for more thorough testing of |
| 36401 |
the existing subinterpreter support. Note that the _xxsubinterpreters |
| 36402 |
module has been removed in 3.7.0rc1. |
| 36403 |
|
| 36404 |
- bpo-32602: Add test certs and test for ECDSA cert and EC/RSA dual mode. |
| 36405 |
|
| 36406 |
- bpo-32549: On Travis CI, Python now Compiles and uses a local copy of |
| 36407 |
OpenSSL 1.1.0g for testing. |
| 36408 |
|
| 36409 |
Build |
| 36410 |
----- |
| 36411 |
|
| 36412 |
- bpo-32635: Fix segfault of the crypt module when libxcrypt is provided |
| 36413 |
instead of libcrypt at the system. |
| 36414 |
|
| 36415 |
- bpo-32598: Use autoconf to detect OpenSSL libs, headers and supported |
| 36416 |
features. The ax_check_openssl M4 macro uses pkg-config to locate OpenSSL |
| 36417 |
and falls back to manual search. |
| 36418 |
|
| 36419 |
- bpo-32593: Drop support of FreeBSD 9 and older. |
| 36420 |
|
| 36421 |
- bpo-29708: If the :envvar:`SOURCE_DATE_EPOCH` environment variable is set, |
| 36422 |
:mod:`py_compile` will always create hash-based ``.pyc`` files. |
| 36423 |
|
| 36424 |
Windows |
| 36425 |
------- |
| 36426 |
|
| 36427 |
- bpo-32588: Create standalone _distutils_findvs module and add missing |
| 36428 |
_queue module to installer. |
| 36429 |
|
| 36430 |
- bpo-29911: Ensure separate Modify and Uninstall buttons are displayed. |
| 36431 |
|
| 36432 |
- bpo-32507: Use app-local UCRT install rather than the proper update for |
| 36433 |
old versions of Windows. |
| 36434 |
|
| 36435 |
macOS |
| 36436 |
----- |
| 36437 |
|
| 36438 |
- bpo-32726: Provide an additional, more modern macOS installer variant that |
| 36439 |
supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied |
| 36440 |
third-party libraries to OpenSSL 1.1.0g and to SQLite 3.22.0. The 10.9+ |
| 36441 |
installer now links with and supplies its own copy of Tcl/Tk 8.6. |
| 36442 |
|
| 36443 |
- bpo-28440: No longer add /Library/Python/3.x/site-packages to sys.path for |
| 36444 |
macOS framework builds to avoid future conflicts. |
| 36445 |
|
| 36446 |
C API |
| 36447 |
----- |
| 36448 |
|
| 36449 |
- bpo-32681: Fix uninitialized variable 'res' in the C implementation of |
| 36450 |
os.dup2. Patch by Stéphane Wirtel |
| 36451 |
|
| 36452 |
- bpo-10381: Add C API access to the ``datetime.timezone`` constructor and |
| 36453 |
``datetime.timzone.UTC`` singleton. |
| 36454 |
|
| 36455 |
|
| 36456 |
What's New in Python 3.7.0 alpha 4? |
| 36457 |
=================================== |
| 36458 |
|
| 36459 |
*Release date: 2018-01-08* |
| 36460 |
|
| 36461 |
Core and Builtins |
| 36462 |
----------------- |
| 36463 |
|
| 36464 |
- bpo-31975: The default warning filter list now starts with a |
| 36465 |
"default::DeprecationWarning:__main__" entry, so deprecation warnings are |
| 36466 |
once again shown by default in single-file scripts and at the interactive |
| 36467 |
prompt. |
| 36468 |
|
| 36469 |
- bpo-32226: ``__class_getitem__`` is now an automatic class method. |
| 36470 |
|
| 36471 |
- bpo-32399: Add AIX uuid library support for RFC4122 using uuid_create() in |
| 36472 |
libc.a |
| 36473 |
|
| 36474 |
- bpo-32390: Fix the compilation failure on AIX after the f_fsid field has |
| 36475 |
been added to the object returned by os.statvfs() (issue #32143). Original |
| 36476 |
patch by Michael Felt. |
| 36477 |
|
| 36478 |
- bpo-32379: Make MRO computation faster when a class inherits from a single |
| 36479 |
base. |
| 36480 |
|
| 36481 |
- bpo-32259: The error message of a TypeError raised when unpack |
| 36482 |
non-iterable is now more specific. |
| 36483 |
|
| 36484 |
- bpo-27169: The ``__debug__`` constant is now optimized out at compile |
| 36485 |
time. This fixes also bpo-22091. |
| 36486 |
|
| 36487 |
- bpo-32329: The :option:`-R` option now turns on hash randomization when |
| 36488 |
the :envvar:`PYTHONHASHSEED` environment variable is set to ``0``. |
| 36489 |
Previously, the option was ignored. Moreover, |
| 36490 |
``sys.flags.hash_randomization`` is now properly set to 0 when hash |
| 36491 |
randomization is turned off by ``PYTHONHASHSEED=0``. |
| 36492 |
|
| 36493 |
- bpo-30416: The optimizer is now protected from spending much time doing |
| 36494 |
complex calculations and consuming much memory for creating large |
| 36495 |
constants in constant folding. Increased limits for constants that can be |
| 36496 |
produced in constant folding. |
| 36497 |
|
| 36498 |
- bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in |
| 36499 |
socketmodule on Windows. |
| 36500 |
|
| 36501 |
- bpo-30579: Implement TracebackType.__new__ to allow Python-level creation |
| 36502 |
of traceback objects, and make TracebackType.tb_next mutable. |
| 36503 |
|
| 36504 |
- bpo-32260: Don't byte swap the input keys to the SipHash algorithm on |
| 36505 |
big-endian platforms. This should ensure siphash gives consistent results |
| 36506 |
across platforms. |
| 36507 |
|
| 36508 |
- bpo-31506: Improve the error message logic for object.__new__ and |
| 36509 |
object.__init__. Patch by Sanyam Khurana. |
| 36510 |
|
| 36511 |
- bpo-20361: ``-b`` and ``-bb`` now inject ``'default::BytesWarning'`` and |
| 36512 |
``error::BytesWarning`` entries into ``sys.warnoptions``, ensuring that |
| 36513 |
they take precedence over any other warning filters configured via the |
| 36514 |
``-W`` option or the ``PYTHONWARNINGS`` environment variable. |
| 36515 |
|
| 36516 |
- bpo-32230: ``-X dev`` now injects a ``'default'`` entry into |
| 36517 |
sys.warnoptions, ensuring that it behaves identically to actually passing |
| 36518 |
``-Wdefault`` at the command line. |
| 36519 |
|
| 36520 |
- bpo-29240: Add a new UTF-8 mode: implementation of the :pep:`540`. |
| 36521 |
|
| 36522 |
- bpo-32226: :pep:`560`: Add support for ``__mro_entries__`` and |
| 36523 |
``__class_getitem__``. Implemented by Ivan Levkivskyi. |
| 36524 |
|
| 36525 |
- bpo-32225: :pep:`562`: Add support for module ``__getattr__`` and |
| 36526 |
``__dir__``. Implemented by Ivan Levkivskyi. |
| 36527 |
|
| 36528 |
- bpo-31901: The ``atexit`` module now has its callback stored per |
| 36529 |
interpreter. |
| 36530 |
|
| 36531 |
- bpo-31650: Implement :pep:`552` (Deterministic pycs). Python now supports |
| 36532 |
invalidating bytecode cache files bashed on a source content hash rather |
| 36533 |
than source last-modified time. |
| 36534 |
|
| 36535 |
- bpo-29469: Move constant folding from bytecode layer to AST layer. |
| 36536 |
Original patch by Eugene Toder. |
| 36537 |
|
| 36538 |
Library |
| 36539 |
------- |
| 36540 |
|
| 36541 |
- bpo-32506: Now that dict is defined as keeping insertion order, drop |
| 36542 |
OrderedDict and just use plain dict. |
| 36543 |
|
| 36544 |
- bpo-32279: Add params to dataclasses.make_dataclasses(): init, repr, eq, |
| 36545 |
order, hash, and frozen. Pass them through to dataclass(). |
| 36546 |
|
| 36547 |
- bpo-32278: Make type information optional on dataclasses.make_dataclass(). |
| 36548 |
If omitted, the string 'typing.Any' is used. |
| 36549 |
|
| 36550 |
- bpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is |
| 36551 |
a dataclass or an instance of one. |
| 36552 |
|
| 36553 |
- bpo-32468: Improve frame repr() to mention filename, code name and current |
| 36554 |
line number. |
| 36555 |
|
| 36556 |
- bpo-23749: asyncio: Implement loop.start_tls() |
| 36557 |
|
| 36558 |
- bpo-32441: Return the new file descriptor (i.e., the second argument) from |
| 36559 |
``os.dup2``. Previously, ``None`` was always returned. |
| 36560 |
|
| 36561 |
- bpo-32422: ``functools.lru_cache`` uses less memory (3 words for each |
| 36562 |
cached key) and takes about 1/3 time for cyclic GC. |
| 36563 |
|
| 36564 |
- bpo-31721: Prevent Python crash from happening when Future._log_traceback |
| 36565 |
is set to True manually. Now it can only be set to False, or a ValueError |
| 36566 |
is raised. |
| 36567 |
|
| 36568 |
- bpo-32415: asyncio: Add Task.get_loop() and Future.get_loop() |
| 36569 |
|
| 36570 |
- bpo-26133: Don't unsubscribe signals in asyncio UNIX event loop on |
| 36571 |
interpreter shutdown. |
| 36572 |
|
| 36573 |
- bpo-32363: Make asyncio.Task.set_exception() and set_result() raise |
| 36574 |
NotImplementedError. Task._step() and Future.__await__() raise proper |
| 36575 |
exceptions when they are in an invalid state, instead of raising an |
| 36576 |
AssertionError. |
| 36577 |
|
| 36578 |
- bpo-32357: Optimize asyncio.iscoroutine() and loop.create_task() for |
| 36579 |
non-native coroutines (e.g. async/await compiled with Cython). |
| 36580 |
'loop.create_task(python_coroutine)' used to be 20% faster than |
| 36581 |
'loop.create_task(cython_coroutine)'. Now, the latter is as fast. |
| 36582 |
|
| 36583 |
- bpo-32356: asyncio.transport.resume_reading() and pause_reading() are now |
| 36584 |
idempotent. New transport.is_reading() method is added. |
| 36585 |
|
| 36586 |
- bpo-32355: Optimize asyncio.gather(); now up to 15% faster. |
| 36587 |
|
| 36588 |
- bpo-32351: Use fastpath in asyncio.sleep if delay<0 (2x boost) |
| 36589 |
|
| 36590 |
- bpo-32348: Optimize asyncio.Future schedule/add/remove callback. The |
| 36591 |
optimization shows 3-6% performance improvements of async/await code. |
| 36592 |
|
| 36593 |
- bpo-32331: Fix socket.settimeout() and socket.setblocking() to keep |
| 36594 |
socket.type as is. Fix socket.socket() constructor to reset any bit flags |
| 36595 |
applied to socket's type. This change only affects OSes that have |
| 36596 |
SOCK_NONBLOCK and/or SOCK_CLOEXEC. |
| 36597 |
|
| 36598 |
- bpo-32248: Add :class:`importlib.abc.ResourceReader` as an ABC for loaders |
| 36599 |
to provide a unified API for reading resources contained within packages. |
| 36600 |
Also add :mod:`importlib.resources` as the port of |
| 36601 |
``importlib_resources``. |
| 36602 |
|
| 36603 |
- bpo-32311: Implement asyncio.create_task(coro) shortcut |
| 36604 |
|
| 36605 |
- bpo-32327: Convert asyncio functions that were documented as coroutines to |
| 36606 |
coroutines. Affected functions: loop.sock_sendall, loop.sock_recv, |
| 36607 |
loop.sock_accept, loop.getaddrinfo, loop.getnameinfo. |
| 36608 |
|
| 36609 |
- bpo-32323: :func:`urllib.parse.urlsplit` does not convert zone-id (scope) |
| 36610 |
to lower case for scoped IPv6 addresses in hostnames now. |
| 36611 |
|
| 36612 |
- bpo-32302: Fix bdist_wininst of distutils for CRT v142: it binary |
| 36613 |
compatible with CRT v140. |
| 36614 |
|
| 36615 |
- bpo-29711: Fix ``stop_serving`` in asyncio proactor loop kill all |
| 36616 |
listening servers |
| 36617 |
|
| 36618 |
- bpo-32308: :func:`re.sub` now replaces empty matches adjacent to a |
| 36619 |
previous non-empty match. |
| 36620 |
|
| 36621 |
- bpo-29970: Abort asyncio SSLProtocol connection if handshake not complete |
| 36622 |
within 10 seconds. |
| 36623 |
|
| 36624 |
- bpo-32314: Implement asyncio.run(). |
| 36625 |
|
| 36626 |
- bpo-17852: Revert incorrect fix based on misunderstanding of |
| 36627 |
_Py_PyAtExit() semantics. |
| 36628 |
|
| 36629 |
- bpo-32296: Implement asyncio._get_running_loop() and get_event_loop() in |
| 36630 |
C. This makes them 4x faster. |
| 36631 |
|
| 36632 |
- bpo-32250: Implement ``asyncio.current_task()`` and |
| 36633 |
``asyncio.all_tasks()``. Add helpers intended to be used by alternative |
| 36634 |
task implementations: ``asyncio._register_task``, ``asyncio._enter_task``, |
| 36635 |
``asyncio._leave_task`` and ``asyncio._unregister_task``. Deprecate |
| 36636 |
``asyncio.Task.current_task()`` and ``asyncio.Task.all_tasks()``. |
| 36637 |
|
| 36638 |
- bpo-32255: A single empty field is now always quoted when written into a |
| 36639 |
CSV file. This allows to distinguish an empty row from a row consisting of |
| 36640 |
a single empty field. Patch by Licht Takeuchi. |
| 36641 |
|
| 36642 |
- bpo-32277: Raise ``NotImplementedError`` instead of ``SystemError`` on |
| 36643 |
platforms where ``chmod(..., follow_symlinks=False)`` is not supported. |
| 36644 |
Patch by Anthony Sottile. |
| 36645 |
|
| 36646 |
- bpo-30050: New argument warn_on_full_buffer to signal.set_wakeup_fd lets |
| 36647 |
you control whether Python prints a warning on stderr when the wakeup fd |
| 36648 |
buffer overflows. |
| 36649 |
|
| 36650 |
- bpo-29137: The ``fpectl`` library has been removed. It was never enabled |
| 36651 |
by default, never worked correctly on x86-64, and it changed the Python |
| 36652 |
ABI in ways that caused unexpected breakage of C extensions. |
| 36653 |
|
| 36654 |
- bpo-32273: Move asyncio.test_utils to test.test_asyncio. |
| 36655 |
|
| 36656 |
- bpo-32272: Remove asyncio.async() function. |
| 36657 |
|
| 36658 |
- bpo-32269: Add asyncio.get_running_loop() function. |
| 36659 |
|
| 36660 |
- bpo-32265: All class and static methods of builtin types now are correctly |
| 36661 |
classified by inspect.classify_class_attrs() and grouped in pydoc ouput. |
| 36662 |
Added types.ClassMethodDescriptorType for unbound class methods of builtin |
| 36663 |
types. |
| 36664 |
|
| 36665 |
- bpo-32253: Deprecate ``yield from lock``, ``await lock``, ``with (yield |
| 36666 |
from lock)`` and ``with await lock`` for asyncio synchronization |
| 36667 |
primitives. |
| 36668 |
|
| 36669 |
- bpo-22589: Changed MIME type of .bmp from 'image/x-ms-bmp' to 'image/bmp' |
| 36670 |
|
| 36671 |
- bpo-32193: Convert asyncio to use *async/await* syntax. Old styled ``yield |
| 36672 |
from`` is still supported too. |
| 36673 |
|
| 36674 |
- bpo-32206: Add support to run modules with pdb |
| 36675 |
|
| 36676 |
- bpo-32227: ``functools.singledispatch`` now supports registering |
| 36677 |
implementations using type annotations. |
| 36678 |
|
| 36679 |
- bpo-15873: Added new alternate constructors |
| 36680 |
:meth:`datetime.datetime.fromisoformat`, |
| 36681 |
:meth:`datetime.time.fromisoformat` and |
| 36682 |
:meth:`datetime.date.fromisoformat` as the inverse operation of each |
| 36683 |
classes's respective ``isoformat`` methods. |
| 36684 |
|
| 36685 |
- bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link |
| 36686 |
list'. |
| 36687 |
|
| 36688 |
- bpo-32143: os.statvfs() includes the f_fsid field from statvfs(2) |
| 36689 |
|
| 36690 |
- bpo-26439: Fix ctypes.util.find_library() for AIX by implementing |
| 36691 |
ctypes._aix.find_library() Patch by: Michael Felt |
| 36692 |
|
| 36693 |
- bpo-31993: The pickler now uses less memory when serializing large bytes |
| 36694 |
and str objects into a file. Pickles created with protocol 4 will require |
| 36695 |
less memory for unpickling large bytes and str objects. |
| 36696 |
|
| 36697 |
- bpo-27456: Ensure TCP_NODELAY is set on Linux. Tests by Victor Stinner. |
| 36698 |
|
| 36699 |
- bpo-31778: ast.literal_eval() is now more strict. Addition and subtraction |
| 36700 |
of arbitrary numbers no longer allowed. |
| 36701 |
|
| 36702 |
- bpo-31802: Importing native path module (``posixpath``, ``ntpath``) now |
| 36703 |
works even if the ``os`` module still is not imported. |
| 36704 |
|
| 36705 |
- bpo-30241: Add contextlib.AbstractAsyncContextManager. Patch by Jelle |
| 36706 |
Zijlstra. |
| 36707 |
|
| 36708 |
- bpo-31699: Fix deadlocks in |
| 36709 |
:class:`concurrent.futures.ProcessPoolExecutor` when task arguments or |
| 36710 |
results cause pickling or unpickling errors. This should make sure that |
| 36711 |
calls to the :class:`ProcessPoolExecutor` API always eventually return. |
| 36712 |
|
| 36713 |
- bpo-15216: ``TextIOWrapper.reconfigure()`` supports changing *encoding*, |
| 36714 |
*errors*, and *newline*. |
| 36715 |
|
| 36716 |
Documentation |
| 36717 |
------------- |
| 36718 |
|
| 36719 |
- bpo-32418: Add get_loop() method to Server and AbstractServer classes. |
| 36720 |
|
| 36721 |
Tests |
| 36722 |
----- |
| 36723 |
|
| 36724 |
- bpo-32252: Fix faulthandler_suppress_crash_report() used to prevent core |
| 36725 |
dump files when testing crashes. getrlimit() returns zero on success. |
| 36726 |
|
| 36727 |
- bpo-32002: Adjust C locale coercion testing for the empty locale and POSIX |
| 36728 |
locale cases to more readily adjust to platform dependent behaviour. |
| 36729 |
|
| 36730 |
Windows |
| 36731 |
------- |
| 36732 |
|
| 36733 |
- bpo-19764: Implement support for ``subprocess.Popen(close_fds=True)`` on |
| 36734 |
Windows. Patch by Segev Finer. |
| 36735 |
|
| 36736 |
Tools/Demos |
| 36737 |
----------- |
| 36738 |
|
| 36739 |
- bpo-24960: 2to3 and lib2to3 can now read pickled grammar files using |
| 36740 |
pkgutil.get_data() rather than probing the filesystem. This lets 2to3 and |
| 36741 |
lib2to3 work when run from a zipfile. |
| 36742 |
|
| 36743 |
C API |
| 36744 |
----- |
| 36745 |
|
| 36746 |
- bpo-32030: Py_Initialize() doesn't reset the memory allocators to default |
| 36747 |
if the ``PYTHONMALLOC`` environment variable is not set. |
| 36748 |
|
| 36749 |
- bpo-29084: Undocumented C API for OrderedDict has been excluded from the |
| 36750 |
limited C API. It was added by mistake and actually never worked in the |
| 36751 |
limited C API. |
| 36752 |
|
| 36753 |
- bpo-32264: Moved the pygetopt.h header into internal/, since it has no |
| 36754 |
public APIs. |
| 36755 |
|
| 36756 |
- bpo-32241: :c:func:`!Py_SetProgramName` and :c:func:`!Py_SetPythonHome` |
| 36757 |
now take the ``const wchar *`` arguments instead of ``wchar *``. |
| 36758 |
|
| 36759 |
|
| 36760 |
What's New in Python 3.7.0 alpha 3? |
| 36761 |
=================================== |
| 36762 |
|
| 36763 |
*Release date: 2017-12-05* |
| 36764 |
|
| 36765 |
Core and Builtins |
| 36766 |
----------------- |
| 36767 |
|
| 36768 |
- bpo-32176: co_flags.CO_NOFREE is now always set correctly by the code |
| 36769 |
object constructor based on freevars and cellvars, rather than needing to |
| 36770 |
be set correctly by the caller. This ensures it will be cleared |
| 36771 |
automatically when additional cell references are injected into a modified |
| 36772 |
code object and function. |
| 36773 |
|
| 36774 |
- bpo-10544: Yield expressions are now deprecated in comprehensions and |
| 36775 |
generator expressions. They are still permitted in the definition of the |
| 36776 |
outermost iterable, as that is evaluated directly in the enclosing scope. |
| 36777 |
|
| 36778 |
- bpo-32137: The repr of deeply nested dict now raises a RecursionError |
| 36779 |
instead of crashing due to a stack overflow. |
| 36780 |
|
| 36781 |
- bpo-32096: Revert memory allocator changes in the C API: move structures |
| 36782 |
back from _PyRuntime to Objects/obmalloc.c. The memory allocators are once |
| 36783 |
again initialized statically, and so PyMem_RawMalloc() and |
| 36784 |
Py_DecodeLocale() can be called before _PyRuntime_Initialize(). |
| 36785 |
|
| 36786 |
- bpo-32043: Add a new "developer mode": new "-X dev" command line option to |
| 36787 |
enable debug checks at runtime. |
| 36788 |
|
| 36789 |
- bpo-32023: SyntaxError is now correctly raised when a generator expression |
| 36790 |
without parenthesis is used instead of an inheritance list in a class |
| 36791 |
definition. The duplication of the parentheses can be omitted only on |
| 36792 |
calls. |
| 36793 |
|
| 36794 |
- bpo-32012: SyntaxError is now correctly raised when a generator expression |
| 36795 |
without parenthesis is passed as an argument, but followed by a trailing |
| 36796 |
comma. A generator expression always needs to be directly inside a set of |
| 36797 |
parentheses and cannot have a comma on either side. |
| 36798 |
|
| 36799 |
- bpo-28180: A new internal ``_Py_SetLocaleFromEnv(category)`` helper |
| 36800 |
function has been added in order to improve the consistency of behaviour |
| 36801 |
across different ``libc`` implementations (e.g. Android doesn't support |
| 36802 |
setting the locale from the environment by default). |
| 36803 |
|
| 36804 |
- bpo-31949: Fixed several issues in printing tracebacks |
| 36805 |
(PyTraceBack_Print()). Setting sys.tracebacklimit to 0 or less now |
| 36806 |
suppresses printing tracebacks. Setting sys.tracebacklimit to None now |
| 36807 |
causes using the default limit. Setting sys.tracebacklimit to an integer |
| 36808 |
larger than LONG_MAX now means using the limit LONG_MAX rather than the |
| 36809 |
default limit. Fixed integer overflows in the case of more than ``2**31`` |
| 36810 |
traceback items on Windows. Fixed output errors handling. |
| 36811 |
|
| 36812 |
- bpo-30696: Fix the interactive interpreter looping endlessly when no |
| 36813 |
memory. |
| 36814 |
|
| 36815 |
- bpo-20047: Bytearray methods partition() and rpartition() now accept only |
| 36816 |
bytes-like objects as separator, as documented. In particular they now |
| 36817 |
raise TypeError rather of returning a bogus result when an integer is |
| 36818 |
passed as a separator. |
| 36819 |
|
| 36820 |
- bpo-21720: BytesWarning no longer emitted when the *fromlist* argument of |
| 36821 |
``__import__()`` or the ``__all__`` attribute of the module contain bytes |
| 36822 |
instances. |
| 36823 |
|
| 36824 |
- bpo-31845: Environment variables are once more read correctly at |
| 36825 |
interpreter startup. |
| 36826 |
|
| 36827 |
- bpo-28936: Ensure that lexically first syntax error involving a parameter |
| 36828 |
and ``global`` or ``nonlocal`` is detected first at a given scope. Patch |
| 36829 |
by Ivan Levkivskyi. |
| 36830 |
|
| 36831 |
- bpo-31825: Fixed OverflowError in the 'unicode-escape' codec and in |
| 36832 |
codecs.escape_decode() when decode an escaped non-ascii byte. |
| 36833 |
|
| 36834 |
- bpo-31618: The per-frame tracing logic added in 3.7a1 has been altered so |
| 36835 |
that ``frame->f_lineno`` is updated before either ``"line"`` or |
| 36836 |
``"opcode"`` events are emitted. Previously, opcode events were emitted |
| 36837 |
first, and therefore would occasionally see stale line numbers on the |
| 36838 |
frame. The behavior of this feature has changed slightly as a result: when |
| 36839 |
both ``f_trace_lines`` and ``f_trace_opcodes`` are enabled, line events |
| 36840 |
now occur first. |
| 36841 |
|
| 36842 |
- bpo-28603: Print the full context/cause chain of exceptions on interpreter |
| 36843 |
exit, even if an exception in the chain is unhashable or compares equal to |
| 36844 |
later ones. Patch by Zane Bitter. |
| 36845 |
|
| 36846 |
- bpo-31786: Fix timeout rounding in the select module to round correctly |
| 36847 |
negative timeouts between -1.0 and 0.0. The functions now block waiting |
| 36848 |
for events as expected. Previously, the call was incorrectly non-blocking. |
| 36849 |
Patch by Pablo Galindo. |
| 36850 |
|
| 36851 |
- bpo-31781: Prevent crashes when calling methods of an uninitialized |
| 36852 |
``zipimport.zipimporter`` object. Patch by Oren Milman. |
| 36853 |
|
| 36854 |
- bpo-30399: Standard repr() of BaseException with a single argument no |
| 36855 |
longer contains redundant trailing comma. |
| 36856 |
|
| 36857 |
- bpo-31626: Fixed a bug in debug memory allocator. There was a write to |
| 36858 |
freed memory after shrinking a memory block. |
| 36859 |
|
| 36860 |
- bpo-30817: ``PyErr_PrintEx()`` clears now the ignored exception that may |
| 36861 |
be raised by ``_PySys_SetObjectId()``, for example when no memory. |
| 36862 |
|
| 36863 |
Library |
| 36864 |
------- |
| 36865 |
|
| 36866 |
- bpo-28556: Two minor fixes for ``typing`` module: allow shallow copying |
| 36867 |
instances of generic classes, improve interaction of ``__init_subclass__`` |
| 36868 |
with generics. Original PRs by Ivan Levkivskyi. |
| 36869 |
|
| 36870 |
- bpo-32214: PEP 557, Data Classes. Provides a decorator which adds |
| 36871 |
boilerplate methods to classes which use type annotations so specify |
| 36872 |
fields. |
| 36873 |
|
| 36874 |
- bpo-27240: The header folding algorithm for the new email policies has |
| 36875 |
been rewritten, which also fixes bpo-30788, bpo-31831, and bpo-32182. In |
| 36876 |
particular, RFC2231 folding is now done correctly. |
| 36877 |
|
| 36878 |
- bpo-32186: io.FileIO.readall() and io.FileIO.read() now release the GIL |
| 36879 |
when getting the file size. Fixed hang of all threads with inaccessible |
| 36880 |
NFS server. Patch by Nir Soffer. |
| 36881 |
|
| 36882 |
- bpo-32101: Add :attr:`sys.flags.dev_mode` flag |
| 36883 |
|
| 36884 |
- bpo-32154: The ``asyncio.windows_utils.socketpair()`` function has been |
| 36885 |
removed: use directly :func:`socket.socketpair` which is available on all |
| 36886 |
platforms since Python 3.5 (before, it wasn't available on Windows). |
| 36887 |
``asyncio.windows_utils.socketpair()`` was just an alias to |
| 36888 |
``socket.socketpair`` on Python 3.5 and newer. |
| 36889 |
|
| 36890 |
- bpo-32089: warnings: In development (-X dev) and debug mode (pydebug |
| 36891 |
build), use the "default" action for ResourceWarning, rather than the |
| 36892 |
"always" action, in the default warnings filters. |
| 36893 |
|
| 36894 |
- bpo-32107: ``uuid.getnode()`` now preferentially returns universally |
| 36895 |
administered MAC addresses if available, over locally administered MAC |
| 36896 |
addresses. This makes a better guarantee for global uniqueness of UUIDs |
| 36897 |
returned from ``uuid.uuid1()``. If only locally administered MAC |
| 36898 |
addresses are available, the first such one found is returned. |
| 36899 |
|
| 36900 |
- bpo-23033: Wildcard is now supported in hostname when it is one and only |
| 36901 |
character in the left most segment of hostname in second argument of |
| 36902 |
:meth:`ssl.match_hostname`. Patch by Mandeep Singh. |
| 36903 |
|
| 36904 |
- bpo-12239: Make :meth:`!msilib.SummaryInformation.GetProperty` return |
| 36905 |
``None`` when the value of property is ``VT_EMPTY``. Initial patch by |
| 36906 |
Mark Mc Mahon. |
| 36907 |
|
| 36908 |
- bpo-28334: Use :func:`os.path.expanduser` to find the ``~/.netrc`` file in |
| 36909 |
:class:`netrc.netrc`. If it does not exist, :exc:`FileNotFoundError` is |
| 36910 |
raised. Patch by Dimitri Merejkowsky. |
| 36911 |
|
| 36912 |
- bpo-32121: Made ``tracemalloc.Traceback`` behave more like the traceback |
| 36913 |
module, sorting the frames from oldest to most recent. |
| 36914 |
``Traceback.format()`` now accepts negative *limit*, truncating the result |
| 36915 |
to the ``abs(limit)`` oldest frames. To get the old behaviour, one can use |
| 36916 |
the new *most_recent_first* argument to ``Traceback.format()``. (Patch by |
| 36917 |
Jesse Bakker.) |
| 36918 |
|
| 36919 |
- bpo-31325: Fix wrong usage of :func:`collections.namedtuple` in the |
| 36920 |
:meth:`RobotFileParser.parse() <urllib.robotparser.RobotFileParser.parse>` |
| 36921 |
method. Initial patch by Robin Wellner. |
| 36922 |
|
| 36923 |
- bpo-12382: :func:`!msilib.OpenDatabase` now raises a better exception |
| 36924 |
message when it couldn't open or create an MSI file. Initial patch by |
| 36925 |
William Tisäter. |
| 36926 |
|
| 36927 |
- bpo-19610: ``setup()`` now warns about invalid types for some fields. The |
| 36928 |
``distutils.dist.Distribution`` class now warns when ``classifiers``, |
| 36929 |
``keywords`` and ``platforms`` fields are not specified as a list or a |
| 36930 |
string. |
| 36931 |
|
| 36932 |
- bpo-32071: Added the ``-k`` command-line option to ``python -m unittest`` |
| 36933 |
to run only tests that match the given pattern(s). |
| 36934 |
|
| 36935 |
- bpo-10049: Added *nullcontext* no-op context manager to contextlib. This |
| 36936 |
provides a simpler and faster alternative to ExitStack() when handling |
| 36937 |
optional context managers. |
| 36938 |
|
| 36939 |
- bpo-28684: The new test.support.skip_unless_bind_unix_socket() decorator |
| 36940 |
is used here to skip asyncio tests that fail because the platform lacks a |
| 36941 |
functional bind() function for unix domain sockets (as it is the case for |
| 36942 |
non root users on the recent Android versions that run now SELinux in |
| 36943 |
enforcing mode). |
| 36944 |
|
| 36945 |
- bpo-32110: ``codecs.StreamReader.read(n)`` now returns not more than *n* |
| 36946 |
characters/bytes for non-negative *n*. This makes it compatible with |
| 36947 |
``read()`` methods of other file-like objects. |
| 36948 |
|
| 36949 |
- bpo-27535: The warnings module doesn't leak memory anymore in the hidden |
| 36950 |
warnings registry for the "ignore" action of warnings filters. |
| 36951 |
warn_explicit() function doesn't add the warning key to the registry |
| 36952 |
anymore for the "ignore" action. |
| 36953 |
|
| 36954 |
- bpo-32088: warnings: When Python is build is debug mode (``Py_DEBUG``), |
| 36955 |
:exc:`DeprecationWarning`, :exc:`PendingDeprecationWarning` and |
| 36956 |
:exc:`ImportWarning` warnings are now displayed by default. |
| 36957 |
|
| 36958 |
- bpo-1647489: Fixed searching regular expression patterns that could match |
| 36959 |
an empty string. Non-empty string can now be correctly found after |
| 36960 |
matching an empty string. |
| 36961 |
|
| 36962 |
- bpo-25054: Added support of splitting on a pattern that could match an |
| 36963 |
empty string. |
| 36964 |
|
| 36965 |
- bpo-32072: Fixed issues with binary plists: Fixed saving bytearrays. |
| 36966 |
Identical objects will be saved only once. Equal references will be load |
| 36967 |
as identical objects. Added support for saving and loading recursive data |
| 36968 |
structures. |
| 36969 |
|
| 36970 |
- bpo-32069: Drop legacy SSL transport from asyncio, ssl.MemoryBIO is always |
| 36971 |
used anyway. |
| 36972 |
|
| 36973 |
- bpo-32066: asyncio: Support pathlib.Path in create_unix_connection; sock |
| 36974 |
arg should be optional |
| 36975 |
|
| 36976 |
- bpo-32046: Updates 2to3 to convert from operator.isCallable(obj) to |
| 36977 |
callable(obj). Patch by Donghee Na. |
| 36978 |
|
| 36979 |
- bpo-32018: inspect.signature should follow :pep:`8`, if the parameter has |
| 36980 |
an annotation and a default value. Patch by Donghee Na. |
| 36981 |
|
| 36982 |
- bpo-32025: Add time.thread_time() and time.thread_time_ns() |
| 36983 |
|
| 36984 |
- bpo-32037: Integers that fit in a signed 32-bit integer will be now |
| 36985 |
pickled with protocol 0 using the INT opcode. This will decrease the size |
| 36986 |
of a pickle, speed up pickling and unpickling, and make these integers be |
| 36987 |
unpickled as int instances in Python 2. |
| 36988 |
|
| 36989 |
- bpo-32034: Make asyncio.IncompleteReadError and LimitOverrunError |
| 36990 |
pickleable. |
| 36991 |
|
| 36992 |
- bpo-32015: Fixed the looping of asyncio in the case of reconnection the |
| 36993 |
socket during waiting async read/write from/to the socket. |
| 36994 |
|
| 36995 |
- bpo-32011: Restored support of loading marshal files with the TYPE_INT64 |
| 36996 |
code. These files can be produced in Python 2.7. |
| 36997 |
|
| 36998 |
- bpo-28369: Enhance add_reader/writer check that socket is not used by some |
| 36999 |
transport. Before, only cases when add_reader/writer were called with an |
| 37000 |
int FD were supported. Now the check is implemented correctly for all |
| 37001 |
file-like objects. |
| 37002 |
|
| 37003 |
- bpo-31976: Fix race condition when flushing a file is slow, which can |
| 37004 |
cause a segfault if closing the file from another thread. |
| 37005 |
|
| 37006 |
- bpo-31985: Formally deprecated aifc.openfp, sunau.openfp, and wave.openfp. |
| 37007 |
Since change 7bc817d5ba917528e8bd07ec461c635291e7b06a in 1993, openfp in |
| 37008 |
each of the three modules had been pointing to that module's open function |
| 37009 |
as a matter of backwards compatibility, though it had been both untested |
| 37010 |
and undocumented. |
| 37011 |
|
| 37012 |
- bpo-21862: cProfile command line now accepts ``-m module_name`` as an |
| 37013 |
alternative to script path. Patch by Sanyam Khurana. |
| 37014 |
|
| 37015 |
- bpo-31970: Reduce performance overhead of asyncio debug mode. |
| 37016 |
|
| 37017 |
- bpo-31843: *database* argument of sqlite3.connect() now accepts a |
| 37018 |
:term:`path-like object`, instead of just a string. |
| 37019 |
|
| 37020 |
- bpo-31945: Add Configurable *blocksize* to ``HTTPConnection`` and |
| 37021 |
``HTTPSConnection`` for improved upload throughput. Patch by Nir Soffer. |
| 37022 |
|
| 37023 |
- bpo-31943: Add a ``cancelled()`` method to :class:`asyncio.Handle`. Patch |
| 37024 |
by Marat Sharafutdinov. |
| 37025 |
|
| 37026 |
- bpo-9678: Fixed determining the MAC address in the uuid module: Using |
| 37027 |
ifconfig on NetBSD and OpenBSD. Using arp on Linux, FreeBSD, NetBSD and |
| 37028 |
OpenBSD. Based on patch by Takayuki Shimizukawa. |
| 37029 |
|
| 37030 |
- bpo-30057: Fix potential missed signal in signal.signal(). |
| 37031 |
|
| 37032 |
- bpo-31933: Fix Blake2 params leaf_size and node_offset on big endian |
| 37033 |
platforms. Patch by Jack O'Connor. |
| 37034 |
|
| 37035 |
- bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor |
| 37036 |
|
| 37037 |
- bpo-31927: Fixed compilation of the socket module on NetBSD 8. Fixed |
| 37038 |
assertion failure or reading arbitrary data when parse a AF_BLUETOOTH |
| 37039 |
address on NetBSD and DragonFly BSD. |
| 37040 |
|
| 37041 |
- bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse() |
| 37042 |
when the size of types chtype or mmask_t is less than the size of C long. |
| 37043 |
curses.box() now accepts characters as arguments. Based on patch by Steve |
| 37044 |
Fink. |
| 37045 |
|
| 37046 |
- bpo-31917: Add 3 new clock identifiers: :const:`time.CLOCK_BOOTTIME`, |
| 37047 |
:const:`time.CLOCK_PROF` and :const:`time.CLOCK_UPTIME`. |
| 37048 |
|
| 37049 |
- bpo-31897: plistlib now catches more errors when read binary plists and |
| 37050 |
raises InvalidFileException instead of unexpected exceptions. |
| 37051 |
|
| 37052 |
- bpo-25720: Fix the method for checking pad state of curses WINDOW. Patch |
| 37053 |
by Masayuki Yamamoto. |
| 37054 |
|
| 37055 |
- bpo-31893: Fixed the layout of the kqueue_event structure on OpenBSD and |
| 37056 |
NetBSD. Fixed the comparison of the kqueue_event objects. |
| 37057 |
|
| 37058 |
- bpo-31891: Fixed building the curses module on NetBSD. |
| 37059 |
|
| 37060 |
- bpo-31884: added required constants to subprocess module for setting |
| 37061 |
priority on windows |
| 37062 |
|
| 37063 |
- bpo-28281: Remove year (1-9999) limits on the Calendar.weekday() function. |
| 37064 |
Patch by Mark Gollahon. |
| 37065 |
|
| 37066 |
- bpo-31702: crypt.mksalt() now allows to specify the number of rounds for |
| 37067 |
SHA-256 and SHA-512 hashing. |
| 37068 |
|
| 37069 |
- bpo-30639: :func:`inspect.getfile` no longer computes the repr of unknown |
| 37070 |
objects to display in an error message, to protect against badly behaved |
| 37071 |
custom reprs. |
| 37072 |
|
| 37073 |
- bpo-30768: Fix the pthread+semaphore implementation of |
| 37074 |
PyThread_acquire_lock_timed() when called with timeout > 0 and |
| 37075 |
intr_flag=0: recompute the timeout if sem_timedwait() is interrupted by a |
| 37076 |
signal (EINTR). See also the :pep:`475`. |
| 37077 |
|
| 37078 |
- bpo-31854: Add ``mmap.ACCESS_DEFAULT`` constant. |
| 37079 |
|
| 37080 |
- bpo-31834: Use optimized code for BLAKE2 only with SSSE3+. The pure SSE2 |
| 37081 |
implementation is slower than the pure C reference implementation. |
| 37082 |
|
| 37083 |
- bpo-28292: Calendar.itermonthdates() will now consistently raise an |
| 37084 |
exception when a date falls outside of the 0001-01-01 through 9999-12-31 |
| 37085 |
range. To support applications that cannot tolerate such exceptions, the |
| 37086 |
new methods itermonthdays3() and itermonthdays4() are added. The new |
| 37087 |
methods return tuples and are not restricted by the range supported by |
| 37088 |
datetime.date. |
| 37089 |
|
| 37090 |
- bpo-28564: The shutil.rmtree() function has been sped up to 20--40%. This |
| 37091 |
was done using the os.scandir() function. |
| 37092 |
|
| 37093 |
- bpo-28416: Instances of pickle.Pickler subclass with the persistent_id() |
| 37094 |
method and pickle.Unpickler subclass with the persistent_load() method no |
| 37095 |
longer create reference cycles. |
| 37096 |
|
| 37097 |
- bpo-31653: Don't release the GIL if we can acquire a multiprocessing |
| 37098 |
semaphore immediately. |
| 37099 |
|
| 37100 |
- bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed |
| 37101 |
or None. |
| 37102 |
|
| 37103 |
- bpo-20825: Add ``subnet_of`` and ``superset_of`` containment tests to |
| 37104 |
:class:`ipaddress.IPv6Network` and :class:`ipaddress.IPv4Network`. Patch |
| 37105 |
by Michel Albert and Cheryl Sabella. |
| 37106 |
|
| 37107 |
- bpo-31827: Remove the os.stat_float_times() function. It was introduced in |
| 37108 |
Python 2.3 for backward compatibility with Python 2.2, and was deprecated |
| 37109 |
since Python 3.1. |
| 37110 |
|
| 37111 |
- bpo-31756: Add a ``subprocess.Popen(text=False)`` keyword argument to |
| 37112 |
``subprocess`` functions to be more explicit about when the library should |
| 37113 |
attempt to decode outputs into text. Patch by Andrew Clegg. |
| 37114 |
|
| 37115 |
- bpo-31819: Add AbstractEventLoop.sock_recv_into(). |
| 37116 |
|
| 37117 |
- bpo-31457: If nested log adapters are used, the inner ``process()`` |
| 37118 |
methods are no longer omitted. |
| 37119 |
|
| 37120 |
- bpo-31457: The ``manager`` property on LoggerAdapter objects is now |
| 37121 |
properly settable. |
| 37122 |
|
| 37123 |
- bpo-31806: Fix timeout rounding in time.sleep(), threading.Lock.acquire() |
| 37124 |
and socket.socket.settimeout() to round correctly negative timeouts |
| 37125 |
between -1.0 and 0.0. The functions now block waiting for events as |
| 37126 |
expected. Previously, the call was incorrectly non-blocking. Patch by |
| 37127 |
Pablo Galindo. |
| 37128 |
|
| 37129 |
- bpo-31803: time.clock() and time.get_clock_info('clock') now emit a |
| 37130 |
DeprecationWarning warning. |
| 37131 |
|
| 37132 |
- bpo-31800: Extended support for parsing UTC offsets. strptime '%z' can now |
| 37133 |
parse the output generated by datetime.isoformat, including seconds and |
| 37134 |
microseconds. |
| 37135 |
|
| 37136 |
- bpo-28603: traceback: Fix a TypeError that occurred during printing of |
| 37137 |
exception tracebacks when either the current exception or an exception in |
| 37138 |
its context/cause chain is unhashable. Patch by Zane Bitter. |
| 37139 |
|
| 37140 |
- bpo-30541: Add new function to seal a mock and prevent the automatically |
| 37141 |
creation of child mocks. Patch by Mario Corchero. |
| 37142 |
|
| 37143 |
- bpo-31784: Implement the :pep:`564`, add new 6 new functions with |
| 37144 |
nanosecond resolution to the :mod:`time` module: |
| 37145 |
:func:`~time.clock_gettime_ns`, :func:`~time.clock_settime_ns`, |
| 37146 |
:func:`~time.monotonic_ns`, :func:`~time.perf_counter_ns`, |
| 37147 |
:func:`~time.process_time_ns`, :func:`~time.time_ns`. |
| 37148 |
|
| 37149 |
- bpo-30143: 2to3 now generates a code that uses abstract collection classes |
| 37150 |
from collections.abc rather than collections. |
| 37151 |
|
| 37152 |
- bpo-31770: Prevent a crash when calling the ``__init__()`` method of a |
| 37153 |
``sqlite3.Cursor`` object more than once. Patch by Oren Milman. |
| 37154 |
|
| 37155 |
- bpo-31764: Prevent a crash in ``sqlite3.Cursor.close()`` in case the |
| 37156 |
``Cursor`` object is uninitialized. Patch by Oren Milman. |
| 37157 |
|
| 37158 |
- bpo-31752: Fix possible crash in timedelta constructor called with custom |
| 37159 |
integers. |
| 37160 |
|
| 37161 |
- bpo-31620: an empty asyncio.Queue now doesn't leak memory when queue.get |
| 37162 |
pollers timeout |
| 37163 |
|
| 37164 |
- bpo-31690: Allow the flags re.ASCII, re.LOCALE, and re.UNICODE to be used |
| 37165 |
as group flags for regular expressions. |
| 37166 |
|
| 37167 |
- bpo-30349: FutureWarning is now emitted if a regular expression contains |
| 37168 |
character set constructs that will change semantically in the future |
| 37169 |
(nested sets and set operations). |
| 37170 |
|
| 37171 |
- bpo-31664: Added support for the Blowfish hashing in the crypt module. |
| 37172 |
|
| 37173 |
- bpo-31632: Fix method set_protocol() of class _SSLProtocolTransport in |
| 37174 |
asyncio module. This method was previously modifying a wrong reference to |
| 37175 |
the protocol. |
| 37176 |
|
| 37177 |
- bpo-15037: Added a workaround for getkey() in curses for ncurses 5.7 and |
| 37178 |
earlier. |
| 37179 |
|
| 37180 |
- bpo-31307: Allow use of bytes objects for arguments to |
| 37181 |
:meth:`configparser.ConfigParser.read`. Patch by Vincent Michel. |
| 37182 |
|
| 37183 |
- bpo-31334: Fix ``poll.poll([timeout])`` in the ``select`` module for |
| 37184 |
arbitrary negative timeouts on all OSes where it can only be a |
| 37185 |
non-negative integer or -1. Patch by Riccardo Coccioli. |
| 37186 |
|
| 37187 |
- bpo-31310: multiprocessing's semaphore tracker should be launched again if |
| 37188 |
crashed. |
| 37189 |
|
| 37190 |
- bpo-31308: Make multiprocessing's forkserver process immune to Ctrl-C and |
| 37191 |
other user interruptions. If it crashes, restart it when necessary. |
| 37192 |
|
| 37193 |
- bpo-31245: Added support for AF_UNIX socket in asyncio |
| 37194 |
``create_datagram_endpoint``. |
| 37195 |
|
| 37196 |
- bpo-30553: Add HTTP/2 status code 421 (Misdirected Request) to |
| 37197 |
:class:`http.HTTPStatus`. Patch by Vitor Pereira. |
| 37198 |
|
| 37199 |
Documentation |
| 37200 |
------------- |
| 37201 |
|
| 37202 |
- bpo-32105: Added asyncio.BaseEventLoop.connect_accepted_socket |
| 37203 |
versionadded marker. |
| 37204 |
|
| 37205 |
Tests |
| 37206 |
----- |
| 37207 |
|
| 37208 |
- bpo-31380: Skip test_httpservers test_undecodable_file on macOS: fails on |
| 37209 |
APFS. |
| 37210 |
|
| 37211 |
- bpo-31705: Skip test_socket.test_sha256() on Linux kernel older than 4.5. |
| 37212 |
The test fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged |
| 37213 |
into the kernel 4.5. |
| 37214 |
|
| 37215 |
- bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV and |
| 37216 |
remove the test.support.requires_android_level decorator. |
| 37217 |
|
| 37218 |
- bpo-32136: The runtime embedding tests have been split out from |
| 37219 |
``Lib/test/test_capi.py`` into a new ``Lib/test/test_embed.py`` file. |
| 37220 |
|
| 37221 |
- bpo-28668: test.support.requires_multiprocessing_queue is removed. Skip |
| 37222 |
tests with test.support.import_module('multiprocessing.synchronize') |
| 37223 |
instead when the semaphore implementation is broken or missing. |
| 37224 |
|
| 37225 |
- bpo-32126: Skip test_get_event_loop_new_process in |
| 37226 |
test.test_asyncio.test_events when sem_open() is not functional. |
| 37227 |
|
| 37228 |
- bpo-31174: Fix test_tools.test_unparse: DirectoryTestCase now stores the |
| 37229 |
names sample to always test the same files. It prevents false alarms when |
| 37230 |
hunting reference leaks. |
| 37231 |
|
| 37232 |
Build |
| 37233 |
----- |
| 37234 |
|
| 37235 |
- bpo-28538: Revert the previous changes, the if_nameindex structure is |
| 37236 |
defined by Unified Headers. |
| 37237 |
|
| 37238 |
- bpo-28762: Revert the last commit, the F_LOCK macro is defined by Android |
| 37239 |
Unified Headers. |
| 37240 |
|
| 37241 |
- bpo-29040: Support building Android with Unified Headers. The first NDK |
| 37242 |
release to support Unified Headers is android-ndk-r14. |
| 37243 |
|
| 37244 |
- bpo-32059: ``detect_modules()`` in ``setup.py`` now also searches the |
| 37245 |
sysroot paths when cross-compiling. |
| 37246 |
|
| 37247 |
- bpo-31957: Fixes Windows SDK version detection when building for Windows. |
| 37248 |
|
| 37249 |
- bpo-31609: Fixes quotes in PCbuild/clean.bat |
| 37250 |
|
| 37251 |
- bpo-31934: Abort the build when building out of a not clean source tree. |
| 37252 |
|
| 37253 |
- bpo-31926: Fixed Argument Clinic sometimes causing compilation errors when |
| 37254 |
there was more than one function and/or method in a .c file with the same |
| 37255 |
name. |
| 37256 |
|
| 37257 |
- bpo-28791: Update Windows builds to use SQLite 3.21.0. |
| 37258 |
|
| 37259 |
- bpo-28791: Update OS X installer to use SQLite 3.21.0. |
| 37260 |
|
| 37261 |
- bpo-28643: Record profile-opt build progress with stamp files. |
| 37262 |
|
| 37263 |
- bpo-31866: Finish removing support for AtheOS. |
| 37264 |
|
| 37265 |
Windows |
| 37266 |
------- |
| 37267 |
|
| 37268 |
- bpo-1102: Return ``None`` when ``View.Fetch()`` returns |
| 37269 |
``ERROR_NO_MORE_ITEMS`` instead of raising ``MSIError``. Initial patch by |
| 37270 |
Anthony Tuininga. |
| 37271 |
|
| 37272 |
- bpo-31944: Fixes Modify button in Apps and Features dialog. |
| 37273 |
|
| 37274 |
- bpo-20486: Implement the ``Database.Close()`` method to help closing MSI |
| 37275 |
database objects. |
| 37276 |
|
| 37277 |
- bpo-31857: Make the behavior of USE_STACKCHECK deterministic in a |
| 37278 |
multi-threaded environment. |
| 37279 |
|
| 37280 |
macOS |
| 37281 |
----- |
| 37282 |
|
| 37283 |
- bpo-31392: Update macOS installer to use OpenSSL 1.0.2m |
| 37284 |
|
| 37285 |
IDLE |
| 37286 |
---- |
| 37287 |
|
| 37288 |
- bpo-32207: Improve tk event exception tracebacks in IDLE. When tk event |
| 37289 |
handling is driven by IDLE's run loop, a confusing and distracting |
| 37290 |
queue.EMPTY traceback context is no longer added to tk event exception |
| 37291 |
tracebacks. The traceback is now the same as when event handling is |
| 37292 |
driven by user code. Patch based on a suggestion by Serhiy Storchaka. |
| 37293 |
|
| 37294 |
- bpo-32164: Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet |
| 37295 |
in configdialog was replaced by ttk.Notebook. |
| 37296 |
|
| 37297 |
- bpo-32100: IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch |
| 37298 |
mostly by Cheryl Sabella. |
| 37299 |
|
| 37300 |
- bpo-31858: IDLE -- Restrict shell prompt manipulation to the shell. Editor |
| 37301 |
and output windows only see an empty last prompt line. This simplifies |
| 37302 |
the code and fixes a minor bug when newline is inserted. Sys.ps1, if |
| 37303 |
present, is read on Shell start-up, but is not set or changed. |
| 37304 |
|
| 37305 |
- bpo-31860: The font sample in the IDLE configuration dialog is now |
| 37306 |
editable. Changes persist while IDLE remains open |
| 37307 |
|
| 37308 |
- bpo-31836: Test_code_module now passes if run after test_idle, which sets |
| 37309 |
ps1. The code module uses sys.ps1 if present or sets it to '>>> ' if not. |
| 37310 |
Test_code_module now properly tests both behaviors. Ditto for ps2. |
| 37311 |
|
| 37312 |
- bpo-28603: Fix a TypeError that caused a shell restart when printing a |
| 37313 |
traceback that includes an exception that is unhashable. Patch by Zane |
| 37314 |
Bitter. |
| 37315 |
|
| 37316 |
- bpo-13802: Use non-Latin characters in the IDLE's Font settings sample. |
| 37317 |
Even if one selects a font that defines a limited subset of the unicode |
| 37318 |
Basic Multilingual Plane, tcl/tk will use other fonts that define a |
| 37319 |
character. The expanded example give users of non-Latin characters a |
| 37320 |
better idea of what they might see in IDLE's shell and editors. To make |
| 37321 |
room for the expanded sample, frames on the Font tab are re-arranged. The |
| 37322 |
Font/Tabs help explains a bit about the additions. |
| 37323 |
|
| 37324 |
Tools/Demos |
| 37325 |
----------- |
| 37326 |
|
| 37327 |
- bpo-32159: Remove CVS and Subversion tools: remove svneol.py and |
| 37328 |
treesync.py scripts. CPython migrated from CVS to Subversion, to |
| 37329 |
Mercurial, and then to Git. CVS and Subversion are no longer used to |
| 37330 |
develop CPython. |
| 37331 |
|
| 37332 |
- bpo-30722: Make redemo work with Python 3.6 and newer versions. Also, |
| 37333 |
remove the ``LOCALE`` option since it doesn't work with string patterns in |
| 37334 |
Python 3. Patch by Christoph Sarnowski. |
| 37335 |
|
| 37336 |
C API |
| 37337 |
----- |
| 37338 |
|
| 37339 |
- bpo-20891: Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in |
| 37340 |
a non-Python thread before PyEval_InitThreads(), only call |
| 37341 |
PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. |
| 37342 |
|
| 37343 |
- bpo-32125: The ``Py_UseClassExceptionsFlag`` flag has been removed. It was |
| 37344 |
deprecated and wasn't used anymore since Python 2.0. |
| 37345 |
|
| 37346 |
- bpo-25612: Move the current exception state from the frame object to the |
| 37347 |
co-routine. This simplifies the interpreter and fixes a couple of obscure |
| 37348 |
bugs caused by having swap exception state when entering or exiting a |
| 37349 |
generator. |
| 37350 |
|
| 37351 |
- bpo-23699: Add Py_RETURN_RICHCOMPARE macro to reduce boilerplate code in |
| 37352 |
rich comparison functions. |
| 37353 |
|
| 37354 |
- bpo-30697: The ``PyExc_RecursionErrorInst`` singleton is removed and |
| 37355 |
``PyErr_NormalizeException()`` does not use it anymore. This singleton is |
| 37356 |
persistent and its members being never cleared may cause a segfault during |
| 37357 |
finalization of the interpreter. See also issue #22898. |
| 37358 |
|
| 37359 |
|
| 37360 |
What's New in Python 3.7.0 alpha 2? |
| 37361 |
=================================== |
| 37362 |
|
| 37363 |
*Release date: 2017-10-16* |
| 37364 |
|
| 37365 |
Core and Builtins |
| 37366 |
----------------- |
| 37367 |
|
| 37368 |
- bpo-31558: ``gc.freeze()`` is a new API that allows for moving all objects |
| 37369 |
currently tracked by the garbage collector to a permanent generation, |
| 37370 |
effectively removing them from future collection events. This can be used |
| 37371 |
to protect those objects from having their PyGC_Head mutated. In effect, |
| 37372 |
this enables great copy-on-write stability at fork(). |
| 37373 |
|
| 37374 |
- bpo-31642: Restored blocking "from package import module" by setting |
| 37375 |
sys.modules["package.module"] to None. |
| 37376 |
|
| 37377 |
- bpo-31708: Allow use of asynchronous generator expressions in synchronous |
| 37378 |
functions. |
| 37379 |
|
| 37380 |
- bpo-31709: Drop support of asynchronous __aiter__. |
| 37381 |
|
| 37382 |
- bpo-30404: The -u option now makes the stdout and stderr streams |
| 37383 |
unbuffered rather than line-buffered. |
| 37384 |
|
| 37385 |
- bpo-31619: Fixed a ValueError when convert a string with large number of |
| 37386 |
underscores to integer with binary base. |
| 37387 |
|
| 37388 |
- bpo-31602: Fix an assertion failure in ``zipimporter.get_source()`` in |
| 37389 |
case of a bad ``zlib.decompress()``. Patch by Oren Milman. |
| 37390 |
|
| 37391 |
- bpo-31592: Fixed an assertion failure in Python parser in case of a bad |
| 37392 |
``unicodedata.normalize()``. Patch by Oren Milman. |
| 37393 |
|
| 37394 |
- bpo-31588: Raise a ``TypeError`` with a helpful error message when class |
| 37395 |
creation fails due to a metaclass with a bad ``__prepare__()`` method. |
| 37396 |
Patch by Oren Milman. |
| 37397 |
|
| 37398 |
- bpo-31574: Importlib was instrumented with two dtrace probes to profile |
| 37399 |
import timing. |
| 37400 |
|
| 37401 |
- bpo-31566: Fix an assertion failure in ``_warnings.warn()`` in case of a |
| 37402 |
bad ``__name__`` global. Patch by Oren Milman. |
| 37403 |
|
| 37404 |
- bpo-31506: Improved the error message logic for ``object.__new__`` and |
| 37405 |
``object.__init__``. |
| 37406 |
|
| 37407 |
- bpo-31505: Fix an assertion failure in ``json``, in case |
| 37408 |
``_json.make_encoder()`` received a bad ``encoder()`` argument. Patch by |
| 37409 |
Oren Milman. |
| 37410 |
|
| 37411 |
- bpo-31492: Fix assertion failures in case of failing to import from a |
| 37412 |
module with a bad ``__name__`` attribute, and in case of failing to access |
| 37413 |
an attribute of such a module. Patch by Oren Milman. |
| 37414 |
|
| 37415 |
- bpo-31478: Fix an assertion failure in ``_random.Random.seed()`` in case |
| 37416 |
the argument has a bad ``__abs__()`` method. Patch by Oren Milman. |
| 37417 |
|
| 37418 |
- bpo-31336: Speed up class creation by 10-20% by reducing the overhead in |
| 37419 |
the necessary special method lookups. Patch by Stefan Behnel. |
| 37420 |
|
| 37421 |
- bpo-31415: Add ``-X importtime`` option to show how long each import |
| 37422 |
takes. It can be used to optimize application's startup time. Support the |
| 37423 |
:envvar:`PYTHONPROFILEIMPORTTIME` as an equivalent way to enable this. |
| 37424 |
|
| 37425 |
- bpo-31410: Optimized calling wrapper and classmethod descriptors. |
| 37426 |
|
| 37427 |
- bpo-31353: :pep:`553` - Add a new built-in called ``breakpoint()`` which |
| 37428 |
calls ``sys.breakpointhook()``. By default this imports ``pdb`` and calls |
| 37429 |
``pdb.set_trace()``, but users may override ``sys.breakpointhook()`` to |
| 37430 |
call whatever debugger they want. The original value of the hook is saved |
| 37431 |
in ``sys.__breakpointhook__``. |
| 37432 |
|
| 37433 |
- bpo-17852: Maintain a list of open buffered files, flush them before |
| 37434 |
exiting the interpreter. Based on a patch from Armin Rigo. |
| 37435 |
|
| 37436 |
- bpo-31315: Fix an assertion failure in imp.create_dynamic(), when |
| 37437 |
spec.name is not a string. Patch by Oren Milman. |
| 37438 |
|
| 37439 |
- bpo-31311: Fix a crash in the ``__setstate__()`` method of |
| 37440 |
``ctypes._CData``, in case of a bad ``__dict__``. Patch by Oren Milman. |
| 37441 |
|
| 37442 |
- bpo-31293: Fix crashes in true division and multiplication of a timedelta |
| 37443 |
object by a float with a bad as_integer_ratio() method. Patch by Oren |
| 37444 |
Milman. |
| 37445 |
|
| 37446 |
- bpo-31285: Fix an assertion failure in ``warnings.warn_explicit``, when |
| 37447 |
the return value of the received loader's ``get_source()`` has a bad |
| 37448 |
``splitlines()`` method. Patch by Oren Milman. |
| 37449 |
|
| 37450 |
- bpo-30406: Make ``async`` and ``await`` proper keywords, as specified in |
| 37451 |
:pep:`492`. |
| 37452 |
|
| 37453 |
Library |
| 37454 |
------- |
| 37455 |
|
| 37456 |
- bpo-30058: Fixed buffer overflow in select.kqueue.control(). |
| 37457 |
|
| 37458 |
- bpo-31672: ``idpattern`` in ``string.Template`` matched some non-ASCII |
| 37459 |
characters. Now it uses ``-i`` regular expression local flag to avoid |
| 37460 |
non-ASCII characters. |
| 37461 |
|
| 37462 |
- bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM |
| 37463 |
exceptions. |
| 37464 |
|
| 37465 |
- bpo-31728: Prevent crashes in ``_elementtree`` due to unsafe cleanup of |
| 37466 |
``Element.text`` and ``Element.tail``. Patch by Oren Milman. |
| 37467 |
|
| 37468 |
- bpo-31671: Now ``re.compile()`` converts passed RegexFlag to normal int |
| 37469 |
object before compiling. bm_regex_compile benchmark shows 14% performance |
| 37470 |
improvements. |
| 37471 |
|
| 37472 |
- bpo-30397: The types of compiled regular objects and match objects are now |
| 37473 |
exposed as ``re.Pattern`` and ``re.Match``. This adds information in |
| 37474 |
pydoc output for the ``re`` module. |
| 37475 |
|
| 37476 |
- bpo-31675: Fixed memory leaks in Tkinter's methods splitlist() and split() |
| 37477 |
when pass a string larger than 2 GiB. |
| 37478 |
|
| 37479 |
- bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). |
| 37480 |
|
| 37481 |
- bpo-31648: Improvements to path predicates in ElementTree: Allow |
| 37482 |
whitespace around predicate parts, i.e. "[a = 'text']" instead of |
| 37483 |
requiring the less readable "[a='text']". Add support for text comparison |
| 37484 |
of the current node, like "[.='text']". Patch by Stefan Behnel. |
| 37485 |
|
| 37486 |
- bpo-30806: Fix the string representation of a netrc object. |
| 37487 |
|
| 37488 |
- bpo-31638: Add optional argument ``compressed`` to |
| 37489 |
``zipapp.create_archive``, and add option ``--compress`` to the command |
| 37490 |
line interface of ``zipapp``. |
| 37491 |
|
| 37492 |
- bpo-25351: Avoid venv activate failures with undefined variables |
| 37493 |
|
| 37494 |
- bpo-20519: Avoid ctypes use (if possible) and improve import time for |
| 37495 |
uuid. |
| 37496 |
|
| 37497 |
- bpo-28293: The regular expression cache is no longer completely dumped |
| 37498 |
when it is full. |
| 37499 |
|
| 37500 |
- bpo-31596: Added pthread_getcpuclockid() to the time module |
| 37501 |
|
| 37502 |
- bpo-27494: Make 2to3 accept a trailing comma in generator expressions. For |
| 37503 |
example, ``set(x for x in [],)`` is now allowed. |
| 37504 |
|
| 37505 |
- bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() |
| 37506 |
iterators. |
| 37507 |
|
| 37508 |
- bpo-30346: An iterator produced by itertools.groupby() iterator now |
| 37509 |
becomes exhausted after advancing the groupby iterator. |
| 37510 |
|
| 37511 |
- bpo-31556: Cancel asyncio.wait_for future faster if timeout <= 0 |
| 37512 |
|
| 37513 |
- bpo-31540: Allow passing a context object in |
| 37514 |
:class:`concurrent.futures.ProcessPoolExecutor` constructor. Also, free |
| 37515 |
job resources in :class:`concurrent.futures.ProcessPoolExecutor` earlier |
| 37516 |
to improve memory usage when a worker waits for new jobs. |
| 37517 |
|
| 37518 |
- bpo-31516: ``threading.current_thread()`` should not return a dummy thread |
| 37519 |
at shutdown. |
| 37520 |
|
| 37521 |
- bpo-31525: In the sqlite module, require the sqlite3_prepare_v2 API. Thus, |
| 37522 |
the sqlite module now requires sqlite version at least 3.3.9. |
| 37523 |
|
| 37524 |
- bpo-26510: argparse subparsers are now required by default. This matches |
| 37525 |
behaviour in Python 2. For optional subparsers, use the new parameter |
| 37526 |
``add_subparsers(required=False)``. Patch by Anthony Sottile. (As of |
| 37527 |
3.7.0rc1, the default was changed to not required as had been the case |
| 37528 |
since Python 3.3.) |
| 37529 |
|
| 37530 |
- bpo-27541: Reprs of subclasses of some collection and iterator classes |
| 37531 |
(``bytearray``, ``array.array``, ``collections.deque``, |
| 37532 |
``collections.defaultdict``, ``itertools.count``, ``itertools.repeat``) |
| 37533 |
now contain actual type name instead of hardcoded names of the base class. |
| 37534 |
|
| 37535 |
- bpo-31351: python -m ensurepip now exits with non-zero exit code if pip |
| 37536 |
bootstrapping has failed. |
| 37537 |
|
| 37538 |
- bpo-31389: ``pdb.set_trace()`` now takes an optional keyword-only argument |
| 37539 |
``header``. If given, this is printed to the console just before debugging |
| 37540 |
begins. |
| 37541 |
|
| 37542 |
Documentation |
| 37543 |
------------- |
| 37544 |
|
| 37545 |
- bpo-31537: Fix incorrect usage of ``get_history_length`` in readline |
| 37546 |
documentation example code. Patch by Brad Smith. |
| 37547 |
|
| 37548 |
- bpo-30085: The operator functions without double underscores are preferred |
| 37549 |
for clarity. The one with underscores are only kept for |
| 37550 |
back-compatibility. |
| 37551 |
|
| 37552 |
Build |
| 37553 |
----- |
| 37554 |
|
| 37555 |
- bpo-31696: Improve compiler version information in :data:`sys.version` |
| 37556 |
when Python is built with Clang. |
| 37557 |
|
| 37558 |
- bpo-31625: Stop using ranlib on static libraries. Instead, we assume ar |
| 37559 |
supports the 's' flag. |
| 37560 |
|
| 37561 |
- bpo-31624: Remove support for BSD/OS. |
| 37562 |
|
| 37563 |
- bpo-22140: Prevent double substitution of prefix in python-config.sh. |
| 37564 |
|
| 37565 |
- bpo-31569: Correct PCBuild/ case to PCbuild/ in build scripts and |
| 37566 |
documentation. |
| 37567 |
|
| 37568 |
- bpo-31536: Avoid wholesale rebuild after ``make regen-all`` if nothing |
| 37569 |
changed. |
| 37570 |
|
| 37571 |
IDLE |
| 37572 |
---- |
| 37573 |
|
| 37574 |
- bpo-31460: Simplify the API of IDLE's Module Browser. Passing a widget |
| 37575 |
instead of an flist with a root widget opens the option of creating a |
| 37576 |
browser frame that is only part of a window. Passing a full file name |
| 37577 |
instead of pieces assumed to come from a .py file opens the possibility of |
| 37578 |
browsing python files that do not end in .py. |
| 37579 |
|
| 37580 |
- bpo-31649: IDLE - Make _htest, _utest parameters keyword only. |
| 37581 |
|
| 37582 |
- bpo-31559: Remove test order dependence in idle_test.test_browser. |
| 37583 |
|
| 37584 |
- bpo-31459: Rename IDLE's module browser from Class Browser to Module |
| 37585 |
Browser. The original module-level class and method browser became a |
| 37586 |
module browser, with the addition of module-level functions, years ago. |
| 37587 |
Nested classes and functions were added yesterday. For |
| 37588 |
back-compatibility, the virtual event <<open-class-browser>>, which |
| 37589 |
appears on the Keys tab of the Settings dialog, is not changed. Patch by |
| 37590 |
Cheryl Sabella. |
| 37591 |
|
| 37592 |
- bpo-31500: Default fonts now are scaled on HiDPI displays. |
| 37593 |
|
| 37594 |
- bpo-1612262: IDLE module browser now shows nested classes and functions. |
| 37595 |
Original patches for code and tests by Guilherme Polo and Cheryl Sabella, |
| 37596 |
respectively. |
| 37597 |
|
| 37598 |
C API |
| 37599 |
----- |
| 37600 |
|
| 37601 |
- bpo-28280: Make ``PyMapping_Keys()``, ``PyMapping_Values()`` and |
| 37602 |
``PyMapping_Items()`` always return a ``list`` (rather than a ``list`` or |
| 37603 |
a ``tuple``). Patch by Oren Milman. |
| 37604 |
|
| 37605 |
- bpo-31532: Fix memory corruption due to allocator mix in getpath.c between |
| 37606 |
Py_GetPath() and Py_SetPath() |
| 37607 |
|
| 37608 |
- bpo-25658: Implement :pep:`539` for Thread Specific Storage (TSS) API: it |
| 37609 |
is a new Thread Local Storage (TLS) API to CPython which would supersede |
| 37610 |
use of the existing TLS API within the CPython interpreter, while |
| 37611 |
deprecating the existing API. PEP written by Erik M. Bray, patch by |
| 37612 |
Masayuki Yamamoto. |
| 37613 |
|
| 37614 |
|
| 37615 |
What's New in Python 3.7.0 alpha 1? |
| 37616 |
=================================== |
| 37617 |
|
| 37618 |
*Release date: 2017-09-19* |
| 37619 |
|
| 37620 |
Security |
| 37621 |
-------- |
| 37622 |
|
| 37623 |
- bpo-29781: SSLObject.version() now correctly returns None when handshake |
| 37624 |
over BIO has not been performed yet. |
| 37625 |
|
| 37626 |
- bpo-29505: Add fuzz tests for float(str), int(str), unicode(str); for |
| 37627 |
oss-fuzz. |
| 37628 |
|
| 37629 |
- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to |
| 37630 |
get security fixes. |
| 37631 |
|
| 37632 |
- bpo-30730: Prevent environment variables injection in subprocess on |
| 37633 |
Windows. Prevent passing other environment variables and command |
| 37634 |
arguments. |
| 37635 |
|
| 37636 |
- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple |
| 37637 |
security vulnerabilities including: :cve:`2017-9233` (External entity |
| 37638 |
infinite loop DoS), :cve:`2016-9063` (Integer overflow, re-fix), |
| 37639 |
:cve:`2016-0718` (Fix regression bugs from 2.2.0's fix to |
| 37640 |
:cve:`2016-0718`) and :cve:`2012-0876` (Counter hash flooding with |
| 37641 |
SipHash). Note: the :cve:`2016-5300` (Use os-specific entropy sources like |
| 37642 |
getrandom) doesn't impact Python, since Python already gets entropy from |
| 37643 |
the OS to set the expat secret using ``XML_SetHashSalt()``. |
| 37644 |
|
| 37645 |
- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For |
| 37646 |
example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the |
| 37647 |
``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an |
| 37648 |
authentication (``login@host``). |
| 37649 |
|
| 37650 |
- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of |
| 37651 |
:cve:`2016-0718` and :cve:`2016-4472`. See |
| 37652 |
https://sourceforge.net/p/expat/bugs/537/ for more information. |
| 37653 |
|
| 37654 |
Core and Builtins |
| 37655 |
----------------- |
| 37656 |
|
| 37657 |
- bpo-31490: Fix an assertion failure in ``ctypes`` class definition, in |
| 37658 |
case the class has an attribute whose name is specified in ``_anonymous_`` |
| 37659 |
but not in ``_fields_``. Patch by Oren Milman. |
| 37660 |
|
| 37661 |
- bpo-31471: Fix an assertion failure in ``subprocess.Popen()`` on Windows, |
| 37662 |
in case the env argument has a bad ``keys()`` method. Patch by Oren |
| 37663 |
Milman. |
| 37664 |
|
| 37665 |
- bpo-31418: Fix an assertion failure in ``PyErr_WriteUnraisable()`` in case |
| 37666 |
of an exception with a bad ``__module__`` attribute. Patch by Oren Milman. |
| 37667 |
|
| 37668 |
- bpo-31416: Fix assertion failures in case of a bad warnings.filters or |
| 37669 |
warnings.defaultaction. Patch by Oren Milman. |
| 37670 |
|
| 37671 |
- bpo-28411: Change direct usage of PyInterpreterState.modules to |
| 37672 |
PyImport_GetModuleDict(). Also introduce more uniformity in other code |
| 37673 |
that deals with sys.modules. This helps reduce complications when working |
| 37674 |
on sys.modules. |
| 37675 |
|
| 37676 |
- bpo-28411: Switch to the abstract API when dealing with |
| 37677 |
``PyInterpreterState.modules``. This allows later support for all dict |
| 37678 |
subclasses and other Mapping implementations. Also add a |
| 37679 |
``PyImport_GetModule()`` function to reduce a bunch of duplicated code. |
| 37680 |
|
| 37681 |
- bpo-31411: Raise a TypeError instead of SystemError in case |
| 37682 |
warnings.onceregistry is not a dictionary. Patch by Oren Milman. |
| 37683 |
|
| 37684 |
- bpo-31344: For finer control of tracing behaviour when testing the |
| 37685 |
interpreter, two new frame attributes have been added to control the |
| 37686 |
emission of particular trace events: ``f_trace_lines`` (``True`` by |
| 37687 |
default) to turn off per-line trace events; and ``f_trace_opcodes`` |
| 37688 |
(``False`` by default) to turn on per-opcode trace events. |
| 37689 |
|
| 37690 |
- bpo-31373: Fix several possible instances of undefined behavior due to |
| 37691 |
floating-point demotions. |
| 37692 |
|
| 37693 |
- bpo-30465: Location information (``lineno`` and ``col_offset``) in |
| 37694 |
f-strings is now (mostly) correct. This fixes tools like flake8 from |
| 37695 |
showing warnings on the wrong line (typically the first line of the file). |
| 37696 |
|
| 37697 |
- bpo-30860: Consolidate CPython's global runtime state under a single |
| 37698 |
struct. This improves discoverability of the runtime state. |
| 37699 |
|
| 37700 |
- bpo-31347: Fix possible undefined behavior in _PyObject_FastCall_Prepend. |
| 37701 |
|
| 37702 |
- bpo-31343: Include sys/sysmacros.h for major(), minor(), and makedev(). |
| 37703 |
GNU C libray plans to remove the functions from sys/types.h. |
| 37704 |
|
| 37705 |
- bpo-31291: Fix an assertion failure in ``zipimport.zipimporter.get_data`` |
| 37706 |
on Windows, when the return value of ``pathname.replace('/','\\')`` isn't |
| 37707 |
a string. Patch by Oren Milman. |
| 37708 |
|
| 37709 |
- bpo-31271: Fix an assertion failure in the ``write()`` method of |
| 37710 |
``io.TextIOWrapper``, when the encoder doesn't return a bytes object. |
| 37711 |
Patch by Oren Milman. |
| 37712 |
|
| 37713 |
- bpo-31243: Fix a crash in some methods of ``io.TextIOWrapper``, when the |
| 37714 |
decoder's state is invalid. Patch by Oren Milman. |
| 37715 |
|
| 37716 |
- bpo-30721: ``print`` now shows correct usage hint for using Python 2 |
| 37717 |
redirection syntax. Patch by Sanyam Khurana. |
| 37718 |
|
| 37719 |
- bpo-31070: Fix a race condition in importlib _get_module_lock(). |
| 37720 |
|
| 37721 |
- bpo-30747: Add a non-dummy implementation of _Py_atomic_store and |
| 37722 |
_Py_atomic_load on MSVC. |
| 37723 |
|
| 37724 |
- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which |
| 37725 |
doesn't call ``PyObject_GC_UnTrack()``. |
| 37726 |
|
| 37727 |
- bpo-31071: Avoid masking original TypeError in call with * unpacking when |
| 37728 |
other arguments are passed. |
| 37729 |
|
| 37730 |
- bpo-30978: str.format_map() now passes key lookup exceptions through. |
| 37731 |
Previously any exception was replaced with a KeyError exception. |
| 37732 |
|
| 37733 |
- bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state. |
| 37734 |
|
| 37735 |
- bpo-30876: Relative import from unloaded package now reimports the package |
| 37736 |
instead of failing with SystemError. Relative import from non-package now |
| 37737 |
fails with ImportError rather than SystemError. |
| 37738 |
|
| 37739 |
- bpo-30703: Improve signal delivery. Avoid using Py_AddPendingCall from |
| 37740 |
signal handler, to avoid calling signal-unsafe functions. The tests I'm |
| 37741 |
adding here fail without the rest of the patch, on Linux and OS X. This |
| 37742 |
means our signal delivery logic had defects (some signals could be lost). |
| 37743 |
|
| 37744 |
- bpo-30765: Avoid blocking in pthread_mutex_lock() when |
| 37745 |
PyThread_acquire_lock() is asked not to block. |
| 37746 |
|
| 37747 |
- bpo-31161: Make sure the 'Missing parentheses' syntax error message is |
| 37748 |
only applied to SyntaxError, not to subclasses. Patch by Martijn Pieters. |
| 37749 |
|
| 37750 |
- bpo-30814: Fixed a race condition when import a submodule from a package. |
| 37751 |
|
| 37752 |
- bpo-30736: The internal unicodedata database has been upgraded to Unicode |
| 37753 |
10.0. |
| 37754 |
|
| 37755 |
- bpo-30604: Move co_extra_freefuncs from per-thread to per-interpreter to |
| 37756 |
avoid crashes. |
| 37757 |
|
| 37758 |
- bpo-30597: ``print`` now shows expected input in custom error message when |
| 37759 |
used as a Python 2 statement. Patch by Sanyam Khurana. |
| 37760 |
|
| 37761 |
- bpo-30682: Removed a too-strict assertion that failed for certain |
| 37762 |
f-strings, such as eval("f'\\\n'") and eval("f'\\\r'"). |
| 37763 |
|
| 37764 |
- bpo-30501: The compiler now produces more optimal code for complex |
| 37765 |
condition expressions in the "if", "while" and "assert" statement, the |
| 37766 |
"if" expression, and generator expressions and comprehensions. |
| 37767 |
|
| 37768 |
- bpo-28180: Implement :pep:`538` (legacy C locale coercion). This means |
| 37769 |
that when a suitable coercion target locale is available, both the core |
| 37770 |
interpreter and locale-aware C extensions will assume the use of UTF-8 as |
| 37771 |
the default text encoding, rather than ASCII. |
| 37772 |
|
| 37773 |
- bpo-30486: Allows setting cell values for __closure__. Patch by Lisa |
| 37774 |
Roach. |
| 37775 |
|
| 37776 |
- bpo-30537: itertools.islice now accepts integer-like objects (having an |
| 37777 |
__index__ method) as start, stop, and slice arguments |
| 37778 |
|
| 37779 |
- bpo-25324: Tokens needed for parsing in Python moved to C. ``COMMENT``, |
| 37780 |
``NL`` and ``ENCODING``. This way the tokens and tok_names in the token |
| 37781 |
module don't get changed when you import the tokenize module. |
| 37782 |
|
| 37783 |
- bpo-29104: Fixed parsing backslashes in f-strings. |
| 37784 |
|
| 37785 |
- bpo-27945: Fixed various segfaults with dict when input collections are |
| 37786 |
mutated during searching, inserting or comparing. Based on patches by |
| 37787 |
Duane Griffin and Tim Mitchell. |
| 37788 |
|
| 37789 |
- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for |
| 37790 |
non-interned attribute names. Based on patch by Eryk Sun. |
| 37791 |
|
| 37792 |
- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in the |
| 37793 |
middle of resuming a chain of nested 'yield from' or 'await' calls, it's |
| 37794 |
now correctly delivered to the innermost frame. |
| 37795 |
|
| 37796 |
- bpo-28974: ``object.__format__(x, '')`` is now equivalent to ``str(x)`` |
| 37797 |
rather than ``format(str(self), '')``. |
| 37798 |
|
| 37799 |
- bpo-30024: Circular imports involving absolute imports with binding a |
| 37800 |
submodule to a name are now supported. |
| 37801 |
|
| 37802 |
- bpo-12414: sys.getsizeof() on a code object now returns the sizes which |
| 37803 |
includes the code struct and sizes of objects which it references. Patch |
| 37804 |
by Donghee Na. |
| 37805 |
|
| 37806 |
- bpo-29839: len() now raises ValueError rather than OverflowError if |
| 37807 |
__len__() returned a large negative integer. |
| 37808 |
|
| 37809 |
- bpo-11913: README.rst is now included in the list of distutils standard |
| 37810 |
READMEs and therefore included in source distributions. |
| 37811 |
|
| 37812 |
- bpo-29914: Fixed default implementations of __reduce__ and |
| 37813 |
__reduce_ex__(). object.__reduce__() no longer takes arguments, |
| 37814 |
object.__reduce_ex__() now requires one argument. |
| 37815 |
|
| 37816 |
- bpo-29949: Fix memory usage regression of set and frozenset object. |
| 37817 |
|
| 37818 |
- bpo-29935: Fixed error messages in the index() method of tuple, list and |
| 37819 |
deque when pass indices of wrong type. |
| 37820 |
|
| 37821 |
- bpo-29816: Shift operation now has less opportunity to raise |
| 37822 |
OverflowError. ValueError always is raised rather than OverflowError for |
| 37823 |
negative counts. Shifting zero with non-negative count always returns |
| 37824 |
zero. |
| 37825 |
|
| 37826 |
- bpo-24821: Fixed the slowing down to 25 times in the searching of some |
| 37827 |
unlucky Unicode characters. |
| 37828 |
|
| 37829 |
- bpo-29102: Add a unique ID to PyInterpreterState. This makes it easier to |
| 37830 |
identify each subinterpreter. |
| 37831 |
|
| 37832 |
- bpo-29894: The deprecation warning is emitted if __complex__ returns an |
| 37833 |
instance of a strict subclass of complex. In a future versions of Python |
| 37834 |
this can be an error. |
| 37835 |
|
| 37836 |
- bpo-29859: Show correct error messages when any of the pthread_* calls in |
| 37837 |
thread_pthread.h fails. |
| 37838 |
|
| 37839 |
- bpo-29849: Fix a memory leak when an ImportError is raised during from |
| 37840 |
import. |
| 37841 |
|
| 37842 |
- bpo-28856: Fix an oversight that %b format for bytes should support |
| 37843 |
objects follow the buffer protocol. |
| 37844 |
|
| 37845 |
- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused |
| 37846 |
a regression by revealing an inconsistency in how sys.path is initialized |
| 37847 |
when executing ``__main__`` from a zipfile, directory, or other import |
| 37848 |
location. The interpreter now consistently avoids ever adding the import |
| 37849 |
location's parent directory to ``sys.path``, and ensures no other |
| 37850 |
``sys.path`` entries are inadvertently modified when inserting the import |
| 37851 |
location named on the command line. |
| 37852 |
|
| 37853 |
- bpo-29568: Escaped percent "%%" in the format string for classic string |
| 37854 |
formatting no longer allows any characters between two percents. |
| 37855 |
|
| 37856 |
- bpo-29714: Fix a regression that bytes format may fail when containing |
| 37857 |
zero bytes inside. |
| 37858 |
|
| 37859 |
- bpo-29695: bool(), float(), list() and tuple() no longer take keyword |
| 37860 |
arguments. The first argument of int() can now be passes only as |
| 37861 |
positional argument. |
| 37862 |
|
| 37863 |
- bpo-28893: Set correct __cause__ for errors about invalid awaitables |
| 37864 |
returned from __aiter__ and __anext__. |
| 37865 |
|
| 37866 |
- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises |
| 37867 |
:exc:`OverflowError`. |
| 37868 |
|
| 37869 |
- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra. Patch by Brian |
| 37870 |
Coleman. |
| 37871 |
|
| 37872 |
- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. It |
| 37873 |
should raise TypeError when kwargs is not a dict. But it might cause segv |
| 37874 |
when args=NULL and kwargs is not a dict. |
| 37875 |
|
| 37876 |
- bpo-28598: Support __rmod__ for subclasses of str being called before |
| 37877 |
str.__mod__. Patch by Martijn Pieters. |
| 37878 |
|
| 37879 |
- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. Patch by |
| 37880 |
Matthieu Dartiailh. |
| 37881 |
|
| 37882 |
- bpo-29602: Fix incorrect handling of signed zeros in complex constructor |
| 37883 |
for complex subclasses and for inputs having a __complex__ method. Patch |
| 37884 |
by Serhiy Storchaka. |
| 37885 |
|
| 37886 |
- bpo-29347: Fixed possibly dereferencing undefined pointers when creating |
| 37887 |
weakref objects. |
| 37888 |
|
| 37889 |
- bpo-29463: Add ``docstring`` field to Module, ClassDef, FunctionDef, and |
| 37890 |
AsyncFunctionDef ast nodes. docstring is not first stmt in their body |
| 37891 |
anymore. It affects ``co_firstlineno`` and ``co_lnotab`` of code object |
| 37892 |
for module and class. (Reverted in :issue:`32911`.) |
| 37893 |
|
| 37894 |
- bpo-29438: Fixed use-after-free problem in key sharing dict. |
| 37895 |
|
| 37896 |
- bpo-29546: Set the 'path' and 'name' attribute on ImportError for ``from |
| 37897 |
... import ...``. |
| 37898 |
|
| 37899 |
- bpo-29546: Improve from-import error message with location |
| 37900 |
|
| 37901 |
- bpo-29478: If max_line_length=None is specified while using the Compat32 |
| 37902 |
policy, it is no longer ignored. Patch by Mircea Cosbuc. |
| 37903 |
|
| 37904 |
- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0]. |
| 37905 |
|
| 37906 |
- bpo-29337: Fixed possible BytesWarning when compare the code objects. |
| 37907 |
Warnings could be emitted at compile time. |
| 37908 |
|
| 37909 |
- bpo-29327: Fixed a crash when pass the iterable keyword argument to |
| 37910 |
sorted(). |
| 37911 |
|
| 37912 |
- bpo-29034: Fix memory leak and use-after-free in os module |
| 37913 |
(path_converter). |
| 37914 |
|
| 37915 |
- bpo-29159: Fix regression in bytes(x) when x.__index__() raises Exception. |
| 37916 |
|
| 37917 |
- bpo-29049: Call _PyObject_GC_TRACK() lazily when calling Python function. |
| 37918 |
Calling function is up to 5% faster. |
| 37919 |
|
| 37920 |
- bpo-28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCII |
| 37921 |
whitespace, not only spaces. Patch by Robert Xiao. |
| 37922 |
|
| 37923 |
- bpo-28932: Do not include <sys/random.h> if it does not exist. |
| 37924 |
|
| 37925 |
- bpo-25677: Correct the positioning of the syntax error caret for indented |
| 37926 |
blocks. Based on patch by Michael Layzell. |
| 37927 |
|
| 37928 |
- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate |
| 37929 |
form. |
| 37930 |
|
| 37931 |
- bpo-18896: Python function can now have more than 255 parameters. |
| 37932 |
collections.namedtuple() now supports tuples with more than 255 elements. |
| 37933 |
|
| 37934 |
- bpo-28596: The preferred encoding is UTF-8 on Android. Patch written by |
| 37935 |
Chi Hsuan Yen. |
| 37936 |
|
| 37937 |
- bpo-22257: Clean up interpreter startup (see :pep:`432`). |
| 37938 |
|
| 37939 |
- bpo-26919: On Android, operating system data is now always encoded/decoded |
| 37940 |
to/from UTF-8, instead of the locale encoding to avoid inconsistencies |
| 37941 |
with os.fsencode() and os.fsdecode() which are already using UTF-8. |
| 37942 |
|
| 37943 |
- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy |
| 37944 |
bug triggerable by a monkey-patched len() function. |
| 37945 |
|
| 37946 |
- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must |
| 37947 |
not convert combined table into split table. Patch written by INADA Naoki. |
| 37948 |
|
| 37949 |
- bpo-28739: f-string expressions are no longer accepted as docstrings and |
| 37950 |
by ast.literal_eval() even if they do not include expressions. |
| 37951 |
|
| 37952 |
- bpo-28512: Fixed setting the offset attribute of SyntaxError by |
| 37953 |
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject(). |
| 37954 |
|
| 37955 |
- bpo-28918: Fix the cross compilation of xxlimited when Python has been |
| 37956 |
built with Py_DEBUG defined. |
| 37957 |
|
| 37958 |
- bpo-23722: Rather than silently producing a class that doesn't support |
| 37959 |
zero-argument ``super()`` in methods, failing to pass the new |
| 37960 |
``__classcell__`` namespace entry up to ``type.__new__`` now results in a |
| 37961 |
``DeprecationWarning`` and a class that supports zero-argument |
| 37962 |
``super()``. |
| 37963 |
|
| 37964 |
- bpo-28797: Modifying the class __dict__ inside the __set_name__ method of |
| 37965 |
a descriptor that is used inside that class no longer prevents calling the |
| 37966 |
__set_name__ method of other descriptors. |
| 37967 |
|
| 37968 |
- bpo-28799: Remove the ``PyEval_GetCallStats()`` function and deprecate the |
| 37969 |
untested and undocumented ``sys.callstats()`` function. Remove the |
| 37970 |
``CALL_PROFILE`` special build: use the :func:`sys.setprofile` function, |
| 37971 |
:mod:`cProfile` or :mod:`profile` to profile function calls. |
| 37972 |
|
| 37973 |
- bpo-12844: More than 255 arguments can now be passed to a function. |
| 37974 |
|
| 37975 |
- bpo-28782: Fix a bug in the implementation ``yield from`` when checking if |
| 37976 |
the next instruction is YIELD_FROM. Regression introduced by WORDCODE |
| 37977 |
(issue #26647). |
| 37978 |
|
| 37979 |
- bpo-28774: Fix error position of the unicode error in ASCII and Latin1 |
| 37980 |
encoders when a string returned by the error handler contains multiple |
| 37981 |
non-encodable characters (non-ASCII for the ASCII codec, characters out of |
| 37982 |
the U+0000-U+00FF range for Latin1). |
| 37983 |
|
| 37984 |
- bpo-28731: Optimize _PyDict_NewPresized() to create correct size dict. |
| 37985 |
Improve speed of dict literal with constant keys up to 30%. |
| 37986 |
|
| 37987 |
- bpo-28532: Show sys.version when -V option is supplied twice. |
| 37988 |
|
| 37989 |
- bpo-27100: The with-statement now checks for __enter__ before it checks |
| 37990 |
for __exit__. This gives less confusing error messages when both methods |
| 37991 |
are missing. Patch by Jonathan Ellington. |
| 37992 |
|
| 37993 |
- bpo-28746: Fix the set_inheritable() file descriptor method on platforms |
| 37994 |
that do not have the ioctl FIOCLEX and FIONCLEX commands. |
| 37995 |
|
| 37996 |
- bpo-26920: Fix not getting the locale's charset upon initializing the |
| 37997 |
interpreter, on platforms that do not have langinfo. |
| 37998 |
|
| 37999 |
- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X |
| 38000 |
when decode astral characters. Patch by Xiang Zhang. |
| 38001 |
|
| 38002 |
- bpo-28665: Improve speed of the STORE_DEREF opcode by 40%. |
| 38003 |
|
| 38004 |
- bpo-19398: Extra slash no longer added to sys.path components in case of |
| 38005 |
empty compile-time PYTHONPATH components. |
| 38006 |
|
| 38007 |
- bpo-28621: Sped up converting int to float by reusing faster bits counting |
| 38008 |
implementation. Patch by Adrian Wielgosik. |
| 38009 |
|
| 38010 |
- bpo-28580: Optimize iterating split table values. Patch by Xiang Zhang. |
| 38011 |
|
| 38012 |
- bpo-28583: PyDict_SetDefault didn't combine split table when needed. Patch |
| 38013 |
by Xiang Zhang. |
| 38014 |
|
| 38015 |
- bpo-28128: Deprecation warning for invalid str and byte escape sequences |
| 38016 |
now prints better information about where the error occurs. Patch by |
| 38017 |
Serhiy Storchaka and Eric Smith. |
| 38018 |
|
| 38019 |
- bpo-28509: dict.update() no longer allocate unnecessary large memory. |
| 38020 |
|
| 38021 |
- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug |
| 38022 |
build. |
| 38023 |
|
| 38024 |
- bpo-28517: Fixed of-by-one error in the peephole optimizer that caused |
| 38025 |
keeping unreachable code. |
| 38026 |
|
| 38027 |
- bpo-28214: Improved exception reporting for problematic __set_name__ |
| 38028 |
attributes. |
| 38029 |
|
| 38030 |
- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception |
| 38031 |
loss in PyTraceBack_Here(). |
| 38032 |
|
| 38033 |
- bpo-28183: Optimize and cleanup dict iteration. |
| 38034 |
|
| 38035 |
- bpo-26081: Added C implementation of asyncio.Future. Original patch by |
| 38036 |
Yury Selivanov. |
| 38037 |
|
| 38038 |
- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). |
| 38039 |
Patch by Xiang Zhang. |
| 38040 |
|
| 38041 |
- bpo-28376: The type of long range iterator is now registered as Iterator. |
| 38042 |
Patch by Oren Milman. |
| 38043 |
|
| 38044 |
- bpo-28376: Creating instances of range_iterator by calling range_iterator |
| 38045 |
type now is disallowed. Calling iter() on range instance is the only way. |
| 38046 |
Patch by Oren Milman. |
| 38047 |
|
| 38048 |
- bpo-26906: Resolving special methods of uninitialized type now causes |
| 38049 |
implicit initialization of the type instead of a fail. |
| 38050 |
|
| 38051 |
- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original |
| 38052 |
patch by Niklas Koep. |
| 38053 |
|
| 38054 |
- bpo-24098: Fixed possible crash when AST is changed in process of |
| 38055 |
compiling it. |
| 38056 |
|
| 38057 |
- bpo-28201: Dict reduces possibility of 2nd conflict in hash table when |
| 38058 |
hashes have same lower bits. |
| 38059 |
|
| 38060 |
- bpo-28350: String constants with null character no longer interned. |
| 38061 |
|
| 38062 |
- bpo-26617: Fix crash when GC runs during weakref callbacks. |
| 38063 |
|
| 38064 |
- bpo-27942: String constants now interned recursively in tuples and |
| 38065 |
frozensets. |
| 38066 |
|
| 38067 |
- bpo-28289: ImportError.__init__ now resets not specified attributes. |
| 38068 |
|
| 38069 |
- bpo-21578: Fixed misleading error message when ImportError called with |
| 38070 |
invalid keyword args. |
| 38071 |
|
| 38072 |
- bpo-28203: Fix incorrect type in complex(1.0, {2:3}) error message. Patch |
| 38073 |
by Soumya Sharma. |
| 38074 |
|
| 38075 |
- bpo-28086: Single var-positional argument of tuple subtype was passed |
| 38076 |
unscathed to the C-defined function. Now it is converted to exact tuple. |
| 38077 |
|
| 38078 |
- bpo-28214: Now __set_name__ is looked up on the class instead of the |
| 38079 |
instance. |
| 38080 |
|
| 38081 |
- bpo-27955: Fallback on reading /dev/urandom device when the getrandom() |
| 38082 |
syscall fails with EPERM, for example when blocked by SECCOMP. |
| 38083 |
|
| 38084 |
- bpo-28192: Don't import readline in isolated mode. |
| 38085 |
|
| 38086 |
- bpo-27441: Remove some redundant assignments to ob_size in longobject.c. |
| 38087 |
Thanks Oren Milman. |
| 38088 |
|
| 38089 |
- bpo-27222: Clean up redundant code in long_rshift function. Thanks Oren |
| 38090 |
Milman. |
| 38091 |
|
| 38092 |
- Upgrade internal unicode databases to Unicode version 9.0.0. |
| 38093 |
|
| 38094 |
- bpo-28131: Fix a regression in zipimport's compile_source(). zipimport |
| 38095 |
should use the same optimization level as the interpreter. |
| 38096 |
|
| 38097 |
- bpo-28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly |
| 38098 |
optimize memcpy(). |
| 38099 |
|
| 38100 |
- bpo-28120: Fix dict.pop() for splitted dictionary when trying to remove a |
| 38101 |
"pending key" (Not yet inserted in split-table). Patch by Xiang Zhang. |
| 38102 |
|
| 38103 |
- bpo-26182: Raise DeprecationWarning when async and await keywords are used |
| 38104 |
as variable/attribute/class/function name. |
| 38105 |
|
| 38106 |
- bpo-26182: Fix a refleak in code that raises DeprecationWarning. |
| 38107 |
|
| 38108 |
- bpo-28721: Fix asynchronous generators aclose() and athrow() to handle |
| 38109 |
StopAsyncIteration propagation properly. |
| 38110 |
|
| 38111 |
- bpo-26110: Speed-up method calls: add LOAD_METHOD and CALL_METHOD opcodes. |
| 38112 |
|
| 38113 |
Library |
| 38114 |
------- |
| 38115 |
|
| 38116 |
- bpo-31499: xml.etree: Fix a crash when a parser is part of a reference |
| 38117 |
cycle. |
| 38118 |
|
| 38119 |
- bpo-31482: ``random.seed()`` now works with bytes in version=1 |
| 38120 |
|
| 38121 |
- bpo-28556: typing.get_type_hints now finds the right globalns for classes |
| 38122 |
and modules by default (when no ``globalns`` was specified by the caller). |
| 38123 |
|
| 38124 |
- bpo-28556: Speed improvements to the ``typing`` module. Original PRs by |
| 38125 |
Ivan Levkivskyi and Mitar. |
| 38126 |
|
| 38127 |
- bpo-31544: The C accelerator module of ElementTree ignored exceptions |
| 38128 |
raised when looking up TreeBuilder target methods in XMLParser(). |
| 38129 |
|
| 38130 |
- bpo-31234: socket.create_connection() now fixes manually a reference |
| 38131 |
cycle: clear the variable storing the last exception on success. |
| 38132 |
|
| 38133 |
- bpo-31457: LoggerAdapter objects can now be nested. |
| 38134 |
|
| 38135 |
- bpo-31431: SSLContext.check_hostname now automatically sets |
| 38136 |
SSLContext.verify_mode to ssl.CERT_REQUIRED instead of failing with a |
| 38137 |
ValueError. |
| 38138 |
|
| 38139 |
- bpo-31233: socketserver.ThreadingMixIn now keeps a list of non-daemonic |
| 38140 |
threads to wait until all these threads complete in server_close(). |
| 38141 |
|
| 38142 |
- bpo-28638: Changed the implementation strategy for |
| 38143 |
collections.namedtuple() to substantially reduce the use of exec() in |
| 38144 |
favor of precomputed methods. As a result, the *verbose* parameter and |
| 38145 |
*_source* attribute are no longer supported. The benefits include 1) |
| 38146 |
having a smaller memory footprint for applications using multiple named |
| 38147 |
tuples, 2) faster creation of the named tuple class (approx 4x to 6x |
| 38148 |
depending on how it is measured), and 3) minor speed-ups for instance |
| 38149 |
creation using __new__, _make, and _replace. (The primary patch |
| 38150 |
contributor is Jelle Zijlstra with further improvements by INADA Naoki, |
| 38151 |
Serhiy Storchaka, and Raymond Hettinger.) |
| 38152 |
|
| 38153 |
- bpo-31400: Improves SSL error handling to avoid losing error numbers. |
| 38154 |
|
| 38155 |
- bpo-27629: Make return types of SSLContext.wrap_bio() and |
| 38156 |
SSLContext.wrap_socket() customizable. |
| 38157 |
|
| 38158 |
- bpo-28958: ssl.SSLContext() now uses OpenSSL error information when a |
| 38159 |
context cannot be instantiated. |
| 38160 |
|
| 38161 |
- bpo-28182: The SSL module now raises SSLCertVerificationError when OpenSSL |
| 38162 |
fails to verify the peer's certificate. The exception contains more |
| 38163 |
information about the error. |
| 38164 |
|
| 38165 |
- bpo-27340: SSLSocket.sendall() now uses memoryview to create slices of |
| 38166 |
data. This fixes support for all bytes-like object. It is also more |
| 38167 |
efficient and avoids costly copies. |
| 38168 |
|
| 38169 |
- bpo-14191: A new function |
| 38170 |
``argparse.ArgumentParser.parse_intermixed_args`` provides the ability to |
| 38171 |
parse command lines where there user intermixes options and positional |
| 38172 |
arguments. |
| 38173 |
|
| 38174 |
- bpo-31178: Fix string concatenation bug in rare error path in the |
| 38175 |
subprocess module |
| 38176 |
|
| 38177 |
- bpo-31350: Micro-optimize :func:`asyncio._get_running_loop` to become up |
| 38178 |
to 10% faster. |
| 38179 |
|
| 38180 |
- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of |
| 38181 |
partial characters for UTF-8 input (libexpat bug 115): |
| 38182 |
https://github.com/libexpat/libexpat/issues/115 |
| 38183 |
|
| 38184 |
- bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3. |
| 38185 |
|
| 38186 |
- bpo-1198569: ``string.Template`` subclasses can optionally define |
| 38187 |
``braceidpattern`` if they want to specify different placeholder patterns |
| 38188 |
inside and outside the braces. If None (the default) it falls back to |
| 38189 |
``idpattern``. |
| 38190 |
|
| 38191 |
- bpo-31326: concurrent.futures.ProcessPoolExecutor.shutdown() now |
| 38192 |
explicitly closes the call queue. Moreover, shutdown(wait=True) now also |
| 38193 |
join the call queue thread, to prevent leaking a dangling thread. |
| 38194 |
|
| 38195 |
- bpo-27144: The ``map()`` and ``as_completed()`` iterators in |
| 38196 |
``concurrent.futures`` now avoid keeping a reference to yielded objects. |
| 38197 |
|
| 38198 |
- bpo-31281: Fix ``fileinput.FileInput(files, inplace=True)`` when ``files`` |
| 38199 |
contain ``pathlib.Path`` objects. |
| 38200 |
|
| 38201 |
- bpo-10746: Fix ctypes producing wrong :pep:`3118` type codes for integer |
| 38202 |
types. |
| 38203 |
|
| 38204 |
- bpo-27584: ``AF_VSOCK`` has been added to the socket interface which |
| 38205 |
allows communication between virtual machines and their host. |
| 38206 |
|
| 38207 |
- bpo-22536: The subprocess module now sets the filename when |
| 38208 |
FileNotFoundError is raised on POSIX systems due to the executable or cwd |
| 38209 |
not being found. |
| 38210 |
|
| 38211 |
- bpo-29741: Update some methods in the _pyio module to also accept integer |
| 38212 |
types. Patch by Oren Milman. |
| 38213 |
|
| 38214 |
- bpo-31249: concurrent.futures: WorkItem.run() used by ThreadPoolExecutor |
| 38215 |
now breaks a reference cycle between an exception object and the WorkItem |
| 38216 |
object. |
| 38217 |
|
| 38218 |
- bpo-31247: xmlrpc.server now explicitly breaks reference cycles when using |
| 38219 |
sys.exc_info() in code handling exceptions. |
| 38220 |
|
| 38221 |
- bpo-23835: configparser: reading defaults in the ``ConfigParser()`` |
| 38222 |
constructor is now using ``read_dict()``, making its behavior consistent |
| 38223 |
with the rest of the parser. Non-string keys and values in the defaults |
| 38224 |
dictionary are now being implicitly converted to strings. Patch by James |
| 38225 |
Tocknell. |
| 38226 |
|
| 38227 |
- bpo-31238: pydoc: the stop() method of the private ServerThread class now |
| 38228 |
waits until DocServer.serve_until_quit() completes and then explicitly |
| 38229 |
sets its docserver attribute to None to break a reference cycle. |
| 38230 |
|
| 38231 |
- bpo-5001: Many asserts in ``multiprocessing`` are now more informative, |
| 38232 |
and some error types have been changed to more specific ones. |
| 38233 |
|
| 38234 |
- bpo-31109: Convert zipimport to use Argument Clinic. |
| 38235 |
|
| 38236 |
- bpo-30102: The ssl and hashlib modules now call |
| 38237 |
OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function |
| 38238 |
detects CPU features and enables optimizations on some CPU architectures |
| 38239 |
such as POWER8. Patch is based on research from Gustavo Serra Scalet. |
| 38240 |
|
| 38241 |
- bpo-18966: Non-daemonic threads created by a multiprocessing.Process are |
| 38242 |
now joined on child exit. |
| 38243 |
|
| 38244 |
- bpo-31183: ``dis`` now works with asynchronous generator and coroutine |
| 38245 |
objects. Patch by George Collins based on diagnosis by Luciano Ramalho. |
| 38246 |
|
| 38247 |
- bpo-5001: There are a number of uninformative asserts in the |
| 38248 |
``multiprocessing`` module, as noted in issue 5001. This change fixes two |
| 38249 |
of the most potentially problematic ones, since they are in |
| 38250 |
error-reporting code, in the ``multiprocessing.managers.convert_to_error`` |
| 38251 |
function. (It also makes more informative a ValueError message.) The only |
| 38252 |
potentially problematic change is that the AssertionError is now a |
| 38253 |
TypeError; however, this should also help distinguish it from an |
| 38254 |
AssertionError being *reported* by the function/its caller (such as in |
| 38255 |
issue 31169). - Patch by Allen W. Smith (drallensmith on github). |
| 38256 |
|
| 38257 |
- bpo-31185: Fixed miscellaneous errors in asyncio speedup module. |
| 38258 |
|
| 38259 |
- bpo-31151: socketserver.ForkingMixIn.server_close() now waits until all |
| 38260 |
child processes completed to prevent leaking zombie processes. |
| 38261 |
|
| 38262 |
- bpo-31072: Add an ``include_file`` parameter to |
| 38263 |
``zipapp.create_archive()`` |
| 38264 |
|
| 38265 |
- bpo-24700: Optimize array.array comparison. It is now from 10x up to 70x |
| 38266 |
faster when comparing arrays holding values of the same integer type. |
| 38267 |
|
| 38268 |
- bpo-31135: ttk: fix the destroy() method of LabeledScale and OptionMenu |
| 38269 |
classes. Call the parent destroy() method even if the used attribute |
| 38270 |
doesn't exist. The LabeledScale.destroy() method now also explicitly |
| 38271 |
clears label and scale attributes to help the garbage collector to destroy |
| 38272 |
all widgets. |
| 38273 |
|
| 38274 |
- bpo-31107: Fix ``copyreg._slotnames()`` mangled attribute calculation for |
| 38275 |
classes whose name begins with an underscore. Patch by Shane Harvey. |
| 38276 |
|
| 38277 |
- bpo-31080: Allow ``logging.config.fileConfig`` to accept kwargs and/or |
| 38278 |
args. |
| 38279 |
|
| 38280 |
- bpo-30897: ``pathlib.Path`` objects now include an ``is_mount()`` method |
| 38281 |
(only implemented on POSIX). This is similar to ``os.path.ismount(p)``. |
| 38282 |
Patch by Cooper Ry Lees. |
| 38283 |
|
| 38284 |
- bpo-31061: Fixed a crash when using asyncio and threads. |
| 38285 |
|
| 38286 |
- bpo-30987: Added support for CAN ISO-TP protocol in the socket module. |
| 38287 |
|
| 38288 |
- bpo-30522: Added a ``setStream`` method to ``logging.StreamHandler`` to |
| 38289 |
allow the stream to be set after creation. |
| 38290 |
|
| 38291 |
- bpo-30502: Fix handling of long oids in ssl. Based on patch by Christian |
| 38292 |
Heimes. |
| 38293 |
|
| 38294 |
- bpo-5288: Support tzinfo objects with sub-minute offsets. |
| 38295 |
|
| 38296 |
- bpo-30919: Fix shared memory performance regression in multiprocessing in |
| 38297 |
3.x. Shared memory used anonymous memory mappings in 2.x, while 3.x mmaps |
| 38298 |
actual files. Try to be careful to do as little disk I/O as possible. |
| 38299 |
|
| 38300 |
- bpo-26732: Fix too many fds in processes started with the "forkserver" |
| 38301 |
method. A child process would inherit as many fds as the number of |
| 38302 |
still-running children. |
| 38303 |
|
| 38304 |
- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound |
| 38305 |
builtin functions. Patch by Aaron Gallagher. |
| 38306 |
|
| 38307 |
- bpo-30961: Fix decrementing a borrowed reference in tracemalloc. |
| 38308 |
|
| 38309 |
- bpo-19896: Fix multiprocessing.sharedctypes to recognize typecodes ``'q'`` |
| 38310 |
and ``'Q'``. |
| 38311 |
|
| 38312 |
- bpo-30946: Remove obsolete code in readline module for platforms where GNU |
| 38313 |
readline is older than 2.1 or where select() is not available. |
| 38314 |
|
| 38315 |
- bpo-25684: Change ``ttk.OptionMenu`` radiobuttons to be unique across |
| 38316 |
instances of ``OptionMenu``. |
| 38317 |
|
| 38318 |
- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the |
| 38319 |
thread completes, even if the thread was started by the same process which |
| 38320 |
created the queue. |
| 38321 |
|
| 38322 |
- bpo-29854: Fix segfault in readline when using readline's history-size |
| 38323 |
option. Patch by Nir Soffer. |
| 38324 |
|
| 38325 |
- bpo-30794: Added multiprocessing.Process.kill method to terminate using |
| 38326 |
the SIGKILL signal on Unix. |
| 38327 |
|
| 38328 |
- bpo-30319: socket.close() now ignores ECONNRESET error. |
| 38329 |
|
| 38330 |
- bpo-30828: Fix out of bounds write in |
| 38331 |
``asyncio.CFuture.remove_done_callback()``. |
| 38332 |
|
| 38333 |
- bpo-30302: Use keywords in the ``repr`` of ``datetime.timedelta``. |
| 38334 |
|
| 38335 |
- bpo-30807: signal.setitimer() may disable the timer when passed a tiny |
| 38336 |
value. Tiny values (such as 1e-6) are valid non-zero values for |
| 38337 |
setitimer(), which is specified as taking microsecond-resolution |
| 38338 |
intervals. However, on some platform, our conversion routine could convert |
| 38339 |
1e-6 into a zero interval, therefore disabling the timer instead of |
| 38340 |
(re-)scheduling it. |
| 38341 |
|
| 38342 |
- bpo-30441: Fix bug when modifying os.environ while iterating over it |
| 38343 |
|
| 38344 |
- bpo-29585: Avoid importing ``sysconfig`` from ``site`` to improve startup |
| 38345 |
speed. Python startup is about 5% faster on Linux and 30% faster on macOS. |
| 38346 |
|
| 38347 |
- bpo-29293: Add missing parameter "n" on |
| 38348 |
multiprocessing.Condition.notify(). The doc claims |
| 38349 |
multiprocessing.Condition behaves like threading.Condition, but its |
| 38350 |
notify() method lacked the optional "n" argument (to specify the number of |
| 38351 |
sleepers to wake up) that threading.Condition.notify() accepts. |
| 38352 |
|
| 38353 |
- bpo-30532: Fix email header value parser dropping folding white space in |
| 38354 |
certain cases. |
| 38355 |
|
| 38356 |
- bpo-30596: Add a ``close()`` method to ``multiprocessing.Process``. |
| 38357 |
|
| 38358 |
- bpo-9146: Fix a segmentation fault in _hashopenssl when standard hash |
| 38359 |
functions such as md5 are not available in the linked OpenSSL library. As |
| 38360 |
in some special FIPS-140 build environments. |
| 38361 |
|
| 38362 |
- bpo-29169: Update zlib to 1.2.11. |
| 38363 |
|
| 38364 |
- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that |
| 38365 |
contains CR or LF. Patch by Donghee Na. |
| 38366 |
|
| 38367 |
- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called |
| 38368 |
with bytes-like argument. |
| 38369 |
|
| 38370 |
- bpo-30746: Prohibited the '=' character in environment variable names in |
| 38371 |
``os.putenv()`` and ``os.spawn*()``. |
| 38372 |
|
| 38373 |
- bpo-30664: The description of a unittest subtest now preserves the order |
| 38374 |
of keyword arguments of TestCase.subTest(). |
| 38375 |
|
| 38376 |
- bpo-21071: struct.Struct.format type is now :class:`str` instead of |
| 38377 |
:class:`bytes`. |
| 38378 |
|
| 38379 |
- bpo-29212: Fix concurrent.futures.thread.ThreadPoolExecutor threads to |
| 38380 |
have a non repr() based thread name by default when no thread_name_prefix |
| 38381 |
is supplied. They will now identify themselves as |
| 38382 |
"ThreadPoolExecutor-y_n". |
| 38383 |
|
| 38384 |
- bpo-29755: Fixed the lgettext() family of functions in the gettext module. |
| 38385 |
They now always return bytes. |
| 38386 |
|
| 38387 |
- bpo-30616: Functional API of enum allows to create empty enums. Patched by |
| 38388 |
Donghee Na |
| 38389 |
|
| 38390 |
- bpo-30038: Fix race condition between signal delivery and wakeup file |
| 38391 |
descriptor. Patch by Nathaniel Smith. |
| 38392 |
|
| 38393 |
- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings. |
| 38394 |
|
| 38395 |
- bpo-24744: pkgutil.walk_packages function now raises ValueError if *path* |
| 38396 |
is a string. Patch by Sanyam Khurana. |
| 38397 |
|
| 38398 |
- bpo-24484: Avoid race condition in multiprocessing cleanup. |
| 38399 |
|
| 38400 |
- bpo-30589: Fix multiprocessing.Process.exitcode to return the opposite of |
| 38401 |
the signal number when the process is killed by a signal (instead of 255) |
| 38402 |
when using the "forkserver" method. |
| 38403 |
|
| 38404 |
- bpo-28994: The traceback no longer displayed for SystemExit raised in a |
| 38405 |
callback registered by atexit. |
| 38406 |
|
| 38407 |
- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was |
| 38408 |
called. |
| 38409 |
|
| 38410 |
- bpo-30645: Fix path calculation in ``imp.load_package()``, fixing it for |
| 38411 |
cases when a package is only shipped with bytecodes. Patch by Alexandru |
| 38412 |
Ardelean. |
| 38413 |
|
| 38414 |
- bpo-11822: The dis.dis() function now is able to disassemble nested code |
| 38415 |
objects. |
| 38416 |
|
| 38417 |
- bpo-30624: selectors does not take KeyboardInterrupt and SystemExit into |
| 38418 |
account, leaving a fd in a bad state in case of error. Patch by Giampaolo |
| 38419 |
Rodola'. |
| 38420 |
|
| 38421 |
- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader |
| 38422 |
in non-blocking mode if it succeeded to acquire the lock but the acquire |
| 38423 |
took longer than the timeout. |
| 38424 |
|
| 38425 |
- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add |
| 38426 |
support for ContextManager on all versions. Original PRs by Jelle Zijlstra |
| 38427 |
and Ivan Levkivskyi |
| 38428 |
|
| 38429 |
- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a |
| 38430 |
bytes instance with misplaced inline modifier. Patch by Roy Williams. |
| 38431 |
|
| 38432 |
- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl |
| 38433 |
implementation. Patch by Michaël Sghaïer. |
| 38434 |
|
| 38435 |
- bpo-29743: Closing transport during handshake process leaks open socket. |
| 38436 |
Patch by Nikolay Kim |
| 38437 |
|
| 38438 |
- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu |
| 38439 |
Sornay. |
| 38440 |
|
| 38441 |
- bpo-30014: modify() method of poll(), epoll() and devpoll() based classes |
| 38442 |
of selectors module is around 10% faster. Patch by Giampaolo Rodola'. |
| 38443 |
|
| 38444 |
- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore |
| 38445 |
EINVAL on stdin.write() if the child process is still running but closed |
| 38446 |
the pipe. |
| 38447 |
|
| 38448 |
- bpo-30463: Addded empty __slots__ to abc.ABC. This allows subclassers to |
| 38449 |
deny __dict__ and __weakref__ creation. Patch by Aaron Hall. |
| 38450 |
|
| 38451 |
- bpo-30520: Loggers are now pickleable. |
| 38452 |
|
| 38453 |
- bpo-30557: faulthandler now correctly filters and displays exception codes |
| 38454 |
on Windows |
| 38455 |
|
| 38456 |
- bpo-30526: Add TextIOWrapper.reconfigure() and a |
| 38457 |
TextIOWrapper.write_through attribute. |
| 38458 |
|
| 38459 |
- bpo-30245: Fix possible overflow when organize struct.pack_into error |
| 38460 |
message. Patch by Yuan Liu. |
| 38461 |
|
| 38462 |
- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot |
| 38463 |
handle IPv6 addresses. |
| 38464 |
|
| 38465 |
- bpo-16500: Allow registering at-fork handlers. |
| 38466 |
|
| 38467 |
- bpo-30470: Deprecate invalid ctypes call protection on Windows. Patch by |
| 38468 |
Mariatta Wijaya. |
| 38469 |
|
| 38470 |
- bpo-30414: multiprocessing.Queue._feed background running thread do not |
| 38471 |
break from main loop on exception. |
| 38472 |
|
| 38473 |
- bpo-30003: Fix handling escape characters in HZ codec. Based on patch by |
| 38474 |
Ma Lin. |
| 38475 |
|
| 38476 |
- bpo-30149: inspect.signature() now supports callables with |
| 38477 |
variable-argument parameters wrapped with partialmethod. Patch by Donghee |
| 38478 |
Na. |
| 38479 |
|
| 38480 |
- bpo-30436: importlib.find_spec() raises ModuleNotFoundError instead of |
| 38481 |
AttributeError if the specified parent module is not a package (i.e. lacks |
| 38482 |
a __path__ attribute). |
| 38483 |
|
| 38484 |
- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn* |
| 38485 |
and *forkserver* start methods. |
| 38486 |
|
| 38487 |
- bpo-30375: Warnings emitted when compile a regular expression now always |
| 38488 |
point to the line in the user code. Previously they could point into |
| 38489 |
inners of the re module if emitted from inside of groups or conditionals. |
| 38490 |
|
| 38491 |
- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error |
| 38492 |
(code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted. |
| 38493 |
This error occurs sometimes on SSL connections. |
| 38494 |
|
| 38495 |
- bpo-29196: Removed previously deprecated in Python 2.4 classes Plist, Dict |
| 38496 |
and _InternalDict in the plistlib module. Dict values in the result of |
| 38497 |
functions readPlist() and readPlistFromBytes() are now normal dicts. You |
| 38498 |
no longer can use attribute access to access items of these dictionaries. |
| 38499 |
|
| 38500 |
- bpo-9850: The :mod:`macpath` is now deprecated and will be removed in |
| 38501 |
Python 3.8. |
| 38502 |
|
| 38503 |
- bpo-30299: Compiling regular expression in debug mode on CPython now |
| 38504 |
displays the compiled bytecode in human readable form. |
| 38505 |
|
| 38506 |
- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running |
| 38507 |
coroutine and the coroutine returned without any more ``await``. |
| 38508 |
|
| 38509 |
- bpo-30266: contextlib.AbstractContextManager now supports |
| 38510 |
anti-registration by setting __enter__ = None or __exit__ = None, |
| 38511 |
following the pattern introduced in bpo-25958. Patch by Jelle Zijlstra. |
| 38512 |
|
| 38513 |
- bpo-30340: Enhanced regular expressions optimization. This increased the |
| 38514 |
performance of matching some patterns up to 25 times. |
| 38515 |
|
| 38516 |
- bpo-30298: Weaken the condition of deprecation warnings for inline |
| 38517 |
modifiers. Now allowed several subsequential inline modifiers at the start |
| 38518 |
of the pattern (e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and |
| 38519 |
comments now are allowed before and between inline modifiers (e.g. ``'(?x) |
| 38520 |
(?i) (?s)...'``). |
| 38521 |
|
| 38522 |
- bpo-30285: Optimized case-insensitive matching and searching of regular |
| 38523 |
expressions. |
| 38524 |
|
| 38525 |
- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma |
| 38526 |
Lin. |
| 38527 |
|
| 38528 |
- bpo-29979: rewrite cgi.parse_multipart, reusing the FieldStorage class and |
| 38529 |
making its results consistent with those of FieldStorage for |
| 38530 |
multipart/form-data requests. Patch by Pierre Quentel. |
| 38531 |
|
| 38532 |
- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. |
| 38533 |
Misusing them could cause memory leaks or crashes. Now scanner and |
| 38534 |
encoder objects are completely initialized in the __new__ methods. |
| 38535 |
|
| 38536 |
- bpo-30215: Compiled regular expression objects with the re.LOCALE flag no |
| 38537 |
longer depend on the locale at compile time. Only the locale at matching |
| 38538 |
time affects the result of matching. |
| 38539 |
|
| 38540 |
- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process |
| 38541 |
when Ctrl-C is received. |
| 38542 |
|
| 38543 |
- bpo-30103: binascii.b2a_uu() and uu.encode() now support using ``'`'`` as |
| 38544 |
zero instead of space. |
| 38545 |
|
| 38546 |
- bpo-28556: Various updates to typing module: add typing.NoReturn type, use |
| 38547 |
WrapperDescriptorType, minor bug-fixes. Original PRs by Jim |
| 38548 |
Fasarakis-Hilliard and Ivan Levkivskyi. |
| 38549 |
|
| 38550 |
- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux. |
| 38551 |
|
| 38552 |
- bpo-30228: The seek() and tell() methods of io.FileIO now set the internal |
| 38553 |
seekable attribute to avoid one syscall on open() (in buffered or text |
| 38554 |
mode). |
| 38555 |
|
| 38556 |
- bpo-30190: unittest's assertAlmostEqual and assertNotAlmostEqual provide a |
| 38557 |
better message in case of failure which includes the difference between |
| 38558 |
left and right arguments. (patch by Giampaolo Rodola') |
| 38559 |
|
| 38560 |
- bpo-30101: Add support for curses.A_ITALIC. |
| 38561 |
|
| 38562 |
- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch |
| 38563 |
by Nate Soares. |
| 38564 |
|
| 38565 |
- bpo-29960: Preserve generator state when _random.Random.setstate() raises |
| 38566 |
an exception. Patch by Bryan Olson. |
| 38567 |
|
| 38568 |
- bpo-30070: Fixed leaks and crashes in errors handling in the parser |
| 38569 |
module. |
| 38570 |
|
| 38571 |
- bpo-22352: Column widths in the output of dis.dis() are now adjusted for |
| 38572 |
large line numbers and instruction offsets. |
| 38573 |
|
| 38574 |
- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when |
| 38575 |
readline() or __next__() respectively return non-sizeable object. Fixed |
| 38576 |
possible other errors caused by not checking results of PyObject_Size(), |
| 38577 |
PySequence_Size(), or PyMapping_Size(). |
| 38578 |
|
| 38579 |
- bpo-30218: Fix PathLike support for shutil.unpack_archive. Patch by Jelle |
| 38580 |
Zijlstra. |
| 38581 |
|
| 38582 |
- bpo-10076: Compiled regular expression and match objects in the re module |
| 38583 |
now support copy.copy() and copy.deepcopy() (they are considered atomic). |
| 38584 |
|
| 38585 |
- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint |
| 38586 |
is present. |
| 38587 |
|
| 38588 |
- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True. |
| 38589 |
Patch by Armin Rigo. |
| 38590 |
|
| 38591 |
- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in |
| 38592 |
contextlib.contextmanager. Patch by Siddharth Velankar. |
| 38593 |
|
| 38594 |
- bpo-26187: Test that sqlite3 trace callback is not called multiple times |
| 38595 |
when schema is changing. Indirectly fixed by switching to use |
| 38596 |
sqlite3_prepare_v2() in bpo-9303. Patch by Aviv Palivoda. |
| 38597 |
|
| 38598 |
- bpo-30017: Allowed calling the close() method of the zip entry writer |
| 38599 |
object multiple times. Writing to a closed writer now always produces a |
| 38600 |
ValueError. |
| 38601 |
|
| 38602 |
- bpo-29998: Pickling and copying ImportError now preserves name and path |
| 38603 |
attributes. |
| 38604 |
|
| 38605 |
- bpo-29995: re.escape() now escapes only regex special characters. |
| 38606 |
|
| 38607 |
- bpo-29962: Add math.remainder operation, implementing remainder as |
| 38608 |
specified in IEEE 754. |
| 38609 |
|
| 38610 |
- bpo-29649: Improve struct.pack_into() exception messages for problems with |
| 38611 |
the buffer size and offset. Patch by Andrew Nester. |
| 38612 |
|
| 38613 |
- bpo-29654: Support If-Modified-Since HTTP header (browser cache). Patch |
| 38614 |
by Pierre Quentel. |
| 38615 |
|
| 38616 |
- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects. |
| 38617 |
Patch by Sanjay Sundaresan. |
| 38618 |
|
| 38619 |
- bpo-29953: Fixed memory leaks in the replace() method of datetime and time |
| 38620 |
objects when pass out of bound fold argument. |
| 38621 |
|
| 38622 |
- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering |
| 38623 |
long runs of empty iterables. |
| 38624 |
|
| 38625 |
- bpo-10030: Sped up reading encrypted ZIP files by 2 times. |
| 38626 |
|
| 38627 |
- bpo-29204: Element.getiterator() and the html parameter of XMLParser() |
| 38628 |
were deprecated only in the documentation (since Python 3.2 and 3.4 |
| 38629 |
correspondingly). Now using them emits a deprecation warning. |
| 38630 |
|
| 38631 |
- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions |
| 38632 |
and wrong types. |
| 38633 |
|
| 38634 |
- bpo-25996: Added support of file descriptors in os.scandir() on Unix. |
| 38635 |
os.fwalk() is sped up by 2 times by using os.scandir(). |
| 38636 |
|
| 38637 |
- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an |
| 38638 |
exception at the very first of an iterable may swallow the exception or |
| 38639 |
make the program hang. Patch by Davin Potts and Xiang Zhang. |
| 38640 |
|
| 38641 |
- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a |
| 38642 |
reference cycle to not keep objects alive longer than expected. |
| 38643 |
|
| 38644 |
- bpo-29901: The zipapp module now supports general path-like objects, not |
| 38645 |
just pathlib.Path. |
| 38646 |
|
| 38647 |
- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when |
| 38648 |
the OS gives priority to errors such as EACCES over EEXIST. |
| 38649 |
|
| 38650 |
- bpo-29861: Release references to tasks, their arguments and their results |
| 38651 |
as soon as they are finished in multiprocessing.Pool. |
| 38652 |
|
| 38653 |
- bpo-19930: The mode argument of os.makedirs() no longer affects the file |
| 38654 |
permission bits of newly created intermediate-level directories. |
| 38655 |
|
| 38656 |
- bpo-29884: faulthandler: Restore the old sigaltstack during teardown. |
| 38657 |
Patch by Christophe Zeitouny. |
| 38658 |
|
| 38659 |
- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. |
| 38660 |
|
| 38661 |
- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords |
| 38662 |
are not strings. Patch by Michael Seifert. |
| 38663 |
|
| 38664 |
- bpo-8256: Fixed possible failing or crashing input() if attributes |
| 38665 |
"encoding" or "errors" of sys.stdin or sys.stdout are not set or are not |
| 38666 |
strings. |
| 38667 |
|
| 38668 |
- bpo-28692: Using non-integer value for selecting a plural form in gettext |
| 38669 |
is now deprecated. |
| 38670 |
|
| 38671 |
- bpo-26121: Use C library implementation for math functions erf() and |
| 38672 |
erfc(). |
| 38673 |
|
| 38674 |
- bpo-29619: os.stat() and os.DirEntry.inode() now convert inode (st_ino) |
| 38675 |
using unsigned integers. |
| 38676 |
|
| 38677 |
- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting |
| 38678 |
big intables (objects that have __int__) as elements. |
| 38679 |
|
| 38680 |
- bpo-29645: Speed up importing the webbrowser module. |
| 38681 |
webbrowser.register() is now thread-safe. |
| 38682 |
|
| 38683 |
- bpo-28231: The zipfile module now accepts path-like objects for external |
| 38684 |
paths. |
| 38685 |
|
| 38686 |
- bpo-26915: index() and count() methods of collections.abc.Sequence now |
| 38687 |
check identity before checking equality when do comparisons. |
| 38688 |
|
| 38689 |
- bpo-28682: Added support for bytes paths in os.fwalk(). |
| 38690 |
|
| 38691 |
- bpo-29728: Add new :const:`socket.TCP_NOTSENT_LOWAT` (Linux 3.12) |
| 38692 |
constant. Patch by Nathaniel J. Smith. |
| 38693 |
|
| 38694 |
- bpo-29623: Allow use of path-like object as a single argument in |
| 38695 |
ConfigParser.read(). Patch by David Ellis. |
| 38696 |
|
| 38697 |
- bpo-9303: Migrate sqlite3 module to _v2 API. Patch by Aviv Palivoda. |
| 38698 |
|
| 38699 |
- bpo-28963: Fix out of bound iteration in |
| 38700 |
asyncio.Future.remove_done_callback implemented in C. |
| 38701 |
|
| 38702 |
- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes |
| 38703 |
before all pipes are closed. |
| 38704 |
|
| 38705 |
- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C to |
| 38706 |
accept None argument as their pure Python implementation. |
| 38707 |
|
| 38708 |
- bpo-29703: Fix asyncio to support instantiation of new event loops in |
| 38709 |
child processes. |
| 38710 |
|
| 38711 |
- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other |
| 38712 |
exception) to exception(s) raised in the dispatched methods. Patch by Petr |
| 38713 |
Motejlek. |
| 38714 |
|
| 38715 |
- bpo-7769: Method register_function() of |
| 38716 |
xmlrpc.server.SimpleXMLRPCDispatcher and its subclasses can now be used as |
| 38717 |
a decorator. |
| 38718 |
|
| 38719 |
- bpo-29376: Fix assertion error in threading._DummyThread.is_alive(). |
| 38720 |
|
| 38721 |
- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts |
| 38722 |
PathLike objects. Patch by Sayan Chowdhury. |
| 38723 |
|
| 38724 |
- bpo-28518: Start a transaction implicitly before a DML statement. Patch by |
| 38725 |
Aviv Palivoda. |
| 38726 |
|
| 38727 |
- bpo-29742: get_extra_info() raises exception if get called on closed ssl |
| 38728 |
transport. Patch by Nikolay Kim. |
| 38729 |
|
| 38730 |
- bpo-16285: urllib.parse.quote is now based on RFC 3986 and hence includes |
| 38731 |
'~' in the set of characters that is not quoted by default. Patch by |
| 38732 |
Christian Theune and Ratnadeep Debnath. |
| 38733 |
|
| 38734 |
- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no |
| 38735 |
longer affects a partial object after creation. |
| 38736 |
|
| 38737 |
- bpo-29110: Fix file object leak in aifc.open() when file is given as a |
| 38738 |
filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. |
| 38739 |
|
| 38740 |
- bpo-22807: Add uuid.SafeUUID and uuid.UUID.is_safe to relay information |
| 38741 |
from the platform about whether generated UUIDs are generated with a |
| 38742 |
multiprocessing safe method. |
| 38743 |
|
| 38744 |
- bpo-29576: Improve some deprecations in importlib. Some deprecated methods |
| 38745 |
now emit DeprecationWarnings and have better descriptive messages. |
| 38746 |
|
| 38747 |
- bpo-29534: Fixed different behaviour of Decimal.from_float() for _decimal |
| 38748 |
and _pydecimal. Thanks Andrew Nester. |
| 38749 |
|
| 38750 |
- bpo-10379: locale.format_string now supports the 'monetary' keyword |
| 38751 |
argument, and locale.format is deprecated. |
| 38752 |
|
| 38753 |
- bpo-29851: importlib.reload() now raises ModuleNotFoundError if the module |
| 38754 |
lacks a spec. |
| 38755 |
|
| 38756 |
- bpo-28556: Various updates to typing module: typing.Counter, |
| 38757 |
typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle |
| 38758 |
Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa. |
| 38759 |
|
| 38760 |
- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python |
| 38761 |
3.6.0: check minimum and maximum years. |
| 38762 |
|
| 38763 |
- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir |
| 38764 |
|
| 38765 |
- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the |
| 38766 |
match object. Based on patch by WGH. |
| 38767 |
|
| 38768 |
- bpo-29377: Add WrapperDescriptorType, MethodWrapperType, and |
| 38769 |
MethodDescriptorType built-in types to types module. Original patch by |
| 38770 |
Manuel Krebber. |
| 38771 |
|
| 38772 |
- bpo-29218: Unused install_misc command is now removed. It has been |
| 38773 |
documented as unused since 2000. Patch by Eric N. Vander Weele. |
| 38774 |
|
| 38775 |
- bpo-29368: The extend() method is now called instead of the append() |
| 38776 |
method when unpickle collections.deque and other list-like objects. This |
| 38777 |
can speed up unpickling to 2 times. |
| 38778 |
|
| 38779 |
- bpo-29338: The help of a builtin or extension class now includes the |
| 38780 |
constructor signature if __text_signature__ is provided for the class. |
| 38781 |
|
| 38782 |
- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited |
| 38783 |
to a stopped instead of terminated state (ex: when under ptrace). |
| 38784 |
|
| 38785 |
- bpo-29290: Fix a regression in argparse that help messages would wrap at |
| 38786 |
non-breaking spaces. |
| 38787 |
|
| 38788 |
- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY. |
| 38789 |
|
| 38790 |
- bpo-29197: Removed deprecated function ntpath.splitunc(). |
| 38791 |
|
| 38792 |
- bpo-29210: Removed support of deprecated argument "exclude" in |
| 38793 |
tarfile.TarFile.add(). |
| 38794 |
|
| 38795 |
- bpo-29219: Fixed infinite recursion in the repr of uninitialized |
| 38796 |
ctypes.CDLL instances. |
| 38797 |
|
| 38798 |
- bpo-29192: Removed deprecated features in the http.cookies module. |
| 38799 |
|
| 38800 |
- bpo-29193: A format string argument for string.Formatter.format() is now |
| 38801 |
positional-only. |
| 38802 |
|
| 38803 |
- bpo-29195: Removed support of deprecated undocumented keyword arguments in |
| 38804 |
methods of regular expression objects. |
| 38805 |
|
| 38806 |
- bpo-28969: Fixed race condition in C implementation of |
| 38807 |
functools.lru_cache. KeyError could be raised when cached function with |
| 38808 |
full cache was simultaneously called from different threads with the same |
| 38809 |
uncached arguments. |
| 38810 |
|
| 38811 |
- bpo-20804: The unittest.mock.sentinel attributes now preserve their |
| 38812 |
identity when they are copied or pickled. |
| 38813 |
|
| 38814 |
- bpo-29142: In urllib.request, suffixes in no_proxy environment variable |
| 38815 |
with leading dots could match related hostnames again (e.g. .b.c matches |
| 38816 |
a.b.c). Patch by Milan Oberkirch. |
| 38817 |
|
| 38818 |
- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter |
| 38819 |
anymore. Patch written by Jiajun Huang. |
| 38820 |
|
| 38821 |
- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a |
| 38822 |
context. Patch by Sam Breese. |
| 38823 |
|
| 38824 |
- bpo-28985: Update authorizer constants in sqlite3 module. Patch by |
| 38825 |
Dingyuan Wang. |
| 38826 |
|
| 38827 |
- bpo-29079: Prevent infinite loop in pathlib.resolve() on Windows |
| 38828 |
|
| 38829 |
- bpo-13051: Fixed recursion errors in large or resized |
| 38830 |
curses.textpad.Textbox. Based on patch by Tycho Andersen. |
| 38831 |
|
| 38832 |
- bpo-9770: curses.ascii predicates now work correctly with negative |
| 38833 |
integers. |
| 38834 |
|
| 38835 |
- bpo-28427: old keys should not remove new values from WeakValueDictionary |
| 38836 |
when collecting from another thread. |
| 38837 |
|
| 38838 |
- bpo-28923: Remove editor artifacts from Tix.py. |
| 38839 |
|
| 38840 |
- bpo-28871: Fixed a crash when deallocate deep ElementTree. |
| 38841 |
|
| 38842 |
- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and |
| 38843 |
WeakValueDictionary.pop() when a GC collection happens in another thread. |
| 38844 |
|
| 38845 |
- bpo-20191: Fixed a crash in resource.prlimit() when passing a sequence |
| 38846 |
that doesn't own its elements as limits. |
| 38847 |
|
| 38848 |
- bpo-16255: subprocess.Popen uses /system/bin/sh on Android as the shell, |
| 38849 |
instead of /bin/sh. |
| 38850 |
|
| 38851 |
- bpo-28779: multiprocessing.set_forkserver_preload() would crash the |
| 38852 |
forkserver process if a preloaded module instantiated some multiprocessing |
| 38853 |
objects such as locks. |
| 38854 |
|
| 38855 |
- bpo-26937: The chown() method of the tarfile.TarFile class does not fail |
| 38856 |
now when the grp module cannot be imported, as for example on Android |
| 38857 |
platforms. |
| 38858 |
|
| 38859 |
- bpo-28847: dbm.dumb now supports reading read-only files and no longer |
| 38860 |
writes the index file when it is not changed. A deprecation warning is |
| 38861 |
now emitted if the index file is missed and recreated in the 'r' and 'w' |
| 38862 |
modes (will be an error in future Python releases). |
| 38863 |
|
| 38864 |
- bpo-27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in |
| 38865 |
re.sub() replacement templates regular expressions now are errors. |
| 38866 |
|
| 38867 |
- bpo-28835: Fix a regression introduced in warnings.catch_warnings(): call |
| 38868 |
warnings.showwarning() if it was overridden inside the context manager. |
| 38869 |
|
| 38870 |
- bpo-27172: To assist with upgrades from 2.7, the previously documented |
| 38871 |
deprecation of ``inspect.getfullargspec()`` has been reversed. This |
| 38872 |
decision may be revisited again after the Python 2.7 branch is no longer |
| 38873 |
officially supported. |
| 38874 |
|
| 38875 |
- bpo-28740: Add sys.getandroidapilevel(): return the build time API version |
| 38876 |
of Android as an integer. Function only available on Android. |
| 38877 |
|
| 38878 |
- bpo-26273: Add new :const:`socket.TCP_CONGESTION` (Linux 2.6.13) and |
| 38879 |
:const:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written |
| 38880 |
by Omar Sandoval. |
| 38881 |
|
| 38882 |
- bpo-28752: Restored the __reduce__() methods of datetime objects. |
| 38883 |
|
| 38884 |
- bpo-28727: Regular expression patterns, _sre.SRE_Pattern objects created |
| 38885 |
by re.compile(), become comparable (only x==y and x!=y operators). This |
| 38886 |
change should fix the issue #18383: don't duplicate warning filters when |
| 38887 |
the warnings module is reloaded (thing usually only done in unit tests). |
| 38888 |
|
| 38889 |
- bpo-20572: Remove the subprocess.Popen.wait endtime parameter. It was |
| 38890 |
deprecated in 3.4 and undocumented prior to that. |
| 38891 |
|
| 38892 |
- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and |
| 38893 |
from_buffer_copy() methods on abstract classes like Array. |
| 38894 |
|
| 38895 |
- bpo-28548: In the "http.server" module, parse the protocol version if |
| 38896 |
possible, to avoid using HTTP 0.9 in some error responses. |
| 38897 |
|
| 38898 |
- bpo-19717: Makes Path.resolve() succeed on paths that do not exist. Patch |
| 38899 |
by Vajrasky Kok |
| 38900 |
|
| 38901 |
- bpo-28563: Fixed possible DoS and arbitrary code execution when handle |
| 38902 |
plural form selections in the gettext module. The expression parser now |
| 38903 |
supports exact syntax supported by GNU gettext. |
| 38904 |
|
| 38905 |
- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the |
| 38906 |
garbage collector is invoked in other thread. Based on patch by Sebastian |
| 38907 |
Cufre. |
| 38908 |
|
| 38909 |
- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if |
| 38910 |
given empty data twice. Patch by Benjamin Fogle. |
| 38911 |
|
| 38912 |
- bpo-28549: Fixed segfault in curses's addch() with ncurses6. |
| 38913 |
|
| 38914 |
- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar |
| 38915 |
file with compression before trying to open it without compression. |
| 38916 |
Otherwise it had 50% chance failed with ignore_zeros=True. |
| 38917 |
|
| 38918 |
- bpo-23262: The webbrowser module now supports Firefox 36+ and derived |
| 38919 |
browsers. Based on patch by Oleg Broytman. |
| 38920 |
|
| 38921 |
- bpo-24241: The webbrowser in an X environment now prefers using the |
| 38922 |
default browser directly. Also, the webbrowser register() function now has |
| 38923 |
a documented 'preferred' argument, to specify browsers to be returned by |
| 38924 |
get() with no arguments. Patch by David Steele |
| 38925 |
|
| 38926 |
- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused |
| 38927 |
by representing the scale as float value internally in Tk. tkinter.IntVar |
| 38928 |
now works if float value is set to underlying Tk variable. |
| 38929 |
|
| 38930 |
- bpo-28255: calendar.TextCalendar.prweek() no longer prints a space after a |
| 38931 |
weeks's calendar. calendar.TextCalendar.pryear() no longer prints |
| 38932 |
redundant newline after a year's calendar. Based on patch by Xiang Zhang. |
| 38933 |
|
| 38934 |
- bpo-28255: calendar.TextCalendar.prmonth() no longer prints a space at the |
| 38935 |
start of new line after printing a month's calendar. Patch by Xiang |
| 38936 |
Zhang. |
| 38937 |
|
| 38938 |
- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces. |
| 38939 |
Based on patch by Kaarle Ritvanen. |
| 38940 |
|
| 38941 |
- bpo-28353: os.fwalk() no longer fails on broken links. |
| 38942 |
|
| 38943 |
- bpo-28430: Fix iterator of C implemented asyncio.Future doesn't accept |
| 38944 |
non-None value is passed to it.send(val). |
| 38945 |
|
| 38946 |
- bpo-27025: Generated names for Tkinter widgets now start by the "!" prefix |
| 38947 |
for readability. |
| 38948 |
|
| 38949 |
- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a |
| 38950 |
workaround to Tix library bug. |
| 38951 |
|
| 38952 |
- bpo-28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. |
| 38953 |
|
| 38954 |
- bpo-25953: re.sub() now raises an error for invalid numerical group |
| 38955 |
reference in replacement template even if the pattern is not found in the |
| 38956 |
string. Error message for invalid group reference now includes the group |
| 38957 |
index and the position of the reference. Based on patch by SilentGhost. |
| 38958 |
|
| 38959 |
- bpo-28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead of |
| 38960 |
1, 10, 100,... for autoranging. |
| 38961 |
|
| 38962 |
- bpo-28115: Command-line interface of the zipfile module now uses argparse. |
| 38963 |
Added support of long options. |
| 38964 |
|
| 38965 |
- bpo-18219: Optimize csv.DictWriter for large number of columns. Patch by |
| 38966 |
Mariatta Wijaya. |
| 38967 |
|
| 38968 |
- bpo-28448: Fix C implemented asyncio.Future didn't work on Windows. |
| 38969 |
|
| 38970 |
- bpo-23214: In the "io" module, the argument to BufferedReader and |
| 38971 |
BytesIO's read1() methods is now optional and can be -1, matching the |
| 38972 |
BufferedIOBase specification. |
| 38973 |
|
| 38974 |
- bpo-28480: Fix error building socket module when multithreading is |
| 38975 |
disabled. |
| 38976 |
|
| 38977 |
- bpo-28240: timeit: remove ``-c/--clock`` and ``-t/--time`` command line |
| 38978 |
options which were deprecated since Python 3.3. |
| 38979 |
|
| 38980 |
- bpo-28240: timeit now repeats the benchmarks 5 times instead of only 3 to |
| 38981 |
make benchmarks more reliable. |
| 38982 |
|
| 38983 |
- bpo-28240: timeit autorange now uses a single loop iteration if the |
| 38984 |
benchmark takes less than 10 seconds, instead of 10 iterations. "python3 |
| 38985 |
-m timeit -s 'import time' 'time.sleep(1)'" now takes 4 seconds instead of |
| 38986 |
40 seconds. |
| 38987 |
|
| 38988 |
- Distutils.sdist now looks for README and setup.py files with case |
| 38989 |
sensitivity. This behavior matches that found in Setuptools 6.0 and later. |
| 38990 |
See `setuptools 100 <https://github.com/pypa/setuptools/issues/100>`_ for |
| 38991 |
rationale. |
| 38992 |
|
| 38993 |
- bpo-24452: Make webbrowser support Chrome on Mac OS X. Patch by Ned |
| 38994 |
Batchelder. |
| 38995 |
|
| 38996 |
- bpo-20766: Fix references leaked by pdb in the handling of SIGINT |
| 38997 |
handlers. |
| 38998 |
|
| 38999 |
- bpo-27998: Fixed bytes path support in os.scandir() on Windows. Patch by |
| 39000 |
Eryk Sun. |
| 39001 |
|
| 39002 |
- bpo-28317: The disassembler now decodes FORMAT_VALUE argument. |
| 39003 |
|
| 39004 |
- bpo-28380: unittest.mock Mock autospec functions now properly support |
| 39005 |
assert_called, assert_not_called, and assert_called_once. |
| 39006 |
|
| 39007 |
- bpo-28229: lzma module now supports pathlib. |
| 39008 |
|
| 39009 |
- bpo-28321: Fixed writing non-BMP characters with binary format in |
| 39010 |
plistlib. |
| 39011 |
|
| 39012 |
- bpo-28225: bz2 module now supports pathlib. Initial patch by Ethan |
| 39013 |
Furman. |
| 39014 |
|
| 39015 |
- bpo-28227: gzip now supports pathlib. Patch by Ethan Furman. |
| 39016 |
|
| 39017 |
- bpo-28332: Deprecated silent truncations in socket.htons and socket.ntohs. |
| 39018 |
Original patch by Oren Milman. |
| 39019 |
|
| 39020 |
- bpo-27358: Optimized merging var-keyword arguments and improved error |
| 39021 |
message when passing a non-mapping as a var-keyword argument. |
| 39022 |
|
| 39023 |
- bpo-28257: Improved error message when passing a non-iterable as a |
| 39024 |
var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL. |
| 39025 |
|
| 39026 |
- bpo-28322: Fixed possible crashes when unpickle itertools objects from |
| 39027 |
incorrect pickle data. Based on patch by John Leitch. |
| 39028 |
|
| 39029 |
- bpo-28228: imghdr now supports pathlib. |
| 39030 |
|
| 39031 |
- bpo-28226: compileall now supports pathlib. |
| 39032 |
|
| 39033 |
- bpo-28314: Fix function declaration (C flags) for the getiterator() method |
| 39034 |
of xml.etree.ElementTree.Element. |
| 39035 |
|
| 39036 |
- bpo-28148: Stop using localtime() and gmtime() in the time module. |
| 39037 |
Introduced platform independent _PyTime_localtime API that is similar to |
| 39038 |
POSIX localtime_r, but available on all platforms. Patch by Ed Schouten. |
| 39039 |
|
| 39040 |
- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and |
| 39041 |
9999-12. Methods itermonthdays() and itermonthdays2() are reimplemented so |
| 39042 |
that they don't call itermonthdates() which can cause datetime.date |
| 39043 |
under/overflow. |
| 39044 |
|
| 39045 |
- bpo-28275: Fixed possible use after free in the decompress() methods of |
| 39046 |
the LZMADecompressor and BZ2Decompressor classes. Original patch by John |
| 39047 |
Leitch. |
| 39048 |
|
| 39049 |
- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation() |
| 39050 |
if pass invalid string-like object as a name. Patch by Xiang Zhang. |
| 39051 |
|
| 39052 |
- bpo-18844: random.choices() now has k as a keyword-only argument to |
| 39053 |
improve the readability of common cases and come into line with the |
| 39054 |
signature used in other languages. |
| 39055 |
|
| 39056 |
- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. |
| 39057 |
Patch by Madison May. |
| 39058 |
|
| 39059 |
- bpo-27611: Fixed support of default root window in the tkinter.tix module. |
| 39060 |
Added the master parameter in the DisplayStyle constructor. |
| 39061 |
|
| 39062 |
- bpo-27348: In the traceback module, restore the formatting of exception |
| 39063 |
messages like "Exception: None". This fixes a regression introduced in |
| 39064 |
3.5a2. |
| 39065 |
|
| 39066 |
- bpo-25651: Allow false values to be used for msg parameter of subTest(). |
| 39067 |
|
| 39068 |
- bpo-27778: Fix a memory leak in os.getrandom() when the getrandom() is |
| 39069 |
interrupted by a signal and a signal handler raises a Python exception. |
| 39070 |
|
| 39071 |
- bpo-28200: Fix memory leak on Windows in the os module (fix |
| 39072 |
path_converter() function). |
| 39073 |
|
| 39074 |
- bpo-25400: RobotFileParser now correctly returns default values for |
| 39075 |
crawl_delay and request_rate. Initial patch by Peter Wirtz. |
| 39076 |
|
| 39077 |
- bpo-27932: Prevent memory leak in win32_ver(). |
| 39078 |
|
| 39079 |
- Fix UnboundLocalError in socket._sendfile_use_sendfile. |
| 39080 |
|
| 39081 |
- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of |
| 39082 |
os.stat(). Patch by Eryk Sun. |
| 39083 |
|
| 39084 |
- bpo-22493: Warning message emitted by using inline flags in the middle of |
| 39085 |
regular expression now contains a (truncated) regex pattern. Patch by Tim |
| 39086 |
Graham. |
| 39087 |
|
| 39088 |
- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an |
| 39089 |
empty bytestring is passed. |
| 39090 |
|
| 39091 |
- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. |
| 39092 |
|
| 39093 |
- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by |
| 39094 |
Gergely Imreh and Markus Holtermann. |
| 39095 |
|
| 39096 |
- bpo-28114: Fix a crash in parse_envlist() when env contains byte strings. |
| 39097 |
Patch by Eryk Sun. |
| 39098 |
|
| 39099 |
- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and |
| 39100 |
binascii.a2b_qp(). |
| 39101 |
|
| 39102 |
- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by |
| 39103 |
Kevin Conway. |
| 39104 |
|
| 39105 |
- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by |
| 39106 |
Seth Michael Larson. |
| 39107 |
|
| 39108 |
- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by |
| 39109 |
iceboy. |
| 39110 |
|
| 39111 |
- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki. |
| 39112 |
|
| 39113 |
- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. |
| 39114 |
|
| 39115 |
- bpo-27759: Fix selectors incorrectly retain invalid file descriptors. |
| 39116 |
Patch by Mark Williams. |
| 39117 |
|
| 39118 |
- bpo-28325: Remove vestigial MacOS 9 macurl2path module and its tests. |
| 39119 |
|
| 39120 |
- bpo-28368: Refuse monitoring processes if the child watcher has no loop |
| 39121 |
attached. Patch by Vincent Michel. |
| 39122 |
|
| 39123 |
- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader, |
| 39124 |
add_writer, etc. |
| 39125 |
|
| 39126 |
- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг |
| 39127 |
Марк. |
| 39128 |
|
| 39129 |
- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor. |
| 39130 |
|
| 39131 |
- bpo-28372: Fix asyncio to support formatting of non-python coroutines. |
| 39132 |
|
| 39133 |
- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг |
| 39134 |
Марк. |
| 39135 |
|
| 39136 |
- bpo-27972: Prohibit Tasks to await on themselves. |
| 39137 |
|
| 39138 |
- bpo-24142: Reading a corrupt config file left configparser in an invalid |
| 39139 |
state. Original patch by Florian Höch. |
| 39140 |
|
| 39141 |
- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract |
| 39142 |
base classes to use keyword parameters in __init_subclass__. Patch by Nate |
| 39143 |
Soares. |
| 39144 |
|
| 39145 |
- bpo-25532: inspect.unwrap() will now only try to unwrap an object |
| 39146 |
sys.getrecursionlimit() times, to protect against objects which create a |
| 39147 |
new object on every attribute access. |
| 39148 |
|
| 39149 |
- bpo-30177: path.resolve(strict=False) no longer cuts the path after the |
| 39150 |
first element not present in the filesystem. Patch by Antoine Pietri. |
| 39151 |
|
| 39152 |
Documentation |
| 39153 |
------------- |
| 39154 |
|
| 39155 |
- bpo-31294: Fix incomplete code snippet in the ZeroMQSocketListener and |
| 39156 |
ZeroMQSocketHandler examples and adapt them to Python 3. |
| 39157 |
|
| 39158 |
- bpo-21649: Add RFC 7525 and Mozilla server side TLS links to SSL |
| 39159 |
documentation. |
| 39160 |
|
| 39161 |
- bpo-31128: Allow the pydoc server to bind to arbitrary hostnames. |
| 39162 |
|
| 39163 |
- bpo-30803: Clarify doc on truth value testing. Original patch by Peter |
| 39164 |
Thomassen. |
| 39165 |
|
| 39166 |
- bpo-30176: Add missing attribute related constants in curses |
| 39167 |
documentation. |
| 39168 |
|
| 39169 |
- bpo-30052: the link targets for :func:`bytes` and :func:`bytearray` are |
| 39170 |
now their respective type definitions, rather than the corresponding |
| 39171 |
builtin function entries. Use :ref:`bytes <func-bytes>` and |
| 39172 |
:ref:`bytearray <func-bytearray>` to reference the latter. In order to |
| 39173 |
ensure this and future cross-reference updates are applied automatically, |
| 39174 |
the daily documentation builds now disable the default output caching |
| 39175 |
features in Sphinx. |
| 39176 |
|
| 39177 |
- bpo-26985: Add missing info of code object in inspect documentation. |
| 39178 |
|
| 39179 |
- bpo-19824: Improve the documentation for, and links to, template strings |
| 39180 |
by emphasizing their utility for internationalization, and by clarifying |
| 39181 |
some usage constraints. (See also: bpo-20314, bpo-12518) |
| 39182 |
|
| 39183 |
- bpo-28929: Link the documentation to its source file on GitHub. |
| 39184 |
|
| 39185 |
- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer |
| 39186 |
to aiosmtpd, a third-party asyncio-based replacement. |
| 39187 |
|
| 39188 |
- bpo-26355: Add canonical header link on each page to corresponding major |
| 39189 |
version of the documentation. Patch by Matthias Bussonnier. |
| 39190 |
|
| 39191 |
- bpo-29349: Fix Python 2 syntax in code for building the documentation. |
| 39192 |
|
| 39193 |
- bpo-23722: The data model reference and the porting section in the 3.6 |
| 39194 |
What's New guide now cover the additional ``__classcell__`` handling |
| 39195 |
needed for custom metaclasses to fully support :pep:`487` and |
| 39196 |
zero-argument ``super()``. |
| 39197 |
|
| 39198 |
- bpo-28513: Documented command-line interface of zipfile. |
| 39199 |
|
| 39200 |
Tests |
| 39201 |
----- |
| 39202 |
|
| 39203 |
- bpo-29639: test.support.HOST is now "localhost", a new HOSTv4 constant has |
| 39204 |
been added for your ``127.0.0.1`` needs, similar to the existing HOSTv6 |
| 39205 |
constant. |
| 39206 |
|
| 39207 |
- bpo-31320: Silence traceback in test_ssl |
| 39208 |
|
| 39209 |
- bpo-31346: Prefer PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER protocols |
| 39210 |
for SSLContext. |
| 39211 |
|
| 39212 |
- bpo-25674: Remove sha256.tbs-internet.com ssl test |
| 39213 |
|
| 39214 |
- bpo-30715: Address ALPN callback changes for OpenSSL 1.1.0f. The latest |
| 39215 |
version behaves like OpenSSL 1.0.2 and no longer aborts handshake. |
| 39216 |
|
| 39217 |
- bpo-30822: regrtest: Exclude tzdata from regrtest --all. When running the |
| 39218 |
test suite using --use=all / -u all, exclude tzdata since it makes |
| 39219 |
test_datetime too slow (15-20 min on some buildbots) which then times out |
| 39220 |
on some buildbots. Fix also regrtest command line parser to allow passing |
| 39221 |
-u extralargefile to run test_zipfile64. |
| 39222 |
|
| 39223 |
- bpo-30695: Add the ``set_nomemory(start, stop)`` and |
| 39224 |
``remove_mem_hooks()`` functions to the ``_testcapi`` module. |
| 39225 |
|
| 39226 |
- bpo-30357: test_thread: setUp() now uses support.threading_setup() and |
| 39227 |
support.threading_cleanup() to wait until threads complete to avoid random |
| 39228 |
side effects on following tests. Initial patch written by Grzegorz |
| 39229 |
Grzywacz. |
| 39230 |
|
| 39231 |
- bpo-30197: Enhanced functions swap_attr() and swap_item() in the |
| 39232 |
test.support module. They now work when delete replaced attribute or item |
| 39233 |
inside the with statement. The old value of the attribute or item (or |
| 39234 |
None if it doesn't exist) now will be assigned to the target of the "as" |
| 39235 |
clause, if there is one. |
| 39236 |
|
| 39237 |
- bpo-24932: Use proper command line parsing in _testembed |
| 39238 |
|
| 39239 |
- bpo-28950: Disallow -j0 to be combined with -T/-l in regrtest command line |
| 39240 |
arguments. |
| 39241 |
|
| 39242 |
- bpo-28683: Fix the tests that bind() a unix socket and raise |
| 39243 |
PermissionError on Android for a non-root user. |
| 39244 |
|
| 39245 |
- bpo-26936: Fix the test_socket failures on Android - getservbyname(), |
| 39246 |
getservbyport() and getaddrinfo() are broken on some Android API levels. |
| 39247 |
|
| 39248 |
- bpo-28666: Now test.support.rmtree is able to remove unwritable or |
| 39249 |
unreadable directories. |
| 39250 |
|
| 39251 |
- bpo-23839: Various caches now are cleared before running every test file. |
| 39252 |
|
| 39253 |
- bpo-26944: Fix test_posix for Android where 'id -G' is entirely wrong or |
| 39254 |
missing the effective gid. |
| 39255 |
|
| 39256 |
- bpo-28409: regrtest: fix the parser of command line arguments. |
| 39257 |
|
| 39258 |
- bpo-28217: Adds _testconsole module to test console input. |
| 39259 |
|
| 39260 |
- bpo-26939: Add the support.setswitchinterval() function to fix |
| 39261 |
test_functools hanging on the Android armv7 qemu emulator. |
| 39262 |
|
| 39263 |
Build |
| 39264 |
----- |
| 39265 |
|
| 39266 |
- bpo-31354: Allow ``--with-lto`` to be used on all builds, not just ``make |
| 39267 |
profile-opt``. |
| 39268 |
|
| 39269 |
- bpo-31370: Remove support for building --without-threads. This option is |
| 39270 |
not really useful anymore in the 21st century. Removing lots of |
| 39271 |
conditional paths allows us to simplify the code base, including in |
| 39272 |
difficult to maintain low-level internal code. |
| 39273 |
|
| 39274 |
- bpo-31341: Per :pep:`11`, support for the IRIX operating system was |
| 39275 |
removed. |
| 39276 |
|
| 39277 |
- bpo-30854: Fix compile error when compiling --without-threads. Patch by |
| 39278 |
Masayuki Yamamoto. |
| 39279 |
|
| 39280 |
- bpo-30687: Locate msbuild.exe on Windows when building rather than |
| 39281 |
vcvarsall.bat |
| 39282 |
|
| 39283 |
- bpo-20210: Support the *disabled* marker in Setup files. Extension modules |
| 39284 |
listed after this marker are not built at all, neither by the Makefile nor |
| 39285 |
by setup.py. |
| 39286 |
|
| 39287 |
- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable C |
| 39288 |
``assert()`` checks. Defaults to off. ``--with-pydebug`` implies |
| 39289 |
``--with-assertions``. |
| 39290 |
|
| 39291 |
- bpo-28787: Fix out-of-tree builds of Python when configured with |
| 39292 |
``--with--dtrace``. |
| 39293 |
|
| 39294 |
- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``, |
| 39295 |
``make install`` and some other make targets when configured with |
| 39296 |
``--enable-optimizations``. |
| 39297 |
|
| 39298 |
- bpo-23404: Don't regenerate generated files based on file modification |
| 39299 |
time anymore: the action is now explicit. Replace ``make touch`` with |
| 39300 |
``make regen-all``. |
| 39301 |
|
| 39302 |
- bpo-29643: Fix ``--enable-optimization`` didn't work. |
| 39303 |
|
| 39304 |
- bpo-27593: sys.version and the platform module python_build(), |
| 39305 |
python_branch(), and python_revision() functions now use git information |
| 39306 |
rather than hg when building from a repo. |
| 39307 |
|
| 39308 |
- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k. |
| 39309 |
|
| 39310 |
- bpo-27659: Prohibit implicit C function declarations: use |
| 39311 |
``-Werror=implicit-function-declaration`` when possible (GCC and Clang, |
| 39312 |
but it depends on the compiler version). Patch written by Chi Hsuan Yen. |
| 39313 |
|
| 39314 |
- bpo-29384: Remove old Be OS helper scripts. |
| 39315 |
|
| 39316 |
- bpo-26851: Set Android compilation and link flags. |
| 39317 |
|
| 39318 |
- bpo-28768: Fix implicit declaration of function _setmode. Patch by |
| 39319 |
Masayuki Yamamoto |
| 39320 |
|
| 39321 |
- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat |
| 39322 |
|
| 39323 |
- bpo-23903: Added missed names to PC/python3.def. |
| 39324 |
|
| 39325 |
- bpo-28762: lockf() is available on Android API level 24, but the F_LOCK |
| 39326 |
macro is not defined in android-ndk-r13. |
| 39327 |
|
| 39328 |
- bpo-28538: Fix the compilation error that occurs because if_nameindex() is |
| 39329 |
available on Android API level 24, but the if_nameindex structure is not |
| 39330 |
defined. |
| 39331 |
|
| 39332 |
- bpo-20211: Do not add the directory for installing C header files and the |
| 39333 |
directory for installing object code libraries to the cross compilation |
| 39334 |
search paths. Original patch by Thomas Petazzoni. |
| 39335 |
|
| 39336 |
- bpo-28849: Do not define sys.implementation._multiarch on Android. |
| 39337 |
|
| 39338 |
- bpo-10656: Fix out-of-tree building on AIX. Patch by Tristan Carel and |
| 39339 |
Michael Haubenwallner. |
| 39340 |
|
| 39341 |
- bpo-26359: Rename --with-optimiations to --enable-optimizations. |
| 39342 |
|
| 39343 |
- bpo-28444: Fix missing extensions modules when cross compiling. |
| 39344 |
|
| 39345 |
- bpo-28208: Update Windows build and OS X installers to use SQLite 3.14.2. |
| 39346 |
|
| 39347 |
- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j. |
| 39348 |
|
| 39349 |
- bpo-21124: Fix building the _struct module on Cygwin by passing ``NULL`` |
| 39350 |
instead of ``&PyType_Type`` to PyVarObject_HEAD_INIT. Patch by Masayuki |
| 39351 |
Yamamoto. |
| 39352 |
|
| 39353 |
- bpo-13756: Fix building extensions modules on Cygwin. Patch by Roumen |
| 39354 |
Petrov, based on original patch by Jason Tishler. |
| 39355 |
|
| 39356 |
- bpo-21085: Add configure check for siginfo_t.si_band, which Cygwin does |
| 39357 |
not provide. Patch by Masayuki Yamamoto with review and rebase by Erik |
| 39358 |
Bray. |
| 39359 |
|
| 39360 |
- bpo-28258: Fixed build with Estonian locale (python-config and distclean |
| 39361 |
targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. |
| 39362 |
|
| 39363 |
- bpo-26661: setup.py now detects system libffi with multiarch wrapper. |
| 39364 |
|
| 39365 |
- bpo-27979: A full copy of libffi is no longer bundled for use when |
| 39366 |
building _ctypes on non-OSX UNIX platforms. An installed copy of libffi |
| 39367 |
is now required when building _ctypes on such platforms. |
| 39368 |
|
| 39369 |
- bpo-15819: Remove redundant include search directory option for building |
| 39370 |
outside the source tree. |
| 39371 |
|
| 39372 |
- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. |
| 39373 |
Patch by Gareth Rees. |
| 39374 |
|
| 39375 |
Windows |
| 39376 |
------- |
| 39377 |
|
| 39378 |
- bpo-31392: Update Windows build to use OpenSSL 1.1.0f |
| 39379 |
|
| 39380 |
- bpo-30389: Adds detection of Visual Studio 2017 to distutils on Windows. |
| 39381 |
|
| 39382 |
- bpo-31358: zlib is no longer bundled in the CPython source, instead it is |
| 39383 |
downloaded on demand just like bz2, lzma, OpenSSL, Tcl/Tk, and SQLite. |
| 39384 |
|
| 39385 |
- bpo-31340: Change to building with MSVC v141 (included with Visual Studio |
| 39386 |
2017) |
| 39387 |
|
| 39388 |
- bpo-30581: os.cpu_count() now returns the correct number of processors on |
| 39389 |
Windows when the number of logical processors is greater than 64. |
| 39390 |
|
| 39391 |
- bpo-30916: Pre-build OpenSSL, Tcl and Tk and include the binaries in the |
| 39392 |
build. |
| 39393 |
|
| 39394 |
- bpo-30731: Add a missing xmlns to python.manifest so that it matches the |
| 39395 |
schema. |
| 39396 |
|
| 39397 |
- bpo-30291: Allow requiring 64-bit interpreters from py.exe using -64 |
| 39398 |
suffix. Contributed by Steve (Gadget) Barnes. |
| 39399 |
|
| 39400 |
- bpo-30362: Adds list options (-0, -0p) to py.exe launcher. Contributed by |
| 39401 |
Steve Barnes. |
| 39402 |
|
| 39403 |
- bpo-23451: Fix socket deprecation warnings in socketmodule.c. Patch by |
| 39404 |
Segev Finer. |
| 39405 |
|
| 39406 |
- bpo-30450: The build process on Windows no longer depends on Subversion, |
| 39407 |
instead pulling external code from GitHub via a Python script. If Python |
| 39408 |
3.6 is not found on the system (via ``py -3.6``), NuGet is used to |
| 39409 |
download a copy of 32-bit Python. |
| 39410 |
|
| 39411 |
- bpo-29579: Removes readme.txt from the installer. |
| 39412 |
|
| 39413 |
- bpo-25778: winreg does not truncate string correctly (Patch by Eryk Sun) |
| 39414 |
|
| 39415 |
- bpo-28896: Deprecate WindowsRegistryFinder and disable it by default |
| 39416 |
|
| 39417 |
- bpo-28522: Fixes mishandled buffer reallocation in getpathp.c |
| 39418 |
|
| 39419 |
- bpo-28402: Adds signed catalog files for stdlib on Windows. |
| 39420 |
|
| 39421 |
- bpo-28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk |
| 39422 |
Sun) |
| 39423 |
|
| 39424 |
- bpo-28251: Improvements to help manuals on Windows. |
| 39425 |
|
| 39426 |
- bpo-28110: launcher.msi has different product codes between 32-bit and |
| 39427 |
64-bit |
| 39428 |
|
| 39429 |
- bpo-28161: Opening CON for write access fails |
| 39430 |
|
| 39431 |
- bpo-28162: WindowsConsoleIO readall() fails if first line starts with |
| 39432 |
Ctrl+Z |
| 39433 |
|
| 39434 |
- bpo-28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle |
| 39435 |
|
| 39436 |
- bpo-28164: _PyIO_get_console_type fails for various paths |
| 39437 |
|
| 39438 |
- bpo-28137: Renames Windows path file to ._pth |
| 39439 |
|
| 39440 |
- bpo-28138: Windows ._pth file should allow import site |
| 39441 |
|
| 39442 |
IDLE |
| 39443 |
---- |
| 39444 |
|
| 39445 |
- bpo-31493: IDLE code context -- fix code update and font update timers. |
| 39446 |
Canceling timers prevents a warning message when test_idle completes. |
| 39447 |
|
| 39448 |
- bpo-31488: IDLE - Update non-key options in former extension classes. When |
| 39449 |
applying configdialog changes, call .reload for each feature class. Change |
| 39450 |
ParenMatch so updated options affect existing instances attached to |
| 39451 |
existing editor windows. |
| 39452 |
|
| 39453 |
- bpo-31477: IDLE - Improve rstrip entry in doc. Strip trailing whitespace |
| 39454 |
strips more than blank spaces. Multiline string literals are not skipped. |
| 39455 |
|
| 39456 |
- bpo-31480: IDLE - make tests pass with zzdummy extension disabled by |
| 39457 |
default. |
| 39458 |
|
| 39459 |
- bpo-31421: Document how IDLE runs tkinter programs. IDLE calls tcl/tk |
| 39460 |
update in the background in order to make live interaction and |
| 39461 |
experimentation with tkinter applications much easier. |
| 39462 |
|
| 39463 |
- bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an |
| 39464 |
int entry is not the same as deleting and inserting because int('') will |
| 39465 |
fail. |
| 39466 |
|
| 39467 |
- bpo-31051: Rearrange IDLE configdialog GenPage into Window, Editor, and |
| 39468 |
Help sections. |
| 39469 |
|
| 39470 |
- bpo-30617: IDLE - Add docstrings and tests for outwin subclass of editor. |
| 39471 |
Move some data and functions from the class to module level. Patch by |
| 39472 |
Cheryl Sabella. |
| 39473 |
|
| 39474 |
- bpo-31287: IDLE - Do not modify tkinter.message in test_configdialog. |
| 39475 |
|
| 39476 |
- bpo-27099: Convert IDLE's built-in 'extensions' to regular features. About |
| 39477 |
10 IDLE features were implemented as supposedly optional extensions. Their |
| 39478 |
different behavior could be confusing or worse for users and not good for |
| 39479 |
maintenance. Hence the conversion. The main difference for users is that |
| 39480 |
user configurable key bindings for builtin features are now handled |
| 39481 |
uniformly. Now, editing a binding in a keyset only affects its value in |
| 39482 |
the keyset. All bindings are defined together in the system-specific |
| 39483 |
default keysets in config-extensions.def. All custom keysets are saved as |
| 39484 |
a whole in config-extension.cfg. All take effect as soon as one clicks |
| 39485 |
Apply or Ok. The affected events are '<<force-open-completions>>', |
| 39486 |
'<<expand-word>>', '<<force-open-calltip>>', '<<flash-paren>>', |
| 39487 |
'<<format-paragraph>>', '<<run-module>>', '<<check-module>>', and |
| 39488 |
'<<zoom-height>>'. Any (global) customizations made before 3.6.3 will not |
| 39489 |
affect their keyset-specific customization after 3.6.3. and vice versa. |
| 39490 |
Initial patch by Charles Wohlganger. |
| 39491 |
|
| 39492 |
- bpo-31206: IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by |
| 39493 |
Cheryl Sabella. |
| 39494 |
|
| 39495 |
- bpo-31001: Add tests for configdialog highlight tab. Patch by Cheryl |
| 39496 |
Sabella. |
| 39497 |
|
| 39498 |
- bpo-31205: IDLE: Factor KeysPage(Frame) class from ConfigDialog. The |
| 39499 |
slightly modified tests continue to pass. Patch by Cheryl Sabella. |
| 39500 |
|
| 39501 |
- bpo-31130: IDLE -- stop leaks in test_configdialog. Initial patch by |
| 39502 |
Victor Stinner. |
| 39503 |
|
| 39504 |
- bpo-31002: Add tests for configdialog keys tab. Patch by Cheryl Sabella. |
| 39505 |
|
| 39506 |
- bpo-19903: IDLE: Calltips use ``inspect.signature`` instead of |
| 39507 |
``inspect.getfullargspec``. This improves calltips for builtins converted |
| 39508 |
to use Argument Clinic. Patch by Louie Lu. |
| 39509 |
|
| 39510 |
- bpo-31083: IDLE - Add an outline of a TabPage class in configdialog. |
| 39511 |
Update existing classes to match outline. Initial patch by Cheryl Sabella. |
| 39512 |
|
| 39513 |
- bpo-31050: Factor GenPage(Frame) class from ConfigDialog. The slightly |
| 39514 |
modified tests continue to pass. Patch by Cheryl Sabella. |
| 39515 |
|
| 39516 |
- bpo-31004: IDLE - Factor FontPage(Frame) class from ConfigDialog. Slightly |
| 39517 |
modified tests continue to pass. Fix General tests. Patch mostly by Cheryl |
| 39518 |
Sabella. |
| 39519 |
|
| 39520 |
- bpo-30781: IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan |
| 39521 |
Reedy and Cheryl Sabella. |
| 39522 |
|
| 39523 |
- bpo-31060: IDLE - Finish rearranging methods of ConfigDialog Grouping |
| 39524 |
methods pertaining to each tab and the buttons will aid writing tests and |
| 39525 |
improving the tabs and will enable splitting the groups into classes. |
| 39526 |
|
| 39527 |
- bpo-30853: IDLE -- Factor a VarTrace class out of ConfigDialog. Instance |
| 39528 |
tracers manages pairs consisting of a tk variable and a callback function. |
| 39529 |
When tracing is turned on, setting the variable calls the function. Test |
| 39530 |
coverage for the new class is 100%. |
| 39531 |
|
| 39532 |
- bpo-31003: IDLE: Add more tests for General tab. |
| 39533 |
|
| 39534 |
- bpo-30993: IDLE - Improve configdialog font page and tests. In |
| 39535 |
configdialog: Document causal pathways in create_font_tab docstring. |
| 39536 |
Simplify some attribute names. Move set_samples calls to var_changed_font |
| 39537 |
(idea from Cheryl Sabella). Move related functions to positions after the |
| 39538 |
create widgets function. In test_configdialog: Fix test_font_set so not |
| 39539 |
order dependent. Fix renamed test_indent_scale so it tests the widget. |
| 39540 |
Adjust tests for movement of set_samples call. Add tests for load |
| 39541 |
functions. Put all font tests in one class and tab indent tests in |
| 39542 |
another. Except for two lines, these tests completely cover the related |
| 39543 |
functions. |
| 39544 |
|
| 39545 |
- bpo-30981: IDLE -- Add more configdialog font page tests. |
| 39546 |
|
| 39547 |
- bpo-28523: IDLE: replace 'colour' with 'color' in configdialog. |
| 39548 |
|
| 39549 |
- bpo-30917: Add tests for idlelib.config.IdleConf. Increase coverage from |
| 39550 |
46% to 96%. Patch by Louie Lu. |
| 39551 |
|
| 39552 |
- bpo-30934: Document coverage details for idlelib tests. Add section to |
| 39553 |
idlelib/idle-test/README.txt. Include check that branches are taken both |
| 39554 |
ways. Exclude IDLE-specific code that does not run during unit tests. |
| 39555 |
|
| 39556 |
- bpo-30913: IDLE: Document ConfigDialog tk Vars, methods, and widgets in |
| 39557 |
docstrings This will facilitate improving the dialog and splitting up the |
| 39558 |
class. Original patch by Cheryl Sabella. |
| 39559 |
|
| 39560 |
- bpo-30899: IDLE: Add tests for ConfigParser subclasses in config. Patch by |
| 39561 |
Louie Lu. |
| 39562 |
|
| 39563 |
- bpo-30881: IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella. |
| 39564 |
|
| 39565 |
- bpo-30851: IDLE: Remove unused variables in configdialog. One is a |
| 39566 |
duplicate, one is set but cannot be altered by users. Patch by Cheryl |
| 39567 |
Sabella. |
| 39568 |
|
| 39569 |
- bpo-30870: IDLE: In Settings dialog, select font with Up, Down keys as |
| 39570 |
well as mouse. Initial patch by Louie Lu. |
| 39571 |
|
| 39572 |
- bpo-8231: IDLE: call config.IdleConf.GetUserCfgDir only once. |
| 39573 |
|
| 39574 |
- bpo-30779: IDLE: Factor ConfigChanges class from configdialog, put in |
| 39575 |
config; test. * In config, put dump test code in a function; run it and |
| 39576 |
unittest in 'if __name__ == '__main__'. * Add class config.ConfigChanges |
| 39577 |
based on changes_class_v4.py on bpo issue. * Add class |
| 39578 |
test_config.ChangesTest, partly using configdialog_tests_v1.py. * Revise |
| 39579 |
configdialog to use ConfigChanges; see tracker msg297804. * Revise |
| 39580 |
test_configdialog to match configdialog changes. * Remove configdialog |
| 39581 |
functions unused or moved to ConfigChanges. Cheryl Sabella contributed |
| 39582 |
parts of the patch. |
| 39583 |
|
| 39584 |
- bpo-30777: IDLE: configdialog - Add docstrings and fix comments. Patch by |
| 39585 |
Cheryl Sabella. |
| 39586 |
|
| 39587 |
- bpo-30495: IDLE: Improve textview with docstrings, PEP8 names, and more |
| 39588 |
tests. Patch by Cheryl Sabella. |
| 39589 |
|
| 39590 |
- bpo-30723: IDLE: Make several improvements to parenmatch. Add 'parens' |
| 39591 |
style to highlight both opener and closer. Make 'default' style, which is |
| 39592 |
not default, a synonym for 'opener'. Make time-delay work the same with |
| 39593 |
all styles. Add help for config dialog extensions tab, including help for |
| 39594 |
parenmatch. Add new tests. Original patch by Charles Wohlganger. |
| 39595 |
|
| 39596 |
- bpo-30674: IDLE: add docstrings to grep module. Patch by Cheryl Sabella |
| 39597 |
|
| 39598 |
- bpo-21519: IDLE's basic custom key entry dialog now detects duplicates |
| 39599 |
properly. Original patch by Saimadhav Heblikar. |
| 39600 |
|
| 39601 |
- bpo-29910: IDLE no longer deletes a character after commenting out a |
| 39602 |
region by a key shortcut. Add ``return 'break'`` for this and other |
| 39603 |
potential conflicts between IDLE and default key bindings. |
| 39604 |
|
| 39605 |
- bpo-30728: Review and change idlelib.configdialog names. Lowercase method |
| 39606 |
and attribute names. Replace 'colour' with 'color', expand overly cryptic |
| 39607 |
names, delete unneeded underscores. Replace ``import *`` with specific |
| 39608 |
imports. Patches by Cheryl Sabella. |
| 39609 |
|
| 39610 |
- bpo-6739: IDLE: Verify user-entered key sequences by trying to bind them |
| 39611 |
with tk. Add tests for all 3 validation functions. Original patch by G |
| 39612 |
Polo. Tests added by Cheryl Sabella. |
| 39613 |
|
| 39614 |
- bpo-15786: Fix several problems with IDLE's autocompletion box. The |
| 39615 |
following should now work: clicking on selection box items; using the |
| 39616 |
scrollbar; selecting an item by hitting Return. Hangs on MacOSX should no |
| 39617 |
longer happen. Patch by Louie Lu. |
| 39618 |
|
| 39619 |
- bpo-25514: Add doc subsubsection about IDLE failure to start. Popup |
| 39620 |
no-connection message directs users to this section. |
| 39621 |
|
| 39622 |
- bpo-30642: Fix reference leaks in IDLE tests. Patches by Louie Lu and |
| 39623 |
Terry Jan Reedy. |
| 39624 |
|
| 39625 |
- bpo-30495: Add docstrings for textview.py and use PEP8 names. Patches by |
| 39626 |
Cheryl Sabella and Terry Jan Reedy. |
| 39627 |
|
| 39628 |
- bpo-30290: Help-about: use pep8 names and add tests. Increase coverage to |
| 39629 |
100%. Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy. |
| 39630 |
|
| 39631 |
- bpo-30303: Add _utest option to textview; add new tests. Increase coverage |
| 39632 |
to 100%. Patches by Louie Lu and Terry Jan Reedy. |
| 39633 |
|
| 39634 |
- bpo-29071: IDLE colors f-string prefixes (but not invalid ur prefixes). |
| 39635 |
|
| 39636 |
- bpo-28572: Add 10% to coverage of IDLE's test_configdialog. Update and |
| 39637 |
augment description of the configuration system. |
| 39638 |
|
| 39639 |
Tools/Demos |
| 39640 |
----------- |
| 39641 |
|
| 39642 |
- bpo-30983: gdb integration commands (py-bt, etc.) work on optimized shared |
| 39643 |
builds now, too. :pep:`523` introduced _PyEval_EvalFrameDefault which |
| 39644 |
inlines PyEval_EvalFrameEx on non-debug shared builds. This broke the |
| 39645 |
ability to use py-bt, py-up, and a few other Python-specific gdb |
| 39646 |
integrations. The problem is fixed by only looking for |
| 39647 |
_PyEval_EvalFrameDefault frames in python-gdb.py. Original patch by Bruno |
| 39648 |
"Polaco" Penteado. |
| 39649 |
|
| 39650 |
- bpo-29748: Added the slice index converter in Argument Clinic. |
| 39651 |
|
| 39652 |
- bpo-24037: Argument Clinic now uses the converter ``bool(accept={int})`` |
| 39653 |
rather than ``int`` for semantical booleans. This avoids repeating the |
| 39654 |
default value for Python and C and will help in converting to ``bool`` in |
| 39655 |
future. |
| 39656 |
|
| 39657 |
- bpo-29367: python-gdb.py now supports also ``method-wrapper`` |
| 39658 |
(``wrapperobject``) objects. |
| 39659 |
|
| 39660 |
- bpo-28023: Fix python-gdb.py didn't support new dict implementation. |
| 39661 |
|
| 39662 |
- bpo-15369: The pybench and pystone microbenchmark have been removed from |
| 39663 |
Tools. Please use the new Python benchmark suite |
| 39664 |
https://github.com/python/pyperformance which is more reliable and |
| 39665 |
includes a portable version of pybench working on Python 2 and Python 3. |
| 39666 |
|
| 39667 |
- bpo-28102: The zipfile module CLI now prints usage to stderr. Patch by |
| 39668 |
Stephen J. Turnbull. |
| 39669 |
|
| 39670 |
C API |
| 39671 |
----- |
| 39672 |
|
| 39673 |
- bpo-31338: Added the ``Py_UNREACHABLE()`` macro for code paths which are |
| 39674 |
never expected to be reached. This and a few other useful macros are now |
| 39675 |
documented in the C API manual. |
| 39676 |
|
| 39677 |
- bpo-30832: Remove own implementation for thread-local storage. CPython has |
| 39678 |
provided the own implementation for thread-local storage (TLS) on |
| 39679 |
Python/thread.c, it's used in the case which a platform has not supplied |
| 39680 |
native TLS. However, currently all supported platforms (Windows and |
| 39681 |
pthreads) have provided native TLS and defined the Py_HAVE_NATIVE_TLS |
| 39682 |
macro with unconditional in any case. |
| 39683 |
|
| 39684 |
- bpo-30708: PyUnicode_AsWideCharString() now raises a ValueError if the |
| 39685 |
second argument is NULL and the wchar_t\* string contains null characters. |
| 39686 |
|
| 39687 |
- bpo-16500: Deprecate PyOS_AfterFork() and add PyOS_BeforeFork(), |
| 39688 |
PyOS_AfterFork_Parent() and PyOS_AfterFork_Child(). |
| 39689 |
|
| 39690 |
- bpo-6532: The type of results of PyThread_start_new_thread() and |
| 39691 |
PyThread_get_thread_ident(), and the id parameter of |
| 39692 |
PyThreadState_SetAsyncExc() changed from "long" to "unsigned long". |
| 39693 |
|
| 39694 |
- bpo-27867: Function PySlice_GetIndicesEx() is deprecated and replaced with |
| 39695 |
a macro if Py_LIMITED_API is not set or set to the value between |
| 39696 |
0x03050400 and 0x03060000 (not including) or 0x03060100 or higher. Added |
| 39697 |
functions PySlice_Unpack() and PySlice_AdjustIndices(). |
| 39698 |
|
| 39699 |
- bpo-29083: Fixed the declaration of some public API functions. |
| 39700 |
PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in |
| 39701 |
limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and |
| 39702 |
Py_BuildValue() were not available in limited API of version < 3.3 when |
| 39703 |
PY_SSIZE_T_CLEAN is defined. |
| 39704 |
|
| 39705 |
- bpo-28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() |
| 39706 |
is now of type ``const char *`` rather of ``char *``. |
| 39707 |
|
| 39708 |
- bpo-29058: All stable API extensions added after Python 3.2 are now |
| 39709 |
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of |
| 39710 |
the minimum Python version supporting this API. |
| 39711 |
|
| 39712 |
- bpo-28822: The index parameters *start* and *end* of PyUnicode_FindChar() |
| 39713 |
are now adjusted to behave like ``str[start:end]``. |
| 39714 |
|
| 39715 |
- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions. |
| 39716 |
|
| 39717 |
- bpo-28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, |
| 39718 |
PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of |
| 39719 |
type ``const char *`` rather of ``char *``. |
| 39720 |
|
| 39721 |
- bpo-28748: Private variable _Py_PackageContext is now of type ``const char |
| 39722 |
*`` rather of ``char *``. |
| 39723 |
|
| 39724 |
- bpo-19569: Compiler warnings are now emitted if use most of deprecated |
| 39725 |
functions. |
| 39726 |
|
| 39727 |
- bpo-28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), |
| 39728 |
PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and |
| 39729 |
PyUnicode_AsEncodedUnicode(). |
| 39730 |
|
| 39731 |
|
| 39732 |
What's New in Python 3.6.6 final? |
| 39733 |
================================= |
| 39734 |
|
| 39735 |
*Release date: 2018-06-27* |
| 39736 |
|
| 39737 |
There were no new changes in version 3.6.6. |
| 39738 |
|
| 39739 |
|
| 39740 |
|
| 39741 |
What's New in Python 3.6.6 release candidate 1? |
| 39742 |
=============================================== |
| 39743 |
|
| 39744 |
*Release date: 2018-06-11* |
| 39745 |
|
| 39746 |
Core and Builtins |
| 39747 |
----------------- |
| 39748 |
|
| 39749 |
- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() |
| 39750 |
correctly |
| 39751 |
|
| 39752 |
- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter |
| 39753 |
shutdown even when there was a custom handler set previously. Patch by |
| 39754 |
Philipp Kerling. |
| 39755 |
|
| 39756 |
- bpo-33622: Fixed a leak when the garbage collector fails to add an object |
| 39757 |
with the ``__del__`` method or referenced by it into the |
| 39758 |
:data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an |
| 39759 |
exception is set and preserves it. |
| 39760 |
|
| 39761 |
- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c. |
| 39762 |
|
| 39763 |
- bpo-33391: Fix a leak in set_symmetric_difference(). |
| 39764 |
|
| 39765 |
- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer. |
| 39766 |
|
| 39767 |
- bpo-33231: Fix potential memory leak in ``normalizestring()``. |
| 39768 |
|
| 39769 |
- bpo-29922: Improved error messages in 'async with' when ``__aenter__()`` |
| 39770 |
or ``__aexit__()`` return non-awaitable object. |
| 39771 |
|
| 39772 |
- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized |
| 39773 |
when copying from key-sharing dict. |
| 39774 |
|
| 39775 |
- bpo-33041: Fixed jumping when the function contains an ``async for`` loop. |
| 39776 |
|
| 39777 |
- bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in |
| 39778 |
socketmodule on Windows. |
| 39779 |
|
| 39780 |
- bpo-21983: Fix a crash in ``ctypes.cast()`` in case the type argument is a |
| 39781 |
ctypes structured data type. Patch by Eryk Sun and Oren Milman. |
| 39782 |
|
| 39783 |
Library |
| 39784 |
------- |
| 39785 |
|
| 39786 |
- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by |
| 39787 |
Steve Weber. |
| 39788 |
|
| 39789 |
- bpo-33812: Datetime instance d with non-None tzinfo, but with |
| 39790 |
d.tzinfo.utcoffset(d) returning None is now treated as naive by the |
| 39791 |
astimezone() method. |
| 39792 |
|
| 39793 |
- bpo-30805: Avoid race condition with debug logging |
| 39794 |
|
| 39795 |
- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence |
| 39796 |
operations now raise :exc:`TypeError` instead of :exc:`SystemError` when |
| 39797 |
performed on :class:`mmap.mmap` objects. Patch by Zackery Spytz. |
| 39798 |
|
| 39799 |
- bpo-32684: Fix gather to propagate cancellation of itself even with |
| 39800 |
return_exceptions. |
| 39801 |
|
| 39802 |
- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of |
| 39803 |
asyncio.sslproto: start immediately the handshake instead of using |
| 39804 |
call_soon(). Previously, data_received() could be called before the |
| 39805 |
handshake started, causing the handshake to hang or fail. |
| 39806 |
|
| 39807 |
- bpo-31647: Fixed bug where calling write_eof() on a |
| 39808 |
_SelectorSocketTransport after it's already closed raises AttributeError. |
| 39809 |
|
| 39810 |
- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines |
| 39811 |
|
| 39812 |
- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor |
| 39813 |
|
| 39814 |
- bpo-11874: Use a better regex when breaking usage into wrappable parts. |
| 39815 |
Avoids bogus assertion errors from custom metavar strings. |
| 39816 |
|
| 39817 |
- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder |
| 39818 |
that prevented the cache of parsed strings from clearing after finishing |
| 39819 |
the decoding. Based on patch by c-fos. |
| 39820 |
|
| 39821 |
- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP |
| 39822 |
locations |
| 39823 |
|
| 39824 |
- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on |
| 39825 |
Windows. Patch by Zvi Effron |
| 39826 |
|
| 39827 |
- bpo-26819: Fix race condition with ``ReadTransport.resume_reading`` in |
| 39828 |
Windows proactor event loop. |
| 39829 |
|
| 39830 |
- bpo-28556: Minor fixes in typing module: add annotations to |
| 39831 |
``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in |
| 39832 |
``Generic.__new__``. Original PRs by Paulius Šarka and Chad Dombrova. |
| 39833 |
|
| 39834 |
- bpo-20087: Updated alias mapping with glibc 2.27 supported locales. |
| 39835 |
|
| 39836 |
- bpo-33422: Fix trailing quotation marks getting deleted when looking up |
| 39837 |
byte/string literals on pydoc. Patch by Andrés Delfino. |
| 39838 |
|
| 39839 |
- bpo-33197: Update error message when constructing invalid |
| 39840 |
inspect.Parameters Patch by Donghee Na. |
| 39841 |
|
| 39842 |
- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database |
| 39843 |
object when it is called with a single argument. |
| 39844 |
|
| 39845 |
- bpo-33329: Fix multiprocessing regression on newer glibcs |
| 39846 |
|
| 39847 |
- bpo-991266: Fix quoting of the ``Comment`` attribute of |
| 39848 |
:class:`http.cookies.SimpleCookie`. |
| 39849 |
|
| 39850 |
- bpo-33131: Upgrade bundled version of pip to 10.0.1. |
| 39851 |
|
| 39852 |
- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST |
| 39853 |
object to a tree of tuples or lists with ``line_info=False`` and |
| 39854 |
``col_info=True``. |
| 39855 |
|
| 39856 |
- bpo-33263: Fix FD leak in ``_SelectorSocketTransport`` Patch by Vlad |
| 39857 |
Starostin. |
| 39858 |
|
| 39859 |
- bpo-33256: Fix display of ``<module>`` call in the html produced by |
| 39860 |
``cgitb.html()``. Patch by Stéphane Blondon. |
| 39861 |
|
| 39862 |
- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty |
| 39863 |
sequences consistently even when called from subclasses without a |
| 39864 |
``getrandbits()`` implementation. |
| 39865 |
|
| 39866 |
- bpo-33224: Update difflib.mdiff() for :pep:`479`. Convert an uncaught |
| 39867 |
StopIteration in a generator into a return-statement. |
| 39868 |
|
| 39869 |
- bpo-33209: End framing at the end of C implementation of |
| 39870 |
:func:`pickle.Pickler.dump`. |
| 39871 |
|
| 39872 |
- bpo-32861: The urllib.robotparser's ``__str__`` representation now |
| 39873 |
includes wildcard entries and the "Crawl-delay" and "Request-rate" fields. |
| 39874 |
Patch by Michael Lazar. |
| 39875 |
|
| 39876 |
- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false |
| 39877 |
boolean value. Note iid=0 and iid=False would be same. Patch by Garvit |
| 39878 |
Khatri. |
| 39879 |
|
| 39880 |
- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1. |
| 39881 |
|
| 39882 |
- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all |
| 39883 |
threads when calling mmap.mmap(), os.urandom(), and random.seed(). Patch |
| 39884 |
by Nir Soffer. |
| 39885 |
|
| 39886 |
- bpo-27683: Fix a regression in :mod:`ipaddress` that result of |
| 39887 |
:meth:`hosts` is empty when the network is constructed by a tuple |
| 39888 |
containing an integer mask and only 1 bit left for addresses. |
| 39889 |
|
| 39890 |
- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in |
| 39891 |
subprocess if another low descriptor is closed. |
| 39892 |
|
| 39893 |
- bpo-31908: Fix output of cover files for ``trace`` module command-line |
| 39894 |
tool. Previously emitted cover files only when ``--missing`` option was |
| 39895 |
used. Patch by Michael Selik. |
| 39896 |
|
| 39897 |
- bpo-31457: If nested log adapters are used, the inner ``process()`` |
| 39898 |
methods are no longer omitted. |
| 39899 |
|
| 39900 |
- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`. Patch by Segev Finer. |
| 39901 |
|
| 39902 |
- bpo-31238: pydoc: the stop() method of the private ServerThread class now |
| 39903 |
waits until DocServer.serve_until_quit() completes and then explicitly |
| 39904 |
sets its docserver attribute to None to break a reference cycle. |
| 39905 |
|
| 39906 |
Documentation |
| 39907 |
------------- |
| 39908 |
|
| 39909 |
- bpo-33503: Fix broken pypi link |
| 39910 |
|
| 39911 |
- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``. |
| 39912 |
|
| 39913 |
- bpo-33378: Add Korean language switcher for https://docs.python.org/3/ |
| 39914 |
|
| 39915 |
- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be |
| 39916 |
just any value. |
| 39917 |
|
| 39918 |
- bpo-33201: Modernize documentation for writing C extension types. |
| 39919 |
|
| 39920 |
- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document. |
| 39921 |
``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is |
| 39922 |
missed in the document. |
| 39923 |
|
| 39924 |
- bpo-33126: Document PyBuffer_ToContiguous(). |
| 39925 |
|
| 39926 |
- bpo-27212: Modify documentation for the :func:`islice` recipe to consume |
| 39927 |
initial values up to the start index. |
| 39928 |
|
| 39929 |
- bpo-28247: Update :mod:`zipapp` documentation to describe how to make |
| 39930 |
standalone applications. |
| 39931 |
|
| 39932 |
- bpo-18802: Documentation changes for ipaddress. Patch by Jon Foster and |
| 39933 |
Berker Peksag. |
| 39934 |
|
| 39935 |
- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder`` |
| 39936 |
implements ``MetaPathFinder``. (Patch by Himanshu Lakhara) |
| 39937 |
|
| 39938 |
- bpo-8243: Add a note about curses.addch and curses.addstr exception |
| 39939 |
behavior when writing outside a window, or pad. |
| 39940 |
|
| 39941 |
- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED |
| 39942 |
flags for ssl.SSLContext.verify_mode. |
| 39943 |
|
| 39944 |
Tests |
| 39945 |
----- |
| 39946 |
|
| 39947 |
- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that |
| 39948 |
might be due to running on ZFS. |
| 39949 |
|
| 39950 |
- bpo-19417: Add test_bdb.py. |
| 39951 |
|
| 39952 |
Build |
| 39953 |
----- |
| 39954 |
|
| 39955 |
- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from |
| 39956 |
``OPT``. This option emitted annoying warnings when building extension |
| 39957 |
modules written in C++. |
| 39958 |
|
| 39959 |
- bpo-33614: Ensures module definition files for the stable ABI on Windows |
| 39960 |
are correctly regenerated. |
| 39961 |
|
| 39962 |
- bpo-33522: Enable CI builds on Visual Studio Team Services at |
| 39963 |
https://python.visualstudio.com/cpython |
| 39964 |
|
| 39965 |
- bpo-33012: Add ``-Wno-cast-function-type`` for gcc 8 for silencing |
| 39966 |
warnings about function casts like casting to PyCFunction in method |
| 39967 |
definition lists. |
| 39968 |
|
| 39969 |
- bpo-33394: Enable the verbose build for extension modules, when GNU make |
| 39970 |
is passed macros on the command line. |
| 39971 |
|
| 39972 |
Windows |
| 39973 |
------- |
| 39974 |
|
| 39975 |
- bpo-33184: Update Windows installer to OpenSSL 1.0.2o. |
| 39976 |
|
| 39977 |
macOS |
| 39978 |
----- |
| 39979 |
|
| 39980 |
- bpo-33184: Update macOS installer build to use OpenSSL 1.0.2o. |
| 39981 |
|
| 39982 |
IDLE |
| 39983 |
---- |
| 39984 |
|
| 39985 |
- bpo-33656: On Windows, add API call saying that tk scales for DPI. On |
| 39986 |
Windows 8.1+ or 10, with DPI compatibility properties of the Python binary |
| 39987 |
unchanged, and a monitor resolution greater than 96 DPI, this should make |
| 39988 |
text and lines sharper. It should otherwise have no effect. |
| 39989 |
|
| 39990 |
- bpo-33768: Clicking on a context line moves that line to the top of the |
| 39991 |
editor window. |
| 39992 |
|
| 39993 |
- bpo-33763: IDLE: Use read-only text widget for code context instead of |
| 39994 |
label widget. |
| 39995 |
|
| 39996 |
- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel |
| 39997 |
and scrollbar slider moved text by a fixed number of pixels, resulting in |
| 39998 |
partial lines at the top of the editor box. The change also applies to |
| 39999 |
the shell and grep output windows, but not to read-only text views. |
| 40000 |
|
| 40001 |
- bpo-33679: Enable theme-specific color configuration for Code Context. Use |
| 40002 |
the Highlights tab to see the setting for built-in themes or add settings |
| 40003 |
to custom themes. |
| 40004 |
|
| 40005 |
- bpo-33642: Display up to maxlines non-blank lines for Code Context. If |
| 40006 |
there is no current context, show a single blank line. |
| 40007 |
|
| 40008 |
- bpo-33628: IDLE: Cleanup codecontext.py and its test. |
| 40009 |
|
| 40010 |
- bpo-33564: IDLE's code context now recognizes async as a block opener. |
| 40011 |
|
| 40012 |
- bpo-29706: IDLE now colors async and await as keywords in 3.6. They become |
| 40013 |
full keywords in 3.7. |
| 40014 |
|
| 40015 |
- bpo-21474: Update word/identifier definition from ascii to unicode. In |
| 40016 |
text and entry boxes, this affects selection by double-click, movement |
| 40017 |
left/right by control-left/right, and deletion left/right by |
| 40018 |
control-BACKSPACE/DEL. |
| 40019 |
|
| 40020 |
- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string |
| 40021 |
prefix cannot be paired with either 'r' or 'f'. Consistently color as much |
| 40022 |
of the prefix, starting at the right, as is valid. Revise and extend |
| 40023 |
colorizer test. |
| 40024 |
|
| 40025 |
- bpo-32831: Add docstrings and tests for codecontext. |
| 40026 |
|
| 40027 |
Tools/Demos |
| 40028 |
----------- |
| 40029 |
|
| 40030 |
- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as |
| 40031 |
docstrings and translatable strings, and rejects bytes literals and |
| 40032 |
f-string expressions. |
| 40033 |
|
| 40034 |
- bpo-31920: Fixed handling directories as arguments in the ``pygettext`` |
| 40035 |
script. Based on patch by Oleg Krasnikov. |
| 40036 |
|
| 40037 |
- bpo-29673: Fix pystackv and pystack gdbinit macros. |
| 40038 |
|
| 40039 |
- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable |
| 40040 |
automatic backup creation (files with ``~`` suffix). |
| 40041 |
|
| 40042 |
- bpo-31583: Fix 2to3 for using with --add-suffix option but without |
| 40043 |
--output-dir option for relative path to files in current directory. |
| 40044 |
|
| 40045 |
C API |
| 40046 |
----- |
| 40047 |
|
| 40048 |
- bpo-32374: Document that m_traverse for multi-phase initialized modules |
| 40049 |
can be called with m_state=NULL, and add a sanity check |
| 40050 |
|
| 40051 |
|
| 40052 |
What's New in Python 3.6.5 final? |
| 40053 |
================================= |
| 40054 |
|
| 40055 |
*Release date: 2018-03-28* |
| 40056 |
|
| 40057 |
Tests |
| 40058 |
----- |
| 40059 |
|
| 40060 |
- bpo-32872: Avoid regrtest compatibility issue with namespace packages. |
| 40061 |
|
| 40062 |
Build |
| 40063 |
----- |
| 40064 |
|
| 40065 |
- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. |
| 40066 |
|
| 40067 |
|
| 40068 |
What's New in Python 3.6.5 release candidate 1? |
| 40069 |
=============================================== |
| 40070 |
|
| 40071 |
*Release date: 2018-03-13* |
| 40072 |
|
| 40073 |
Security |
| 40074 |
-------- |
| 40075 |
|
| 40076 |
- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows |
| 40077 |
|
| 40078 |
- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic |
| 40079 |
backtracking. These regexes formed potential DOS vectors (REDOS). They |
| 40080 |
have been refactored. This resolves :cve:`2018-1060` and :cve:`2018-1061`. |
| 40081 |
Patch by Jamie Davis. |
| 40082 |
|
| 40083 |
Core and Builtins |
| 40084 |
----------------- |
| 40085 |
|
| 40086 |
- bpo-33026: Fixed jumping out of "with" block by setting f_lineno. |
| 40087 |
|
| 40088 |
- bpo-17288: Prevent jumps from 'return' and 'exception' trace events. |
| 40089 |
|
| 40090 |
- bpo-32889: Update Valgrind suppression list to account for the rename of |
| 40091 |
``Py_ADDRESS_IN_RANG`` to ``address_in_range``. |
| 40092 |
|
| 40093 |
- bpo-32650: Pdb and other debuggers dependent on bdb.py will correctly step |
| 40094 |
over (next command) native coroutines. Patch by Pablo Galindo. |
| 40095 |
|
| 40096 |
- bpo-32685: Improve suggestion when the Python 2 form of print statement is |
| 40097 |
either present on the same line as the header of a compound statement or |
| 40098 |
else terminated by a semi-colon instead of a newline. Patch by Nitish |
| 40099 |
Chandra. |
| 40100 |
|
| 40101 |
- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by |
| 40102 |
write out-of-bound errors when using customized decode error handlers. |
| 40103 |
|
| 40104 |
- bpo-26163: Improved frozenset() hash to create more distinct hash values |
| 40105 |
when faced with datasets containing many similar values. |
| 40106 |
|
| 40107 |
- bpo-27169: The ``__debug__`` constant is now optimized out at compile |
| 40108 |
time. This fixes also bpo-22091. |
| 40109 |
|
| 40110 |
- bpo-32329: ``sys.flags.hash_randomization`` is now properly set to 0 when |
| 40111 |
hash randomization is turned off by ``PYTHONHASHSEED=0``. |
| 40112 |
|
| 40113 |
- bpo-30416: The optimizer is now protected from spending much time doing |
| 40114 |
complex calculations and consuming much memory for creating large |
| 40115 |
constants in constant folding. |
| 40116 |
|
| 40117 |
- bpo-18533: ``repr()`` on a dict containing its own ``values()`` or |
| 40118 |
``items()`` no longer raises ``RecursionError``; OrderedDict similarly. |
| 40119 |
Instead, use ``...``, as for other recursive structures. Patch by Ben |
| 40120 |
North. |
| 40121 |
|
| 40122 |
- bpo-32028: Leading whitespace is now correctly ignored when generating |
| 40123 |
suggestions for converting Py2 print statements to Py3 builtin print |
| 40124 |
function calls. Patch by Sanyam Khurana. |
| 40125 |
|
| 40126 |
- bpo-32137: The repr of deeply nested dict now raises a RecursionError |
| 40127 |
instead of crashing due to a stack overflow. |
| 40128 |
|
| 40129 |
Library |
| 40130 |
------- |
| 40131 |
|
| 40132 |
- bpo-33064: lib2to3 now properly supports trailing commas after ``*args`` |
| 40133 |
and ``**kwargs`` in function signatures. |
| 40134 |
|
| 40135 |
- bpo-31804: Avoid failing in multiprocessing.Process if the standard |
| 40136 |
streams are closed or None at exit. |
| 40137 |
|
| 40138 |
- bpo-33037: Skip sending/receiving data after SSL transport closing. |
| 40139 |
|
| 40140 |
- bpo-30353: Fix ctypes pass-by-value for structs on 64-bit Cygwin/MinGW. |
| 40141 |
|
| 40142 |
- bpo-33009: Fix inspect.signature() for single-parameter partialmethods. |
| 40143 |
|
| 40144 |
- bpo-32969: Expose several missing constants in zlib and fix corresponding |
| 40145 |
documentation. |
| 40146 |
|
| 40147 |
- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch |
| 40148 |
by Joffrey Fuhrer. |
| 40149 |
|
| 40150 |
- bpo-30622: The ssl module now detects missing NPN support in LibreSSL. |
| 40151 |
|
| 40152 |
- bpo-32922: dbm.open() now encodes filename with the filesystem encoding |
| 40153 |
rather than default encoding. |
| 40154 |
|
| 40155 |
- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3`` |
| 40156 |
syscall exists or not. |
| 40157 |
|
| 40158 |
- bpo-21060: Rewrite confusing message from setup.py upload from "No dist |
| 40159 |
file created in earlier command" to the more helpful "Must create and |
| 40160 |
upload files in one command". |
| 40161 |
|
| 40162 |
- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a |
| 40163 |
:exc:`ValueError` instead of canceling the first scheduled function. |
| 40164 |
Patch by Cheryl Sabella. |
| 40165 |
|
| 40166 |
- bpo-32852: Make sure sys.argv remains as a list when running trace. |
| 40167 |
|
| 40168 |
- bpo-32841: Fixed ``asyncio.Condition`` issue which silently ignored |
| 40169 |
cancellation after notifying and cancelling a conditional lock. Patch by |
| 40170 |
Bar Harel. |
| 40171 |
|
| 40172 |
- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules. |
| 40173 |
(Contributed by Oren Milman) |
| 40174 |
|
| 40175 |
- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when |
| 40176 |
only the last field is quoted. Patch by Jake Davis. |
| 40177 |
|
| 40178 |
- bpo-32394: socket: Remove TCP_FASTOPEN, TCP_KEEPCNT flags on older version |
| 40179 |
Windows during run-time. |
| 40180 |
|
| 40181 |
- bpo-32777: Fix a rare but potential pre-exec child process deadlock in |
| 40182 |
subprocess on POSIX systems when marking file descriptors inheritable on |
| 40183 |
exec in the child process. This bug appears to have been introduced in |
| 40184 |
3.4. |
| 40185 |
|
| 40186 |
- bpo-32647: The ctypes module used to depend on indirect linking for |
| 40187 |
dlopen. The shared extension is now explicitly linked against libdl on |
| 40188 |
platforms with dl. |
| 40189 |
|
| 40190 |
- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring |
| 40191 |
and locking the same lock multiple times, without it being free. Patch by |
| 40192 |
Bar Harel. |
| 40193 |
|
| 40194 |
- bpo-32727: Do not include name field in SMTP envelope from address. Patch |
| 40195 |
by Stéphane Wirtel |
| 40196 |
|
| 40197 |
- bpo-27931: Fix email address header parsing error when the username is an |
| 40198 |
empty quoted string. Patch by Xiang Zhang. |
| 40199 |
|
| 40200 |
- bpo-32304: distutils' upload command no longer corrupts tar files ending |
| 40201 |
with a CR byte, and no longer tries to convert CR to CRLF in any of the |
| 40202 |
upload text fields. |
| 40203 |
|
| 40204 |
- bpo-32502: uuid.uuid1 no longer raises an exception if a 64-bit hardware |
| 40205 |
address is encountered. |
| 40206 |
|
| 40207 |
- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND |
| 40208 |
chunk is not found. Patch by Zackery Spytz. |
| 40209 |
|
| 40210 |
- bpo-32555: On FreeBSD and Solaris, os.strerror() now always decode the |
| 40211 |
byte string from the current locale encoding, rather than using |
| 40212 |
ASCII/surrogateescape in some cases. |
| 40213 |
|
| 40214 |
- bpo-32521: The nis module is now compatible with new libnsl and headers |
| 40215 |
location. |
| 40216 |
|
| 40217 |
- bpo-32473: Improve ABCMeta._dump_registry() output readability |
| 40218 |
|
| 40219 |
- bpo-32521: glibc has removed Sun RPC. Use replacement libtirpc headers and |
| 40220 |
library in nis module. |
| 40221 |
|
| 40222 |
- bpo-32228: Ensure that ``truncate()`` preserves the file position (as |
| 40223 |
reported by ``tell()``) after writes longer than the buffer size. |
| 40224 |
|
| 40225 |
- bpo-26133: Don't unsubscribe signals in asyncio UNIX event loop on |
| 40226 |
interpreter shutdown. |
| 40227 |
|
| 40228 |
- bpo-32185: The SSL module no longer sends IP addresses in SNI TLS |
| 40229 |
extension on platforms with OpenSSL 1.0.2+ or inet_pton. |
| 40230 |
|
| 40231 |
- bpo-32323: :func:`urllib.parse.urlsplit` does not convert zone-id (scope) |
| 40232 |
to lower case for scoped IPv6 addresses in hostnames now. |
| 40233 |
|
| 40234 |
- bpo-32302: Fix bdist_wininst of distutils for CRT v142: it binary |
| 40235 |
compatible with CRT v140. |
| 40236 |
|
| 40237 |
- bpo-32255: A single empty field is now always quoted when written into a |
| 40238 |
CSV file. This allows to distinguish an empty row from a row consisting of |
| 40239 |
a single empty field. Patch by Licht Takeuchi. |
| 40240 |
|
| 40241 |
- bpo-32277: Raise ``NotImplementedError`` instead of ``SystemError`` on |
| 40242 |
platforms where ``chmod(..., follow_symlinks=False)`` is not supported. |
| 40243 |
Patch by Anthony Sottile. |
| 40244 |
|
| 40245 |
- bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link |
| 40246 |
list'. |
| 40247 |
|
| 40248 |
- bpo-27456: Ensure TCP_NODELAY is set on Linux. Tests by Victor Stinner. |
| 40249 |
|
| 40250 |
- bpo-31900: The :func:`locale.localeconv` function now sets temporarily the |
| 40251 |
``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode |
| 40252 |
``decimal_point`` and ``thousands_sep`` byte strings if they are non-ASCII |
| 40253 |
or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the |
| 40254 |
``LC_CTYPE`` locale. This temporary change affects other threads. Same |
| 40255 |
change for the :meth:`str.format` method when formatting a number |
| 40256 |
(:class:`int`, :class:`float`, :class:`float` and subclasses) with the |
| 40257 |
``n`` type (ex: ``'{:n}'.format(1234)``). |
| 40258 |
|
| 40259 |
- bpo-31802: Importing native path module (``posixpath``, ``ntpath``) now |
| 40260 |
works even if the ``os`` module still is not imported. |
| 40261 |
|
| 40262 |
Documentation |
| 40263 |
------------- |
| 40264 |
|
| 40265 |
- bpo-17232: Clarify docs for -O and -OO. Patch by Terry Reedy. |
| 40266 |
|
| 40267 |
- bpo-32800: Update link to w3c doc for xml default namespaces. |
| 40268 |
|
| 40269 |
- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get` |
| 40270 |
method raises :exc:`AttributeError`. |
| 40271 |
|
| 40272 |
- bpo-32614: Modify RE examples in documentation to use raw strings to |
| 40273 |
prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight |
| 40274 |
the deprecation. |
| 40275 |
|
| 40276 |
- bpo-31972: Improve docstrings for ``pathlib.PurePath`` subclasses. |
| 40277 |
|
| 40278 |
- bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile and |
| 40279 |
their C-API counterparts regarding which type of events are received in |
| 40280 |
each function. Patch by Pablo Galindo Salgado. |
| 40281 |
|
| 40282 |
Tests |
| 40283 |
----- |
| 40284 |
|
| 40285 |
- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport |
| 40286 |
of ``KqueueSelector`` loop was not being closed. |
| 40287 |
|
| 40288 |
- bpo-32721: Fix test_hashlib to not fail if the _md5 module is not built. |
| 40289 |
|
| 40290 |
- bpo-32252: Fix faulthandler_suppress_crash_report() used to prevent core |
| 40291 |
dump files when testing crashes. getrlimit() returns zero on success. |
| 40292 |
|
| 40293 |
- bpo-31518: Debian Unstable has disabled TLS 1.0 and 1.1 for |
| 40294 |
SSLv23_METHOD(). Change TLS/SSL protocol of some tests to PROTOCOL_TLS or |
| 40295 |
PROTOCOL_TLSv1_2 to make them pass on Debian. |
| 40296 |
|
| 40297 |
Build |
| 40298 |
----- |
| 40299 |
|
| 40300 |
- bpo-32635: Fix segfault of the crypt module when libxcrypt is provided |
| 40301 |
instead of libcrypt at the system. |
| 40302 |
|
| 40303 |
Windows |
| 40304 |
------- |
| 40305 |
|
| 40306 |
- bpo-33016: Fix potential use of uninitialized memory in |
| 40307 |
nt._getfinalpathname |
| 40308 |
|
| 40309 |
- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current |
| 40310 |
directory is set to a UNC path. |
| 40311 |
|
| 40312 |
- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. |
| 40313 |
|
| 40314 |
- bpo-32409: Ensures activate.bat can handle Unicode contents. |
| 40315 |
|
| 40316 |
- bpo-32457: Improves handling of denormalized executable path when |
| 40317 |
launching Python. |
| 40318 |
|
| 40319 |
- bpo-32370: Use the correct encoding for ipconfig output in the uuid |
| 40320 |
module. Patch by Segev Finer. |
| 40321 |
|
| 40322 |
- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly |
| 40323 |
treating the ``PrintNameOffset`` field of the reparse data buffer as a |
| 40324 |
number of characters instead of bytes. Patch by Craig Holmquist and SSE4. |
| 40325 |
|
| 40326 |
- bpo-32588: Create standalone _distutils_findvs module. |
| 40327 |
|
| 40328 |
macOS |
| 40329 |
----- |
| 40330 |
|
| 40331 |
- bpo-32726: Provide an additional, more modern macOS installer variant that |
| 40332 |
supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied |
| 40333 |
third-party libraries to OpenSSL 1.0.2n, XZ 5.2.3, and SQLite 3.22.0. The |
| 40334 |
10.9+ installer now links with and supplies its own copy of Tcl/Tk 8.6.8. |
| 40335 |
|
| 40336 |
IDLE |
| 40337 |
---- |
| 40338 |
|
| 40339 |
- bpo-32984: Set ``__file__`` while running a startup file. Like Python, |
| 40340 |
IDLE optionally runs one startup file in the Shell window before |
| 40341 |
presenting the first interactive input prompt. For IDLE, ``-s`` runs a |
| 40342 |
file named in environmental variable :envvar:`IDLESTARTUP` or |
| 40343 |
:envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``. Python sets |
| 40344 |
``__file__`` to the startup file name before running the file and unsets |
| 40345 |
it before the first prompt. IDLE now does the same when run normally, |
| 40346 |
without the ``-n`` option. |
| 40347 |
|
| 40348 |
- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse. |
| 40349 |
|
| 40350 |
- bpo-32916: Change ``str`` to ``code`` in pyparse. |
| 40351 |
|
| 40352 |
- bpo-32905: Remove unused code in pyparse module. |
| 40353 |
|
| 40354 |
- bpo-32874: Add tests for pyparse. |
| 40355 |
|
| 40356 |
- bpo-32837: Using the system and place-dependent default encoding for |
| 40357 |
open() is a bad idea for IDLE's system and location-independent files. |
| 40358 |
|
| 40359 |
- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI |
| 40360 |
test test_file_buttons() only looks at initial ascii-only lines, but |
| 40361 |
failed on systems where open() defaults to 'ascii' because readline() |
| 40362 |
internally reads and decodes far enough ahead to encounter a non-ascii |
| 40363 |
character in CREDITS.txt. |
| 40364 |
|
| 40365 |
- bpo-32765: Update configdialog General tab docstring to add new widgets to |
| 40366 |
the widget list. |
| 40367 |
|
| 40368 |
Tools/Demos |
| 40369 |
----------- |
| 40370 |
|
| 40371 |
- bpo-24960: 2to3 and lib2to3 can now read pickled grammar files using |
| 40372 |
pkgutil.get_data() rather than probing the filesystem. This lets 2to3 and |
| 40373 |
lib2to3 work when run from a zipfile. |
| 40374 |
|
| 40375 |
- bpo-32222: Fix pygettext not extracting docstrings for functions with type |
| 40376 |
annotated arguments. Patch by Toby Harradine. |
| 40377 |
|
| 40378 |
C API |
| 40379 |
----- |
| 40380 |
|
| 40381 |
- bpo-29084: Undocumented C API for OrderedDict has been excluded from the |
| 40382 |
limited C API. It was added by mistake and actually never worked in the |
| 40383 |
limited C API. |
| 40384 |
|
| 40385 |
|
| 40386 |
What's New in Python 3.6.4 final? |
| 40387 |
================================= |
| 40388 |
|
| 40389 |
*Release date: 2017-12-18* |
| 40390 |
|
| 40391 |
There were no new code changes in version 3.6.4 since v3.6.4rc1. |
| 40392 |
|
| 40393 |
|
| 40394 |
|
| 40395 |
What's New in Python 3.6.4 release candidate 1? |
| 40396 |
=============================================== |
| 40397 |
|
| 40398 |
*Release date: 2017-12-05* |
| 40399 |
|
| 40400 |
Core and Builtins |
| 40401 |
----------------- |
| 40402 |
|
| 40403 |
- bpo-32176: co_flags.CO_NOFREE is now always set correctly by the code |
| 40404 |
object constructor based on freevars and cellvars, rather than needing to |
| 40405 |
be set correctly by the caller. This ensures it will be cleared |
| 40406 |
automatically when additional cell references are injected into a modified |
| 40407 |
code object and function. |
| 40408 |
|
| 40409 |
- bpo-31949: Fixed several issues in printing tracebacks |
| 40410 |
(PyTraceBack_Print()). Setting sys.tracebacklimit to 0 or less now |
| 40411 |
suppresses printing tracebacks. Setting sys.tracebacklimit to None now |
| 40412 |
causes using the default limit. Setting sys.tracebacklimit to an integer |
| 40413 |
larger than LONG_MAX now means using the limit LONG_MAX rather than the |
| 40414 |
default limit. Fixed integer overflows in the case of more than ``2**31`` |
| 40415 |
traceback items on Windows. Fixed output errors handling. |
| 40416 |
|
| 40417 |
- bpo-30696: Fix the interactive interpreter looping endlessly when no |
| 40418 |
memory. |
| 40419 |
|
| 40420 |
- bpo-20047: Bytearray methods partition() and rpartition() now accept only |
| 40421 |
bytes-like objects as separator, as documented. In particular they now |
| 40422 |
raise TypeError rather of returning a bogus result when an integer is |
| 40423 |
passed as a separator. |
| 40424 |
|
| 40425 |
- bpo-31852: Fix a segmentation fault caused by a combination of the async |
| 40426 |
soft keyword and continuation lines. |
| 40427 |
|
| 40428 |
- bpo-21720: BytesWarning no longer emitted when the *fromlist* argument of |
| 40429 |
``__import__()`` or the ``__all__`` attribute of the module contain bytes |
| 40430 |
instances. |
| 40431 |
|
| 40432 |
- bpo-31825: Fixed OverflowError in the 'unicode-escape' codec and in |
| 40433 |
codecs.escape_decode() when decode an escaped non-ascii byte. |
| 40434 |
|
| 40435 |
- bpo-28603: Print the full context/cause chain of exceptions on interpreter |
| 40436 |
exit, even if an exception in the chain is unhashable or compares equal to |
| 40437 |
later ones. Patch by Zane Bitter. |
| 40438 |
|
| 40439 |
- bpo-31786: Fix timeout rounding in the select module to round correctly |
| 40440 |
negative timeouts between -1.0 and 0.0. The functions now block waiting |
| 40441 |
for events as expected. Previously, the call was incorrectly non-blocking. |
| 40442 |
Patch by Pablo Galindo. |
| 40443 |
|
| 40444 |
- bpo-31642: Restored blocking "from package import module" by setting |
| 40445 |
sys.modules["package.module"] to None. |
| 40446 |
|
| 40447 |
- bpo-31626: Fixed a bug in debug memory allocator. There was a write to |
| 40448 |
freed memory after shrinking a memory block. |
| 40449 |
|
| 40450 |
- bpo-31619: Fixed a ValueError when convert a string with large number of |
| 40451 |
underscores to integer with binary base. |
| 40452 |
|
| 40453 |
- bpo-31592: Fixed an assertion failure in Python parser in case of a bad |
| 40454 |
``unicodedata.normalize()``. Patch by Oren Milman. |
| 40455 |
|
| 40456 |
- bpo-31588: Raise a ``TypeError`` with a helpful error message when class |
| 40457 |
creation fails due to a metaclass with a bad ``__prepare__()`` method. |
| 40458 |
Patch by Oren Milman. |
| 40459 |
|
| 40460 |
- bpo-31566: Fix an assertion failure in ``_warnings.warn()`` in case of a |
| 40461 |
bad ``__name__`` global. Patch by Oren Milman. |
| 40462 |
|
| 40463 |
- bpo-31505: Fix an assertion failure in ``json``, in case |
| 40464 |
``_json.make_encoder()`` received a bad ``encoder()`` argument. Patch by |
| 40465 |
Oren Milman. |
| 40466 |
|
| 40467 |
- bpo-31492: Fix assertion failures in case of failing to import from a |
| 40468 |
module with a bad ``__name__`` attribute, and in case of failing to access |
| 40469 |
an attribute of such a module. Patch by Oren Milman. |
| 40470 |
|
| 40471 |
- bpo-31490: Fix an assertion failure in ``ctypes`` class definition, in |
| 40472 |
case the class has an attribute whose name is specified in ``_anonymous_`` |
| 40473 |
but not in ``_fields_``. Patch by Oren Milman. |
| 40474 |
|
| 40475 |
- bpo-31478: Fix an assertion failure in ``_random.Random.seed()`` in case |
| 40476 |
the argument has a bad ``__abs__()`` method. Patch by Oren Milman. |
| 40477 |
|
| 40478 |
- bpo-31315: Fix an assertion failure in imp.create_dynamic(), when |
| 40479 |
spec.name is not a string. Patch by Oren Milman. |
| 40480 |
|
| 40481 |
- bpo-31311: Fix a crash in the ``__setstate__()`` method of |
| 40482 |
``ctypes._CData``, in case of a bad ``__dict__``. Patch by Oren Milman. |
| 40483 |
|
| 40484 |
- bpo-31293: Fix crashes in true division and multiplication of a timedelta |
| 40485 |
object by a float with a bad as_integer_ratio() method. Patch by Oren |
| 40486 |
Milman. |
| 40487 |
|
| 40488 |
- bpo-31285: Fix an assertion failure in ``warnings.warn_explicit``, when |
| 40489 |
the return value of the received loader's ``get_source()`` has a bad |
| 40490 |
``splitlines()`` method. Patch by Oren Milman. |
| 40491 |
|
| 40492 |
- bpo-30817: ``PyErr_PrintEx()`` clears now the ignored exception that may |
| 40493 |
be raised by ``_PySys_SetObjectId()``, for example when no memory. |
| 40494 |
|
| 40495 |
Library |
| 40496 |
------- |
| 40497 |
|
| 40498 |
- bpo-28556: Two minor fixes for ``typing`` module: allow shallow copying |
| 40499 |
instances of generic classes, improve interaction of ``__init_subclass__`` |
| 40500 |
with generics. Original PRs by Ivan Levkivskyi. |
| 40501 |
|
| 40502 |
- bpo-27240: The header folding algorithm for the new email policies has |
| 40503 |
been rewritten, which also fixes bpo-30788, bpo-31831, and bpo-32182. In |
| 40504 |
particular, RFC2231 folding is now done correctly. |
| 40505 |
|
| 40506 |
- bpo-32186: io.FileIO.readall() and io.FileIO.read() now release the GIL |
| 40507 |
when getting the file size. Fixed hang of all threads with inaccessible |
| 40508 |
NFS server. Patch by Nir Soffer. |
| 40509 |
|
| 40510 |
- bpo-12239: Make :meth:`!msilib.SummaryInformation.GetProperty` return |
| 40511 |
``None`` when the value of property is ``VT_EMPTY``. Initial patch by |
| 40512 |
Mark Mc Mahon. |
| 40513 |
|
| 40514 |
- bpo-31325: Fix wrong usage of :func:`collections.namedtuple` in the |
| 40515 |
:meth:`RobotFileParser.parse() <urllib.robotparser.RobotFileParser.parse>` |
| 40516 |
method. Initial patch by Robin Wellner. |
| 40517 |
|
| 40518 |
- bpo-12382: :func:`!msilib.OpenDatabase` now raises a better exception |
| 40519 |
message when it couldn't open or create an MSI file. Initial patch by |
| 40520 |
William Tisäter. |
| 40521 |
|
| 40522 |
- bpo-32110: ``codecs.StreamReader.read(n)`` now returns not more than *n* |
| 40523 |
characters/bytes for non-negative *n*. This makes it compatible with |
| 40524 |
``read()`` methods of other file-like objects. |
| 40525 |
|
| 40526 |
- bpo-32072: Fixed issues with binary plists: Fixed saving bytearrays. |
| 40527 |
Identical objects will be saved only once. Equal references will be load |
| 40528 |
as identical objects. Added support for saving and loading recursive data |
| 40529 |
structures. |
| 40530 |
|
| 40531 |
- bpo-32034: Make asyncio.IncompleteReadError and LimitOverrunError |
| 40532 |
pickleable. |
| 40533 |
|
| 40534 |
- bpo-32015: Fixed the looping of asyncio in the case of reconnection the |
| 40535 |
socket during waiting async read/write from/to the socket. |
| 40536 |
|
| 40537 |
- bpo-32011: Restored support of loading marshal files with the TYPE_INT64 |
| 40538 |
code. These files can be produced in Python 2.7. |
| 40539 |
|
| 40540 |
- bpo-31970: Reduce performance overhead of asyncio debug mode. |
| 40541 |
|
| 40542 |
- bpo-9678: Fixed determining the MAC address in the uuid module: Using |
| 40543 |
ifconfig on NetBSD and OpenBSD. Using arp on Linux, FreeBSD, NetBSD and |
| 40544 |
OpenBSD. Based on patch by Takayuki Shimizukawa. |
| 40545 |
|
| 40546 |
- bpo-30057: Fix potential missed signal in signal.signal(). |
| 40547 |
|
| 40548 |
- bpo-31933: Fix Blake2 params leaf_size and node_offset on big endian |
| 40549 |
platforms. Patch by Jack O'Connor. |
| 40550 |
|
| 40551 |
- bpo-31927: Fixed compilation of the socket module on NetBSD 8. Fixed |
| 40552 |
assertion failure or reading arbitrary data when parse a AF_BLUETOOTH |
| 40553 |
address on NetBSD and DragonFly BSD. |
| 40554 |
|
| 40555 |
- bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse() |
| 40556 |
when the size of types chtype or mmask_t is less than the size of C long. |
| 40557 |
curses.box() now accepts characters as arguments. Based on patch by Steve |
| 40558 |
Fink. |
| 40559 |
|
| 40560 |
- bpo-31897: plistlib now catches more errors when read binary plists and |
| 40561 |
raises InvalidFileException instead of unexpected exceptions. |
| 40562 |
|
| 40563 |
- bpo-25720: Fix the method for checking pad state of curses WINDOW. Patch |
| 40564 |
by Masayuki Yamamoto. |
| 40565 |
|
| 40566 |
- bpo-31893: Fixed the layout of the kqueue_event structure on OpenBSD and |
| 40567 |
NetBSD. Fixed the comparison of the kqueue_event objects. |
| 40568 |
|
| 40569 |
- bpo-31891: Fixed building the curses module on NetBSD. |
| 40570 |
|
| 40571 |
- bpo-28416: Instances of pickle.Pickler subclass with the persistent_id() |
| 40572 |
method and pickle.Unpickler subclass with the persistent_load() method no |
| 40573 |
longer create reference cycles. |
| 40574 |
|
| 40575 |
- bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed |
| 40576 |
or None. |
| 40577 |
|
| 40578 |
- bpo-31457: If nested log adapters are used, the inner ``process()`` |
| 40579 |
methods are no longer omitted. |
| 40580 |
|
| 40581 |
- bpo-31457: The ``manager`` property on LoggerAdapter objects is now |
| 40582 |
properly settable. |
| 40583 |
|
| 40584 |
- bpo-31806: Fix timeout rounding in time.sleep(), threading.Lock.acquire() |
| 40585 |
and socket.socket.settimeout() to round correctly negative timeouts |
| 40586 |
between -1.0 and 0.0. The functions now block waiting for events as |
| 40587 |
expected. Previously, the call was incorrectly non-blocking. Patch by |
| 40588 |
Pablo Galindo. |
| 40589 |
|
| 40590 |
- bpo-28603: traceback: Fix a TypeError that occurred during printing of |
| 40591 |
exception tracebacks when either the current exception or an exception in |
| 40592 |
its context/cause chain is unhashable. Patch by Zane Bitter. |
| 40593 |
|
| 40594 |
- bpo-30058: Fixed buffer overflow in select.kqueue.control(). |
| 40595 |
|
| 40596 |
- bpo-31770: Prevent a crash when calling the ``__init__()`` method of a |
| 40597 |
``sqlite3.Cursor`` object more than once. Patch by Oren Milman. |
| 40598 |
|
| 40599 |
- bpo-31672: ``idpattern`` in ``string.Template`` matched some non-ASCII |
| 40600 |
characters. Now it uses ``-i`` regular expression local flag to avoid |
| 40601 |
non-ASCII characters. |
| 40602 |
|
| 40603 |
- bpo-31764: Prevent a crash in ``sqlite3.Cursor.close()`` in case the |
| 40604 |
``Cursor`` object is uninitialized. Patch by Oren Milman. |
| 40605 |
|
| 40606 |
- bpo-31752: Fix possible crash in timedelta constructor called with custom |
| 40607 |
integers. |
| 40608 |
|
| 40609 |
- bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM |
| 40610 |
exceptions. |
| 40611 |
|
| 40612 |
- bpo-31728: Prevent crashes in ``_elementtree`` due to unsafe cleanup of |
| 40613 |
``Element.text`` and ``Element.tail``. Patch by Oren Milman. |
| 40614 |
|
| 40615 |
- bpo-31620: an empty asyncio.Queue now doesn't leak memory when queue.get |
| 40616 |
pollers timeout |
| 40617 |
|
| 40618 |
- bpo-31632: Fix method set_protocol() of class _SSLProtocolTransport in |
| 40619 |
asyncio module. This method was previously modifying a wrong reference to |
| 40620 |
the protocol. |
| 40621 |
|
| 40622 |
- bpo-31675: Fixed memory leaks in Tkinter's methods splitlist() and split() |
| 40623 |
when pass a string larger than 2 GiB. |
| 40624 |
|
| 40625 |
- bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). |
| 40626 |
|
| 40627 |
- bpo-30806: Fix the string representation of a netrc object. |
| 40628 |
|
| 40629 |
- bpo-15037: Added a workaround for getkey() in curses for ncurses 5.7 and |
| 40630 |
earlier. |
| 40631 |
|
| 40632 |
- bpo-25351: Avoid venv activate failures with undefined variables |
| 40633 |
|
| 40634 |
- bpo-25532: inspect.unwrap() will now only try to unwrap an object |
| 40635 |
sys.getrecursionlimit() times, to protect against objects which create a |
| 40636 |
new object on every attribute access. |
| 40637 |
|
| 40638 |
- bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() |
| 40639 |
iterators. |
| 40640 |
|
| 40641 |
- bpo-31516: ``threading.current_thread()`` should not return a dummy thread |
| 40642 |
at shutdown. |
| 40643 |
|
| 40644 |
- bpo-31351: python -m ensurepip now exits with non-zero exit code if pip |
| 40645 |
bootstrapping has failed. |
| 40646 |
|
| 40647 |
- bpo-31482: ``random.seed()`` now works with bytes in version=1 |
| 40648 |
|
| 40649 |
- bpo-31334: Fix ``poll.poll([timeout])`` in the ``select`` module for |
| 40650 |
arbitrary negative timeouts on all OSes where it can only be a |
| 40651 |
non-negative integer or -1. Patch by Riccardo Coccioli. |
| 40652 |
|
| 40653 |
- bpo-31310: multiprocessing's semaphore tracker should be launched again if |
| 40654 |
crashed. |
| 40655 |
|
| 40656 |
- bpo-31308: Make multiprocessing's forkserver process immune to Ctrl-C and |
| 40657 |
other user interruptions. If it crashes, restart it when necessary. |
| 40658 |
|
| 40659 |
Documentation |
| 40660 |
------------- |
| 40661 |
|
| 40662 |
- bpo-32105: Added asyncio.BaseEventLoop.connect_accepted_socket |
| 40663 |
versionadded marker. |
| 40664 |
|
| 40665 |
- bpo-31537: Fix incorrect usage of ``get_history_length`` in readline |
| 40666 |
documentation example code. Patch by Brad Smith. |
| 40667 |
|
| 40668 |
- bpo-30085: The operator functions without double underscores are preferred |
| 40669 |
for clarity. The one with underscores are only kept for |
| 40670 |
back-compatibility. |
| 40671 |
|
| 40672 |
Tests |
| 40673 |
----- |
| 40674 |
|
| 40675 |
- bpo-31380: Skip test_httpservers test_undecodable_file on macOS: fails on |
| 40676 |
APFS. |
| 40677 |
|
| 40678 |
- bpo-31705: Skip test_socket.test_sha256() on Linux kernel older than 4.5. |
| 40679 |
The test fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged |
| 40680 |
into the kernel 4.5. |
| 40681 |
|
| 40682 |
- bpo-31174: Fix test_tools.test_unparse: DirectoryTestCase now stores the |
| 40683 |
names sample to always test the same files. It prevents false alarms when |
| 40684 |
hunting reference leaks. |
| 40685 |
|
| 40686 |
- bpo-30695: Add the ``set_nomemory(start, stop)`` and |
| 40687 |
``remove_mem_hooks()`` functions to the ``_testcapi`` module. |
| 40688 |
|
| 40689 |
Build |
| 40690 |
----- |
| 40691 |
|
| 40692 |
- bpo-32059: ``detect_modules()`` in ``setup.py`` now also searches the |
| 40693 |
sysroot paths when cross-compiling. |
| 40694 |
|
| 40695 |
- bpo-31957: Fixes Windows SDK version detection when building for Windows. |
| 40696 |
|
| 40697 |
- bpo-31609: Fixes quotes in PCbuild/clean.bat |
| 40698 |
|
| 40699 |
- bpo-31934: Abort the build when building out of a not clean source tree. |
| 40700 |
|
| 40701 |
- bpo-31926: Fixed Argument Clinic sometimes causing compilation errors when |
| 40702 |
there was more than one function and/or method in a .c file with the same |
| 40703 |
name. |
| 40704 |
|
| 40705 |
- bpo-28791: Update Windows builds to use SQLite 3.21.0. |
| 40706 |
|
| 40707 |
- bpo-28791: Update OS X installer to use SQLite 3.21.0. |
| 40708 |
|
| 40709 |
- bpo-22140: Prevent double substitution of prefix in python-config.sh. |
| 40710 |
|
| 40711 |
- bpo-31536: Avoid wholesale rebuild after ``make regen-all`` if nothing |
| 40712 |
changed. |
| 40713 |
|
| 40714 |
Windows |
| 40715 |
------- |
| 40716 |
|
| 40717 |
- bpo-1102: Return ``None`` when ``View.Fetch()`` returns |
| 40718 |
``ERROR_NO_MORE_ITEMS`` instead of raising ``MSIError``. Initial patch by |
| 40719 |
Anthony Tuininga. |
| 40720 |
|
| 40721 |
- bpo-31944: Fixes Modify button in Apps and Features dialog. |
| 40722 |
|
| 40723 |
macOS |
| 40724 |
----- |
| 40725 |
|
| 40726 |
- bpo-31392: Update macOS installer to use OpenSSL 1.0.2m |
| 40727 |
|
| 40728 |
IDLE |
| 40729 |
---- |
| 40730 |
|
| 40731 |
- bpo-32207: Improve tk event exception tracebacks in IDLE. When tk event |
| 40732 |
handling is driven by IDLE's run loop, a confusing and distracting |
| 40733 |
queue.EMPTY traceback context is no longer added to tk event exception |
| 40734 |
tracebacks. The traceback is now the same as when event handling is |
| 40735 |
driven by user code. Patch based on a suggestion by Serhiy Storchaka. |
| 40736 |
|
| 40737 |
- bpo-32164: Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet |
| 40738 |
in configdialog was replaced by ttk.Notebook. |
| 40739 |
|
| 40740 |
- bpo-32100: IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch |
| 40741 |
mostly by Cheryl Sabella. |
| 40742 |
|
| 40743 |
- bpo-31858: IDLE -- Restrict shell prompt manipulation to the shell. Editor |
| 40744 |
and output windows only see an empty last prompt line. This simplifies |
| 40745 |
the code and fixes a minor bug when newline is inserted. Sys.ps1, if |
| 40746 |
present, is read on Shell start-up, but is not set or changed. |
| 40747 |
|
| 40748 |
- bpo-31860: The font sample in the IDLE configuration dialog is now |
| 40749 |
editable. Changes persist while IDLE remains open |
| 40750 |
|
| 40751 |
- bpo-31836: Test_code_module now passes if run after test_idle, which sets |
| 40752 |
ps1. The code module uses sys.ps1 if present or sets it to '>>> ' if not. |
| 40753 |
Test_code_module now properly tests both behaviors. Ditto for ps2. |
| 40754 |
|
| 40755 |
- bpo-28603: Fix a TypeError that caused a shell restart when printing a |
| 40756 |
traceback that includes an exception that is unhashable. Patch by Zane |
| 40757 |
Bitter. |
| 40758 |
|
| 40759 |
- bpo-13802: Use non-Latin characters in the IDLE's Font settings sample. |
| 40760 |
Even if one selects a font that defines a limited subset of the unicode |
| 40761 |
Basic Multilingual Plane, tcl/tk will use other fonts that define a |
| 40762 |
character. The expanded example give users of non-Latin characters a |
| 40763 |
better idea of what they might see in IDLE's shell and editors. To make |
| 40764 |
room for the expanded sample, frames on the Font tab are re-arranged. The |
| 40765 |
Font/Tabs help explains a bit about the additions. |
| 40766 |
|
| 40767 |
- bpo-31460: Simplify the API of IDLE's Module Browser. Passing a widget |
| 40768 |
instead of an flist with a root widget opens the option of creating a |
| 40769 |
browser frame that is only part of a window. Passing a full file name |
| 40770 |
instead of pieces assumed to come from a .py file opens the possibility of |
| 40771 |
browsing python files that do not end in .py. |
| 40772 |
|
| 40773 |
- bpo-31649: IDLE - Make _htest, _utest parameters keyword only. |
| 40774 |
|
| 40775 |
- bpo-31559: Remove test order dependence in idle_test.test_browser. |
| 40776 |
|
| 40777 |
- bpo-31459: Rename IDLE's module browser from Class Browser to Module |
| 40778 |
Browser. The original module-level class and method browser became a |
| 40779 |
module browser, with the addition of module-level functions, years ago. |
| 40780 |
Nested classes and functions were added yesterday. For |
| 40781 |
back-compatibility, the virtual event <<open-class-browser>>, which |
| 40782 |
appears on the Keys tab of the Settings dialog, is not changed. Patch by |
| 40783 |
Cheryl Sabella. |
| 40784 |
|
| 40785 |
- bpo-31500: Default fonts now are scaled on HiDPI displays. |
| 40786 |
|
| 40787 |
- bpo-1612262: IDLE module browser now shows nested classes and functions. |
| 40788 |
Original patches for code and tests by Guilherme Polo and Cheryl Sabella, |
| 40789 |
respectively. |
| 40790 |
|
| 40791 |
Tools/Demos |
| 40792 |
----------- |
| 40793 |
|
| 40794 |
- bpo-30722: Make redemo work with Python 3.6 and newer versions. Also, |
| 40795 |
remove the ``LOCALE`` option since it doesn't work with string patterns in |
| 40796 |
Python 3. Patch by Christoph Sarnowski. |
| 40797 |
|
| 40798 |
C API |
| 40799 |
----- |
| 40800 |
|
| 40801 |
- bpo-20891: Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in |
| 40802 |
a non-Python thread before PyEval_InitThreads(), only call |
| 40803 |
PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. |
| 40804 |
|
| 40805 |
- bpo-31532: Fix memory corruption due to allocator mix in getpath.c between |
| 40806 |
Py_GetPath() and Py_SetPath() |
| 40807 |
|
| 40808 |
- bpo-30697: The ``PyExc_RecursionErrorInst`` singleton is removed and |
| 40809 |
``PyErr_NormalizeException()`` does not use it anymore. This singleton is |
| 40810 |
persistent and its members being never cleared may cause a segfault during |
| 40811 |
finalization of the interpreter. See also issue #22898. |
| 40812 |
|
| 40813 |
|
| 40814 |
What's New in Python 3.6.3 final? |
| 40815 |
================================= |
| 40816 |
|
| 40817 |
*Release date: 2017-10-03* |
| 40818 |
|
| 40819 |
Library |
| 40820 |
------- |
| 40821 |
|
| 40822 |
- bpo-31641: Re-allow arbitrary iterables in |
| 40823 |
``concurrent.futures.as_completed()``. Fixes regression in 3.6.3rc1. |
| 40824 |
|
| 40825 |
Build |
| 40826 |
----- |
| 40827 |
|
| 40828 |
- bpo-31662: Fix typos in Windows ``uploadrelease.bat`` script. Fix Windows |
| 40829 |
Doc build issues in ``Doc/make.bat``. |
| 40830 |
|
| 40831 |
- bpo-31423: Fix building the PDF documentation with newer versions of |
| 40832 |
Sphinx. |
| 40833 |
|
| 40834 |
|
| 40835 |
What's New in Python 3.6.3 release candidate 1? |
| 40836 |
=============================================== |
| 40837 |
|
| 40838 |
*Release date: 2017-09-18* |
| 40839 |
|
| 40840 |
Security |
| 40841 |
-------- |
| 40842 |
|
| 40843 |
- bpo-29781: SSLObject.version() now correctly returns None when handshake |
| 40844 |
over BIO has not been performed yet. |
| 40845 |
|
| 40846 |
- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to |
| 40847 |
get security fixes. |
| 40848 |
|
| 40849 |
Core and Builtins |
| 40850 |
----------------- |
| 40851 |
|
| 40852 |
- bpo-31471: Fix an assertion failure in ``subprocess.Popen()`` on Windows, |
| 40853 |
in case the env argument has a bad ``keys()`` method. Patch by Oren |
| 40854 |
Milman. |
| 40855 |
|
| 40856 |
- bpo-31418: Fix an assertion failure in ``PyErr_WriteUnraisable()`` in case |
| 40857 |
of an exception with a bad ``__module__`` attribute. Patch by Oren Milman. |
| 40858 |
|
| 40859 |
- bpo-31416: Fix assertion failures in case of a bad warnings.filters or |
| 40860 |
warnings.defaultaction. Patch by Oren Milman. |
| 40861 |
|
| 40862 |
- bpo-31411: Raise a TypeError instead of SystemError in case |
| 40863 |
warnings.onceregistry is not a dictionary. Patch by Oren Milman. |
| 40864 |
|
| 40865 |
- bpo-31373: Fix several possible instances of undefined behavior due to |
| 40866 |
floating-point demotions. |
| 40867 |
|
| 40868 |
- bpo-30465: Location information (``lineno`` and ``col_offset``) in |
| 40869 |
f-strings is now (mostly) correct. This fixes tools like flake8 from |
| 40870 |
showing warnings on the wrong line (typically the first line of the file). |
| 40871 |
|
| 40872 |
- bpo-31343: Include sys/sysmacros.h for major(), minor(), and makedev(). |
| 40873 |
GNU C libray plans to remove the functions from sys/types.h. |
| 40874 |
|
| 40875 |
- bpo-31291: Fix an assertion failure in ``zipimport.zipimporter.get_data`` |
| 40876 |
on Windows, when the return value of ``pathname.replace('/','\\')`` isn't |
| 40877 |
a string. Patch by Oren Milman. |
| 40878 |
|
| 40879 |
- bpo-31271: Fix an assertion failure in the ``write()`` method of |
| 40880 |
``io.TextIOWrapper``, when the encoder doesn't return a bytes object. |
| 40881 |
Patch by Oren Milman. |
| 40882 |
|
| 40883 |
- bpo-31243: Fix a crash in some methods of ``io.TextIOWrapper``, when the |
| 40884 |
decoder's state is invalid. Patch by Oren Milman. |
| 40885 |
|
| 40886 |
- bpo-30721: ``print`` now shows correct usage hint for using Python 2 |
| 40887 |
redirection syntax. Patch by Sanyam Khurana. |
| 40888 |
|
| 40889 |
- bpo-31070: Fix a race condition in importlib _get_module_lock(). |
| 40890 |
|
| 40891 |
- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which |
| 40892 |
doesn't call ``PyObject_GC_UnTrack()``. |
| 40893 |
|
| 40894 |
- bpo-31071: Avoid masking original TypeError in call with * unpacking when |
| 40895 |
other arguments are passed. |
| 40896 |
|
| 40897 |
- bpo-30978: str.format_map() now passes key lookup exceptions through. |
| 40898 |
Previously any exception was replaced with a KeyError exception. |
| 40899 |
|
| 40900 |
- bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state. |
| 40901 |
|
| 40902 |
- bpo-30876: Relative import from unloaded package now reimports the package |
| 40903 |
instead of failing with SystemError. Relative import from non-package now |
| 40904 |
fails with ImportError rather than SystemError. |
| 40905 |
|
| 40906 |
- bpo-30703: Improve signal delivery. Avoid using Py_AddPendingCall from |
| 40907 |
signal handler, to avoid calling signal-unsafe functions. The tests I'm |
| 40908 |
adding here fail without the rest of the patch, on Linux and OS X. This |
| 40909 |
means our signal delivery logic had defects (some signals could be lost). |
| 40910 |
|
| 40911 |
- bpo-30765: Avoid blocking in pthread_mutex_lock() when |
| 40912 |
PyThread_acquire_lock() is asked not to block. |
| 40913 |
|
| 40914 |
- bpo-31161: Make sure the 'Missing parentheses' syntax error message is |
| 40915 |
only applied to SyntaxError, not to subclasses. Patch by Martijn Pieters. |
| 40916 |
|
| 40917 |
- bpo-30814: Fixed a race condition when import a submodule from a package. |
| 40918 |
|
| 40919 |
- bpo-30597: ``print`` now shows expected input in custom error message when |
| 40920 |
used as a Python 2 statement. Patch by Sanyam Khurana. |
| 40921 |
|
| 40922 |
Library |
| 40923 |
------- |
| 40924 |
|
| 40925 |
- bpo-31499: xml.etree: Fix a crash when a parser is part of a reference |
| 40926 |
cycle. |
| 40927 |
|
| 40928 |
- bpo-28556: typing.get_type_hints now finds the right globalns for classes |
| 40929 |
and modules by default (when no ``globalns`` was specified by the caller). |
| 40930 |
|
| 40931 |
- bpo-28556: Speed improvements to the ``typing`` module. Original PRs by |
| 40932 |
Ivan Levkivskyi and Mitar. |
| 40933 |
|
| 40934 |
- bpo-31544: The C accelerator module of ElementTree ignored exceptions |
| 40935 |
raised when looking up TreeBuilder target methods in XMLParser(). |
| 40936 |
|
| 40937 |
- bpo-31234: socket.create_connection() now fixes manually a reference |
| 40938 |
cycle: clear the variable storing the last exception on success. |
| 40939 |
|
| 40940 |
- bpo-31457: LoggerAdapter objects can now be nested. |
| 40941 |
|
| 40942 |
- bpo-31400: Improves SSL error handling to avoid losing error numbers. |
| 40943 |
|
| 40944 |
- bpo-28958: ssl.SSLContext() now uses OpenSSL error information when a |
| 40945 |
context cannot be instantiated. |
| 40946 |
|
| 40947 |
- bpo-27340: SSLSocket.sendall() now uses memoryview to create slices of |
| 40948 |
data. This fixes support for all bytes-like object. It is also more |
| 40949 |
efficient and avoids costly copies. |
| 40950 |
|
| 40951 |
- bpo-31178: Fix string concatenation bug in rare error path in the |
| 40952 |
subprocess module |
| 40953 |
|
| 40954 |
- bpo-31350: Micro-optimize :func:`asyncio._get_running_loop` to become up |
| 40955 |
to 10% faster. |
| 40956 |
|
| 40957 |
- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of |
| 40958 |
partial characters for UTF-8 input (libexpat bug 115): |
| 40959 |
https://github.com/libexpat/libexpat/issues/115 |
| 40960 |
|
| 40961 |
- bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3. |
| 40962 |
|
| 40963 |
- bpo-29212: Fix concurrent.futures.thread.ThreadPoolExecutor threads to |
| 40964 |
have a non repr() based thread name by default when no thread_name_prefix |
| 40965 |
is supplied. They will now identify themselves as |
| 40966 |
"ThreadPoolExecutor-y_n". |
| 40967 |
|
| 40968 |
- bpo-9146: Fix a segmentation fault in _hashopenssl when standard hash |
| 40969 |
functions such as md5 are not available in the linked OpenSSL library. As |
| 40970 |
in some special FIPS-140 build environments. |
| 40971 |
|
| 40972 |
- bpo-27144: The ``map()`` and ``as_completed()`` iterators in |
| 40973 |
``concurrent.futures`` now avoid keeping a reference to yielded objects. |
| 40974 |
|
| 40975 |
- bpo-10746: Fix ctypes producing wrong :pep:`3118` type codes for integer |
| 40976 |
types. |
| 40977 |
|
| 40978 |
- bpo-22536: The subprocess module now sets the filename when |
| 40979 |
FileNotFoundError is raised on POSIX systems due to the executable or cwd |
| 40980 |
not being found. |
| 40981 |
|
| 40982 |
- bpo-31249: concurrent.futures: WorkItem.run() used by ThreadPoolExecutor |
| 40983 |
now breaks a reference cycle between an exception object and the WorkItem |
| 40984 |
object. |
| 40985 |
|
| 40986 |
- bpo-31247: xmlrpc.server now explicitly breaks reference cycles when using |
| 40987 |
sys.exc_info() in code handling exceptions. |
| 40988 |
|
| 40989 |
- bpo-30102: The ssl and hashlib modules now call |
| 40990 |
OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function |
| 40991 |
detects CPU features and enables optimizations on some CPU architectures |
| 40992 |
such as POWER8. Patch is based on research from Gustavo Serra Scalet. |
| 40993 |
|
| 40994 |
- bpo-31185: Fixed miscellaneous errors in asyncio speedup module. |
| 40995 |
|
| 40996 |
- bpo-31135: ttk: fix the destroy() method of LabeledScale and OptionMenu |
| 40997 |
classes. Call the parent destroy() method even if the used attribute |
| 40998 |
doesn't exist. The LabeledScale.destroy() method now also explicitly |
| 40999 |
clears label and scale attributes to help the garbage collector to destroy |
| 41000 |
all widgets. |
| 41001 |
|
| 41002 |
- bpo-31107: Fix ``copyreg._slotnames()`` mangled attribute calculation for |
| 41003 |
classes whose name begins with an underscore. Patch by Shane Harvey. |
| 41004 |
|
| 41005 |
- bpo-31061: Fixed a crash when using asyncio and threads. |
| 41006 |
|
| 41007 |
- bpo-30502: Fix handling of long oids in ssl. Based on patch by Christian |
| 41008 |
Heimes. |
| 41009 |
|
| 41010 |
- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that |
| 41011 |
contains CR or LF. Patch by Donghee Na. |
| 41012 |
|
| 41013 |
- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader |
| 41014 |
in non-blocking mode if it succeeded to acquire the lock but the acquire |
| 41015 |
took longer than the timeout. |
| 41016 |
|
| 41017 |
- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound |
| 41018 |
builtin functions. Patch by Aaron Gallagher. |
| 41019 |
|
| 41020 |
- bpo-30961: Fix decrementing a borrowed reference in tracemalloc. |
| 41021 |
|
| 41022 |
- bpo-25684: Change ``ttk.OptionMenu`` radiobuttons to be unique across |
| 41023 |
instances of ``OptionMenu``. |
| 41024 |
|
| 41025 |
- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the |
| 41026 |
thread completes, even if the thread was started by the same process which |
| 41027 |
created the queue. |
| 41028 |
|
| 41029 |
- bpo-29854: Fix segfault in readline when using readline's history-size |
| 41030 |
option. Patch by Nir Soffer. |
| 41031 |
|
| 41032 |
- bpo-30319: socket.close() now ignores ECONNRESET error. |
| 41033 |
|
| 41034 |
- bpo-30828: Fix out of bounds write in |
| 41035 |
``asyncio.CFuture.remove_done_callback()``. |
| 41036 |
|
| 41037 |
- bpo-30807: signal.setitimer() may disable the timer when passed a tiny |
| 41038 |
value. Tiny values (such as 1e-6) are valid non-zero values for |
| 41039 |
setitimer(), which is specified as taking microsecond-resolution |
| 41040 |
intervals. However, on some platform, our conversion routine could convert |
| 41041 |
1e-6 into a zero interval, therefore disabling the timer instead of |
| 41042 |
(re-)scheduling it. |
| 41043 |
|
| 41044 |
- bpo-30441: Fix bug when modifying os.environ while iterating over it |
| 41045 |
|
| 41046 |
- bpo-30532: Fix email header value parser dropping folding white space in |
| 41047 |
certain cases. |
| 41048 |
|
| 41049 |
- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called |
| 41050 |
with bytes-like argument. |
| 41051 |
|
| 41052 |
- bpo-30746: Prohibited the '=' character in environment variable names in |
| 41053 |
``os.putenv()`` and ``os.spawn*()``. |
| 41054 |
|
| 41055 |
- bpo-29755: Fixed the lgettext() family of functions in the gettext module. |
| 41056 |
They now always return bytes. |
| 41057 |
|
| 41058 |
Documentation |
| 41059 |
------------- |
| 41060 |
|
| 41061 |
- bpo-31294: Fix incomplete code snippet in the ZeroMQSocketListener and |
| 41062 |
ZeroMQSocketHandler examples and adapt them to Python 3. |
| 41063 |
|
| 41064 |
- bpo-21649: Add RFC 7525 and Mozilla server side TLS links to SSL |
| 41065 |
documentation. |
| 41066 |
|
| 41067 |
- bpo-30803: Clarify doc on truth value testing. Original patch by Peter |
| 41068 |
Thomassen. |
| 41069 |
|
| 41070 |
Tests |
| 41071 |
----- |
| 41072 |
|
| 41073 |
- bpo-31320: Silence traceback in test_ssl |
| 41074 |
|
| 41075 |
- bpo-25674: Remove sha256.tbs-internet.com ssl test |
| 41076 |
|
| 41077 |
- bpo-30715: Address ALPN callback changes for OpenSSL 1.1.0f. The latest |
| 41078 |
version behaves like OpenSSL 1.0.2 and no longer aborts handshake. |
| 41079 |
|
| 41080 |
- bpo-30822: regrtest: Exclude tzdata from regrtest --all. When running the |
| 41081 |
test suite using --use=all / -u all, exclude tzdata since it makes |
| 41082 |
test_datetime too slow (15-20 min on some buildbots) which then times out |
| 41083 |
on some buildbots. Fix also regrtest command line parser to allow passing |
| 41084 |
-u extralargefile to run test_zipfile64. |
| 41085 |
|
| 41086 |
Build |
| 41087 |
----- |
| 41088 |
|
| 41089 |
- bpo-30854: Fix compile error when compiling --without-threads. Patch by |
| 41090 |
Masayuki Yamamoto. |
| 41091 |
|
| 41092 |
Windows |
| 41093 |
------- |
| 41094 |
|
| 41095 |
- bpo-30389: Adds detection of Visual Studio 2017 to distutils on Windows. |
| 41096 |
|
| 41097 |
- bpo-31340: Change to building with MSVC v141 (included with Visual Studio |
| 41098 |
2017) |
| 41099 |
|
| 41100 |
- bpo-30581: os.cpu_count() now returns the correct number of processors on |
| 41101 |
Windows when the number of logical processors is greater than 64. |
| 41102 |
|
| 41103 |
- bpo-30731: Add a missing xmlns to python.manifest so that it matches the |
| 41104 |
schema. |
| 41105 |
|
| 41106 |
IDLE |
| 41107 |
---- |
| 41108 |
|
| 41109 |
- bpo-31493: IDLE code context -- fix code update and font update timers. |
| 41110 |
Canceling timers prevents a warning message when test_idle completes. |
| 41111 |
|
| 41112 |
- bpo-31488: IDLE - Update non-key options in former extension classes. When |
| 41113 |
applying configdialog changes, call .reload for each feature class. Change |
| 41114 |
ParenMatch so updated options affect existing instances attached to |
| 41115 |
existing editor windows. |
| 41116 |
|
| 41117 |
- bpo-31477: IDLE - Improve rstrip entry in doc. Strip trailing whitespace |
| 41118 |
strips more than blank spaces. Multiline string literals are not skipped. |
| 41119 |
|
| 41120 |
- bpo-31480: IDLE - make tests pass with zzdummy extension disabled by |
| 41121 |
default. |
| 41122 |
|
| 41123 |
- bpo-31421: Document how IDLE runs tkinter programs. IDLE calls tcl/tk |
| 41124 |
update in the background in order to make live interaction and |
| 41125 |
experimentation with tkinter applications much easier. |
| 41126 |
|
| 41127 |
- bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an |
| 41128 |
int entry is not the same as deleting and inserting because int('') will |
| 41129 |
fail. |
| 41130 |
|
| 41131 |
- bpo-31051: Rearrange IDLE configdialog GenPage into Window, Editor, and |
| 41132 |
Help sections. |
| 41133 |
|
| 41134 |
- bpo-30617: IDLE - Add docstrings and tests for outwin subclass of editor. |
| 41135 |
Move some data and functions from the class to module level. Patch by |
| 41136 |
Cheryl Sabella. |
| 41137 |
|
| 41138 |
- bpo-31287: IDLE - Do not modify tkinter.message in test_configdialog. |
| 41139 |
|
| 41140 |
- bpo-27099: Convert IDLE's built-in 'extensions' to regular features. About |
| 41141 |
10 IDLE features were implemented as supposedly optional extensions. Their |
| 41142 |
different behavior could be confusing or worse for users and not good for |
| 41143 |
maintenance. Hence the conversion. The main difference for users is that |
| 41144 |
user configurable key bindings for builtin features are now handled |
| 41145 |
uniformly. Now, editing a binding in a keyset only affects its value in |
| 41146 |
the keyset. All bindings are defined together in the system-specific |
| 41147 |
default keysets in config-extensions.def. All custom keysets are saved as |
| 41148 |
a whole in config-extension.cfg. All take effect as soon as one clicks |
| 41149 |
Apply or Ok. The affected events are '<<force-open-completions>>', |
| 41150 |
'<<expand-word>>', '<<force-open-calltip>>', '<<flash-paren>>', |
| 41151 |
'<<format-paragraph>>', '<<run-module>>', '<<check-module>>', and |
| 41152 |
'<<zoom-height>>'. Any (global) customizations made before 3.6.3 will not |
| 41153 |
affect their keyset-specific customization after 3.6.3. and vice versa. |
| 41154 |
Initial patch by Charles Wohlganger. |
| 41155 |
|
| 41156 |
- bpo-31206: IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by |
| 41157 |
Cheryl Sabella. |
| 41158 |
|
| 41159 |
- bpo-31001: Add tests for configdialog highlight tab. Patch by Cheryl |
| 41160 |
Sabella. |
| 41161 |
|
| 41162 |
- bpo-31205: IDLE: Factor KeysPage(Frame) class from ConfigDialog. The |
| 41163 |
slightly modified tests continue to pass. Patch by Cheryl Sabella. |
| 41164 |
|
| 41165 |
- bpo-31130: IDLE -- stop leaks in test_configdialog. Initial patch by |
| 41166 |
Victor Stinner. |
| 41167 |
|
| 41168 |
- bpo-31002: Add tests for configdialog keys tab. Patch by Cheryl Sabella. |
| 41169 |
|
| 41170 |
- bpo-19903: IDLE: Calltips use ``inspect.signature`` instead of |
| 41171 |
``inspect.getfullargspec``. This improves calltips for builtins converted |
| 41172 |
to use Argument Clinic. Patch by Louie Lu. |
| 41173 |
|
| 41174 |
- bpo-31083: IDLE - Add an outline of a TabPage class in configdialog. |
| 41175 |
Update existing classes to match outline. Initial patch by Cheryl Sabella. |
| 41176 |
|
| 41177 |
- bpo-31050: Factor GenPage(Frame) class from ConfigDialog. The slightly |
| 41178 |
modified tests continue to pass. Patch by Cheryl Sabella. |
| 41179 |
|
| 41180 |
- bpo-31004: IDLE - Factor FontPage(Frame) class from ConfigDialog. Slightly |
| 41181 |
modified tests continue to pass. Fix General tests. Patch mostly by Cheryl |
| 41182 |
Sabella. |
| 41183 |
|
| 41184 |
- bpo-30781: IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan |
| 41185 |
Reedy and Cheryl Sabella. |
| 41186 |
|
| 41187 |
- bpo-31060: IDLE - Finish rearranging methods of ConfigDialog Grouping |
| 41188 |
methods pertaining to each tab and the buttons will aid writing tests and |
| 41189 |
improving the tabs and will enable splitting the groups into classes. |
| 41190 |
|
| 41191 |
- bpo-30853: IDLE -- Factor a VarTrace class out of ConfigDialog. Instance |
| 41192 |
tracers manages pairs consisting of a tk variable and a callback function. |
| 41193 |
When tracing is turned on, setting the variable calls the function. Test |
| 41194 |
coverage for the new class is 100%. |
| 41195 |
|
| 41196 |
- bpo-31003: IDLE: Add more tests for General tab. |
| 41197 |
|
| 41198 |
- bpo-30993: IDLE - Improve configdialog font page and tests. In |
| 41199 |
configdialog: Document causal pathways in create_font_tab docstring. |
| 41200 |
Simplify some attribute names. Move set_samples calls to var_changed_font |
| 41201 |
(idea from Cheryl Sabella). Move related functions to positions after the |
| 41202 |
create widgets function. In test_configdialog: Fix test_font_set so not |
| 41203 |
order dependent. Fix renamed test_indent_scale so it tests the widget. |
| 41204 |
Adjust tests for movement of set_samples call. Add tests for load |
| 41205 |
functions. Put all font tests in one class and tab indent tests in |
| 41206 |
another. Except for two lines, these tests completely cover the related |
| 41207 |
functions. |
| 41208 |
|
| 41209 |
- bpo-30981: IDLE -- Add more configdialog font page tests. |
| 41210 |
|
| 41211 |
- bpo-28523: IDLE: replace 'colour' with 'color' in configdialog. |
| 41212 |
|
| 41213 |
- bpo-30917: Add tests for idlelib.config.IdleConf. Increase coverage from |
| 41214 |
46% to 96%. Patch by Louie Lu. |
| 41215 |
|
| 41216 |
- bpo-30934: Document coverage details for idlelib tests. Add section to |
| 41217 |
idlelib/idle-test/README.txt. Include check that branches are taken both |
| 41218 |
ways. Exclude IDLE-specific code that does not run during unit tests. |
| 41219 |
|
| 41220 |
- bpo-30913: IDLE: Document ConfigDialog tk Vars, methods, and widgets in |
| 41221 |
docstrings This will facilitate improving the dialog and splitting up the |
| 41222 |
class. Original patch by Cheryl Sabella. |
| 41223 |
|
| 41224 |
- bpo-30899: IDLE: Add tests for ConfigParser subclasses in config. Patch by |
| 41225 |
Louie Lu. |
| 41226 |
|
| 41227 |
- bpo-30881: IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella. |
| 41228 |
|
| 41229 |
- bpo-30851: IDLE: Remove unused variables in configdialog. One is a |
| 41230 |
duplicate, one is set but cannot be altered by users. Patch by Cheryl |
| 41231 |
Sabella. |
| 41232 |
|
| 41233 |
- bpo-30870: IDLE: In Settings dialog, select font with Up, Down keys as |
| 41234 |
well as mouse. Initial patch by Louie Lu. |
| 41235 |
|
| 41236 |
- bpo-8231: IDLE: call config.IdleConf.GetUserCfgDir only once. |
| 41237 |
|
| 41238 |
- bpo-30779: IDLE: Factor ConfigChanges class from configdialog, put in |
| 41239 |
config; test. * In config, put dump test code in a function; run it and |
| 41240 |
unittest in 'if __name__ == '__main__'. * Add class config.ConfigChanges |
| 41241 |
based on changes_class_v4.py on bpo issue. * Add class |
| 41242 |
test_config.ChangesTest, partly using configdialog_tests_v1.py. * Revise |
| 41243 |
configdialog to use ConfigChanges; see tracker msg297804. * Revise |
| 41244 |
test_configdialog to match configdialog changes. * Remove configdialog |
| 41245 |
functions unused or moved to ConfigChanges. Cheryl Sabella contributed |
| 41246 |
parts of the patch. |
| 41247 |
|
| 41248 |
- bpo-30777: IDLE: configdialog - Add docstrings and fix comments. Patch by |
| 41249 |
Cheryl Sabella. |
| 41250 |
|
| 41251 |
- bpo-30495: IDLE: Improve textview with docstrings, PEP8 names, and more |
| 41252 |
tests. Patch by Cheryl Sabella. |
| 41253 |
|
| 41254 |
- bpo-30723: IDLE: Make several improvements to parenmatch. Add 'parens' |
| 41255 |
style to highlight both opener and closer. Make 'default' style, which is |
| 41256 |
not default, a synonym for 'opener'. Make time-delay work the same with |
| 41257 |
all styles. Add help for config dialog extensions tab, including help for |
| 41258 |
parenmatch. Add new tests. Original patch by Charles Wohlganger. |
| 41259 |
|
| 41260 |
- bpo-30674: IDLE: add docstrings to grep module. Patch by Cheryl Sabella |
| 41261 |
|
| 41262 |
- bpo-21519: IDLE's basic custom key entry dialog now detects duplicates |
| 41263 |
properly. Original patch by Saimadhav Heblikar. |
| 41264 |
|
| 41265 |
- bpo-29910: IDLE no longer deletes a character after commenting out a |
| 41266 |
region by a key shortcut. Add ``return 'break'`` for this and other |
| 41267 |
potential conflicts between IDLE and default key bindings. |
| 41268 |
|
| 41269 |
- bpo-30728: Review and change idlelib.configdialog names. Lowercase method |
| 41270 |
and attribute names. Replace 'colour' with 'color', expand overly cryptic |
| 41271 |
names, delete unneeded underscores. Replace ``import *`` with specific |
| 41272 |
imports. Patches by Cheryl Sabella. |
| 41273 |
|
| 41274 |
- bpo-6739: IDLE: Verify user-entered key sequences by trying to bind them |
| 41275 |
with tk. Add tests for all 3 validation functions. Original patch by G |
| 41276 |
Polo. Tests added by Cheryl Sabella. |
| 41277 |
|
| 41278 |
Tools/Demos |
| 41279 |
----------- |
| 41280 |
|
| 41281 |
- bpo-30983: gdb integration commands (py-bt, etc.) work on optimized shared |
| 41282 |
builds now, too. :pep:`523` introduced _PyEval_EvalFrameDefault which |
| 41283 |
inlines PyEval_EvalFrameEx on non-debug shared builds. This broke the |
| 41284 |
ability to use py-bt, py-up, and a few other Python-specific gdb |
| 41285 |
integrations. The problem is fixed by only looking for |
| 41286 |
_PyEval_EvalFrameDefault frames in python-gdb.py. Original patch by Bruno |
| 41287 |
"Polaco" Penteado. |
| 41288 |
|
| 41289 |
|
| 41290 |
What's New in Python 3.6.2 final? |
| 41291 |
================================= |
| 41292 |
|
| 41293 |
*Release date: 2017-07-17* |
| 41294 |
|
| 41295 |
No changes since release candidate 2 |
| 41296 |
|
| 41297 |
|
| 41298 |
|
| 41299 |
What's New in Python 3.6.2 release candidate 2? |
| 41300 |
=============================================== |
| 41301 |
|
| 41302 |
*Release date: 2017-07-07* |
| 41303 |
|
| 41304 |
Security |
| 41305 |
-------- |
| 41306 |
|
| 41307 |
- bpo-30730: Prevent environment variables injection in subprocess on |
| 41308 |
Windows. Prevent passing other environment variables and command |
| 41309 |
arguments. |
| 41310 |
|
| 41311 |
- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple |
| 41312 |
security vulnerabilities including: :cve:`2017-9233` (External entity |
| 41313 |
infinite loop DoS), :cve:`2016-9063` (Integer overflow, re-fix), |
| 41314 |
:cve:`2016-0718` (Fix regression bugs from 2.2.0's fix to |
| 41315 |
:cve:`2016-0718`) and :cve:`2012-0876` (Counter hash flooding with |
| 41316 |
SipHash). Note: the :cve:`2016-5300` (Use os-specific entropy sources like |
| 41317 |
getrandom) doesn't impact Python, since Python already gets entropy from |
| 41318 |
the OS to set the expat secret using ``XML_SetHashSalt()``. |
| 41319 |
|
| 41320 |
- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For |
| 41321 |
example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the |
| 41322 |
``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an |
| 41323 |
authentication (``login@host``). |
| 41324 |
|
| 41325 |
|
| 41326 |
What's New in Python 3.6.2 release candidate 1? |
| 41327 |
=============================================== |
| 41328 |
|
| 41329 |
*Release date: 2017-06-17* |
| 41330 |
|
| 41331 |
Security |
| 41332 |
-------- |
| 41333 |
|
| 41334 |
- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of |
| 41335 |
:cve:`2016-0718` and :cve:`2016-4472`. See |
| 41336 |
https://sourceforge.net/p/expat/bugs/537/ for more information. |
| 41337 |
|
| 41338 |
Core and Builtins |
| 41339 |
----------------- |
| 41340 |
|
| 41341 |
- bpo-30682: Removed a too-strict assertion that failed for certain |
| 41342 |
f-strings, such as eval("f'\\\n'") and eval("f'\\\r'"). |
| 41343 |
|
| 41344 |
- bpo-30604: Move co_extra_freefuncs to not be per-thread to avoid crashes |
| 41345 |
|
| 41346 |
- bpo-29104: Fixed parsing backslashes in f-strings. |
| 41347 |
|
| 41348 |
- bpo-27945: Fixed various segfaults with dict when input collections are |
| 41349 |
mutated during searching, inserting or comparing. Based on patches by |
| 41350 |
Duane Griffin and Tim Mitchell. |
| 41351 |
|
| 41352 |
- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for |
| 41353 |
non-interned attribute names. Based on patch by Eryk Sun. |
| 41354 |
|
| 41355 |
- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in the |
| 41356 |
middle of resuming a chain of nested 'yield from' or 'await' calls, it's |
| 41357 |
now correctly delivered to the innermost frame. |
| 41358 |
|
| 41359 |
- bpo-12414: sys.getsizeof() on a code object now returns the sizes which |
| 41360 |
includes the code struct and sizes of objects which it references. Patch |
| 41361 |
by Donghee Na. |
| 41362 |
|
| 41363 |
- bpo-29949: Fix memory usage regression of set and frozenset object. |
| 41364 |
|
| 41365 |
- bpo-29935: Fixed error messages in the index() method of tuple, list and |
| 41366 |
deque when pass indices of wrong type. |
| 41367 |
|
| 41368 |
- bpo-29859: Show correct error messages when any of the pthread_* calls in |
| 41369 |
thread_pthread.h fails. |
| 41370 |
|
| 41371 |
- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises |
| 41372 |
:exc:`OverflowError`. |
| 41373 |
|
| 41374 |
- bpo-29600: Fix wrapping coroutine return values in StopIteration. |
| 41375 |
|
| 41376 |
- bpo-28856: Fix an oversight that %b format for bytes should support |
| 41377 |
objects follow the buffer protocol. |
| 41378 |
|
| 41379 |
- bpo-29714: Fix a regression that bytes format may fail when containing |
| 41380 |
zero bytes inside. |
| 41381 |
|
| 41382 |
- bpo-29478: If max_line_length=None is specified while using the Compat32 |
| 41383 |
policy, it is no longer ignored. Patch by Mircea Cosbuc. |
| 41384 |
|
| 41385 |
Library |
| 41386 |
------- |
| 41387 |
|
| 41388 |
- bpo-30616: Functional API of enum allows to create empty enums. Patched by |
| 41389 |
Donghee Na |
| 41390 |
|
| 41391 |
- bpo-30038: Fix race condition between signal delivery and wakeup file |
| 41392 |
descriptor. Patch by Nathaniel Smith. |
| 41393 |
|
| 41394 |
- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings. |
| 41395 |
|
| 41396 |
- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a |
| 41397 |
reference cycle to not keep objects alive longer than expected. |
| 41398 |
|
| 41399 |
- bpo-30149: inspect.signature() now supports callables with |
| 41400 |
variable-argument parameters wrapped with partialmethod. Patch by Donghee |
| 41401 |
Na. |
| 41402 |
|
| 41403 |
- bpo-30645: Fix path calculation in imp.load_package(), fixing it for cases |
| 41404 |
when a package is only shipped with bytecodes. Patch by Alexandru |
| 41405 |
Ardelean. |
| 41406 |
|
| 41407 |
- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects. |
| 41408 |
Patch by Sanjay Sundaresan. |
| 41409 |
|
| 41410 |
- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a |
| 41411 |
bytes instance with misplaced inline modifier. Patch by Roy Williams. |
| 41412 |
|
| 41413 |
- bpo-24484: Avoid race condition in multiprocessing cleanup (#2159) |
| 41414 |
|
| 41415 |
- bpo-28994: The traceback no longer displayed for SystemExit raised in a |
| 41416 |
callback registered by atexit. |
| 41417 |
|
| 41418 |
- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was |
| 41419 |
called. |
| 41420 |
|
| 41421 |
- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add |
| 41422 |
support for ContextManager on all versions. Original PRs by Jelle Zijlstra |
| 41423 |
and Ivan Levkivskyi |
| 41424 |
|
| 41425 |
- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl |
| 41426 |
implementation. Patch by Michaël Sghaïer. |
| 41427 |
|
| 41428 |
- bpo-29743: Closing transport during handshake process leaks open socket. |
| 41429 |
Patch by Nikolay Kim |
| 41430 |
|
| 41431 |
- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu |
| 41432 |
Sornay. |
| 41433 |
|
| 41434 |
- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore |
| 41435 |
EINVAL on stdin.write() if the child process is still running but closed |
| 41436 |
the pipe. |
| 41437 |
|
| 41438 |
- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch |
| 41439 |
by Nate Soares. |
| 41440 |
|
| 41441 |
- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract |
| 41442 |
base classes to use keyword parameters in __init_subclass__. Patch by Nate |
| 41443 |
Soares. |
| 41444 |
|
| 41445 |
- bpo-30557: faulthandler now correctly filters and displays exception codes |
| 41446 |
on Windows |
| 41447 |
|
| 41448 |
- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot |
| 41449 |
handle IPv6 addresses. |
| 41450 |
|
| 41451 |
- bpo-29960: Preserve generator state when _random.Random.setstate() raises |
| 41452 |
an exception. Patch by Bryan Olson. |
| 41453 |
|
| 41454 |
- bpo-30414: multiprocessing.Queue._feed background running thread do not |
| 41455 |
break from main loop on exception. |
| 41456 |
|
| 41457 |
- bpo-30003: Fix handling escape characters in HZ codec. Based on patch by |
| 41458 |
Ma Lin. |
| 41459 |
|
| 41460 |
- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn* |
| 41461 |
and *forkserver* start methods. |
| 41462 |
|
| 41463 |
- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error |
| 41464 |
(code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted. |
| 41465 |
This error occurs sometimes on SSL connections. |
| 41466 |
|
| 41467 |
- bpo-30375: Warnings emitted when compile a regular expression now always |
| 41468 |
point to the line in the user code. Previously they could point into |
| 41469 |
inners of the re module if emitted from inside of groups or conditionals. |
| 41470 |
|
| 41471 |
- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running |
| 41472 |
coroutine and the coroutine returned without any more ``await``. |
| 41473 |
|
| 41474 |
- bpo-30266: contextlib.AbstractContextManager now supports |
| 41475 |
anti-registration by setting __enter__ = None or __exit__ = None, |
| 41476 |
following the pattern introduced in bpo-25958. Patch by Jelle Zijlstra. |
| 41477 |
|
| 41478 |
- bpo-30298: Weaken the condition of deprecation warnings for inline |
| 41479 |
modifiers. Now allowed several subsequential inline modifiers at the start |
| 41480 |
of the pattern (e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and |
| 41481 |
comments now are allowed before and between inline modifiers (e.g. ``'(?x) |
| 41482 |
(?i) (?s)...'``). |
| 41483 |
|
| 41484 |
- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma |
| 41485 |
Lin. |
| 41486 |
|
| 41487 |
- bpo-26293: Change resulted because of zipfile breakage. (See also: |
| 41488 |
bpo-29094) |
| 41489 |
|
| 41490 |
- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. |
| 41491 |
Misusing them could cause memory leaks or crashes. Now scanner and |
| 41492 |
encoder objects are completely initialized in the __new__ methods. |
| 41493 |
|
| 41494 |
- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process |
| 41495 |
when Ctrl-C is received. |
| 41496 |
|
| 41497 |
- bpo-28556: Various updates to typing module: add typing.NoReturn type, use |
| 41498 |
WrapperDescriptorType, minor bug-fixes. Original PRs by Jim |
| 41499 |
Fasarakis-Hilliard and Ivan Levkivskyi. |
| 41500 |
|
| 41501 |
- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux. |
| 41502 |
|
| 41503 |
- bpo-30070: Fixed leaks and crashes in errors handling in the parser |
| 41504 |
module. |
| 41505 |
|
| 41506 |
- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when |
| 41507 |
readline() or __next__() respectively return non-sizeable object. Fixed |
| 41508 |
possible other errors caused by not checking results of PyObject_Size(), |
| 41509 |
PySequence_Size(), or PyMapping_Size(). |
| 41510 |
|
| 41511 |
- bpo-30017: Allowed calling the close() method of the zip entry writer |
| 41512 |
object multiple times. Writing to a closed writer now always produces a |
| 41513 |
ValueError. |
| 41514 |
|
| 41515 |
- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint |
| 41516 |
is present. |
| 41517 |
|
| 41518 |
- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True. |
| 41519 |
Patch by Armin Rigo. |
| 41520 |
|
| 41521 |
- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in |
| 41522 |
contextlib.contextmanager. Patch by Siddharth Velankar. |
| 41523 |
|
| 41524 |
- bpo-29998: Pickling and copying ImportError now preserves name and path |
| 41525 |
attributes. |
| 41526 |
|
| 41527 |
- bpo-29953: Fixed memory leaks in the replace() method of datetime and time |
| 41528 |
objects when pass out of bound fold argument. |
| 41529 |
|
| 41530 |
- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering |
| 41531 |
long runs of empty iterables. |
| 41532 |
|
| 41533 |
- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions |
| 41534 |
and wrong types. |
| 41535 |
|
| 41536 |
- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an |
| 41537 |
exception at the very first of an iterable may swallow the exception or |
| 41538 |
make the program hang. Patch by Davin Potts and Xiang Zhang. |
| 41539 |
|
| 41540 |
- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when |
| 41541 |
the OS gives priority to errors such as EACCES over EEXIST. |
| 41542 |
|
| 41543 |
- bpo-29861: Release references to tasks, their arguments and their results |
| 41544 |
as soon as they are finished in multiprocessing.Pool. |
| 41545 |
|
| 41546 |
- bpo-29884: faulthandler: Restore the old sigaltstack during teardown. |
| 41547 |
Patch by Christophe Zeitouny. |
| 41548 |
|
| 41549 |
- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. |
| 41550 |
|
| 41551 |
- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords |
| 41552 |
are not strings. Patch by Michael Seifert. |
| 41553 |
|
| 41554 |
- bpo-29742: get_extra_info() raises exception if get called on closed ssl |
| 41555 |
transport. Patch by Nikolay Kim. |
| 41556 |
|
| 41557 |
- bpo-8256: Fixed possible failing or crashing input() if attributes |
| 41558 |
"encoding" or "errors" of sys.stdin or sys.stdout are not set or are not |
| 41559 |
strings. |
| 41560 |
|
| 41561 |
- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting |
| 41562 |
big intables (objects that have __int__) as elements. Patch by Oren |
| 41563 |
Milman. |
| 41564 |
|
| 41565 |
- bpo-28231: The zipfile module now accepts path-like objects for external |
| 41566 |
paths. |
| 41567 |
|
| 41568 |
- bpo-26915: index() and count() methods of collections.abc.Sequence now |
| 41569 |
check identity before checking equality when do comparisons. |
| 41570 |
|
| 41571 |
- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other |
| 41572 |
exception) to exception(s) raised in the dispatched methods. Patch by Petr |
| 41573 |
Motejlek. |
| 41574 |
|
| 41575 |
- bpo-30177: path.resolve(strict=False) no longer cuts the path after the |
| 41576 |
first element not present in the filesystem. Patch by Antoine Pietri. |
| 41577 |
|
| 41578 |
IDLE |
| 41579 |
---- |
| 41580 |
|
| 41581 |
- bpo-15786: Fix several problems with IDLE's autocompletion box. The |
| 41582 |
following should now work: clicking on selection box items; using the |
| 41583 |
scrollbar; selecting an item by hitting Return. Hangs on MacOSX should no |
| 41584 |
longer happen. Patch by Louie Lu. |
| 41585 |
|
| 41586 |
- bpo-25514: Add doc subsubsection about IDLE failure to start. Popup |
| 41587 |
no-connection message directs users to this section. |
| 41588 |
|
| 41589 |
- bpo-30642: Fix reference leaks in IDLE tests. Patches by Louie Lu and |
| 41590 |
Terry Jan Reedy. |
| 41591 |
|
| 41592 |
- bpo-30495: Add docstrings for textview.py and use PEP8 names. Patches by |
| 41593 |
Cheryl Sabella and Terry Jan Reedy. |
| 41594 |
|
| 41595 |
- bpo-30290: Help-about: use pep8 names and add tests. Increase coverage to |
| 41596 |
100%. Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy. |
| 41597 |
|
| 41598 |
- bpo-30303: Add _utest option to textview; add new tests. Increase coverage |
| 41599 |
to 100%. Patches by Louie Lu and Terry Jan Reedy. |
| 41600 |
|
| 41601 |
C API |
| 41602 |
----- |
| 41603 |
|
| 41604 |
- bpo-27867: Function PySlice_GetIndicesEx() no longer replaced with a macro |
| 41605 |
if Py_LIMITED_API is not set. |
| 41606 |
|
| 41607 |
Build |
| 41608 |
----- |
| 41609 |
|
| 41610 |
- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable C |
| 41611 |
``assert()`` checks. Defaults to off. ``--with-pydebug`` implies |
| 41612 |
``--with-assertions``. |
| 41613 |
|
| 41614 |
- bpo-28787: Fix out-of-tree builds of Python when configured with |
| 41615 |
``--with--dtrace``. |
| 41616 |
|
| 41617 |
- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``, |
| 41618 |
``make install`` and some other make targets when configured with |
| 41619 |
``--enable-optimizations``. |
| 41620 |
|
| 41621 |
- bpo-23404: Don't regenerate generated files based on file modification |
| 41622 |
time anymore: the action is now explicit. Replace ``make touch`` with |
| 41623 |
``make regen-all``. |
| 41624 |
|
| 41625 |
- bpo-29643: Fix ``--enable-optimization`` didn't work. |
| 41626 |
|
| 41627 |
Documentation |
| 41628 |
------------- |
| 41629 |
|
| 41630 |
- bpo-30176: Add missing attribute related constants in curses |
| 41631 |
documentation. |
| 41632 |
|
| 41633 |
- bpo-30052: the link targets for :func:`bytes` and :func:`bytearray` are |
| 41634 |
now their respective type definitions, rather than the corresponding |
| 41635 |
builtin function entries. Use :ref:`bytes <func-bytes>` and |
| 41636 |
:ref:`bytearray <func-bytearray>` to reference the latter. In order to |
| 41637 |
ensure this and future cross-reference updates are applied automatically, |
| 41638 |
the daily documentation builds now disable the default output caching |
| 41639 |
features in Sphinx. |
| 41640 |
|
| 41641 |
- bpo-26985: Add missing info of code object in inspect documentation. |
| 41642 |
|
| 41643 |
Tools/Demos |
| 41644 |
----------- |
| 41645 |
|
| 41646 |
- bpo-29367: python-gdb.py now supports also ``method-wrapper`` |
| 41647 |
(``wrapperobject``) objects. |
| 41648 |
|
| 41649 |
Tests |
| 41650 |
----- |
| 41651 |
|
| 41652 |
- bpo-30357: test_thread: setUp() now uses support.threading_setup() and |
| 41653 |
support.threading_cleanup() to wait until threads complete to avoid random |
| 41654 |
side effects on following tests. Initial patch written by Grzegorz |
| 41655 |
Grzywacz. |
| 41656 |
|
| 41657 |
- bpo-30197: Enhanced functions swap_attr() and swap_item() in the |
| 41658 |
test.support module. They now work when delete replaced attribute or item |
| 41659 |
inside the with statement. The old value of the attribute or item (or |
| 41660 |
None if it doesn't exist) now will be assigned to the target of the "as" |
| 41661 |
clause, if there is one. |
| 41662 |
|
| 41663 |
Windows |
| 41664 |
------- |
| 41665 |
|
| 41666 |
- bpo-30687: Locate msbuild.exe on Windows when building rather than |
| 41667 |
vcvarsall.bat |
| 41668 |
|
| 41669 |
- bpo-30450: The build process on Windows no longer depends on Subversion, |
| 41670 |
instead pulling external code from GitHub via a Python script. If Python |
| 41671 |
3.6 is not found on the system (via ``py -3.6``), NuGet is used to |
| 41672 |
download a copy of 32-bit Python. |
| 41673 |
|
| 41674 |
|
| 41675 |
What's New in Python 3.6.1 final? |
| 41676 |
================================= |
| 41677 |
|
| 41678 |
*Release date: 2017-03-21* |
| 41679 |
|
| 41680 |
Core and Builtins |
| 41681 |
----------------- |
| 41682 |
|
| 41683 |
- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused |
| 41684 |
a regression by revealing an inconsistency in how sys.path is initialized |
| 41685 |
when executing ``__main__`` from a zipfile, directory, or other import |
| 41686 |
location. The interpreter now consistently avoids ever adding the import |
| 41687 |
location's parent directory to ``sys.path``, and ensures no other |
| 41688 |
``sys.path`` entries are inadvertently modified when inserting the import |
| 41689 |
location named on the command line. |
| 41690 |
|
| 41691 |
Build |
| 41692 |
----- |
| 41693 |
|
| 41694 |
- bpo-27593: fix format of git information used in sys.version |
| 41695 |
|
| 41696 |
- Fix incompatible comment in python.h |
| 41697 |
|
| 41698 |
|
| 41699 |
What's New in Python 3.6.1 release candidate 1? |
| 41700 |
=============================================== |
| 41701 |
|
| 41702 |
*Release date: 2017-03-04* |
| 41703 |
|
| 41704 |
Core and Builtins |
| 41705 |
----------------- |
| 41706 |
|
| 41707 |
- bpo-28893: Set correct __cause__ for errors about invalid awaitables |
| 41708 |
returned from __aiter__ and __anext__. |
| 41709 |
|
| 41710 |
- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra. Patch by Brian |
| 41711 |
Coleman. |
| 41712 |
|
| 41713 |
- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. It |
| 41714 |
should raise TypeError when kwargs is not a dict. But it might cause segv |
| 41715 |
when args=NULL and kwargs is not a dict. |
| 41716 |
|
| 41717 |
- bpo-28598: Support __rmod__ for subclasses of str being called before |
| 41718 |
str.__mod__. Patch by Martijn Pieters. |
| 41719 |
|
| 41720 |
- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. Patch by |
| 41721 |
Matthieu Dartiailh. |
| 41722 |
|
| 41723 |
- bpo-29602: Fix incorrect handling of signed zeros in complex constructor |
| 41724 |
for complex subclasses and for inputs having a __complex__ method. Patch |
| 41725 |
by Serhiy Storchaka. |
| 41726 |
|
| 41727 |
- bpo-29347: Fixed possibly dereferencing undefined pointers when creating |
| 41728 |
weakref objects. |
| 41729 |
|
| 41730 |
- bpo-29438: Fixed use-after-free problem in key sharing dict. |
| 41731 |
|
| 41732 |
- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0]. |
| 41733 |
|
| 41734 |
- bpo-29337: Fixed possible BytesWarning when compare the code objects. |
| 41735 |
Warnings could be emitted at compile time. |
| 41736 |
|
| 41737 |
- bpo-29327: Fixed a crash when pass the iterable keyword argument to |
| 41738 |
sorted(). |
| 41739 |
|
| 41740 |
- bpo-29034: Fix memory leak and use-after-free in os module |
| 41741 |
(path_converter). |
| 41742 |
|
| 41743 |
- bpo-29159: Fix regression in bytes(x) when x.__index__() raises Exception. |
| 41744 |
|
| 41745 |
- bpo-28932: Do not include <sys/random.h> if it does not exist. |
| 41746 |
|
| 41747 |
- bpo-25677: Correct the positioning of the syntax error caret for indented |
| 41748 |
blocks. Based on patch by Michael Layzell. |
| 41749 |
|
| 41750 |
- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate |
| 41751 |
form. |
| 41752 |
|
| 41753 |
- bpo-26919: On Android, operating system data is now always encoded/decoded |
| 41754 |
to/from UTF-8, instead of the locale encoding to avoid inconsistencies |
| 41755 |
with os.fsencode() and os.fsdecode() which are already using UTF-8. |
| 41756 |
|
| 41757 |
- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy |
| 41758 |
bug triggerable by a monkey-patched len() function. |
| 41759 |
|
| 41760 |
- bpo-28739: f-string expressions are no longer accepted as docstrings and |
| 41761 |
by ast.literal_eval() even if they do not include expressions. |
| 41762 |
|
| 41763 |
- bpo-28512: Fixed setting the offset attribute of SyntaxError by |
| 41764 |
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject(). |
| 41765 |
|
| 41766 |
- bpo-28918: Fix the cross compilation of xxlimited when Python has been |
| 41767 |
built with Py_DEBUG defined. |
| 41768 |
|
| 41769 |
- bpo-28731: Optimize _PyDict_NewPresized() to create correct size dict. |
| 41770 |
Improve speed of dict literal with constant keys up to 30%. |
| 41771 |
|
| 41772 |
Library |
| 41773 |
------- |
| 41774 |
|
| 41775 |
- bpo-29169: Update zlib to 1.2.11. |
| 41776 |
|
| 41777 |
- bpo-29623: Allow use of path-like object as a single argument in |
| 41778 |
ConfigParser.read(). Patch by David Ellis. |
| 41779 |
|
| 41780 |
- bpo-28963: Fix out of bound iteration in |
| 41781 |
asyncio.Future.remove_done_callback implemented in C. |
| 41782 |
|
| 41783 |
- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes |
| 41784 |
before all pipes are closed. |
| 41785 |
|
| 41786 |
- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C to |
| 41787 |
accept None argument as their pure Python implementation. |
| 41788 |
|
| 41789 |
- bpo-29703: Fix asyncio to support instantiation of new event loops in |
| 41790 |
child processes. |
| 41791 |
|
| 41792 |
- bpo-29376: Fix assertion error in threading._DummyThread.is_alive(). |
| 41793 |
|
| 41794 |
- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts |
| 41795 |
PathLike objects. Patch by Sayan Chowdhury. |
| 41796 |
|
| 41797 |
- bpo-28518: Start a transaction implicitly before a DML statement. Patch by |
| 41798 |
Aviv Palivoda. |
| 41799 |
|
| 41800 |
- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no |
| 41801 |
longer affects a partial object after creation. |
| 41802 |
|
| 41803 |
- bpo-29110: Fix file object leak in aifc.open() when file is given as a |
| 41804 |
filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. |
| 41805 |
|
| 41806 |
- bpo-28556: Various updates to typing module: typing.Counter, |
| 41807 |
typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle |
| 41808 |
Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa. |
| 41809 |
|
| 41810 |
- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python |
| 41811 |
3.6.0: check minimum and maximum years. |
| 41812 |
|
| 41813 |
- bpo-29519: Fix weakref spewing exceptions during interpreter shutdown when |
| 41814 |
used with a rare combination of multiprocessing and custom codecs. |
| 41815 |
|
| 41816 |
- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir |
| 41817 |
|
| 41818 |
- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the |
| 41819 |
match object. Based on patch by WGH. |
| 41820 |
|
| 41821 |
- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited |
| 41822 |
to a stopped instead of terminated state (ex: when under ptrace). |
| 41823 |
|
| 41824 |
- bpo-29290: Fix a regression in argparse that help messages would wrap at |
| 41825 |
non-breaking spaces. |
| 41826 |
|
| 41827 |
- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY. |
| 41828 |
|
| 41829 |
- bpo-29316: Restore the provisional status of typing module, add |
| 41830 |
corresponding note to documentation. Patch by Ivan L. |
| 41831 |
|
| 41832 |
- bpo-29219: Fixed infinite recursion in the repr of uninitialized |
| 41833 |
ctypes.CDLL instances. |
| 41834 |
|
| 41835 |
- bpo-29011: Fix an important omission by adding Deque to the typing module. |
| 41836 |
|
| 41837 |
- bpo-28969: Fixed race condition in C implementation of |
| 41838 |
functools.lru_cache. KeyError could be raised when cached function with |
| 41839 |
full cache was simultaneously called from different threads with the same |
| 41840 |
uncached arguments. |
| 41841 |
|
| 41842 |
- bpo-29142: In urllib.request, suffixes in no_proxy environment variable |
| 41843 |
with leading dots could match related hostnames again (e.g. .b.c matches |
| 41844 |
a.b.c). Patch by Milan Oberkirch. |
| 41845 |
|
| 41846 |
- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter |
| 41847 |
anymore. Patch written by Jiajun Huang. |
| 41848 |
|
| 41849 |
- bpo-29203: functools.lru_cache() now respects :pep:`468` and preserves the |
| 41850 |
order of keyword arguments. f(a=1, b=2) is now cached separately from |
| 41851 |
f(b=2, a=1) since both calls could potentially give different results. |
| 41852 |
|
| 41853 |
- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a |
| 41854 |
context. Patch by Sam Breese. |
| 41855 |
|
| 41856 |
- bpo-29094: Offsets in a ZIP file created with extern file object and modes |
| 41857 |
"w" and "x" now are relative to the start of the file. |
| 41858 |
|
| 41859 |
- bpo-29085: Allow random.Random.seed() to use high quality OS randomness |
| 41860 |
rather than the pid and time. |
| 41861 |
|
| 41862 |
- bpo-29061: Fixed bug in secrets.randbelow() which would hang when given a |
| 41863 |
negative input. Patch by Brendan Donegan. |
| 41864 |
|
| 41865 |
- bpo-29079: Prevent infinite loop in pathlib.resolve() on Windows |
| 41866 |
|
| 41867 |
- bpo-13051: Fixed recursion errors in large or resized |
| 41868 |
curses.textpad.Textbox. Based on patch by Tycho Andersen. |
| 41869 |
|
| 41870 |
- bpo-29119: Fix weakrefs in the pure python version of |
| 41871 |
collections.OrderedDict move_to_end() method. Contributed by Andra |
| 41872 |
Bogildea. |
| 41873 |
|
| 41874 |
- bpo-9770: curses.ascii predicates now work correctly with negative |
| 41875 |
integers. |
| 41876 |
|
| 41877 |
- bpo-28427: old keys should not remove new values from WeakValueDictionary |
| 41878 |
when collecting from another thread. |
| 41879 |
|
| 41880 |
- bpo-28923: Remove editor artifacts from Tix.py. |
| 41881 |
|
| 41882 |
- bpo-29055: Neaten-up empty population error on random.choice() by |
| 41883 |
suppressing the upstream exception. |
| 41884 |
|
| 41885 |
- bpo-28871: Fixed a crash when deallocate deep ElementTree. |
| 41886 |
|
| 41887 |
- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and |
| 41888 |
WeakValueDictionary.pop() when a GC collection happens in another thread. |
| 41889 |
|
| 41890 |
- bpo-20191: Fixed a crash in resource.prlimit() when passing a sequence |
| 41891 |
that doesn't own its elements as limits. |
| 41892 |
|
| 41893 |
- bpo-28779: multiprocessing.set_forkserver_preload() would crash the |
| 41894 |
forkserver process if a preloaded module instantiated some multiprocessing |
| 41895 |
objects such as locks. |
| 41896 |
|
| 41897 |
- bpo-28847: dbm.dumb now supports reading read-only files and no longer |
| 41898 |
writes the index file when it is not changed. |
| 41899 |
|
| 41900 |
- bpo-26937: The chown() method of the tarfile.TarFile class does not fail |
| 41901 |
now when the grp module cannot be imported, as for example on Android |
| 41902 |
platforms. |
| 41903 |
|
| 41904 |
IDLE |
| 41905 |
---- |
| 41906 |
|
| 41907 |
- bpo-29071: IDLE colors f-string prefixes (but not invalid ur prefixes). |
| 41908 |
|
| 41909 |
- bpo-28572: Add 10% to coverage of IDLE's test_configdialog. Update and |
| 41910 |
augment description of the configuration system. |
| 41911 |
|
| 41912 |
Windows |
| 41913 |
------- |
| 41914 |
|
| 41915 |
- bpo-29579: Removes readme.txt from the installer |
| 41916 |
|
| 41917 |
- bpo-29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev) |
| 41918 |
|
| 41919 |
- bpo-28164: Correctly handle special console filenames (patch by Eryk Sun) |
| 41920 |
|
| 41921 |
- bpo-29409: Implement :pep:`529` for io.FileIO (Patch by Eryk Sun) |
| 41922 |
|
| 41923 |
- bpo-29392: Prevent crash when passing invalid arguments into msvcrt |
| 41924 |
module. |
| 41925 |
|
| 41926 |
- bpo-25778: winreg does not truncate string correctly (Patch by Eryk Sun) |
| 41927 |
|
| 41928 |
- bpo-28896: Deprecate WindowsRegistryFinder and disable it by default. |
| 41929 |
|
| 41930 |
C API |
| 41931 |
----- |
| 41932 |
|
| 41933 |
- bpo-27867: Function PySlice_GetIndicesEx() is replaced with a macro if |
| 41934 |
Py_LIMITED_API is not set or set to the value between 0x03050400 and |
| 41935 |
0x03060000 (not including) or 0x03060100 or higher. |
| 41936 |
|
| 41937 |
- bpo-29083: Fixed the declaration of some public API functions. |
| 41938 |
PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in |
| 41939 |
limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and |
| 41940 |
Py_BuildValue() were not available in limited API of version < 3.3 when |
| 41941 |
PY_SSIZE_T_CLEAN is defined. |
| 41942 |
|
| 41943 |
- bpo-29058: All stable API extensions added after Python 3.2 are now |
| 41944 |
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of |
| 41945 |
the minimum Python version supporting this API. |
| 41946 |
|
| 41947 |
Documentation |
| 41948 |
------------- |
| 41949 |
|
| 41950 |
- bpo-28929: Link the documentation to its source file on GitHub. |
| 41951 |
|
| 41952 |
- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer |
| 41953 |
to aiosmtpd, a third-party asyncio-based replacement. |
| 41954 |
|
| 41955 |
- bpo-26355: Add canonical header link on each page to corresponding major |
| 41956 |
version of the documentation. Patch by Matthias Bussonnier. |
| 41957 |
|
| 41958 |
- bpo-29349: Fix Python 2 syntax in code for building the documentation. |
| 41959 |
|
| 41960 |
Tests |
| 41961 |
----- |
| 41962 |
|
| 41963 |
- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. Skip |
| 41964 |
some tests of select.poll when running on macOS due to unresolved issues |
| 41965 |
with the underlying system poll function on some macOS versions. |
| 41966 |
|
| 41967 |
- bpo-29571: to match the behaviour of the ``re.LOCALE`` flag, |
| 41968 |
test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` |
| 41969 |
to determine the candidate encoding for the test regex (allowing it to |
| 41970 |
correctly skip the test when the default locale encoding is a multi-byte |
| 41971 |
encoding) |
| 41972 |
|
| 41973 |
- bpo-28950: Disallow -j0 to be combined with -T/-l in regrtest command line |
| 41974 |
arguments. |
| 41975 |
|
| 41976 |
- bpo-28683: Fix the tests that bind() a unix socket and raise |
| 41977 |
PermissionError on Android for a non-root user. |
| 41978 |
|
| 41979 |
- bpo-26939: Add the support.setswitchinterval() function to fix |
| 41980 |
test_functools hanging on the Android armv7 qemu emulator. |
| 41981 |
|
| 41982 |
Build |
| 41983 |
----- |
| 41984 |
|
| 41985 |
- bpo-27593: sys.version and the platform module python_build(), |
| 41986 |
python_branch(), and python_revision() functions now use git information |
| 41987 |
rather than hg when building from a repo. |
| 41988 |
|
| 41989 |
- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k. |
| 41990 |
|
| 41991 |
- bpo-26851: Set Android compilation and link flags. |
| 41992 |
|
| 41993 |
- bpo-28768: Fix implicit declaration of function _setmode. Patch by |
| 41994 |
Masayuki Yamamoto |
| 41995 |
|
| 41996 |
- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat |
| 41997 |
|
| 41998 |
- bpo-23903: Added missed names to PC/python3.def. |
| 41999 |
|
| 42000 |
- bpo-28762: lockf() is available on Android API level 24, but the F_LOCK |
| 42001 |
macro is not defined in android-ndk-r13. |
| 42002 |
|
| 42003 |
- bpo-28538: Fix the compilation error that occurs because if_nameindex() is |
| 42004 |
available on Android API level 24, but the if_nameindex structure is not |
| 42005 |
defined. |
| 42006 |
|
| 42007 |
- bpo-20211: Do not add the directory for installing C header files and the |
| 42008 |
directory for installing object code libraries to the cross compilation |
| 42009 |
search paths. Original patch by Thomas Petazzoni. |
| 42010 |
|
| 42011 |
- bpo-28849: Do not define sys.implementation._multiarch on Android. |
| 42012 |
|
| 42013 |
|
| 42014 |
What's New in Python 3.6.0 final? |
| 42015 |
================================= |
| 42016 |
|
| 42017 |
*Release date: 2016-12-23* |
| 42018 |
|
| 42019 |
No changes since release candidate 2 |
| 42020 |
|
| 42021 |
|
| 42022 |
|
| 42023 |
What's New in Python 3.6.0 release candidate 2? |
| 42024 |
=============================================== |
| 42025 |
|
| 42026 |
*Release date: 2016-12-16* |
| 42027 |
|
| 42028 |
Core and Builtins |
| 42029 |
----------------- |
| 42030 |
|
| 42031 |
- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must |
| 42032 |
not convert combined table into split table. Patch written by INADA Naoki. |
| 42033 |
|
| 42034 |
- bpo-28990: Fix asyncio SSL hanging if connection is closed before |
| 42035 |
handshake is completed. (Patch by HoHo-Ho) |
| 42036 |
|
| 42037 |
Tools/Demos |
| 42038 |
----------- |
| 42039 |
|
| 42040 |
- bpo-28770: Fix python-gdb.py for fastcalls. |
| 42041 |
|
| 42042 |
Windows |
| 42043 |
------- |
| 42044 |
|
| 42045 |
- bpo-28896: Deprecate WindowsRegistryFinder. |
| 42046 |
|
| 42047 |
Build |
| 42048 |
----- |
| 42049 |
|
| 42050 |
- bpo-28898: Prevent gdb build errors due to HAVE_LONG_LONG redefinition. |
| 42051 |
|
| 42052 |
|
| 42053 |
What's New in Python 3.6.0 release candidate 1? |
| 42054 |
=============================================== |
| 42055 |
|
| 42056 |
*Release date: 2016-12-06* |
| 42057 |
|
| 42058 |
Core and Builtins |
| 42059 |
----------------- |
| 42060 |
|
| 42061 |
- bpo-23722: Rather than silently producing a class that doesn't support |
| 42062 |
zero-argument ``super()`` in methods, failing to pass the new |
| 42063 |
``__classcell__`` namespace entry up to ``type.__new__`` now results in a |
| 42064 |
``DeprecationWarning`` and a class that supports zero-argument |
| 42065 |
``super()``. |
| 42066 |
|
| 42067 |
- bpo-28797: Modifying the class __dict__ inside the __set_name__ method of |
| 42068 |
a descriptor that is used inside that class no longer prevents calling the |
| 42069 |
__set_name__ method of other descriptors. |
| 42070 |
|
| 42071 |
- bpo-28782: Fix a bug in the implementation ``yield from`` when checking if |
| 42072 |
the next instruction is YIELD_FROM. Regression introduced by WORDCODE |
| 42073 |
(issue #26647). |
| 42074 |
|
| 42075 |
Library |
| 42076 |
------- |
| 42077 |
|
| 42078 |
- bpo-27030: Unknown escapes in re.sub() replacement template are allowed |
| 42079 |
again. But they still are deprecated and will be disabled in 3.7. |
| 42080 |
|
| 42081 |
- bpo-28835: Fix a regression introduced in warnings.catch_warnings(): call |
| 42082 |
warnings.showwarning() if it was overridden inside the context manager. |
| 42083 |
|
| 42084 |
- bpo-27172: To assist with upgrades from 2.7, the previously documented |
| 42085 |
deprecation of ``inspect.getfullargspec()`` has been reversed. This |
| 42086 |
decision may be revisited again after the Python 2.7 branch is no longer |
| 42087 |
officially supported. |
| 42088 |
|
| 42089 |
- bpo-26273: Add new :const:`socket.TCP_CONGESTION` (Linux 2.6.13) and |
| 42090 |
:const:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written |
| 42091 |
by Omar Sandoval. |
| 42092 |
|
| 42093 |
- bpo-24142: Reading a corrupt config file left configparser in an invalid |
| 42094 |
state. Original patch by Florian Höch. |
| 42095 |
|
| 42096 |
- bpo-28843: Fix asyncio C Task to handle exceptions __traceback__. |
| 42097 |
|
| 42098 |
C API |
| 42099 |
----- |
| 42100 |
|
| 42101 |
- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions. |
| 42102 |
|
| 42103 |
Documentation |
| 42104 |
------------- |
| 42105 |
|
| 42106 |
- bpo-23722: The data model reference and the porting section in the What's |
| 42107 |
New guide now cover the additional ``__classcell__`` handling needed for |
| 42108 |
custom metaclasses to fully support :pep:`487` and zero-argument |
| 42109 |
``super()``. |
| 42110 |
|
| 42111 |
Tools/Demos |
| 42112 |
----------- |
| 42113 |
|
| 42114 |
- bpo-28023: Fix python-gdb.py didn't support new dict implementation. |
| 42115 |
|
| 42116 |
|
| 42117 |
What's New in Python 3.6.0 beta 4? |
| 42118 |
================================== |
| 42119 |
|
| 42120 |
*Release date: 2016-11-21* |
| 42121 |
|
| 42122 |
Core and Builtins |
| 42123 |
----------------- |
| 42124 |
|
| 42125 |
- bpo-28532: Show sys.version when -V option is supplied twice. |
| 42126 |
|
| 42127 |
- bpo-27100: The with-statement now checks for __enter__ before it checks |
| 42128 |
for __exit__. This gives less confusing error messages when both methods |
| 42129 |
are missing. Patch by Jonathan Ellington. |
| 42130 |
|
| 42131 |
- bpo-28746: Fix the set_inheritable() file descriptor method on platforms |
| 42132 |
that do not have the ioctl FIOCLEX and FIONCLEX commands. |
| 42133 |
|
| 42134 |
- bpo-26920: Fix not getting the locale's charset upon initializing the |
| 42135 |
interpreter, on platforms that do not have langinfo. |
| 42136 |
|
| 42137 |
- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X |
| 42138 |
when decode astral characters. Patch by Xiang Zhang. |
| 42139 |
|
| 42140 |
- bpo-19398: Extra slash no longer added to sys.path components in case of |
| 42141 |
empty compile-time PYTHONPATH components. |
| 42142 |
|
| 42143 |
- bpo-28665: Improve speed of the STORE_DEREF opcode by 40%. |
| 42144 |
|
| 42145 |
- bpo-28583: PyDict_SetDefault didn't combine split table when needed. Patch |
| 42146 |
by Xiang Zhang. |
| 42147 |
|
| 42148 |
- bpo-27243: Change PendingDeprecationWarning -> DeprecationWarning. As it |
| 42149 |
was agreed in the issue, __aiter__ returning an awaitable should result in |
| 42150 |
PendingDeprecationWarning in 3.5 and in DeprecationWarning in 3.6. |
| 42151 |
|
| 42152 |
- bpo-26182: Fix a refleak in code that raises DeprecationWarning. |
| 42153 |
|
| 42154 |
- bpo-28721: Fix asynchronous generators aclose() and athrow() to handle |
| 42155 |
StopAsyncIteration propagation properly. |
| 42156 |
|
| 42157 |
Library |
| 42158 |
------- |
| 42159 |
|
| 42160 |
- bpo-28752: Restored the __reduce__() methods of datetime objects. |
| 42161 |
|
| 42162 |
- bpo-28727: Regular expression patterns, _sre.SRE_Pattern objects created |
| 42163 |
by re.compile(), become comparable (only x==y and x!=y operators). This |
| 42164 |
change should fix the issue #18383: don't duplicate warning filters when |
| 42165 |
the warnings module is reloaded (thing usually only done in unit tests). |
| 42166 |
|
| 42167 |
- bpo-20572: The subprocess.Popen.wait method's undocumented endtime |
| 42168 |
parameter now raises a DeprecationWarning. |
| 42169 |
|
| 42170 |
- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and |
| 42171 |
from_buffer_copy() methods on abstract classes like Array. |
| 42172 |
|
| 42173 |
- bpo-19717: Makes Path.resolve() succeed on paths that do not exist. Patch |
| 42174 |
by Vajrasky Kok |
| 42175 |
|
| 42176 |
- bpo-28563: Fixed possible DoS and arbitrary code execution when handle |
| 42177 |
plural form selections in the gettext module. The expression parser now |
| 42178 |
supports exact syntax supported by GNU gettext. |
| 42179 |
|
| 42180 |
- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the |
| 42181 |
garbage collector is invoked in other thread. Based on patch by Sebastian |
| 42182 |
Cufre. |
| 42183 |
|
| 42184 |
- bpo-28600: Optimize loop.call_soon. |
| 42185 |
|
| 42186 |
- bpo-28613: Fix get_event_loop() return the current loop if called from |
| 42187 |
coroutines/callbacks. |
| 42188 |
|
| 42189 |
- bpo-28634: Fix asyncio.isfuture() to support unittest.Mock. |
| 42190 |
|
| 42191 |
- bpo-26081: Fix refleak in _asyncio.Future.__iter__().throw. |
| 42192 |
|
| 42193 |
- bpo-28639: Fix inspect.isawaitable to always return bool Patch by Justin |
| 42194 |
Mayfield. |
| 42195 |
|
| 42196 |
- bpo-28652: Make loop methods reject socket kinds they do not support. |
| 42197 |
|
| 42198 |
- bpo-28653: Fix a refleak in functools.lru_cache. |
| 42199 |
|
| 42200 |
- bpo-28703: Fix asyncio.iscoroutinefunction to handle Mock objects. |
| 42201 |
|
| 42202 |
- bpo-28704: Fix create_unix_server to support Path-like objects (PEP 519). |
| 42203 |
|
| 42204 |
- bpo-28720: Add collections.abc.AsyncGenerator. |
| 42205 |
|
| 42206 |
Documentation |
| 42207 |
------------- |
| 42208 |
|
| 42209 |
- bpo-28513: Documented command-line interface of zipfile. |
| 42210 |
|
| 42211 |
Tests |
| 42212 |
----- |
| 42213 |
|
| 42214 |
- bpo-28666: Now test.support.rmtree is able to remove unwritable or |
| 42215 |
unreadable directories. |
| 42216 |
|
| 42217 |
- bpo-23839: Various caches now are cleared before running every test file. |
| 42218 |
|
| 42219 |
Build |
| 42220 |
----- |
| 42221 |
|
| 42222 |
- bpo-10656: Fix out-of-tree building on AIX. Patch by Tristan Carel and |
| 42223 |
Michael Haubenwallner. |
| 42224 |
|
| 42225 |
- bpo-26359: Rename --with-optimiations to --enable-optimizations. |
| 42226 |
|
| 42227 |
- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. |
| 42228 |
Patch by Gareth Rees. |
| 42229 |
|
| 42230 |
|
| 42231 |
What's New in Python 3.6.0 beta 3? |
| 42232 |
================================== |
| 42233 |
|
| 42234 |
*Release date: 2016-10-31* |
| 42235 |
|
| 42236 |
Core and Builtins |
| 42237 |
----------------- |
| 42238 |
|
| 42239 |
- bpo-28128: Deprecation warning for invalid str and byte escape sequences |
| 42240 |
now prints better information about where the error occurs. Patch by |
| 42241 |
Serhiy Storchaka and Eric Smith. |
| 42242 |
|
| 42243 |
- bpo-28509: dict.update() no longer allocate unnecessary large memory. |
| 42244 |
|
| 42245 |
- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug |
| 42246 |
build. |
| 42247 |
|
| 42248 |
- bpo-28517: Fixed of-by-one error in the peephole optimizer that caused |
| 42249 |
keeping unreachable code. |
| 42250 |
|
| 42251 |
- bpo-28214: Improved exception reporting for problematic __set_name__ |
| 42252 |
attributes. |
| 42253 |
|
| 42254 |
- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception |
| 42255 |
loss in PyTraceBack_Here(). |
| 42256 |
|
| 42257 |
- bpo-28471: Fix "Python memory allocator called without holding the GIL" |
| 42258 |
crash in socket.setblocking. |
| 42259 |
|
| 42260 |
Library |
| 42261 |
------- |
| 42262 |
|
| 42263 |
- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if |
| 42264 |
given empty data twice. Patch by Benjamin Fogle. |
| 42265 |
|
| 42266 |
- bpo-28549: Fixed segfault in curses's addch() with ncurses6. |
| 42267 |
|
| 42268 |
- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar |
| 42269 |
file with compression before trying to open it without compression. |
| 42270 |
Otherwise it had 50% chance failed with ignore_zeros=True. |
| 42271 |
|
| 42272 |
- bpo-23262: The webbrowser module now supports Firefox 36+ and derived |
| 42273 |
browsers. Based on patch by Oleg Broytman. |
| 42274 |
|
| 42275 |
- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused |
| 42276 |
by representing the scale as float value internally in Tk. tkinter.IntVar |
| 42277 |
now works if float value is set to underlying Tk variable. |
| 42278 |
|
| 42279 |
- bpo-18844: The various ways of specifying weights for random.choices() now |
| 42280 |
produce the same result sequences. |
| 42281 |
|
| 42282 |
- bpo-28255: calendar.TextCalendar().prmonth() no longer prints a space at |
| 42283 |
the start of new line after printing a month's calendar. Patch by Xiang |
| 42284 |
Zhang. |
| 42285 |
|
| 42286 |
- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces. |
| 42287 |
Based on patch by Kaarle Ritvanen. |
| 42288 |
|
| 42289 |
- bpo-28353: os.fwalk() no longer fails on broken links. |
| 42290 |
|
| 42291 |
- bpo-28430: Fix iterator of C implemented asyncio.Future doesn't accept |
| 42292 |
non-None value is passed to it.send(val). |
| 42293 |
|
| 42294 |
- bpo-27025: Generated names for Tkinter widgets now start by the "!" prefix |
| 42295 |
for readability. |
| 42296 |
|
| 42297 |
- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a |
| 42298 |
workaround to Tix library bug. |
| 42299 |
|
| 42300 |
- bpo-28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. |
| 42301 |
|
| 42302 |
- bpo-25953: re.sub() now raises an error for invalid numerical group |
| 42303 |
reference in replacement template even if the pattern is not found in the |
| 42304 |
string. Error message for invalid group reference now includes the group |
| 42305 |
index and the position of the reference. Based on patch by SilentGhost. |
| 42306 |
|
| 42307 |
- bpo-18219: Optimize csv.DictWriter for large number of columns. Patch by |
| 42308 |
Mariatta Wijaya. |
| 42309 |
|
| 42310 |
- bpo-28448: Fix C implemented asyncio.Future didn't work on Windows. |
| 42311 |
|
| 42312 |
- bpo-28480: Fix error building socket module when multithreading is |
| 42313 |
disabled. |
| 42314 |
|
| 42315 |
- bpo-24452: Make webbrowser support Chrome on Mac OS X. |
| 42316 |
|
| 42317 |
- bpo-20766: Fix references leaked by pdb in the handling of SIGINT |
| 42318 |
handlers. |
| 42319 |
|
| 42320 |
- bpo-28492: Fix how StopIteration exception is raised in _asyncio.Future. |
| 42321 |
|
| 42322 |
- bpo-28500: Fix asyncio to handle async gens GC from another thread. |
| 42323 |
|
| 42324 |
- bpo-26923: Fix asyncio.Gather to refuse being cancelled once all children |
| 42325 |
are done. Patch by Johannes Ebke. |
| 42326 |
|
| 42327 |
- bpo-26796: Don't configure the number of workers for default threadpool |
| 42328 |
executor. Initial patch by Hans Lawrenz. |
| 42329 |
|
| 42330 |
- bpo-28544: Implement asyncio.Task in C. |
| 42331 |
|
| 42332 |
Windows |
| 42333 |
------- |
| 42334 |
|
| 42335 |
- bpo-28522: Fixes mishandled buffer reallocation in getpathp.c |
| 42336 |
|
| 42337 |
Build |
| 42338 |
----- |
| 42339 |
|
| 42340 |
- bpo-28444: Fix missing extensions modules when cross compiling. |
| 42341 |
|
| 42342 |
- bpo-28208: Update Windows build and OS X installers to use SQLite 3.14.2. |
| 42343 |
|
| 42344 |
- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j. |
| 42345 |
|
| 42346 |
Tests |
| 42347 |
----- |
| 42348 |
|
| 42349 |
- bpo-26944: Fix test_posix for Android where 'id -G' is entirely wrong or |
| 42350 |
missing the effective gid. |
| 42351 |
|
| 42352 |
- bpo-28409: regrtest: fix the parser of command line arguments. |
| 42353 |
|
| 42354 |
|
| 42355 |
What's New in Python 3.6.0 beta 2? |
| 42356 |
================================== |
| 42357 |
|
| 42358 |
*Release date: 2016-10-10* |
| 42359 |
|
| 42360 |
Core and Builtins |
| 42361 |
----------------- |
| 42362 |
|
| 42363 |
- bpo-28183: Optimize and cleanup dict iteration. |
| 42364 |
|
| 42365 |
- bpo-26081: Added C implementation of asyncio.Future. Original patch by |
| 42366 |
Yury Selivanov. |
| 42367 |
|
| 42368 |
- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). |
| 42369 |
Patch by Xiang Zhang. |
| 42370 |
|
| 42371 |
- bpo-28376: The type of long range iterator is now registered as Iterator. |
| 42372 |
Patch by Oren Milman. |
| 42373 |
|
| 42374 |
- bpo-28376: Creating instances of range_iterator by calling range_iterator |
| 42375 |
type now is deprecated. Patch by Oren Milman. |
| 42376 |
|
| 42377 |
- bpo-28376: The constructor of range_iterator now checks that step is not |
| 42378 |
0. Patch by Oren Milman. |
| 42379 |
|
| 42380 |
- bpo-26906: Resolving special methods of uninitialized type now causes |
| 42381 |
implicit initialization of the type instead of a fail. |
| 42382 |
|
| 42383 |
- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original |
| 42384 |
patch by Niklas Koep. |
| 42385 |
|
| 42386 |
- bpo-24098: Fixed possible crash when AST is changed in process of |
| 42387 |
compiling it. |
| 42388 |
|
| 42389 |
- bpo-28201: Dict reduces possibility of 2nd conflict in hash table when |
| 42390 |
hashes have same lower bits. |
| 42391 |
|
| 42392 |
- bpo-28350: String constants with null character no longer interned. |
| 42393 |
|
| 42394 |
- bpo-26617: Fix crash when GC runs during weakref callbacks. |
| 42395 |
|
| 42396 |
- bpo-27942: String constants now interned recursively in tuples and |
| 42397 |
frozensets. |
| 42398 |
|
| 42399 |
- bpo-21578: Fixed misleading error message when ImportError called with |
| 42400 |
invalid keyword args. |
| 42401 |
|
| 42402 |
- bpo-28203: Fix incorrect type in complex(1.0, {2:3}) error message. Patch |
| 42403 |
by Soumya Sharma. |
| 42404 |
|
| 42405 |
- bpo-28086: Single var-positional argument of tuple subtype was passed |
| 42406 |
unscathed to the C-defined function. Now it is converted to exact tuple. |
| 42407 |
|
| 42408 |
- bpo-28214: Now __set_name__ is looked up on the class instead of the |
| 42409 |
instance. |
| 42410 |
|
| 42411 |
- bpo-27955: Fallback on reading /dev/urandom device when the getrandom() |
| 42412 |
syscall fails with EPERM, for example when blocked by SECCOMP. |
| 42413 |
|
| 42414 |
- bpo-28192: Don't import readline in isolated mode. |
| 42415 |
|
| 42416 |
- Upgrade internal unicode databases to Unicode version 9.0.0. |
| 42417 |
|
| 42418 |
- bpo-28131: Fix a regression in zipimport's compile_source(). zipimport |
| 42419 |
should use the same optimization level as the interpreter. |
| 42420 |
|
| 42421 |
- bpo-28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly |
| 42422 |
optimize memcpy(). |
| 42423 |
|
| 42424 |
- bpo-28120: Fix dict.pop() for splitted dictionary when trying to remove a |
| 42425 |
"pending key" (Not yet inserted in split-table). Patch by Xiang Zhang. |
| 42426 |
|
| 42427 |
- bpo-26182: Raise DeprecationWarning when async and await keywords are used |
| 42428 |
as variable/attribute/class/function name. |
| 42429 |
|
| 42430 |
Library |
| 42431 |
------- |
| 42432 |
|
| 42433 |
- bpo-27998: Fixed bytes path support in os.scandir() on Windows. Patch by |
| 42434 |
Eryk Sun. |
| 42435 |
|
| 42436 |
- bpo-28317: The disassembler now decodes FORMAT_VALUE argument. |
| 42437 |
|
| 42438 |
- bpo-26293: Fixed writing ZIP files that starts not from the start of the |
| 42439 |
file. Offsets in ZIP file now are relative to the start of the archive in |
| 42440 |
conforming to the specification. |
| 42441 |
|
| 42442 |
- bpo-28380: unittest.mock Mock autospec functions now properly support |
| 42443 |
assert_called, assert_not_called, and assert_called_once. |
| 42444 |
|
| 42445 |
- bpo-27181: remove statistics.geometric_mean and defer until 3.7. |
| 42446 |
|
| 42447 |
- bpo-28229: lzma module now supports pathlib. |
| 42448 |
|
| 42449 |
- bpo-28321: Fixed writing non-BMP characters with binary format in |
| 42450 |
plistlib. |
| 42451 |
|
| 42452 |
- bpo-28225: bz2 module now supports pathlib. Initial patch by Ethan |
| 42453 |
Furman. |
| 42454 |
|
| 42455 |
- bpo-28227: gzip now supports pathlib. Patch by Ethan Furman. |
| 42456 |
|
| 42457 |
- bpo-27358: Optimized merging var-keyword arguments and improved error |
| 42458 |
message when passing a non-mapping as a var-keyword argument. |
| 42459 |
|
| 42460 |
- bpo-28257: Improved error message when passing a non-iterable as a |
| 42461 |
var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL. |
| 42462 |
|
| 42463 |
- bpo-28322: Fixed possible crashes when unpickle itertools objects from |
| 42464 |
incorrect pickle data. Based on patch by John Leitch. |
| 42465 |
|
| 42466 |
- bpo-28228: imghdr now supports pathlib. |
| 42467 |
|
| 42468 |
- bpo-28226: compileall now supports pathlib. |
| 42469 |
|
| 42470 |
- bpo-28314: Fix function declaration (C flags) for the getiterator() method |
| 42471 |
of xml.etree.ElementTree.Element. |
| 42472 |
|
| 42473 |
- bpo-28148: Stop using localtime() and gmtime() in the time module. |
| 42474 |
Introduced platform independent _PyTime_localtime API that is similar to |
| 42475 |
POSIX localtime_r, but available on all platforms. Patch by Ed Schouten. |
| 42476 |
|
| 42477 |
- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and |
| 42478 |
9999-12. Methods itermonthdays() and itermonthdays2() are reimplemented so |
| 42479 |
that they don't call itermonthdates() which can cause datetime.date |
| 42480 |
under/overflow. |
| 42481 |
|
| 42482 |
- bpo-28275: Fixed possible use after free in the decompress() methods of |
| 42483 |
the LZMADecompressor and BZ2Decompressor classes. Original patch by John |
| 42484 |
Leitch. |
| 42485 |
|
| 42486 |
- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation() |
| 42487 |
if pass invalid string-like object as a name. Patch by Xiang Zhang. |
| 42488 |
|
| 42489 |
- bpo-18844: random.choices() now has k as a keyword-only argument to |
| 42490 |
improve the readability of common cases and come into line with the |
| 42491 |
signature used in other languages. |
| 42492 |
|
| 42493 |
- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. |
| 42494 |
Patch by Madison May. |
| 42495 |
|
| 42496 |
- bpo-27611: Fixed support of default root window in the tkinter.tix module. |
| 42497 |
Added the master parameter in the DisplayStyle constructor. |
| 42498 |
|
| 42499 |
- bpo-27348: In the traceback module, restore the formatting of exception |
| 42500 |
messages like "Exception: None". This fixes a regression introduced in |
| 42501 |
3.5a2. |
| 42502 |
|
| 42503 |
- bpo-25651: Allow false values to be used for msg parameter of subTest(). |
| 42504 |
|
| 42505 |
- bpo-27778: Fix a memory leak in os.getrandom() when the getrandom() is |
| 42506 |
interrupted by a signal and a signal handler raises a Python exception. |
| 42507 |
|
| 42508 |
- bpo-28200: Fix memory leak on Windows in the os module (fix |
| 42509 |
path_converter() function). |
| 42510 |
|
| 42511 |
- bpo-25400: RobotFileParser now correctly returns default values for |
| 42512 |
crawl_delay and request_rate. Initial patch by Peter Wirtz. |
| 42513 |
|
| 42514 |
- bpo-27932: Prevent memory leak in win32_ver(). |
| 42515 |
|
| 42516 |
- Fix UnboundLocalError in socket._sendfile_use_sendfile. |
| 42517 |
|
| 42518 |
- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of |
| 42519 |
os.stat(). Patch by Eryk Sun. |
| 42520 |
|
| 42521 |
- bpo-22493: Warning message emitted by using inline flags in the middle of |
| 42522 |
regular expression now contains a (truncated) regex pattern. Patch by Tim |
| 42523 |
Graham. |
| 42524 |
|
| 42525 |
- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an |
| 42526 |
empty bytestring is passed. |
| 42527 |
|
| 42528 |
- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. |
| 42529 |
|
| 42530 |
- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by |
| 42531 |
Gergely Imreh and Markus Holtermann. |
| 42532 |
|
| 42533 |
- bpo-28114: Fix a crash in parse_envlist() when env contains byte strings. |
| 42534 |
Patch by Eryk Sun. |
| 42535 |
|
| 42536 |
- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and |
| 42537 |
binascii.a2b_qp(). |
| 42538 |
|
| 42539 |
- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by |
| 42540 |
Kevin Conway. |
| 42541 |
|
| 42542 |
- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by |
| 42543 |
Seth Michael Larson. |
| 42544 |
|
| 42545 |
- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by |
| 42546 |
iceboy. |
| 42547 |
|
| 42548 |
- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki. |
| 42549 |
|
| 42550 |
- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. |
| 42551 |
|
| 42552 |
- bpo-27759: Fix selectors incorrectly retain invalid file descriptors. |
| 42553 |
Patch by Mark Williams. |
| 42554 |
|
| 42555 |
- bpo-28368: Refuse monitoring processes if the child watcher has no loop |
| 42556 |
attached. Patch by Vincent Michel. |
| 42557 |
|
| 42558 |
- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader, |
| 42559 |
add_writer, etc. |
| 42560 |
|
| 42561 |
- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг |
| 42562 |
Марк. |
| 42563 |
|
| 42564 |
- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor. |
| 42565 |
|
| 42566 |
- bpo-28372: Fix asyncio to support formatting of non-python coroutines. |
| 42567 |
|
| 42568 |
- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг |
| 42569 |
Марк. |
| 42570 |
|
| 42571 |
- bpo-27972: Prohibit Tasks to await on themselves. |
| 42572 |
|
| 42573 |
Windows |
| 42574 |
------- |
| 42575 |
|
| 42576 |
- bpo-28402: Adds signed catalog files for stdlib on Windows. |
| 42577 |
|
| 42578 |
- bpo-28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk |
| 42579 |
Sun) |
| 42580 |
|
| 42581 |
- bpo-28251: Improvements to help manuals on Windows. |
| 42582 |
|
| 42583 |
- bpo-28110: launcher.msi has different product codes between 32-bit and |
| 42584 |
64-bit |
| 42585 |
|
| 42586 |
- bpo-28161: Opening CON for write access fails |
| 42587 |
|
| 42588 |
- bpo-28162: WindowsConsoleIO readall() fails if first line starts with |
| 42589 |
Ctrl+Z |
| 42590 |
|
| 42591 |
- bpo-28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle |
| 42592 |
|
| 42593 |
- bpo-28164: _PyIO_get_console_type fails for various paths |
| 42594 |
|
| 42595 |
- bpo-28137: Renames Windows path file to ._pth |
| 42596 |
|
| 42597 |
- bpo-28138: Windows ._pth file should allow import site |
| 42598 |
|
| 42599 |
C API |
| 42600 |
----- |
| 42601 |
|
| 42602 |
- bpo-28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), |
| 42603 |
PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and |
| 42604 |
PyUnicode_AsEncodedUnicode(). |
| 42605 |
|
| 42606 |
Build |
| 42607 |
----- |
| 42608 |
|
| 42609 |
- bpo-28258: Fixed build with Estonian locale (python-config and distclean |
| 42610 |
targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. |
| 42611 |
|
| 42612 |
- bpo-26661: setup.py now detects system libffi with multiarch wrapper. |
| 42613 |
|
| 42614 |
- bpo-15819: Remove redundant include search directory option for building |
| 42615 |
outside the source tree. |
| 42616 |
|
| 42617 |
Tests |
| 42618 |
----- |
| 42619 |
|
| 42620 |
- bpo-28217: Adds _testconsole module to test console input. |
| 42621 |
|
| 42622 |
|
| 42623 |
What's New in Python 3.6.0 beta 1? |
| 42624 |
================================== |
| 42625 |
|
| 42626 |
*Release date: 2016-09-12* |
| 42627 |
|
| 42628 |
Core and Builtins |
| 42629 |
----------------- |
| 42630 |
|
| 42631 |
- bpo-23722: The __class__ cell used by zero-argument super() is now |
| 42632 |
initialized from type.__new__ rather than __build_class__, so class |
| 42633 |
methods relying on that will now work correctly when called from metaclass |
| 42634 |
methods during class creation. Patch by Martin Teichmann. |
| 42635 |
|
| 42636 |
- bpo-25221: Fix corrupted result from PyLong_FromLong(0) when Python is |
| 42637 |
compiled with NSMALLPOSINTS = 0. |
| 42638 |
|
| 42639 |
- bpo-27080: Implement formatting support for :pep:`515`. Initial patch by |
| 42640 |
Chris Angelico. |
| 42641 |
|
| 42642 |
- bpo-27199: In tarfile, expose copyfileobj bufsize to improve throughput. |
| 42643 |
Patch by Jason Fried. |
| 42644 |
|
| 42645 |
- bpo-27948: In f-strings, only allow backslashes inside the braces (where |
| 42646 |
the expressions are). This is a breaking change from the 3.6 alpha |
| 42647 |
releases, where backslashes are allowed anywhere in an f-string. Also, |
| 42648 |
require that expressions inside f-strings be enclosed within literal |
| 42649 |
braces, and not escapes like ``f'\x7b"hi"\x7d'``. |
| 42650 |
|
| 42651 |
- bpo-28046: Remove platform-specific directories from sys.path. |
| 42652 |
|
| 42653 |
- bpo-28071: Add early-out for differencing from an empty set. |
| 42654 |
|
| 42655 |
- bpo-25758: Prevents zipimport from unnecessarily encoding a filename |
| 42656 |
(patch by Eryk Sun) |
| 42657 |
|
| 42658 |
- bpo-25856: The __module__ attribute of extension classes and functions now |
| 42659 |
is interned. This leads to more compact pickle data with protocol 4. |
| 42660 |
|
| 42661 |
- bpo-27213: Rework CALL_FUNCTION* opcodes to produce shorter and more |
| 42662 |
efficient bytecode. Patch by Demur Rumed, design by Serhiy Storchaka, |
| 42663 |
reviewed by Serhiy Storchaka and Victor Stinner. |
| 42664 |
|
| 42665 |
- bpo-26331: Implement tokenizing support for :pep:`515`. Patch by Georg |
| 42666 |
Brandl. |
| 42667 |
|
| 42668 |
- bpo-27999: Make "global after use" a SyntaxError, and ditto for nonlocal. |
| 42669 |
Patch by Ivan Levkivskyi. |
| 42670 |
|
| 42671 |
- bpo-28003: Implement :pep:`525` -- Asynchronous Generators. |
| 42672 |
|
| 42673 |
- bpo-27985: Implement :pep:`526` -- Syntax for Variable Annotations. Patch |
| 42674 |
by Ivan Levkivskyi. |
| 42675 |
|
| 42676 |
- bpo-26058: Add a new private version to the builtin dict type, incremented |
| 42677 |
at each dictionary creation and at each dictionary change. Implementation |
| 42678 |
of the PEP 509. |
| 42679 |
|
| 42680 |
- bpo-27364: A backslash-character pair that is not a valid escape sequence |
| 42681 |
now generates a DeprecationWarning. Patch by Emanuel Barry. |
| 42682 |
|
| 42683 |
- bpo-27350: ``dict`` implementation is changed like PyPy. It is more |
| 42684 |
compact and preserves insertion order. (Concept developed by Raymond |
| 42685 |
Hettinger and patch by Inada Naoki.) |
| 42686 |
|
| 42687 |
- bpo-27911: Remove unnecessary error checks in |
| 42688 |
``exec_builtin_or_dynamic()``. |
| 42689 |
|
| 42690 |
- bpo-27078: Added BUILD_STRING opcode. Optimized f-strings evaluation. |
| 42691 |
|
| 42692 |
- bpo-17884: Python now requires systems with inttypes.h and stdint.h |
| 42693 |
|
| 42694 |
- bpo-27961: Require platforms to support ``long long``. Python hasn't |
| 42695 |
compiled without ``long long`` for years, so this is basically a |
| 42696 |
formality. |
| 42697 |
|
| 42698 |
- bpo-27355: Removed support for Windows CE. It was never finished, and |
| 42699 |
Windows CE is no longer a relevant platform for Python. |
| 42700 |
|
| 42701 |
- Implement :pep:`523`. |
| 42702 |
|
| 42703 |
- bpo-27870: A left shift of zero by a large integer no longer attempts to |
| 42704 |
allocate large amounts of memory. |
| 42705 |
|
| 42706 |
- bpo-25402: In int-to-decimal-string conversion, improve the estimate of |
| 42707 |
the intermediate memory required, and remove an unnecessarily strict |
| 42708 |
overflow check. Patch by Serhiy Storchaka. |
| 42709 |
|
| 42710 |
- bpo-27214: In long_invert, be more careful about modifying object returned |
| 42711 |
by long_add, and remove an unnecessary check for small longs. Thanks Oren |
| 42712 |
Milman for analysis and patch. |
| 42713 |
|
| 42714 |
- bpo-27506: Support passing the bytes/bytearray.translate() "delete" |
| 42715 |
argument by keyword. |
| 42716 |
|
| 42717 |
- bpo-27812: Properly clear out a generator's frame's backreference to the |
| 42718 |
generator to prevent crashes in frame.clear(). |
| 42719 |
|
| 42720 |
- bpo-27811: Fix a crash when a coroutine that has not been awaited is |
| 42721 |
finalized with warnings-as-errors enabled. |
| 42722 |
|
| 42723 |
- bpo-27587: Fix another issue found by PVS-Studio: Null pointer check after |
| 42724 |
use of 'def' in _PyState_AddModule(). Initial patch by Christian Heimes. |
| 42725 |
|
| 42726 |
- bpo-27792: The modulo operation applied to ``bool`` and other ``int`` |
| 42727 |
subclasses now always returns an ``int``. Previously the return type |
| 42728 |
depended on the input values. Patch by Xiang Zhang. |
| 42729 |
|
| 42730 |
- bpo-26984: int() now always returns an instance of exact int. |
| 42731 |
|
| 42732 |
- bpo-25604: Fix a minor bug in integer true division; this bug could |
| 42733 |
potentially have caused off-by-one-ulp results on platforms with |
| 42734 |
unreliable ldexp implementations. |
| 42735 |
|
| 42736 |
- bpo-24254: Make class definition namespace ordered by default. |
| 42737 |
|
| 42738 |
- bpo-27662: Fix an overflow check in ``List_New``: the original code was |
| 42739 |
checking against ``Py_SIZE_MAX`` instead of the correct upper bound of |
| 42740 |
``Py_SSIZE_T_MAX``. Patch by Xiang Zhang. |
| 42741 |
|
| 42742 |
- bpo-27782: Multi-phase extension module import now correctly allows the |
| 42743 |
``m_methods`` field to be used to add module level functions to instances |
| 42744 |
of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang. |
| 42745 |
|
| 42746 |
- bpo-27936: The round() function accepted a second None argument for some |
| 42747 |
types but not for others. Fixed the inconsistency by accepting None for |
| 42748 |
all numeric types. |
| 42749 |
|
| 42750 |
- bpo-27487: Warn if a submodule argument to "python -m" or |
| 42751 |
runpy.run_module() is found in sys.modules after parent packages are |
| 42752 |
imported, but before the submodule is executed. |
| 42753 |
|
| 42754 |
- bpo-27157: Make only type() itself accept the one-argument form. Patch by |
| 42755 |
Eryk Sun and Emanuel Barry. |
| 42756 |
|
| 42757 |
- bpo-27558: Fix a SystemError in the implementation of "raise" statement. |
| 42758 |
In a brand new thread, raise a RuntimeError since there is no active |
| 42759 |
exception to reraise. Patch written by Xiang Zhang. |
| 42760 |
|
| 42761 |
- bpo-28008: Implement :pep:`530` -- asynchronous comprehensions. |
| 42762 |
|
| 42763 |
- bpo-27942: Fix memory leak in codeobject.c |
| 42764 |
|
| 42765 |
Library |
| 42766 |
------- |
| 42767 |
|
| 42768 |
- bpo-28732: Fix crash in os.spawnv() with no elements in args |
| 42769 |
|
| 42770 |
- bpo-28485: Always raise ValueError for negative |
| 42771 |
compileall.compile_dir(workers=...) parameter, even when multithreading is |
| 42772 |
unavailable. |
| 42773 |
|
| 42774 |
- bpo-28037: Use sqlite3_get_autocommit() instead of setting |
| 42775 |
Connection->inTransaction manually. |
| 42776 |
|
| 42777 |
- bpo-25283: Attributes tm_gmtoff and tm_zone are now available on all |
| 42778 |
platforms in the return values of time.localtime() and time.gmtime(). |
| 42779 |
|
| 42780 |
- bpo-24454: Regular expression match object groups are now accessible using |
| 42781 |
__getitem__. "mo[x]" is equivalent to "mo.group(x)". |
| 42782 |
|
| 42783 |
- bpo-10740: sqlite3 no longer implicitly commit an open transaction before |
| 42784 |
DDL statements. |
| 42785 |
|
| 42786 |
- bpo-17941: Add a *module* parameter to collections.namedtuple(). |
| 42787 |
|
| 42788 |
- bpo-22493: Inline flags now should be used only at the start of the |
| 42789 |
regular expression. Deprecation warning is emitted if uses them in the |
| 42790 |
middle of the regular expression. |
| 42791 |
|
| 42792 |
- bpo-26885: xmlrpc now supports unmarshalling additional data types used by |
| 42793 |
Apache XML-RPC implementation for numerics and None. |
| 42794 |
|
| 42795 |
- bpo-28070: Fixed parsing inline verbose flag in regular expressions. |
| 42796 |
|
| 42797 |
- bpo-19500: Add client-side SSL session resumption to the ssl module. |
| 42798 |
|
| 42799 |
- bpo-28022: Deprecate ssl-related arguments in favor of SSLContext. The |
| 42800 |
deprecation include manual creation of SSLSocket and certfile/keyfile (or |
| 42801 |
similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. |
| 42802 |
|
| 42803 |
- bpo-28043: SSLContext has improved default settings: OP_NO_SSLv2, |
| 42804 |
OP_NO_SSLv3, OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, |
| 42805 |
OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE and HIGH ciphers without MD5. |
| 42806 |
|
| 42807 |
- bpo-24693: Changed some RuntimeError's in the zipfile module to more |
| 42808 |
appropriate types. Improved some error messages and debugging output. |
| 42809 |
|
| 42810 |
- bpo-17909: ``json.load`` and ``json.loads`` now support binary input |
| 42811 |
encoded as UTF-8, UTF-16 or UTF-32. Patch by Serhiy Storchaka. |
| 42812 |
|
| 42813 |
- bpo-27137: the pure Python fallback implementation of |
| 42814 |
``functools.partial`` now matches the behaviour of its accelerated C |
| 42815 |
counterpart for subclassing, pickling and text representation purposes. |
| 42816 |
Patch by Emanuel Barry and Serhiy Storchaka. |
| 42817 |
|
| 42818 |
- Fix possible integer overflows and crashes in the mmap module with unusual |
| 42819 |
usage patterns. |
| 42820 |
|
| 42821 |
- bpo-1703178: Fix the ability to pass the --link-objects option to the |
| 42822 |
distutils build_ext command. |
| 42823 |
|
| 42824 |
- bpo-28019: itertools.count() no longer rounds non-integer step in range |
| 42825 |
between 1.0 and 2.0 to 1. |
| 42826 |
|
| 42827 |
- bpo-18401: Pdb now supports the 'readrc' keyword argument to control |
| 42828 |
whether .pdbrc files should be read. Patch by Martin Matusiak and Sam |
| 42829 |
Kimbrel. |
| 42830 |
|
| 42831 |
- bpo-25969: Update the lib2to3 grammar to handle the unpacking |
| 42832 |
generalizations added in 3.5. |
| 42833 |
|
| 42834 |
- bpo-14977: mailcap now respects the order of the lines in the mailcap |
| 42835 |
files ("first match"), as required by RFC 1542. Patch by Michael Lazar. |
| 42836 |
|
| 42837 |
- bpo-28082: Convert re flag constants to IntFlag. |
| 42838 |
|
| 42839 |
- bpo-28025: Convert all ssl module constants to IntEnum and IntFlags. |
| 42840 |
SSLContext properties now return flags and enums. |
| 42841 |
|
| 42842 |
- bpo-23591: Add Flag, IntFlag, and auto() to enum module. |
| 42843 |
|
| 42844 |
- bpo-433028: Added support of modifier spans in regular expressions. |
| 42845 |
|
| 42846 |
- bpo-24594: Validates persist parameter when opening MSI database |
| 42847 |
|
| 42848 |
- bpo-17582: xml.etree.ElementTree nows preserves whitespaces in attributes |
| 42849 |
(Patch by Duane Griffin. Reviewed and approved by Stefan Behnel.) |
| 42850 |
|
| 42851 |
- bpo-28047: Fixed calculation of line length used for the base64 CTE in the |
| 42852 |
new email policies. |
| 42853 |
|
| 42854 |
- bpo-27576: Fix call order in OrderedDict.__init__(). |
| 42855 |
|
| 42856 |
- email.generator.DecodedGenerator now supports the policy keyword. |
| 42857 |
|
| 42858 |
- bpo-28027: Remove undocumented modules from ``Lib/plat-*``: IN, CDROM, |
| 42859 |
DLFCN, TYPES, CDIO, and STROPTS. |
| 42860 |
|
| 42861 |
- bpo-27445: Don't pass str(_charset) to MIMEText.set_payload(). Patch by |
| 42862 |
Claude Paroz. |
| 42863 |
|
| 42864 |
- bpo-24277: The new email API is no longer provisional, and the docs have |
| 42865 |
been reorganized and rewritten to emphasize the new API. |
| 42866 |
|
| 42867 |
- bpo-22450: urllib now includes an ``Accept: */*`` header among the default |
| 42868 |
headers. This makes the results of REST API requests more consistent and |
| 42869 |
predictable especially when proxy servers are involved. |
| 42870 |
|
| 42871 |
- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file |
| 42872 |
between runs given the same Grammar.txt input regardless of the hash |
| 42873 |
randomization setting. |
| 42874 |
|
| 42875 |
- bpo-28005: Allow ImportErrors in encoding implementation to propagate. |
| 42876 |
|
| 42877 |
- bpo-26667: Support path-like objects in importlib.util. |
| 42878 |
|
| 42879 |
- bpo-27570: Avoid zero-length memcpy() etc calls with null source pointers |
| 42880 |
in the "ctypes" and "array" modules. |
| 42881 |
|
| 42882 |
- bpo-22233: Break email header lines *only* on the RFC specified CR and LF |
| 42883 |
characters, not on arbitrary unicode line breaks. This also fixes a bug |
| 42884 |
in HTTP header parsing. |
| 42885 |
|
| 42886 |
- bpo-27331: The email.mime classes now all accept an optional policy |
| 42887 |
keyword. |
| 42888 |
|
| 42889 |
- bpo-27988: Fix email iter_attachments incorrect mutation of payload list. |
| 42890 |
|
| 42891 |
- bpo-16113: Add SHA-3 and SHAKE support to hashlib module. |
| 42892 |
|
| 42893 |
- Eliminate a tautological-pointer-compare warning in _scproxy.c. |
| 42894 |
|
| 42895 |
- bpo-27776: The :func:`os.urandom` function does now block on Linux 3.17 |
| 42896 |
and newer until the system urandom entropy pool is initialized to increase |
| 42897 |
the security. This change is part of the :pep:`524`. |
| 42898 |
|
| 42899 |
- bpo-27778: Expose the Linux ``getrandom()`` syscall as a new |
| 42900 |
:func:`os.getrandom` function. This change is part of the :pep:`524`. |
| 42901 |
|
| 42902 |
- bpo-27691: Fix ssl module's parsing of GEN_RID subject alternative name |
| 42903 |
fields in X.509 certs. |
| 42904 |
|
| 42905 |
- bpo-18844: Add random.choices(). |
| 42906 |
|
| 42907 |
- bpo-25761: Improved error reporting about truncated pickle data in C |
| 42908 |
implementation of unpickler. UnpicklingError is now raised instead of |
| 42909 |
AttributeError and ValueError in some cases. |
| 42910 |
|
| 42911 |
- bpo-26798: Add BLAKE2 (blake2b and blake2s) to hashlib. |
| 42912 |
|
| 42913 |
- bpo-26032: Optimized globbing in pathlib by using os.scandir(); it is now |
| 42914 |
about 1.5--4 times faster. |
| 42915 |
|
| 42916 |
- bpo-25596: Optimized glob() and iglob() functions in the glob module; they |
| 42917 |
are now about 3--6 times faster. |
| 42918 |
|
| 42919 |
- bpo-27928: Add scrypt (password-based key derivation function) to hashlib |
| 42920 |
module (requires OpenSSL 1.1.0). |
| 42921 |
|
| 42922 |
- bpo-27850: Remove 3DES from ssl module's default cipher list to counter |
| 42923 |
measure sweet32 attack (:cve:`2016-2183`). |
| 42924 |
|
| 42925 |
- bpo-27766: Add ChaCha20 Poly1305 to ssl module's default cipher list. |
| 42926 |
(Required OpenSSL 1.1.0 or LibreSSL). |
| 42927 |
|
| 42928 |
- bpo-25387: Check return value of winsound.MessageBeep. |
| 42929 |
|
| 42930 |
- bpo-27866: Add SSLContext.get_ciphers() method to get a list of all |
| 42931 |
enabled ciphers. |
| 42932 |
|
| 42933 |
- bpo-27744: Add AF_ALG (Linux Kernel crypto) to socket module. |
| 42934 |
|
| 42935 |
- bpo-26470: Port ssl and hashlib module to OpenSSL 1.1.0. |
| 42936 |
|
| 42937 |
- bpo-11620: Fix support for SND_MEMORY in winsound.PlaySound. Based on a |
| 42938 |
patch by Tim Lesher. |
| 42939 |
|
| 42940 |
- bpo-11734: Add support for IEEE 754 half-precision floats to the struct |
| 42941 |
module. Based on a patch by Eli Stevens. |
| 42942 |
|
| 42943 |
- bpo-27919: Deprecated ``extra_path`` distribution option in distutils |
| 42944 |
packaging. |
| 42945 |
|
| 42946 |
- bpo-23229: Add new ``cmath`` constants: ``cmath.inf`` and ``cmath.nan`` to |
| 42947 |
match ``math.inf`` and ``math.nan``, and also ``cmath.infj`` and |
| 42948 |
``cmath.nanj`` to match the format used by complex repr. |
| 42949 |
|
| 42950 |
- bpo-27842: The csv.DictReader now returns rows of type OrderedDict. |
| 42951 |
(Contributed by Steve Holden.) |
| 42952 |
|
| 42953 |
- Remove support for passing a file descriptor to os.access. It never worked |
| 42954 |
but previously didn't raise. |
| 42955 |
|
| 42956 |
- bpo-12885: Fix error when distutils encounters symlink. |
| 42957 |
|
| 42958 |
- bpo-27881: Fixed possible bugs when setting |
| 42959 |
sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang. |
| 42960 |
|
| 42961 |
- bpo-27861: Fixed a crash in sqlite3.Connection.cursor() when a factory |
| 42962 |
creates not a cursor. Patch by Xiang Zhang. |
| 42963 |
|
| 42964 |
- bpo-19884: Avoid spurious output on OS X with Gnu Readline. |
| 42965 |
|
| 42966 |
- bpo-27706: Restore deterministic behavior of random.Random().seed() for |
| 42967 |
string seeds using seeding version 1. Allows sequences of calls to |
| 42968 |
random() to exactly match those obtained in Python 2. Patch by Nofar |
| 42969 |
Schnider. |
| 42970 |
|
| 42971 |
- bpo-10513: Fix a regression in Connection.commit(). Statements should not |
| 42972 |
be reset after a commit. |
| 42973 |
|
| 42974 |
- bpo-12319: Chunked transfer encoding support added to |
| 42975 |
http.client.HTTPConnection requests. The |
| 42976 |
urllib.request.AbstractHTTPHandler class does not enforce a Content-Length |
| 42977 |
header any more. If a HTTP request has a file or iterable body, but no |
| 42978 |
Content-Length header, the library now falls back to use chunked |
| 42979 |
transfer-encoding. |
| 42980 |
|
| 42981 |
- A new version of typing.py from https://github.com/python/typing: - |
| 42982 |
Collection (only for 3.6) (issue #27598) - Add FrozenSet to __all__ |
| 42983 |
(upstream #261) - fix crash in _get_type_vars() (upstream #259) - Remove |
| 42984 |
the dict constraint in ForwardRef._eval_type (upstream #252) |
| 42985 |
|
| 42986 |
- bpo-27832: Make ``_normalize`` parameter to ``Fraction`` constructor |
| 42987 |
keyword-only, so that ``Fraction(2, 3, 4)`` now raises ``TypeError``. |
| 42988 |
|
| 42989 |
- bpo-27539: Fix unnormalised ``Fraction.__pow__`` result in the case of |
| 42990 |
negative exponent and negative base. |
| 42991 |
|
| 42992 |
- bpo-21718: cursor.description is now available for queries using CTEs. |
| 42993 |
|
| 42994 |
- bpo-27819: In distutils sdists, simply produce the "gztar" (gzipped tar |
| 42995 |
format) distributions on all platforms unless "formats" is supplied. |
| 42996 |
|
| 42997 |
- bpo-2466: posixpath.ismount now correctly recognizes mount points which |
| 42998 |
the user does not have permission to access. |
| 42999 |
|
| 43000 |
- bpo-9998: On Linux, ctypes.util.find_library now looks in LD_LIBRARY_PATH |
| 43001 |
for shared libraries. |
| 43002 |
|
| 43003 |
- bpo-27573: exit message for code.interact is now configurable. |
| 43004 |
|
| 43005 |
- bpo-27930: Improved behaviour of logging.handlers.QueueListener. Thanks to |
| 43006 |
Paulo Andrade and Petr Viktorin for the analysis and patch. |
| 43007 |
|
| 43008 |
- bpo-6766: Distributed reference counting added to multiprocessing to |
| 43009 |
support nesting of shared values / proxy objects. |
| 43010 |
|
| 43011 |
- bpo-21201: Improves readability of multiprocessing error message. Thanks |
| 43012 |
to Wojciech Walczak for patch. |
| 43013 |
|
| 43014 |
- asyncio: Add set_protocol / get_protocol to Transports. |
| 43015 |
|
| 43016 |
- bpo-27456: asyncio: Set TCP_NODELAY by default. |
| 43017 |
|
| 43018 |
IDLE |
| 43019 |
---- |
| 43020 |
|
| 43021 |
- bpo-15308: Add 'interrupt execution' (^C) to Shell menu. Patch by Roger |
| 43022 |
Serwy, updated by Bayard Randel. |
| 43023 |
|
| 43024 |
- bpo-27922: Stop IDLE tests from 'flashing' gui widgets on the screen. |
| 43025 |
|
| 43026 |
- bpo-27891: Consistently group and sort imports within idlelib modules. |
| 43027 |
|
| 43028 |
- bpo-17642: add larger font sizes for classroom projection. |
| 43029 |
|
| 43030 |
- Add version to title of IDLE help window. |
| 43031 |
|
| 43032 |
- bpo-25564: In section on IDLE -- console differences, mention that using |
| 43033 |
exec means that __builtins__ is defined for each statement. |
| 43034 |
|
| 43035 |
- bpo-27821: Fix 3.6.0a3 regression that prevented custom key sets from |
| 43036 |
being selected when no custom theme was defined. |
| 43037 |
|
| 43038 |
C API |
| 43039 |
----- |
| 43040 |
|
| 43041 |
- bpo-26900: Excluded underscored names and other private API from limited |
| 43042 |
API. |
| 43043 |
|
| 43044 |
- bpo-26027: Add support for path-like objects in PyUnicode_FSConverter() & |
| 43045 |
PyUnicode_FSDecoder(). |
| 43046 |
|
| 43047 |
Tests |
| 43048 |
----- |
| 43049 |
|
| 43050 |
- bpo-27427: Additional tests for the math module. Patch by Francisco Couzo. |
| 43051 |
|
| 43052 |
- bpo-27953: Skip math and cmath tests that fail on OS X 10.4 due to a poor |
| 43053 |
libm implementation of tan. |
| 43054 |
|
| 43055 |
- bpo-26040: Improve test_math and test_cmath coverage and rigour. Patch by |
| 43056 |
Jeff Allen. |
| 43057 |
|
| 43058 |
- bpo-27787: Call gc.collect() before checking each test for "dangling |
| 43059 |
threads", since the dangling threads are weak references. |
| 43060 |
|
| 43061 |
Build |
| 43062 |
----- |
| 43063 |
|
| 43064 |
- bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach) |
| 43065 |
|
| 43066 |
- bpo-27705: Update message in validate_ucrtbase.py |
| 43067 |
|
| 43068 |
- bpo-27976: Deprecate building _ctypes with the bundled copy of libffi on |
| 43069 |
non-OSX UNIX platforms. |
| 43070 |
|
| 43071 |
- bpo-27983: Cause lack of llvm-profdata tool when using clang as required |
| 43072 |
for PGO linking to be a configure time error rather than make time when |
| 43073 |
``--with-optimizations`` is enabled. Also improve our ability to find the |
| 43074 |
llvm-profdata tool on MacOS and some Linuxes. |
| 43075 |
|
| 43076 |
- bpo-21590: Support for DTrace and SystemTap probes. |
| 43077 |
|
| 43078 |
- bpo-26307: The profile-opt build now applies PGO to the built-in modules. |
| 43079 |
|
| 43080 |
- bpo-26359: Add the --with-optimizations flag to turn on LTO and PGO build |
| 43081 |
support when available. |
| 43082 |
|
| 43083 |
- bpo-27917: Set platform triplets for Android builds. |
| 43084 |
|
| 43085 |
- bpo-25825: Update references to the $(LIBPL) installation path on AIX. |
| 43086 |
This path was changed in 3.2a4. |
| 43087 |
|
| 43088 |
- Update OS X installer to use SQLite 3.14.1 and XZ 5.2.2. |
| 43089 |
|
| 43090 |
- bpo-21122: Fix LTO builds on OS X. |
| 43091 |
|
| 43092 |
- bpo-17128: Build OS X installer with a private copy of OpenSSL. Also |
| 43093 |
provide a sample Install Certificates command script to install a set of |
| 43094 |
root certificates from the third-party certifi module. |
| 43095 |
|
| 43096 |
Tools/Demos |
| 43097 |
----------- |
| 43098 |
|
| 43099 |
- bpo-27952: Get Tools/scripts/fixcid.py working with Python 3 and the |
| 43100 |
current "re" module, avoid invalid Python backslash escapes, and fix a bug |
| 43101 |
parsing escaped C quote signs. |
| 43102 |
|
| 43103 |
Windows |
| 43104 |
------- |
| 43105 |
|
| 43106 |
- bpo-28065: Update xz dependency to 5.2.2 and build it from source. |
| 43107 |
|
| 43108 |
- bpo-25144: Ensures TargetDir is set before continuing with custom install. |
| 43109 |
|
| 43110 |
- bpo-1602: Windows console doesn't input or print Unicode (PEP 528) |
| 43111 |
|
| 43112 |
- bpo-27781: Change file system encoding on Windows to UTF-8 (PEP 529) |
| 43113 |
|
| 43114 |
- bpo-27731: Opt-out of MAX_PATH on Windows 10 |
| 43115 |
|
| 43116 |
- bpo-6135: Adds encoding and errors parameters to subprocess. |
| 43117 |
|
| 43118 |
- bpo-27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec |
| 43119 |
lookup. |
| 43120 |
|
| 43121 |
- bpo-27982: The functions of the winsound module now accept keyword |
| 43122 |
arguments. |
| 43123 |
|
| 43124 |
- bpo-20366: Build full text search support into SQLite on Windows. |
| 43125 |
|
| 43126 |
- bpo-27756: Adds new icons for Python files and processes on Windows. |
| 43127 |
Designs by Cherry Wang. |
| 43128 |
|
| 43129 |
- bpo-27883: Update sqlite to 3.14.1.0 on Windows. |
| 43130 |
|
| 43131 |
|
| 43132 |
What's New in Python 3.6.0 alpha 4? |
| 43133 |
=================================== |
| 43134 |
|
| 43135 |
*Release date: 2016-08-15* |
| 43136 |
|
| 43137 |
Core and Builtins |
| 43138 |
----------------- |
| 43139 |
|
| 43140 |
- bpo-27704: Optimized creating bytes and bytearray from byte-like objects |
| 43141 |
and iterables. Speed up to 3 times for short objects. Original patch by |
| 43142 |
Naoki Inada. |
| 43143 |
|
| 43144 |
- bpo-26823: Large sections of repeated lines in tracebacks are now |
| 43145 |
abbreviated as "[Previous line repeated {count} more times]" by the |
| 43146 |
builtin traceback rendering. Patch by Emanuel Barry. |
| 43147 |
|
| 43148 |
- bpo-27574: Decreased an overhead of parsing keyword arguments in functions |
| 43149 |
implemented with using Argument Clinic. |
| 43150 |
|
| 43151 |
- bpo-22557: Now importing already imported modules is up to 2.5 times |
| 43152 |
faster. |
| 43153 |
|
| 43154 |
- bpo-17596: Include <wincrypt.h> to help with Min GW building. |
| 43155 |
|
| 43156 |
- bpo-17599: On Windows, rename the privately defined REPARSE_DATA_BUFFER |
| 43157 |
structure to avoid conflicting with the definition from Min GW. |
| 43158 |
|
| 43159 |
- bpo-27507: Add integer overflow check in bytearray.extend(). Patch by |
| 43160 |
Xiang Zhang. |
| 43161 |
|
| 43162 |
- bpo-27581: Don't rely on wrapping for overflow check in |
| 43163 |
PySequence_Tuple(). Patch by Xiang Zhang. |
| 43164 |
|
| 43165 |
- bpo-1621: Avoid signed integer overflow in list and tuple operations. |
| 43166 |
Patch by Xiang Zhang. |
| 43167 |
|
| 43168 |
- bpo-27419: Standard __import__() no longer look up "__import__" in globals |
| 43169 |
or builtins for importing submodules or "from import". Fixed a crash if |
| 43170 |
raise a warning about unabling to resolve package from __spec__ or |
| 43171 |
__package__. |
| 43172 |
|
| 43173 |
- bpo-27083: Respect the PYTHONCASEOK environment variable under Windows. |
| 43174 |
|
| 43175 |
- bpo-27514: Make having too many statically nested blocks a SyntaxError |
| 43176 |
instead of SystemError. |
| 43177 |
|
| 43178 |
- bpo-27366: Implemented :pep:`487` (Simpler customization of class |
| 43179 |
creation). Upon subclassing, the __init_subclass__ classmethod is called |
| 43180 |
on the base class. Descriptors are initialized with __set_name__ after |
| 43181 |
class creation. |
| 43182 |
|
| 43183 |
Library |
| 43184 |
------- |
| 43185 |
|
| 43186 |
- bpo-26027: Add :pep:`519`/__fspath__() support to the os and os.path |
| 43187 |
modules. Includes code from Jelle Zijlstra. (See also: bpo-27524) |
| 43188 |
|
| 43189 |
- bpo-27598: Add Collections to collections.abc. Patch by Ivan Levkivskyi, |
| 43190 |
docs by Neil Girdhar. |
| 43191 |
|
| 43192 |
- bpo-25958: Support "anti-registration" of special methods from various |
| 43193 |
ABCs, like __hash__, __iter__ or __len__. All these (and several more) |
| 43194 |
can be set to None in an implementation class and the behavior will be as |
| 43195 |
if the method is not defined at all. (Previously, this mechanism existed |
| 43196 |
only for __hash__, to make mutable classes unhashable.) Code contributed |
| 43197 |
by Andrew Barnert and Ivan Levkivskyi. |
| 43198 |
|
| 43199 |
- bpo-16764: Support keyword arguments to zlib.decompress(). Patch by Xiang |
| 43200 |
Zhang. |
| 43201 |
|
| 43202 |
- bpo-27736: Prevent segfault after interpreter re-initialization due to ref |
| 43203 |
count problem introduced in code for issue #27038 in 3.6.0a3. Patch by |
| 43204 |
Xiang Zhang. |
| 43205 |
|
| 43206 |
- bpo-25628: The *verbose* and *rename* parameters for |
| 43207 |
collections.namedtuple are now keyword-only. |
| 43208 |
|
| 43209 |
- bpo-12345: Add mathematical constant tau to math and cmath. See also |
| 43210 |
:pep:`628`. |
| 43211 |
|
| 43212 |
- bpo-26823: traceback.StackSummary.format now abbreviates large sections of |
| 43213 |
repeated lines as "[Previous line repeated {count} more times]" (this |
| 43214 |
change then further affects other traceback display operations in the |
| 43215 |
module). Patch by Emanuel Barry. |
| 43216 |
|
| 43217 |
- bpo-27664: Add to concurrent.futures.thread.ThreadPoolExecutor() the |
| 43218 |
ability to specify a thread name prefix. |
| 43219 |
|
| 43220 |
- bpo-27181: Add geometric_mean and harmonic_mean to statistics module. |
| 43221 |
|
| 43222 |
- bpo-27573: code.interact now prints an message when exiting. |
| 43223 |
|
| 43224 |
- bpo-6422: Add autorange method to timeit.Timer objects. |
| 43225 |
|
| 43226 |
- bpo-27773: Correct some memory management errors server_hostname in |
| 43227 |
_ssl.wrap_socket(). |
| 43228 |
|
| 43229 |
- bpo-26750: unittest.mock.create_autospec() now works properly for |
| 43230 |
subclasses of property() and other data descriptors. Removes the never |
| 43231 |
publicly used, never documented unittest.mock.DescriptorTypes tuple. |
| 43232 |
|
| 43233 |
- bpo-26754: Undocumented support of general bytes-like objects as path in |
| 43234 |
compile() and similar functions is now deprecated. |
| 43235 |
|
| 43236 |
- bpo-26800: Undocumented support of general bytes-like objects as paths in |
| 43237 |
os functions is now deprecated. |
| 43238 |
|
| 43239 |
- bpo-26981: Add _order_ compatibility shim to enum.Enum for Python 2/3 code |
| 43240 |
bases. |
| 43241 |
|
| 43242 |
- bpo-27661: Added tzinfo keyword argument to datetime.combine. |
| 43243 |
|
| 43244 |
- In the curses module, raise an error if window.getstr() or window.instr() |
| 43245 |
is passed a negative value. |
| 43246 |
|
| 43247 |
- bpo-27783: Fix possible usage of uninitialized memory in |
| 43248 |
operator.methodcaller. |
| 43249 |
|
| 43250 |
- bpo-27774: Fix possible Py_DECREF on unowned object in _sre. |
| 43251 |
|
| 43252 |
- bpo-27760: Fix possible integer overflow in binascii.b2a_qp. |
| 43253 |
|
| 43254 |
- bpo-27758: Fix possible integer overflow in the _csv module for large |
| 43255 |
record lengths. |
| 43256 |
|
| 43257 |
- bpo-27568: Prevent HTTPoxy attack (:cve:`2016-1000110`). Ignore the |
| 43258 |
HTTP_PROXY variable when REQUEST_METHOD environment is set, which |
| 43259 |
indicates that the script is in CGI mode. |
| 43260 |
|
| 43261 |
- bpo-7063: Remove dead code from the "array" module's slice handling. Patch |
| 43262 |
by Chuck. |
| 43263 |
|
| 43264 |
- bpo-27656: Do not assume sched.h defines any SCHED_* constants. |
| 43265 |
|
| 43266 |
- bpo-27130: In the "zlib" module, fix handling of large buffers (typically |
| 43267 |
4 GiB) when compressing and decompressing. Previously, inputs were |
| 43268 |
limited to 4 GiB, and compression and decompression operations did not |
| 43269 |
properly handle results of 4 GiB. |
| 43270 |
|
| 43271 |
- bpo-24773: Implemented :pep:`495` (Local Time Disambiguation). |
| 43272 |
|
| 43273 |
- Expose the EPOLLEXCLUSIVE constant (when it is defined) in the select |
| 43274 |
module. |
| 43275 |
|
| 43276 |
- bpo-27567: Expose the EPOLLRDHUP and POLLRDHUP constants in the select |
| 43277 |
module. |
| 43278 |
|
| 43279 |
- bpo-1621: Avoid signed int negation overflow in the "audioop" module. |
| 43280 |
|
| 43281 |
- bpo-27533: Release GIL in nt._isdir |
| 43282 |
|
| 43283 |
- bpo-17711: Fixed unpickling by the persistent ID with protocol 0. Original |
| 43284 |
patch by Alexandre Vassalotti. |
| 43285 |
|
| 43286 |
- bpo-27522: Avoid an unintentional reference cycle in email.feedparser. |
| 43287 |
|
| 43288 |
- bpo-27512: Fix a segfault when os.fspath() called an __fspath__() method |
| 43289 |
that raised an exception. Patch by Xiang Zhang. |
| 43290 |
|
| 43291 |
IDLE |
| 43292 |
---- |
| 43293 |
|
| 43294 |
- bpo-27714: text_textview and test_autocomplete now pass when re-run in the |
| 43295 |
same process. This occurs when test_idle fails when run with the -w |
| 43296 |
option but without -jn. Fix warning from test_config. |
| 43297 |
|
| 43298 |
- bpo-27621: Put query response validation error messages in the query box |
| 43299 |
itself instead of in a separate messagebox. Redo tests to match. Add Mac |
| 43300 |
OSX refinements. Original patch by Mark Roseman. |
| 43301 |
|
| 43302 |
- bpo-27620: Escape key now closes Query box as cancelled. |
| 43303 |
|
| 43304 |
- bpo-27609: IDLE: tab after initial whitespace should tab, not |
| 43305 |
autocomplete. This fixes problem with writing docstrings at least twice |
| 43306 |
indented. |
| 43307 |
|
| 43308 |
- bpo-27609: Explicitly return None when there are also non-None returns. In |
| 43309 |
a few cases, reverse a condition and eliminate a return. |
| 43310 |
|
| 43311 |
- bpo-25507: IDLE no longer runs buggy code because of its tkinter imports. |
| 43312 |
Users must include the same imports required to run directly in Python. |
| 43313 |
|
| 43314 |
- bpo-27173: Add 'IDLE Modern Unix' to the built-in key sets. Make the |
| 43315 |
default key set depend on the platform. Add tests for the changes to the |
| 43316 |
config module. |
| 43317 |
|
| 43318 |
- bpo-27452: add line counter and crc to IDLE configHandler test dump. |
| 43319 |
|
| 43320 |
Tests |
| 43321 |
----- |
| 43322 |
|
| 43323 |
- bpo-25805: Skip a test in test_pkgutil as needed that doesn't work when |
| 43324 |
``__name__ == __main__``. Patch by SilentGhost. |
| 43325 |
|
| 43326 |
- bpo-27472: Add test.support.unix_shell as the path to the default shell. |
| 43327 |
|
| 43328 |
- bpo-27369: In test_pyexpat, avoid testing an error message detail that |
| 43329 |
changed in Expat 2.2.0. |
| 43330 |
|
| 43331 |
- bpo-27594: Prevent assertion error when running test_ast with coverage |
| 43332 |
enabled: ensure code object has a valid first line number. Patch suggested |
| 43333 |
by Ivan Levkivskyi. |
| 43334 |
|
| 43335 |
Windows |
| 43336 |
------- |
| 43337 |
|
| 43338 |
- bpo-27647: Update bundled Tcl/Tk to 8.6.6. |
| 43339 |
|
| 43340 |
- bpo-27610: Adds :pep:`514` metadata to Windows installer |
| 43341 |
|
| 43342 |
- bpo-27469: Adds a shell extension to the launcher so that drag and drop |
| 43343 |
works correctly. |
| 43344 |
|
| 43345 |
- bpo-27309: Enables proper Windows styles in python[w].exe manifest. |
| 43346 |
|
| 43347 |
Build |
| 43348 |
----- |
| 43349 |
|
| 43350 |
- bpo-27713: Suppress spurious build warnings when updating importlib's |
| 43351 |
bootstrap files. Patch by Xiang Zhang |
| 43352 |
|
| 43353 |
- bpo-25825: Correct the references to Modules/python.exp, which is required |
| 43354 |
on AIX. The references were accidentally changed in 3.5.0a1. |
| 43355 |
|
| 43356 |
- bpo-27453: CPP invocation in configure must use CPPFLAGS. Patch by Chi |
| 43357 |
Hsuan Yen. |
| 43358 |
|
| 43359 |
- bpo-27641: The configure script now inserts comments into the makefile to |
| 43360 |
prevent the pgen and _freeze_importlib executables from being |
| 43361 |
cross-compiled. |
| 43362 |
|
| 43363 |
- bpo-26662: Set PYTHON_FOR_GEN in configure as the Python program to be |
| 43364 |
used for file generation during the build. |
| 43365 |
|
| 43366 |
- bpo-10910: Avoid C++ compilation errors on FreeBSD and OS X. Also update |
| 43367 |
FreedBSD version checks for the original ctype UTF-8 workaround. |
| 43368 |
|
| 43369 |
|
| 43370 |
What's New in Python 3.6.0 alpha 3? |
| 43371 |
=================================== |
| 43372 |
|
| 43373 |
*Release date: 2016-07-11* |
| 43374 |
|
| 43375 |
Security |
| 43376 |
-------- |
| 43377 |
|
| 43378 |
- bpo-27278: Fix os.urandom() implementation using getrandom() on Linux. |
| 43379 |
Truncate size to INT_MAX and loop until we collected enough random bytes, |
| 43380 |
instead of casting a directly Py_ssize_t to int. |
| 43381 |
|
| 43382 |
- bpo-22636: Avoid shell injection problems with ctypes.util.find_library(). |
| 43383 |
|
| 43384 |
Core and Builtins |
| 43385 |
----------------- |
| 43386 |
|
| 43387 |
- bpo-27473: Fixed possible integer overflow in bytes and bytearray |
| 43388 |
concatenations. Patch by Xiang Zhang. |
| 43389 |
|
| 43390 |
- bpo-23034: The output of a special Python build with defined COUNT_ALLOCS, |
| 43391 |
SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by default. It |
| 43392 |
can be re-enabled using the "-X showalloccount" option. It now outputs to |
| 43393 |
stderr instead of stdout. |
| 43394 |
|
| 43395 |
- bpo-27443: __length_hint__() of bytearray iterators no longer return a |
| 43396 |
negative integer for a resized bytearray. |
| 43397 |
|
| 43398 |
- bpo-27007: The fromhex() class methods of bytes and bytearray subclasses |
| 43399 |
now return an instance of corresponding subclass. |
| 43400 |
|
| 43401 |
Library |
| 43402 |
------- |
| 43403 |
|
| 43404 |
- bpo-26844: Fix error message for imp.find_module() to refer to 'path' |
| 43405 |
instead of 'name'. Patch by Lev Maximov. |
| 43406 |
|
| 43407 |
- bpo-23804: Fix SSL zero-length recv() calls to not block and not raise an |
| 43408 |
error about unclean EOF. |
| 43409 |
|
| 43410 |
- bpo-27466: Change time format returned by http.cookie.time2netscape, |
| 43411 |
confirming the netscape cookie format and making it consistent with |
| 43412 |
documentation. |
| 43413 |
|
| 43414 |
- bpo-21708: Deprecated dbm.dumb behavior that differs from common dbm |
| 43415 |
behavior: creating a database in 'r' and 'w' modes and modifying a |
| 43416 |
database in 'r' mode. |
| 43417 |
|
| 43418 |
- bpo-26721: Change the socketserver.StreamRequestHandler.wfile attribute to |
| 43419 |
implement BufferedIOBase. In particular, the write() method no longer does |
| 43420 |
partial writes. |
| 43421 |
|
| 43422 |
- bpo-22115: Added methods trace_add, trace_remove and trace_info in the |
| 43423 |
tkinter.Variable class. They replace old methods trace_variable, trace, |
| 43424 |
trace_vdelete and trace_vinfo that use obsolete Tcl commands and might not |
| 43425 |
work in future versions of Tcl. Fixed old tracing methods: |
| 43426 |
trace_vdelete() with wrong mode no longer break tracing, trace_vinfo() now |
| 43427 |
always returns a list of pairs of strings, tracing in the "u" mode now |
| 43428 |
works. |
| 43429 |
|
| 43430 |
- bpo-26243: Only the level argument to zlib.compress() is keyword argument |
| 43431 |
now. The first argument is positional-only. |
| 43432 |
|
| 43433 |
- bpo-27038: Expose the DirEntry type as os.DirEntry. Code patch by Jelle |
| 43434 |
Zijlstra. |
| 43435 |
|
| 43436 |
- bpo-27186: Update os.fspath()/PyOS_FSPath() to check the return value of |
| 43437 |
__fspath__() to be either str or bytes. |
| 43438 |
|
| 43439 |
- bpo-18726: All optional parameters of the dump(), dumps(), load() and |
| 43440 |
loads() functions and JSONEncoder and JSONDecoder class constructors in |
| 43441 |
the json module are now keyword-only. |
| 43442 |
|
| 43443 |
- bpo-27319: Methods selection_set(), selection_add(), selection_remove() |
| 43444 |
and selection_toggle() of ttk.TreeView now allow passing multiple items as |
| 43445 |
multiple arguments instead of passing them as a tuple. Deprecated |
| 43446 |
undocumented ability of calling the selection() method with arguments. |
| 43447 |
|
| 43448 |
- bpo-27079: Fixed curses.ascii functions isblank(), iscntrl() and |
| 43449 |
ispunct(). |
| 43450 |
|
| 43451 |
- bpo-27294: Numerical state in the repr for Tkinter event objects is now |
| 43452 |
represented as a combination of known flags. |
| 43453 |
|
| 43454 |
- bpo-27177: Match objects in the re module now support index-like objects |
| 43455 |
as group indices. Based on patches by Jeroen Demeyer and Xiang Zhang. |
| 43456 |
|
| 43457 |
- bpo-26754: Some functions (compile() etc) accepted a filename argument |
| 43458 |
encoded as an iterable of integers. Now only strings and byte-like objects |
| 43459 |
are accepted. |
| 43460 |
|
| 43461 |
- bpo-26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by |
| 43462 |
Daniel Stokes. |
| 43463 |
|
| 43464 |
- bpo-27048: Prevents distutils failing on Windows when environment |
| 43465 |
variables contain non-ASCII characters |
| 43466 |
|
| 43467 |
- bpo-27330: Fixed possible leaks in the ctypes module. |
| 43468 |
|
| 43469 |
- bpo-27238: Got rid of bare excepts in the turtle module. Original patch |
| 43470 |
by Jelle Zijlstra. |
| 43471 |
|
| 43472 |
- bpo-27122: When an exception is raised within the context being managed by |
| 43473 |
a contextlib.ExitStack() and one of the exit stack generators catches and |
| 43474 |
raises it in a chain, do not re-raise the original exception when exiting, |
| 43475 |
let the new chained one through. This avoids the :pep:`479` bug described |
| 43476 |
in issue25782. |
| 43477 |
|
| 43478 |
- bpo-16864: sqlite3.Cursor.lastrowid now supports REPLACE statement. |
| 43479 |
Initial patch by Alex LordThorsen. |
| 43480 |
|
| 43481 |
- bpo-26386: Fixed ttk.TreeView selection operations with item id's |
| 43482 |
containing spaces. |
| 43483 |
|
| 43484 |
- bpo-8637: Honor a pager set by the env var MANPAGER (in preference to one |
| 43485 |
set by the env var PAGER). |
| 43486 |
|
| 43487 |
- bpo-16182: Fix various functions in the "readline" module to use the |
| 43488 |
locale encoding, and fix get_begidx() and get_endidx() to return code |
| 43489 |
point indexes. |
| 43490 |
|
| 43491 |
- bpo-27392: Add loop.connect_accepted_socket(). Patch by Jim Fulton. |
| 43492 |
|
| 43493 |
IDLE |
| 43494 |
---- |
| 43495 |
|
| 43496 |
- bpo-27477: IDLE search dialogs now use ttk widgets. |
| 43497 |
|
| 43498 |
- bpo-27173: Add 'IDLE Modern Unix' to the built-in key sets. Make the |
| 43499 |
default key set depend on the platform. Add tests for the changes to the |
| 43500 |
config module. |
| 43501 |
|
| 43502 |
- bpo-27452: make command line "idle-test> python test_help.py" work. |
| 43503 |
__file__ is relative when python is started in the file's directory. |
| 43504 |
|
| 43505 |
- bpo-27452: add line counter and crc to IDLE configHandler test dump. |
| 43506 |
|
| 43507 |
- bpo-27380: IDLE: add query.py with base Query dialog and ttk widgets. |
| 43508 |
Module had subclasses SectionName, ModuleName, and HelpSource, which are |
| 43509 |
used to get information from users by configdialog and file =>Load Module. |
| 43510 |
Each subclass has itw own validity checks. Using ModuleName allows users |
| 43511 |
to edit bad module names instead of starting over. Add tests and delete |
| 43512 |
the two files combined into the new one. |
| 43513 |
|
| 43514 |
- bpo-27372: Test_idle no longer changes the locale. |
| 43515 |
|
| 43516 |
- bpo-27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names. |
| 43517 |
|
| 43518 |
- bpo-27245: IDLE: Cleanly delete custom themes and key bindings. |
| 43519 |
Previously, when IDLE was started from a console or by import, a cascade |
| 43520 |
of warnings was emitted. Patch by Serhiy Storchaka. |
| 43521 |
|
| 43522 |
- bpo-24137: Run IDLE, test_idle, and htest with tkinter default root |
| 43523 |
disabled. Fix code and tests that fail with this restriction. Fix htests |
| 43524 |
to not create a second and redundant root and mainloop. |
| 43525 |
|
| 43526 |
- bpo-27310: Fix IDLE.app failure to launch on OS X due to vestigial import. |
| 43527 |
|
| 43528 |
C API |
| 43529 |
----- |
| 43530 |
|
| 43531 |
- bpo-26754: PyUnicode_FSDecoder() accepted a filename argument encoded as |
| 43532 |
an iterable of integers. Now only strings and byte-like objects are |
| 43533 |
accepted. |
| 43534 |
|
| 43535 |
Build |
| 43536 |
----- |
| 43537 |
|
| 43538 |
- bpo-28066: Fix the logic that searches build directories for generated |
| 43539 |
include files when building outside the source tree. |
| 43540 |
|
| 43541 |
- bpo-27442: Expose the Android API level that python was built against, in |
| 43542 |
sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'. |
| 43543 |
|
| 43544 |
- bpo-27434: The interpreter that runs the cross-build, found in PATH, must |
| 43545 |
now be of the same feature version (e.g. 3.6) as the source being built. |
| 43546 |
|
| 43547 |
- bpo-26930: Update Windows builds to use OpenSSL 1.0.2h. |
| 43548 |
|
| 43549 |
- bpo-23968: Rename the platform directory from plat-$(MACHDEP) to |
| 43550 |
plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from |
| 43551 |
config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install |
| 43552 |
the platform specific _sysconfigdata module into the platform directory |
| 43553 |
and rename it to include the ABIFLAGS. |
| 43554 |
|
| 43555 |
- Don't use largefile support for GNU/Hurd. |
| 43556 |
|
| 43557 |
Tools/Demos |
| 43558 |
----------- |
| 43559 |
|
| 43560 |
- bpo-27332: Fixed the type of the first argument of module-level functions |
| 43561 |
generated by Argument Clinic. Patch by Petr Viktorin. |
| 43562 |
|
| 43563 |
- bpo-27418: Fixed Tools/importbench/importbench.py. |
| 43564 |
|
| 43565 |
Documentation |
| 43566 |
------------- |
| 43567 |
|
| 43568 |
- bpo-19489: Moved the search box from the sidebar to the header and footer |
| 43569 |
of each page. Patch by Ammar Askar. |
| 43570 |
|
| 43571 |
- bpo-27285: Update documentation to reflect the deprecation of ``pyvenv`` |
| 43572 |
and normalize on the term "virtual environment". Patch by Steve Piercy. |
| 43573 |
|
| 43574 |
Tests |
| 43575 |
----- |
| 43576 |
|
| 43577 |
- bpo-27027: Added test.support.is_android that is True when this is an |
| 43578 |
Android build. |
| 43579 |
|
| 43580 |
|
| 43581 |
What's New in Python 3.6.0 alpha 2? |
| 43582 |
=================================== |
| 43583 |
|
| 43584 |
*Release date: 2016-06-13* |
| 43585 |
|
| 43586 |
Security |
| 43587 |
-------- |
| 43588 |
|
| 43589 |
- bpo-26556: Update expat to 2.1.1, fixes :cve:`2015-1283`. |
| 43590 |
|
| 43591 |
- Fix TLS stripping vulnerability in smtplib, :cve:`2016-0772`. Reported by |
| 43592 |
Team Oststrom. |
| 43593 |
|
| 43594 |
- bpo-26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with |
| 43595 |
``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom |
| 43596 |
entropy pool is not initialized yet. Patch written by Colm Buckley. |
| 43597 |
|
| 43598 |
Core and Builtins |
| 43599 |
----------------- |
| 43600 |
|
| 43601 |
- bpo-27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. |
| 43602 |
Patch by Demur Rumed. |
| 43603 |
|
| 43604 |
- bpo-27190: Raise NotSupportedError if sqlite3 is older than 3.3.1. Patch |
| 43605 |
by Dave Sawyer. |
| 43606 |
|
| 43607 |
- bpo-27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling |
| 43608 |
function with generalized unpacking (PEP 448) and conflicting keyword |
| 43609 |
names could cause undefined behavior. |
| 43610 |
|
| 43611 |
- bpo-27140: Added BUILD_CONST_KEY_MAP opcode. |
| 43612 |
|
| 43613 |
- bpo-27186: Add support for os.PathLike objects to open() (part of |
| 43614 |
:pep:`519`). |
| 43615 |
|
| 43616 |
- bpo-27066: Fixed SystemError if a custom opener (for open()) returns a |
| 43617 |
negative number without setting an exception. |
| 43618 |
|
| 43619 |
- bpo-26983: float() now always return an instance of exact float. The |
| 43620 |
deprecation warning is emitted if __float__ returns an instance of a |
| 43621 |
strict subclass of float. In a future versions of Python this can be an |
| 43622 |
error. |
| 43623 |
|
| 43624 |
- bpo-27097: Python interpreter is now about 7% faster due to optimized |
| 43625 |
instruction decoding. Based on patch by Demur Rumed. |
| 43626 |
|
| 43627 |
- bpo-26647: Python interpreter now uses 16-bit wordcode instead of |
| 43628 |
bytecode. Patch by Demur Rumed. |
| 43629 |
|
| 43630 |
- bpo-23275: Allow assigning to an empty target list in round brackets: () = |
| 43631 |
iterable. |
| 43632 |
|
| 43633 |
- bpo-27243: Update the __aiter__ protocol: instead of returning an |
| 43634 |
awaitable that resolves to an asynchronous iterator, the asynchronous |
| 43635 |
iterator should be returned directly. Doing the former will trigger a |
| 43636 |
PendingDeprecationWarning. |
| 43637 |
|
| 43638 |
Library |
| 43639 |
------- |
| 43640 |
|
| 43641 |
- Comment out socket (SO_REUSEPORT) and posix (O_SHLOCK, O_EXLOCK) constants |
| 43642 |
exposed on the API which are not implemented on GNU/Hurd. They would not |
| 43643 |
work at runtime anyway. |
| 43644 |
|
| 43645 |
- bpo-27025: Generated names for Tkinter widgets are now more meaningful and |
| 43646 |
recognizable. |
| 43647 |
|
| 43648 |
- bpo-25455: Fixed crashes in repr of recursive ElementTree.Element and |
| 43649 |
functools.partial objects. |
| 43650 |
|
| 43651 |
- bpo-27294: Improved repr for Tkinter event objects. |
| 43652 |
|
| 43653 |
- bpo-20508: Improve exception message of IPv{4,6}Network.__getitem__. Patch |
| 43654 |
by Gareth Rees. |
| 43655 |
|
| 43656 |
- bpo-21386: Implement missing IPv4Address.is_global property. It was |
| 43657 |
documented since 07a5610bae9d. Initial patch by Roger Luethi. |
| 43658 |
|
| 43659 |
- bpo-27029: Removed deprecated support of universal newlines mode from |
| 43660 |
ZipFile.open(). |
| 43661 |
|
| 43662 |
- bpo-27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in |
| 43663 |
regular expressions now are errors. The re.LOCALE flag now can be used |
| 43664 |
only with bytes patterns. |
| 43665 |
|
| 43666 |
- bpo-27186: Add os.PathLike support to DirEntry (part of :pep:`519`). |
| 43667 |
Initial patch by Jelle Zijlstra. |
| 43668 |
|
| 43669 |
- bpo-20900: distutils register command now decodes HTTP responses |
| 43670 |
correctly. Initial patch by ingrid. |
| 43671 |
|
| 43672 |
- bpo-27186: Add os.PathLike support to pathlib, removing its provisional |
| 43673 |
status (part of PEP 519). Initial patch by Dusty Phillips. |
| 43674 |
|
| 43675 |
- bpo-27186: Add support for os.PathLike objects to os.fsencode() and |
| 43676 |
os.fsdecode() (part of :pep:`519`). |
| 43677 |
|
| 43678 |
- bpo-27186: Introduce os.PathLike and os.fspath() (part of :pep:`519`). |
| 43679 |
|
| 43680 |
- A new version of typing.py provides several new classes and features: |
| 43681 |
@overload outside stubs, Reversible, DefaultDict, Text, ContextManager, |
| 43682 |
Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some |
| 43683 |
of the new features are not yet implemented in mypy or other static |
| 43684 |
analyzers). Also classes for :pep:`492` (Awaitable, AsyncIterable, |
| 43685 |
AsyncIterator) have been added (in fact they made it into 3.5.1 but were |
| 43686 |
never mentioned). |
| 43687 |
|
| 43688 |
- bpo-25738: Stop http.server.BaseHTTPRequestHandler.send_error() from |
| 43689 |
sending a message body for 205 Reset Content. Also, don't send Content |
| 43690 |
header fields in responses that don't have a body. Patch by Susumu |
| 43691 |
Koshiba. |
| 43692 |
|
| 43693 |
- bpo-21313: Fix the "platform" module to tolerate when sys.version contains |
| 43694 |
truncated build information. |
| 43695 |
|
| 43696 |
- bpo-23883: Added missing APIs to __all__ to match the documented APIs for |
| 43697 |
the following modules: cgi, mailbox, mimetypes, plistlib and smtpd. |
| 43698 |
Patches by Jacek Kołodziej. |
| 43699 |
|
| 43700 |
- bpo-27164: In the zlib module, allow decompressing raw Deflate streams |
| 43701 |
with a predefined zdict. Based on patch by Xiang Zhang. |
| 43702 |
|
| 43703 |
- bpo-24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely |
| 43704 |
write data to the client. Previously it could do partial writes and |
| 43705 |
truncate data. Also, wsgiref.handler.ServerHandler can now handle stdout |
| 43706 |
doing partial writes, but this is deprecated. |
| 43707 |
|
| 43708 |
- bpo-21272: Use _sysconfigdata.py to initialize distutils.sysconfig. |
| 43709 |
|
| 43710 |
- bpo-19611: :mod:`inspect` now reports the implicit ``.0`` parameters |
| 43711 |
generated by the compiler for comprehension and generator expression |
| 43712 |
scopes as if they were positional-only parameters called ``implicit0``. |
| 43713 |
Patch by Jelle Zijlstra. |
| 43714 |
|
| 43715 |
- bpo-26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry. |
| 43716 |
|
| 43717 |
- bpo-26373: subprocess.Popen.communicate now correctly ignores |
| 43718 |
BrokenPipeError when the child process dies before .communicate() is |
| 43719 |
called in more/all circumstances. |
| 43720 |
|
| 43721 |
- signal, socket, and ssl module IntEnum constant name lookups now return a |
| 43722 |
consistent name for values having multiple names. Ex: signal.Signals(6) |
| 43723 |
now refers to itself as signal.SIGALRM rather than flipping between that |
| 43724 |
and signal.SIGIOT based on the interpreter's hash randomization seed. |
| 43725 |
|
| 43726 |
- bpo-27167: Clarify the subprocess.CalledProcessError error message text |
| 43727 |
when the child process died due to a signal. |
| 43728 |
|
| 43729 |
- bpo-25931: Don't define socketserver.Forking* names on platforms such as |
| 43730 |
Windows that do not support os.fork(). |
| 43731 |
|
| 43732 |
- bpo-21776: distutils.upload now correctly handles HTTPError. Initial patch |
| 43733 |
by Claudiu Popa. |
| 43734 |
|
| 43735 |
- bpo-26526: Replace custom parse tree validation in the parser module with |
| 43736 |
a simple DFA validator. |
| 43737 |
|
| 43738 |
- bpo-27114: Fix SSLContext._load_windows_store_certs fails with |
| 43739 |
PermissionError |
| 43740 |
|
| 43741 |
- bpo-18383: Avoid creating duplicate filters when using filterwarnings and |
| 43742 |
simplefilter. Based on patch by Alex Shkop. |
| 43743 |
|
| 43744 |
- bpo-23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. |
| 43745 |
|
| 43746 |
- bpo-26741: subprocess.Popen destructor now emits a ResourceWarning warning |
| 43747 |
if the child process is still running. |
| 43748 |
|
| 43749 |
- bpo-27056: Optimize pickle.load() and pickle.loads(), up to 10% faster to |
| 43750 |
deserialize a lot of small objects. |
| 43751 |
|
| 43752 |
- bpo-21271: New keyword only parameters in reset_mock call. |
| 43753 |
|
| 43754 |
IDLE |
| 43755 |
---- |
| 43756 |
|
| 43757 |
- bpo-5124: Paste with text selected now replaces the selection on X11. This |
| 43758 |
matches how paste works on Windows, Mac, most modern Linux apps, and ttk |
| 43759 |
widgets. Original patch by Serhiy Storchaka. |
| 43760 |
|
| 43761 |
- bpo-24750: Switch all scrollbars in IDLE to ttk versions. Where needed, |
| 43762 |
minimal tests are added to cover changes. |
| 43763 |
|
| 43764 |
- bpo-24759: IDLE requires tk 8.5 and availability ttk widgets. Delete now |
| 43765 |
unneeded tk version tests and code for older versions. Add test for IDLE |
| 43766 |
syntax colorizer. |
| 43767 |
|
| 43768 |
- bpo-27239: idlelib.macosx.isXyzTk functions initialize as needed. |
| 43769 |
|
| 43770 |
- bpo-27262: move Aqua unbinding code, which enable context menus, to |
| 43771 |
macosx. |
| 43772 |
|
| 43773 |
- bpo-24759: Make clear in idlelib.idle_test.__init__ that the directory is |
| 43774 |
a private implementation of test.test_idle and tool for maintainers. |
| 43775 |
|
| 43776 |
- bpo-27196: Stop 'ThemeChanged' warnings when running IDLE tests. These |
| 43777 |
persisted after other warnings were suppressed in #20567. Apply Serhiy |
| 43778 |
Storchaka's update_idletasks solution to four test files. Record this |
| 43779 |
additional advice in idle_test/README.txt |
| 43780 |
|
| 43781 |
- bpo-20567: Revise idle_test/README.txt with advice about avoiding tk |
| 43782 |
warning messages from tests. Apply advice to several IDLE tests. |
| 43783 |
|
| 43784 |
- bpo-24225: Update idlelib/README.txt with new file names and event |
| 43785 |
handlers. |
| 43786 |
|
| 43787 |
- bpo-27156: Remove obsolete code not used by IDLE. |
| 43788 |
|
| 43789 |
- bpo-27117: Make colorizer htest and turtledemo work with dark themes. Move |
| 43790 |
code for configuring text widget colors to a new function. |
| 43791 |
|
| 43792 |
- bpo-24225: Rename many ``idlelib/*.py`` and ``idle_test/test_*.py`` files. |
| 43793 |
Edit files to replace old names with new names when the old name referred |
| 43794 |
to the module rather than the class it contained. See the issue and IDLE |
| 43795 |
section in What's New in 3.6 for more. |
| 43796 |
|
| 43797 |
- bpo-26673: When tk reports font size as 0, change to size 10. Such fonts |
| 43798 |
on Linux prevented the configuration dialog from opening. |
| 43799 |
|
| 43800 |
- bpo-21939: Add test for IDLE's percolator. Original patch by Saimadhav |
| 43801 |
Heblikar. |
| 43802 |
|
| 43803 |
- bpo-21676: Add test for IDLE's replace dialog. Original patch by Saimadhav |
| 43804 |
Heblikar. |
| 43805 |
|
| 43806 |
- bpo-18410: Add test for IDLE's search dialog. Original patch by Westley |
| 43807 |
Martínez. |
| 43808 |
|
| 43809 |
- bpo-21703: Add test for undo delegator. Patch mostly by Saimadhav |
| 43810 |
Heblikar . |
| 43811 |
|
| 43812 |
- bpo-27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks. |
| 43813 |
|
| 43814 |
- bpo-23977: Add more asserts to test_delegator. |
| 43815 |
|
| 43816 |
Documentation |
| 43817 |
------------- |
| 43818 |
|
| 43819 |
- bpo-16484: Change the default PYTHONDOCS URL to "https:", and fix the |
| 43820 |
resulting links to use lowercase. Patch by Sean Rodman, test by Kaushik |
| 43821 |
Nadikuditi. |
| 43822 |
|
| 43823 |
- bpo-24136: Document the new :pep:`448` unpacking syntax of 3.5. |
| 43824 |
|
| 43825 |
- bpo-22558: Add remaining doc links to source code for Python-coded |
| 43826 |
modules. Patch by Yoni Lavi. |
| 43827 |
|
| 43828 |
Tests |
| 43829 |
----- |
| 43830 |
|
| 43831 |
- bpo-25285: regrtest now uses subprocesses when the -j1 command line option |
| 43832 |
is used: each test file runs in a fresh child process. Before, the -j1 |
| 43833 |
option was ignored. |
| 43834 |
|
| 43835 |
- bpo-25285: Tools/buildbot/test.bat script now uses -j1 by default to run |
| 43836 |
each test file in fresh child process. |
| 43837 |
|
| 43838 |
Windows |
| 43839 |
------- |
| 43840 |
|
| 43841 |
- bpo-27064: The py.exe launcher now defaults to Python 3. The Windows |
| 43842 |
launcher ``py.exe`` no longer prefers an installed Python 2 version over |
| 43843 |
Python 3 by default when used interactively. |
| 43844 |
|
| 43845 |
- bpo-17500: Remove unused and outdated icons. (See also: |
| 43846 |
https://github.com/python/pythondotorg/issues/945) |
| 43847 |
|
| 43848 |
Build |
| 43849 |
----- |
| 43850 |
|
| 43851 |
- bpo-27229: Fix the cross-compiling pgen rule for in-tree builds. Patch by |
| 43852 |
Xavier de Gaye. |
| 43853 |
|
| 43854 |
- bpo-26930: Update OS X 10.5+ 32-bit-only installer to build and link with |
| 43855 |
OpenSSL 1.0.2h. |
| 43856 |
|
| 43857 |
C API |
| 43858 |
----- |
| 43859 |
|
| 43860 |
- bpo-27186: Add the PyOS_FSPath() function (part of :pep:`519`). |
| 43861 |
|
| 43862 |
- bpo-26282: PyArg_ParseTupleAndKeywords() now supports positional-only |
| 43863 |
parameters. |
| 43864 |
|
| 43865 |
Tools/Demos |
| 43866 |
----------- |
| 43867 |
|
| 43868 |
- bpo-26282: Argument Clinic now supports positional-only and keyword |
| 43869 |
parameters in the same function. |
| 43870 |
|
| 43871 |
|
| 43872 |
What's New in Python 3.6.0 alpha 1? |
| 43873 |
=================================== |
| 43874 |
|
| 43875 |
*Release date: 2016-05-16* |
| 43876 |
|
| 43877 |
Security |
| 43878 |
-------- |
| 43879 |
|
| 43880 |
- bpo-26657: Fix directory traversal vulnerability with http.server on |
| 43881 |
Windows. This fixes a regression that was introduced in 3.3.4rc1 and |
| 43882 |
3.4.0rc1. Based on patch by Philipp Hagemeister. |
| 43883 |
|
| 43884 |
- bpo-26313: ssl.py _load_windows_store_certs fails if windows cert store is |
| 43885 |
empty. Patch by Baji. |
| 43886 |
|
| 43887 |
- bpo-25939: On Windows open the cert store readonly in |
| 43888 |
ssl.enum_certificates. |
| 43889 |
|
| 43890 |
Core and Builtins |
| 43891 |
----------------- |
| 43892 |
|
| 43893 |
- bpo-20041: Fixed TypeError when frame.f_trace is set to None. Patch by |
| 43894 |
Xavier de Gaye. |
| 43895 |
|
| 43896 |
- bpo-26168: Fixed possible refleaks in failing Py_BuildValue() with the "N" |
| 43897 |
format unit. |
| 43898 |
|
| 43899 |
- bpo-26991: Fix possible refleak when creating a function with annotations. |
| 43900 |
|
| 43901 |
- bpo-27039: Fixed bytearray.remove() for values greater than 127. Based on |
| 43902 |
patch by Joe Jevnik. |
| 43903 |
|
| 43904 |
- bpo-23640: int.from_bytes() no longer bypasses constructors for |
| 43905 |
subclasses. |
| 43906 |
|
| 43907 |
- bpo-27005: Optimized the float.fromhex() class method for exact float. It |
| 43908 |
is now 2 times faster. |
| 43909 |
|
| 43910 |
- bpo-18531: Single var-keyword argument of dict subtype was passed |
| 43911 |
unscathed to the C-defined function. Now it is converted to exact dict. |
| 43912 |
|
| 43913 |
- bpo-26811: gc.get_objects() no longer contains a broken tuple with NULL |
| 43914 |
pointer. |
| 43915 |
|
| 43916 |
- bpo-20120: Use RawConfigParser for .pypirc parsing, removing support for |
| 43917 |
interpolation unintentionally added with move to Python 3. Behavior no |
| 43918 |
longer does any interpolation in .pypirc files, matching behavior in |
| 43919 |
Python 2.7 and Setuptools 19.0. |
| 43920 |
|
| 43921 |
- bpo-26249: Memory functions of the :c:func:`PyMem_Malloc` domain |
| 43922 |
(:c:macro:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc allocator |
| 43923 |
<pymalloc>` rather than system :c:func:`malloc`. Applications calling |
| 43924 |
:c:func:`PyMem_Malloc` without holding the GIL can now crash: use |
| 43925 |
``PYTHONMALLOC=debug`` environment variable to validate the usage of |
| 43926 |
memory allocators in your application. |
| 43927 |
|
| 43928 |
- bpo-26802: Optimize function calls only using unpacking like |
| 43929 |
``func(*tuple)`` (no other positional argument, no keyword): avoid copying |
| 43930 |
the tuple. Patch written by Joe Jevnik. |
| 43931 |
|
| 43932 |
- bpo-26659: Make the builtin slice type support cycle collection. |
| 43933 |
|
| 43934 |
- bpo-26718: super.__init__ no longer leaks memory if called multiple times. |
| 43935 |
NOTE: A direct call of super.__init__ is not endorsed! |
| 43936 |
|
| 43937 |
- bpo-27138: Fix the doc comment for FileFinder.find_spec(). |
| 43938 |
|
| 43939 |
- bpo-27147: Mention :pep:`420` in the importlib docs. |
| 43940 |
|
| 43941 |
- bpo-25339: PYTHONIOENCODING now has priority over locale in setting the |
| 43942 |
error handler for stdin and stdout. |
| 43943 |
|
| 43944 |
- bpo-26494: Fixed crash on iterating exhausting iterators. Affected classes |
| 43945 |
are generic sequence iterators, iterators of str, bytes, bytearray, list, |
| 43946 |
tuple, set, frozenset, dict, OrderedDict, corresponding views and |
| 43947 |
os.scandir() iterator. |
| 43948 |
|
| 43949 |
- bpo-26574: Optimize ``bytes.replace(b'', b'.')`` and |
| 43950 |
``bytearray.replace(b'', b'.')``. Patch written by Josh Snider. |
| 43951 |
|
| 43952 |
- bpo-26581: If coding cookie is specified multiple times on a line in |
| 43953 |
Python source code file, only the first one is taken to account. |
| 43954 |
|
| 43955 |
- bpo-19711: Add tests for reloading namespace packages. |
| 43956 |
|
| 43957 |
- bpo-21099: Switch applicable importlib tests to use :pep:`451` API. |
| 43958 |
|
| 43959 |
- bpo-26563: Debug hooks on Python memory allocators now raise a fatal error |
| 43960 |
if functions of the :c:func:`PyMem_Malloc` family are called without |
| 43961 |
holding the GIL. |
| 43962 |
|
| 43963 |
- bpo-26564: On error, the debug hooks on Python memory allocators now use |
| 43964 |
the :mod:`tracemalloc` module to get the traceback where a memory block |
| 43965 |
was allocated. |
| 43966 |
|
| 43967 |
- bpo-26558: The debug hooks on Python memory allocator |
| 43968 |
:c:func:`PyObject_Malloc` now detect when functions are called without |
| 43969 |
holding the GIL. |
| 43970 |
|
| 43971 |
- bpo-26516: Add :envvar:`PYTHONMALLOC` environment variable to set the |
| 43972 |
Python memory allocators and/or install debug hooks. |
| 43973 |
|
| 43974 |
- bpo-26516: The :c:func:`PyMem_SetupDebugHooks` function can now also be |
| 43975 |
used on Python compiled in release mode. |
| 43976 |
|
| 43977 |
- bpo-26516: The :envvar:`PYTHONMALLOCSTATS` environment variable can now |
| 43978 |
also be used on Python compiled in release mode. It now has no effect if |
| 43979 |
set to an empty string. |
| 43980 |
|
| 43981 |
- bpo-26516: In debug mode, debug hooks are now also installed on Python |
| 43982 |
memory allocators when Python is configured without pymalloc. |
| 43983 |
|
| 43984 |
- bpo-26464: Fix str.translate() when string is ASCII and first replacements |
| 43985 |
removes character, but next replacement uses a non-ASCII character or a |
| 43986 |
string longer than 1 character. Regression introduced in Python 3.5.0. |
| 43987 |
|
| 43988 |
- bpo-22836: Ensure exception reports from PyErr_Display() and |
| 43989 |
PyErr_WriteUnraisable() are sensible even when formatting them produces |
| 43990 |
secondary errors. This affects the reports produced by |
| 43991 |
sys.__excepthook__() and when __del__() raises an exception. |
| 43992 |
|
| 43993 |
- bpo-26302: Correct behavior to reject comma as a legal character for |
| 43994 |
cookie names. |
| 43995 |
|
| 43996 |
- bpo-26136: Upgrade the warning when a generator raises StopIteration from |
| 43997 |
PendingDeprecationWarning to DeprecationWarning. Patch by Anish Shah. |
| 43998 |
|
| 43999 |
- bpo-26204: The compiler now ignores all constant statements: bytes, str, |
| 44000 |
int, float, complex, name constants (None, False, True), Ellipsis and |
| 44001 |
ast.Constant; not only str and int. For example, ``1.0`` is now ignored in |
| 44002 |
``def f(): 1.0``. |
| 44003 |
|
| 44004 |
- bpo-4806: Avoid masking the original TypeError exception when using star |
| 44005 |
(``*``) unpacking in function calls. Based on patch by Hagen Fürstenau |
| 44006 |
and Daniel Urban. |
| 44007 |
|
| 44008 |
- bpo-26146: Add a new kind of AST node: ``ast.Constant``. It can be used by |
| 44009 |
external AST optimizers, but the compiler does not emit directly such |
| 44010 |
node. |
| 44011 |
|
| 44012 |
- bpo-23601: Sped-up allocation of dict key objects by using Python's small |
| 44013 |
object allocator. (Contributed by Julian Taylor.) |
| 44014 |
|
| 44015 |
- bpo-18018: Import raises ImportError instead of SystemError if a relative |
| 44016 |
import is attempted without a known parent package. |
| 44017 |
|
| 44018 |
- bpo-25843: When compiling code, don't merge constants if they are equal |
| 44019 |
but have a different types. For example, ``f1, f2 = lambda: 1, lambda: |
| 44020 |
1.0`` is now correctly compiled to two different functions: ``f1()`` |
| 44021 |
returns ``1`` (``int``) and ``f2()`` returns ``1.0`` (``float``), even if |
| 44022 |
``1`` and ``1.0`` are equal. |
| 44023 |
|
| 44024 |
- bpo-26107: The format of the ``co_lnotab`` attribute of code objects |
| 44025 |
changes to support negative line number delta. |
| 44026 |
|
| 44027 |
- bpo-26154: Add a new private _PyThreadState_UncheckedGet() function to get |
| 44028 |
the current Python thread state, but don't issue a fatal error if it is |
| 44029 |
NULL. This new function must be used instead of accessing directly the |
| 44030 |
_PyThreadState_Current variable. The variable is no more exposed since |
| 44031 |
Python 3.5.1 to hide the exact implementation of atomic C types, to avoid |
| 44032 |
compiler issues. |
| 44033 |
|
| 44034 |
- bpo-25791: If __package__ != __spec__.parent or if neither __package__ or |
| 44035 |
__spec__ are defined then ImportWarning is raised. |
| 44036 |
|
| 44037 |
- bpo-22995: [UPDATE] Comment out the one of the pickleability tests in |
| 44038 |
_PyObject_GetState() due to regressions observed in Cython-based projects. |
| 44039 |
|
| 44040 |
- bpo-25961: Disallowed null characters in the type name. |
| 44041 |
|
| 44042 |
- bpo-25973: Fix segfault when an invalid nonlocal statement binds a name |
| 44043 |
starting with two underscores. |
| 44044 |
|
| 44045 |
- bpo-22995: Instances of extension types with a state that aren't |
| 44046 |
subclasses of list or dict and haven't implemented any pickle-related |
| 44047 |
methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or |
| 44048 |
__getstate__), can no longer be pickled. Including memoryview. |
| 44049 |
|
| 44050 |
- bpo-20440: Massive replacing unsafe attribute setting code with special |
| 44051 |
macro Py_SETREF. |
| 44052 |
|
| 44053 |
- bpo-25766: Special method __bytes__() now works in str subclasses. |
| 44054 |
|
| 44055 |
- bpo-25421: __sizeof__ methods of builtin types now use dynamic basic size. |
| 44056 |
This allows sys.getsize() to work correctly with their subclasses with |
| 44057 |
__slots__ defined. |
| 44058 |
|
| 44059 |
- bpo-25709: Fixed problem with in-place string concatenation and utf-8 |
| 44060 |
cache. |
| 44061 |
|
| 44062 |
- bpo-5319: New Py_FinalizeEx() API allowing Python to set an exit status of |
| 44063 |
120 on failure to flush buffered streams. |
| 44064 |
|
| 44065 |
- bpo-25485: telnetlib.Telnet is now a context manager. |
| 44066 |
|
| 44067 |
- bpo-24097: Fixed crash in object.__reduce__() if slot name is freed inside |
| 44068 |
__getattr__. |
| 44069 |
|
| 44070 |
- bpo-24731: Fixed crash on converting objects with special methods |
| 44071 |
__bytes__, __trunc__, and __float__ returning instances of subclasses of |
| 44072 |
bytes, int, and float to subclasses of bytes, int, and float |
| 44073 |
correspondingly. |
| 44074 |
|
| 44075 |
- bpo-25630: Fix a possible segfault during argument parsing in functions |
| 44076 |
that accept filesystem paths. |
| 44077 |
|
| 44078 |
- bpo-23564: Fixed a partially broken sanity check in the _posixsubprocess |
| 44079 |
internals regarding how fds_to_pass were passed to the child. The bug had |
| 44080 |
no actual impact as subprocess.py already avoided it. |
| 44081 |
|
| 44082 |
- bpo-25388: Fixed tokenizer crash when processing undecodable source code |
| 44083 |
with a null byte. |
| 44084 |
|
| 44085 |
- bpo-25462: The hash of the key now is calculated only once in most |
| 44086 |
operations in C implementation of OrderedDict. |
| 44087 |
|
| 44088 |
- bpo-22995: Default implementation of __reduce__ and __reduce_ex__ now |
| 44089 |
rejects builtin types with not defined __new__. |
| 44090 |
|
| 44091 |
- bpo-24802: Avoid buffer overreads when int(), float(), compile(), exec() |
| 44092 |
and eval() are passed bytes-like objects. These objects are not |
| 44093 |
necessarily terminated by a null byte, but the functions assumed they |
| 44094 |
were. |
| 44095 |
|
| 44096 |
- bpo-25555: Fix parser and AST: fill lineno and col_offset of "arg" node |
| 44097 |
when compiling AST from Python objects. |
| 44098 |
|
| 44099 |
- bpo-24726: Fixed a crash and leaking NULL in repr() of OrderedDict that |
| 44100 |
was mutated by direct calls of dict methods. |
| 44101 |
|
| 44102 |
- bpo-25449: Iterating OrderedDict with keys with unstable hash now raises |
| 44103 |
KeyError in C implementations as well as in Python implementation. |
| 44104 |
|
| 44105 |
- bpo-25395: Fixed crash when highly nested OrderedDict structures were |
| 44106 |
garbage collected. |
| 44107 |
|
| 44108 |
- bpo-25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now |
| 44109 |
between 2x and 3.5x faster. |
| 44110 |
|
| 44111 |
- bpo-25399: Optimize bytearray % args using the new private _PyBytesWriter |
| 44112 |
API. Formatting is now between 2.5 and 5 times faster. |
| 44113 |
|
| 44114 |
- bpo-25274: sys.setrecursionlimit() now raises a RecursionError if the new |
| 44115 |
recursion limit is too low depending at the current recursion depth. |
| 44116 |
Modify also the "lower-water mark" formula to make it monotonic. This mark |
| 44117 |
is used to decide when the overflowed flag of the thread state is reset. |
| 44118 |
|
| 44119 |
- bpo-24402: Fix input() to prompt to the redirected stdout when |
| 44120 |
sys.stdout.fileno() fails. |
| 44121 |
|
| 44122 |
- bpo-25349: Optimize bytes % args using the new private _PyBytesWriter API. |
| 44123 |
Formatting is now up to 2 times faster. |
| 44124 |
|
| 44125 |
- bpo-24806: Prevent builtin types that are not allowed to be subclassed |
| 44126 |
from being subclassed through multiple inheritance. |
| 44127 |
|
| 44128 |
- bpo-25301: The UTF-8 decoder is now up to 15 times as fast for error |
| 44129 |
handlers: ``ignore``, ``replace`` and ``surrogateescape``. |
| 44130 |
|
| 44131 |
- bpo-24848: Fixed a number of bugs in UTF-7 decoding of misformed data. |
| 44132 |
|
| 44133 |
- bpo-25267: The UTF-8 encoder is now up to 75 times as fast for error |
| 44134 |
handlers: ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``. |
| 44135 |
Patch co-written with Serhiy Storchaka. |
| 44136 |
|
| 44137 |
- bpo-25280: Import trace messages emitted in verbose (-v) mode are no |
| 44138 |
longer formatted twice. |
| 44139 |
|
| 44140 |
- bpo-25227: Optimize ASCII and latin1 encoders with the ``surrogateescape`` |
| 44141 |
error handler: the encoders are now up to 3 times as fast. Initial patch |
| 44142 |
written by Serhiy Storchaka. |
| 44143 |
|
| 44144 |
- bpo-25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() |
| 44145 |
function instead of the getentropy() function. The getentropy() function |
| 44146 |
is blocking to generate very good quality entropy, os.urandom() doesn't |
| 44147 |
need such high-quality entropy. |
| 44148 |
|
| 44149 |
- bpo-9232: Modify Python's grammar to allow trailing commas in the argument |
| 44150 |
list of a function declaration. For example, "def f(\*, a = 3,): pass" is |
| 44151 |
now legal. Patch from Mark Dickinson. |
| 44152 |
|
| 44153 |
- bpo-24965: Implement :pep:`498` "Literal String Interpolation". This |
| 44154 |
allows you to embed expressions inside f-strings, which are converted to |
| 44155 |
normal strings at run time. Given x=3, then f'value={x}' == 'value=3'. |
| 44156 |
Patch by Eric V. Smith. |
| 44157 |
|
| 44158 |
- bpo-26478: Fix semantic bugs when using binary operators with dictionary |
| 44159 |
views and tuples. |
| 44160 |
|
| 44161 |
- bpo-26171: Fix possible integer overflow and heap corruption in |
| 44162 |
zipimporter.get_data(). |
| 44163 |
|
| 44164 |
- bpo-25660: Fix TAB key behaviour in REPL with readline. |
| 44165 |
|
| 44166 |
- bpo-26288: Optimize PyLong_AsDouble. |
| 44167 |
|
| 44168 |
- bpo-26289: Optimize floor and modulo division for single-digit longs. |
| 44169 |
Microbenchmarks show 2-2.5x improvement. Built-in 'divmod' function is |
| 44170 |
now also ~10% faster. (See also: bpo-26315) |
| 44171 |
|
| 44172 |
- bpo-25887: Raise a RuntimeError when a coroutine object is awaited more |
| 44173 |
than once. |
| 44174 |
|
| 44175 |
Library |
| 44176 |
------- |
| 44177 |
|
| 44178 |
- bpo-27057: Fix os.set_inheritable() on Android, ioctl() is blocked by |
| 44179 |
SELinux and fails with EACCESS. The function now falls back to fcntl(). |
| 44180 |
Patch written by Michał Bednarski. |
| 44181 |
|
| 44182 |
- bpo-27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure! |
| 44183 |
|
| 44184 |
- bpo-27031: Removed dummy methods in Tkinter widget classes: tk_menuBar() |
| 44185 |
and tk_bindForTraversal(). |
| 44186 |
|
| 44187 |
- bpo-14132: Fix urllib.request redirect handling when the target only has a |
| 44188 |
query string. Original fix by Ján Janech. |
| 44189 |
|
| 44190 |
- bpo-17214: The "urllib.request" module now percent-encodes non-ASCII bytes |
| 44191 |
found in redirect target URLs. Some servers send Location header fields |
| 44192 |
with non-ASCII bytes, but "http.client" requires the request target to be |
| 44193 |
ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch |
| 44194 |
by Christian Heimes. |
| 44195 |
|
| 44196 |
- bpo-27033: The default value of the decode_data parameter for |
| 44197 |
smtpd.SMTPChannel and smtpd.SMTPServer constructors is changed to False. |
| 44198 |
|
| 44199 |
- bpo-27034: Removed deprecated class asynchat.fifo. |
| 44200 |
|
| 44201 |
- bpo-26870: Added readline.set_auto_history(), which can stop entries being |
| 44202 |
automatically added to the history list. Based on patch by Tyler |
| 44203 |
Crompton. |
| 44204 |
|
| 44205 |
- bpo-26039: zipfile.ZipFile.open() can now be used to write data into a ZIP |
| 44206 |
file, as well as for extracting data. Patch by Thomas Kluyver. |
| 44207 |
|
| 44208 |
- bpo-26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch |
| 44209 |
contributed by Chi Hsuan Yen. |
| 44210 |
|
| 44211 |
- bpo-22274: In the subprocess module, allow stderr to be redirected to |
| 44212 |
stdout even when stdout is not redirected. Patch by Akira Li. |
| 44213 |
|
| 44214 |
- bpo-26807: mock_open 'files' no longer error on readline at end of file. |
| 44215 |
Patch from Yolanda Robla. |
| 44216 |
|
| 44217 |
- bpo-25745: Fixed leaking a userptr in curses panel destructor. |
| 44218 |
|
| 44219 |
- bpo-26977: Removed unnecessary, and ignored, call to sum of squares helper |
| 44220 |
in statistics.pvariance. |
| 44221 |
|
| 44222 |
- bpo-26002: Use bisect in statistics.median instead of a linear search. |
| 44223 |
Patch by Upendra Kuma. |
| 44224 |
|
| 44225 |
- bpo-25974: Make use of new Decimal.as_integer_ratio() method in statistics |
| 44226 |
module. Patch by Stefan Krah. |
| 44227 |
|
| 44228 |
- bpo-26996: Add secrets module as described in :pep:`506`. |
| 44229 |
|
| 44230 |
- bpo-26881: The modulefinder module now supports extended opcode arguments. |
| 44231 |
|
| 44232 |
- bpo-23815: Fixed crashes related to directly created instances of types in |
| 44233 |
_tkinter and curses.panel modules. |
| 44234 |
|
| 44235 |
- bpo-17765: weakref.ref() no longer silently ignores keyword arguments. |
| 44236 |
Patch by Georg Brandl. |
| 44237 |
|
| 44238 |
- bpo-26873: xmlrpc now raises ResponseError on unsupported type tags |
| 44239 |
instead of silently return incorrect result. |
| 44240 |
|
| 44241 |
- bpo-26915: The __contains__ methods in the collections ABCs now check for |
| 44242 |
identity before checking equality. This better matches the behavior of |
| 44243 |
the concrete classes, allows sensible handling of NaNs, and makes it |
| 44244 |
easier to reason about container invariants. |
| 44245 |
|
| 44246 |
- bpo-26711: Fixed the comparison of plistlib.Data with other types. |
| 44247 |
|
| 44248 |
- bpo-24114: Fix an uninitialized variable in ``ctypes.util``. The bug only |
| 44249 |
occurs on SunOS when the ctypes implementation searches for the ``crle`` |
| 44250 |
program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos. |
| 44251 |
|
| 44252 |
- bpo-26864: In urllib.request, change the proxy bypass host checking |
| 44253 |
against no_proxy to be case-insensitive, and to not match unrelated host |
| 44254 |
names that happen to have a bypassed hostname as a suffix. Patch by Xiang |
| 44255 |
Zhang. |
| 44256 |
|
| 44257 |
- bpo-24902: Print server URL on http.server startup. Initial patch by |
| 44258 |
Felix Kaiser. |
| 44259 |
|
| 44260 |
- bpo-25788: fileinput.hook_encoded() now supports an "errors" argument for |
| 44261 |
passing to open. Original patch by Joseph Hackman. |
| 44262 |
|
| 44263 |
- bpo-26634: recursive_repr() now sets __qualname__ of wrapper. Patch by |
| 44264 |
Xiang Zhang. |
| 44265 |
|
| 44266 |
- bpo-26804: urllib.request will prefer lower_case proxy environment |
| 44267 |
variables over UPPER_CASE or Mixed_Case ones. Patch contributed by |
| 44268 |
Hans-Peter Jansen. |
| 44269 |
|
| 44270 |
- bpo-26837: assertSequenceEqual() now correctly outputs non-stringified |
| 44271 |
differing items (like bytes in the -b mode). This affects |
| 44272 |
assertListEqual() and assertTupleEqual(). |
| 44273 |
|
| 44274 |
- bpo-26041: Remove "will be removed in Python 3.7" from deprecation |
| 44275 |
messages of platform.dist() and platform.linux_distribution(). Patch by |
| 44276 |
Kumaripaba Miyurusara Athukorala. |
| 44277 |
|
| 44278 |
- bpo-26822: itemgetter, attrgetter and methodcaller objects no longer |
| 44279 |
silently ignore keyword arguments. |
| 44280 |
|
| 44281 |
- bpo-26733: Disassembling a class now disassembles class and static |
| 44282 |
methods. Patch by Xiang Zhang. |
| 44283 |
|
| 44284 |
- bpo-26801: Fix error handling in :func:`shutil.get_terminal_size`, catch |
| 44285 |
:exc:`AttributeError` instead of :exc:`NameError`. Patch written by |
| 44286 |
Emanuel Barry. |
| 44287 |
|
| 44288 |
- bpo-24838: tarfile's ustar and gnu formats now correctly calculate name |
| 44289 |
and link field limits for multibyte character encodings like utf-8. |
| 44290 |
|
| 44291 |
- bpo-26717: Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by |
| 44292 |
Anthony Sottile. |
| 44293 |
|
| 44294 |
- bpo-26782: Add STARTUPINFO to subprocess.__all__ on Windows. |
| 44295 |
|
| 44296 |
- bpo-26404: Add context manager to socketserver. Patch by Aviv Palivoda. |
| 44297 |
|
| 44298 |
- bpo-26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading |
| 44299 |
more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of |
| 44300 |
1024 bytes per call. |
| 44301 |
|
| 44302 |
- bpo-26585: Eliminate http.server._quote_html() and use |
| 44303 |
html.escape(quote=False). Patch by Xiang Zhang. |
| 44304 |
|
| 44305 |
- bpo-26685: Raise OSError if closing a socket fails. |
| 44306 |
|
| 44307 |
- bpo-16329: Add .webm to mimetypes.types_map. Patch by Giampaolo Rodola'. |
| 44308 |
|
| 44309 |
- bpo-13952: Add .csv to mimetypes.types_map. Patch by Geoff Wilson. |
| 44310 |
|
| 44311 |
- bpo-26587: the site module now allows .pth files to specify files to be |
| 44312 |
added to sys.path (e.g. zip files). |
| 44313 |
|
| 44314 |
- bpo-25609: Introduce contextlib.AbstractContextManager and |
| 44315 |
typing.ContextManager. |
| 44316 |
|
| 44317 |
- bpo-26709: Fixed Y2038 problem in loading binary PLists. |
| 44318 |
|
| 44319 |
- bpo-23735: Handle terminal resizing with Readline 6.3+ by installing our |
| 44320 |
own SIGWINCH handler. Patch by Eric Price. |
| 44321 |
|
| 44322 |
- bpo-25951: Change SSLSocket.sendall() to return None, as explicitly |
| 44323 |
documented for plain socket objects. Patch by Aviv Palivoda. |
| 44324 |
|
| 44325 |
- bpo-26586: In http.server, respond with "413 Request header fields too |
| 44326 |
large" if there are too many header fields to parse, rather than killing |
| 44327 |
the connection and raising an unhandled exception. Patch by Xiang Zhang. |
| 44328 |
|
| 44329 |
- bpo-26676: Added missing XMLPullParser to ElementTree.__all__. |
| 44330 |
|
| 44331 |
- bpo-22854: Change BufferedReader.writable() and BufferedWriter.readable() |
| 44332 |
to always return False. |
| 44333 |
|
| 44334 |
- bpo-26492: Exhausted iterator of array.array now conforms with the |
| 44335 |
behavior of iterators of other mutable sequences: it lefts exhausted even |
| 44336 |
if iterated array is extended. |
| 44337 |
|
| 44338 |
- bpo-26641: doctest.DocFileTest and doctest.testfile() now support packages |
| 44339 |
(module splitted into multiple directories) for the package parameter. |
| 44340 |
|
| 44341 |
- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of |
| 44342 |
tuple (changeset 3603bae63c13 only works for classes) so we need to |
| 44343 |
implement __ne__ ourselves. Patch by Andrew Plummer. |
| 44344 |
|
| 44345 |
- bpo-26644: Raise ValueError rather than SystemError when a negative length |
| 44346 |
is passed to SSLSocket.recv() or read(). |
| 44347 |
|
| 44348 |
- bpo-23804: Fix SSL recv(0) and read(0) methods to return zero bytes |
| 44349 |
instead of up to 1024. |
| 44350 |
|
| 44351 |
- bpo-26616: Fixed a bug in datetime.astimezone() method. |
| 44352 |
|
| 44353 |
- bpo-26637: The :mod:`importlib` module now emits an :exc:`ImportError` |
| 44354 |
rather than a :exc:`TypeError` if :func:`__import__` is tried during the |
| 44355 |
Python shutdown process but :data:`sys.path` is already cleared (set to |
| 44356 |
``None``). |
| 44357 |
|
| 44358 |
- bpo-21925: :func:`warnings.formatwarning` now catches exceptions when |
| 44359 |
calling :func:`linecache.getline` and |
| 44360 |
:func:`tracemalloc.get_object_traceback` to be able to log |
| 44361 |
:exc:`ResourceWarning` emitted late during the Python shutdown process. |
| 44362 |
|
| 44363 |
- bpo-23848: On Windows, faulthandler.enable() now also installs an |
| 44364 |
exception handler to dump the traceback of all Python threads on any |
| 44365 |
Windows exception, not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT). |
| 44366 |
|
| 44367 |
- bpo-26530: Add C functions :c:func:`!_PyTraceMalloc_Track` and |
| 44368 |
:c:func:`!_PyTraceMalloc_Untrack` to track memory blocks using the |
| 44369 |
:mod:`tracemalloc` module. Add :c:func:`!_PyTraceMalloc_GetTraceback` to |
| 44370 |
get the traceback of an object. |
| 44371 |
|
| 44372 |
- bpo-26588: The _tracemalloc now supports tracing memory allocations of |
| 44373 |
multiple address spaces (domains). |
| 44374 |
|
| 44375 |
- bpo-24266: Ctrl+C during Readline history search now cancels the search |
| 44376 |
mode when compiled with Readline 7. |
| 44377 |
|
| 44378 |
- bpo-26590: Implement a safe finalizer for the _socket.socket type. It now |
| 44379 |
releases the GIL to close the socket. |
| 44380 |
|
| 44381 |
- bpo-18787: spwd.getspnam() now raises a PermissionError if the user |
| 44382 |
doesn't have privileges. |
| 44383 |
|
| 44384 |
- bpo-26560: Avoid potential ValueError in BaseHandler.start_response. |
| 44385 |
Initial patch by Peter Inglesby. |
| 44386 |
|
| 44387 |
- bpo-26567: Add a new function :c:func:`PyErr_ResourceWarning` function to |
| 44388 |
pass the destroyed object. Add a *source* attribute to |
| 44389 |
:class:`warnings.WarningMessage`. Add warnings._showwarnmsg() which uses |
| 44390 |
tracemalloc to get the traceback where source object was allocated. |
| 44391 |
|
| 44392 |
- bpo-26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex` |
| 44393 |
to support importing packages. |
| 44394 |
|
| 44395 |
- bpo-26499: Account for remaining Content-Length in HTTPResponse.readline() |
| 44396 |
and read1(). Based on patch by Silent Ghost. Also document that |
| 44397 |
HTTPResponse now supports these methods. |
| 44398 |
|
| 44399 |
- bpo-25320: Handle sockets in directories unittest discovery is scanning. |
| 44400 |
Patch from Victor van den Elzen. |
| 44401 |
|
| 44402 |
- bpo-16181: cookiejar.http2time() now returns None if year is higher than |
| 44403 |
datetime.MAXYEAR. |
| 44404 |
|
| 44405 |
- bpo-26513: Fixes platform module detection of Windows Server |
| 44406 |
|
| 44407 |
- bpo-23718: Fixed parsing time in week 0 before Jan 1. Original patch by |
| 44408 |
Tamás Bence Gedai. |
| 44409 |
|
| 44410 |
- bpo-26323: Add Mock.assert_called() and Mock.assert_called_once() methods |
| 44411 |
to unittest.mock. Patch written by Amit Saha. |
| 44412 |
|
| 44413 |
- bpo-20589: Invoking Path.owner() and Path.group() on Windows now raise |
| 44414 |
NotImplementedError instead of ImportError. |
| 44415 |
|
| 44416 |
- bpo-26177: Fixed the keys() method for Canvas and Scrollbar widgets. |
| 44417 |
|
| 44418 |
- bpo-15068: Got rid of excessive buffering in fileinput. The bufsize |
| 44419 |
parameter is now deprecated and ignored. |
| 44420 |
|
| 44421 |
- bpo-19475: Added an optional argument timespec to the datetime isoformat() |
| 44422 |
method to choose the precision of the time component. |
| 44423 |
|
| 44424 |
- bpo-2202: Fix UnboundLocalError in |
| 44425 |
AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu |
| 44426 |
Dupuy. |
| 44427 |
|
| 44428 |
- bpo-26167: Minimized overhead in copy.copy() and copy.deepcopy(). |
| 44429 |
Optimized copying and deepcopying bytearrays, NotImplemented, slices, |
| 44430 |
short lists, tuples, dicts, sets. |
| 44431 |
|
| 44432 |
- bpo-25718: Fixed pickling and copying the accumulate() iterator with total |
| 44433 |
is None. |
| 44434 |
|
| 44435 |
- bpo-26475: Fixed debugging output for regular expressions with the (?x) |
| 44436 |
flag. |
| 44437 |
|
| 44438 |
- bpo-26482: Allowed pickling recursive dequeues. |
| 44439 |
|
| 44440 |
- bpo-26335: Make mmap.write() return the number of bytes written like other |
| 44441 |
write methods. Patch by Jakub Stasiak. |
| 44442 |
|
| 44443 |
- bpo-26457: Fixed the subnets() methods in IP network classes for the case |
| 44444 |
when resulting prefix length is equal to maximal prefix length. Based on |
| 44445 |
patch by Xiang Zhang. |
| 44446 |
|
| 44447 |
- bpo-26385: Remove the file if the internal open() call in |
| 44448 |
NamedTemporaryFile() fails. Patch by Silent Ghost. |
| 44449 |
|
| 44450 |
- bpo-26402: Fix XML-RPC client to retry when the server shuts down a |
| 44451 |
persistent connection. This was a regression related to the new |
| 44452 |
http.client.RemoteDisconnected exception in 3.5.0a4. |
| 44453 |
|
| 44454 |
- bpo-25913: Leading ``<~`` is optional now in base64.a85decode() with |
| 44455 |
adobe=True. Patch by Swati Jaiswal. |
| 44456 |
|
| 44457 |
- bpo-26186: Remove an invalid type check in importlib.util.LazyLoader. |
| 44458 |
|
| 44459 |
- bpo-26367: importlib.__import__() raises ImportError like |
| 44460 |
builtins.__import__() when ``level`` is specified but without an |
| 44461 |
accompanying package specified. |
| 44462 |
|
| 44463 |
- bpo-26309: In the "socketserver" module, shut down the request (closing |
| 44464 |
the connected socket) when verify_request() returns false. Patch by Aviv |
| 44465 |
Palivoda. |
| 44466 |
|
| 44467 |
- bpo-23430: Change the socketserver module to only catch exceptions raised |
| 44468 |
from a request handler that are derived from Exception (instead of |
| 44469 |
BaseException). Therefore SystemExit and KeyboardInterrupt no longer |
| 44470 |
trigger the handle_error() method, and will now to stop a single-threaded |
| 44471 |
server. |
| 44472 |
|
| 44473 |
- bpo-25995: os.walk() no longer uses FDs proportional to the tree depth. |
| 44474 |
|
| 44475 |
- bpo-25994: Added the close() method and the support of the context manager |
| 44476 |
protocol for the os.scandir() iterator. |
| 44477 |
|
| 44478 |
- bpo-23992: multiprocessing: make MapResult not fail-fast upon exception. |
| 44479 |
|
| 44480 |
- bpo-26243: Support keyword arguments to zlib.compress(). Patch by Aviv |
| 44481 |
Palivoda. |
| 44482 |
|
| 44483 |
- bpo-26117: The os.scandir() iterator now closes file descriptor not only |
| 44484 |
when the iteration is finished, but when it was failed with error. |
| 44485 |
|
| 44486 |
- bpo-25949: __dict__ for an OrderedDict instance is now created only when |
| 44487 |
needed. |
| 44488 |
|
| 44489 |
- bpo-25911: Restored support of bytes paths in os.walk() on Windows. |
| 44490 |
|
| 44491 |
- bpo-26045: Add UTF-8 suggestion to error message when posting a |
| 44492 |
non-Latin-1 string with http.client. |
| 44493 |
|
| 44494 |
- bpo-26039: Added zipfile.ZipInfo.from_file() and zipinfo.ZipInfo.is_dir(). |
| 44495 |
Patch by Thomas Kluyver. |
| 44496 |
|
| 44497 |
- bpo-12923: Reset FancyURLopener's redirect counter even if there is an |
| 44498 |
exception. Based on patches by Brian Brazil and Daniel Rocco. |
| 44499 |
|
| 44500 |
- bpo-25945: Fixed a crash when unpickle the functools.partial object with |
| 44501 |
wrong state. Fixed a leak in failed functools.partial constructor. "args" |
| 44502 |
and "keywords" attributes of functools.partial have now always types tuple |
| 44503 |
and dict correspondingly. |
| 44504 |
|
| 44505 |
- bpo-26202: copy.deepcopy() now correctly copies range() objects with |
| 44506 |
non-atomic attributes. |
| 44507 |
|
| 44508 |
- bpo-23076: Path.glob() now raises a ValueError if it's called with an |
| 44509 |
invalid pattern. Patch by Thomas Nyberg. |
| 44510 |
|
| 44511 |
- bpo-19883: Fixed possible integer overflows in zipimport. |
| 44512 |
|
| 44513 |
- bpo-26227: On Windows, getnameinfo(), gethostbyaddr() and |
| 44514 |
gethostbyname_ex() functions of the socket module now decode the hostname |
| 44515 |
from the ANSI code page rather than UTF-8. |
| 44516 |
|
| 44517 |
- bpo-26099: The site module now writes an error into stderr if |
| 44518 |
sitecustomize module can be imported but executing the module raise an |
| 44519 |
ImportError. Same change for usercustomize. |
| 44520 |
|
| 44521 |
- bpo-26147: xmlrpc now works with strings not encodable with used non-UTF-8 |
| 44522 |
encoding. |
| 44523 |
|
| 44524 |
- bpo-25935: Garbage collector now breaks reference loops with OrderedDict. |
| 44525 |
|
| 44526 |
- bpo-16620: Fixed AttributeError in msilib.Directory.glob(). |
| 44527 |
|
| 44528 |
- bpo-26013: Added compatibility with broken protocol 2 pickles created in |
| 44529 |
old Python 3 versions (3.4.3 and lower). |
| 44530 |
|
| 44531 |
- bpo-26129: Deprecated accepting non-integers in grp.getgrgid(). |
| 44532 |
|
| 44533 |
- bpo-25850: Use cross-compilation by default for 64-bit Windows. |
| 44534 |
|
| 44535 |
- bpo-25822: Add docstrings to the fields of urllib.parse results. Patch |
| 44536 |
contributed by Swati Jaiswal. |
| 44537 |
|
| 44538 |
- bpo-22642: Convert trace module option parsing mechanism to argparse. |
| 44539 |
Patch contributed by SilentGhost. |
| 44540 |
|
| 44541 |
- bpo-24705: Fix sysconfig._parse_makefile not expanding ${} vars appearing |
| 44542 |
before $() vars. |
| 44543 |
|
| 44544 |
- bpo-26069: Remove the deprecated apis in the trace module. |
| 44545 |
|
| 44546 |
- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore |
| 44547 |
original values after patching. Patch contributed by Sean McCully. |
| 44548 |
|
| 44549 |
- bpo-25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode |
| 44550 |
option if it is safe to do so. |
| 44551 |
|
| 44552 |
- bpo-26012: Don't traverse into symlinks for ``**`` pattern in |
| 44553 |
pathlib.Path.[r]glob(). |
| 44554 |
|
| 44555 |
- bpo-24120: Ignore PermissionError when traversing a tree with |
| 44556 |
pathlib.Path.[r]glob(). Patch by Ulrich Petri. |
| 44557 |
|
| 44558 |
- bpo-21815: Accept ] characters in the data portion of imap responses, in |
| 44559 |
order to handle the flags with square brackets accepted and produced by |
| 44560 |
servers such as gmail. |
| 44561 |
|
| 44562 |
- bpo-25447: fileinput now uses sys.stdin as-is if it does not have a buffer |
| 44563 |
attribute (restores backward compatibility). |
| 44564 |
|
| 44565 |
- bpo-25971: Optimized creating Fractions from floats by 2 times and from |
| 44566 |
Decimals by 3 times. |
| 44567 |
|
| 44568 |
- bpo-25802: Document as deprecated the remaining implementations of |
| 44569 |
importlib.abc.Loader.load_module(). |
| 44570 |
|
| 44571 |
- bpo-25928: Add Decimal.as_integer_ratio(). |
| 44572 |
|
| 44573 |
- bpo-25447: Copying the lru_cache() wrapper object now always works, |
| 44574 |
independently from the type of the wrapped object (by returning the |
| 44575 |
original object unchanged). |
| 44576 |
|
| 44577 |
- bpo-25768: Have the functions in compileall return booleans instead of |
| 44578 |
ints and add proper documentation and tests for the return values. |
| 44579 |
|
| 44580 |
- bpo-24103: Fixed possible use after free in ElementTree.XMLPullParser. |
| 44581 |
|
| 44582 |
- bpo-25860: os.fwalk() no longer skips remaining directories when error |
| 44583 |
occurs. Original patch by Samson Lee. |
| 44584 |
|
| 44585 |
- bpo-25914: Fixed and simplified OrderedDict.__sizeof__. |
| 44586 |
|
| 44587 |
- bpo-25869: Optimized deepcopying ElementTree; it is now 20 times faster. |
| 44588 |
|
| 44589 |
- bpo-25873: Optimized iterating ElementTree. Iterating elements |
| 44590 |
Element.iter() is now 40% faster, iterating text Element.itertext() is now |
| 44591 |
up to 2.5 times faster. |
| 44592 |
|
| 44593 |
- bpo-25902: Fixed various refcount issues in ElementTree iteration. |
| 44594 |
|
| 44595 |
- bpo-22227: The TarFile iterator is reimplemented using generator. This |
| 44596 |
implementation is simpler that using class. |
| 44597 |
|
| 44598 |
- bpo-25638: Optimized ElementTree.iterparse(); it is now 2x faster. |
| 44599 |
Optimized ElementTree parsing; it is now 10% faster. |
| 44600 |
|
| 44601 |
- bpo-25761: Improved detecting errors in broken pickle data. |
| 44602 |
|
| 44603 |
- bpo-25717: Restore the previous behaviour of tolerating most fstat() |
| 44604 |
errors when opening files. This was a regression in 3.5a1, and stopped |
| 44605 |
anonymous temporary files from working in special cases. |
| 44606 |
|
| 44607 |
- bpo-24903: Fix regression in number of arguments compileall accepts when |
| 44608 |
'-d' is specified. The check on the number of arguments has been dropped |
| 44609 |
completely as it never worked correctly anyway. |
| 44610 |
|
| 44611 |
- bpo-25764: In the subprocess module, preserve any exception caused by |
| 44612 |
fork() failure when preexec_fn is used. |
| 44613 |
|
| 44614 |
- bpo-25771: Tweak the exception message for importlib.util.resolve_name() |
| 44615 |
when 'package' isn't specified but necessary. |
| 44616 |
|
| 44617 |
- bpo-6478: _strptime's regexp cache now is reset after changing timezone |
| 44618 |
with time.tzset(). |
| 44619 |
|
| 44620 |
- bpo-14285: When executing a package with the "python -m package" option, |
| 44621 |
and package initialization fails, a proper traceback is now reported. The |
| 44622 |
"runpy" module now lets exceptions from package initialization pass back |
| 44623 |
to the caller, rather than raising ImportError. |
| 44624 |
|
| 44625 |
- bpo-19771: Also in runpy and the "-m" option, omit the irrelevant message |
| 44626 |
". . . is a package and cannot be directly executed" if the package could |
| 44627 |
not even be initialized (e.g. due to a bad ``*.pyc`` file). |
| 44628 |
|
| 44629 |
- bpo-25177: Fixed problem with the mean of very small and very large |
| 44630 |
numbers. As a side effect, statistics.mean and statistics.variance should |
| 44631 |
be significantly faster. |
| 44632 |
|
| 44633 |
- bpo-25718: Fixed copying object with state with boolean value is false. |
| 44634 |
|
| 44635 |
- bpo-10131: Fixed deep copying of minidom documents. Based on patch by |
| 44636 |
Marian Ganisin. |
| 44637 |
|
| 44638 |
- bpo-7990: dir() on ElementTree.Element now lists properties: "tag", |
| 44639 |
"text", "tail" and "attrib". Original patch by Santoso Wijaya. |
| 44640 |
|
| 44641 |
- bpo-25725: Fixed a reference leak in pickle.loads() when unpickling |
| 44642 |
invalid data including tuple instructions. |
| 44643 |
|
| 44644 |
- bpo-25663: In the Readline completer, avoid listing duplicate global |
| 44645 |
names, and search the global namespace before searching builtins. |
| 44646 |
|
| 44647 |
- bpo-25688: Fixed file leak in ElementTree.iterparse() raising an error. |
| 44648 |
|
| 44649 |
- bpo-23914: Fixed SystemError raised by unpickler on broken pickle data. |
| 44650 |
|
| 44651 |
- bpo-25691: Fixed crash on deleting ElementTree.Element attributes. |
| 44652 |
|
| 44653 |
- bpo-25624: ZipFile now always writes a ZIP_STORED header for directory |
| 44654 |
entries. Patch by Dingyuan Wang. |
| 44655 |
|
| 44656 |
- bpo-25626: Change three zlib functions to accept sizes that fit in |
| 44657 |
Py_ssize_t, but internally cap those sizes to UINT_MAX. This resolves a |
| 44658 |
regression in 3.5 where GzipFile.read() failed to read chunks larger than |
| 44659 |
2 or 4 GiB. The change affects the zlib.Decompress.decompress() |
| 44660 |
max_length parameter, the zlib.decompress() bufsize parameter, and the |
| 44661 |
zlib.Decompress.flush() length parameter. |
| 44662 |
|
| 44663 |
- bpo-25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True) |
| 44664 |
when the OS gives priority to errors such as EACCES over EEXIST. |
| 44665 |
|
| 44666 |
- bpo-25593: Change semantics of EventLoop.stop() in asyncio. |
| 44667 |
|
| 44668 |
- bpo-6973: When we know a subprocess.Popen process has died, do not allow |
| 44669 |
the send_signal(), terminate(), or kill() methods to do anything as they |
| 44670 |
could potentially signal a different process. |
| 44671 |
|
| 44672 |
- bpo-23883: Added missing APIs to __all__ to match the documented APIs for |
| 44673 |
the following modules: calendar, csv, enum, fileinput, ftplib, logging, |
| 44674 |
optparse, tarfile, threading and wave. Also added a |
| 44675 |
test.support.check__all__() helper. Patches by Jacek Kołodziej, Mauro S. |
| 44676 |
M. Rodrigues and Joel Taddei. |
| 44677 |
|
| 44678 |
- bpo-25590: In the Readline completer, only call getattr() once per |
| 44679 |
attribute. Also complete names of attributes such as properties and slots |
| 44680 |
which are listed by dir() but not yet created on an instance. |
| 44681 |
|
| 44682 |
- bpo-25498: Fix a crash when garbage-collecting ctypes objects created by |
| 44683 |
wrapping a memoryview. This was a regression made in 3.5a1. Based on |
| 44684 |
patch by Eryksun. |
| 44685 |
|
| 44686 |
- bpo-25584: Added "escape" to the __all__ list in the glob module. |
| 44687 |
|
| 44688 |
- bpo-25584: Fixed recursive glob() with patterns starting with ``**``. |
| 44689 |
|
| 44690 |
- bpo-25446: Fix regression in smtplib's AUTH LOGIN support. |
| 44691 |
|
| 44692 |
- bpo-18010: Fix the pydoc web server's module search function to handle |
| 44693 |
exceptions from importing packages. |
| 44694 |
|
| 44695 |
- bpo-25554: Got rid of circular references in regular expression parsing. |
| 44696 |
|
| 44697 |
- bpo-18973: Command-line interface of the calendar module now uses argparse |
| 44698 |
instead of optparse. |
| 44699 |
|
| 44700 |
- bpo-25510: fileinput.FileInput.readline() now returns b'' instead of '' at |
| 44701 |
the end if the FileInput was opened with binary mode. Patch by Ryosuke |
| 44702 |
Ito. |
| 44703 |
|
| 44704 |
- bpo-25503: Fixed inspect.getdoc() for inherited docstrings of properties. |
| 44705 |
Original patch by John Mark Vandenberg. |
| 44706 |
|
| 44707 |
- bpo-25515: Always use os.urandom as a source of randomness in uuid.uuid4. |
| 44708 |
|
| 44709 |
- bpo-21827: Fixed textwrap.dedent() for the case when largest common |
| 44710 |
whitespace is a substring of smallest leading whitespace. Based on patch |
| 44711 |
by Robert Li. |
| 44712 |
|
| 44713 |
- bpo-25447: The lru_cache() wrapper objects now can be copied and pickled |
| 44714 |
(by returning the original object unchanged). |
| 44715 |
|
| 44716 |
- bpo-25390: typing: Don't crash on Union[str, Pattern]. |
| 44717 |
|
| 44718 |
- bpo-25441: asyncio: Raise error from drain() when socket is closed. |
| 44719 |
|
| 44720 |
- bpo-25410: Cleaned up and fixed minor bugs in C implementation of |
| 44721 |
OrderedDict. |
| 44722 |
|
| 44723 |
- bpo-25411: Improved Unicode support in SMTPHandler through better use of |
| 44724 |
the email package. Thanks to user simon04 for the patch. |
| 44725 |
|
| 44726 |
- Move the imp module from a PendingDeprecationWarning to |
| 44727 |
DeprecationWarning. |
| 44728 |
|
| 44729 |
- bpo-25407: Remove mentions of the formatter module being removed in Python |
| 44730 |
3.6. |
| 44731 |
|
| 44732 |
- bpo-25406: Fixed a bug in C implementation of OrderedDict.move_to_end() |
| 44733 |
that caused segmentation fault or hang in iterating after moving several |
| 44734 |
items to the start of ordered dict. |
| 44735 |
|
| 44736 |
- bpo-25382: pickletools.dis() now outputs implicit memo index for the |
| 44737 |
MEMOIZE opcode. |
| 44738 |
|
| 44739 |
- bpo-25357: Add an optional newline parameter to binascii.b2a_base64(). |
| 44740 |
base64.b64encode() uses it to avoid a memory copy. |
| 44741 |
|
| 44742 |
- bpo-24164: Objects that need calling ``__new__`` with keyword arguments, |
| 44743 |
can now be pickled using pickle protocols older than protocol version 4. |
| 44744 |
|
| 44745 |
- bpo-25364: zipfile now works in threads disabled builds. |
| 44746 |
|
| 44747 |
- bpo-25328: smtpd's SMTPChannel now correctly raises a ValueError if both |
| 44748 |
decode_data and enable_SMTPUTF8 are set to true. |
| 44749 |
|
| 44750 |
- bpo-16099: RobotFileParser now supports Crawl-delay and Request-rate |
| 44751 |
extensions. Patch by Nikolay Bogoychev. |
| 44752 |
|
| 44753 |
- bpo-25316: distutils raises OSError instead of DistutilsPlatformError when |
| 44754 |
MSVC is not installed. |
| 44755 |
|
| 44756 |
- bpo-25380: Fixed protocol for the STACK_GLOBAL opcode in |
| 44757 |
pickletools.opcodes. |
| 44758 |
|
| 44759 |
- bpo-23972: Updates asyncio datagram create method allowing reuseport and |
| 44760 |
reuseaddr socket options to be set prior to binding the socket. Mirroring |
| 44761 |
the existing asyncio create_server method the reuseaddr option for |
| 44762 |
datagram sockets defaults to True if the O/S is 'posix' (except if the |
| 44763 |
platform is Cygwin). Patch by Chris Laws. |
| 44764 |
|
| 44765 |
- bpo-25304: Add asyncio.run_coroutine_threadsafe(). This lets you submit a |
| 44766 |
coroutine to a loop from another thread, returning a |
| 44767 |
concurrent.futures.Future. By Vincent Michel. |
| 44768 |
|
| 44769 |
- bpo-25232: Fix CGIRequestHandler to split the query from the URL at the |
| 44770 |
first question mark (?) rather than the last. Patch from Xiang Zhang. |
| 44771 |
|
| 44772 |
- bpo-24657: Prevent CGIRequestHandler from collapsing slashes in the query |
| 44773 |
part of the URL as if it were a path. Patch from Xiang Zhang. |
| 44774 |
|
| 44775 |
- bpo-25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not |
| 44776 |
supported. Check if it is supported, it may not be supported on OpenBSD |
| 44777 |
for example. |
| 44778 |
|
| 44779 |
- bpo-23600: Default implementation of tzinfo.fromutc() was returning wrong |
| 44780 |
results in some cases. |
| 44781 |
|
| 44782 |
- bpo-25203: Failed readline.set_completer_delims() no longer left the |
| 44783 |
module in inconsistent state. |
| 44784 |
|
| 44785 |
- bpo-25011: rlcompleter now omits private and special attribute names |
| 44786 |
unless the prefix starts with underscores. |
| 44787 |
|
| 44788 |
- bpo-25209: rlcompleter now can add a space or a colon after completed |
| 44789 |
keyword. |
| 44790 |
|
| 44791 |
- bpo-22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. |
| 44792 |
|
| 44793 |
- bpo-23517: fromtimestamp() and utcfromtimestamp() methods of |
| 44794 |
datetime.datetime now round microseconds to nearest with ties going to |
| 44795 |
nearest even integer (ROUND_HALF_EVEN), as round(float), instead of |
| 44796 |
rounding towards -Infinity (ROUND_FLOOR). |
| 44797 |
|
| 44798 |
- bpo-23552: Timeit now warns when there is substantial (4x) variance |
| 44799 |
between best and worst times. Patch from Serhiy Storchaka. |
| 44800 |
|
| 44801 |
- bpo-24633: site-packages/README -> README.txt. |
| 44802 |
|
| 44803 |
- bpo-24879: help() and pydoc can now list named tuple fields in the order |
| 44804 |
they were defined rather than alphabetically. The ordering is determined |
| 44805 |
by the _fields attribute if present. |
| 44806 |
|
| 44807 |
- bpo-24874: Improve speed of itertools.cycle() and make its pickle more |
| 44808 |
compact. |
| 44809 |
|
| 44810 |
- Fix crash in itertools.cycle.__setstate__() when the first argument wasn't |
| 44811 |
a list. |
| 44812 |
|
| 44813 |
- bpo-20059: urllib.parse raises ValueError on all invalid ports. Patch by |
| 44814 |
Martin Panter. |
| 44815 |
|
| 44816 |
- bpo-24360: Improve __repr__ of argparse.Namespace() for invalid |
| 44817 |
identifiers. Patch by Matthias Bussonnier. |
| 44818 |
|
| 44819 |
- bpo-23426: run_setup was broken in distutils. Patch from Alexander |
| 44820 |
Belopolsky. |
| 44821 |
|
| 44822 |
- bpo-13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond. |
| 44823 |
|
| 44824 |
- bpo-2091: open() accepted a 'U' mode string containing '+', but 'U' can |
| 44825 |
only be used with 'r'. Patch from Jeff Balogh and John O'Connor. |
| 44826 |
|
| 44827 |
- bpo-8585: improved tests for zipimporter2. Patch from Mark Lawrence. |
| 44828 |
|
| 44829 |
- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely. |
| 44830 |
Patch from Nicola Palumbo and Laurent De Buyst. |
| 44831 |
|
| 44832 |
- bpo-24426: Fast searching optimization in regular expressions now works |
| 44833 |
for patterns that starts with capturing groups. Fast searching |
| 44834 |
optimization now can't be disabled at compile time. |
| 44835 |
|
| 44836 |
- bpo-23661: unittest.mock side_effects can now be exceptions again. This |
| 44837 |
was a regression vs Python 3.4. Patch from Ignacio Rossi |
| 44838 |
|
| 44839 |
- bpo-13248: Remove deprecated inspect.getmoduleinfo function. |
| 44840 |
|
| 44841 |
- bpo-25578: Fix (another) memory leak in SSLSocket.getpeercer(). |
| 44842 |
|
| 44843 |
- bpo-25530: Disable the vulnerable SSLv3 protocol by default when creating |
| 44844 |
ssl.SSLContext. |
| 44845 |
|
| 44846 |
- bpo-25569: Fix memory leak in SSLSocket.getpeercert(). |
| 44847 |
|
| 44848 |
- bpo-25471: Sockets returned from accept() shouldn't appear to be |
| 44849 |
nonblocking. |
| 44850 |
|
| 44851 |
- bpo-25319: When threading.Event is reinitialized, the underlying condition |
| 44852 |
should use a regular lock rather than a recursive lock. |
| 44853 |
|
| 44854 |
- Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu |
| 44855 |
Davis. |
| 44856 |
|
| 44857 |
- bpo-26050: Add asyncio.StreamReader.readuntil() method. Patch by Марк |
| 44858 |
Коренберг. |
| 44859 |
|
| 44860 |
- bpo-25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X |
| 44861 |
versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis. |
| 44862 |
|
| 44863 |
- bpo-26406: Avoid unnecessary serialization of getaddrinfo(3) calls on |
| 44864 |
current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis. |
| 44865 |
|
| 44866 |
- bpo-26848: Fix asyncio/subprocess.communicate() to handle empty input. |
| 44867 |
Patch by Jack O'Connor. |
| 44868 |
|
| 44869 |
- bpo-27040: Add loop.get_exception_handler method |
| 44870 |
|
| 44871 |
- bpo-27041: asyncio: Add loop.create_future method |
| 44872 |
|
| 44873 |
IDLE |
| 44874 |
---- |
| 44875 |
|
| 44876 |
- bpo-20640: Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav |
| 44877 |
Heblikar. |
| 44878 |
|
| 44879 |
- In the 'IDLE-console differences' section of the IDLE doc, clarify how |
| 44880 |
running with IDLE affects sys.modules and the standard streams. |
| 44881 |
|
| 44882 |
- bpo-25507: fix incorrect change in IOBinding that prevented printing. |
| 44883 |
Augment IOBinding htest to include all major IOBinding functions. |
| 44884 |
|
| 44885 |
- bpo-25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION |
| 44886 |
MARK in README.txt and open this and NEWS.txt with 'ascii'. Re-encode |
| 44887 |
CREDITS.txt to utf-8 and open it with 'utf-8'. |
| 44888 |
|
| 44889 |
- bpo-15348: Stop the debugger engine (normally in a user process) before |
| 44890 |
closing the debugger window (running in the IDLE process). This prevents |
| 44891 |
the RuntimeErrors that were being caught and ignored. |
| 44892 |
|
| 44893 |
- bpo-24455: Prevent IDLE from hanging when a) closing the shell while the |
| 44894 |
debugger is active (15347); b) closing the debugger with the [X] button |
| 44895 |
(15348); and c) activating the debugger when already active (24455). The |
| 44896 |
patch by Mark Roseman does this by making two changes. 1. Suspend and |
| 44897 |
resume the gui.interaction method with the tcl vwait mechanism intended |
| 44898 |
for this purpose (instead of root.mainloop & .quit). 2. In gui.run, allow |
| 44899 |
any existing interaction to terminate first. |
| 44900 |
|
| 44901 |
- Change 'The program' to 'Your program' in an IDLE 'kill program?' message |
| 44902 |
to make it clearer that the program referred to is the currently running |
| 44903 |
user program, not IDLE itself. |
| 44904 |
|
| 44905 |
- bpo-24750: Improve the appearance of the IDLE editor window status bar. |
| 44906 |
Patch by Mark Roseman. |
| 44907 |
|
| 44908 |
- bpo-25313: Change the handling of new built-in text color themes to better |
| 44909 |
address the compatibility problem introduced by the addition of IDLE Dark. |
| 44910 |
Consistently use the revised idleConf.CurrentTheme everywhere in idlelib. |
| 44911 |
|
| 44912 |
- bpo-24782: Extension configuration is now a tab in the IDLE Preferences |
| 44913 |
dialog rather than a separate dialog. The former tabs are now a sorted |
| 44914 |
list. Patch by Mark Roseman. |
| 44915 |
|
| 44916 |
- bpo-22726: Re-activate the config dialog help button with some content |
| 44917 |
about the other buttons and the new IDLE Dark theme. |
| 44918 |
|
| 44919 |
- bpo-24820: IDLE now has an 'IDLE Dark' built-in text color theme. It is |
| 44920 |
more or less IDLE Classic inverted, with a cobalt blue background. |
| 44921 |
Strings, comments, keywords, ... are still green, red, orange, ... . To |
| 44922 |
use it with IDLEs released before November 2015, hit the 'Save as New |
| 44923 |
Custom Theme' button and enter a new name, such as 'Custom Dark'. The |
| 44924 |
custom theme will work with any IDLE release, and can be modified. |
| 44925 |
|
| 44926 |
- bpo-25224: README.txt is now an idlelib index for IDLE developers and |
| 44927 |
curious users. The previous user content is now in the IDLE doc chapter. |
| 44928 |
'IDLE' now means 'Integrated Development and Learning Environment'. |
| 44929 |
|
| 44930 |
- bpo-24820: Users can now set breakpoint colors in Settings -> Custom |
| 44931 |
Highlighting. Original patch by Mark Roseman. |
| 44932 |
|
| 44933 |
- bpo-24972: Inactive selection background now matches active selection |
| 44934 |
background, as configured by users, on all systems. Found items are now |
| 44935 |
always highlighted on Windows. Initial patch by Mark Roseman. |
| 44936 |
|
| 44937 |
- bpo-24570: Idle: make calltip and completion boxes appear on Macs affected |
| 44938 |
by a tk regression. Initial patch by Mark Roseman. |
| 44939 |
|
| 44940 |
- bpo-24988: Idle ScrolledList context menus (used in debugger) now work on |
| 44941 |
Mac Aqua. Patch by Mark Roseman. |
| 44942 |
|
| 44943 |
- bpo-24801: Make right-click for context menu work on Mac Aqua. Patch by |
| 44944 |
Mark Roseman. |
| 44945 |
|
| 44946 |
- bpo-25173: Associate tkinter messageboxes with a specific widget. For Mac |
| 44947 |
OSX, make them a 'sheet'. Patch by Mark Roseman. |
| 44948 |
|
| 44949 |
- bpo-25198: Enhance the initial html viewer now used for Idle Help. |
| 44950 |
Properly indent fixed-pitch text (patch by Mark Roseman). Give code |
| 44951 |
snippet a very Sphinx-like light blueish-gray background. Re-use initial |
| 44952 |
width and height set by users for shell and editor. When the Table of |
| 44953 |
Contents (TOC) menu is used, put the section header at the top of the |
| 44954 |
screen. |
| 44955 |
|
| 44956 |
- bpo-25225: Condense and rewrite Idle doc section on text colors. |
| 44957 |
|
| 44958 |
- bpo-21995: Explain some differences between IDLE and console Python. |
| 44959 |
|
| 44960 |
- bpo-22820: Explain need for *print* when running file from Idle editor. |
| 44961 |
|
| 44962 |
- bpo-25224: Doc: augment Idle feature list and no-subprocess section. |
| 44963 |
|
| 44964 |
- bpo-25219: Update doc for Idle command line options. Some were missing and |
| 44965 |
notes were not correct. |
| 44966 |
|
| 44967 |
- bpo-24861: Most of idlelib is private and subject to change. Use |
| 44968 |
idleib.idle.* to start Idle. See idlelib.__init__.__doc__. |
| 44969 |
|
| 44970 |
- bpo-25199: Idle: add synchronization comments for future maintainers. |
| 44971 |
|
| 44972 |
- bpo-16893: Replace help.txt with help.html for Idle doc display. The new |
| 44973 |
idlelib/help.html is rstripped Doc/build/html/library/idle.html. It looks |
| 44974 |
better than help.txt and will better document Idle as released. The |
| 44975 |
tkinter html viewer that works for this file was written by Rose Roseman. |
| 44976 |
The now unused EditorWindow.HelpDialog class and helt.txt file are |
| 44977 |
deprecated. |
| 44978 |
|
| 44979 |
- bpo-24199: Deprecate unused idlelib.idlever with possible removal in 3.6. |
| 44980 |
|
| 44981 |
- bpo-24790: Remove extraneous code (which also create 2 & 3 conflicts). |
| 44982 |
|
| 44983 |
Documentation |
| 44984 |
------------- |
| 44985 |
|
| 44986 |
- bpo-26736: Used HTTPS for external links in the documentation if possible. |
| 44987 |
|
| 44988 |
- bpo-6953: Rework the Readline module documentation to group related |
| 44989 |
functions together, and add more details such as what underlying Readline |
| 44990 |
functions and variables are accessed. |
| 44991 |
|
| 44992 |
- bpo-23606: Adds note to ctypes documentation regarding cdll.msvcrt. |
| 44993 |
|
| 44994 |
- bpo-24952: Clarify the default size argument of stack_size() in the |
| 44995 |
"threading" and "_thread" modules. Patch from Mattip. |
| 44996 |
|
| 44997 |
- bpo-26014: Update 3.x packaging documentation: * "See also" links to the |
| 44998 |
new docs are now provided in the legacy pages * links to setuptools |
| 44999 |
documentation have been updated |
| 45000 |
|
| 45001 |
Tests |
| 45002 |
----- |
| 45003 |
|
| 45004 |
- bpo-21916: Added tests for the turtle module. Patch by ingrid, Gregory |
| 45005 |
Loyse and Jelle Zijlstra. |
| 45006 |
|
| 45007 |
- bpo-26295: When using "python3 -m test --testdir=TESTDIR", regrtest |
| 45008 |
doesn't add "test." prefix to test module names. |
| 45009 |
|
| 45010 |
- bpo-26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) |
| 45011 |
was untested. |
| 45012 |
|
| 45013 |
- bpo-26015: Added new tests for pickling iterators of mutable sequences. |
| 45014 |
|
| 45015 |
- bpo-26325: Added test.support.check_no_resource_warning() to check that no |
| 45016 |
ResourceWarning is emitted. |
| 45017 |
|
| 45018 |
- bpo-25940: Changed test_ssl to use its internal local server more. This |
| 45019 |
avoids relying on svn.python.org, which recently changed root certificate. |
| 45020 |
|
| 45021 |
- bpo-25616: Tests for OrderedDict are extracted from test_collections into |
| 45022 |
separate file test_ordered_dict. |
| 45023 |
|
| 45024 |
- bpo-25449: Added tests for OrderedDict subclasses. |
| 45025 |
|
| 45026 |
- bpo-25188: Add -P/--pgo to test.regrtest to suppress error output when |
| 45027 |
running the test suite for the purposes of a PGO build. Initial patch by |
| 45028 |
Alecsandru Patrascu. |
| 45029 |
|
| 45030 |
- bpo-22806: Add ``python -m test --list-tests`` command to list tests. |
| 45031 |
|
| 45032 |
- bpo-18174: ``python -m test --huntrleaks ...`` now also checks for leak of |
| 45033 |
file descriptors. Patch written by Richard Oudkerk. |
| 45034 |
|
| 45035 |
- bpo-25260: Fix ``python -m test --coverage`` on Windows. Remove the list |
| 45036 |
of ignored directories. |
| 45037 |
|
| 45038 |
- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass |
| 45039 |
along to regrtest.py. Previously there was a limit of 9. |
| 45040 |
|
| 45041 |
- bpo-26583: Skip test_timestamp_overflow in test_import if bytecode files |
| 45042 |
cannot be written. |
| 45043 |
|
| 45044 |
Build |
| 45045 |
----- |
| 45046 |
|
| 45047 |
- bpo-21277: Don't try to link _ctypes with a ffi_convenience library. |
| 45048 |
|
| 45049 |
- bpo-26884: Fix linking extension modules for cross builds. Patch by Xavier |
| 45050 |
de Gaye. |
| 45051 |
|
| 45052 |
- bpo-26932: Fixed support of RTLD_* constants defined as enum values, not |
| 45053 |
via macros (in particular on Android). Patch by Chi Hsuan Yen. |
| 45054 |
|
| 45055 |
- bpo-22359: Disable the rules for running _freeze_importlib and pgen when |
| 45056 |
cross-compiling. The output of these programs is normally saved with the |
| 45057 |
source code anyway, and is still regenerated when doing a native build. |
| 45058 |
Patch by Xavier de Gaye. |
| 45059 |
|
| 45060 |
- bpo-21668: Link audioop, _datetime, _ctypes_test modules to libm, except |
| 45061 |
on Mac OS X. Patch written by Chi Hsuan Yen. |
| 45062 |
|
| 45063 |
- bpo-25702: A --with-lto configure option has been added that will enable |
| 45064 |
link time optimizations at build time during a make profile-opt. Some |
| 45065 |
compilers and toolchains are known to not produce stable code when using |
| 45066 |
LTO, be sure to test things thoroughly before relying on it. It can |
| 45067 |
provide a few % speed up over profile-opt alone. |
| 45068 |
|
| 45069 |
- bpo-26624: Adds validation of ucrtbase[d].dll version with warning for old |
| 45070 |
versions. |
| 45071 |
|
| 45072 |
- bpo-17603: Avoid error about nonexistent fileblocks.o file by using a |
| 45073 |
lower-level check for st_blocks in struct stat. |
| 45074 |
|
| 45075 |
- bpo-26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern |
| 45076 |
Thiel. |
| 45077 |
|
| 45078 |
- bpo-26465: Update Windows builds to use OpenSSL 1.0.2g. |
| 45079 |
|
| 45080 |
- bpo-25348: Added ``--pgo`` and ``--pgo-job`` arguments to |
| 45081 |
``PCbuild\build.bat`` for building with Profile-Guided Optimization. The |
| 45082 |
old ``PCbuild\build_pgo.bat`` script is removed. |
| 45083 |
|
| 45084 |
- bpo-25827: Add support for building with ICC to ``configure``, including a |
| 45085 |
new ``--with-icc`` flag. |
| 45086 |
|
| 45087 |
- bpo-25696: Fix installation of Python on UNIX with make -j9. |
| 45088 |
|
| 45089 |
- bpo-24986: It is now possible to build Python on Windows without errors |
| 45090 |
when external libraries are not available. |
| 45091 |
|
| 45092 |
- bpo-24421: Compile Modules/_math.c once, before building extensions. |
| 45093 |
Previously it could fail to compile properly if the math and cmath builds |
| 45094 |
were concurrent. |
| 45095 |
|
| 45096 |
- bpo-26465: Update OS X 10.5+ 32-bit-only installer to build and link with |
| 45097 |
OpenSSL 1.0.2g. |
| 45098 |
|
| 45099 |
- bpo-26268: Update Windows builds to use OpenSSL 1.0.2f. |
| 45100 |
|
| 45101 |
- bpo-25136: Support Apple Xcode 7's new textual SDK stub libraries. |
| 45102 |
|
| 45103 |
- bpo-24324: Do not enable unreachable code warnings when using gcc as the |
| 45104 |
option does not work correctly in older versions of gcc and has been |
| 45105 |
silently removed as of gcc-4.5. |
| 45106 |
|
| 45107 |
Windows |
| 45108 |
------- |
| 45109 |
|
| 45110 |
- bpo-27053: Updates make_zip.py to correctly generate library ZIP file. |
| 45111 |
|
| 45112 |
- bpo-26268: Update the prepare_ssl.py script to handle OpenSSL releases |
| 45113 |
that don't include the contents of the include directory (that is, 1.0.2e |
| 45114 |
and later). |
| 45115 |
|
| 45116 |
- bpo-26071: bdist_wininst created binaries fail to start and find 32bit |
| 45117 |
Python |
| 45118 |
|
| 45119 |
- bpo-26073: Update the list of magic numbers in launcher |
| 45120 |
|
| 45121 |
- bpo-26065: Excludes venv from library when generating embeddable distro. |
| 45122 |
|
| 45123 |
- bpo-25022: Removed very outdated PC/example_nt/ directory. |
| 45124 |
|
| 45125 |
Tools/Demos |
| 45126 |
----------- |
| 45127 |
|
| 45128 |
- bpo-26799: Fix python-gdb.py: don't get C types once when the Python code |
| 45129 |
is loaded, but get C types on demand. The C types can change if |
| 45130 |
python-gdb.py is loaded before the Python executable. Patch written by |
| 45131 |
Thomas Ilsche. |
| 45132 |
|
| 45133 |
- bpo-26271: Fix the Freeze tool to properly use flags passed through |
| 45134 |
configure. Patch by Daniel Shaulov. |
| 45135 |
|
| 45136 |
- bpo-26489: Add dictionary unpacking support to Tools/parser/unparse.py. |
| 45137 |
Patch by Guo Ci Teo. |
| 45138 |
|
| 45139 |
- bpo-26316: Fix variable name typo in Argument Clinic. |
| 45140 |
|
| 45141 |
- bpo-25440: Fix output of python-config --extension-suffix. |
| 45142 |
|
| 45143 |
- bpo-25154: The pyvenv script has been deprecated in favour of ``python3 -m |
| 45144 |
venv``. |
| 45145 |
|
| 45146 |
C API |
| 45147 |
----- |
| 45148 |
|
| 45149 |
- bpo-26312: SystemError is now raised in all programming bugs with using |
| 45150 |
PyArg_ParseTupleAndKeywords(). RuntimeError did raised before in some |
| 45151 |
programming bugs. |
| 45152 |
|
| 45153 |
- bpo-26198: ValueError is now raised instead of TypeError on buffer |
| 45154 |
overflow in parsing "es#" and "et#" format units. SystemError is now |
| 45155 |
raised instead of TypeError on programmatical error in parsing format |
| 45156 |
string. |
| 45157 |
|
| 45158 |
|
| 45159 |
What's New in Python 3.5.5 final? |
| 45160 |
================================= |
| 45161 |
|
| 45162 |
*Release date: 2018-02-04* |
| 45163 |
|
| 45164 |
There were no new changes in version 3.5.5. |
| 45165 |
|
| 45166 |
|
| 45167 |
|
| 45168 |
What's New in Python 3.5.5 release candidate 1? |
| 45169 |
=============================================== |
| 45170 |
|
| 45171 |
*Release date: 2018-01-23* |
| 45172 |
|
| 45173 |
Security |
| 45174 |
-------- |
| 45175 |
|
| 45176 |
- bpo-32551: The ``sys.path[0]`` initialization change for bpo-29139 caused |
| 45177 |
a regression by revealing an inconsistency in how sys.path is initialized |
| 45178 |
when executing ``__main__`` from a zipfile, directory, or other import |
| 45179 |
location. This is considered a potential security issue, as it may lead to |
| 45180 |
privileged processes unexpectedly loading code from user controlled |
| 45181 |
directories in situations where that was not previously the case. The |
| 45182 |
interpreter now consistently avoids ever adding the import location's |
| 45183 |
parent directory to ``sys.path``, and ensures no other ``sys.path`` |
| 45184 |
entries are inadvertently modified when inserting the import location |
| 45185 |
named on the command line. (Originally reported as bpo-29723 against |
| 45186 |
Python 3.6rc1, but it was missed at the time that the then upcoming Python |
| 45187 |
3.5.4 release would also be affected) |
| 45188 |
|
| 45189 |
- bpo-30657: Fixed possible integer overflow in PyBytes_DecodeEscape, |
| 45190 |
:cve:`2017-1000158`. Original patch by Jay Bosamiya; rebased to Python 3 |
| 45191 |
by Miro Hrončok. |
| 45192 |
|
| 45193 |
- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to |
| 45194 |
get security fixes. |
| 45195 |
|
| 45196 |
Core and Builtins |
| 45197 |
----------------- |
| 45198 |
|
| 45199 |
- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which |
| 45200 |
doesn't call ``PyObject_GC_UnTrack()``. |
| 45201 |
|
| 45202 |
Library |
| 45203 |
------- |
| 45204 |
|
| 45205 |
- bpo-32072: Fixed issues with binary plists: Fixed saving bytearrays. |
| 45206 |
Identical objects will be saved only once. Equal references will be load |
| 45207 |
as identical objects. Added support for saving and loading recursive data |
| 45208 |
structures. |
| 45209 |
|
| 45210 |
- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of |
| 45211 |
partial characters for UTF-8 input (libexpat bug 115): |
| 45212 |
https://github.com/libexpat/libexpat/issues/115 |
| 45213 |
|
| 45214 |
|
| 45215 |
What's New in Python 3.5.4 final? |
| 45216 |
================================= |
| 45217 |
|
| 45218 |
*Release date: 2017-08-07* |
| 45219 |
|
| 45220 |
Library |
| 45221 |
------- |
| 45222 |
|
| 45223 |
- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that |
| 45224 |
contains CR or LF. Patch by Donghee Na. |
| 45225 |
|
| 45226 |
|
| 45227 |
What's New in Python 3.5.4 release candidate 1? |
| 45228 |
=============================================== |
| 45229 |
|
| 45230 |
*Release date: 2017-07-23* |
| 45231 |
|
| 45232 |
Security |
| 45233 |
-------- |
| 45234 |
|
| 45235 |
- bpo-30730: Prevent environment variables injection in subprocess on |
| 45236 |
Windows. Prevent passing other environment variables and command |
| 45237 |
arguments. |
| 45238 |
|
| 45239 |
- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple |
| 45240 |
security vulnerabilities including: :cve:`2017-9233` (External entity |
| 45241 |
infinite loop DoS), :cve:`2016-9063` (Integer overflow, re-fix), |
| 45242 |
:cve:`2016-0718` (Fix regression bugs from 2.2.0's fix to |
| 45243 |
:cve:`2016-0718`) and :cve:`2012-0876` (Counter hash flooding with |
| 45244 |
SipHash). Note: the :cve:`2016-5300` (Use os-specific entropy sources like |
| 45245 |
getrandom) doesn't impact Python, since Python already gets entropy from |
| 45246 |
the OS to set the expat secret using ``XML_SetHashSalt()``. |
| 45247 |
|
| 45248 |
- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For |
| 45249 |
example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the |
| 45250 |
``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an |
| 45251 |
authentication (``login@host``). |
| 45252 |
|
| 45253 |
- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of |
| 45254 |
:cve:`2016-0718` and :cve:`2016-4472`. See |
| 45255 |
https://sourceforge.net/p/expat/bugs/537/ for more information. |
| 45256 |
|
| 45257 |
Core and Builtins |
| 45258 |
----------------- |
| 45259 |
|
| 45260 |
- bpo-30876: Relative import from unloaded package now reimports the package |
| 45261 |
instead of failing with SystemError. Relative import from non-package now |
| 45262 |
fails with ImportError rather than SystemError. |
| 45263 |
|
| 45264 |
- bpo-30765: Avoid blocking in pthread_mutex_lock() when |
| 45265 |
PyThread_acquire_lock() is asked not to block. |
| 45266 |
|
| 45267 |
- bpo-27945: Fixed various segfaults with dict when input collections are |
| 45268 |
mutated during searching, inserting or comparing. Based on patches by |
| 45269 |
Duane Griffin and Tim Mitchell. |
| 45270 |
|
| 45271 |
- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for |
| 45272 |
non-interned attribute names. Based on patch by Eryk Sun. |
| 45273 |
|
| 45274 |
- bpo-29935: Fixed error messages in the index() method of tuple, list and |
| 45275 |
deque when pass indices of wrong type. |
| 45276 |
|
| 45277 |
- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises |
| 45278 |
:exc:`OverflowError`. |
| 45279 |
|
| 45280 |
- bpo-29600: Fix wrapping coroutine return values in StopIteration. |
| 45281 |
|
| 45282 |
- bpo-29537: Restore runtime compatibility with bytecode files generated by |
| 45283 |
CPython 3.5.0 to 3.5.2, and adjust the eval loop to avoid the problems |
| 45284 |
that could be caused by the malformed variant of the |
| 45285 |
BUILD_MAP_UNPACK_WITH_CALL opcode that they may contain. Patch by Petr |
| 45286 |
Viktorin, Serhiy Storchaka, and Nick Coghlan. |
| 45287 |
|
| 45288 |
- bpo-28598: Support __rmod__ for subclasses of str being called before |
| 45289 |
str.__mod__. Patch by Martijn Pieters. |
| 45290 |
|
| 45291 |
- bpo-29602: Fix incorrect handling of signed zeros in complex constructor |
| 45292 |
for complex subclasses and for inputs having a __complex__ method. Patch |
| 45293 |
by Serhiy Storchaka. |
| 45294 |
|
| 45295 |
- bpo-29347: Fixed possibly dereferencing undefined pointers when creating |
| 45296 |
weakref objects. |
| 45297 |
|
| 45298 |
- bpo-29438: Fixed use-after-free problem in key sharing dict. |
| 45299 |
|
| 45300 |
- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0]. |
| 45301 |
|
| 45302 |
- bpo-29337: Fixed possible BytesWarning when compare the code objects. |
| 45303 |
Warnings could be emitted at compile time. |
| 45304 |
|
| 45305 |
- bpo-29478: If max_line_length=None is specified while using the Compat32 |
| 45306 |
policy, it is no longer ignored. Patch by Mircea Cosbuc. |
| 45307 |
|
| 45308 |
Library |
| 45309 |
------- |
| 45310 |
|
| 45311 |
- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound |
| 45312 |
builtin functions. Patch by Aaron Gallagher. |
| 45313 |
|
| 45314 |
- bpo-30961: Fix decrementing a borrowed reference in tracemalloc. |
| 45315 |
|
| 45316 |
- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the |
| 45317 |
thread completes, even if the thread was started by the same process which |
| 45318 |
created the queue. |
| 45319 |
|
| 45320 |
- bpo-29854: Fix segfault in readline when using readline's history-size |
| 45321 |
option. Patch by Nir Soffer. |
| 45322 |
|
| 45323 |
- bpo-30807: signal.setitimer() may disable the timer when passed a tiny |
| 45324 |
value. Tiny values (such as 1e-6) are valid non-zero values for |
| 45325 |
setitimer(), which is specified as taking microsecond-resolution |
| 45326 |
intervals. However, on some platform, our conversion routine could convert |
| 45327 |
1e-6 into a zero interval, therefore disabling the timer instead of |
| 45328 |
(re-)scheduling it. |
| 45329 |
|
| 45330 |
- bpo-30441: Fix bug when modifying os.environ while iterating over it |
| 45331 |
|
| 45332 |
- bpo-30532: Fix email header value parser dropping folding white space in |
| 45333 |
certain cases. |
| 45334 |
|
| 45335 |
- bpo-29169: Update zlib to 1.2.11. |
| 45336 |
|
| 45337 |
- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called |
| 45338 |
with bytes-like argument. |
| 45339 |
|
| 45340 |
- bpo-30746: Prohibited the '=' character in environment variable names in |
| 45341 |
``os.putenv()`` and ``os.spawn*()``. |
| 45342 |
|
| 45343 |
- bpo-29755: Fixed the lgettext() family of functions in the gettext module. |
| 45344 |
They now always return bytes. |
| 45345 |
|
| 45346 |
- bpo-30645: Fix path calculation in imp.load_package(), fixing it for cases |
| 45347 |
when a package is only shipped with bytecodes. Patch by Alexandru |
| 45348 |
Ardelean. |
| 45349 |
|
| 45350 |
- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a |
| 45351 |
reference cycle to not keep objects alive longer than expected. |
| 45352 |
|
| 45353 |
- bpo-30149: inspect.signature() now supports callables with |
| 45354 |
variable-argument parameters wrapped with partialmethod. Patch by Donghee |
| 45355 |
Na. |
| 45356 |
|
| 45357 |
- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects. |
| 45358 |
Patch by Sanjay Sundaresan. |
| 45359 |
|
| 45360 |
- bpo-24484: Avoid race condition in multiprocessing cleanup. |
| 45361 |
|
| 45362 |
- bpo-28994: The traceback no longer displayed for SystemExit raised in a |
| 45363 |
callback registered by atexit. |
| 45364 |
|
| 45365 |
- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was |
| 45366 |
called. |
| 45367 |
|
| 45368 |
- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add |
| 45369 |
support for ContextManager on all versions. Original PRs by Jelle Zijlstra |
| 45370 |
and Ivan Levkivskyi |
| 45371 |
|
| 45372 |
- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl |
| 45373 |
implementation. Patch by Michaël Sghaïer. |
| 45374 |
|
| 45375 |
- bpo-29743: Closing transport during handshake process leaks open socket. |
| 45376 |
Patch by Nikolay Kim |
| 45377 |
|
| 45378 |
- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu |
| 45379 |
Sornay. |
| 45380 |
|
| 45381 |
- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore |
| 45382 |
EINVAL on stdin.write() if the child process is still running but closed |
| 45383 |
the pipe. |
| 45384 |
|
| 45385 |
- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot |
| 45386 |
handle IPv6 addresses. |
| 45387 |
|
| 45388 |
- bpo-29960: Preserve generator state when _random.Random.setstate() raises |
| 45389 |
an exception. Patch by Bryan Olson. |
| 45390 |
|
| 45391 |
- bpo-30414: multiprocessing.Queue._feed background running thread do not |
| 45392 |
break from main loop on exception. |
| 45393 |
|
| 45394 |
- bpo-30003: Fix handling escape characters in HZ codec. Based on patch by |
| 45395 |
Ma Lin. |
| 45396 |
|
| 45397 |
- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn* |
| 45398 |
and *forkserver* start methods. |
| 45399 |
|
| 45400 |
- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error |
| 45401 |
(code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted. |
| 45402 |
This error occurs sometimes on SSL connections. |
| 45403 |
|
| 45404 |
- bpo-30375: Warnings emitted when compile a regular expression now always |
| 45405 |
point to the line in the user code. Previously they could point into |
| 45406 |
inners of the re module if emitted from inside of groups or conditionals. |
| 45407 |
|
| 45408 |
- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running |
| 45409 |
coroutine and the coroutine returned without any more ``await``. |
| 45410 |
|
| 45411 |
- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma |
| 45412 |
Lin. |
| 45413 |
|
| 45414 |
- bpo-26293: Change resulted because of zipfile breakage. (See also: |
| 45415 |
bpo-29094) |
| 45416 |
|
| 45417 |
- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. |
| 45418 |
Misusing them could cause memory leaks or crashes. Now scanner and |
| 45419 |
encoder objects are completely initialized in the __new__ methods. |
| 45420 |
|
| 45421 |
- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process |
| 45422 |
when Ctrl-C is received. |
| 45423 |
|
| 45424 |
- bpo-28556: Various updates to typing module: add typing.NoReturn type, use |
| 45425 |
WrapperDescriptorType, minor bug-fixes. Original PRs by Jim |
| 45426 |
Fasarakis-Hilliard and Ivan Levkivskyi. |
| 45427 |
|
| 45428 |
- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux. |
| 45429 |
|
| 45430 |
- bpo-30070: Fixed leaks and crashes in errors handling in the parser |
| 45431 |
module. |
| 45432 |
|
| 45433 |
- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when |
| 45434 |
readline() or __next__() respectively return non-sizeable object. Fixed |
| 45435 |
possible other errors caused by not checking results of PyObject_Size(), |
| 45436 |
PySequence_Size(), or PyMapping_Size(). |
| 45437 |
|
| 45438 |
- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint |
| 45439 |
is present. |
| 45440 |
|
| 45441 |
- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True. |
| 45442 |
Patch by Armin Rigo. |
| 45443 |
|
| 45444 |
- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in |
| 45445 |
contextlib.contextmanager. Patch by Siddharth Velankar. |
| 45446 |
|
| 45447 |
- bpo-29998: Pickling and copying ImportError now preserves name and path |
| 45448 |
attributes. |
| 45449 |
|
| 45450 |
- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering |
| 45451 |
long runs of empty iterables. |
| 45452 |
|
| 45453 |
- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions |
| 45454 |
and wrong types. |
| 45455 |
|
| 45456 |
- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an |
| 45457 |
exception at the very first of an iterable may swallow the exception or |
| 45458 |
make the program hang. Patch by Davin Potts and Xiang Zhang. |
| 45459 |
|
| 45460 |
- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when |
| 45461 |
the OS gives priority to errors such as EACCES over EEXIST. |
| 45462 |
|
| 45463 |
- bpo-29861: Release references to tasks, their arguments and their results |
| 45464 |
as soon as they are finished in multiprocessing.Pool. |
| 45465 |
|
| 45466 |
- bpo-29884: faulthandler: Restore the old sigaltstack during teardown. |
| 45467 |
Patch by Christophe Zeitouny. |
| 45468 |
|
| 45469 |
- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. |
| 45470 |
|
| 45471 |
- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords |
| 45472 |
are not strings. Patch by Michael Seifert. |
| 45473 |
|
| 45474 |
- bpo-29742: get_extra_info() raises exception if get called on closed ssl |
| 45475 |
transport. Patch by Nikolay Kim. |
| 45476 |
|
| 45477 |
- bpo-8256: Fixed possible failing or crashing input() if attributes |
| 45478 |
"encoding" or "errors" of sys.stdin or sys.stdout are not set or are not |
| 45479 |
strings. |
| 45480 |
|
| 45481 |
- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting |
| 45482 |
big intables (objects that have __int__) as elements. Patch by Oren |
| 45483 |
Milman. |
| 45484 |
|
| 45485 |
- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other |
| 45486 |
exception) to exception(s) raised in the dispatched methods. Patch by Petr |
| 45487 |
Motejlek. |
| 45488 |
|
| 45489 |
- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes |
| 45490 |
before all pipes are closed. |
| 45491 |
|
| 45492 |
- bpo-29703: Fix asyncio to support instantiation of new event loops in |
| 45493 |
child processes. |
| 45494 |
|
| 45495 |
- bpo-29376: Fix assertion error in threading._DummyThread.is_alive(). |
| 45496 |
|
| 45497 |
- bpo-29110: Fix file object leak in aifc.open() when file is given as a |
| 45498 |
filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. |
| 45499 |
|
| 45500 |
- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter |
| 45501 |
anymore. Patch written by Jiajun Huang. |
| 45502 |
|
| 45503 |
- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no |
| 45504 |
longer affects a partial object after creation. |
| 45505 |
|
| 45506 |
- bpo-28556: Various updates to typing module: typing.Counter, |
| 45507 |
typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle |
| 45508 |
Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa. |
| 45509 |
|
| 45510 |
- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python |
| 45511 |
3.6.0: check minimum and maximum years. |
| 45512 |
|
| 45513 |
- bpo-29519: Fix weakref spewing exceptions during interpreter shutdown when |
| 45514 |
used with a rare combination of multiprocessing and custom codecs. |
| 45515 |
|
| 45516 |
- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir |
| 45517 |
|
| 45518 |
- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the |
| 45519 |
match object. Based on patch by WGH. |
| 45520 |
|
| 45521 |
- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited |
| 45522 |
to a stopped instead of terminated state (ex: when under ptrace). |
| 45523 |
|
| 45524 |
- bpo-29290: Fix a regression in argparse that help messages would wrap at |
| 45525 |
non-breaking spaces. |
| 45526 |
|
| 45527 |
- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY. |
| 45528 |
|
| 45529 |
- bpo-29011: Fix an important omission by adding Deque to the typing module. |
| 45530 |
|
| 45531 |
- bpo-29219: Fixed infinite recursion in the repr of uninitialized |
| 45532 |
ctypes.CDLL instances. |
| 45533 |
|
| 45534 |
- bpo-28969: Fixed race condition in C implementation of |
| 45535 |
functools.lru_cache. KeyError could be raised when cached function with |
| 45536 |
full cache was simultaneously called from different threads with the same |
| 45537 |
uncached arguments. |
| 45538 |
|
| 45539 |
- bpo-29142: In urllib.request, suffixes in no_proxy environment variable |
| 45540 |
with leading dots could match related hostnames again (e.g. .b.c matches |
| 45541 |
a.b.c). Patch by Milan Oberkirch. |
| 45542 |
|
| 45543 |
Documentation |
| 45544 |
------------- |
| 45545 |
|
| 45546 |
- bpo-30176: Add missing attribute related constants in curses |
| 45547 |
documentation. |
| 45548 |
|
| 45549 |
- bpo-26985: Add missing info of code object in inspect documentation. |
| 45550 |
|
| 45551 |
- bpo-28929: Link the documentation to its source file on GitHub. |
| 45552 |
|
| 45553 |
- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer |
| 45554 |
to aiosmtpd, a third-party asyncio-based replacement. |
| 45555 |
|
| 45556 |
- bpo-26355: Add canonical header link on each page to corresponding major |
| 45557 |
version of the documentation. Patch by Matthias Bussonnier. |
| 45558 |
|
| 45559 |
- bpo-29349: Fix Python 2 syntax in code for building the documentation. |
| 45560 |
|
| 45561 |
Tests |
| 45562 |
----- |
| 45563 |
|
| 45564 |
- bpo-30822: Fix regrtest command line parser to allow passing -u |
| 45565 |
extralargefile to run test_zipfile64. |
| 45566 |
|
| 45567 |
- bpo-30383: regrtest: Enhance regrtest and backport features from the |
| 45568 |
master branch. Add options: --coverage, --testdir, --list-tests (list test |
| 45569 |
files, don't run them), --list-cases (list test identifiers, don't run |
| 45570 |
them, :issue:`30523`), --matchfile (load a list of test filters from a |
| 45571 |
text file, :issue:`30540`), --slowest (alias to --slow). Enhance output: |
| 45572 |
add timestamp, test result, currently running tests, "Tests result: xxx" |
| 45573 |
summary with total duration, etc. Fix reference leak hunting in regrtest, |
| 45574 |
--huntrleaks: regrtest now warms up caches, create explicitly all internal |
| 45575 |
singletons which are created on demand to prevent false positives when |
| 45576 |
checking for reference leaks. (:issue:`30675`). |
| 45577 |
|
| 45578 |
- bpo-30357: test_thread: setUp() now uses support.threading_setup() and |
| 45579 |
support.threading_cleanup() to wait until threads complete to avoid random |
| 45580 |
side effects on following tests. Initial patch written by Grzegorz |
| 45581 |
Grzywacz. |
| 45582 |
|
| 45583 |
- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. Skip |
| 45584 |
some tests of select.poll when running on macOS due to unresolved issues |
| 45585 |
with the underlying system poll function on some macOS versions. |
| 45586 |
|
| 45587 |
- bpo-30197: Enhanced functions swap_attr() and swap_item() in the |
| 45588 |
test.support module. They now work when delete replaced attribute or item |
| 45589 |
inside the with statement. The old value of the attribute or item (or |
| 45590 |
None if it doesn't exist) now will be assigned to the target of the "as" |
| 45591 |
clause, if there is one. |
| 45592 |
|
| 45593 |
- bpo-29571: to match the behaviour of the ``re.LOCALE`` flag, |
| 45594 |
test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` |
| 45595 |
to determine the candidate encoding for the test regex (allowing it to |
| 45596 |
correctly skip the test when the default locale encoding is a multi-byte |
| 45597 |
encoding) |
| 45598 |
|
| 45599 |
Build |
| 45600 |
----- |
| 45601 |
|
| 45602 |
- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``, |
| 45603 |
``make install`` and some other make targets when configured with |
| 45604 |
``--enable-optimizations``. |
| 45605 |
|
| 45606 |
- bpo-23404: Don't regenerate generated files based on file modification |
| 45607 |
time anymore: the action is now explicit. Replace ``make touch`` with |
| 45608 |
``make regen-all``. |
| 45609 |
|
| 45610 |
- bpo-29643: Fix ``--enable-optimization`` didn't work. |
| 45611 |
|
| 45612 |
Windows |
| 45613 |
------- |
| 45614 |
|
| 45615 |
- bpo-30687: Locate msbuild.exe on Windows when building rather than |
| 45616 |
vcvarsall.bat |
| 45617 |
|
| 45618 |
- bpo-29392: Prevent crash when passing invalid arguments into msvcrt |
| 45619 |
module. |
| 45620 |
|
| 45621 |
C API |
| 45622 |
----- |
| 45623 |
|
| 45624 |
- bpo-27867: Function PySlice_GetIndicesEx() is replaced with a macro if |
| 45625 |
Py_LIMITED_API is set to the value between 0x03050400 and 0x03060000 (not |
| 45626 |
including) or 0x03060100 or higher. |
| 45627 |
|
| 45628 |
- bpo-29083: Fixed the declaration of some public API functions. |
| 45629 |
PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in |
| 45630 |
limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and |
| 45631 |
Py_BuildValue() were not available in limited API of version < 3.3 when |
| 45632 |
PY_SSIZE_T_CLEAN is defined. |
| 45633 |
|
| 45634 |
|
| 45635 |
What's New in Python 3.5.3 final? |
| 45636 |
================================= |
| 45637 |
|
| 45638 |
*Release date: 2017-01-17* |
| 45639 |
|
| 45640 |
There were no code changes between 3.5.3rc1 and 3.5.3 final. |
| 45641 |
|
| 45642 |
|
| 45643 |
|
| 45644 |
What's New in Python 3.5.3 release candidate 1? |
| 45645 |
=============================================== |
| 45646 |
|
| 45647 |
*Release date: 2017-01-02* |
| 45648 |
|
| 45649 |
Security |
| 45650 |
-------- |
| 45651 |
|
| 45652 |
- bpo-27278: Fix os.urandom() implementation using getrandom() on Linux. |
| 45653 |
Truncate size to INT_MAX and loop until we collected enough random bytes, |
| 45654 |
instead of casting a directly Py_ssize_t to int. |
| 45655 |
|
| 45656 |
- bpo-22636: Avoid shell injection problems with ctypes.util.find_library(). |
| 45657 |
|
| 45658 |
Core and Builtins |
| 45659 |
----------------- |
| 45660 |
|
| 45661 |
- bpo-29073: bytearray formatting no longer truncates on first null byte. |
| 45662 |
|
| 45663 |
- bpo-28932: Do not include <sys/random.h> if it does not exist. |
| 45664 |
|
| 45665 |
- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must |
| 45666 |
not convert combined table into split table. |
| 45667 |
|
| 45668 |
- bpo-25677: Correct the positioning of the syntax error caret for indented |
| 45669 |
blocks. Based on patch by Michael Layzell. |
| 45670 |
|
| 45671 |
- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate |
| 45672 |
form. |
| 45673 |
|
| 45674 |
- bpo-28512: Fixed setting the offset attribute of SyntaxError by |
| 45675 |
PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject(). |
| 45676 |
|
| 45677 |
- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy |
| 45678 |
bug caused by a monkey-patched len() function. |
| 45679 |
|
| 45680 |
- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X |
| 45681 |
when decode astral characters. Patch by Xiang Zhang. |
| 45682 |
|
| 45683 |
- bpo-19398: Extra slash no longer added to sys.path components in case of |
| 45684 |
empty compile-time PYTHONPATH components. |
| 45685 |
|
| 45686 |
- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug |
| 45687 |
build. |
| 45688 |
|
| 45689 |
- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception |
| 45690 |
loss in PyTraceBack_Here(). |
| 45691 |
|
| 45692 |
- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). |
| 45693 |
Patch by Xiang Zhang. |
| 45694 |
|
| 45695 |
- bpo-28376: The type of long range iterator is now registered as Iterator. |
| 45696 |
Patch by Oren Milman. |
| 45697 |
|
| 45698 |
- bpo-28376: The constructor of range_iterator now checks that step is not |
| 45699 |
0. Patch by Oren Milman. |
| 45700 |
|
| 45701 |
- bpo-26906: Resolving special methods of uninitialized type now causes |
| 45702 |
implicit initialization of the type instead of a fail. |
| 45703 |
|
| 45704 |
- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original |
| 45705 |
patch by Niklas Koep. |
| 45706 |
|
| 45707 |
- bpo-24098: Fixed possible crash when AST is changed in process of |
| 45708 |
compiling it. |
| 45709 |
|
| 45710 |
- bpo-28350: String constants with null character no longer interned. |
| 45711 |
|
| 45712 |
- bpo-26617: Fix crash when GC runs during weakref callbacks. |
| 45713 |
|
| 45714 |
- bpo-27942: String constants now interned recursively in tuples and |
| 45715 |
frozensets. |
| 45716 |
|
| 45717 |
- bpo-21578: Fixed misleading error message when ImportError called with |
| 45718 |
invalid keyword args. |
| 45719 |
|
| 45720 |
- bpo-28203: Fix incorrect type in error message from ``complex(1.0, |
| 45721 |
{2:3})``. Patch by Soumya Sharma. |
| 45722 |
|
| 45723 |
- bpo-27955: Fallback on reading /dev/urandom device when the getrandom() |
| 45724 |
syscall fails with EPERM, for example when blocked by SECCOMP. |
| 45725 |
|
| 45726 |
- bpo-28131: Fix a regression in zipimport's compile_source(). zipimport |
| 45727 |
should use the same optimization level as the interpreter. |
| 45728 |
|
| 45729 |
- bpo-25221: Fix corrupted result from PyLong_FromLong(0) when Python is |
| 45730 |
compiled with NSMALLPOSINTS = 0. |
| 45731 |
|
| 45732 |
- bpo-25758: Prevents zipimport from unnecessarily encoding a filename |
| 45733 |
(patch by Eryk Sun) |
| 45734 |
|
| 45735 |
- bpo-28189: dictitems_contains no longer swallows compare errors. (Patch by |
| 45736 |
Xiang Zhang) |
| 45737 |
|
| 45738 |
- bpo-27812: Properly clear out a generator's frame's backreference to the |
| 45739 |
generator to prevent crashes in frame.clear(). |
| 45740 |
|
| 45741 |
- bpo-27811: Fix a crash when a coroutine that has not been awaited is |
| 45742 |
finalized with warnings-as-errors enabled. |
| 45743 |
|
| 45744 |
- bpo-27587: Fix another issue found by PVS-Studio: Null pointer check after |
| 45745 |
use of 'def' in _PyState_AddModule(). Initial patch by Christian Heimes. |
| 45746 |
|
| 45747 |
- bpo-26020: set literal evaluation order did not match documented |
| 45748 |
behaviour. |
| 45749 |
|
| 45750 |
- bpo-27782: Multi-phase extension module import now correctly allows the |
| 45751 |
``m_methods`` field to be used to add module level functions to instances |
| 45752 |
of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang. |
| 45753 |
|
| 45754 |
- bpo-27936: The round() function accepted a second None argument for some |
| 45755 |
types but not for others. Fixed the inconsistency by accepting None for |
| 45756 |
all numeric types. |
| 45757 |
|
| 45758 |
- bpo-27487: Warn if a submodule argument to "python -m" or |
| 45759 |
runpy.run_module() is found in sys.modules after parent packages are |
| 45760 |
imported, but before the submodule is executed. |
| 45761 |
|
| 45762 |
- bpo-27558: Fix a SystemError in the implementation of "raise" statement. |
| 45763 |
In a brand new thread, raise a RuntimeError since there is no active |
| 45764 |
exception to reraise. Patch written by Xiang Zhang. |
| 45765 |
|
| 45766 |
- bpo-27419: Standard __import__() no longer look up "__import__" in globals |
| 45767 |
or builtins for importing submodules or "from import". Fixed handling an |
| 45768 |
error of non-string package name. |
| 45769 |
|
| 45770 |
- bpo-27083: Respect the PYTHONCASEOK environment variable under Windows. |
| 45771 |
|
| 45772 |
- bpo-27514: Make having too many statically nested blocks a SyntaxError |
| 45773 |
instead of SystemError. |
| 45774 |
|
| 45775 |
- bpo-27473: Fixed possible integer overflow in bytes and bytearray |
| 45776 |
concatenations. Patch by Xiang Zhang. |
| 45777 |
|
| 45778 |
- bpo-27507: Add integer overflow check in bytearray.extend(). Patch by |
| 45779 |
Xiang Zhang. |
| 45780 |
|
| 45781 |
- bpo-27581: Don't rely on wrapping for overflow check in |
| 45782 |
PySequence_Tuple(). Patch by Xiang Zhang. |
| 45783 |
|
| 45784 |
- bpo-27443: __length_hint__() of bytearray iterators no longer return a |
| 45785 |
negative integer for a resized bytearray. |
| 45786 |
|
| 45787 |
- bpo-27942: Fix memory leak in codeobject.c |
| 45788 |
|
| 45789 |
Library |
| 45790 |
------- |
| 45791 |
|
| 45792 |
- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a |
| 45793 |
context. Patch by Sam Breese. |
| 45794 |
|
| 45795 |
- bpo-29094: Offsets in a ZIP file created with extern file object and modes |
| 45796 |
"w" and "x" now are relative to the start of the file. |
| 45797 |
|
| 45798 |
- bpo-13051: Fixed recursion errors in large or resized |
| 45799 |
curses.textpad.Textbox. Based on patch by Tycho Andersen. |
| 45800 |
|
| 45801 |
- bpo-29119: Fix weakrefs in the pure python version of |
| 45802 |
collections.OrderedDict move_to_end() method. Contributed by Andra |
| 45803 |
Bogildea. |
| 45804 |
|
| 45805 |
- bpo-9770: curses.ascii predicates now work correctly with negative |
| 45806 |
integers. |
| 45807 |
|
| 45808 |
- bpo-28427: old keys should not remove new values from WeakValueDictionary |
| 45809 |
when collecting from another thread. |
| 45810 |
|
| 45811 |
- bpo-28923: Remove editor artifacts from Tix.py. |
| 45812 |
|
| 45813 |
- bpo-28871: Fixed a crash when deallocate deep ElementTree. |
| 45814 |
|
| 45815 |
- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and |
| 45816 |
WeakValueDictionary.pop() when a GC collection happens in another thread. |
| 45817 |
|
| 45818 |
- bpo-20191: Fixed a crash in resource.prlimit() when pass a sequence that |
| 45819 |
doesn't own its elements as limits. |
| 45820 |
|
| 45821 |
- bpo-28779: multiprocessing.set_forkserver_preload() would crash the |
| 45822 |
forkserver process if a preloaded module instantiated some multiprocessing |
| 45823 |
objects such as locks. |
| 45824 |
|
| 45825 |
- bpo-28847: dbm.dumb now supports reading read-only files and no longer |
| 45826 |
writes the index file when it is not changed. |
| 45827 |
|
| 45828 |
- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and |
| 45829 |
from_buffer_copy() methods on abstract classes like Array. |
| 45830 |
|
| 45831 |
- bpo-28732: Fix crash in os.spawnv() with no elements in args |
| 45832 |
|
| 45833 |
- bpo-28485: Always raise ValueError for negative |
| 45834 |
compileall.compile_dir(workers=...) parameter, even when multithreading is |
| 45835 |
unavailable. |
| 45836 |
|
| 45837 |
- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the |
| 45838 |
garbage collector is invoked in other thread. Based on patch by Sebastian |
| 45839 |
Cufre. |
| 45840 |
|
| 45841 |
- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if |
| 45842 |
given empty data twice. Patch by Benjamin Fogle. |
| 45843 |
|
| 45844 |
- bpo-28549: Fixed segfault in curses's addch() with ncurses6. |
| 45845 |
|
| 45846 |
- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar |
| 45847 |
file with compression before trying to open it without compression. |
| 45848 |
Otherwise it had 50% chance failed with ignore_zeros=True. |
| 45849 |
|
| 45850 |
- bpo-23262: The webbrowser module now supports Firefox 36+ and derived |
| 45851 |
browsers. Based on patch by Oleg Broytman. |
| 45852 |
|
| 45853 |
- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused |
| 45854 |
by representing the scale as float value internally in Tk. tkinter.IntVar |
| 45855 |
now works if float value is set to underlying Tk variable. |
| 45856 |
|
| 45857 |
- bpo-28255: calendar.TextCalendar().prmonth() no longer prints a space at |
| 45858 |
the start of new line after printing a month's calendar. Patch by Xiang |
| 45859 |
Zhang. |
| 45860 |
|
| 45861 |
- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces. |
| 45862 |
Based on patch by Kaarle Ritvanen. |
| 45863 |
|
| 45864 |
- bpo-28353: os.fwalk() no longer fails on broken links. |
| 45865 |
|
| 45866 |
- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a |
| 45867 |
workaround to Tix library bug. |
| 45868 |
|
| 45869 |
- bpo-28488: shutil.make_archive() no longer add entry "./" to ZIP archive. |
| 45870 |
|
| 45871 |
- bpo-24452: Make webbrowser support Chrome on Mac OS X. |
| 45872 |
|
| 45873 |
- bpo-20766: Fix references leaked by pdb in the handling of SIGINT |
| 45874 |
handlers. |
| 45875 |
|
| 45876 |
- bpo-26293: Fixed writing ZIP files that starts not from the start of the |
| 45877 |
file. Offsets in ZIP file now are relative to the start of the archive in |
| 45878 |
conforming to the specification. |
| 45879 |
|
| 45880 |
- bpo-28321: Fixed writing non-BMP characters with binary format in |
| 45881 |
plistlib. |
| 45882 |
|
| 45883 |
- bpo-28322: Fixed possible crashes when unpickle itertools objects from |
| 45884 |
incorrect pickle data. Based on patch by John Leitch. |
| 45885 |
|
| 45886 |
- Fix possible integer overflows and crashes in the mmap module with unusual |
| 45887 |
usage patterns. |
| 45888 |
|
| 45889 |
- bpo-1703178: Fix the ability to pass the --link-objects option to the |
| 45890 |
distutils build_ext command. |
| 45891 |
|
| 45892 |
- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and |
| 45893 |
9999-12. Methods itermonthdays() and itermonthdays2() are reimplemented so |
| 45894 |
that they don't call itermonthdates() which can cause datetime.date |
| 45895 |
under/overflow. |
| 45896 |
|
| 45897 |
- bpo-28275: Fixed possible use after free in the decompress() methods of |
| 45898 |
the LZMADecompressor and BZ2Decompressor classes. Original patch by John |
| 45899 |
Leitch. |
| 45900 |
|
| 45901 |
- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation() |
| 45902 |
if pass invalid string-like object as a name. Patch by Xiang Zhang. |
| 45903 |
|
| 45904 |
- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. |
| 45905 |
Patch by Madison May. |
| 45906 |
|
| 45907 |
- bpo-27611: Fixed support of default root window in the tkinter.tix module. |
| 45908 |
|
| 45909 |
- bpo-27348: In the traceback module, restore the formatting of exception |
| 45910 |
messages like "Exception: None". This fixes a regression introduced in |
| 45911 |
3.5a2. |
| 45912 |
|
| 45913 |
- bpo-25651: Allow false values to be used for msg parameter of subTest(). |
| 45914 |
|
| 45915 |
- bpo-27932: Prevent memory leak in win32_ver(). |
| 45916 |
|
| 45917 |
- Fix UnboundLocalError in socket._sendfile_use_sendfile. |
| 45918 |
|
| 45919 |
- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of |
| 45920 |
os.stat(). Patch by Eryk Sun. |
| 45921 |
|
| 45922 |
- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an |
| 45923 |
empty bytestring is passed. |
| 45924 |
|
| 45925 |
- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. |
| 45926 |
|
| 45927 |
- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by |
| 45928 |
Gergely Imreh and Markus Holtermann. |
| 45929 |
|
| 45930 |
- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and |
| 45931 |
binascii.a2b_qp(). |
| 45932 |
|
| 45933 |
- bpo-19003: m email.generator now replaces only ``\r`` and/or ``\n`` line |
| 45934 |
endings, per the RFC, instead of all unicode line endings. |
| 45935 |
|
| 45936 |
- bpo-28019: itertools.count() no longer rounds non-integer step in range |
| 45937 |
between 1.0 and 2.0 to 1. |
| 45938 |
|
| 45939 |
- bpo-25969: Update the lib2to3 grammar to handle the unpacking |
| 45940 |
generalizations added in 3.5. |
| 45941 |
|
| 45942 |
- bpo-14977: mailcap now respects the order of the lines in the mailcap |
| 45943 |
files ("first match"), as required by RFC 1542. Patch by Michael Lazar. |
| 45944 |
|
| 45945 |
- bpo-24594: Validates persist parameter when opening MSI database |
| 45946 |
|
| 45947 |
- bpo-17582: xml.etree.ElementTree nows preserves whitespaces in attributes |
| 45948 |
(Patch by Duane Griffin. Reviewed and approved by Stefan Behnel.) |
| 45949 |
|
| 45950 |
- bpo-28047: Fixed calculation of line length used for the base64 CTE in the |
| 45951 |
new email policies. |
| 45952 |
|
| 45953 |
- bpo-27445: Don't pass str(_charset) to MIMEText.set_payload(). Patch by |
| 45954 |
Claude Paroz. |
| 45955 |
|
| 45956 |
- bpo-22450: urllib now includes an ``Accept: */*`` header among the default |
| 45957 |
headers. This makes the results of REST API requests more consistent and |
| 45958 |
predictable especially when proxy servers are involved. |
| 45959 |
|
| 45960 |
- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file |
| 45961 |
between runs given the same Grammar.txt input regardless of the hash |
| 45962 |
randomization setting. |
| 45963 |
|
| 45964 |
- bpo-27570: Avoid zero-length memcpy() etc calls with null source pointers |
| 45965 |
in the "ctypes" and "array" modules. |
| 45966 |
|
| 45967 |
- bpo-22233: Break email header lines *only* on the RFC specified CR and LF |
| 45968 |
characters, not on arbitrary unicode line breaks. This also fixes a bug |
| 45969 |
in HTTP header parsing. |
| 45970 |
|
| 45971 |
- bpo-27988: Fix email iter_attachments incorrect mutation of payload list. |
| 45972 |
|
| 45973 |
- bpo-27691: Fix ssl module's parsing of GEN_RID subject alternative name |
| 45974 |
fields in X.509 certs. |
| 45975 |
|
| 45976 |
- bpo-27850: Remove 3DES from ssl module's default cipher list to counter |
| 45977 |
measure sweet32 attack (:cve:`2016-2183`). |
| 45978 |
|
| 45979 |
- bpo-27766: Add ChaCha20 Poly1305 to ssl module's default cipher list. |
| 45980 |
(Required OpenSSL 1.1.0 or LibreSSL). |
| 45981 |
|
| 45982 |
- bpo-26470: Port ssl and hashlib module to OpenSSL 1.1.0. |
| 45983 |
|
| 45984 |
- Remove support for passing a file descriptor to os.access. It never worked |
| 45985 |
but previously didn't raise. |
| 45986 |
|
| 45987 |
- bpo-12885: Fix error when distutils encounters symlink. |
| 45988 |
|
| 45989 |
- bpo-27881: Fixed possible bugs when setting |
| 45990 |
sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang. |
| 45991 |
|
| 45992 |
- bpo-27861: Fixed a crash in sqlite3.Connection.cursor() when a factory |
| 45993 |
creates not a cursor. Patch by Xiang Zhang. |
| 45994 |
|
| 45995 |
- bpo-19884: Avoid spurious output on OS X with Gnu Readline. |
| 45996 |
|
| 45997 |
- bpo-27706: Restore deterministic behavior of random.Random().seed() for |
| 45998 |
string seeds using seeding version 1. Allows sequences of calls to |
| 45999 |
random() to exactly match those obtained in Python 2. Patch by Nofar |
| 46000 |
Schnider. |
| 46001 |
|
| 46002 |
- bpo-10513: Fix a regression in Connection.commit(). Statements should not |
| 46003 |
be reset after a commit. |
| 46004 |
|
| 46005 |
- A new version of typing.py from https://github.com/python/typing: |
| 46006 |
Collection (only for 3.6) (issue #27598). Add FrozenSet to __all__ |
| 46007 |
(upstream #261). Fix crash in _get_type_vars() (upstream #259). Remove the |
| 46008 |
dict constraint in ForwardRef._eval_type (upstream #252). |
| 46009 |
|
| 46010 |
- bpo-27539: Fix unnormalised ``Fraction.__pow__`` result in the case of |
| 46011 |
negative exponent and negative base. |
| 46012 |
|
| 46013 |
- bpo-21718: cursor.description is now available for queries using CTEs. |
| 46014 |
|
| 46015 |
- bpo-2466: posixpath.ismount now correctly recognizes mount points which |
| 46016 |
the user does not have permission to access. |
| 46017 |
|
| 46018 |
- bpo-27773: Correct some memory management errors server_hostname in |
| 46019 |
_ssl.wrap_socket(). |
| 46020 |
|
| 46021 |
- bpo-26750: unittest.mock.create_autospec() now works properly for |
| 46022 |
subclasses of property() and other data descriptors. |
| 46023 |
|
| 46024 |
- In the curses module, raise an error if window.getstr() or window.instr() |
| 46025 |
is passed a negative value. |
| 46026 |
|
| 46027 |
- bpo-27783: Fix possible usage of uninitialized memory in |
| 46028 |
operator.methodcaller. |
| 46029 |
|
| 46030 |
- bpo-27774: Fix possible Py_DECREF on unowned object in _sre. |
| 46031 |
|
| 46032 |
- bpo-27760: Fix possible integer overflow in binascii.b2a_qp. |
| 46033 |
|
| 46034 |
- bpo-27758: Fix possible integer overflow in the _csv module for large |
| 46035 |
record lengths. |
| 46036 |
|
| 46037 |
- bpo-27568: Prevent HTTPoxy attack (:cve:`2016-1000110`). Ignore the |
| 46038 |
HTTP_PROXY variable when REQUEST_METHOD environment is set, which |
| 46039 |
indicates that the script is in CGI mode. |
| 46040 |
|
| 46041 |
- bpo-27656: Do not assume sched.h defines any SCHED_* constants. |
| 46042 |
|
| 46043 |
- bpo-27130: In the "zlib" module, fix handling of large buffers (typically |
| 46044 |
4 GiB) when compressing and decompressing. Previously, inputs were |
| 46045 |
limited to 4 GiB, and compression and decompression operations did not |
| 46046 |
properly handle results of 4 GiB. |
| 46047 |
|
| 46048 |
- bpo-27533: Release GIL in nt._isdir |
| 46049 |
|
| 46050 |
- bpo-17711: Fixed unpickling by the persistent ID with protocol 0. Original |
| 46051 |
patch by Alexandre Vassalotti. |
| 46052 |
|
| 46053 |
- bpo-27522: Avoid an unintentional reference cycle in email.feedparser. |
| 46054 |
|
| 46055 |
- bpo-26844: Fix error message for imp.find_module() to refer to 'path' |
| 46056 |
instead of 'name'. Patch by Lev Maximov. |
| 46057 |
|
| 46058 |
- bpo-23804: Fix SSL zero-length recv() calls to not block and not raise an |
| 46059 |
error about unclean EOF. |
| 46060 |
|
| 46061 |
- bpo-27466: Change time format returned by http.cookie.time2netscape, |
| 46062 |
confirming the netscape cookie format and making it consistent with |
| 46063 |
documentation. |
| 46064 |
|
| 46065 |
- bpo-26664: Fix activate.fish by removing mis-use of ``$``. |
| 46066 |
|
| 46067 |
- bpo-22115: Fixed tracing Tkinter variables: trace_vdelete() with wrong |
| 46068 |
mode no longer break tracing, trace_vinfo() now always returns a list of |
| 46069 |
pairs of strings, tracing in the "u" mode now works. |
| 46070 |
|
| 46071 |
- Fix a scoping issue in importlib.util.LazyLoader which triggered an |
| 46072 |
UnboundLocalError when lazy-loading a module that was already put into |
| 46073 |
sys.modules. |
| 46074 |
|
| 46075 |
- bpo-27079: Fixed curses.ascii functions isblank(), iscntrl() and |
| 46076 |
ispunct(). |
| 46077 |
|
| 46078 |
- bpo-26754: Some functions (compile() etc) accepted a filename argument |
| 46079 |
encoded as an iterable of integers. Now only strings and byte-like objects |
| 46080 |
are accepted. |
| 46081 |
|
| 46082 |
- bpo-27048: Prevents distutils failing on Windows when environment |
| 46083 |
variables contain non-ASCII characters |
| 46084 |
|
| 46085 |
- bpo-27330: Fixed possible leaks in the ctypes module. |
| 46086 |
|
| 46087 |
- bpo-27238: Got rid of bare excepts in the turtle module. Original patch |
| 46088 |
by Jelle Zijlstra. |
| 46089 |
|
| 46090 |
- bpo-27122: When an exception is raised within the context being managed by |
| 46091 |
a contextlib.ExitStack() and one of the exit stack generators catches and |
| 46092 |
raises it in a chain, do not re-raise the original exception when exiting, |
| 46093 |
let the new chained one through. This avoids the :pep:`479` bug described |
| 46094 |
in issue25782. |
| 46095 |
|
| 46096 |
- bpo-26386: Fixed ttk.TreeView selection operations with item id's |
| 46097 |
containing spaces. |
| 46098 |
|
| 46099 |
- bpo-16182: Fix various functions in the "readline" module to use the |
| 46100 |
locale encoding, and fix get_begidx() and get_endidx() to return code |
| 46101 |
point indexes. |
| 46102 |
|
| 46103 |
- bpo-27392: Add loop.connect_accepted_socket(). Patch by Jim Fulton. |
| 46104 |
|
| 46105 |
- bpo-27930: Improved behaviour of logging.handlers.QueueListener. Thanks to |
| 46106 |
Paulo Andrade and Petr Viktorin for the analysis and patch. |
| 46107 |
|
| 46108 |
- bpo-21201: Improves readability of multiprocessing error message. Thanks |
| 46109 |
to Wojciech Walczak for patch. |
| 46110 |
|
| 46111 |
- bpo-27456: asyncio: Set TCP_NODELAY by default. |
| 46112 |
|
| 46113 |
- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by |
| 46114 |
Kevin Conway. |
| 46115 |
|
| 46116 |
- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by |
| 46117 |
Seth Michael Larson. |
| 46118 |
|
| 46119 |
- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by |
| 46120 |
iceboy. |
| 46121 |
|
| 46122 |
- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki. |
| 46123 |
|
| 46124 |
- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. |
| 46125 |
|
| 46126 |
- bpo-27759: Fix selectors incorrectly retain invalid file descriptors. |
| 46127 |
Patch by Mark Williams. |
| 46128 |
|
| 46129 |
- bpo-28368: Refuse monitoring processes if the child watcher has no loop |
| 46130 |
attached. Patch by Vincent Michel. |
| 46131 |
|
| 46132 |
- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader, |
| 46133 |
add_writer, etc. |
| 46134 |
|
| 46135 |
- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг |
| 46136 |
Марк. |
| 46137 |
|
| 46138 |
- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor. |
| 46139 |
|
| 46140 |
- bpo-28372: Fix asyncio to support formatting of non-python coroutines. |
| 46141 |
|
| 46142 |
- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг |
| 46143 |
Марк. |
| 46144 |
|
| 46145 |
- bpo-27972: Prohibit Tasks to await on themselves. |
| 46146 |
|
| 46147 |
- bpo-26923: Fix asyncio.Gather to refuse being cancelled once all children |
| 46148 |
are done. Patch by Johannes Ebke. |
| 46149 |
|
| 46150 |
- bpo-26796: Don't configure the number of workers for default threadpool |
| 46151 |
executor. Initial patch by Hans Lawrenz. |
| 46152 |
|
| 46153 |
- bpo-28600: Optimize loop.call_soon(). |
| 46154 |
|
| 46155 |
- bpo-28613: Fix get_event_loop() return the current loop if called from |
| 46156 |
coroutines/callbacks. |
| 46157 |
|
| 46158 |
- bpo-28639: Fix inspect.isawaitable to always return bool Patch by Justin |
| 46159 |
Mayfield. |
| 46160 |
|
| 46161 |
- bpo-28652: Make loop methods reject socket kinds they do not support. |
| 46162 |
|
| 46163 |
- bpo-28653: Fix a refleak in functools.lru_cache. |
| 46164 |
|
| 46165 |
- bpo-28703: Fix asyncio.iscoroutinefunction to handle Mock objects. |
| 46166 |
|
| 46167 |
- bpo-24142: Reading a corrupt config file left the parser in an invalid |
| 46168 |
state. Original patch by Florian Höch. |
| 46169 |
|
| 46170 |
- bpo-28990: Fix SSL hanging if connection is closed before handshake |
| 46171 |
completed. (Patch by HoHo-Ho) |
| 46172 |
|
| 46173 |
IDLE |
| 46174 |
---- |
| 46175 |
|
| 46176 |
- bpo-15308: Add 'interrupt execution' (^C) to Shell menu. Patch by Roger |
| 46177 |
Serwy, updated by Bayard Randel. |
| 46178 |
|
| 46179 |
- bpo-27922: Stop IDLE tests from 'flashing' gui widgets on the screen. |
| 46180 |
|
| 46181 |
- Add version to title of IDLE help window. |
| 46182 |
|
| 46183 |
- bpo-25564: In section on IDLE -- console differences, mention that using |
| 46184 |
exec means that __builtins__ is defined for each statement. |
| 46185 |
|
| 46186 |
- bpo-27714: text_textview and test_autocomplete now pass when re-run in the |
| 46187 |
same process. This occurs when test_idle fails when run with the -w |
| 46188 |
option but without -jn. Fix warning from test_config. |
| 46189 |
|
| 46190 |
- bpo-25507: IDLE no longer runs buggy code because of its tkinter imports. |
| 46191 |
Users must include the same imports required to run directly in Python. |
| 46192 |
|
| 46193 |
- bpo-27452: add line counter and crc to IDLE configHandler test dump. |
| 46194 |
|
| 46195 |
- bpo-27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names. |
| 46196 |
|
| 46197 |
- bpo-27245: IDLE: Cleanly delete custom themes and key bindings. |
| 46198 |
Previously, when IDLE was started from a console or by import, a cascade |
| 46199 |
of warnings was emitted. Patch by Serhiy Storchaka. |
| 46200 |
|
| 46201 |
C API |
| 46202 |
----- |
| 46203 |
|
| 46204 |
- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions. |
| 46205 |
|
| 46206 |
- bpo-26754: PyUnicode_FSDecoder() accepted a filename argument encoded as |
| 46207 |
an iterable of integers. Now only strings and bytes-like objects are |
| 46208 |
accepted. |
| 46209 |
|
| 46210 |
Documentation |
| 46211 |
------------- |
| 46212 |
|
| 46213 |
- bpo-28513: Documented command-line interface of zipfile. |
| 46214 |
|
| 46215 |
Tests |
| 46216 |
----- |
| 46217 |
|
| 46218 |
- bpo-28950: Disallow -j0 to be combined with -T/-l/-M in regrtest command |
| 46219 |
line arguments. |
| 46220 |
|
| 46221 |
- bpo-28666: Now test.support.rmtree is able to remove unwritable or |
| 46222 |
unreadable directories. |
| 46223 |
|
| 46224 |
- bpo-23839: Various caches now are cleared before running every test file. |
| 46225 |
|
| 46226 |
- bpo-28409: regrtest: fix the parser of command line arguments. |
| 46227 |
|
| 46228 |
- bpo-27787: Call gc.collect() before checking each test for "dangling |
| 46229 |
threads", since the dangling threads are weak references. |
| 46230 |
|
| 46231 |
- bpo-27369: In test_pyexpat, avoid testing an error message detail that |
| 46232 |
changed in Expat 2.2.0. |
| 46233 |
|
| 46234 |
Tools/Demos |
| 46235 |
----------- |
| 46236 |
|
| 46237 |
- bpo-27952: Get Tools/scripts/fixcid.py working with Python 3 and the |
| 46238 |
current "re" module, avoid invalid Python backslash escapes, and fix a bug |
| 46239 |
parsing escaped C quote signs. |
| 46240 |
|
| 46241 |
- bpo-27332: Fixed the type of the first argument of module-level functions |
| 46242 |
generated by Argument Clinic. Patch by Petr Viktorin. |
| 46243 |
|
| 46244 |
- bpo-27418: Fixed Tools/importbench/importbench.py. |
| 46245 |
|
| 46246 |
Windows |
| 46247 |
------- |
| 46248 |
|
| 46249 |
- bpo-28251: Improvements to help manuals on Windows. |
| 46250 |
|
| 46251 |
- bpo-28110: launcher.msi has different product codes between 32-bit and |
| 46252 |
64-bit |
| 46253 |
|
| 46254 |
- bpo-25144: Ensures TargetDir is set before continuing with custom install. |
| 46255 |
|
| 46256 |
- bpo-27469: Adds a shell extension to the launcher so that drag and drop |
| 46257 |
works correctly. |
| 46258 |
|
| 46259 |
- bpo-27309: Enabled proper Windows styles in python[w].exe manifest. |
| 46260 |
|
| 46261 |
Build |
| 46262 |
----- |
| 46263 |
|
| 46264 |
- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat |
| 46265 |
|
| 46266 |
- bpo-23903: Added missed names to PC/python3.def. |
| 46267 |
|
| 46268 |
- bpo-10656: Fix out-of-tree building on AIX. Patch by Tristan Carel and |
| 46269 |
Michael Haubenwallner. |
| 46270 |
|
| 46271 |
- bpo-26359: Rename --with-optimiations to --enable-optimizations. |
| 46272 |
|
| 46273 |
- bpo-28444: Fix missing extensions modules when cross compiling. |
| 46274 |
|
| 46275 |
- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j. |
| 46276 |
|
| 46277 |
- bpo-28258: Fixed build with Estonian locale (python-config and distclean |
| 46278 |
targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. |
| 46279 |
|
| 46280 |
- bpo-26661: setup.py now detects system libffi with multiarch wrapper. |
| 46281 |
|
| 46282 |
- bpo-28066: Fix the logic that searches build directories for generated |
| 46283 |
include files when building outside the source tree. |
| 46284 |
|
| 46285 |
- bpo-15819: Remove redundant include search directory option for building |
| 46286 |
outside the source tree. |
| 46287 |
|
| 46288 |
- bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach) |
| 46289 |
|
| 46290 |
- bpo-27705: Update message in validate_ucrtbase.py |
| 46291 |
|
| 46292 |
- bpo-27983: Cause lack of llvm-profdata tool when using clang as required |
| 46293 |
for PGO linking to be a configure time error rather than make time when |
| 46294 |
--with-optimizations is enabled. Also improve our ability to find the |
| 46295 |
llvm-profdata tool on MacOS and some Linuxes. |
| 46296 |
|
| 46297 |
- bpo-26307: The profile-opt build now applies PGO to the built-in modules. |
| 46298 |
|
| 46299 |
- bpo-26359: Add the --with-optimizations configure flag. |
| 46300 |
|
| 46301 |
- bpo-27713: Suppress spurious build warnings when updating importlib's |
| 46302 |
bootstrap files. Patch by Xiang Zhang |
| 46303 |
|
| 46304 |
- bpo-25825: Correct the references to Modules/python.exp and ld_so_aix, |
| 46305 |
which are required on AIX. This updates references to an installation |
| 46306 |
path that was changed in 3.2a4, and undoes changed references to the build |
| 46307 |
tree that were made in 3.5.0a1. |
| 46308 |
|
| 46309 |
- bpo-27453: CPP invocation in configure must use CPPFLAGS. Patch by Chi |
| 46310 |
Hsuan Yen. |
| 46311 |
|
| 46312 |
- bpo-27641: The configure script now inserts comments into the makefile to |
| 46313 |
prevent the pgen and _freeze_importlib executables from being |
| 46314 |
cross-compiled. |
| 46315 |
|
| 46316 |
- bpo-26662: Set PYTHON_FOR_GEN in configure as the Python program to be |
| 46317 |
used for file generation during the build. |
| 46318 |
|
| 46319 |
- bpo-10910: Avoid C++ compilation errors on FreeBSD and OS X. Also update |
| 46320 |
FreedBSD version checks for the original ctype UTF-8 workaround. |
| 46321 |
|
| 46322 |
- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. |
| 46323 |
Patch by Gareth Rees. |
| 46324 |
|
| 46325 |
|
| 46326 |
What's New in Python 3.5.2 final? |
| 46327 |
================================= |
| 46328 |
|
| 46329 |
*Release date: 2016-06-26* |
| 46330 |
|
| 46331 |
Core and Builtins |
| 46332 |
----------------- |
| 46333 |
|
| 46334 |
- bpo-26930: Update Windows builds to use OpenSSL 1.0.2h. |
| 46335 |
|
| 46336 |
Tests |
| 46337 |
----- |
| 46338 |
|
| 46339 |
- bpo-26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test. |
| 46340 |
|
| 46341 |
IDLE |
| 46342 |
---- |
| 46343 |
|
| 46344 |
- bpo-27365: Allow non-ascii in idlelib/NEWS.txt - minimal part for 3.5.2. |
| 46345 |
|
| 46346 |
|
| 46347 |
What's New in Python 3.5.2 release candidate 1? |
| 46348 |
=============================================== |
| 46349 |
|
| 46350 |
*Release date: 2016-06-12* |
| 46351 |
|
| 46352 |
Security |
| 46353 |
-------- |
| 46354 |
|
| 46355 |
- bpo-26556: Update expat to 2.1.1, fixes :cve:`2015-1283`. |
| 46356 |
|
| 46357 |
- Fix TLS stripping vulnerability in smtplib, :cve:`2016-0772`. Reported by |
| 46358 |
Team Oststrom. |
| 46359 |
|
| 46360 |
- bpo-26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with |
| 46361 |
``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom |
| 46362 |
entropy pool is not initialized yet. Patch written by Colm Buckley. |
| 46363 |
|
| 46364 |
- bpo-26657: Fix directory traversal vulnerability with http.server on |
| 46365 |
Windows. This fixes a regression that was introduced in 3.3.4rc1 and |
| 46366 |
3.4.0rc1. Based on patch by Philipp Hagemeister. |
| 46367 |
|
| 46368 |
- bpo-26313: ssl.py _load_windows_store_certs fails if windows cert store is |
| 46369 |
empty. Patch by Baji. |
| 46370 |
|
| 46371 |
- bpo-25939: On Windows open the cert store readonly in |
| 46372 |
ssl.enum_certificates. |
| 46373 |
|
| 46374 |
Core and Builtins |
| 46375 |
----------------- |
| 46376 |
|
| 46377 |
- bpo-27066: Fixed SystemError if a custom opener (for open()) returns a |
| 46378 |
negative number without setting an exception. |
| 46379 |
|
| 46380 |
- bpo-20041: Fixed TypeError when frame.f_trace is set to None. Patch by |
| 46381 |
Xavier de Gaye. |
| 46382 |
|
| 46383 |
- bpo-26168: Fixed possible refleaks in failing Py_BuildValue() with the "N" |
| 46384 |
format unit. |
| 46385 |
|
| 46386 |
- bpo-26991: Fix possible refleak when creating a function with annotations. |
| 46387 |
|
| 46388 |
- bpo-27039: Fixed bytearray.remove() for values greater than 127. Patch by |
| 46389 |
Joe Jevnik. |
| 46390 |
|
| 46391 |
- bpo-23640: int.from_bytes() no longer bypasses constructors for |
| 46392 |
subclasses. |
| 46393 |
|
| 46394 |
- bpo-26811: gc.get_objects() no longer contains a broken tuple with NULL |
| 46395 |
pointer. |
| 46396 |
|
| 46397 |
- bpo-20120: Use RawConfigParser for .pypirc parsing, removing support for |
| 46398 |
interpolation unintentionally added with move to Python 3. Behavior no |
| 46399 |
longer does any interpolation in .pypirc files, matching behavior in |
| 46400 |
Python 2.7 and Setuptools 19.0. |
| 46401 |
|
| 46402 |
- bpo-26659: Make the builtin slice type support cycle collection. |
| 46403 |
|
| 46404 |
- bpo-26718: super.__init__ no longer leaks memory if called multiple times. |
| 46405 |
NOTE: A direct call of super.__init__ is not endorsed! |
| 46406 |
|
| 46407 |
- bpo-25339: PYTHONIOENCODING now has priority over locale in setting the |
| 46408 |
error handler for stdin and stdout. |
| 46409 |
|
| 46410 |
- bpo-26494: Fixed crash on iterating exhausting iterators. Affected classes |
| 46411 |
are generic sequence iterators, iterators of str, bytes, bytearray, list, |
| 46412 |
tuple, set, frozenset, dict, OrderedDict, corresponding views and |
| 46413 |
os.scandir() iterator. |
| 46414 |
|
| 46415 |
- bpo-26581: If coding cookie is specified multiple times on a line in |
| 46416 |
Python source code file, only the first one is taken to account. |
| 46417 |
|
| 46418 |
- bpo-26464: Fix str.translate() when string is ASCII and first replacements |
| 46419 |
removes character, but next replacement uses a non-ASCII character or a |
| 46420 |
string longer than 1 character. Regression introduced in Python 3.5.0. |
| 46421 |
|
| 46422 |
- bpo-22836: Ensure exception reports from PyErr_Display() and |
| 46423 |
PyErr_WriteUnraisable() are sensible even when formatting them produces |
| 46424 |
secondary errors. This affects the reports produced by |
| 46425 |
sys.__excepthook__() and when __del__() raises an exception. |
| 46426 |
|
| 46427 |
- bpo-26302: Correct behavior to reject comma as a legal character for |
| 46428 |
cookie names. |
| 46429 |
|
| 46430 |
- bpo-4806: Avoid masking the original TypeError exception when using star |
| 46431 |
(``*``) unpacking in function calls. Based on patch by Hagen Fürstenau |
| 46432 |
and Daniel Urban. |
| 46433 |
|
| 46434 |
- bpo-27138: Fix the doc comment for FileFinder.find_spec(). |
| 46435 |
|
| 46436 |
- bpo-26154: Add a new private _PyThreadState_UncheckedGet() function to get |
| 46437 |
the current Python thread state, but don't issue a fatal error if it is |
| 46438 |
NULL. This new function must be used instead of accessing directly the |
| 46439 |
_PyThreadState_Current variable. The variable is no more exposed since |
| 46440 |
Python 3.5.1 to hide the exact implementation of atomic C types, to avoid |
| 46441 |
compiler issues. |
| 46442 |
|
| 46443 |
- bpo-26194: Deque.insert() gave odd results for bounded deques that had |
| 46444 |
reached their maximum size. Now an IndexError will be raised when |
| 46445 |
attempting to insert into a full deque. |
| 46446 |
|
| 46447 |
- bpo-25843: When compiling code, don't merge constants if they are equal |
| 46448 |
but have a different types. For example, ``f1, f2 = lambda: 1, lambda: |
| 46449 |
1.0`` is now correctly compiled to two different functions: ``f1()`` |
| 46450 |
returns ``1`` (``int``) and ``f2()`` returns ``1.0`` (``int``), even if |
| 46451 |
``1`` and ``1.0`` are equal. |
| 46452 |
|
| 46453 |
- bpo-22995: [UPDATE] Comment out the one of the pickleability tests in |
| 46454 |
_PyObject_GetState() due to regressions observed in Cython-based projects. |
| 46455 |
|
| 46456 |
- bpo-25961: Disallowed null characters in the type name. |
| 46457 |
|
| 46458 |
- bpo-25973: Fix segfault when an invalid nonlocal statement binds a name |
| 46459 |
starting with two underscores. |
| 46460 |
|
| 46461 |
- bpo-22995: Instances of extension types with a state that aren't |
| 46462 |
subclasses of list or dict and haven't implemented any pickle-related |
| 46463 |
methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or |
| 46464 |
__getstate__), can no longer be pickled. Including memoryview. |
| 46465 |
|
| 46466 |
- bpo-20440: Massive replacing unsafe attribute setting code with special |
| 46467 |
macro Py_SETREF. |
| 46468 |
|
| 46469 |
- bpo-25766: Special method __bytes__() now works in str subclasses. |
| 46470 |
|
| 46471 |
- bpo-25421: __sizeof__ methods of builtin types now use dynamic basic size. |
| 46472 |
This allows sys.getsize() to work correctly with their subclasses with |
| 46473 |
__slots__ defined. |
| 46474 |
|
| 46475 |
- bpo-25709: Fixed problem with in-place string concatenation and utf-8 |
| 46476 |
cache. |
| 46477 |
|
| 46478 |
- bpo-27147: Mention :pep:`420` in the importlib docs. |
| 46479 |
|
| 46480 |
- bpo-24097: Fixed crash in object.__reduce__() if slot name is freed inside |
| 46481 |
__getattr__. |
| 46482 |
|
| 46483 |
- bpo-24731: Fixed crash on converting objects with special methods |
| 46484 |
__bytes__, __trunc__, and __float__ returning instances of subclasses of |
| 46485 |
bytes, int, and float to subclasses of bytes, int, and float |
| 46486 |
correspondingly. |
| 46487 |
|
| 46488 |
- bpo-26478: Fix semantic bugs when using binary operators with dictionary |
| 46489 |
views and tuples. |
| 46490 |
|
| 46491 |
- bpo-26171: Fix possible integer overflow and heap corruption in |
| 46492 |
zipimporter.get_data(). |
| 46493 |
|
| 46494 |
- bpo-25660: Fix TAB key behaviour in REPL with readline. |
| 46495 |
|
| 46496 |
- bpo-25887: Raise a RuntimeError when a coroutine object is awaited more |
| 46497 |
than once. |
| 46498 |
|
| 46499 |
- bpo-27243: Update the __aiter__ protocol: instead of returning an |
| 46500 |
awaitable that resolves to an asynchronous iterator, the asynchronous |
| 46501 |
iterator should be returned directly. Doing the former will trigger a |
| 46502 |
PendingDeprecationWarning. |
| 46503 |
|
| 46504 |
Library |
| 46505 |
------- |
| 46506 |
|
| 46507 |
- bpo-21386: Implement missing IPv4Address.is_global property. It was |
| 46508 |
documented since 07a5610bae9d. Initial patch by Roger Luethi. |
| 46509 |
|
| 46510 |
- bpo-20900: distutils register command now decodes HTTP responses |
| 46511 |
correctly. Initial patch by ingrid. |
| 46512 |
|
| 46513 |
- A new version of typing.py provides several new classes and features: |
| 46514 |
@overload outside stubs, Reversible, DefaultDict, Text, ContextManager, |
| 46515 |
Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some |
| 46516 |
of the new features are not yet implemented in mypy or other static |
| 46517 |
analyzers). Also classes for :pep:`492` (Awaitable, AsyncIterable, |
| 46518 |
AsyncIterator) have been added (in fact they made it into 3.5.1 but were |
| 46519 |
never mentioned). |
| 46520 |
|
| 46521 |
- bpo-25738: Stop http.server.BaseHTTPRequestHandler.send_error() from |
| 46522 |
sending a message body for 205 Reset Content. Also, don't send Content |
| 46523 |
header fields in responses that don't have a body. Patch by Susumu |
| 46524 |
Koshiba. |
| 46525 |
|
| 46526 |
- bpo-21313: Fix the "platform" module to tolerate when sys.version contains |
| 46527 |
truncated build information. |
| 46528 |
|
| 46529 |
- bpo-27164: In the zlib module, allow decompressing raw Deflate streams |
| 46530 |
with a predefined zdict. Based on patch by Xiang Zhang. |
| 46531 |
|
| 46532 |
- bpo-24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely |
| 46533 |
write data to the client. Previously it could do partial writes and |
| 46534 |
truncate data. Also, wsgiref.handler.ServerHandler can now handle stdout |
| 46535 |
doing partial writes, but this is deprecated. |
| 46536 |
|
| 46537 |
- bpo-26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry. |
| 46538 |
|
| 46539 |
- bpo-26373: subprocess.Popen.communicate now correctly ignores |
| 46540 |
BrokenPipeError when the child process dies before .communicate() is |
| 46541 |
called in more/all circumstances. |
| 46542 |
|
| 46543 |
- bpo-21776: distutils.upload now correctly handles HTTPError. Initial patch |
| 46544 |
by Claudiu Popa. |
| 46545 |
|
| 46546 |
- bpo-27114: Fix SSLContext._load_windows_store_certs fails with |
| 46547 |
PermissionError |
| 46548 |
|
| 46549 |
- bpo-18383: Avoid creating duplicate filters when using filterwarnings and |
| 46550 |
simplefilter. Based on patch by Alex Shkop. |
| 46551 |
|
| 46552 |
- bpo-27057: Fix os.set_inheritable() on Android, ioctl() is blocked by |
| 46553 |
SELinux and fails with EACCESS. The function now falls back to fcntl(). |
| 46554 |
Patch written by Michał Bednarski. |
| 46555 |
|
| 46556 |
- bpo-27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure! |
| 46557 |
|
| 46558 |
- bpo-14132: Fix urllib.request redirect handling when the target only has a |
| 46559 |
query string. Original fix by Ján Janech. |
| 46560 |
|
| 46561 |
- bpo-17214: The "urllib.request" module now percent-encodes non-ASCII bytes |
| 46562 |
found in redirect target URLs. Some servers send Location header fields |
| 46563 |
with non-ASCII bytes, but "http.client" requires the request target to be |
| 46564 |
ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch |
| 46565 |
by Christian Heimes. |
| 46566 |
|
| 46567 |
- bpo-26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch |
| 46568 |
contributed by Chi Hsuan Yen. |
| 46569 |
|
| 46570 |
- bpo-22274: In the subprocess module, allow stderr to be redirected to |
| 46571 |
stdout even when stdout is not redirected. Patch by Akira Li. |
| 46572 |
|
| 46573 |
- bpo-26807: mock_open 'files' no longer error on readline at end of file. |
| 46574 |
Patch from Yolanda Robla. |
| 46575 |
|
| 46576 |
- bpo-25745: Fixed leaking a userptr in curses panel destructor. |
| 46577 |
|
| 46578 |
- bpo-26977: Removed unnecessary, and ignored, call to sum of squares helper |
| 46579 |
in statistics.pvariance. |
| 46580 |
|
| 46581 |
- bpo-26881: The modulefinder module now supports extended opcode arguments. |
| 46582 |
|
| 46583 |
- bpo-23815: Fixed crashes related to directly created instances of types in |
| 46584 |
_tkinter and curses.panel modules. |
| 46585 |
|
| 46586 |
- bpo-17765: weakref.ref() no longer silently ignores keyword arguments. |
| 46587 |
Patch by Georg Brandl. |
| 46588 |
|
| 46589 |
- bpo-26873: xmlrpc now raises ResponseError on unsupported type tags |
| 46590 |
instead of silently return incorrect result. |
| 46591 |
|
| 46592 |
- bpo-26711: Fixed the comparison of plistlib.Data with other types. |
| 46593 |
|
| 46594 |
- bpo-24114: Fix an uninitialized variable in ``ctypes.util``. The bug only |
| 46595 |
occurs on SunOS when the ctypes implementation searches for the ``crle`` |
| 46596 |
program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos. |
| 46597 |
|
| 46598 |
- bpo-26864: In urllib.request, change the proxy bypass host checking |
| 46599 |
against no_proxy to be case-insensitive, and to not match unrelated host |
| 46600 |
names that happen to have a bypassed hostname as a suffix. Patch by Xiang |
| 46601 |
Zhang. |
| 46602 |
|
| 46603 |
- bpo-26634: recursive_repr() now sets __qualname__ of wrapper. Patch by |
| 46604 |
Xiang Zhang. |
| 46605 |
|
| 46606 |
- bpo-26804: urllib.request will prefer lower_case proxy environment |
| 46607 |
variables over UPPER_CASE or Mixed_Case ones. Patch contributed by |
| 46608 |
Hans-Peter Jansen. |
| 46609 |
|
| 46610 |
- bpo-26837: assertSequenceEqual() now correctly outputs non-stringified |
| 46611 |
differing items (like bytes in the -b mode). This affects |
| 46612 |
assertListEqual() and assertTupleEqual(). |
| 46613 |
|
| 46614 |
- bpo-26041: Remove "will be removed in Python 3.7" from deprecation |
| 46615 |
messages of platform.dist() and platform.linux_distribution(). Patch by |
| 46616 |
Kumaripaba Miyurusara Athukorala. |
| 46617 |
|
| 46618 |
- bpo-26822: itemgetter, attrgetter and methodcaller objects no longer |
| 46619 |
silently ignore keyword arguments. |
| 46620 |
|
| 46621 |
- bpo-26733: Disassembling a class now disassembles class and static |
| 46622 |
methods. Patch by Xiang Zhang. |
| 46623 |
|
| 46624 |
- bpo-26801: Fix error handling in :func:`shutil.get_terminal_size`, catch |
| 46625 |
:exc:`AttributeError` instead of :exc:`NameError`. Patch written by |
| 46626 |
Emanuel Barry. |
| 46627 |
|
| 46628 |
- bpo-24838: tarfile's ustar and gnu formats now correctly calculate name |
| 46629 |
and link field limits for multibyte character encodings like utf-8. |
| 46630 |
|
| 46631 |
- bpo-26717: Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by |
| 46632 |
Anthony Sottile. |
| 46633 |
|
| 46634 |
- bpo-26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading |
| 46635 |
more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of |
| 46636 |
1024 bytes per call. |
| 46637 |
|
| 46638 |
- bpo-16329: Add .webm to mimetypes.types_map. Patch by Giampaolo Rodola'. |
| 46639 |
|
| 46640 |
- bpo-13952: Add .csv to mimetypes.types_map. Patch by Geoff Wilson. |
| 46641 |
|
| 46642 |
- bpo-26709: Fixed Y2038 problem in loading binary PLists. |
| 46643 |
|
| 46644 |
- bpo-23735: Handle terminal resizing with Readline 6.3+ by installing our |
| 46645 |
own SIGWINCH handler. Patch by Eric Price. |
| 46646 |
|
| 46647 |
- bpo-26586: In http.server, respond with "413 Request header fields too |
| 46648 |
large" if there are too many header fields to parse, rather than killing |
| 46649 |
the connection and raising an unhandled exception. Patch by Xiang Zhang. |
| 46650 |
|
| 46651 |
- bpo-22854: Change BufferedReader.writable() and BufferedWriter.readable() |
| 46652 |
to always return False. |
| 46653 |
|
| 46654 |
- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of |
| 46655 |
tuple (changeset 3603bae63c13 only works for classes) so we need to |
| 46656 |
implement __ne__ ourselves. Patch by Andrew Plummer. |
| 46657 |
|
| 46658 |
- bpo-26644: Raise ValueError rather than SystemError when a negative length |
| 46659 |
is passed to SSLSocket.recv() or read(). |
| 46660 |
|
| 46661 |
- bpo-23804: Fix SSL recv(0) and read(0) methods to return zero bytes |
| 46662 |
instead of up to 1024. |
| 46663 |
|
| 46664 |
- bpo-26616: Fixed a bug in datetime.astimezone() method. |
| 46665 |
|
| 46666 |
- bpo-21925: :func:`warnings.formatwarning` now catches exceptions on |
| 46667 |
``linecache.getline(...)`` to be able to log :exc:`ResourceWarning` |
| 46668 |
emitted late during the Python shutdown process. |
| 46669 |
|
| 46670 |
- bpo-24266: Ctrl+C during Readline history search now cancels the search |
| 46671 |
mode when compiled with Readline 7. |
| 46672 |
|
| 46673 |
- bpo-26560: Avoid potential ValueError in BaseHandler.start_response. |
| 46674 |
Initial patch by Peter Inglesby. |
| 46675 |
|
| 46676 |
- bpo-26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex` |
| 46677 |
to support importing packages. |
| 46678 |
|
| 46679 |
- bpo-26499: Account for remaining Content-Length in HTTPResponse.readline() |
| 46680 |
and read1(). Based on patch by Silent Ghost. Also document that |
| 46681 |
HTTPResponse now supports these methods. |
| 46682 |
|
| 46683 |
- bpo-25320: Handle sockets in directories unittest discovery is scanning. |
| 46684 |
Patch from Victor van den Elzen. |
| 46685 |
|
| 46686 |
- bpo-16181: cookiejar.http2time() now returns None if year is higher than |
| 46687 |
datetime.MAXYEAR. |
| 46688 |
|
| 46689 |
- bpo-26513: Fixes platform module detection of Windows Server |
| 46690 |
|
| 46691 |
- bpo-23718: Fixed parsing time in week 0 before Jan 1. Original patch by |
| 46692 |
Tamás Bence Gedai. |
| 46693 |
|
| 46694 |
- bpo-20589: Invoking Path.owner() and Path.group() on Windows now raise |
| 46695 |
NotImplementedError instead of ImportError. |
| 46696 |
|
| 46697 |
- bpo-26177: Fixed the keys() method for Canvas and Scrollbar widgets. |
| 46698 |
|
| 46699 |
- bpo-15068: Got rid of excessive buffering in the fileinput module. The |
| 46700 |
bufsize parameter is no longer used. |
| 46701 |
|
| 46702 |
- bpo-2202: Fix UnboundLocalError in |
| 46703 |
AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu |
| 46704 |
Dupuy. |
| 46705 |
|
| 46706 |
- bpo-25718: Fixed pickling and copying the accumulate() iterator with total |
| 46707 |
is None. |
| 46708 |
|
| 46709 |
- bpo-26475: Fixed debugging output for regular expressions with the (?x) |
| 46710 |
flag. |
| 46711 |
|
| 46712 |
- bpo-26457: Fixed the subnets() methods in IP network classes for the case |
| 46713 |
when resulting prefix length is equal to maximal prefix length. Based on |
| 46714 |
patch by Xiang Zhang. |
| 46715 |
|
| 46716 |
- bpo-26385: Remove the file if the internal open() call in |
| 46717 |
NamedTemporaryFile() fails. Patch by Silent Ghost. |
| 46718 |
|
| 46719 |
- bpo-26402: Fix XML-RPC client to retry when the server shuts down a |
| 46720 |
persistent connection. This was a regression related to the new |
| 46721 |
http.client.RemoteDisconnected exception in 3.5.0a4. |
| 46722 |
|
| 46723 |
- bpo-25913: Leading ``<~`` is optional now in base64.a85decode() with |
| 46724 |
adobe=True. Patch by Swati Jaiswal. |
| 46725 |
|
| 46726 |
- bpo-26186: Remove an invalid type check in importlib.util.LazyLoader. |
| 46727 |
|
| 46728 |
- bpo-26367: importlib.__import__() raises SystemError like |
| 46729 |
builtins.__import__() when ``level`` is specified but without an |
| 46730 |
accompanying package specified. |
| 46731 |
|
| 46732 |
- bpo-26309: In the "socketserver" module, shut down the request (closing |
| 46733 |
the connected socket) when verify_request() returns false. Patch by Aviv |
| 46734 |
Palivoda. |
| 46735 |
|
| 46736 |
- bpo-25995: os.walk() no longer uses FDs proportional to the tree depth. |
| 46737 |
|
| 46738 |
- bpo-26117: The os.scandir() iterator now closes file descriptor not only |
| 46739 |
when the iteration is finished, but when it was failed with error. |
| 46740 |
|
| 46741 |
- bpo-25911: Restored support of bytes paths in os.walk() on Windows. |
| 46742 |
|
| 46743 |
- bpo-26045: Add UTF-8 suggestion to error message when posting a |
| 46744 |
non-Latin-1 string with http.client. |
| 46745 |
|
| 46746 |
- bpo-12923: Reset FancyURLopener's redirect counter even if there is an |
| 46747 |
exception. Based on patches by Brian Brazil and Daniel Rocco. |
| 46748 |
|
| 46749 |
- bpo-25945: Fixed a crash when unpickle the functools.partial object with |
| 46750 |
wrong state. Fixed a leak in failed functools.partial constructor. "args" |
| 46751 |
and "keywords" attributes of functools.partial have now always types tuple |
| 46752 |
and dict correspondingly. |
| 46753 |
|
| 46754 |
- bpo-26202: copy.deepcopy() now correctly copies range() objects with |
| 46755 |
non-atomic attributes. |
| 46756 |
|
| 46757 |
- bpo-23076: Path.glob() now raises a ValueError if it's called with an |
| 46758 |
invalid pattern. Patch by Thomas Nyberg. |
| 46759 |
|
| 46760 |
- bpo-19883: Fixed possible integer overflows in zipimport. |
| 46761 |
|
| 46762 |
- bpo-26227: On Windows, getnameinfo(), gethostbyaddr() and |
| 46763 |
gethostbyname_ex() functions of the socket module now decode the hostname |
| 46764 |
from the ANSI code page rather than UTF-8. |
| 46765 |
|
| 46766 |
- bpo-26147: xmlrpc now works with strings not encodable with used non-UTF-8 |
| 46767 |
encoding. |
| 46768 |
|
| 46769 |
- bpo-25935: Garbage collector now breaks reference loops with OrderedDict. |
| 46770 |
|
| 46771 |
- bpo-16620: Fixed AttributeError in msilib.Directory.glob(). |
| 46772 |
|
| 46773 |
- bpo-26013: Added compatibility with broken protocol 2 pickles created in |
| 46774 |
old Python 3 versions (3.4.3 and lower). |
| 46775 |
|
| 46776 |
- bpo-25850: Use cross-compilation by default for 64-bit Windows. |
| 46777 |
|
| 46778 |
- bpo-17633: Improve zipimport's support for namespace packages. |
| 46779 |
|
| 46780 |
- bpo-24705: Fix sysconfig._parse_makefile not expanding ${} vars appearing |
| 46781 |
before $() vars. |
| 46782 |
|
| 46783 |
- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore |
| 46784 |
original values after patching. Patch contributed by Sean McCully. |
| 46785 |
|
| 46786 |
- bpo-25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode |
| 46787 |
option if it is safe to do so. |
| 46788 |
|
| 46789 |
- bpo-26012: Don't traverse into symlinks for ``**`` pattern in |
| 46790 |
pathlib.Path.[r]glob(). |
| 46791 |
|
| 46792 |
- bpo-24120: Ignore PermissionError when traversing a tree with |
| 46793 |
pathlib.Path.[r]glob(). Patch by Ulrich Petri. |
| 46794 |
|
| 46795 |
- bpo-25447: fileinput now uses sys.stdin as-is if it does not have a buffer |
| 46796 |
attribute (restores backward compatibility). |
| 46797 |
|
| 46798 |
- bpo-25447: Copying the lru_cache() wrapper object now always works, |
| 46799 |
independently from the type of the wrapped object (by returning the |
| 46800 |
original object unchanged). |
| 46801 |
|
| 46802 |
- bpo-24103: Fixed possible use after free in ElementTree.XMLPullParser. |
| 46803 |
|
| 46804 |
- bpo-25860: os.fwalk() no longer skips remaining directories when error |
| 46805 |
occurs. Original patch by Samson Lee. |
| 46806 |
|
| 46807 |
- bpo-25914: Fixed and simplified OrderedDict.__sizeof__. |
| 46808 |
|
| 46809 |
- bpo-25902: Fixed various refcount issues in ElementTree iteration. |
| 46810 |
|
| 46811 |
- bpo-25717: Restore the previous behaviour of tolerating most fstat() |
| 46812 |
errors when opening files. This was a regression in 3.5a1, and stopped |
| 46813 |
anonymous temporary files from working in special cases. |
| 46814 |
|
| 46815 |
- bpo-24903: Fix regression in number of arguments compileall accepts when |
| 46816 |
'-d' is specified. The check on the number of arguments has been dropped |
| 46817 |
completely as it never worked correctly anyway. |
| 46818 |
|
| 46819 |
- bpo-25764: In the subprocess module, preserve any exception caused by |
| 46820 |
fork() failure when preexec_fn is used. |
| 46821 |
|
| 46822 |
- bpo-6478: _strptime's regexp cache now is reset after changing timezone |
| 46823 |
with time.tzset(). |
| 46824 |
|
| 46825 |
- bpo-14285: When executing a package with the "python -m package" option, |
| 46826 |
and package initialization fails, a proper traceback is now reported. The |
| 46827 |
"runpy" module now lets exceptions from package initialization pass back |
| 46828 |
to the caller, rather than raising ImportError. |
| 46829 |
|
| 46830 |
- bpo-19771: Also in runpy and the "-m" option, omit the irrelevant message |
| 46831 |
". . . is a package and cannot be directly executed" if the package could |
| 46832 |
not even be initialized (e.g. due to a bad ``*.pyc`` file). |
| 46833 |
|
| 46834 |
- bpo-25177: Fixed problem with the mean of very small and very large |
| 46835 |
numbers. As a side effect, statistics.mean and statistics.variance should |
| 46836 |
be significantly faster. |
| 46837 |
|
| 46838 |
- bpo-25718: Fixed copying object with state with boolean value is false. |
| 46839 |
|
| 46840 |
- bpo-10131: Fixed deep copying of minidom documents. Based on patch by |
| 46841 |
Marian Ganisin. |
| 46842 |
|
| 46843 |
- bpo-25725: Fixed a reference leak in pickle.loads() when unpickling |
| 46844 |
invalid data including tuple instructions. |
| 46845 |
|
| 46846 |
- bpo-25663: In the Readline completer, avoid listing duplicate global |
| 46847 |
names, and search the global namespace before searching builtins. |
| 46848 |
|
| 46849 |
- bpo-25688: Fixed file leak in ElementTree.iterparse() raising an error. |
| 46850 |
|
| 46851 |
- bpo-23914: Fixed SystemError raised by unpickler on broken pickle data. |
| 46852 |
|
| 46853 |
- bpo-25691: Fixed crash on deleting ElementTree.Element attributes. |
| 46854 |
|
| 46855 |
- bpo-25624: ZipFile now always writes a ZIP_STORED header for directory |
| 46856 |
entries. Patch by Dingyuan Wang. |
| 46857 |
|
| 46858 |
- Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu |
| 46859 |
Davis. |
| 46860 |
|
| 46861 |
- bpo-26050: Add asyncio.StreamReader.readuntil() method. Patch by Марк |
| 46862 |
Коренберг. |
| 46863 |
|
| 46864 |
- bpo-25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X |
| 46865 |
versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis. |
| 46866 |
|
| 46867 |
- bpo-26406: Avoid unnecessary serialization of getaddrinfo(3) calls on |
| 46868 |
current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis. |
| 46869 |
|
| 46870 |
- bpo-26848: Fix asyncio/subprocess.communicate() to handle empty input. |
| 46871 |
Patch by Jack O'Connor. |
| 46872 |
|
| 46873 |
- bpo-27040: Add loop.get_exception_handler method |
| 46874 |
|
| 46875 |
- bpo-27041: asyncio: Add loop.create_future method |
| 46876 |
|
| 46877 |
- bpo-27223: asyncio: Fix _read_ready and _write_ready to respect |
| 46878 |
_conn_lost. Patch by Łukasz Langa. |
| 46879 |
|
| 46880 |
- bpo-22970: asyncio: Fix inconsistency cancelling Condition.wait. Patch by |
| 46881 |
David Coles. |
| 46882 |
|
| 46883 |
IDLE |
| 46884 |
---- |
| 46885 |
|
| 46886 |
- bpo-5124: Paste with text selected now replaces the selection on X11. This |
| 46887 |
matches how paste works on Windows, Mac, most modern Linux apps, and ttk |
| 46888 |
widgets. Original patch by Serhiy Storchaka. |
| 46889 |
|
| 46890 |
- bpo-24759: Make clear in idlelib.idle_test.__init__ that the directory is |
| 46891 |
a private implementation of test.test_idle and tool for maintainers. |
| 46892 |
|
| 46893 |
- bpo-27196: Stop 'ThemeChanged' warnings when running IDLE tests. These |
| 46894 |
persisted after other warnings were suppressed in #20567. Apply Serhiy |
| 46895 |
Storchaka's update_idletasks solution to four test files. Record this |
| 46896 |
additional advice in idle_test/README.txt |
| 46897 |
|
| 46898 |
- bpo-20567: Revise idle_test/README.txt with advice about avoiding tk |
| 46899 |
warning messages from tests. Apply advice to several IDLE tests. |
| 46900 |
|
| 46901 |
- bpo-27117: Make colorizer htest and turtledemo work with dark themes. Move |
| 46902 |
code for configuring text widget colors to a new function. |
| 46903 |
|
| 46904 |
- bpo-26673: When tk reports font size as 0, change to size 10. Such fonts |
| 46905 |
on Linux prevented the configuration dialog from opening. |
| 46906 |
|
| 46907 |
- bpo-21939: Add test for IDLE's percolator. Original patch by Saimadhav |
| 46908 |
Heblikar. |
| 46909 |
|
| 46910 |
- bpo-21676: Add test for IDLE's replace dialog. Original patch by Saimadhav |
| 46911 |
Heblikar. |
| 46912 |
|
| 46913 |
- bpo-18410: Add test for IDLE's search dialog. Original patch by Westley |
| 46914 |
Martínez. |
| 46915 |
|
| 46916 |
- bpo-21703: Add test for IDLE's undo delegator. Original patch by Saimadhav |
| 46917 |
Heblikar . |
| 46918 |
|
| 46919 |
- bpo-27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks. |
| 46920 |
|
| 46921 |
- bpo-23977: Add more asserts to test_delegator. |
| 46922 |
|
| 46923 |
- bpo-20640: Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav |
| 46924 |
Heblikar. |
| 46925 |
|
| 46926 |
- In the 'IDLE-console differences' section of the IDLE doc, clarify how |
| 46927 |
running with IDLE affects sys.modules and the standard streams. |
| 46928 |
|
| 46929 |
- bpo-25507: fix incorrect change in IOBinding that prevented printing. |
| 46930 |
Augment IOBinding htest to include all major IOBinding functions. |
| 46931 |
|
| 46932 |
- bpo-25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION |
| 46933 |
MARK in README.txt and open this and NEWS.txt with 'ascii'. Re-encode |
| 46934 |
CREDITS.txt to utf-8 and open it with 'utf-8'. |
| 46935 |
|
| 46936 |
Documentation |
| 46937 |
------------- |
| 46938 |
|
| 46939 |
- bpo-19489: Moved the search box from the sidebar to the header and footer |
| 46940 |
of each page. Patch by Ammar Askar. |
| 46941 |
|
| 46942 |
- bpo-24136: Document the new :pep:`448` unpacking syntax of 3.5. |
| 46943 |
|
| 46944 |
- bpo-26736: Used HTTPS for external links in the documentation if possible. |
| 46945 |
|
| 46946 |
- bpo-6953: Rework the Readline module documentation to group related |
| 46947 |
functions together, and add more details such as what underlying Readline |
| 46948 |
functions and variables are accessed. |
| 46949 |
|
| 46950 |
- bpo-23606: Adds note to ctypes documentation regarding cdll.msvcrt. |
| 46951 |
|
| 46952 |
- bpo-25500: Fix documentation to not claim that __import__ is searched for |
| 46953 |
in the global scope. |
| 46954 |
|
| 46955 |
- bpo-26014: Update 3.x packaging documentation: * "See also" links to the |
| 46956 |
new docs are now provided in the legacy pages * links to setuptools |
| 46957 |
documentation have been updated |
| 46958 |
|
| 46959 |
Tests |
| 46960 |
----- |
| 46961 |
|
| 46962 |
- bpo-21916: Added tests for the turtle module. Patch by ingrid, Gregory |
| 46963 |
Loyse and Jelle Zijlstra. |
| 46964 |
|
| 46965 |
- bpo-26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) |
| 46966 |
was untested. |
| 46967 |
|
| 46968 |
- bpo-26015: Added new tests for pickling iterators of mutable sequences. |
| 46969 |
|
| 46970 |
- bpo-26325: Added test.support.check_no_resource_warning() to check that no |
| 46971 |
ResourceWarning is emitted. |
| 46972 |
|
| 46973 |
- bpo-25940: Changed test_ssl to use self-signed.pythontest.net. This |
| 46974 |
avoids relying on svn.python.org, which recently changed root certificate. |
| 46975 |
|
| 46976 |
- bpo-25616: Tests for OrderedDict are extracted from test_collections into |
| 46977 |
separate file test_ordered_dict. |
| 46978 |
|
| 46979 |
- bpo-26583: Skip test_timestamp_overflow in test_import if bytecode files |
| 46980 |
cannot be written. |
| 46981 |
|
| 46982 |
Build |
| 46983 |
----- |
| 46984 |
|
| 46985 |
- bpo-26884: Fix linking extension modules for cross builds. Patch by Xavier |
| 46986 |
de Gaye. |
| 46987 |
|
| 46988 |
- bpo-22359: Disable the rules for running _freeze_importlib and pgen when |
| 46989 |
cross-compiling. The output of these programs is normally saved with the |
| 46990 |
source code anyway, and is still regenerated when doing a native build. |
| 46991 |
Patch by Xavier de Gaye. |
| 46992 |
|
| 46993 |
- bpo-27229: Fix the cross-compiling pgen rule for in-tree builds. Patch by |
| 46994 |
Xavier de Gaye. |
| 46995 |
|
| 46996 |
- bpo-21668: Link audioop, _datetime, _ctypes_test modules to libm, except |
| 46997 |
on Mac OS X. Patch written by Xavier de Gaye. |
| 46998 |
|
| 46999 |
- bpo-25702: A --with-lto configure option has been added that will enable |
| 47000 |
link time optimizations at build time during a make profile-opt. Some |
| 47001 |
compilers and toolchains are known to not produce stable code when using |
| 47002 |
LTO, be sure to test things thoroughly before relying on it. It can |
| 47003 |
provide a few % speed up over profile-opt alone. |
| 47004 |
|
| 47005 |
- bpo-26624: Adds validation of ucrtbase[d].dll version with warning for old |
| 47006 |
versions. |
| 47007 |
|
| 47008 |
- bpo-17603: Avoid error about nonexistent fileblocks.o file by using a |
| 47009 |
lower-level check for st_blocks in struct stat. |
| 47010 |
|
| 47011 |
- bpo-26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern |
| 47012 |
Thiel. |
| 47013 |
|
| 47014 |
- bpo-26465: Update Windows builds to use OpenSSL 1.0.2g. |
| 47015 |
|
| 47016 |
- bpo-24421: Compile Modules/_math.c once, before building extensions. |
| 47017 |
Previously it could fail to compile properly if the math and cmath builds |
| 47018 |
were concurrent. |
| 47019 |
|
| 47020 |
- bpo-25348: Added ``--pgo`` and ``--pgo-job`` arguments to |
| 47021 |
``PCbuild\build.bat`` for building with Profile-Guided Optimization. The |
| 47022 |
old ``PCbuild\build_pgo.bat`` script is now deprecated, and simply calls |
| 47023 |
``PCbuild\build.bat --pgo %*``. |
| 47024 |
|
| 47025 |
- bpo-25827: Add support for building with ICC to ``configure``, including a |
| 47026 |
new ``--with-icc`` flag. |
| 47027 |
|
| 47028 |
- bpo-25696: Fix installation of Python on UNIX with make -j9. |
| 47029 |
|
| 47030 |
- bpo-26930: Update OS X 10.5+ 32-bit-only installer to build and link with |
| 47031 |
OpenSSL 1.0.2h. |
| 47032 |
|
| 47033 |
- bpo-26268: Update Windows builds to use OpenSSL 1.0.2f. |
| 47034 |
|
| 47035 |
- bpo-25136: Support Apple Xcode 7's new textual SDK stub libraries. |
| 47036 |
|
| 47037 |
- bpo-24324: Do not enable unreachable code warnings when using gcc as the |
| 47038 |
option does not work correctly in older versions of gcc and has been |
| 47039 |
silently removed as of gcc-4.5. |
| 47040 |
|
| 47041 |
Windows |
| 47042 |
------- |
| 47043 |
|
| 47044 |
- bpo-27053: Updates make_zip.py to correctly generate library ZIP file. |
| 47045 |
|
| 47046 |
- bpo-26268: Update the prepare_ssl.py script to handle OpenSSL releases |
| 47047 |
that don't include the contents of the include directory (that is, 1.0.2e |
| 47048 |
and later). |
| 47049 |
|
| 47050 |
- bpo-26071: bdist_wininst created binaries fail to start and find 32bit |
| 47051 |
Python |
| 47052 |
|
| 47053 |
- bpo-26073: Update the list of magic numbers in launcher |
| 47054 |
|
| 47055 |
- bpo-26065: Excludes venv from library when generating embeddable distro. |
| 47056 |
|
| 47057 |
- bpo-17500: Remove unused and outdated icons. (See also: |
| 47058 |
https://github.com/python/pythondotorg/issues/945) |
| 47059 |
|
| 47060 |
Tools/Demos |
| 47061 |
----------- |
| 47062 |
|
| 47063 |
- bpo-26799: Fix python-gdb.py: don't get C types once when the Python code |
| 47064 |
is loaded, but get C types on demand. The C types can change if |
| 47065 |
python-gdb.py is loaded before the Python executable. Patch written by |
| 47066 |
Thomas Ilsche. |
| 47067 |
|
| 47068 |
- bpo-26271: Fix the Freeze tool to properly use flags passed through |
| 47069 |
configure. Patch by Daniel Shaulov. |
| 47070 |
|
| 47071 |
- bpo-26489: Add dictionary unpacking support to Tools/parser/unparse.py. |
| 47072 |
Patch by Guo Ci Teo. |
| 47073 |
|
| 47074 |
- bpo-26316: Fix variable name typo in Argument Clinic. |
| 47075 |
|
| 47076 |
|
| 47077 |
What's New in Python 3.5.1 final? |
| 47078 |
================================= |
| 47079 |
|
| 47080 |
*Release date: 2015-12-06* |
| 47081 |
|
| 47082 |
Core and Builtins |
| 47083 |
----------------- |
| 47084 |
|
| 47085 |
- bpo-25709: Fixed problem with in-place string concatenation and utf-8 |
| 47086 |
cache. |
| 47087 |
|
| 47088 |
Windows |
| 47089 |
------- |
| 47090 |
|
| 47091 |
- bpo-25715: Python 3.5.1 installer shows wrong upgrade path and incorrect |
| 47092 |
logic for launcher detection. |
| 47093 |
|
| 47094 |
|
| 47095 |
What's New in Python 3.5.1 release candidate 1? |
| 47096 |
=============================================== |
| 47097 |
|
| 47098 |
*Release date: 2015-11-22* |
| 47099 |
|
| 47100 |
Core and Builtins |
| 47101 |
----------------- |
| 47102 |
|
| 47103 |
- bpo-25630: Fix a possible segfault during argument parsing in functions |
| 47104 |
that accept filesystem paths. |
| 47105 |
|
| 47106 |
- bpo-23564: Fixed a partially broken sanity check in the _posixsubprocess |
| 47107 |
internals regarding how fds_to_pass were passed to the child. The bug had |
| 47108 |
no actual impact as subprocess.py already avoided it. |
| 47109 |
|
| 47110 |
- bpo-25388: Fixed tokenizer crash when processing undecodable source code |
| 47111 |
with a null byte. |
| 47112 |
|
| 47113 |
- bpo-25462: The hash of the key now is calculated only once in most |
| 47114 |
operations in C implementation of OrderedDict. |
| 47115 |
|
| 47116 |
- bpo-22995: Default implementation of __reduce__ and __reduce_ex__ now |
| 47117 |
rejects builtin types with not defined __new__. |
| 47118 |
|
| 47119 |
- bpo-25555: Fix parser and AST: fill lineno and col_offset of "arg" node |
| 47120 |
when compiling AST from Python objects. |
| 47121 |
|
| 47122 |
- bpo-24802: Avoid buffer overreads when int(), float(), compile(), exec() |
| 47123 |
and eval() are passed bytes-like objects. These objects are not |
| 47124 |
necessarily terminated by a null byte, but the functions assumed they |
| 47125 |
were. |
| 47126 |
|
| 47127 |
- bpo-24726: Fixed a crash and leaking NULL in repr() of OrderedDict that |
| 47128 |
was mutated by direct calls of dict methods. |
| 47129 |
|
| 47130 |
- bpo-25449: Iterating OrderedDict with keys with unstable hash now raises |
| 47131 |
KeyError in C implementations as well as in Python implementation. |
| 47132 |
|
| 47133 |
- bpo-25395: Fixed crash when highly nested OrderedDict structures were |
| 47134 |
garbage collected. |
| 47135 |
|
| 47136 |
- bpo-25274: sys.setrecursionlimit() now raises a RecursionError if the new |
| 47137 |
recursion limit is too low depending at the current recursion depth. |
| 47138 |
Modify also the "lower-water mark" formula to make it monotonic. This mark |
| 47139 |
is used to decide when the overflowed flag of the thread state is reset. |
| 47140 |
|
| 47141 |
- bpo-24402: Fix input() to prompt to the redirected stdout when |
| 47142 |
sys.stdout.fileno() fails. |
| 47143 |
|
| 47144 |
- bpo-24806: Prevent builtin types that are not allowed to be subclassed |
| 47145 |
from being subclassed through multiple inheritance. |
| 47146 |
|
| 47147 |
- bpo-24848: Fixed a number of bugs in UTF-7 decoding of misformed data. |
| 47148 |
|
| 47149 |
- bpo-25280: Import trace messages emitted in verbose (-v) mode are no |
| 47150 |
longer formatted twice. |
| 47151 |
|
| 47152 |
- bpo-25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() |
| 47153 |
function instead of the getentropy() function. The getentropy() function |
| 47154 |
is blocking to generate very good quality entropy, os.urandom() doesn't |
| 47155 |
need such high-quality entropy. |
| 47156 |
|
| 47157 |
- bpo-25182: The stdprinter (used as sys.stderr before the io module is |
| 47158 |
imported at startup) now uses the backslashreplace error handler. |
| 47159 |
|
| 47160 |
- bpo-25131: Make the line number and column offset of set/dict literals and |
| 47161 |
comprehensions correspond to the opening brace. |
| 47162 |
|
| 47163 |
- bpo-25150: Hide the private :samp:`_Py_atomic_{xxx}` symbols from the |
| 47164 |
public Python.h header to fix a compilation error with OpenMP. |
| 47165 |
PyThreadState_GET() becomes an alias to PyThreadState_Get() to avoid ABI |
| 47166 |
incompatibilities. |
| 47167 |
|
| 47168 |
Library |
| 47169 |
------- |
| 47170 |
|
| 47171 |
- bpo-25626: Change three zlib functions to accept sizes that fit in |
| 47172 |
Py_ssize_t, but internally cap those sizes to UINT_MAX. This resolves a |
| 47173 |
regression in 3.5 where GzipFile.read() failed to read chunks larger than |
| 47174 |
2 or 4 GiB. The change affects the zlib.Decompress.decompress() |
| 47175 |
max_length parameter, the zlib.decompress() bufsize parameter, and the |
| 47176 |
zlib.Decompress.flush() length parameter. |
| 47177 |
|
| 47178 |
- bpo-25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True) |
| 47179 |
when the OS gives priority to errors such as EACCES over EEXIST. |
| 47180 |
|
| 47181 |
- bpo-25593: Change semantics of EventLoop.stop() in asyncio. |
| 47182 |
|
| 47183 |
- bpo-6973: When we know a subprocess.Popen process has died, do not allow |
| 47184 |
the send_signal(), terminate(), or kill() methods to do anything as they |
| 47185 |
could potentially signal a different process. |
| 47186 |
|
| 47187 |
- bpo-25590: In the Readline completer, only call getattr() once per |
| 47188 |
attribute. |
| 47189 |
|
| 47190 |
- bpo-25498: Fix a crash when garbage-collecting ctypes objects created by |
| 47191 |
wrapping a memoryview. This was a regression made in 3.5a1. Based on |
| 47192 |
patch by Eryksun. |
| 47193 |
|
| 47194 |
- bpo-25584: Added "escape" to the __all__ list in the glob module. |
| 47195 |
|
| 47196 |
- bpo-25584: Fixed recursive glob() with patterns starting with ``**``. |
| 47197 |
|
| 47198 |
- bpo-25446: Fix regression in smtplib's AUTH LOGIN support. |
| 47199 |
|
| 47200 |
- bpo-18010: Fix the pydoc web server's module search function to handle |
| 47201 |
exceptions from importing packages. |
| 47202 |
|
| 47203 |
- bpo-25554: Got rid of circular references in regular expression parsing. |
| 47204 |
|
| 47205 |
- bpo-25510: fileinput.FileInput.readline() now returns b'' instead of '' at |
| 47206 |
the end if the FileInput was opened with binary mode. Patch by Ryosuke |
| 47207 |
Ito. |
| 47208 |
|
| 47209 |
- bpo-25503: Fixed inspect.getdoc() for inherited docstrings of properties. |
| 47210 |
Original patch by John Mark Vandenberg. |
| 47211 |
|
| 47212 |
- bpo-25515: Always use os.urandom as a source of randomness in uuid.uuid4. |
| 47213 |
|
| 47214 |
- bpo-21827: Fixed textwrap.dedent() for the case when largest common |
| 47215 |
whitespace is a substring of smallest leading whitespace. Based on patch |
| 47216 |
by Robert Li. |
| 47217 |
|
| 47218 |
- bpo-25447: The lru_cache() wrapper objects now can be copied and pickled |
| 47219 |
(by returning the original object unchanged). |
| 47220 |
|
| 47221 |
- bpo-25390: typing: Don't crash on Union[str, Pattern]. |
| 47222 |
|
| 47223 |
- bpo-25441: asyncio: Raise error from drain() when socket is closed. |
| 47224 |
|
| 47225 |
- bpo-25410: Cleaned up and fixed minor bugs in C implementation of |
| 47226 |
OrderedDict. |
| 47227 |
|
| 47228 |
- bpo-25411: Improved Unicode support in SMTPHandler through better use of |
| 47229 |
the email package. Thanks to user simon04 for the patch. |
| 47230 |
|
| 47231 |
- bpo-25407: Remove mentions of the formatter module being removed in Python |
| 47232 |
3.6. |
| 47233 |
|
| 47234 |
- bpo-25406: Fixed a bug in C implementation of OrderedDict.move_to_end() |
| 47235 |
that caused segmentation fault or hang in iterating after moving several |
| 47236 |
items to the start of ordered dict. |
| 47237 |
|
| 47238 |
- bpo-25364: zipfile now works in threads disabled builds. |
| 47239 |
|
| 47240 |
- bpo-25328: smtpd's SMTPChannel now correctly raises a ValueError if both |
| 47241 |
decode_data and enable_SMTPUTF8 are set to true. |
| 47242 |
|
| 47243 |
- bpo-25316: distutils raises OSError instead of DistutilsPlatformError when |
| 47244 |
MSVC is not installed. |
| 47245 |
|
| 47246 |
- bpo-25380: Fixed protocol for the STACK_GLOBAL opcode in |
| 47247 |
pickletools.opcodes. |
| 47248 |
|
| 47249 |
- bpo-23972: Updates asyncio datagram create method allowing reuseport and |
| 47250 |
reuseaddr socket options to be set prior to binding the socket. Mirroring |
| 47251 |
the existing asyncio create_server method the reuseaddr option for |
| 47252 |
datagram sockets defaults to True if the O/S is 'posix' (except if the |
| 47253 |
platform is Cygwin). Patch by Chris Laws. |
| 47254 |
|
| 47255 |
- bpo-25304: Add asyncio.run_coroutine_threadsafe(). This lets you submit a |
| 47256 |
coroutine to a loop from another thread, returning a |
| 47257 |
concurrent.futures.Future. By Vincent Michel. |
| 47258 |
|
| 47259 |
- bpo-25232: Fix CGIRequestHandler to split the query from the URL at the |
| 47260 |
first question mark (?) rather than the last. Patch from Xiang Zhang. |
| 47261 |
|
| 47262 |
- bpo-24657: Prevent CGIRequestHandler from collapsing slashes in the query |
| 47263 |
part of the URL as if it were a path. Patch from Xiang Zhang. |
| 47264 |
|
| 47265 |
- bpo-24483: C implementation of functools.lru_cache() now calculates key's |
| 47266 |
hash only once. |
| 47267 |
|
| 47268 |
- bpo-22958: Constructor and update method of weakref.WeakValueDictionary |
| 47269 |
now accept the self and the dict keyword arguments. |
| 47270 |
|
| 47271 |
- bpo-22609: Constructor of collections.UserDict now accepts the self |
| 47272 |
keyword argument. |
| 47273 |
|
| 47274 |
- bpo-25111: Fixed comparison of traceback.FrameSummary. |
| 47275 |
|
| 47276 |
- bpo-25262: Added support for BINBYTES8 opcode in Python implementation of |
| 47277 |
unpickler. Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8 |
| 47278 |
opcodes no longer silently ignored on 32-bit platforms in C |
| 47279 |
implementation. |
| 47280 |
|
| 47281 |
- bpo-25034: Fix string.Formatter problem with auto-numbering and nested |
| 47282 |
format_specs. Patch by Anthon van der Neut. |
| 47283 |
|
| 47284 |
- bpo-25233: Rewrite the guts of asyncio.Queue and asyncio.Semaphore to be |
| 47285 |
more understandable and correct. |
| 47286 |
|
| 47287 |
- bpo-25203: Failed readline.set_completer_delims() no longer left the |
| 47288 |
module in inconsistent state. |
| 47289 |
|
| 47290 |
- bpo-23600: Default implementation of tzinfo.fromutc() was returning wrong |
| 47291 |
results in some cases. |
| 47292 |
|
| 47293 |
- bpo-23329: Allow the ssl module to be built with older versions of |
| 47294 |
LibreSSL. |
| 47295 |
|
| 47296 |
- Prevent overflow in _Unpickler_Read. |
| 47297 |
|
| 47298 |
- bpo-25047: The XML encoding declaration written by Element Tree now |
| 47299 |
respects the letter case given by the user. This restores the ability to |
| 47300 |
write encoding names in uppercase like "UTF-8", which worked in Python 2. |
| 47301 |
|
| 47302 |
- bpo-25135: Make deque_clear() safer by emptying the deque before clearing. |
| 47303 |
This helps avoid possible reentrancy issues. |
| 47304 |
|
| 47305 |
- bpo-19143: platform module now reads Windows version from kernel32.dll to |
| 47306 |
avoid compatibility shims. |
| 47307 |
|
| 47308 |
- bpo-25092: Fix datetime.strftime() failure when errno was already set to |
| 47309 |
EINVAL. |
| 47310 |
|
| 47311 |
- bpo-23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods |
| 47312 |
of datetime.datetime: microseconds are now rounded to nearest with ties |
| 47313 |
going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding |
| 47314 |
towards minus infinity (ROUND_FLOOR). It's important that these methods |
| 47315 |
use the same rounding mode than datetime.timedelta to keep the property: |
| 47316 |
(datetime(1970,1,1) + timedelta(seconds=t)) == |
| 47317 |
datetime.utcfromtimestamp(t). It also the rounding mode used by |
| 47318 |
round(float) for example. |
| 47319 |
|
| 47320 |
- bpo-25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on |
| 47321 |
Windows to support date after year 2038. It was a regression introduced in |
| 47322 |
Python 3.5.0. |
| 47323 |
|
| 47324 |
- bpo-25108: Omitted internal frames in traceback functions print_stack(), |
| 47325 |
format_stack(), and extract_stack() called without arguments. |
| 47326 |
|
| 47327 |
- bpo-25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows. |
| 47328 |
|
| 47329 |
- bpo-24684: socket.socket.getaddrinfo() now calls |
| 47330 |
PyUnicode_AsEncodedString() instead of calling the encode() method of the |
| 47331 |
host, to handle correctly custom string with an encode() method which |
| 47332 |
doesn't return a byte string. The encoder of the IDNA codec is now called |
| 47333 |
directly instead of calling the encode() method of the string. |
| 47334 |
|
| 47335 |
- bpo-25060: Correctly compute stack usage of the BUILD_MAP opcode. |
| 47336 |
|
| 47337 |
- bpo-24857: Comparing call_args to a long sequence now correctly returns a |
| 47338 |
boolean result instead of raising an exception. Patch by A Kaptur. |
| 47339 |
|
| 47340 |
- bpo-23144: Make sure that HTMLParser.feed() returns all the data, even |
| 47341 |
when convert_charrefs is True. |
| 47342 |
|
| 47343 |
- bpo-24982: shutil.make_archive() with the "zip" format now adds entries |
| 47344 |
for directories (including empty directories) in ZIP file. |
| 47345 |
|
| 47346 |
- bpo-25019: Fixed a crash caused by setting non-string key of expat parser. |
| 47347 |
Based on patch by John Leitch. |
| 47348 |
|
| 47349 |
- bpo-16180: Exit pdb if file has syntax error, instead of trapping user in |
| 47350 |
an infinite loop. Patch by Xavier de Gaye. |
| 47351 |
|
| 47352 |
- bpo-24891: Fix a race condition at Python startup if the file descriptor |
| 47353 |
of stdin (0), stdout (1) or stderr (2) is closed while Python is creating |
| 47354 |
sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set |
| 47355 |
to None if the creation of the object failed, instead of raising an |
| 47356 |
OSError exception. Initial patch written by Marco Paolini. |
| 47357 |
|
| 47358 |
- bpo-24992: Fix error handling and a race condition (related to garbage |
| 47359 |
collection) in collections.OrderedDict constructor. |
| 47360 |
|
| 47361 |
- bpo-24881: Fixed setting binary mode in Python implementation of FileIO on |
| 47362 |
Windows and Cygwin. Patch from Akira Li. |
| 47363 |
|
| 47364 |
- bpo-25578: Fix (another) memory leak in SSLSocket.getpeercer(). |
| 47365 |
|
| 47366 |
- bpo-25530: Disable the vulnerable SSLv3 protocol by default when creating |
| 47367 |
ssl.SSLContext. |
| 47368 |
|
| 47369 |
- bpo-25569: Fix memory leak in SSLSocket.getpeercert(). |
| 47370 |
|
| 47371 |
- bpo-25471: Sockets returned from accept() shouldn't appear to be |
| 47372 |
nonblocking. |
| 47373 |
|
| 47374 |
- bpo-25319: When threading.Event is reinitialized, the underlying condition |
| 47375 |
should use a regular lock rather than a recursive lock. |
| 47376 |
|
| 47377 |
- bpo-21112: Fix regression in unittest.expectedFailure on subclasses. Patch |
| 47378 |
from Berker Peksag. |
| 47379 |
|
| 47380 |
- bpo-24764: cgi.FieldStorage.read_multi() now ignores the Content-Length |
| 47381 |
header in part headers. Patch written by Peter Landry and reviewed by |
| 47382 |
Pierre Quentel. |
| 47383 |
|
| 47384 |
- bpo-24913: Fix overrun error in deque.index(). Found by John Leitch and |
| 47385 |
Bryce Darling. |
| 47386 |
|
| 47387 |
- bpo-24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu. |
| 47388 |
|
| 47389 |
- bpo-21159: Improve message in |
| 47390 |
configparser.InterpolationMissingOptionError. Patch from Łukasz Langa. |
| 47391 |
|
| 47392 |
- bpo-20362: Honour TestCase.longMessage correctly in assertRegex. Patch |
| 47393 |
from Ilia Kurenkov. |
| 47394 |
|
| 47395 |
- bpo-23572: Fixed functools.singledispatch on classes with false |
| 47396 |
metaclasses. Patch by Ethan Furman. |
| 47397 |
|
| 47398 |
- asyncio: ensure_future() now accepts awaitable objects. |
| 47399 |
|
| 47400 |
IDLE |
| 47401 |
---- |
| 47402 |
|
| 47403 |
- bpo-15348: Stop the debugger engine (normally in a user process) before |
| 47404 |
closing the debugger window (running in the IDLE process). This prevents |
| 47405 |
the RuntimeErrors that were being caught and ignored. |
| 47406 |
|
| 47407 |
- bpo-24455: Prevent IDLE from hanging when a) closing the shell while the |
| 47408 |
debugger is active (15347); b) closing the debugger with the [X] button |
| 47409 |
(15348); and c) activating the debugger when already active (24455). The |
| 47410 |
patch by Mark Roseman does this by making two changes. 1. Suspend and |
| 47411 |
resume the gui.interaction method with the tcl vwait mechanism intended |
| 47412 |
for this purpose (instead of root.mainloop & .quit). 2. In gui.run, allow |
| 47413 |
any existing interaction to terminate first. |
| 47414 |
|
| 47415 |
- Change 'The program' to 'Your program' in an IDLE 'kill program?' message |
| 47416 |
to make it clearer that the program referred to is the currently running |
| 47417 |
user program, not IDLE itself. |
| 47418 |
|
| 47419 |
- bpo-24750: Improve the appearance of the IDLE editor window status bar. |
| 47420 |
Patch by Mark Roseman. |
| 47421 |
|
| 47422 |
- bpo-25313: Change the handling of new built-in text color themes to better |
| 47423 |
address the compatibility problem introduced by the addition of IDLE Dark. |
| 47424 |
Consistently use the revised idleConf.CurrentTheme everywhere in idlelib. |
| 47425 |
|
| 47426 |
- bpo-24782: Extension configuration is now a tab in the IDLE Preferences |
| 47427 |
dialog rather than a separate dialog. The former tabs are now a sorted |
| 47428 |
list. Patch by Mark Roseman. |
| 47429 |
|
| 47430 |
- bpo-22726: Re-activate the config dialog help button with some content |
| 47431 |
about the other buttons and the new IDLE Dark theme. |
| 47432 |
|
| 47433 |
- bpo-24820: IDLE now has an 'IDLE Dark' built-in text color theme. It is |
| 47434 |
more or less IDLE Classic inverted, with a cobalt blue background. |
| 47435 |
Strings, comments, keywords, ... are still green, red, orange, ... . To |
| 47436 |
use it with IDLEs released before November 2015, hit the 'Save as New |
| 47437 |
Custom Theme' button and enter a new name, such as 'Custom Dark'. The |
| 47438 |
custom theme will work with any IDLE release, and can be modified. |
| 47439 |
|
| 47440 |
- bpo-25224: README.txt is now an idlelib index for IDLE developers and |
| 47441 |
curious users. The previous user content is now in the IDLE doc chapter. |
| 47442 |
'IDLE' now means 'Integrated Development and Learning Environment'. |
| 47443 |
|
| 47444 |
- bpo-24820: Users can now set breakpoint colors in Settings -> Custom |
| 47445 |
Highlighting. Original patch by Mark Roseman. |
| 47446 |
|
| 47447 |
- bpo-24972: Inactive selection background now matches active selection |
| 47448 |
background, as configured by users, on all systems. Found items are now |
| 47449 |
always highlighted on Windows. Initial patch by Mark Roseman. |
| 47450 |
|
| 47451 |
- bpo-24570: Idle: make calltip and completion boxes appear on Macs affected |
| 47452 |
by a tk regression. Initial patch by Mark Roseman. |
| 47453 |
|
| 47454 |
- bpo-24988: Idle ScrolledList context menus (used in debugger) now work on |
| 47455 |
Mac Aqua. Patch by Mark Roseman. |
| 47456 |
|
| 47457 |
- bpo-24801: Make right-click for context menu work on Mac Aqua. Patch by |
| 47458 |
Mark Roseman. |
| 47459 |
|
| 47460 |
- bpo-25173: Associate tkinter messageboxes with a specific widget. For Mac |
| 47461 |
OSX, make them a 'sheet'. Patch by Mark Roseman. |
| 47462 |
|
| 47463 |
- bpo-25198: Enhance the initial html viewer now used for Idle Help. |
| 47464 |
Properly indent fixed-pitch text (patch by Mark Roseman). Give code |
| 47465 |
snippet a very Sphinx-like light blueish-gray background. Re-use initial |
| 47466 |
width and height set by users for shell and editor. When the Table of |
| 47467 |
Contents (TOC) menu is used, put the section header at the top of the |
| 47468 |
screen. |
| 47469 |
|
| 47470 |
- bpo-25225: Condense and rewrite Idle doc section on text colors. |
| 47471 |
|
| 47472 |
- bpo-21995: Explain some differences between IDLE and console Python. |
| 47473 |
|
| 47474 |
- bpo-22820: Explain need for *print* when running file from Idle editor. |
| 47475 |
|
| 47476 |
- bpo-25224: Doc: augment Idle feature list and no-subprocess section. |
| 47477 |
|
| 47478 |
- bpo-25219: Update doc for Idle command line options. Some were missing and |
| 47479 |
notes were not correct. |
| 47480 |
|
| 47481 |
- bpo-24861: Most of idlelib is private and subject to change. Use |
| 47482 |
idleib.idle.* to start Idle. See idlelib.__init__.__doc__. |
| 47483 |
|
| 47484 |
- bpo-25199: Idle: add synchronization comments for future maintainers. |
| 47485 |
|
| 47486 |
- bpo-16893: Replace help.txt with help.html for Idle doc display. The new |
| 47487 |
idlelib/help.html is rstripped Doc/build/html/library/idle.html. It looks |
| 47488 |
better than help.txt and will better document Idle as released. The |
| 47489 |
tkinter html viewer that works for this file was written by Mark Roseman. |
| 47490 |
The now unused EditorWindow.HelpDialog class and helt.txt file are |
| 47491 |
deprecated. |
| 47492 |
|
| 47493 |
- bpo-24199: Deprecate unused idlelib.idlever with possible removal in 3.6. |
| 47494 |
|
| 47495 |
- bpo-24790: Remove extraneous code (which also create 2 & 3 conflicts). |
| 47496 |
|
| 47497 |
Documentation |
| 47498 |
------------- |
| 47499 |
|
| 47500 |
- bpo-22558: Add remaining doc links to source code for Python-coded |
| 47501 |
modules. Patch by Yoni Lavi. |
| 47502 |
|
| 47503 |
- bpo-12067: Rewrite Comparisons section in the Expressions chapter of the |
| 47504 |
language reference. Some of the details of comparing mixed types were |
| 47505 |
incorrect or ambiguous. NotImplemented is only relevant at a lower level |
| 47506 |
than the Expressions chapter. Added details of comparing range() objects, |
| 47507 |
and default behaviour and consistency suggestions for user-defined |
| 47508 |
classes. Patch from Andy Maier. |
| 47509 |
|
| 47510 |
- bpo-24952: Clarify the default size argument of stack_size() in the |
| 47511 |
"threading" and "_thread" modules. Patch from Mattip. |
| 47512 |
|
| 47513 |
- bpo-23725: Overhaul tempfile docs. Note deprecated status of mktemp. Patch |
| 47514 |
from Zbigniew Jędrzejewski-Szmek. |
| 47515 |
|
| 47516 |
- bpo-24808: Update the types of some PyTypeObject fields. Patch by Joseph |
| 47517 |
Weston. |
| 47518 |
|
| 47519 |
- bpo-22812: Fix unittest discovery examples. Patch from Pam McA'Nulty. |
| 47520 |
|
| 47521 |
Tests |
| 47522 |
----- |
| 47523 |
|
| 47524 |
- bpo-25449: Added tests for OrderedDict subclasses. |
| 47525 |
|
| 47526 |
- bpo-25099: Make test_compileall not fail when an entry on sys.path cannot |
| 47527 |
be written to (commonly seen in administrative installs on Windows). |
| 47528 |
|
| 47529 |
- bpo-23919: Prevents assert dialogs appearing in the test suite. |
| 47530 |
|
| 47531 |
- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass |
| 47532 |
along to regrtest.py. Previously there was a limit of 9. |
| 47533 |
|
| 47534 |
Build |
| 47535 |
----- |
| 47536 |
|
| 47537 |
- bpo-24915: Add LLVM support for PGO builds and use the test suite to |
| 47538 |
generate the profile data. Initial patch by Alecsandru Patrascu of Intel. |
| 47539 |
|
| 47540 |
- bpo-24910: Windows MSIs now have unique display names. |
| 47541 |
|
| 47542 |
- bpo-24986: It is now possible to build Python on Windows without errors |
| 47543 |
when external libraries are not available. |
| 47544 |
|
| 47545 |
Windows |
| 47546 |
------- |
| 47547 |
|
| 47548 |
- bpo-25450: Updates shortcuts to start Python in installation directory. |
| 47549 |
|
| 47550 |
- bpo-25164: Changes default all-users install directory to match per-user |
| 47551 |
directory. |
| 47552 |
|
| 47553 |
- bpo-25143: Improves installer error messages for unsupported platforms. |
| 47554 |
|
| 47555 |
- bpo-25163: Display correct directory in installer when using non-default |
| 47556 |
settings. |
| 47557 |
|
| 47558 |
- bpo-25361: Disables use of SSE2 instructions in Windows 32-bit build |
| 47559 |
|
| 47560 |
- bpo-25089: Adds logging to installer for case where launcher is not |
| 47561 |
selected on upgrade. |
| 47562 |
|
| 47563 |
- bpo-25165: Windows uninstallation should not remove launcher if other |
| 47564 |
versions remain |
| 47565 |
|
| 47566 |
- bpo-25112: py.exe launcher is missing icons |
| 47567 |
|
| 47568 |
- bpo-25102: Windows installer does not precompile for -O or -OO. |
| 47569 |
|
| 47570 |
- bpo-25081: Makes Back button in installer go back to upgrade page when |
| 47571 |
upgrading. |
| 47572 |
|
| 47573 |
- bpo-25091: Increases font size of the installer. |
| 47574 |
|
| 47575 |
- bpo-25126: Clarifies that the non-web installer will download some |
| 47576 |
components. |
| 47577 |
|
| 47578 |
- bpo-25213: Restores requestedExecutionLevel to manifest to disable UAC |
| 47579 |
virtualization. |
| 47580 |
|
| 47581 |
- bpo-25022: Removed very outdated PC/example_nt/ directory. |
| 47582 |
|
| 47583 |
Tools/Demos |
| 47584 |
----------- |
| 47585 |
|
| 47586 |
- bpo-25440: Fix output of python-config --extension-suffix. |
| 47587 |
|
| 47588 |
|
| 47589 |
What's New in Python 3.5.0 final? |
| 47590 |
================================= |
| 47591 |
|
| 47592 |
*Release date: 2015-09-13* |
| 47593 |
|
| 47594 |
Build |
| 47595 |
----- |
| 47596 |
|
| 47597 |
- bpo-25071: Windows installer should not require TargetDir parameter when |
| 47598 |
installing quietly. |
| 47599 |
|
| 47600 |
|
| 47601 |
What's New in Python 3.5.0 release candidate 4? |
| 47602 |
=============================================== |
| 47603 |
|
| 47604 |
*Release date: 2015-09-09* |
| 47605 |
|
| 47606 |
Library |
| 47607 |
------- |
| 47608 |
|
| 47609 |
- bpo-25029: Fixes MemoryError in test_strptime. |
| 47610 |
|
| 47611 |
Build |
| 47612 |
----- |
| 47613 |
|
| 47614 |
- bpo-25027: Reverts partial-static build options and adds vcruntime140.dll |
| 47615 |
to Windows installation. |
| 47616 |
|
| 47617 |
|
| 47618 |
What's New in Python 3.5.0 release candidate 3? |
| 47619 |
=============================================== |
| 47620 |
|
| 47621 |
*Release date: 2015-09-07* |
| 47622 |
|
| 47623 |
Core and Builtins |
| 47624 |
----------------- |
| 47625 |
|
| 47626 |
- bpo-24305: Prevent import subsystem stack frames from being counted by the |
| 47627 |
warnings.warn(stacklevel=) parameter. |
| 47628 |
|
| 47629 |
- bpo-24912: Prevent __class__ assignment to immutable built-in objects. |
| 47630 |
|
| 47631 |
- bpo-24975: Fix AST compilation for :pep:`448` syntax. |
| 47632 |
|
| 47633 |
Library |
| 47634 |
------- |
| 47635 |
|
| 47636 |
- bpo-24917: time_strftime() buffer over-read. |
| 47637 |
|
| 47638 |
- bpo-24748: To resolve a compatibility problem found with py2exe and |
| 47639 |
pywin32, imp.load_dynamic() once again ignores previously loaded modules |
| 47640 |
to support Python modules replacing themselves with extension modules. |
| 47641 |
Patch by Petr Viktorin. |
| 47642 |
|
| 47643 |
- bpo-24635: Fixed a bug in typing.py where isinstance([], typing.Iterable) |
| 47644 |
would return True once, then False on subsequent calls. |
| 47645 |
|
| 47646 |
- bpo-24989: Fixed buffer overread in BytesIO.readline() if a position is |
| 47647 |
set beyond size. Based on patch by John Leitch. |
| 47648 |
|
| 47649 |
- bpo-24913: Fix overrun error in deque.index(). Found by John Leitch and |
| 47650 |
Bryce Darling. |
| 47651 |
|
| 47652 |
|
| 47653 |
What's New in Python 3.5.0 release candidate 2? |
| 47654 |
=============================================== |
| 47655 |
|
| 47656 |
*Release date: 2015-08-25* |
| 47657 |
|
| 47658 |
Core and Builtins |
| 47659 |
----------------- |
| 47660 |
|
| 47661 |
- bpo-24769: Interpreter now starts properly when dynamic loading is |
| 47662 |
disabled. Patch by Petr Viktorin. |
| 47663 |
|
| 47664 |
- bpo-21167: NAN operations are now handled correctly when python is |
| 47665 |
compiled with ICC even if -fp-model strict is not specified. |
| 47666 |
|
| 47667 |
- bpo-24492: A "package" lacking a __name__ attribute when trying to perform |
| 47668 |
a ``from .. import ...`` statement will trigger an ImportError instead of |
| 47669 |
an AttributeError. |
| 47670 |
|
| 47671 |
Library |
| 47672 |
------- |
| 47673 |
|
| 47674 |
- bpo-24847: Removes vcruntime140.dll dependency from Tcl/Tk. |
| 47675 |
|
| 47676 |
- bpo-24839: platform._syscmd_ver raises DeprecationWarning |
| 47677 |
|
| 47678 |
- bpo-24867: Fix Task.get_stack() for 'async def' coroutines |
| 47679 |
|
| 47680 |
|
| 47681 |
What's New in Python 3.5.0 release candidate 1? |
| 47682 |
=============================================== |
| 47683 |
|
| 47684 |
*Release date: 2015-08-09* |
| 47685 |
|
| 47686 |
Core and Builtins |
| 47687 |
----------------- |
| 47688 |
|
| 47689 |
- bpo-24667: Resize odict in all cases that the underlying dict resizes. |
| 47690 |
|
| 47691 |
Library |
| 47692 |
------- |
| 47693 |
|
| 47694 |
- bpo-24824: Signatures of codecs.encode() and codecs.decode() now are |
| 47695 |
compatible with pydoc. |
| 47696 |
|
| 47697 |
- bpo-24634: Importing uuid should not try to load libc on Windows |
| 47698 |
|
| 47699 |
- bpo-24798: _msvccompiler.py doesn't properly support manifests |
| 47700 |
|
| 47701 |
- bpo-4395: Better testing and documentation of binary operators. Patch by |
| 47702 |
Martin Panter. |
| 47703 |
|
| 47704 |
- bpo-23973: Update typing.py from GitHub repo. |
| 47705 |
|
| 47706 |
- bpo-23004: mock_open() now reads binary data correctly when the type of |
| 47707 |
read_data is bytes. Initial patch by Aaron Hill. |
| 47708 |
|
| 47709 |
- bpo-23888: Handle fractional time in cookie expiry. Patch by ssh. |
| 47710 |
|
| 47711 |
- bpo-23652: Make it possible to compile the select module against the libc |
| 47712 |
headers from the Linux Standard Base, which do not include some EPOLL |
| 47713 |
macros. Patch by Matt Frank. |
| 47714 |
|
| 47715 |
- bpo-22932: Fix timezones in email.utils.formatdate. Patch from Dmitry |
| 47716 |
Shachnev. |
| 47717 |
|
| 47718 |
- bpo-23779: imaplib raises TypeError if authenticator tries to abort. Patch |
| 47719 |
from Craig Holmquist. |
| 47720 |
|
| 47721 |
- bpo-23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch |
| 47722 |
written by Matthieu Gautier. |
| 47723 |
|
| 47724 |
- bpo-23254: Document how to close the TCPServer listening socket. Patch |
| 47725 |
from Martin Panter. |
| 47726 |
|
| 47727 |
- bpo-19450: Update Windows and OS X installer builds to use SQLite 3.8.11. |
| 47728 |
|
| 47729 |
- bpo-17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella. |
| 47730 |
|
| 47731 |
- bpo-24791: Fix grammar regression for call syntax: 'g(\*a or b)'. |
| 47732 |
|
| 47733 |
IDLE |
| 47734 |
---- |
| 47735 |
|
| 47736 |
- bpo-23672: Allow Idle to edit and run files with astral chars in name. |
| 47737 |
Patch by Mohd Sanad Zaki Rizvi. |
| 47738 |
|
| 47739 |
- bpo-24745: Idle editor default font. Switch from Courier to |
| 47740 |
platform-sensitive TkFixedFont. This should not affect current customized |
| 47741 |
font selections. If there is a problem, edit |
| 47742 |
$HOME/.idlerc/config-main.cfg and remove ':samp:`font{xxx}`' entries from |
| 47743 |
[Editor Window]. Patch by Mark Roseman. |
| 47744 |
|
| 47745 |
- bpo-21192: Idle editor. When a file is run, put its name in the restart |
| 47746 |
bar. Do not print false prompts. Original patch by Adnan Umer. |
| 47747 |
|
| 47748 |
- bpo-13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy. |
| 47749 |
|
| 47750 |
Documentation |
| 47751 |
------------- |
| 47752 |
|
| 47753 |
- bpo-24129: Clarify the reference documentation for name resolution. This |
| 47754 |
includes removing the assumption that readers will be familiar with the |
| 47755 |
name resolution scheme Python used prior to the introduction of lexical |
| 47756 |
scoping for function namespaces. Patch by Ivan Levkivskyi. |
| 47757 |
|
| 47758 |
- bpo-20769: Improve reload() docs. Patch by Dorian Pula. |
| 47759 |
|
| 47760 |
- bpo-23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. |
| 47761 |
|
| 47762 |
- bpo-24729: Correct IO tutorial to match implementation regarding encoding |
| 47763 |
parameter to open function. |
| 47764 |
|
| 47765 |
Tests |
| 47766 |
----- |
| 47767 |
|
| 47768 |
- bpo-24751: When running regrtest with the ``-w`` command line option, a |
| 47769 |
test run is no longer marked as a failure if all tests succeed when |
| 47770 |
re-run. |
| 47771 |
|
| 47772 |
|
| 47773 |
What's New in Python 3.5.0 beta 4? |
| 47774 |
================================== |
| 47775 |
|
| 47776 |
*Release date: 2015-07-26* |
| 47777 |
|
| 47778 |
Core and Builtins |
| 47779 |
----------------- |
| 47780 |
|
| 47781 |
- bpo-23573: Restored optimization of bytes.rfind() and bytearray.rfind() |
| 47782 |
for single-byte argument on Linux. |
| 47783 |
|
| 47784 |
- bpo-24569: Make :pep:`448` dictionary evaluation more consistent. |
| 47785 |
|
| 47786 |
- bpo-24583: Fix crash when set is mutated while being updated. |
| 47787 |
|
| 47788 |
- bpo-24407: Fix crash when dict is mutated while being updated. |
| 47789 |
|
| 47790 |
- bpo-24619: New approach for tokenizing async/await. As a consequence, it |
| 47791 |
is now possible to have one-line 'async def foo(): await ..' functions. |
| 47792 |
|
| 47793 |
- bpo-24687: Plug refleak on SyntaxError in function parameters annotations. |
| 47794 |
|
| 47795 |
- bpo-15944: memoryview: Allow arbitrary formats when casting to bytes. |
| 47796 |
Patch by Martin Panter. |
| 47797 |
|
| 47798 |
Library |
| 47799 |
------- |
| 47800 |
|
| 47801 |
- bpo-23441: rcompleter now prints a tab character instead of displaying |
| 47802 |
possible completions for an empty word. Initial patch by Martin Sekera. |
| 47803 |
|
| 47804 |
- bpo-24683: Fixed crashes in _json functions called with arguments of |
| 47805 |
inappropriate type. |
| 47806 |
|
| 47807 |
- bpo-21697: shutil.copytree() now correctly handles symbolic links that |
| 47808 |
point to directories. Patch by Eduardo Seabra and Thomas Kluyver. |
| 47809 |
|
| 47810 |
- bpo-14373: Fixed segmentation fault when gc.collect() is called during |
| 47811 |
constructing lru_cache (C implementation). |
| 47812 |
|
| 47813 |
- bpo-24695: Fix a regression in traceback.print_exception(). If |
| 47814 |
exc_traceback is None we shouldn't print a traceback header like described |
| 47815 |
in the documentation. |
| 47816 |
|
| 47817 |
- bpo-24620: Random.setstate() now validates the value of state last |
| 47818 |
element. |
| 47819 |
|
| 47820 |
- bpo-22485: Fixed an issue that caused ``inspect.getsource`` to return |
| 47821 |
incorrect results on nested functions. |
| 47822 |
|
| 47823 |
- bpo-22153: Improve unittest docs. Patch from Martin Panter and evilzero. |
| 47824 |
|
| 47825 |
- bpo-24580: Symbolic group references to open group in re patterns now are |
| 47826 |
explicitly forbidden as well as numeric group references. |
| 47827 |
|
| 47828 |
- bpo-24206: Fixed __eq__ and __ne__ methods of inspect classes. |
| 47829 |
|
| 47830 |
- bpo-24631: Fixed regression in the timeit module with multiline setup. |
| 47831 |
|
| 47832 |
- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely. |
| 47833 |
Patch from Nicola Palumbo and Laurent De Buyst. |
| 47834 |
|
| 47835 |
- bpo-23661: unittest.mock side_effects can now be exceptions again. This |
| 47836 |
was a regression vs Python 3.4. Patch from Ignacio Rossi |
| 47837 |
|
| 47838 |
- bpo-24608: chunk.Chunk.read() now always returns bytes, not str. |
| 47839 |
|
| 47840 |
- bpo-18684: Fixed reading out of the buffer in the re module. |
| 47841 |
|
| 47842 |
- bpo-24259: tarfile now raises a ReadError if an archive is truncated |
| 47843 |
inside a data segment. |
| 47844 |
|
| 47845 |
- bpo-15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional |
| 47846 |
initial-response argument to the SMTP AUTH command. |
| 47847 |
|
| 47848 |
- bpo-24669: Fix inspect.getsource() for 'async def' functions. Patch by Kai |
| 47849 |
Groner. |
| 47850 |
|
| 47851 |
- bpo-24688: ast.get_docstring() for 'async def' functions. |
| 47852 |
|
| 47853 |
Build |
| 47854 |
----- |
| 47855 |
|
| 47856 |
- bpo-24603: Update Windows builds and OS X 10.5 installer to use OpenSSL |
| 47857 |
1.0.2d. |
| 47858 |
|
| 47859 |
|
| 47860 |
What's New in Python 3.5.0 beta 3? |
| 47861 |
================================== |
| 47862 |
|
| 47863 |
*Release date: 2015-07-05* |
| 47864 |
|
| 47865 |
Core and Builtins |
| 47866 |
----------------- |
| 47867 |
|
| 47868 |
- bpo-24467: Fixed possible buffer over-read in bytearray. The bytearray |
| 47869 |
object now always allocates place for trailing null byte and it's buffer |
| 47870 |
now is always null-terminated. |
| 47871 |
|
| 47872 |
- Upgrade to Unicode 8.0.0. |
| 47873 |
|
| 47874 |
- bpo-24345: Add Py_tp_finalize slot for the stable ABI. |
| 47875 |
|
| 47876 |
- bpo-24400: Introduce a distinct type for :pep:`492` coroutines; add |
| 47877 |
types.CoroutineType, inspect.getcoroutinestate, |
| 47878 |
inspect.getcoroutinelocals; coroutines no longer use CO_GENERATOR flag; |
| 47879 |
sys.set_coroutine_wrapper works only for 'async def' coroutines; |
| 47880 |
inspect.iscoroutine no longer uses collections.abc.Coroutine, it's |
| 47881 |
intended to test for pure 'async def' coroutines only; add new opcode: |
| 47882 |
GET_YIELD_FROM_ITER; fix generators wrapper used in types.coroutine to be |
| 47883 |
instance of collections.abc.Generator; collections.abc.Awaitable and |
| 47884 |
collections.abc.Coroutine can no longer be used to detect generator-based |
| 47885 |
coroutines--use inspect.isawaitable instead. |
| 47886 |
|
| 47887 |
- bpo-24450: Add gi_yieldfrom to generators and cr_await to coroutines. |
| 47888 |
Contributed by Benno Leslie and Yury Selivanov. |
| 47889 |
|
| 47890 |
- bpo-19235: Add new RecursionError exception. Patch by Georg Brandl. |
| 47891 |
|
| 47892 |
Library |
| 47893 |
------- |
| 47894 |
|
| 47895 |
- bpo-21750: mock_open.read_data can now be read from each instance, as it |
| 47896 |
could in Python 3.3. |
| 47897 |
|
| 47898 |
- bpo-24552: Fix use after free in an error case of the _pickle module. |
| 47899 |
|
| 47900 |
- bpo-24514: tarfile now tolerates number fields consisting of only |
| 47901 |
whitespace. |
| 47902 |
|
| 47903 |
- bpo-19176: Fixed doctype() related bugs in C implementation of |
| 47904 |
ElementTree. A deprecation warning no longer issued by XMLParser subclass |
| 47905 |
with default doctype() method. Direct call of doctype() now issues a |
| 47906 |
warning. Parser's doctype() now is not called if target's doctype() is |
| 47907 |
called. Based on patch by Martin Panter. |
| 47908 |
|
| 47909 |
- bpo-20387: Restore semantic round-trip correctness in tokenize/untokenize |
| 47910 |
for tab-indented blocks. |
| 47911 |
|
| 47912 |
- bpo-24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm() |
| 47913 |
functions of the audioop module. |
| 47914 |
|
| 47915 |
- bpo-24336: The contextmanager decorator now works with functions with |
| 47916 |
keyword arguments called "func" and "self". Patch by Martin Panter. |
| 47917 |
|
| 47918 |
- bpo-24522: Fix possible integer overflow in json accelerator module. |
| 47919 |
|
| 47920 |
- bpo-24489: ensure a previously set C errno doesn't disturb cmath.polar(). |
| 47921 |
|
| 47922 |
- bpo-24408: Fixed AttributeError in measure() and metrics() methods of |
| 47923 |
tkinter.Font. |
| 47924 |
|
| 47925 |
- bpo-14373: C implementation of functools.lru_cache() now can be used with |
| 47926 |
methods. |
| 47927 |
|
| 47928 |
- bpo-24347: Set KeyError if PyDict_GetItemWithError returns NULL. |
| 47929 |
|
| 47930 |
- bpo-24348: Drop superfluous incref/decref. |
| 47931 |
|
| 47932 |
- bpo-24359: Check for changed OrderedDict size during iteration. |
| 47933 |
|
| 47934 |
- bpo-24368: Support keyword arguments in OrderedDict methods. |
| 47935 |
|
| 47936 |
- bpo-24362: Simplify the C OrderedDict fast nodes resize logic. |
| 47937 |
|
| 47938 |
- bpo-24377: Fix a ref leak in OrderedDict.__repr__. |
| 47939 |
|
| 47940 |
- bpo-24369: Defend against key-changes during iteration. |
| 47941 |
|
| 47942 |
Tests |
| 47943 |
----- |
| 47944 |
|
| 47945 |
- bpo-24373: _testmultiphase and xxlimited now use tp_traverse and |
| 47946 |
tp_finalize to avoid reference leaks encountered when combining tp_dealloc |
| 47947 |
with PyType_FromSpec (see issue #16690 for details) |
| 47948 |
|
| 47949 |
Documentation |
| 47950 |
------------- |
| 47951 |
|
| 47952 |
- bpo-24458: Update documentation to cover multi-phase initialization for |
| 47953 |
extension modules (PEP 489). Patch by Petr Viktorin. |
| 47954 |
|
| 47955 |
- bpo-24351: Clarify what is meant by "identifier" in the context of |
| 47956 |
string.Template instances. |
| 47957 |
|
| 47958 |
Build |
| 47959 |
----- |
| 47960 |
|
| 47961 |
- bpo-24432: Update Windows builds and OS X 10.5 installer to use OpenSSL |
| 47962 |
1.0.2c. |
| 47963 |
|
| 47964 |
|
| 47965 |
What's New in Python 3.5.0 beta 2? |
| 47966 |
================================== |
| 47967 |
|
| 47968 |
*Release date: 2015-05-31* |
| 47969 |
|
| 47970 |
Core and Builtins |
| 47971 |
----------------- |
| 47972 |
|
| 47973 |
- bpo-24284: The startswith and endswith methods of the str class no longer |
| 47974 |
return True when finding the empty string and the indexes are completely |
| 47975 |
out of range. |
| 47976 |
|
| 47977 |
- bpo-24115: Update uses of PyObject_IsTrue(), PyObject_Not(), |
| 47978 |
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() |
| 47979 |
to check for and handle errors correctly. |
| 47980 |
|
| 47981 |
- bpo-24328: Fix importing one character extension modules. |
| 47982 |
|
| 47983 |
- bpo-11205: In dictionary displays, evaluate the key before the value. |
| 47984 |
|
| 47985 |
- bpo-24285: Fixed regression that prevented importing extension modules |
| 47986 |
from inside packages. Patch by Petr Viktorin. |
| 47987 |
|
| 47988 |
Library |
| 47989 |
------- |
| 47990 |
|
| 47991 |
- bpo-23247: Fix a crash in the StreamWriter.reset() of CJK codecs. |
| 47992 |
|
| 47993 |
- bpo-24270: Add math.isclose() and cmath.isclose() functions as per |
| 47994 |
:pep:`485`. Contributed by Chris Barker and Tal Einat. |
| 47995 |
|
| 47996 |
- bpo-5633: Fixed timeit when the statement is a string and the setup is |
| 47997 |
not. |
| 47998 |
|
| 47999 |
- bpo-24326: Fixed audioop.ratecv() with non-default weightB argument. |
| 48000 |
Original patch by David Moore. |
| 48001 |
|
| 48002 |
- bpo-16991: Add a C implementation of OrderedDict. |
| 48003 |
|
| 48004 |
- bpo-23934: Fix inspect.signature to fail correctly for builtin types |
| 48005 |
lacking signature information. Initial patch by James Powell. |
| 48006 |
|
| 48007 |
|
| 48008 |
What's New in Python 3.5.0 beta 1? |
| 48009 |
================================== |
| 48010 |
|
| 48011 |
*Release date: 2015-05-24* |
| 48012 |
|
| 48013 |
Core and Builtins |
| 48014 |
----------------- |
| 48015 |
|
| 48016 |
- bpo-24276: Fixed optimization of property descriptor getter. |
| 48017 |
|
| 48018 |
- bpo-24268: PEP 489: Multi-phase extension module initialization. Patch by |
| 48019 |
Petr Viktorin. |
| 48020 |
|
| 48021 |
- bpo-23955: Add pyvenv.cfg option to suppress registry/environment lookup |
| 48022 |
for generating sys.path on Windows. |
| 48023 |
|
| 48024 |
- bpo-24257: Fixed system error in the comparison of faked |
| 48025 |
types.SimpleNamespace. |
| 48026 |
|
| 48027 |
- bpo-22939: Fixed integer overflow in iterator object. Patch by Clement |
| 48028 |
Rouault. |
| 48029 |
|
| 48030 |
- bpo-23985: Fix a possible buffer overrun when deleting a slice from the |
| 48031 |
front of a bytearray and then appending some other bytes data. |
| 48032 |
|
| 48033 |
- bpo-24102: Fixed exception type checking in standard error handlers. |
| 48034 |
|
| 48035 |
- bpo-15027: The UTF-32 encoder is now 3x to 7x faster. |
| 48036 |
|
| 48037 |
- bpo-23290: Optimize set_merge() for cases where the target is empty. |
| 48038 |
(Contributed by Serhiy Storchaka.) |
| 48039 |
|
| 48040 |
- bpo-2292: PEP 448: Additional Unpacking Generalizations. |
| 48041 |
|
| 48042 |
- bpo-24096: Make warnings.warn_explicit more robust against mutation of the |
| 48043 |
warnings.filters list. |
| 48044 |
|
| 48045 |
- bpo-23996: Avoid a crash when a delegated generator raises an unnormalized |
| 48046 |
StopIteration exception. Patch by Stefan Behnel. |
| 48047 |
|
| 48048 |
- bpo-23910: Optimize property() getter calls. Patch by Joe Jevnik. |
| 48049 |
|
| 48050 |
- bpo-23911: Move path-based importlib bootstrap code to a separate frozen |
| 48051 |
module. |
| 48052 |
|
| 48053 |
- bpo-24192: Fix namespace package imports. |
| 48054 |
|
| 48055 |
- bpo-24022: Fix tokenizer crash when processing undecodable source code. |
| 48056 |
|
| 48057 |
- bpo-9951: Added a hex() method to bytes, bytearray, and memoryview. |
| 48058 |
|
| 48059 |
- bpo-22906: PEP 479: Change StopIteration handling inside generators. |
| 48060 |
|
| 48061 |
- bpo-24017: PEP 492: Coroutines with async and await syntax. |
| 48062 |
|
| 48063 |
Library |
| 48064 |
------- |
| 48065 |
|
| 48066 |
- bpo-14373: Added C implementation of functools.lru_cache(). Based on |
| 48067 |
patches by Matt Joiner and Alexey Kachayev. |
| 48068 |
|
| 48069 |
- bpo-24230: The tempfile module now accepts bytes for prefix, suffix and |
| 48070 |
dir parameters and returns bytes in such situations (matching the os |
| 48071 |
module APIs). |
| 48072 |
|
| 48073 |
- bpo-22189: collections.UserString now supports __getnewargs__(), |
| 48074 |
__rmod__(), casefold(), format_map(), isprintable(), and maketrans(). |
| 48075 |
Patch by Joe Jevnik. |
| 48076 |
|
| 48077 |
- bpo-24244: Prevents termination when an invalid format string is |
| 48078 |
encountered on Windows in strftime. |
| 48079 |
|
| 48080 |
- bpo-23973: PEP 484: Add the typing module. |
| 48081 |
|
| 48082 |
- bpo-23086: The collections.abc.Sequence() abstract base class added |
| 48083 |
*start* and *stop* parameters to the index() mixin. Patch by Devin |
| 48084 |
Jeanpierre. |
| 48085 |
|
| 48086 |
- bpo-20035: Replaced the ``tkinter._fix`` module used for setting up the |
| 48087 |
Tcl/Tk environment on Windows with a private function in the ``_tkinter`` |
| 48088 |
module that makes no permanent changes to the environment. |
| 48089 |
|
| 48090 |
- bpo-24257: Fixed segmentation fault in sqlite3.Row constructor with faked |
| 48091 |
cursor type. |
| 48092 |
|
| 48093 |
- bpo-15836: assertRaises(), assertRaisesRegex(), assertWarns() and |
| 48094 |
assertWarnsRegex() assertments now check the type of the first argument to |
| 48095 |
prevent possible user error. Based on patch by Daniel Wagner-Hall. |
| 48096 |
|
| 48097 |
- bpo-9858: Add missing method stubs to _io.RawIOBase. Patch by Laura |
| 48098 |
Rupprecht. |
| 48099 |
|
| 48100 |
- bpo-22955: attrgetter, itemgetter and methodcaller objects in the operator |
| 48101 |
module now support pickling. Added readable and evaluable repr for these |
| 48102 |
objects. Based on patch by Josh Rosenberg. |
| 48103 |
|
| 48104 |
- bpo-22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again when |
| 48105 |
a directory with the chosen name already exists on Windows as well as on |
| 48106 |
Unix. tempfile.mkstemp() now fails early if parent directory is not valid |
| 48107 |
(not exists or is a file) on Windows. |
| 48108 |
|
| 48109 |
- bpo-23780: Improved error message in os.path.join() with single argument. |
| 48110 |
|
| 48111 |
- bpo-6598: Increased time precision and random number range in |
| 48112 |
email.utils.make_msgid() to strengthen the uniqueness of the message ID. |
| 48113 |
|
| 48114 |
- bpo-24091: Fixed various crashes in corner cases in C implementation of |
| 48115 |
ElementTree. |
| 48116 |
|
| 48117 |
- bpo-21931: msilib.FCICreate() now raises TypeError in the case of a bad |
| 48118 |
argument instead of a ValueError with a bogus FCI error number. Patch by |
| 48119 |
Jeffrey Armstrong. |
| 48120 |
|
| 48121 |
- bpo-13866: *quote_via* argument added to urllib.parse.urlencode. |
| 48122 |
|
| 48123 |
- bpo-20098: New mangle_from policy option for email, default True for |
| 48124 |
compat32, but False for all other policies. |
| 48125 |
|
| 48126 |
- bpo-24211: The email library now supports RFC 6532: it can generate |
| 48127 |
headers using utf-8 instead of encoded words. |
| 48128 |
|
| 48129 |
- bpo-16314: Added support for the LZMA compression in distutils. |
| 48130 |
|
| 48131 |
- bpo-21804: poplib now supports RFC 6856 (UTF8). |
| 48132 |
|
| 48133 |
- bpo-18682: Optimized pprint functions for builtin scalar types. |
| 48134 |
|
| 48135 |
- bpo-22027: smtplib now supports RFC 6531 (SMTPUTF8). |
| 48136 |
|
| 48137 |
- bpo-23488: Random generator objects now consume 2x less memory on 64-bit. |
| 48138 |
|
| 48139 |
- bpo-1322: platform.dist() and platform.linux_distribution() functions are |
| 48140 |
now deprecated. Initial patch by Vajrasky Kok. |
| 48141 |
|
| 48142 |
- bpo-22486: Added the math.gcd() function. The fractions.gcd() function |
| 48143 |
now is deprecated. Based on patch by Mark Dickinson. |
| 48144 |
|
| 48145 |
- bpo-24064: Property() docstrings are now writeable. (Patch by Berker |
| 48146 |
Peksag.) |
| 48147 |
|
| 48148 |
- bpo-22681: Added support for the koi8_t encoding. |
| 48149 |
|
| 48150 |
- bpo-22682: Added support for the kz1048 encoding. |
| 48151 |
|
| 48152 |
- bpo-23796: peek and read1 methods of BufferedReader now raise ValueError |
| 48153 |
if they called on a closed object. Patch by John Hergenroeder. |
| 48154 |
|
| 48155 |
- bpo-21795: smtpd now supports the 8BITMIME extension whenever the new |
| 48156 |
*decode_data* constructor argument is set to False. |
| 48157 |
|
| 48158 |
- bpo-24155: optimize heapq.heapify() for better cache performance when |
| 48159 |
heapifying large lists. |
| 48160 |
|
| 48161 |
- bpo-21800: imaplib now supports RFC 5161 (enable), RFC 6855 |
| 48162 |
(utf8/internationalized email) and automatically encodes non-ASCII |
| 48163 |
usernames and passwords to UTF8. |
| 48164 |
|
| 48165 |
- bpo-20274: When calling a _sqlite.Connection, it now complains if passed |
| 48166 |
any keyword arguments. Previously it silently ignored them. |
| 48167 |
|
| 48168 |
- bpo-20274: Remove ignored and erroneous "kwargs" parameters from three |
| 48169 |
METH_VARARGS methods on _sqlite.Connection. |
| 48170 |
|
| 48171 |
- bpo-24134: assertRaises(), assertRaisesRegex(), assertWarns() and |
| 48172 |
assertWarnsRegex() checks now emits a deprecation warning when callable is |
| 48173 |
None or keyword arguments except msg is passed in the context manager |
| 48174 |
mode. |
| 48175 |
|
| 48176 |
- bpo-24018: Add a collections.abc.Generator abstract base class. |
| 48177 |
Contributed by Stefan Behnel. |
| 48178 |
|
| 48179 |
- bpo-23880: Tkinter's getint() and getdouble() now support Tcl_Obj. |
| 48180 |
Tkinter's getdouble() now supports any numbers (in particular int). |
| 48181 |
|
| 48182 |
- bpo-22619: Added negative limit support in the traceback module. Based on |
| 48183 |
patch by Dmitry Kazakov. |
| 48184 |
|
| 48185 |
- bpo-24094: Fix possible crash in json.encode with poorly behaved dict |
| 48186 |
subclasses. |
| 48187 |
|
| 48188 |
- bpo-9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes. |
| 48189 |
Patch written by William Orr. |
| 48190 |
|
| 48191 |
- bpo-17445: add difflib.diff_bytes() to support comparison of byte strings |
| 48192 |
(fixes a regression from Python 2). |
| 48193 |
|
| 48194 |
- bpo-23917: Fall back to sequential compilation when ProcessPoolExecutor |
| 48195 |
doesn't exist. Patch by Claudiu Popa. |
| 48196 |
|
| 48197 |
- bpo-23008: Fixed resolving attributes with boolean value is False in |
| 48198 |
pydoc. |
| 48199 |
|
| 48200 |
- Fix asyncio issue 235: LifoQueue and PriorityQueue's put didn't increment |
| 48201 |
unfinished tasks (this bug was introduced when JoinableQueue was merged |
| 48202 |
with Queue). |
| 48203 |
|
| 48204 |
- bpo-23908: os functions now reject paths with embedded null character on |
| 48205 |
Windows instead of silently truncating them. |
| 48206 |
|
| 48207 |
- bpo-23728: binascii.crc_hqx() could return an integer outside of the range |
| 48208 |
0-0xffff for empty data. |
| 48209 |
|
| 48210 |
- bpo-23887: urllib.error.HTTPError now has a proper repr() representation. |
| 48211 |
Patch by Berker Peksag. |
| 48212 |
|
| 48213 |
- asyncio: New event loop APIs: set_task_factory() and get_task_factory(). |
| 48214 |
|
| 48215 |
- asyncio: async() function is deprecated in favour of ensure_future(). |
| 48216 |
|
| 48217 |
- bpo-24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore |
| 48218 |
support new 'async with' syntax. Contributed by Yury Selivanov. |
| 48219 |
|
| 48220 |
- bpo-24179: Support 'async for' for asyncio.StreamReader. Contributed by |
| 48221 |
Yury Selivanov. |
| 48222 |
|
| 48223 |
- bpo-24184: Add AsyncIterator and AsyncIterable ABCs to collections.abc. |
| 48224 |
Contributed by Yury Selivanov. |
| 48225 |
|
| 48226 |
- bpo-22547: Implement informative __repr__ for inspect.BoundArguments. |
| 48227 |
Contributed by Yury Selivanov. |
| 48228 |
|
| 48229 |
- bpo-24190: Implement inspect.BoundArgument.apply_defaults() method. |
| 48230 |
Contributed by Yury Selivanov. |
| 48231 |
|
| 48232 |
- bpo-20691: Add 'follow_wrapped' argument to |
| 48233 |
inspect.Signature.from_callable() and inspect.signature(). Contributed by |
| 48234 |
Yury Selivanov. |
| 48235 |
|
| 48236 |
- bpo-24248: Deprecate inspect.Signature.from_function() and |
| 48237 |
inspect.Signature.from_builtin(). |
| 48238 |
|
| 48239 |
- bpo-23898: Fix inspect.classify_class_attrs() to support attributes with |
| 48240 |
overloaded __eq__ and __bool__. Patch by Mike Bayer. |
| 48241 |
|
| 48242 |
- bpo-24298: Fix inspect.signature() to correctly unwrap wrappers around |
| 48243 |
bound methods. |
| 48244 |
|
| 48245 |
IDLE |
| 48246 |
---- |
| 48247 |
|
| 48248 |
- bpo-23184: remove unused names and imports in idlelib. Initial patch by Al |
| 48249 |
Sweigart. |
| 48250 |
|
| 48251 |
Tests |
| 48252 |
----- |
| 48253 |
|
| 48254 |
- bpo-21520: test_zipfile no longer fails if the word 'bad' appears anywhere |
| 48255 |
in the name of the current directory. |
| 48256 |
|
| 48257 |
- bpo-9517: Move script_helper into the support package. Patch by Christie |
| 48258 |
Wilson. |
| 48259 |
|
| 48260 |
Documentation |
| 48261 |
------------- |
| 48262 |
|
| 48263 |
- bpo-22155: Add File Handlers subsection with createfilehandler to tkinter |
| 48264 |
doc. Remove obsolete example from FAQ. Patch by Martin Panter. |
| 48265 |
|
| 48266 |
- bpo-24029: Document the name binding behavior for submodule imports. |
| 48267 |
|
| 48268 |
- bpo-24077: Fix typo in man page for -I command option: -s, not -S |
| 48269 |
|
| 48270 |
Tools/Demos |
| 48271 |
----------- |
| 48272 |
|
| 48273 |
- bpo-24000: Improved Argument Clinic's mapping of converters to legacy |
| 48274 |
"format units". Updated the documentation to match. |
| 48275 |
|
| 48276 |
- bpo-24001: Argument Clinic converters now use accept={type} instead of |
| 48277 |
types={'type'} to specify the types the converter accepts. |
| 48278 |
|
| 48279 |
- bpo-23330: h2py now supports arbitrary filenames in #include. |
| 48280 |
|
| 48281 |
- bpo-24031: make patchcheck now supports git checkouts, too. |
| 48282 |
|
| 48283 |
|
| 48284 |
What's New in Python 3.5.0 alpha 4? |
| 48285 |
=================================== |
| 48286 |
|
| 48287 |
*Release date: 2015-04-19* |
| 48288 |
|
| 48289 |
Core and Builtins |
| 48290 |
----------------- |
| 48291 |
|
| 48292 |
- bpo-22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now |
| 48293 |
include the architecture triplet in the extension name, to make it easy to |
| 48294 |
test builds for different ABIs in the same working tree. Under OS X, the |
| 48295 |
extension name now includes :pep:`3149`-style information. |
| 48296 |
|
| 48297 |
- bpo-22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch |
| 48298 |
courtesy of Joe Jevnik. |
| 48299 |
|
| 48300 |
- bpo-23731: Implement :pep:`488`: removal of .pyo files. |
| 48301 |
|
| 48302 |
- bpo-23726: Don't enable GC for user subclasses of non-GC types that don't |
| 48303 |
add any new fields. Patch by Eugene Toder. |
| 48304 |
|
| 48305 |
- bpo-23309: Avoid a deadlock at shutdown if a daemon thread is aborted |
| 48306 |
while it is holding a lock to a buffered I/O object, and the main thread |
| 48307 |
tries to use the same I/O object (typically stdout or stderr). A fatal |
| 48308 |
error is emitted instead. |
| 48309 |
|
| 48310 |
- bpo-22977: Fixed formatting Windows error messages on Wine. Patch by |
| 48311 |
Martin Panter. |
| 48312 |
|
| 48313 |
- bpo-23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on |
| 48314 |
non-integer input. |
| 48315 |
|
| 48316 |
- bpo-24044: Fix possible null pointer dereference in list.sort in out of |
| 48317 |
memory conditions. |
| 48318 |
|
| 48319 |
- bpo-21354: PyCFunction_New function is exposed by python DLL again. |
| 48320 |
|
| 48321 |
Library |
| 48322 |
------- |
| 48323 |
|
| 48324 |
- bpo-23840: tokenize.open() now closes the temporary binary file on error |
| 48325 |
to fix a resource warning. |
| 48326 |
|
| 48327 |
- bpo-16914: new debuglevel 2 in smtplib adds timestamps to debug output. |
| 48328 |
|
| 48329 |
- bpo-7159: urllib.request now supports sending auth credentials |
| 48330 |
automatically after the first 401. This enhancement is a superset of the |
| 48331 |
enhancement from issue #19494 and supersedes that change. |
| 48332 |
|
| 48333 |
- bpo-23703: Fix a regression in urljoin() introduced in 901e4e52b20a. Patch |
| 48334 |
by Demian Brecht. |
| 48335 |
|
| 48336 |
- bpo-4254: Adds _curses.update_lines_cols(). Patch by Arnon Yaari |
| 48337 |
|
| 48338 |
- bpo-19933: Provide default argument for ndigits in round. Patch by |
| 48339 |
Vajrasky Kok. |
| 48340 |
|
| 48341 |
- bpo-23193: Add a numeric_owner parameter to tarfile.TarFile.extract and |
| 48342 |
tarfile.TarFile.extractall. Patch by Michael Vogt and Eric Smith. |
| 48343 |
|
| 48344 |
- bpo-23342: Add a subprocess.run() function than returns a CalledProcess |
| 48345 |
instance for a more consistent API than the existing call* functions. |
| 48346 |
|
| 48347 |
- bpo-21217: inspect.getsourcelines() now tries to compute the start and end |
| 48348 |
lines from the code object, fixing an issue when a lambda function is used |
| 48349 |
as decorator argument. Patch by Thomas Ballinger and Allison Kaptur. |
| 48350 |
|
| 48351 |
- bpo-24521: Fix possible integer overflows in the pickle module. |
| 48352 |
|
| 48353 |
- bpo-22931: Allow '[' and ']' in cookie values. |
| 48354 |
|
| 48355 |
- The keywords attribute of functools.partial is now always a dictionary. |
| 48356 |
|
| 48357 |
- bpo-23811: Add missing newline to the PyCompileError error message. Patch |
| 48358 |
by Alex Shkop. |
| 48359 |
|
| 48360 |
- bpo-21116: Avoid blowing memory when allocating a multiprocessing shared |
| 48361 |
array that's larger than 50% of the available RAM. Patch by Médéric |
| 48362 |
Boquien. |
| 48363 |
|
| 48364 |
- bpo-22982: Improve BOM handling when seeking to multiple positions of a |
| 48365 |
writable text file. |
| 48366 |
|
| 48367 |
- bpo-23464: Removed deprecated asyncio JoinableQueue. |
| 48368 |
|
| 48369 |
- bpo-23529: Limit the size of decompressed data when reading from GzipFile, |
| 48370 |
BZ2File or LZMAFile. This defeats denial of service attacks using |
| 48371 |
compressed bombs (i.e. compressed payloads which decompress to a huge |
| 48372 |
size). Patch by Martin Panter and Nikolaus Rath. |
| 48373 |
|
| 48374 |
- bpo-21859: Added Python implementation of io.FileIO. |
| 48375 |
|
| 48376 |
- bpo-23865: close() methods in multiple modules now are idempotent and more |
| 48377 |
robust at shutdown. If they need to release multiple resources, all are |
| 48378 |
released even if errors occur. |
| 48379 |
|
| 48380 |
- bpo-23400: Raise same exception on both Python 2 and 3 if sem_open is not |
| 48381 |
available. Patch by Davin Potts. |
| 48382 |
|
| 48383 |
- bpo-10838: The subprocess now module includes SubprocessError and |
| 48384 |
TimeoutError in its list of exported names for the users wild enough to |
| 48385 |
use ``from subprocess import *``. |
| 48386 |
|
| 48387 |
- bpo-23411: Added DefragResult, ParseResult, SplitResult, |
| 48388 |
DefragResultBytes, ParseResultBytes, and SplitResultBytes to |
| 48389 |
urllib.parse.__all__. Patch by Martin Panter. |
| 48390 |
|
| 48391 |
- bpo-23881: urllib.request.ftpwrapper constructor now closes the socket if |
| 48392 |
the FTP connection failed to fix a ResourceWarning. |
| 48393 |
|
| 48394 |
- bpo-23853: :meth:`socket.socket.sendall` does no more reset the socket |
| 48395 |
timeout each time data is sent successfully. The socket timeout is now the |
| 48396 |
maximum total duration to send all data. |
| 48397 |
|
| 48398 |
- bpo-22721: An order of multiline pprint output of set or dict containing |
| 48399 |
orderable and non-orderable elements no longer depends on iteration order |
| 48400 |
of set or dict. |
| 48401 |
|
| 48402 |
- bpo-15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always |
| 48403 |
returns bool. tkinter.BooleanVar now validates input values (accepted |
| 48404 |
bool, int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns |
| 48405 |
bool. |
| 48406 |
|
| 48407 |
- bpo-10590: xml.sax.parseString() now supports string argument. |
| 48408 |
|
| 48409 |
- bpo-23338: Fixed formatting ctypes error messages on Cygwin. Patch by |
| 48410 |
Makoto Kato. |
| 48411 |
|
| 48412 |
- bpo-15582: inspect.getdoc() now follows inheritance chains. |
| 48413 |
|
| 48414 |
- bpo-2175: SAX parsers now support a character stream of InputSource |
| 48415 |
object. |
| 48416 |
|
| 48417 |
- bpo-16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and |
| 48418 |
arbitrary precision integers added in Tcl 8.5. |
| 48419 |
|
| 48420 |
- bpo-23834: Fix socket.sendto(), use the C Py_ssize_t type to store the |
| 48421 |
result of sendto() instead of the C int type. |
| 48422 |
|
| 48423 |
- bpo-23618: :meth:`socket.socket.connect` now waits until the connection |
| 48424 |
completes instead of raising :exc:`InterruptedError` if the connection is |
| 48425 |
interrupted by signals, signal handlers don't raise an exception and the |
| 48426 |
socket is blocking or has a timeout. :meth:`socket.socket.connect` still |
| 48427 |
raise :exc:`InterruptedError` for non-blocking sockets. |
| 48428 |
|
| 48429 |
- bpo-21526: Tkinter now supports new boolean type in Tcl 8.5. |
| 48430 |
|
| 48431 |
- bpo-23836: Fix the faulthandler module to handle reentrant calls to its |
| 48432 |
signal handlers. |
| 48433 |
|
| 48434 |
- bpo-23838: linecache now clears the cache and returns an empty result on |
| 48435 |
MemoryError. |
| 48436 |
|
| 48437 |
- bpo-10395: Added os.path.commonpath(). Implemented in posixpath and |
| 48438 |
ntpath. Based on patch by Rafik Draoui. |
| 48439 |
|
| 48440 |
- bpo-23611: Serializing more "lookupable" objects (such as unbound methods |
| 48441 |
or nested classes) now are supported with pickle protocols < 4. |
| 48442 |
|
| 48443 |
- bpo-13583: sqlite3.Row now supports slice indexing. |
| 48444 |
|
| 48445 |
- bpo-18473: Fixed 2to3 and 3to2 compatible pickle mappings. Fixed |
| 48446 |
ambiguous reverse mappings. Added many new mappings. Import mapping is |
| 48447 |
no longer applied to modules already mapped with full name mapping. |
| 48448 |
|
| 48449 |
- bpo-23485: select.select() is now retried automatically with the |
| 48450 |
recomputed timeout when interrupted by a signal, except if the signal |
| 48451 |
handler raises an exception. This change is part of the :pep:`475`. |
| 48452 |
|
| 48453 |
- bpo-23752: When built from an existing file descriptor, io.FileIO() now |
| 48454 |
only calls fstat() once. Before fstat() was called twice, which was not |
| 48455 |
necessary. |
| 48456 |
|
| 48457 |
- bpo-23704: collections.deque() objects now support __add__, __mul__, and |
| 48458 |
__imul__(). |
| 48459 |
|
| 48460 |
- bpo-23171: csv.Writer.writerow() now supports arbitrary iterables. |
| 48461 |
|
| 48462 |
- bpo-23745: The new email header parser now handles duplicate MIME |
| 48463 |
parameter names without error, similar to how get_param behaves. |
| 48464 |
|
| 48465 |
- bpo-22117: Fix os.utime(), it now rounds the timestamp towards minus |
| 48466 |
infinity (-inf) instead of rounding towards zero. |
| 48467 |
|
| 48468 |
- bpo-23310: Fix MagicMock's initializer to work with __methods__, just like |
| 48469 |
configure_mock(). Patch by Kasia Jachim. |
| 48470 |
|
| 48471 |
Build |
| 48472 |
----- |
| 48473 |
|
| 48474 |
- bpo-23817: FreeBSD now uses "1.0" in the SOVERSION as other operating |
| 48475 |
systems, instead of just "1". |
| 48476 |
|
| 48477 |
- bpo-23501: Argument Clinic now generates code into separate files by |
| 48478 |
default. |
| 48479 |
|
| 48480 |
Tests |
| 48481 |
----- |
| 48482 |
|
| 48483 |
- bpo-23799: Added test.support.start_threads() for running and cleaning up |
| 48484 |
multiple threads. |
| 48485 |
|
| 48486 |
- bpo-22390: test.regrtest now emits a warning if temporary files or |
| 48487 |
directories are left after running a test. |
| 48488 |
|
| 48489 |
Tools/Demos |
| 48490 |
----------- |
| 48491 |
|
| 48492 |
- bpo-18128: pygettext now uses standard +NNNN format in the |
| 48493 |
POT-Creation-Date header. |
| 48494 |
|
| 48495 |
- bpo-23935: Argument Clinic's understanding of format units accepting |
| 48496 |
bytes, bytearrays, and buffers is now consistent with both the |
| 48497 |
documentation and the implementation. |
| 48498 |
|
| 48499 |
- bpo-23944: Argument Clinic now wraps long impl prototypes at column 78. |
| 48500 |
|
| 48501 |
- bpo-20586: Argument Clinic now ensures that functions without docstrings |
| 48502 |
have signatures. |
| 48503 |
|
| 48504 |
- bpo-23492: Argument Clinic now generates argument parsing code with |
| 48505 |
PyArg_Parse instead of PyArg_ParseTuple if possible. |
| 48506 |
|
| 48507 |
- bpo-23500: Argument Clinic is now smarter about generating the "#ifndef" |
| 48508 |
(empty) definition of the methoddef macro: it's only generated once, even |
| 48509 |
if Argument Clinic processes the same symbol multiple times, and it's |
| 48510 |
emitted at the end of all processing rather than immediately after the |
| 48511 |
first use. |
| 48512 |
|
| 48513 |
C API |
| 48514 |
----- |
| 48515 |
|
| 48516 |
- bpo-23998: PyImport_ReInitLock() now checks for lock allocation error |
| 48517 |
|
| 48518 |
|
| 48519 |
What's New in Python 3.5.0 alpha 3? |
| 48520 |
=================================== |
| 48521 |
|
| 48522 |
*Release date: 2015-03-28* |
| 48523 |
|
| 48524 |
Core and Builtins |
| 48525 |
----------------- |
| 48526 |
|
| 48527 |
- bpo-23573: Increased performance of string search operations (str.find, |
| 48528 |
str.index, str.count, the in operator, str.split, str.partition) with |
| 48529 |
arguments of different kinds (UCS1, UCS2, UCS4). |
| 48530 |
|
| 48531 |
- bpo-23753: Python doesn't support anymore platforms without stat() or |
| 48532 |
fstat(), these functions are always required. |
| 48533 |
|
| 48534 |
- bpo-23681: The -b option now affects comparisons of bytes with int. |
| 48535 |
|
| 48536 |
- bpo-23632: Memoryviews now allow tuple indexing (including for |
| 48537 |
multi-dimensional memoryviews). |
| 48538 |
|
| 48539 |
- bpo-23192: Fixed generator lambdas. Patch by Bruno Cauet. |
| 48540 |
|
| 48541 |
- bpo-23629: Fix the default __sizeof__ implementation for variable-sized |
| 48542 |
objects. |
| 48543 |
|
| 48544 |
Library |
| 48545 |
------- |
| 48546 |
|
| 48547 |
- bpo-14260: The groupindex attribute of regular expression pattern object |
| 48548 |
now is non-modifiable mapping. |
| 48549 |
|
| 48550 |
- bpo-23792: Ignore KeyboardInterrupt when the pydoc pager is active. This |
| 48551 |
mimics the behavior of the standard unix pagers, and prevents pipepager |
| 48552 |
from shutting down while the pager itself is still running. |
| 48553 |
|
| 48554 |
- bpo-23775: pprint() of OrderedDict now outputs the same representation as |
| 48555 |
repr(). |
| 48556 |
|
| 48557 |
- bpo-23765: Removed IsBadStringPtr calls in ctypes |
| 48558 |
|
| 48559 |
- bpo-22364: Improved some re error messages using regex for hints. |
| 48560 |
|
| 48561 |
- bpo-23742: ntpath.expandvars() no longer loses unbalanced single quotes. |
| 48562 |
|
| 48563 |
- bpo-21717: The zipfile.ZipFile.open function now supports 'x' (exclusive |
| 48564 |
creation) mode. |
| 48565 |
|
| 48566 |
- bpo-21802: The reader in BufferedRWPair now is closed even when closing |
| 48567 |
writer failed in BufferedRWPair.close(). |
| 48568 |
|
| 48569 |
- bpo-23622: Unknown escapes in regular expressions that consist of ``'\'`` |
| 48570 |
and ASCII letter now raise a deprecation warning and will be forbidden in |
| 48571 |
Python 3.6. |
| 48572 |
|
| 48573 |
- bpo-23671: string.Template now allows specifying the "self" parameter as a |
| 48574 |
keyword argument. string.Formatter now allows specifying the "self" and |
| 48575 |
the "format_string" parameters as keyword arguments. |
| 48576 |
|
| 48577 |
- bpo-23502: The pprint module now supports mapping proxies. |
| 48578 |
|
| 48579 |
- bpo-17530: pprint now wraps long bytes objects and bytearrays. |
| 48580 |
|
| 48581 |
- bpo-22687: Fixed some corner cases in breaking words in tetxtwrap. Got rid |
| 48582 |
of quadratic complexity in breaking long words. |
| 48583 |
|
| 48584 |
- bpo-4727: The copy module now uses pickle protocol 4 (PEP 3154) and |
| 48585 |
supports copying of instances of classes whose __new__ method takes |
| 48586 |
keyword-only arguments. |
| 48587 |
|
| 48588 |
- bpo-23491: Added a zipapp module to support creating executable zip file |
| 48589 |
archives of Python code. Registered ".pyz" and ".pyzw" extensions on |
| 48590 |
Windows for these archives (PEP 441). |
| 48591 |
|
| 48592 |
- bpo-23657: Avoid explicit checks for str in zipapp, adding support for |
| 48593 |
pathlib.Path objects as arguments. |
| 48594 |
|
| 48595 |
- bpo-23688: Added support of arbitrary bytes-like objects and avoided |
| 48596 |
unnecessary copying of memoryview in gzip.GzipFile.write(). Original patch |
| 48597 |
by Wolfgang Maier. |
| 48598 |
|
| 48599 |
- bpo-23252: Added support for writing ZIP files to unseekable streams. |
| 48600 |
|
| 48601 |
- bpo-23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. |
| 48602 |
|
| 48603 |
- bpo-23539: If body is None, http.client.HTTPConnection.request now sets |
| 48604 |
Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors |
| 48605 |
from some web servers. |
| 48606 |
|
| 48607 |
- bpo-22351: The nntplib.NNTP constructor no longer leaves the connection |
| 48608 |
and socket open until the garbage collector cleans them up. Patch by |
| 48609 |
Martin Panter. |
| 48610 |
|
| 48611 |
- bpo-23704: collections.deque() objects now support methods for index(), |
| 48612 |
insert(), and copy(). This allows deques to be registered as a |
| 48613 |
MutableSequence and it improves their substitutability for lists. |
| 48614 |
|
| 48615 |
- bpo-23715: :func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are |
| 48616 |
now retried when interrupted by a signal not in the *sigset* parameter, if |
| 48617 |
the signal handler does not raise an exception. signal.sigtimedwait() |
| 48618 |
recomputes the timeout with a monotonic clock when it is retried. |
| 48619 |
|
| 48620 |
- bpo-23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and |
| 48621 |
codecs, that accepted only read-only bytes-like object now accept writable |
| 48622 |
bytes-like object too. |
| 48623 |
|
| 48624 |
- bpo-23646: If time.sleep() is interrupted by a signal, the sleep is now |
| 48625 |
retried with the recomputed delay, except if the signal handler raises an |
| 48626 |
exception (PEP 475). |
| 48627 |
|
| 48628 |
- bpo-23136: _strptime now uniformly handles all days in week 0, including |
| 48629 |
Dec 30 of previous year. Based on patch by Jim Carroll. |
| 48630 |
|
| 48631 |
- bpo-23700: Iterator of NamedTemporaryFile now keeps a reference to |
| 48632 |
NamedTemporaryFile instance. Patch by Bohuslav Kabrda. |
| 48633 |
|
| 48634 |
- bpo-22903: The fake test case created by unittest.loader when it fails |
| 48635 |
importing a test module is now picklable. |
| 48636 |
|
| 48637 |
- bpo-22181: On Linux, os.urandom() now uses the new getrandom() syscall if |
| 48638 |
available, syscall introduced in the Linux kernel 3.17. It is more |
| 48639 |
reliable and more secure, because it avoids the need of a file descriptor |
| 48640 |
and waits until the kernel has enough entropy. |
| 48641 |
|
| 48642 |
- bpo-2211: Updated the implementation of the http.cookies.Morsel class. |
| 48643 |
Setting attributes key, value and coded_value directly now is deprecated. |
| 48644 |
update() and setdefault() now transform and check keys. Comparing for |
| 48645 |
equality now takes into account attributes key, value and coded_value. |
| 48646 |
copy() now returns a Morsel, not a dict. repr() now contains all |
| 48647 |
attributes. Optimized checking keys and quoting values. Added new tests. |
| 48648 |
Original patch by Demian Brecht. |
| 48649 |
|
| 48650 |
- bpo-18983: Allow selection of output units in timeit. Patch by Julian |
| 48651 |
Gindi. |
| 48652 |
|
| 48653 |
- bpo-23631: Fix traceback.format_list when a traceback has been mutated. |
| 48654 |
|
| 48655 |
- bpo-23568: Add rdivmod support to MagicMock() objects. Patch by Håkan |
| 48656 |
Lövdahl. |
| 48657 |
|
| 48658 |
- bpo-2052: Add charset parameter to HtmlDiff.make_file(). |
| 48659 |
|
| 48660 |
- bpo-23668: Support os.truncate and os.ftruncate on Windows. |
| 48661 |
|
| 48662 |
- bpo-23138: Fixed parsing cookies with absent keys or values in cookiejar. |
| 48663 |
Patch by Demian Brecht. |
| 48664 |
|
| 48665 |
- bpo-23051: multiprocessing.Pool methods imap() and imap_unordered() now |
| 48666 |
handle exceptions raised by an iterator. Patch by Alon Diamant and Davin |
| 48667 |
Potts. |
| 48668 |
|
| 48669 |
- bpo-23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl. |
| 48670 |
|
| 48671 |
- bpo-23566: enable(), register(), dump_traceback() and |
| 48672 |
dump_traceback_later() functions of faulthandler now accept file |
| 48673 |
descriptors. Patch by Wei Wu. |
| 48674 |
|
| 48675 |
- bpo-22928: Disabled HTTP header injections in http.client. Original patch |
| 48676 |
by Demian Brecht. |
| 48677 |
|
| 48678 |
- bpo-23615: Modules bz2, tarfile and tokenize now can be reloaded with |
| 48679 |
imp.reload(). Patch by Thomas Kluyver. |
| 48680 |
|
| 48681 |
- bpo-23605: os.walk() now calls os.scandir() instead of os.listdir(). The |
| 48682 |
usage of os.scandir() reduces the number of calls to os.stat(). Initial |
| 48683 |
patch written by Ben Hoyt. |
| 48684 |
|
| 48685 |
Build |
| 48686 |
----- |
| 48687 |
|
| 48688 |
- bpo-23585: make patchcheck will ensure the interpreter is built. |
| 48689 |
|
| 48690 |
Tests |
| 48691 |
----- |
| 48692 |
|
| 48693 |
- bpo-23583: Added tests for standard IO streams in IDLE. |
| 48694 |
|
| 48695 |
- bpo-22289: Prevent test_urllib2net failures due to ftp connection timeout. |
| 48696 |
|
| 48697 |
Tools/Demos |
| 48698 |
----------- |
| 48699 |
|
| 48700 |
- bpo-22826: The result of open() in Tools/freeze/bkfile.py is now better |
| 48701 |
compatible with regular files (in particular it now supports the context |
| 48702 |
management protocol). |
| 48703 |
|
| 48704 |
|
| 48705 |
What's New in Python 3.5.0 alpha 2? |
| 48706 |
=================================== |
| 48707 |
|
| 48708 |
*Release date: 2015-03-09* |
| 48709 |
|
| 48710 |
Core and Builtins |
| 48711 |
----------------- |
| 48712 |
|
| 48713 |
- bpo-23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError |
| 48714 |
if a function returns a result and raises an exception. The SystemError is |
| 48715 |
chained to the previous exception. |
| 48716 |
|
| 48717 |
Library |
| 48718 |
------- |
| 48719 |
|
| 48720 |
- bpo-22524: New os.scandir() function, part of the :pep:`471`: |
| 48721 |
"os.scandir() function -- a better and faster directory iterator". Patch |
| 48722 |
written by Ben Hoyt. |
| 48723 |
|
| 48724 |
- bpo-23103: Reduced the memory consumption of IPv4Address and IPv6Address. |
| 48725 |
|
| 48726 |
- bpo-21793: BaseHTTPRequestHandler again logs response code as numeric, not |
| 48727 |
as stringified enum. Patch by Demian Brecht. |
| 48728 |
|
| 48729 |
- bpo-23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST |
| 48730 |
flag on certificate stores when it is available. |
| 48731 |
|
| 48732 |
- bpo-23576: Avoid stalling in SSL reads when EOF has been reached in the |
| 48733 |
SSL layer but the underlying connection hasn't been closed. |
| 48734 |
|
| 48735 |
- bpo-23504: Added an __all__ to the types module. |
| 48736 |
|
| 48737 |
- bpo-23563: Optimized utility functions in urllib.parse. |
| 48738 |
|
| 48739 |
- bpo-7830: Flatten nested functools.partial. |
| 48740 |
|
| 48741 |
- bpo-20204: Added the __module__ attribute to _tkinter classes. |
| 48742 |
|
| 48743 |
- bpo-19980: Improved help() for non-recognized strings. help('') now shows |
| 48744 |
the help on str. help('help') now shows the help on help(). Original |
| 48745 |
patch by Mark Lawrence. |
| 48746 |
|
| 48747 |
- bpo-23521: Corrected pure python implementation of timedelta division. |
| 48748 |
Eliminated OverflowError from ``timedelta * float`` for some floats; |
| 48749 |
Corrected rounding in timedelta true division. |
| 48750 |
|
| 48751 |
- bpo-21619: Popen objects no longer leave a zombie after exit in the with |
| 48752 |
statement if the pipe was broken. Patch by Martin Panter. |
| 48753 |
|
| 48754 |
- bpo-22936: Make it possible to show local variables in tracebacks for both |
| 48755 |
the traceback module and unittest. |
| 48756 |
|
| 48757 |
- bpo-15955: Add an option to limit the output size in bz2.decompress(). |
| 48758 |
Patch by Nikolaus Rath. |
| 48759 |
|
| 48760 |
- bpo-6639: Module-level turtle functions no longer raise TclError after |
| 48761 |
closing the window. |
| 48762 |
|
| 48763 |
- bpo-814253: Group references and conditional group references now work in |
| 48764 |
lookbehind assertions in regular expressions. (See also: bpo-9179) |
| 48765 |
|
| 48766 |
- bpo-23215: Multibyte codecs with custom error handlers that ignores errors |
| 48767 |
consumed too much memory and raised SystemError or MemoryError. Original |
| 48768 |
patch by Aleksi Torhamo. |
| 48769 |
|
| 48770 |
- bpo-5700: io.FileIO() called flush() after closing the file. flush() was |
| 48771 |
not called in close() if closefd=False. |
| 48772 |
|
| 48773 |
- bpo-23374: Fixed pydoc failure with non-ASCII files when stdout encoding |
| 48774 |
differs from file system encoding (e.g. on Mac OS). |
| 48775 |
|
| 48776 |
- bpo-23481: Remove RC4 from the SSL module's default cipher list. |
| 48777 |
|
| 48778 |
- bpo-21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty |
| 48779 |
docstrings. |
| 48780 |
|
| 48781 |
- bpo-22885: Fixed arbitrary code execution vulnerability in the dbm.dumb |
| 48782 |
module. Original patch by Claudiu Popa. |
| 48783 |
|
| 48784 |
- bpo-23239: ssl.match_hostname() now supports matching of IP addresses. |
| 48785 |
|
| 48786 |
- bpo-23146: Fix mishandling of absolute Windows paths with forward slashes |
| 48787 |
in pathlib. |
| 48788 |
|
| 48789 |
- bpo-23096: Pickle representation of floats with protocol 0 now is the same |
| 48790 |
for both Python and C implementations. |
| 48791 |
|
| 48792 |
- bpo-19105: pprint now more efficiently uses free space at the right. |
| 48793 |
|
| 48794 |
- bpo-14910: Add allow_abbrev parameter to argparse.ArgumentParser. Patch by |
| 48795 |
Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson. |
| 48796 |
|
| 48797 |
- bpo-21717: tarfile.open() now supports 'x' (exclusive creation) mode. |
| 48798 |
|
| 48799 |
- bpo-23344: marshal.dumps() is now 20-25% faster on average. |
| 48800 |
|
| 48801 |
- bpo-20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster on |
| 48802 |
average. |
| 48803 |
|
| 48804 |
- bpo-23421: Fixed compression in tarfile CLI. Patch by wdv4758h. |
| 48805 |
|
| 48806 |
- bpo-23367: Fix possible overflows in the unicodedata module. |
| 48807 |
|
| 48808 |
- bpo-23361: Fix possible overflow in Windows subprocess creation code. |
| 48809 |
|
| 48810 |
- logging.handlers.QueueListener now takes a respect_handler_level keyword |
| 48811 |
argument which, if set to True, will pass messages to handlers taking |
| 48812 |
handler levels into account. |
| 48813 |
|
| 48814 |
- bpo-19705: turtledemo now has a visual sorting algorithm demo. Original |
| 48815 |
patch from Jason Yeo. |
| 48816 |
|
| 48817 |
- bpo-23801: Fix issue where cgi.FieldStorage did not always ignore the |
| 48818 |
entire preamble to a multipart body. |
| 48819 |
|
| 48820 |
Build |
| 48821 |
----- |
| 48822 |
|
| 48823 |
- bpo-23445: pydebug builds now use "gcc -Og" where possible, to make the |
| 48824 |
resulting executable faster. |
| 48825 |
|
| 48826 |
- bpo-23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a. |
| 48827 |
|
| 48828 |
C API |
| 48829 |
----- |
| 48830 |
|
| 48831 |
- bpo-20204: Deprecation warning is now raised for builtin types without the |
| 48832 |
__module__ attribute. |
| 48833 |
|
| 48834 |
Windows |
| 48835 |
------- |
| 48836 |
|
| 48837 |
- bpo-23465: Implement :pep:`486` - Make the Python Launcher aware of |
| 48838 |
virtual environments. Patch by Paul Moore. |
| 48839 |
|
| 48840 |
- bpo-23437: Make user scripts directory versioned on Windows. Patch by Paul |
| 48841 |
Moore. |
| 48842 |
|
| 48843 |
|
| 48844 |
What's New in Python 3.5.0 alpha 1? |
| 48845 |
=================================== |
| 48846 |
|
| 48847 |
*Release date: 2015-02-08* |
| 48848 |
|
| 48849 |
Core and Builtins |
| 48850 |
----------------- |
| 48851 |
|
| 48852 |
- bpo-23285: PEP 475 - EINTR handling. |
| 48853 |
|
| 48854 |
- bpo-22735: Fix many edge cases (including crashes) involving custom mro() |
| 48855 |
implementations. |
| 48856 |
|
| 48857 |
- bpo-22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer() |
| 48858 |
and PyObject_AsWriteBuffer(). |
| 48859 |
|
| 48860 |
- bpo-21295: Revert some changes (issue #16795) to AST line numbers and |
| 48861 |
column offsets that constituted a regression. |
| 48862 |
|
| 48863 |
- bpo-22986: Allow changing an object's __class__ between a dynamic type and |
| 48864 |
static type in some cases. |
| 48865 |
|
| 48866 |
- bpo-15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and |
| 48867 |
PyUnicode_EncodeCodePage() now raise an exception if the object is not a |
| 48868 |
Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case |
| 48869 |
on platforms other than Windows. Patch written by Campbell Barton. |
| 48870 |
|
| 48871 |
- bpo-21408: The default __ne__() now returns NotImplemented if __eq__() |
| 48872 |
returned NotImplemented. Original patch by Martin Panter. |
| 48873 |
|
| 48874 |
- bpo-23321: Fixed a crash in str.decode() when error handler returned |
| 48875 |
replacement string longer than malformed input data. |
| 48876 |
|
| 48877 |
- bpo-22286: The "backslashreplace" error handlers now works with decoding |
| 48878 |
and translating. |
| 48879 |
|
| 48880 |
- bpo-23253: Delay-load ShellExecute[AW] in os.startfile for reduced startup |
| 48881 |
overhead on Windows. |
| 48882 |
|
| 48883 |
- bpo-22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for |
| 48884 |
atomic memory access if available. Patch written by Vitor de Lima and |
| 48885 |
Gustavo Temple. |
| 48886 |
|
| 48887 |
- bpo-20284: %-interpolation (aka printf) formatting added for bytes and |
| 48888 |
bytearray. |
| 48889 |
|
| 48890 |
- bpo-23048: Fix jumping out of an infinite while loop in the pdb. |
| 48891 |
|
| 48892 |
- bpo-20335: bytes constructor now raises TypeError when encoding or errors |
| 48893 |
is specified with non-string argument. Based on patch by Renaud Blanch. |
| 48894 |
|
| 48895 |
- bpo-22834: If the current working directory ends up being set to a |
| 48896 |
non-existent directory then import will no longer raise FileNotFoundError. |
| 48897 |
|
| 48898 |
- bpo-22869: Move the interpreter startup & shutdown code to a new dedicated |
| 48899 |
pylifecycle.c module |
| 48900 |
|
| 48901 |
- bpo-22847: Improve method cache efficiency. |
| 48902 |
|
| 48903 |
- bpo-22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff |
| 48904 |
bytes on a 32-bit platform. |
| 48905 |
|
| 48906 |
- bpo-22653: Fix an assertion failure in debug mode when doing a reentrant |
| 48907 |
dict insertion in debug mode. |
| 48908 |
|
| 48909 |
- bpo-22643: Fix integer overflow in Unicode case operations (upper, lower, |
| 48910 |
title, swapcase, casefold). |
| 48911 |
|
| 48912 |
- bpo-17636: Circular imports involving relative imports are now supported. |
| 48913 |
|
| 48914 |
- bpo-22604: Fix assertion error in debug mode when dividing a complex |
| 48915 |
number by (nan+0j). |
| 48916 |
|
| 48917 |
- bpo-21052: Do not raise ImportWarning when sys.path_hooks or sys.meta_path |
| 48918 |
are set to None. |
| 48919 |
|
| 48920 |
- bpo-16518: Use 'bytes-like object required' in error messages that |
| 48921 |
previously used the far more cryptic "'x' does not support the buffer |
| 48922 |
protocol. |
| 48923 |
|
| 48924 |
- bpo-22470: Fixed integer overflow issues in "backslashreplace", |
| 48925 |
"xmlcharrefreplace", and "surrogatepass" error handlers. |
| 48926 |
|
| 48927 |
- bpo-22540: speed up ``PyObject_IsInstance`` and ``PyObject_IsSubclass`` in |
| 48928 |
the common case that the second argument has metaclass ``type``. |
| 48929 |
|
| 48930 |
- bpo-18711: Add a new ``PyErr_FormatV`` function, similar to |
| 48931 |
``PyErr_Format`` but accepting a ``va_list`` argument. |
| 48932 |
|
| 48933 |
- bpo-22520: Fix overflow checking when generating the repr of a unicode |
| 48934 |
object. |
| 48935 |
|
| 48936 |
- bpo-22519: Fix overflow checking in PyBytes_Repr. |
| 48937 |
|
| 48938 |
- bpo-22518: Fix integer overflow issues in latin-1 encoding. |
| 48939 |
|
| 48940 |
- bpo-16324: _charset parameter of MIMEText now also accepts |
| 48941 |
email.charset.Charset instances. Initial patch by Claude Paroz. |
| 48942 |
|
| 48943 |
- bpo-1764286: Fix inspect.getsource() to support decorated functions. Patch |
| 48944 |
by Claudiu Popa. |
| 48945 |
|
| 48946 |
- bpo-18554: os.__all__ includes posix functions. |
| 48947 |
|
| 48948 |
- bpo-21391: Use os.path.abspath in the shutil module. |
| 48949 |
|
| 48950 |
- bpo-11471: avoid generating a JUMP_FORWARD instruction at the end of an |
| 48951 |
if-block if there is no else-clause. Original patch by Eugene Toder. |
| 48952 |
|
| 48953 |
- bpo-22215: Now ValueError is raised instead of TypeError when str or bytes |
| 48954 |
argument contains not permitted null character or byte. |
| 48955 |
|
| 48956 |
- bpo-22258: Fix the internal function set_inheritable() on Illumos. This |
| 48957 |
platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails |
| 48958 |
with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable() |
| 48959 |
now falls back to the slower ``fcntl()`` (``F_GETFD`` and then |
| 48960 |
``F_SETFD``). |
| 48961 |
|
| 48962 |
- bpo-21389: Displaying the __qualname__ of the underlying function in the |
| 48963 |
repr of a bound method. |
| 48964 |
|
| 48965 |
- bpo-22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM |
| 48966 |
and returns -1 (error) on integer overflow. |
| 48967 |
|
| 48968 |
- bpo-20184: Argument Clinic based signature introspection added for 30 of |
| 48969 |
the builtin functions. |
| 48970 |
|
| 48971 |
- bpo-22116: C functions and methods (of the 'builtin_function_or_method' |
| 48972 |
type) can now be weakref'ed. Patch by Wei Wu. |
| 48973 |
|
| 48974 |
- bpo-22077: Improve index error messages for bytearrays, bytes, lists, and |
| 48975 |
tuples by adding 'or slices'. Added ', not <typename>' for bytearrays. |
| 48976 |
Original patch by Claudiu Popa. |
| 48977 |
|
| 48978 |
- bpo-20179: Apply Argument Clinic to bytes and bytearray. Patch by Tal |
| 48979 |
Einat. |
| 48980 |
|
| 48981 |
- bpo-22082: Clear interned strings in slotdefs. |
| 48982 |
|
| 48983 |
- Upgrade Unicode database to Unicode 7.0.0. |
| 48984 |
|
| 48985 |
- bpo-21897: Fix a crash with the f_locals attribute with closure variables |
| 48986 |
when frame.clear() has been called. |
| 48987 |
|
| 48988 |
- bpo-21205: Add a new ``__qualname__`` attribute to generator, the |
| 48989 |
qualified name, and use it in the representation of a generator |
| 48990 |
(``repr(gen)``). The default name of the generator (``__name__`` |
| 48991 |
attribute) is now get from the function instead of the code. Use |
| 48992 |
``gen.gi_code.co_name`` to get the name of the code. |
| 48993 |
|
| 48994 |
- bpo-21669: With the aid of heuristics in SyntaxError.__init__, the parser |
| 48995 |
now attempts to generate more meaningful (or at least more search engine |
| 48996 |
friendly) error messages when "exec" and "print" are used as statements. |
| 48997 |
|
| 48998 |
- bpo-21642: In the conditional if-else expression, allow an integer written |
| 48999 |
with no space between itself and the ``else`` keyword (e.g. ``True if |
| 49000 |
42else False``) to be valid syntax. |
| 49001 |
|
| 49002 |
- bpo-21523: Fix over-pessimistic computation of the stack effect of some |
| 49003 |
opcodes in the compiler. This also fixes a quadratic compilation time |
| 49004 |
issue noticeable when compiling code with a large number of "and" and "or" |
| 49005 |
operators. |
| 49006 |
|
| 49007 |
- bpo-21418: Fix a crash in the builtin function super() when called without |
| 49008 |
argument and without current frame (ex: embedded Python). |
| 49009 |
|
| 49010 |
- bpo-21425: Fix flushing of standard streams in the interactive |
| 49011 |
interpreter. |
| 49012 |
|
| 49013 |
- bpo-21435: In rare cases, when running finalizers on objects in cyclic |
| 49014 |
trash a bad pointer dereference could occur due to a subtle flaw in |
| 49015 |
internal iteration logic. |
| 49016 |
|
| 49017 |
- bpo-21377: PyBytes_Concat() now tries to concatenate in-place when the |
| 49018 |
first argument has a reference count of 1. Patch by Nikolaus Rath. |
| 49019 |
|
| 49020 |
- bpo-20355: -W command line options now have higher priority than the |
| 49021 |
PYTHONWARNINGS environment variable. Patch by Arfrever. |
| 49022 |
|
| 49023 |
- bpo-21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c. |
| 49024 |
|
| 49025 |
- bpo-20904: Support setting FPU precision on m68k. |
| 49026 |
|
| 49027 |
- bpo-21209: Fix sending tuples to custom generator objects with the yield |
| 49028 |
from syntax. |
| 49029 |
|
| 49030 |
- bpo-21193: pow(a, b, c) now raises ValueError rather than TypeError when b |
| 49031 |
is negative. Patch by Josh Rosenberg. |
| 49032 |
|
| 49033 |
- bpo-21176: PEP 465: Add the '@' operator for matrix multiplication. |
| 49034 |
|
| 49035 |
- bpo-21134: Fix segfault when str is called on an uninitialized |
| 49036 |
UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object. |
| 49037 |
|
| 49038 |
- bpo-19537: Fix PyUnicode_DATA() alignment under m68k. Patch by Andreas |
| 49039 |
Schwab. |
| 49040 |
|
| 49041 |
- bpo-20929: Add a type cast to avoid shifting a negative number. |
| 49042 |
|
| 49043 |
- bpo-20731: Properly position in source code files even if they are opened |
| 49044 |
in text mode. Patch by Serhiy Storchaka. |
| 49045 |
|
| 49046 |
- bpo-20637: Key-sharing now also works for instance dictionaries of |
| 49047 |
subclasses. Patch by Peter Ingebretson. |
| 49048 |
|
| 49049 |
- bpo-8297: Attributes missing from modules now include the module name in |
| 49050 |
the error text. Original patch by ysj.ray. |
| 49051 |
|
| 49052 |
- bpo-19995: %c, %o, %x, and %X now raise TypeError on non-integer input. |
| 49053 |
|
| 49054 |
- bpo-19655: The ASDL parser - used by the build process to generate code |
| 49055 |
for managing the Python AST in C - was rewritten. The new parser is self |
| 49056 |
contained and does not require to carry long the spark.py parser-generator |
| 49057 |
library; spark.py was removed from the source base. |
| 49058 |
|
| 49059 |
- bpo-12546: Allow ``\x00`` to be used as a fill character when using str, |
| 49060 |
int, float, and complex __format__ methods. |
| 49061 |
|
| 49062 |
- bpo-20480: Add ipaddress.reverse_pointer. Patch by Leon Weber. |
| 49063 |
|
| 49064 |
- bpo-13598: Modify string.Formatter to support auto-numbering of |
| 49065 |
replacement fields. It now matches the behavior of str.format() in this |
| 49066 |
regard. Patches by Phil Elson and Ramchandra Apte. |
| 49067 |
|
| 49068 |
- bpo-8931: Make alternate formatting ('#') for type 'c' raise an exception. |
| 49069 |
In versions prior to 3.5, '#' with 'c' had no effect. Now specifying it is |
| 49070 |
an error. Patch by Torsten Landschoff. |
| 49071 |
|
| 49072 |
- bpo-23165: Perform overflow checks before allocating memory in the |
| 49073 |
_Py_char2wchar function. |
| 49074 |
|
| 49075 |
Library |
| 49076 |
------- |
| 49077 |
|
| 49078 |
- bpo-23399: pyvenv creates relative symlinks where possible. |
| 49079 |
|
| 49080 |
- bpo-20289: cgi.FieldStorage() now supports the context management |
| 49081 |
protocol. |
| 49082 |
|
| 49083 |
- bpo-13128: Print response headers for CONNECT requests when debuglevel > |
| 49084 |
0. Patch by Demian Brecht. |
| 49085 |
|
| 49086 |
- bpo-15381: Optimized io.BytesIO to make less allocations and copyings. |
| 49087 |
|
| 49088 |
- bpo-22818: Splitting on a pattern that could match an empty string now |
| 49089 |
raises a warning. Patterns that can only match empty strings are now |
| 49090 |
rejected. |
| 49091 |
|
| 49092 |
- bpo-23099: Closing io.BytesIO with exported buffer is rejected now to |
| 49093 |
prevent corrupting exported buffer. |
| 49094 |
|
| 49095 |
- bpo-23326: Removed __ne__ implementations. Since fixing default __ne__ |
| 49096 |
implementation in issue #21408 they are redundant. |
| 49097 |
|
| 49098 |
- bpo-23363: Fix possible overflow in itertools.permutations. |
| 49099 |
|
| 49100 |
- bpo-23364: Fix possible overflow in itertools.product. |
| 49101 |
|
| 49102 |
- bpo-23366: Fixed possible integer overflow in itertools.combinations. |
| 49103 |
|
| 49104 |
- bpo-23369: Fixed possible integer overflow in |
| 49105 |
_json.encode_basestring_ascii. |
| 49106 |
|
| 49107 |
- bpo-23353: Fix the exception handling of generators in |
| 49108 |
PyEval_EvalFrameEx(). At entry, save or swap the exception state even if |
| 49109 |
PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception |
| 49110 |
state is now always restored or swapped, not only if why is WHY_YIELD or |
| 49111 |
WHY_RETURN. Patch co-written with Antoine Pitrou. |
| 49112 |
|
| 49113 |
- bpo-14099: Restored support of writing ZIP files to tellable but |
| 49114 |
non-seekable streams. |
| 49115 |
|
| 49116 |
- bpo-14099: Writing to ZipFile and reading multiple ZipExtFiles is |
| 49117 |
threadsafe now. |
| 49118 |
|
| 49119 |
- bpo-19361: JSON decoder now raises JSONDecodeError instead of ValueError. |
| 49120 |
|
| 49121 |
- bpo-18518: timeit now rejects statements which can't be compiled outside a |
| 49122 |
function or a loop (e.g. "return" or "break"). |
| 49123 |
|
| 49124 |
- bpo-23094: Fixed readline with frames in Python implementation of pickle. |
| 49125 |
|
| 49126 |
- bpo-23268: Fixed bugs in the comparison of ipaddress classes. |
| 49127 |
|
| 49128 |
- bpo-21408: Removed incorrect implementations of __ne__() which didn't |
| 49129 |
returned NotImplemented if __eq__() returned NotImplemented. The default |
| 49130 |
__ne__() now works correctly. |
| 49131 |
|
| 49132 |
- bpo-19996: :class:`email.feedparser.FeedParser` now handles (malformed) |
| 49133 |
headers with no key rather than assuming the body has started. |
| 49134 |
|
| 49135 |
- bpo-20188: Support Application-Layer Protocol Negotiation (ALPN) in the |
| 49136 |
ssl module. |
| 49137 |
|
| 49138 |
- bpo-23133: Pickling of ipaddress objects now produces more compact and |
| 49139 |
portable representation. |
| 49140 |
|
| 49141 |
- bpo-23248: Update ssl error codes from latest OpenSSL git master. |
| 49142 |
|
| 49143 |
- bpo-23266: Much faster implementation of ipaddress.collapse_addresses() |
| 49144 |
when there are many non-consecutive addresses. |
| 49145 |
|
| 49146 |
- bpo-23098: 64-bit dev_t is now supported in the os module. |
| 49147 |
|
| 49148 |
- bpo-21817: When an exception is raised in a task submitted to a |
| 49149 |
ProcessPoolExecutor, the remote traceback is now displayed in the parent |
| 49150 |
process. Patch by Claudiu Popa. |
| 49151 |
|
| 49152 |
- bpo-15955: Add an option to limit output size when decompressing LZMA |
| 49153 |
data. Patch by Nikolaus Rath and Martin Panter. |
| 49154 |
|
| 49155 |
- bpo-23250: In the http.cookies module, capitalize "HttpOnly" and "Secure" |
| 49156 |
as they are written in the standard. |
| 49157 |
|
| 49158 |
- bpo-23063: In the distutils' check command, fix parsing of reST with code |
| 49159 |
or code-block directives. |
| 49160 |
|
| 49161 |
- bpo-23209: selectors.BaseSelector.get_key() now raises a RuntimeError if |
| 49162 |
the selector is closed. And selectors.BaseSelector.close() now clears its |
| 49163 |
internal reference to the selector mapping to break a reference cycle. |
| 49164 |
Initial patch written by Martin Richard. (See also: bpo-23225) |
| 49165 |
|
| 49166 |
- bpo-17911: Provide a way to seed the linecache for a PEP-302 module |
| 49167 |
without actually loading the code. |
| 49168 |
|
| 49169 |
- bpo-17911: Provide a new object API for traceback, including the ability |
| 49170 |
to not lookup lines at all until the traceback is actually rendered, |
| 49171 |
without any trace of the original objects being kept alive. |
| 49172 |
|
| 49173 |
- bpo-19777: Provide a home() classmethod on Path objects. Contributed by |
| 49174 |
Victor Salgado and Mayank Tripathi. |
| 49175 |
|
| 49176 |
- bpo-23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the |
| 49177 |
default case of ``ensure_ascii=True``. Patch by Naoki Inada. |
| 49178 |
|
| 49179 |
- bpo-23185: Add math.inf and math.nan constants. |
| 49180 |
|
| 49181 |
- bpo-23186: Add ssl.SSLObject.shared_ciphers() and |
| 49182 |
ssl.SSLSocket.shared_ciphers() to fetch the client's list ciphers sent at |
| 49183 |
handshake. |
| 49184 |
|
| 49185 |
- bpo-23143: Remove compatibility with OpenSSLs older than 0.9.8. |
| 49186 |
|
| 49187 |
- bpo-23132: Improve performance and introspection support of comparison |
| 49188 |
methods created by functool.total_ordering. |
| 49189 |
|
| 49190 |
- bpo-19776: Add an expanduser() method on Path objects. |
| 49191 |
|
| 49192 |
- bpo-23112: Fix SimpleHTTPServer to correctly carry the query string and |
| 49193 |
fragment when it redirects to add a trailing slash. |
| 49194 |
|
| 49195 |
- bpo-21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK, |
| 49196 |
HTTPStatus.NOT_FOUND). Patch by Demian Brecht. |
| 49197 |
|
| 49198 |
- bpo-23093: In the io, module allow more operations to work on detached |
| 49199 |
streams. |
| 49200 |
|
| 49201 |
- bpo-23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol |
| 49202 |
version. |
| 49203 |
|
| 49204 |
- bpo-22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), |
| 49205 |
instead of reading /dev/urandom, to get pseudo-random bytes. |
| 49206 |
|
| 49207 |
- bpo-19104: pprint now produces evaluable output for wrapped strings. |
| 49208 |
|
| 49209 |
- bpo-23071: Added missing names to codecs.__all__. Patch by Martin Panter. |
| 49210 |
|
| 49211 |
- bpo-22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX |
| 49212 |
opcode if possible. |
| 49213 |
|
| 49214 |
- bpo-15513: Added a __sizeof__ implementation for pickle classes. |
| 49215 |
|
| 49216 |
- bpo-19858: pickletools.optimize() now aware of the MEMOIZE opcode, can |
| 49217 |
produce more compact result and no longer produces invalid output if input |
| 49218 |
data contains MEMOIZE opcodes together with PUT or BINPUT opcodes. |
| 49219 |
|
| 49220 |
- bpo-22095: Fixed HTTPConnection.set_tunnel with default port. The port |
| 49221 |
value in the host header was set to "None". Patch by Demian Brecht. |
| 49222 |
|
| 49223 |
- bpo-23016: A warning no longer produces an AttributeError when the program |
| 49224 |
is run with pythonw.exe. |
| 49225 |
|
| 49226 |
- bpo-21775: shutil.copytree(): fix crash when copying to VFAT. An exception |
| 49227 |
handler assumed that OSError objects always have a 'winerror' attribute. |
| 49228 |
That is not the case, so the exception handler itself raised |
| 49229 |
AttributeError when run on Linux (and, presumably, any other non-Windows |
| 49230 |
OS). Patch by Greg Ward. |
| 49231 |
|
| 49232 |
- bpo-1218234: Fix inspect.getsource() to load updated source of reloaded |
| 49233 |
module. Initial patch by Berker Peksag. |
| 49234 |
|
| 49235 |
- bpo-21740: Support wrapped callables in doctest. Patch by Claudiu Popa. |
| 49236 |
|
| 49237 |
- bpo-23009: Make sure selectors.EpollSelector.select() works when no FD is |
| 49238 |
registered. |
| 49239 |
|
| 49240 |
- bpo-22959: In the constructor of http.client.HTTPSConnection, prefer the |
| 49241 |
context's check_hostname attribute over the *check_hostname* parameter. |
| 49242 |
|
| 49243 |
- bpo-22696: Add function :func:`sys.is_finalizing` to know about |
| 49244 |
interpreter shutdown. |
| 49245 |
|
| 49246 |
- bpo-16043: Add a default limit for the amount of data |
| 49247 |
xmlrpclib.gzip_decode will return. This resolves :cve:`2013-1753`. |
| 49248 |
|
| 49249 |
- bpo-14099: ZipFile.open() no longer reopen the underlying file. Objects |
| 49250 |
returned by ZipFile.open() can now operate independently of the ZipFile |
| 49251 |
even if the ZipFile was created by passing in a file-like object as the |
| 49252 |
first argument to the constructor. |
| 49253 |
|
| 49254 |
- bpo-22966: Fix __pycache__ pyc file name clobber when pyc_compile is asked |
| 49255 |
to compile a source file containing multiple dots in the source file name. |
| 49256 |
|
| 49257 |
- bpo-21971: Update turtledemo doc and add module to the index. |
| 49258 |
|
| 49259 |
- bpo-21032: Fixed socket leak if HTTPConnection.getresponse() fails. |
| 49260 |
Original patch by Martin Panter. |
| 49261 |
|
| 49262 |
- bpo-22407: Deprecated the use of re.LOCALE flag with str patterns or |
| 49263 |
re.ASCII. It was newer worked. |
| 49264 |
|
| 49265 |
- bpo-22902: The "ip" command is now used on Linux to determine MAC address |
| 49266 |
in uuid.getnode(). Pach by Bruno Cauet. |
| 49267 |
|
| 49268 |
- bpo-22960: Add a context argument to xmlrpclib.ServerProxy constructor. |
| 49269 |
|
| 49270 |
- bpo-22389: Add contextlib.redirect_stderr(). |
| 49271 |
|
| 49272 |
- bpo-21356: Make ssl.RAND_egd() optional to support LibreSSL. The |
| 49273 |
availability of the function is checked during the compilation. Patch |
| 49274 |
written by Bernard Spil. |
| 49275 |
|
| 49276 |
- bpo-22915: SAX parser now supports files opened with file descriptor or |
| 49277 |
bytes path. |
| 49278 |
|
| 49279 |
- bpo-22609: Constructors and update methods of mapping classes in the |
| 49280 |
collections module now accept the self keyword argument. |
| 49281 |
|
| 49282 |
- bpo-22940: Add readline.append_history_file. |
| 49283 |
|
| 49284 |
- bpo-19676: Added the "namereplace" error handler. |
| 49285 |
|
| 49286 |
- bpo-22788: Add *context* parameter to logging.handlers.HTTPHandler. |
| 49287 |
|
| 49288 |
- bpo-22921: Allow SSLContext to take the *hostname* parameter even if |
| 49289 |
OpenSSL doesn't support SNI. |
| 49290 |
|
| 49291 |
- bpo-22894: TestCase.subTest() would cause the test suite to be stopped |
| 49292 |
when in failfast mode, even in the absence of failures. |
| 49293 |
|
| 49294 |
- bpo-22796: HTTP cookie parsing is now stricter, in order to protect |
| 49295 |
against potential injection attacks. |
| 49296 |
|
| 49297 |
- bpo-22370: Windows detection in pathlib is now more robust. |
| 49298 |
|
| 49299 |
- bpo-22841: Reject coroutines in asyncio add_signal_handler(). Patch by |
| 49300 |
Ludovic.Gasc. |
| 49301 |
|
| 49302 |
- bpo-19494: Added urllib.request.HTTPBasicPriorAuthHandler. Patch by Matej |
| 49303 |
Cepl. |
| 49304 |
|
| 49305 |
- bpo-22578: Added attributes to the re.error class. |
| 49306 |
|
| 49307 |
- bpo-22849: Fix possible double free in the io.TextIOWrapper constructor. |
| 49308 |
|
| 49309 |
- bpo-12728: Different Unicode characters having the same uppercase but |
| 49310 |
different lowercase are now matched in case-insensitive regular |
| 49311 |
expressions. |
| 49312 |
|
| 49313 |
- bpo-22821: Fixed fcntl() with integer argument on 64-bit big-endian |
| 49314 |
platforms. |
| 49315 |
|
| 49316 |
- bpo-21650: Add an ``--sort-keys`` option to ``json.tool`` CLI. |
| 49317 |
|
| 49318 |
- bpo-22824: Updated reprlib output format for sets to use set literals. |
| 49319 |
Patch contributed by Berker Peksag. |
| 49320 |
|
| 49321 |
- bpo-22824: Updated reprlib output format for arrays to display empty |
| 49322 |
arrays without an unnecessary empty list. Suggested by Serhiy Storchaka. |
| 49323 |
|
| 49324 |
- bpo-22406: Fixed the uu_codec codec incorrectly ported to 3.x. Based on |
| 49325 |
patch by Martin Panter. |
| 49326 |
|
| 49327 |
- bpo-17293: uuid.getnode() now determines MAC address on AIX using netstat. |
| 49328 |
Based on patch by Aivars Kalvāns. |
| 49329 |
|
| 49330 |
- bpo-22769: Fixed ttk.Treeview.tag_has() when called without arguments. |
| 49331 |
|
| 49332 |
- bpo-22417: Verify certificates by default in httplib (PEP 476). |
| 49333 |
|
| 49334 |
- bpo-22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2 |
| 49335 |
and above. Patch by Tim Graham. |
| 49336 |
|
| 49337 |
- bpo-22776: Brought excluded code into the scope of a try block in |
| 49338 |
SysLogHandler.emit(). |
| 49339 |
|
| 49340 |
- bpo-22665: Add missing get_terminal_size and SameFileError to |
| 49341 |
shutil.__all__. |
| 49342 |
|
| 49343 |
- bpo-6623: Remove deprecated Netrc class in the ftplib module. Patch by |
| 49344 |
Matt Chaput. |
| 49345 |
|
| 49346 |
- bpo-17381: Fixed handling of case-insensitive ranges in regular |
| 49347 |
expressions. |
| 49348 |
|
| 49349 |
- bpo-22410: Module level functions in the re module now cache compiled |
| 49350 |
locale-dependent regular expressions taking into account the locale. |
| 49351 |
|
| 49352 |
- bpo-22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now |
| 49353 |
return False when the underlying stat call raises NotADirectoryError. |
| 49354 |
|
| 49355 |
- bpo-8876: distutils now falls back to copying files when hard linking |
| 49356 |
doesn't work. This allows use with special filesystems such as VirtualBox |
| 49357 |
shared folders. |
| 49358 |
|
| 49359 |
- bpo-22217: Implemented reprs of classes in the zipfile module. |
| 49360 |
|
| 49361 |
- bpo-22457: Honour load_tests in the start_dir of discovery. |
| 49362 |
|
| 49363 |
- bpo-18216: gettext now raises an error when a .mo file has an unsupported |
| 49364 |
major version number. Patch by Aaron Hill. |
| 49365 |
|
| 49366 |
- bpo-13918: Provide a locale.delocalize() function which can remove |
| 49367 |
locale-specific number formatting from a string representing a number, |
| 49368 |
without then converting it to a specific type. Patch by Cédric Krier. |
| 49369 |
|
| 49370 |
- bpo-22676: Make the pickling of global objects which don't have a |
| 49371 |
__module__ attribute less slow. |
| 49372 |
|
| 49373 |
- bpo-18853: Fixed ResourceWarning in shlex.__nain__. |
| 49374 |
|
| 49375 |
- bpo-9351: Defaults set with set_defaults on an argparse subparser are no |
| 49376 |
longer ignored when also set on the parent parser. |
| 49377 |
|
| 49378 |
- bpo-7559: unittest test loading ImportErrors are reported as import errors |
| 49379 |
with their import exception rather than as attribute errors after the |
| 49380 |
import has already failed. |
| 49381 |
|
| 49382 |
- bpo-19746: Make it possible to examine the errors from unittest discovery |
| 49383 |
without executing the test suite. The new ``errors`` attribute on |
| 49384 |
``TestLoader`` exposes these non-fatal errors encountered during |
| 49385 |
discovery. |
| 49386 |
|
| 49387 |
- bpo-21991: Make email.headerregistry's header 'params' attributes be |
| 49388 |
read-only (MappingProxyType). Previously the dictionary was modifiable |
| 49389 |
but a new one was created on each access of the attribute. |
| 49390 |
|
| 49391 |
- bpo-22638: SSLv3 is now disabled throughout the standard library. It can |
| 49392 |
still be enabled by instantiating a SSLContext manually. |
| 49393 |
|
| 49394 |
- bpo-22641: In asyncio, the default SSL context for client connections is |
| 49395 |
now created using ssl.create_default_context(), for stronger security. |
| 49396 |
|
| 49397 |
- bpo-17401: Include closefd in io.FileIO repr. |
| 49398 |
|
| 49399 |
- bpo-21338: Add silent mode for compileall. quiet parameters of |
| 49400 |
compile_{dir, file, path} functions now have a multilevel value. Also, -q |
| 49401 |
option of the CLI now have a multilevel value. Patch by Thomas Kluyver. |
| 49402 |
|
| 49403 |
- bpo-20152: Convert the array and cmath modules to Argument Clinic. |
| 49404 |
|
| 49405 |
- bpo-18643: Add socket.socketpair() on Windows. |
| 49406 |
|
| 49407 |
- bpo-22435: Fix a file descriptor leak when socketserver bind fails. |
| 49408 |
|
| 49409 |
- bpo-13096: Fixed segfault in CTypes POINTER handling of large values. |
| 49410 |
|
| 49411 |
- bpo-11694: Raise ConversionError in xdrlib as documented. Patch by Filip |
| 49412 |
Gruszczyński and Claudiu Popa. |
| 49413 |
|
| 49414 |
- bpo-19380: Optimized parsing of regular expressions. |
| 49415 |
|
| 49416 |
- bpo-1519638: Now unmatched groups are replaced with empty strings in |
| 49417 |
re.sub() and re.subn(). |
| 49418 |
|
| 49419 |
- bpo-18615: sndhdr.what/whathdr now return a namedtuple. |
| 49420 |
|
| 49421 |
- bpo-22462: Fix pyexpat's creation of a dummy frame to make it appear in |
| 49422 |
exception tracebacks. |
| 49423 |
|
| 49424 |
- bpo-21965: Add support for in-memory SSL to the ssl module. Patch by |
| 49425 |
Geert Jansen. |
| 49426 |
|
| 49427 |
- bpo-21173: Fix len() on a WeakKeyDictionary when .clear() was called with |
| 49428 |
an iterator alive. |
| 49429 |
|
| 49430 |
- bpo-11866: Eliminated race condition in the computation of names for new |
| 49431 |
threads. |
| 49432 |
|
| 49433 |
- bpo-21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules is |
| 49434 |
mutated while iterating. Patch by Olivier Grisel. |
| 49435 |
|
| 49436 |
- bpo-11271: concurrent.futures.Executor.map() now takes a *chunksize* |
| 49437 |
argument to allow batching of tasks in child processes and improve |
| 49438 |
performance of ProcessPoolExecutor. Patch by Dan O'Reilly. |
| 49439 |
|
| 49440 |
- bpo-21883: os.path.join() and os.path.relpath() now raise a TypeError with |
| 49441 |
more helpful error message for unsupported or mismatched types of |
| 49442 |
arguments. |
| 49443 |
|
| 49444 |
- bpo-22219: The zipfile module CLI now adds entries for directories |
| 49445 |
(including empty directories) in ZIP file. |
| 49446 |
|
| 49447 |
- bpo-22449: In the ssl.SSLContext.load_default_certs, consult the |
| 49448 |
environmental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows. |
| 49449 |
|
| 49450 |
- bpo-22508: The email.__version__ variable has been removed; the email code |
| 49451 |
is no longer shipped separately from the stdlib, and __version__ hasn't |
| 49452 |
been updated in several releases. |
| 49453 |
|
| 49454 |
- bpo-20076: Added non derived UTF-8 aliases to locale aliases table. |
| 49455 |
|
| 49456 |
- bpo-20079: Added locales supported in glibc 2.18 to locale alias table. |
| 49457 |
|
| 49458 |
- bpo-20218: Added convenience methods read_text/write_text and read_bytes/ |
| 49459 |
write_bytes to pathlib.Path objects. |
| 49460 |
|
| 49461 |
- bpo-22396: On 32-bit AIX platform, don't expose os.posix_fadvise() nor |
| 49462 |
os.posix_fallocate() because their prototypes in system headers are wrong. |
| 49463 |
|
| 49464 |
- bpo-22517: When an io.BufferedRWPair object is deallocated, clear its |
| 49465 |
weakrefs. |
| 49466 |
|
| 49467 |
- bpo-22437: Number of capturing groups in regular expression is no longer |
| 49468 |
limited by 100. |
| 49469 |
|
| 49470 |
- bpo-17442: InteractiveInterpreter now displays the full chained traceback |
| 49471 |
in its showtraceback method, to match the built in interactive |
| 49472 |
interpreter. |
| 49473 |
|
| 49474 |
- bpo-23392: Added tests for marshal C API that works with FILE*. |
| 49475 |
|
| 49476 |
- bpo-10510: distutils register and upload methods now use HTML standards |
| 49477 |
compliant CRLF line endings. |
| 49478 |
|
| 49479 |
- bpo-9850: Fixed macpath.join() for empty first component. Patch by Oleg |
| 49480 |
Oshmyan. |
| 49481 |
|
| 49482 |
- bpo-5309: distutils' build and build_ext commands now accept a ``-j`` |
| 49483 |
option to enable parallel building of extension modules. |
| 49484 |
|
| 49485 |
- bpo-22448: Improve canceled timer handles cleanup to prevent unbound |
| 49486 |
memory usage. Patch by Joshua Moore-Oliva. |
| 49487 |
|
| 49488 |
- bpo-22427: TemporaryDirectory no longer attempts to clean up twice when |
| 49489 |
used in the with statement in generator. |
| 49490 |
|
| 49491 |
- bpo-22362: Forbidden ambiguous octal escapes out of range 0-0o377 in |
| 49492 |
regular expressions. |
| 49493 |
|
| 49494 |
- bpo-20912: Now directories added to ZIP file have correct Unix and MS-DOS |
| 49495 |
directory attributes. |
| 49496 |
|
| 49497 |
- bpo-21866: ZipFile.close() no longer writes ZIP64 central directory |
| 49498 |
records if allowZip64 is false. |
| 49499 |
|
| 49500 |
- bpo-22278: Fix urljoin problem with relative urls, a regression observed |
| 49501 |
after changes to issue22118 were submitted. |
| 49502 |
|
| 49503 |
- bpo-22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re |
| 49504 |
module. Removed trailing spaces in debugging output. |
| 49505 |
|
| 49506 |
- bpo-22423: Unhandled exception in thread no longer causes unhandled |
| 49507 |
AttributeError when sys.stderr is None. |
| 49508 |
|
| 49509 |
- bpo-21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line |
| 49510 |
buffering, rather than block buffering. Patch by Akira Li. |
| 49511 |
|
| 49512 |
- bpo-21091: Fix API bug: email.message.EmailMessage.is_attachment is now a |
| 49513 |
method. |
| 49514 |
|
| 49515 |
- bpo-21079: Fix email.message.EmailMessage.is_attachment to return the |
| 49516 |
correct result when the header has parameters as well as a value. |
| 49517 |
|
| 49518 |
- bpo-22247: Add NNTPError to nntplib.__all__. |
| 49519 |
|
| 49520 |
- bpo-22366: urllib.request.urlopen will accept a context object |
| 49521 |
(SSLContext) as an argument which will then be used for HTTPS connection. |
| 49522 |
Patch by Alex Gaynor. |
| 49523 |
|
| 49524 |
- bpo-4180: The warnings registries are now reset when the filters are |
| 49525 |
modified. |
| 49526 |
|
| 49527 |
- bpo-22419: Limit the length of incoming HTTP request in wsgiref server to |
| 49528 |
65536 bytes and send a 414 error code for higher lengths. Patch |
| 49529 |
contributed by Devin Cook. |
| 49530 |
|
| 49531 |
- Lax cookie parsing in http.cookies could be a security issue when combined |
| 49532 |
with non-standard cookie handling in some web browsers. Reported by |
| 49533 |
Sergey Bobrov. |
| 49534 |
|
| 49535 |
- bpo-20537: logging methods now accept an exception instance as well as a |
| 49536 |
Boolean value or exception tuple. Thanks to Yury Selivanov for the patch. |
| 49537 |
|
| 49538 |
- bpo-22384: An exception in Tkinter callback no longer crashes the program |
| 49539 |
when it is run with pythonw.exe. |
| 49540 |
|
| 49541 |
- bpo-22168: Prevent turtle AttributeError with non-default Canvas on OS X. |
| 49542 |
|
| 49543 |
- bpo-21147: sqlite3 now raises an exception if the request contains a null |
| 49544 |
character instead of truncating it. Based on patch by Victor Stinner. |
| 49545 |
|
| 49546 |
- bpo-13968: The glob module now supports recursive search in subdirectories |
| 49547 |
using the ``**`` pattern. |
| 49548 |
|
| 49549 |
- bpo-21951: Fixed a crash in Tkinter on AIX when called Tcl command with |
| 49550 |
empty string or tuple argument. |
| 49551 |
|
| 49552 |
- bpo-21951: Tkinter now most likely raises MemoryError instead of crash if |
| 49553 |
the memory allocation fails. |
| 49554 |
|
| 49555 |
- bpo-22338: Fix a crash in the json module on memory allocation failure. |
| 49556 |
|
| 49557 |
- bpo-12410: imaplib.IMAP4 now supports the context management protocol. |
| 49558 |
Original patch by Tarek Ziadé. |
| 49559 |
|
| 49560 |
- bpo-21270: We now override tuple methods in mock.call objects so that they |
| 49561 |
can be used as normal call attributes. |
| 49562 |
|
| 49563 |
- bpo-16662: ``load_tests()`` is now unconditionally run when it is present |
| 49564 |
in a package's ``__init__.py``. ``TestLoader.loadTestsFromModule()`` |
| 49565 |
still accepts use_load_tests, but it is deprecated and ignored. A new |
| 49566 |
keyword-only attribute ``pattern`` is added and documented. Patch given |
| 49567 |
by Robert Collins, tweaked by Barry Warsaw. |
| 49568 |
|
| 49569 |
- bpo-22226: First letter no longer is stripped from the "status" key in the |
| 49570 |
result of Treeview.heading(). |
| 49571 |
|
| 49572 |
- bpo-19524: Fixed resource leak in the HTTP connection when an invalid |
| 49573 |
response is received. Patch by Martin Panter. |
| 49574 |
|
| 49575 |
- bpo-20421: Add a .version() method to SSL sockets exposing the actual |
| 49576 |
protocol version in use. |
| 49577 |
|
| 49578 |
- bpo-19546: configparser exceptions no longer expose implementation |
| 49579 |
details. Chained KeyErrors are removed, which leads to cleaner tracebacks. |
| 49580 |
Patch by Claudiu Popa. |
| 49581 |
|
| 49582 |
- bpo-22051: turtledemo no longer reloads examples to re-run them. |
| 49583 |
Initialization of variables and gui setup should be done in main(), which |
| 49584 |
is called each time a demo is run, but not on import. |
| 49585 |
|
| 49586 |
- bpo-21933: Turtledemo users can change the code font size with a menu |
| 49587 |
selection or control(command) '-' or '+' or control-mousewheel. Original |
| 49588 |
patch by Lita Cho. |
| 49589 |
|
| 49590 |
- bpo-21597: The separator between the turtledemo text pane and the drawing |
| 49591 |
canvas can now be grabbed and dragged with a mouse. The code text pane |
| 49592 |
can be widened to easily view or copy the full width of the text. The |
| 49593 |
canvas can be widened on small screens. Original patches by Jan Kanis and |
| 49594 |
Lita Cho. |
| 49595 |
|
| 49596 |
- bpo-18132: Turtledemo buttons no longer disappear when the window is |
| 49597 |
shrunk. Original patches by Jan Kanis and Lita Cho. |
| 49598 |
|
| 49599 |
- bpo-22043: time.monotonic() is now always available. |
| 49600 |
``threading.Lock.acquire()``, ``threading.RLock.acquire()`` and socket |
| 49601 |
operations now use a monotonic clock, instead of the system clock, when a |
| 49602 |
timeout is used. |
| 49603 |
|
| 49604 |
- bpo-21527: Add a default number of workers to ThreadPoolExecutor equal to |
| 49605 |
5 times the number of CPUs. Patch by Claudiu Popa. |
| 49606 |
|
| 49607 |
- bpo-22216: smtplib now resets its state more completely after a quit. The |
| 49608 |
most obvious consequence of the previous behavior was a STARTTLS failure |
| 49609 |
during a connect/starttls/quit/connect/starttls sequence. |
| 49610 |
|
| 49611 |
- bpo-22098: ctypes' BigEndianStructure and LittleEndianStructure now define |
| 49612 |
an empty __slots__ so that subclasses don't always get an instance dict. |
| 49613 |
Patch by Claudiu Popa. |
| 49614 |
|
| 49615 |
- bpo-22185: Fix an occasional RuntimeError in threading.Condition.wait() |
| 49616 |
caused by mutation of the waiters queue without holding the lock. Patch |
| 49617 |
by Doug Zongker. |
| 49618 |
|
| 49619 |
- bpo-22287: On UNIX, _PyTime_gettimeofday() now uses |
| 49620 |
clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now |
| 49621 |
depends on the librt library on Solaris and on Linux (only with glibc |
| 49622 |
older than 2.17). |
| 49623 |
|
| 49624 |
- bpo-22182: Use e.args to unpack exceptions correctly in |
| 49625 |
distutils.file_util.move_file. Patch by Claudiu Popa. |
| 49626 |
|
| 49627 |
- The webbrowser module now uses subprocess's start_new_session=True rather |
| 49628 |
than a potentially risky preexec_fn=os.setsid call. |
| 49629 |
|
| 49630 |
- bpo-22042: signal.set_wakeup_fd(fd) now raises an exception if the file |
| 49631 |
descriptor is in blocking mode. |
| 49632 |
|
| 49633 |
- bpo-16808: inspect.stack() now returns a named tuple instead of a tuple. |
| 49634 |
Patch by Daniel Shahaf. |
| 49635 |
|
| 49636 |
- bpo-22236: Fixed Tkinter images copying operations in NoDefaultRoot mode. |
| 49637 |
|
| 49638 |
- bpo-2527: Add a *globals* argument to timeit functions, in order to |
| 49639 |
override the globals namespace in which the timed code is executed. Patch |
| 49640 |
by Ben Roberts. |
| 49641 |
|
| 49642 |
- bpo-22118: Switch urllib.parse to use RFC 3986 semantics for the |
| 49643 |
resolution of relative URLs, rather than RFCs 1808 and 2396. Patch by |
| 49644 |
Demian Brecht. |
| 49645 |
|
| 49646 |
- bpo-21549: Added the "members" parameter to TarFile.list(). |
| 49647 |
|
| 49648 |
- bpo-19628: Allow compileall recursion depth to be specified with a -r |
| 49649 |
option. |
| 49650 |
|
| 49651 |
- bpo-15696: Add a __sizeof__ implementation for mmap objects on Windows. |
| 49652 |
|
| 49653 |
- bpo-22068: Avoided reference loops with Variables and Fonts in Tkinter. |
| 49654 |
|
| 49655 |
- bpo-22165: SimpleHTTPRequestHandler now supports undecodable file names. |
| 49656 |
|
| 49657 |
- bpo-15381: Optimized line reading in io.BytesIO. |
| 49658 |
|
| 49659 |
- bpo-8797: Raise HTTPError on failed Basic Authentication immediately. |
| 49660 |
Initial patch by Sam Bull. |
| 49661 |
|
| 49662 |
- bpo-20729: Restored the use of lazy iterkeys()/itervalues()/iteritems() in |
| 49663 |
the mailbox module. |
| 49664 |
|
| 49665 |
- bpo-21448: Changed FeedParser feed() to avoid *O*\ (*n*\ :sup:`2`) |
| 49666 |
behavior when parsing long line. Original patch by Raymond Hettinger. |
| 49667 |
|
| 49668 |
- bpo-22184: The functools LRU Cache decorator factory now gives an earlier |
| 49669 |
and clearer error message when the user forgets the required parameters. |
| 49670 |
|
| 49671 |
- bpo-17923: glob() patterns ending with a slash no longer match non-dirs on |
| 49672 |
AIX. Based on patch by Delhallt. |
| 49673 |
|
| 49674 |
- bpo-21725: Added support for RFC 6531 (SMTPUTF8) in smtpd. |
| 49675 |
|
| 49676 |
- bpo-22176: Update the ctypes module's libffi to v3.1. This release adds |
| 49677 |
support for the Linux AArch64 and POWERPC ELF ABIv2 little endian |
| 49678 |
architectures. |
| 49679 |
|
| 49680 |
- bpo-5411: Added support for the "xztar" format in the shutil module. |
| 49681 |
|
| 49682 |
- bpo-21121: Don't force 3rd party C extensions to be built with |
| 49683 |
-Werror=declaration-after-statement. |
| 49684 |
|
| 49685 |
- bpo-21975: Fixed crash when using uninitialized sqlite3.Row (in particular |
| 49686 |
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in |
| 49687 |
the __new__() method. |
| 49688 |
|
| 49689 |
- bpo-20170: Convert posixmodule to use Argument Clinic. |
| 49690 |
|
| 49691 |
- bpo-21539: Add an *exists_ok* argument to ``Pathlib.mkdir()`` to mimic |
| 49692 |
``mkdir -p`` and ``os.makedirs()`` functionality. When true, ignore |
| 49693 |
``FileExistsErrors``. Patch by Berker Peksag. |
| 49694 |
|
| 49695 |
- bpo-22127: Bypass IDNA for pure-ASCII host names in the socket module (in |
| 49696 |
particular for numeric IPs). |
| 49697 |
|
| 49698 |
- bpo-21047: set the default value for the *convert_charrefs* argument of |
| 49699 |
HTMLParser to True. Patch by Berker Peksag. |
| 49700 |
|
| 49701 |
- Add an __all__ to html.entities. |
| 49702 |
|
| 49703 |
- bpo-15114: the strict mode and argument of HTMLParser, HTMLParser.error, |
| 49704 |
and the HTMLParserError exception have been removed. |
| 49705 |
|
| 49706 |
- bpo-22085: Dropped support of Tk 8.3 in Tkinter. |
| 49707 |
|
| 49708 |
- bpo-21580: Now Tkinter correctly handles bytes arguments passed to Tk. In |
| 49709 |
particular this allows initializing images from binary data. |
| 49710 |
|
| 49711 |
- bpo-22003: When initialized from a bytes object, io.BytesIO() now defers |
| 49712 |
making a copy until it is mutated, improving performance and memory use on |
| 49713 |
some use cases. Patch by David Wilson. |
| 49714 |
|
| 49715 |
- bpo-22018: On Windows, signal.set_wakeup_fd() now also supports sockets. A |
| 49716 |
side effect is that Python depends to the WinSock library. |
| 49717 |
|
| 49718 |
- bpo-22054: Add os.get_blocking() and os.set_blocking() functions to get |
| 49719 |
and set the blocking mode of a file descriptor (False if the O_NONBLOCK |
| 49720 |
flag is set, True otherwise). These functions are not available on |
| 49721 |
Windows. |
| 49722 |
|
| 49723 |
- bpo-17172: Make turtledemo start as active on OS X even when run with |
| 49724 |
subprocess. Patch by Lita Cho. |
| 49725 |
|
| 49726 |
- bpo-21704: Fix build error for _multiprocessing when semaphores are not |
| 49727 |
available. Patch by Arfrever Frehtes Taifersar Arahesis. |
| 49728 |
|
| 49729 |
- bpo-20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic. Patch |
| 49730 |
by Vajrasky Kok. |
| 49731 |
|
| 49732 |
- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError |
| 49733 |
on closed socket. repr(socket.socket) already works fine. |
| 49734 |
|
| 49735 |
- bpo-22033: Reprs of most Python implemented classes now contain actual |
| 49736 |
class name instead of hardcoded one. |
| 49737 |
|
| 49738 |
- bpo-21947: The dis module can now disassemble generator-iterator objects |
| 49739 |
based on their gi_code attribute. Patch by Clement Rouault. |
| 49740 |
|
| 49741 |
- bpo-16133: The asynchat.async_chat.handle_read() method now ignores |
| 49742 |
BlockingIOError exceptions. |
| 49743 |
|
| 49744 |
- bpo-22044: Fixed premature DECREF in call_tzinfo_method. Patch by Tom |
| 49745 |
Flanagan. |
| 49746 |
|
| 49747 |
- bpo-19884: readline: Disable the meta modifier key if stdout is not a |
| 49748 |
terminal to not write the ANSI sequence ``"\033[1034h"`` into stdout. This |
| 49749 |
sequence is used on some terminal (ex: TERM=xterm-256color") to enable |
| 49750 |
support of 8 bit characters. |
| 49751 |
|
| 49752 |
- bpo-4350: Removed a number of out-of-dated and non-working for a long time |
| 49753 |
Tkinter methods. |
| 49754 |
|
| 49755 |
- bpo-6167: Scrollbar.activate() now returns the name of active element if |
| 49756 |
the argument is not specified. Scrollbar.set() now always accepts only 2 |
| 49757 |
arguments. |
| 49758 |
|
| 49759 |
- bpo-15275: Clean up and speed up the ntpath module. |
| 49760 |
|
| 49761 |
- bpo-21888: plistlib's load() and loads() now work if the fmt parameter is |
| 49762 |
specified. |
| 49763 |
|
| 49764 |
- bpo-22032: __qualname__ instead of __name__ is now always used to format |
| 49765 |
fully qualified class names of Python implemented classes. |
| 49766 |
|
| 49767 |
- bpo-22031: Reprs now always use hexadecimal format with the "0x" prefix |
| 49768 |
when contain an id in form " at 0x...". |
| 49769 |
|
| 49770 |
- bpo-22018: signal.set_wakeup_fd() now raises an OSError instead of a |
| 49771 |
ValueError on ``fstat()`` failure. |
| 49772 |
|
| 49773 |
- bpo-21044: tarfile.open() now handles fileobj with an integer 'name' |
| 49774 |
attribute. Based on patch by Antoine Pietri. |
| 49775 |
|
| 49776 |
- bpo-21966: Respect -q command-line option when code module is ran. |
| 49777 |
|
| 49778 |
- bpo-19076: Don't pass the redundant 'file' argument to self.error(). |
| 49779 |
|
| 49780 |
- bpo-16382: Improve exception message of warnings.warn() for bad category. |
| 49781 |
Initial patch by Phil Elson. |
| 49782 |
|
| 49783 |
- bpo-21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of |
| 49784 |
:c:expr:`int` for the size to support reading more than 2 GB at once. On |
| 49785 |
Windows, the size is truncated to INT_MAX. As any call to os.read(), the |
| 49786 |
OS may read less bytes than the number of requested bytes. |
| 49787 |
|
| 49788 |
- bpo-21942: Fixed source file viewing in pydoc's server mode on Windows. |
| 49789 |
|
| 49790 |
- bpo-11259: asynchat.async_chat().set_terminator() now raises a ValueError |
| 49791 |
if the number of received bytes is negative. |
| 49792 |
|
| 49793 |
- bpo-12523: asynchat.async_chat.push() now raises a TypeError if it doesn't |
| 49794 |
get a bytes string |
| 49795 |
|
| 49796 |
- bpo-21707: Add missing kwonlyargcount argument to |
| 49797 |
ModuleFinder.replace_paths_in_code(). |
| 49798 |
|
| 49799 |
- bpo-20639: calling Path.with_suffix('') allows removing the suffix again. |
| 49800 |
Patch by July Tikhonov. |
| 49801 |
|
| 49802 |
- bpo-21714: Disallow the construction of invalid paths using |
| 49803 |
Path.with_name(). Original patch by Antony Lee. |
| 49804 |
|
| 49805 |
- bpo-15014: Added 'auth' method to smtplib to make implementing auth |
| 49806 |
mechanisms simpler, and used it internally in the login method. |
| 49807 |
|
| 49808 |
- bpo-21151: Fixed a segfault in the winreg module when ``None`` is passed |
| 49809 |
as a ``REG_BINARY`` value to SetValueEx. Patch by John Ehresman. |
| 49810 |
|
| 49811 |
- bpo-21090: io.FileIO.readall() does not ignore I/O errors anymore. Before, |
| 49812 |
it ignored I/O errors if at least the first C call read() succeed. |
| 49813 |
|
| 49814 |
- bpo-5800: headers parameter of wsgiref.headers.Headers is now optional. |
| 49815 |
Initial patch by Pablo Torres Navarrete and SilentGhost. |
| 49816 |
|
| 49817 |
- bpo-21781: ssl.RAND_add() now supports strings longer than 2 GB. |
| 49818 |
|
| 49819 |
- bpo-21679: Prevent extraneous fstat() calls during open(). Patch by |
| 49820 |
Bohuslav Kabrda. |
| 49821 |
|
| 49822 |
- bpo-21863: cProfile now displays the module name of C extension functions, |
| 49823 |
in addition to their own name. |
| 49824 |
|
| 49825 |
- bpo-11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper |
| 49826 |
object is destroyed. The destructor now closes the file if needed. The |
| 49827 |
close() method can now be called twice: the second call does nothing. |
| 49828 |
|
| 49829 |
- bpo-21858: Better handling of Python exceptions in the sqlite3 module. |
| 49830 |
|
| 49831 |
- bpo-21476: Make sure the email.parser.BytesParser TextIOWrapper is |
| 49832 |
discarded after parsing, so the input file isn't unexpectedly closed. |
| 49833 |
|
| 49834 |
- bpo-20295: imghdr now recognizes OpenEXR format images. |
| 49835 |
|
| 49836 |
- bpo-21729: Used the "with" statement in the dbm.dumb module to ensure |
| 49837 |
files closing. Patch by Claudiu Popa. |
| 49838 |
|
| 49839 |
- bpo-21491: socketserver: Fix a race condition in child processes reaping. |
| 49840 |
|
| 49841 |
- bpo-21719: Added the ``st_file_attributes`` field to os.stat_result on |
| 49842 |
Windows. |
| 49843 |
|
| 49844 |
- bpo-21832: Require named tuple inputs to be exact strings. |
| 49845 |
|
| 49846 |
- bpo-21722: The distutils "upload" command now exits with a non-zero return |
| 49847 |
code when uploading fails. Patch by Martin Dengler. |
| 49848 |
|
| 49849 |
- bpo-21723: asyncio.Queue: support any type of number (ex: float) for the |
| 49850 |
maximum size. Patch written by Vajrasky Kok. |
| 49851 |
|
| 49852 |
- bpo-21711: support for "site-python" directories has now been removed from |
| 49853 |
the site module (it was deprecated in 3.4). |
| 49854 |
|
| 49855 |
- bpo-17552: new socket.sendfile() method allowing a file to be sent over a |
| 49856 |
socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo |
| 49857 |
Rodola'. |
| 49858 |
|
| 49859 |
- bpo-18039: dbm.dump.open() now always creates a new database when the flag |
| 49860 |
has the value 'n'. Patch by Claudiu Popa. |
| 49861 |
|
| 49862 |
- bpo-21326: Add a new is_closed() method to asyncio.BaseEventLoop. |
| 49863 |
run_forever() and run_until_complete() methods of asyncio.BaseEventLoop |
| 49864 |
now raise an exception if the event loop was closed. |
| 49865 |
|
| 49866 |
- bpo-21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths |
| 49867 |
before checking for a CGI script at that path. |
| 49868 |
|
| 49869 |
- bpo-21310: Fixed possible resource leak in failed open(). |
| 49870 |
|
| 49871 |
- bpo-21256: Printout of keyword args should be in deterministic order in a |
| 49872 |
mock function call. This will help to write better doctests. |
| 49873 |
|
| 49874 |
- bpo-21677: Fixed chaining nonnormalized exceptions in io close() methods. |
| 49875 |
|
| 49876 |
- bpo-11709: Fix the pydoc.help function to not fail when sys.stdin is not a |
| 49877 |
valid file. |
| 49878 |
|
| 49879 |
- bpo-21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available. |
| 49880 |
|
| 49881 |
- bpo-13223: Fix pydoc.writedoc so that the HTML documentation for methods |
| 49882 |
that use 'self' in the example code is generated correctly. |
| 49883 |
|
| 49884 |
- bpo-21463: In urllib.request, fix pruning of the FTP cache. |
| 49885 |
|
| 49886 |
- bpo-21618: The subprocess module could fail to close open fds that were |
| 49887 |
inherited by the calling process and already higher than POSIX resource |
| 49888 |
limits would otherwise allow. On systems with a functioning /proc/self/fd |
| 49889 |
or /dev/fd interface the max is now ignored and all fds are closed. |
| 49890 |
|
| 49891 |
- bpo-20383: Introduce importlib.util.module_from_spec() as the preferred |
| 49892 |
way to create a new module. |
| 49893 |
|
| 49894 |
- bpo-21552: Fixed possible integer overflow of too long string lengths in |
| 49895 |
the tkinter module on 64-bit platforms. |
| 49896 |
|
| 49897 |
- bpo-14315: The zipfile module now ignores extra fields in the central |
| 49898 |
directory that are too short to be parsed instead of letting a |
| 49899 |
struct.unpack error bubble up as this "bad data" appears in many real |
| 49900 |
world zip files in the wild and is ignored by other zip tools. |
| 49901 |
|
| 49902 |
- bpo-13742: Added "key" and "reverse" parameters to heapq.merge(). (First |
| 49903 |
draft of patch contributed by Simon Sapin.) |
| 49904 |
|
| 49905 |
- bpo-21402: tkinter.ttk now works when default root window is not set. |
| 49906 |
|
| 49907 |
- bpo-3015: ``_tkinter.create()`` now creates ``tkapp`` object with |
| 49908 |
``wantobjects=1`` by default. |
| 49909 |
|
| 49910 |
- bpo-10203: sqlite3.Row now truly supports sequence protocol. In |
| 49911 |
particular it supports reverse() and negative indices. Original patch by |
| 49912 |
Claudiu Popa. |
| 49913 |
|
| 49914 |
- bpo-18807: If copying (no symlinks) specified for a venv, then the python |
| 49915 |
interpreter aliases (python, python3) are now created by copying rather |
| 49916 |
than symlinking. |
| 49917 |
|
| 49918 |
- bpo-20197: Added support for the WebP image type in the imghdr module. |
| 49919 |
Patch by Fabrice Aneche and Claudiu Popa. |
| 49920 |
|
| 49921 |
- bpo-21513: Speedup some properties of IP addresses (IPv4Address, |
| 49922 |
IPv6Address) such as .is_private or .is_multicast. |
| 49923 |
|
| 49924 |
- bpo-21137: Improve the repr for threading.Lock() and its variants by |
| 49925 |
showing the "locked" or "unlocked" status. Patch by Berker Peksag. |
| 49926 |
|
| 49927 |
- bpo-21538: The plistlib module now supports loading of binary plist files |
| 49928 |
when reference or offset size is not a power of two. |
| 49929 |
|
| 49930 |
- bpo-21455: Add a default backlog to socket.listen(). |
| 49931 |
|
| 49932 |
- bpo-21525: Most Tkinter methods which accepted tuples now accept lists |
| 49933 |
too. |
| 49934 |
|
| 49935 |
- bpo-22166: With the assistance of a new internal _codecs._forget_codec |
| 49936 |
helping function, test_codecs now clears the encoding caches to avoid the |
| 49937 |
appearance of a reference leak |
| 49938 |
|
| 49939 |
- bpo-22236: Tkinter tests now don't reuse default root window. New root |
| 49940 |
window is created for every test class. |
| 49941 |
|
| 49942 |
- bpo-10744: Fix :pep:`3118` format strings on ctypes objects with a |
| 49943 |
nontrivial shape. |
| 49944 |
|
| 49945 |
- bpo-20826: Optimize ipaddress.collapse_addresses(). |
| 49946 |
|
| 49947 |
- bpo-21487: Optimize ipaddress.summarize_address_range() and |
| 49948 |
ipaddress.{IPv4Network,IPv6Network}.subnets(). |
| 49949 |
|
| 49950 |
- bpo-21486: Optimize parsing of netmasks in ipaddress.IPv4Network and |
| 49951 |
ipaddress.IPv6Network. |
| 49952 |
|
| 49953 |
- bpo-13916: Disallowed the surrogatepass error handler for non UTF-\* |
| 49954 |
encodings. |
| 49955 |
|
| 49956 |
- bpo-20998: Fixed re.fullmatch() of repeated single character pattern with |
| 49957 |
ignore case. Original patch by Matthew Barnett. |
| 49958 |
|
| 49959 |
- bpo-21075: fileinput.FileInput now reads bytes from standard stream if |
| 49960 |
binary mode is specified. Patch by Sam Kimbrel. |
| 49961 |
|
| 49962 |
- bpo-19775: Add a samefile() method to pathlib Path objects. Initial patch |
| 49963 |
by Vajrasky Kok. |
| 49964 |
|
| 49965 |
- bpo-21226: Set up modules properly in PyImport_ExecCodeModuleObject (and |
| 49966 |
friends). |
| 49967 |
|
| 49968 |
- bpo-21398: Fix a unicode error in the pydoc pager when the documentation |
| 49969 |
contains characters not encodable to the stdout encoding. |
| 49970 |
|
| 49971 |
- bpo-16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an |
| 49972 |
(address, netmask) tuple argument, so as to easily construct network |
| 49973 |
objects from existing addresses. |
| 49974 |
|
| 49975 |
- bpo-21156: importlib.abc.InspectLoader.source_to_code() is now a |
| 49976 |
staticmethod. |
| 49977 |
|
| 49978 |
- bpo-21424: Simplified and optimized heaqp.nlargest() and nmsmallest() to |
| 49979 |
make fewer tuple comparisons. |
| 49980 |
|
| 49981 |
- bpo-21396: Fix TextIOWrapper(..., write_through=True) to not force a |
| 49982 |
flush() on the underlying binary stream. Patch by akira. |
| 49983 |
|
| 49984 |
- bpo-18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman |
| 49985 |
|
| 49986 |
- bpo-21088: Bugfix for curses.window.addch() regression in 3.4.0. In |
| 49987 |
porting to Argument Clinic, the first two arguments were reversed. |
| 49988 |
|
| 49989 |
- bpo-21407: _decimal: The module now supports function signatures. |
| 49990 |
|
| 49991 |
- bpo-10650: Remove the non-standard 'watchexp' parameter from the |
| 49992 |
Decimal.quantize() method in the Python version. It had never been |
| 49993 |
present in the C version. |
| 49994 |
|
| 49995 |
- bpo-21469: Reduced the risk of false positives in robotparser by checking |
| 49996 |
to make sure that robots.txt has been read or does not exist prior to |
| 49997 |
returning True in can_fetch(). |
| 49998 |
|
| 49999 |
- bpo-19414: Have the OrderedDict mark deleted links as unusable. This gives |
| 50000 |
an early failure if the link is deleted during iteration. |
| 50001 |
|
| 50002 |
- bpo-21421: Add __slots__ to the MappingViews ABC. Patch by Josh Rosenberg. |
| 50003 |
|
| 50004 |
- bpo-21101: Eliminate double hashing in the C speed-up code for |
| 50005 |
collections.Counter(). |
| 50006 |
|
| 50007 |
- bpo-21321: itertools.islice() now releases the reference to the source |
| 50008 |
iterator when the slice is exhausted. Patch by Anton Afanasyev. |
| 50009 |
|
| 50010 |
- bpo-21057: TextIOWrapper now allows the underlying binary stream's read() |
| 50011 |
or read1() method to return an arbitrary bytes-like object (such as a |
| 50012 |
memoryview). Patch by Nikolaus Rath. |
| 50013 |
|
| 50014 |
- bpo-20951: SSLSocket.send() now raises either SSLWantReadError or |
| 50015 |
SSLWantWriteError on a non-blocking socket if the operation would block. |
| 50016 |
Previously, it would return 0. Patch by Nikolaus Rath. |
| 50017 |
|
| 50018 |
- bpo-13248: removed previously deprecated asyncore.dispatcher __getattr__ |
| 50019 |
cheap inheritance hack. |
| 50020 |
|
| 50021 |
- bpo-9815: assertRaises now tries to clear references to local variables in |
| 50022 |
the exception's traceback. |
| 50023 |
|
| 50024 |
- bpo-19940: ssl.cert_time_to_seconds() now interprets the given time string |
| 50025 |
in the UTC timezone (as specified in RFC 5280), not the local timezone. |
| 50026 |
|
| 50027 |
- bpo-13204: Calling sys.flags.__new__ would crash the interpreter, now it |
| 50028 |
raises a TypeError. |
| 50029 |
|
| 50030 |
- bpo-19385: Make operations on a closed dbm.dumb database always raise the |
| 50031 |
same exception. |
| 50032 |
|
| 50033 |
- bpo-21207: Detect when the os.urandom cached fd has been closed or |
| 50034 |
replaced, and open it anew. |
| 50035 |
|
| 50036 |
- bpo-21291: subprocess's Popen.wait() is now thread safe so that multiple |
| 50037 |
threads may be calling wait() or poll() on a Popen instance at the same |
| 50038 |
time without losing the Popen.returncode value. |
| 50039 |
|
| 50040 |
- bpo-21127: Path objects can now be instantiated from str subclass |
| 50041 |
instances (such as ``numpy.str_``). |
| 50042 |
|
| 50043 |
- bpo-15002: urllib.response object to use _TemporaryFileWrapper (and |
| 50044 |
_TemporaryFileCloser) facility. Provides a better way to handle file |
| 50045 |
descriptor close. Patch contributed by Christian Theune. |
| 50046 |
|
| 50047 |
- bpo-12220: mindom now raises a custom ValueError indicating it doesn't |
| 50048 |
support spaces in URIs instead of letting a 'split' ValueError bubble up. |
| 50049 |
|
| 50050 |
- bpo-21068: The ssl.PROTOCOL* constants are now enum members. |
| 50051 |
|
| 50052 |
- bpo-21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd. |
| 50053 |
|
| 50054 |
- bpo-21262: New method assert_not_called for Mock. It raises AssertionError |
| 50055 |
if the mock has been called. |
| 50056 |
|
| 50057 |
- bpo-21238: New keyword argument ``unsafe`` to Mock. It raises |
| 50058 |
``AttributeError`` incase of an attribute startswith assert or assret. |
| 50059 |
|
| 50060 |
- bpo-20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not |
| 50061 |
PROTOCOL_SSLv3, for maximum compatibility. |
| 50062 |
|
| 50063 |
- bpo-21239: patch.stopall() didn't work deterministically when the same |
| 50064 |
name was patched more than once. |
| 50065 |
|
| 50066 |
- bpo-21203: Updated fileConfig and dictConfig to remove inconsistencies. |
| 50067 |
Thanks to Jure Koren for the patch. |
| 50068 |
|
| 50069 |
- bpo-21222: Passing name keyword argument to mock.create_autospec now |
| 50070 |
works. |
| 50071 |
|
| 50072 |
- bpo-21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX. |
| 50073 |
|
| 50074 |
- bpo-17498: Some SMTP servers disconnect after certain errors, violating |
| 50075 |
strict RFC conformance. Instead of losing the error code when we issue |
| 50076 |
the subsequent RSET, smtplib now returns the error code and defers raising |
| 50077 |
the SMTPServerDisconnected error until the next command is issued. |
| 50078 |
|
| 50079 |
- bpo-17826: setting an iterable side_effect on a mock function created by |
| 50080 |
create_autospec now works. Patch by Kushal Das. |
| 50081 |
|
| 50082 |
- bpo-7776: Fix ``Host:`` header and reconnection when using |
| 50083 |
http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath. |
| 50084 |
|
| 50085 |
- bpo-20968: unittest.mock.MagicMock now supports division. Patch by |
| 50086 |
Johannes Baiter. |
| 50087 |
|
| 50088 |
- bpo-21529: Fix arbitrary memory access in JSONDecoder.raw_decode with a |
| 50089 |
negative second parameter. Bug reported by Guido Vranken. (See also: |
| 50090 |
:cve:`2014-4616`) |
| 50091 |
|
| 50092 |
- bpo-21169: getpass now handles non-ascii characters that the input stream |
| 50093 |
encoding cannot encode by re-encoding using the replace error handler. |
| 50094 |
|
| 50095 |
- bpo-21171: Fixed undocumented filter API of the rot13 codec. Patch by |
| 50096 |
Berker Peksag. |
| 50097 |
|
| 50098 |
- bpo-20539: Improved math.factorial error message for large positive inputs |
| 50099 |
and changed exception type (OverflowError -> ValueError) for large |
| 50100 |
negative inputs. |
| 50101 |
|
| 50102 |
- bpo-21172: isinstance check relaxed from dict to collections.Mapping. |
| 50103 |
|
| 50104 |
- bpo-21155: asyncio.EventLoop.create_unix_server() now raises a ValueError |
| 50105 |
if path and sock are specified at the same time. |
| 50106 |
|
| 50107 |
- bpo-21136: Avoid unnecessary normalization of Fractions resulting from |
| 50108 |
power and other operations. Patch by Raymond Hettinger. |
| 50109 |
|
| 50110 |
- bpo-17621: Introduce importlib.util.LazyLoader. |
| 50111 |
|
| 50112 |
- bpo-21076: signal module constants were turned into enums. Patch by |
| 50113 |
Giampaolo Rodola'. |
| 50114 |
|
| 50115 |
- bpo-20636: Improved the repr of Tkinter widgets. |
| 50116 |
|
| 50117 |
- bpo-19505: The items, keys, and values views of OrderedDict now support |
| 50118 |
reverse iteration using reversed(). |
| 50119 |
|
| 50120 |
- bpo-21149: Improved thread-safety in logging cleanup during interpreter |
| 50121 |
shutdown. Thanks to Devin Jeanpierre for the patch. |
| 50122 |
|
| 50123 |
- bpo-21058: Fix a leak of file descriptor in |
| 50124 |
:func:`tempfile.NamedTemporaryFile`, close the file descriptor if |
| 50125 |
:func:`io.open` fails |
| 50126 |
|
| 50127 |
- bpo-21200: Return None from pkgutil.get_loader() when __spec__ is missing. |
| 50128 |
|
| 50129 |
- bpo-21013: Enhance ssl.create_default_context() when used for server side |
| 50130 |
sockets to provide better security by default. |
| 50131 |
|
| 50132 |
- bpo-20145: ``assertRaisesRegex`` and ``assertWarnsRegex`` now raise a |
| 50133 |
``TypeError`` if the second argument is not a string or compiled regex. |
| 50134 |
|
| 50135 |
- bpo-20633: Replace relative import by absolute import. |
| 50136 |
|
| 50137 |
- bpo-20980: Stop wrapping exception when using ThreadPool. |
| 50138 |
|
| 50139 |
- bpo-21082: In os.makedirs, do not set the process-wide umask. Note this |
| 50140 |
changes behavior of makedirs when exist_ok=True. |
| 50141 |
|
| 50142 |
- bpo-20990: Fix issues found by pyflakes for multiprocessing. |
| 50143 |
|
| 50144 |
- bpo-21015: SSL contexts will now automatically select an elliptic curve |
| 50145 |
for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to |
| 50146 |
"prime256v1". |
| 50147 |
|
| 50148 |
- bpo-21000: Improve the command-line interface of json.tool. |
| 50149 |
|
| 50150 |
- bpo-20995: Enhance default ciphers used by the ssl module to enable better |
| 50151 |
security and prioritize perfect forward secrecy. |
| 50152 |
|
| 50153 |
- bpo-20884: Don't assume that __file__ is defined on importlib.__init__. |
| 50154 |
|
| 50155 |
- bpo-21499: Ignore __builtins__ in several test_importlib.test_api tests. |
| 50156 |
|
| 50157 |
- bpo-20627: xmlrpc.client.ServerProxy is now a context manager. |
| 50158 |
|
| 50159 |
- bpo-19165: The formatter module now raises DeprecationWarning instead of |
| 50160 |
PendingDeprecationWarning. |
| 50161 |
|
| 50162 |
- bpo-13936: Remove the ability of datetime.time instances to be considered |
| 50163 |
false in boolean contexts. |
| 50164 |
|
| 50165 |
- bpo-18931: selectors module now supports /dev/poll on Solaris. Patch by |
| 50166 |
Giampaolo Rodola'. |
| 50167 |
|
| 50168 |
- bpo-19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale), |
| 50169 |
:py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the |
| 50170 |
``surrogateescape`` error handler, instead of the ``strict`` error |
| 50171 |
handler. |
| 50172 |
|
| 50173 |
- bpo-20574: Implement incremental decoder for cp65001 code (Windows code |
| 50174 |
page 65001, Microsoft UTF-8). |
| 50175 |
|
| 50176 |
- bpo-20879: Delay the initialization of encoding and decoding tables for |
| 50177 |
base32, ascii85 and base85 codecs in the base64 module, and delay the |
| 50178 |
initialization of the unquote_to_bytes() table of the urllib.parse module, |
| 50179 |
to not waste memory if these modules are not used. |
| 50180 |
|
| 50181 |
- bpo-19157: Include the broadcast address in the usuable hosts for IPv6 in |
| 50182 |
ipaddress. |
| 50183 |
|
| 50184 |
- bpo-11599: When an external command (e.g. compiler) fails, distutils now |
| 50185 |
prints out the whole command line (instead of just the command name) if |
| 50186 |
the environment variable DISTUTILS_DEBUG is set. |
| 50187 |
|
| 50188 |
- bpo-4931: distutils should not produce unhelpful "error: None" messages |
| 50189 |
anymore. distutils.util.grok_environment_error is kept but doc-deprecated. |
| 50190 |
|
| 50191 |
- bpo-20875: Prevent possible gzip "'read' is not defined" NameError. Patch |
| 50192 |
by Claudiu Popa. |
| 50193 |
|
| 50194 |
- bpo-11558: ``email.message.Message.attach`` now returns a more useful |
| 50195 |
error message if ``attach`` is called on a message for which |
| 50196 |
``is_multipart`` is False. |
| 50197 |
|
| 50198 |
- bpo-20283: RE pattern methods now accept the string keyword parameters as |
| 50199 |
documented. The pattern and source keyword parameters are left as |
| 50200 |
deprecated aliases. |
| 50201 |
|
| 50202 |
- bpo-20778: Fix modulefinder to work with bytecode-only modules. |
| 50203 |
|
| 50204 |
- bpo-20791: copy.copy() now doesn't make a copy when the input is a bytes |
| 50205 |
object. Initial patch by Peter Otten. |
| 50206 |
|
| 50207 |
- bpo-19748: On AIX, time.mktime() now raises an OverflowError for year |
| 50208 |
outsize range [1902; 2037]. |
| 50209 |
|
| 50210 |
- bpo-19573: inspect.signature: Use enum for parameter kind constants. |
| 50211 |
|
| 50212 |
- bpo-20726: inspect.signature: Make Signature and Parameter picklable. |
| 50213 |
|
| 50214 |
- bpo-17373: Add inspect.Signature.from_callable method. |
| 50215 |
|
| 50216 |
- bpo-20378: Improve repr of inspect.Signature and inspect.Parameter. |
| 50217 |
|
| 50218 |
- bpo-20816: Fix inspect.getcallargs() to raise correct TypeError for |
| 50219 |
missing keyword-only arguments. Patch by Jeremiah Lowin. |
| 50220 |
|
| 50221 |
- bpo-20817: Fix inspect.getcallargs() to fail correctly if more than 3 |
| 50222 |
arguments are missing. Patch by Jeremiah Lowin. |
| 50223 |
|
| 50224 |
- bpo-6676: Ensure a meaningful exception is raised when attempting to parse |
| 50225 |
more than one XML document per pyexpat xmlparser instance. (Original |
| 50226 |
patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with suggested |
| 50227 |
wording by David Gutteridge) |
| 50228 |
|
| 50229 |
- bpo-21117: Fix inspect.signature to better support functools.partial. Due |
| 50230 |
to the specifics of functools.partial implementation, |
| 50231 |
positional-or-keyword arguments passed as keyword arguments become |
| 50232 |
keyword-only. |
| 50233 |
|
| 50234 |
- bpo-20334: inspect.Signature and inspect.Parameter are now hashable. |
| 50235 |
Thanks to Antony Lee for bug reports and suggestions. |
| 50236 |
|
| 50237 |
- bpo-15916: doctest.DocTestSuite returns an empty unittest.TestSuite |
| 50238 |
instead of raising ValueError if it finds no tests |
| 50239 |
|
| 50240 |
- bpo-21209: Fix asyncio.tasks.CoroWrapper to workaround a bug in yield-from |
| 50241 |
implementation in CPythons prior to 3.4.1. |
| 50242 |
|
| 50243 |
- asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream |
| 50244 |
issue #163). |
| 50245 |
|
| 50246 |
- bpo-21311: Avoid exception in _osx_support with non-standard compiler |
| 50247 |
configurations. Patch by John Szakmeister. |
| 50248 |
|
| 50249 |
- bpo-11571: Ensure that the turtle window becomes the topmost window when |
| 50250 |
launched on OS X. |
| 50251 |
|
| 50252 |
- bpo-21801: Validate that __signature__ is None or an instance of |
| 50253 |
Signature. |
| 50254 |
|
| 50255 |
- bpo-21923: Prevent AttributeError in |
| 50256 |
distutils.sysconfig.customize_compiler due to possible uninitialized |
| 50257 |
_config_vars. |
| 50258 |
|
| 50259 |
- bpo-21323: Fix http.server to again handle scripts in CGI subdirectories, |
| 50260 |
broken by the fix for security issue #19435. Patch by Zach Byrne. |
| 50261 |
|
| 50262 |
- bpo-22733: Fix ffi_prep_args not zero-extending argument values correctly |
| 50263 |
on 64-bit Windows. |
| 50264 |
|
| 50265 |
- bpo-23302: Default to TCP_NODELAY=1 upon establishing an HTTPConnection. |
| 50266 |
Removed use of hard-coded MSS as it's an optimization that's no longer |
| 50267 |
needed with Nagle disabled. |
| 50268 |
|
| 50269 |
IDLE |
| 50270 |
---- |
| 50271 |
|
| 50272 |
- bpo-20577: Configuration of the max line length for the FormatParagraph |
| 50273 |
extension has been moved from the General tab of the Idle preferences |
| 50274 |
dialog to the FormatParagraph tab of the Config Extensions dialog. Patch |
| 50275 |
by Tal Einat. |
| 50276 |
|
| 50277 |
- bpo-16893: Update Idle doc chapter to match current Idle and add new |
| 50278 |
information. |
| 50279 |
|
| 50280 |
- bpo-3068: Add Idle extension configuration dialog to Options menu. Changes |
| 50281 |
are written to HOME/.idlerc/config-extensions.cfg. Original patch by Tal |
| 50282 |
Einat. |
| 50283 |
|
| 50284 |
- bpo-16233: A module browser (File : Class Browser, Alt+C) requires an |
| 50285 |
editor window with a filename. When Class Browser is requested otherwise, |
| 50286 |
from a shell, output window, or 'Untitled' editor, Idle no longer displays |
| 50287 |
an error box. It now pops up an Open Module box (Alt+M). If a valid name |
| 50288 |
is entered and a module is opened, a corresponding browser is also opened. |
| 50289 |
|
| 50290 |
- bpo-4832: Save As to type Python files automatically adds .py to the name |
| 50291 |
you enter (even if your system does not display it). Some systems |
| 50292 |
automatically add .txt when type is Text files. |
| 50293 |
|
| 50294 |
- bpo-21986: Code objects are not normally pickled by the pickle module. To |
| 50295 |
match this, they are no longer pickled when running under Idle. |
| 50296 |
|
| 50297 |
- bpo-17390: Adjust Editor window title; remove 'Python', move version to |
| 50298 |
end. |
| 50299 |
|
| 50300 |
- bpo-14105: Idle debugger breakpoints no longer disappear when inserting or |
| 50301 |
deleting lines. |
| 50302 |
|
| 50303 |
- bpo-17172: Turtledemo can now be run from Idle. Currently, the entry is on |
| 50304 |
the Help menu, but it may move to Run. Patch by Ramchandra Apt and Lita |
| 50305 |
Cho. |
| 50306 |
|
| 50307 |
- bpo-21765: Add support for non-ascii identifiers to HyperParser. |
| 50308 |
|
| 50309 |
- bpo-21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav |
| 50310 |
Heblikar. |
| 50311 |
|
| 50312 |
- bpo-18592: Add unittest for SearchDialogBase. Patch by Phil Webster. |
| 50313 |
|
| 50314 |
- bpo-21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar. |
| 50315 |
|
| 50316 |
- bpo-21686: add unittest for HyperParser. Original patch by Saimadhav |
| 50317 |
Heblikar. |
| 50318 |
|
| 50319 |
- bpo-12387: Add missing upper(lower)case versions of default Windows key |
| 50320 |
bindings for Idle so Caps Lock does not disable them. Patch by Roger |
| 50321 |
Serwy. |
| 50322 |
|
| 50323 |
- bpo-21695: Closing a Find-in-files output window while the search is still |
| 50324 |
in progress no longer closes Idle. |
| 50325 |
|
| 50326 |
- bpo-18910: Add unittest for textView. Patch by Phil Webster. |
| 50327 |
|
| 50328 |
- bpo-18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar. |
| 50329 |
|
| 50330 |
- bpo-18409: Add unittest for AutoComplete. Patch by Phil Webster. |
| 50331 |
|
| 50332 |
- bpo-21477: htest.py - Improve framework, complete set of tests. Patches by |
| 50333 |
Saimadhav Heblikar |
| 50334 |
|
| 50335 |
- bpo-18104: Add idlelib/idle_test/htest.py with a few sample tests to begin |
| 50336 |
consolidating and improving human-validated tests of Idle. Change other |
| 50337 |
files as needed to work with htest. Running the module as __main__ runs |
| 50338 |
all tests. |
| 50339 |
|
| 50340 |
- bpo-21139: Change default paragraph width to 72, the :pep:`8` |
| 50341 |
recommendation. |
| 50342 |
|
| 50343 |
- bpo-21284: Paragraph reformat test passes after user changes reformat |
| 50344 |
width. |
| 50345 |
|
| 50346 |
- bpo-17654: Ensure IDLE menus are customized properly on OS X for |
| 50347 |
non-framework builds and for all variants of Tk. |
| 50348 |
|
| 50349 |
- bpo-23180: Rename IDLE "Windows" menu item to "Window". Patch by Al |
| 50350 |
Sweigart. |
| 50351 |
|
| 50352 |
Build |
| 50353 |
----- |
| 50354 |
|
| 50355 |
- bpo-15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the |
| 50356 |
configure script. |
| 50357 |
|
| 50358 |
- bpo-22935: Allow the ssl module to be compiled if openssl doesn't support |
| 50359 |
SSL 3. |
| 50360 |
|
| 50361 |
- bpo-22592: Drop support of the Borland C compiler to build Python. The |
| 50362 |
distutils module still supports it to build extensions. |
| 50363 |
|
| 50364 |
- bpo-22591: Drop support of MS-DOS, especially of the DJGPP compiler |
| 50365 |
(MS-DOS port of GCC). |
| 50366 |
|
| 50367 |
- bpo-16537: Check whether self.extensions is empty in setup.py. Patch by |
| 50368 |
Jonathan Hosmer. |
| 50369 |
|
| 50370 |
- bpo-22359: Remove incorrect uses of recursive make. Patch by Jonas |
| 50371 |
Wagner. |
| 50372 |
|
| 50373 |
- bpo-21958: Define HAVE_ROUND when building with Visual Studio 2013 and |
| 50374 |
above. Patch by Zachary Turner. |
| 50375 |
|
| 50376 |
- bpo-18093: the programs that embed the CPython runtime are now in a |
| 50377 |
separate "Programs" directory, rather than being kept in the Modules |
| 50378 |
directory. |
| 50379 |
|
| 50380 |
- bpo-15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/ |
| 50381 |
now display special message when and only when there are failures. |
| 50382 |
|
| 50383 |
- bpo-21141: The Windows build process no longer attempts to find Perl, |
| 50384 |
instead relying on OpenSSL source being configured and ready to build. |
| 50385 |
The ``PCbuild\build_ssl.py`` script has been re-written and re-named to |
| 50386 |
``PCbuild\prepare_ssl.py``, and takes care of configuring OpenSSL source |
| 50387 |
for both 32 and 64 bit platforms. OpenSSL sources obtained from |
| 50388 |
svn.python.org will always be pre-configured and ready to build. |
| 50389 |
|
| 50390 |
- bpo-21037: Add a build option to enable AddressSanitizer support. |
| 50391 |
|
| 50392 |
- bpo-19962: The Windows build process now creates "python.bat" in the root |
| 50393 |
of the source tree, which passes all arguments through to the most |
| 50394 |
recently built interpreter. |
| 50395 |
|
| 50396 |
- bpo-21285: Refactor and fix curses configure check to always search in a |
| 50397 |
ncursesw directory. |
| 50398 |
|
| 50399 |
- bpo-15234: For BerkeleyDB and Sqlite, only add the found library and |
| 50400 |
include directories if they aren't already being searched. This avoids an |
| 50401 |
explicit runtime library dependency. |
| 50402 |
|
| 50403 |
- bpo-17861: Tools/scripts/generate_opcode_h.py automatically regenerates |
| 50404 |
Include/opcode.h from Lib/opcode.py if the latter gets any change. |
| 50405 |
|
| 50406 |
- bpo-20644: OS X installer build support for documentation build changes in |
| 50407 |
3.4.1: assume externally supplied sphinx-build is available in /usr/bin. |
| 50408 |
|
| 50409 |
- bpo-20022: Eliminate use of deprecated bundlebuilder in OS X builds. |
| 50410 |
|
| 50411 |
- bpo-15968: Incorporated Tcl, Tk, and Tix builds into the Windows build |
| 50412 |
solution. |
| 50413 |
|
| 50414 |
- bpo-17095: Fix Modules/Setup *shared* support. |
| 50415 |
|
| 50416 |
- bpo-21811: Anticipated fixes to support OS X versions > 10.9. |
| 50417 |
|
| 50418 |
- bpo-21166: Prevent possible segfaults and other random failures of python |
| 50419 |
--generate-posix-vars in pybuilddir.txt build target. |
| 50420 |
|
| 50421 |
- bpo-18096: Fix library order returned by python-config. |
| 50422 |
|
| 50423 |
- bpo-17219: Add library build dir for Python extension cross-builds. |
| 50424 |
|
| 50425 |
- bpo-22919: Windows build updated to support VC 14.0 (Visual Studio 2015), |
| 50426 |
which will be used for the official release. |
| 50427 |
|
| 50428 |
- bpo-21236: Build _msi.pyd with cabinet.lib instead of fci.lib |
| 50429 |
|
| 50430 |
- bpo-17128: Use private version of OpenSSL for OS X 10.5+ installer. |
| 50431 |
|
| 50432 |
C API |
| 50433 |
----- |
| 50434 |
|
| 50435 |
- bpo-14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo(), |
| 50436 |
bytearray_getbuffer(), bytesiobuf_getbuffer() and array_buffer_getbuf(). |
| 50437 |
All functions now raise BufferError in that case. |
| 50438 |
|
| 50439 |
- bpo-22445: PyBuffer_IsContiguous() now implements precise contiguity |
| 50440 |
tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation |
| 50441 |
flag. Previously the function reported false negatives for corner cases. |
| 50442 |
|
| 50443 |
- bpo-22079: PyType_Ready() now checks that statically allocated type has no |
| 50444 |
dynamically allocated bases. |
| 50445 |
|
| 50446 |
- bpo-22453: Removed non-documented macro PyObject_REPR(). |
| 50447 |
|
| 50448 |
- bpo-18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, |
| 50449 |
rename ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document |
| 50450 |
these functions. |
| 50451 |
|
| 50452 |
- bpo-21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(), |
| 50453 |
PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) is now using |
| 50454 |
``calloc()`` instead of ``malloc()`` for large objects which is faster and |
| 50455 |
use less memory. |
| 50456 |
|
| 50457 |
- bpo-20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to |
| 50458 |
match what importlib does; this affects _frozen_importlib as well as any |
| 50459 |
module loaded using imp.init_frozen(). |
| 50460 |
|
| 50461 |
Documentation |
| 50462 |
------------- |
| 50463 |
|
| 50464 |
- bpo-19548: Update the codecs module documentation to better cover the |
| 50465 |
distinction between text encodings and other codecs, together with other |
| 50466 |
clarifications. Patch by Martin Panter. |
| 50467 |
|
| 50468 |
- bpo-22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to |
| 50469 |
create a venv for generating the documentation, e.g., ``make html |
| 50470 |
PYTHON=venv/bin/python3``. |
| 50471 |
|
| 50472 |
- bpo-21514: The documentation of the json module now refers to new JSON RFC |
| 50473 |
7159 instead of obsoleted RFC 4627. |
| 50474 |
|
| 50475 |
- bpo-21777: The binary sequence methods on bytes and bytearray are now |
| 50476 |
documented explicitly, rather than assuming users will be able to derive |
| 50477 |
the expected behaviour from the behaviour of the corresponding str |
| 50478 |
methods. |
| 50479 |
|
| 50480 |
- bpo-6916: undocument deprecated asynchat.fifo class. |
| 50481 |
|
| 50482 |
- bpo-17386: Expanded functionality of the ``Doc/make.bat`` script to make |
| 50483 |
it much more comparable to ``Doc/Makefile``. |
| 50484 |
|
| 50485 |
- bpo-21312: Update the thread_foobar.h template file to include newer |
| 50486 |
threading APIs. Patch by Jack McCracken. |
| 50487 |
|
| 50488 |
- bpo-21043: Remove the recommendation for specific CA organizations and to |
| 50489 |
mention the ability to load the OS certificates. |
| 50490 |
|
| 50491 |
- bpo-20765: Add missing documentation for PurePath.with_name() and |
| 50492 |
PurePath.with_suffix(). |
| 50493 |
|
| 50494 |
- bpo-19407: New package installation and distribution guides based on the |
| 50495 |
Python Packaging Authority tools. Existing guides have been retained as |
| 50496 |
legacy links from the distutils docs, as they still contain some required |
| 50497 |
reference material for tool developers that isn't recorded anywhere else. |
| 50498 |
|
| 50499 |
- bpo-19697: Document cases where __main__.__spec__ is None. |
| 50500 |
|
| 50501 |
Tests |
| 50502 |
----- |
| 50503 |
|
| 50504 |
- bpo-18982: Add tests for CLI of the calendar module. |
| 50505 |
|
| 50506 |
- bpo-19548: Added some additional checks to test_codecs to ensure that |
| 50507 |
statements in the updated documentation remain accurate. Patch by Martin |
| 50508 |
Panter. |
| 50509 |
|
| 50510 |
- bpo-22838: All test_re tests now work with unittest test discovery. |
| 50511 |
|
| 50512 |
- bpo-22173: Update lib2to3 tests to use unittest test discovery. |
| 50513 |
|
| 50514 |
- bpo-16000: Convert test_curses to use unittest. |
| 50515 |
|
| 50516 |
- bpo-21456: Skip two tests in test_urllib2net.py if _ssl module not |
| 50517 |
present. Patch by Remi Pointel. |
| 50518 |
|
| 50519 |
- bpo-20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier de |
| 50520 |
Gaye. |
| 50521 |
|
| 50522 |
- bpo-22060: test_ctypes has been somewhat cleaned up and simplified; it now |
| 50523 |
uses unittest test discovery to find its tests. |
| 50524 |
|
| 50525 |
- bpo-22104: regrtest.py no longer holds a reference to the suite of tests |
| 50526 |
loaded from test modules that don't define test_main(). |
| 50527 |
|
| 50528 |
- bpo-22111: Assorted cleanups in test_imaplib. Patch by Milan Oberkirch. |
| 50529 |
|
| 50530 |
- bpo-22002: Added ``load_package_tests`` function to test.support and used |
| 50531 |
it to implement/augment test discovery in test_asyncio, test_email, |
| 50532 |
test_importlib, test_json, and test_tools. |
| 50533 |
|
| 50534 |
- bpo-21976: Fix test_ssl to accept LibreSSL version strings. Thanks to |
| 50535 |
William Orr. |
| 50536 |
|
| 50537 |
- bpo-21918: Converted test_tools from a module to a package containing |
| 50538 |
separate test files for each tested script. |
| 50539 |
|
| 50540 |
- bpo-9554: Use modern unittest features in test_argparse. Initial patch by |
| 50541 |
Denver Coneybeare and Radu Voicilas. |
| 50542 |
|
| 50543 |
- bpo-20155: Changed HTTP method names in failing tests in test_httpservers |
| 50544 |
so that packet filtering software (specifically Windows Base Filtering |
| 50545 |
Engine) does not interfere with the transaction semantics expected by the |
| 50546 |
tests. |
| 50547 |
|
| 50548 |
- bpo-19493: Refactored the ctypes test package to skip tests explicitly |
| 50549 |
rather than silently. |
| 50550 |
|
| 50551 |
- bpo-18492: All resources are now allowed when tests are not run by |
| 50552 |
regrtest.py. |
| 50553 |
|
| 50554 |
- bpo-21634: Fix pystone micro-benchmark: use floor division instead of true |
| 50555 |
division to benchmark integers instead of floating-point numbers. Set |
| 50556 |
pystone version to 1.2. Patch written by Lennart Regebro. |
| 50557 |
|
| 50558 |
- bpo-21605: Added tests for Tkinter images. |
| 50559 |
|
| 50560 |
- bpo-21493: Added test for ntpath.expanduser(). Original patch by Claudiu |
| 50561 |
Popa. |
| 50562 |
|
| 50563 |
- bpo-19925: Added tests for the spwd module. Original patch by Vajrasky |
| 50564 |
Kok. |
| 50565 |
|
| 50566 |
- bpo-21522: Added Tkinter tests for Listbox.itemconfigure(), |
| 50567 |
PanedWindow.paneconfigure(), and Menu.entryconfigure(). |
| 50568 |
|
| 50569 |
- bpo-17756: Fix test_code test when run from the installed location. |
| 50570 |
|
| 50571 |
- bpo-17752: Fix distutils tests when run from the installed location. |
| 50572 |
|
| 50573 |
- bpo-18604: Consolidated checks for GUI availability. All platforms now at |
| 50574 |
least check whether Tk can be instantiated when the GUI resource is |
| 50575 |
requested. |
| 50576 |
|
| 50577 |
- bpo-21275: Fix a socket test on KFreeBSD. |
| 50578 |
|
| 50579 |
- bpo-21223: Pass test_site/test_startup_imports when some of the extensions |
| 50580 |
are built as builtins. |
| 50581 |
|
| 50582 |
- bpo-20635: Added tests for Tk geometry managers. |
| 50583 |
|
| 50584 |
- Add test case for freeze. |
| 50585 |
|
| 50586 |
- bpo-20743: Fix a reference leak in test_tcl. |
| 50587 |
|
| 50588 |
- bpo-21097: Move test_namespace_pkgs into test_importlib. |
| 50589 |
|
| 50590 |
- bpo-21503: Use test_both() consistently in test_importlib. |
| 50591 |
|
| 50592 |
- bpo-20939: Avoid various network test failures due to new redirect of |
| 50593 |
http://www.python.org/ to https://www.python.org: use |
| 50594 |
http://www.example.com instead. |
| 50595 |
|
| 50596 |
- bpo-20668: asyncio tests no longer rely on tests.txt file. (Patch by |
| 50597 |
Vajrasky Kok) |
| 50598 |
|
| 50599 |
- bpo-21093: Prevent failures of ctypes test_macholib on OS X if a copy of |
| 50600 |
libz exists in $HOME/lib or /usr/local/lib. |
| 50601 |
|
| 50602 |
- bpo-22770: Prevent some Tk segfaults on OS X when running gui tests. |
| 50603 |
|
| 50604 |
- bpo-23211: Workaround test_logging failure on some OS X 10.6 systems. |
| 50605 |
|
| 50606 |
- bpo-23345: Prevent test_ssl failures with large OpenSSL patch level values |
| 50607 |
(like 0.9.8zc). |
| 50608 |
|
| 50609 |
Tools/Demos |
| 50610 |
----------- |
| 50611 |
|
| 50612 |
- bpo-22314: pydoc now works when the LINES environment variable is set. |
| 50613 |
|
| 50614 |
- bpo-22615: Argument Clinic now supports the "type" argument for the int |
| 50615 |
converter. This permits using the int converter with enums and typedefs. |
| 50616 |
|
| 50617 |
- bpo-20076: The makelocalealias.py script no longer ignores UTF-8 mapping. |
| 50618 |
|
| 50619 |
- bpo-20079: The makelocalealias.py script now can parse the SUPPORTED file |
| 50620 |
from glibc sources and supports command line options for source paths. |
| 50621 |
|
| 50622 |
- bpo-22201: Command-line interface of the zipfile module now correctly |
| 50623 |
extracts ZIP files with directory entries. Patch by Ryan Wilson. |
| 50624 |
|
| 50625 |
- bpo-22120: For functions using an unsigned integer return converter, |
| 50626 |
Argument Clinic now generates a cast to that type for the comparison to -1 |
| 50627 |
in the generated code. (This suppresses a compilation warning.) |
| 50628 |
|
| 50629 |
- bpo-18974: Tools/scripts/diff.py now uses argparse instead of optparse. |
| 50630 |
|
| 50631 |
- bpo-21906: Make Tools/scripts/md5sum.py work in Python 3. Patch by Zachary |
| 50632 |
Ware. |
| 50633 |
|
| 50634 |
- bpo-21629: Fix Argument Clinic's "--converters" feature. |
| 50635 |
|
| 50636 |
- Add support for ``yield from`` to 2to3. |
| 50637 |
|
| 50638 |
- Add support for the :pep:`465` matrix multiplication operator to 2to3. |
| 50639 |
|
| 50640 |
- bpo-16047: Fix module exception list and __file__ handling in freeze. |
| 50641 |
Patch by Meador Inge. |
| 50642 |
|
| 50643 |
- bpo-11824: Consider ABI tags in freeze. Patch by Meador Inge. |
| 50644 |
|
| 50645 |
- bpo-20535: PYTHONWARNING no longer affects the run_tests.py script. Patch |
| 50646 |
by Arfrever Frehtes Taifersar Arahesis. |
| 50647 |
|
| 50648 |
Windows |
| 50649 |
------- |
| 50650 |
|
| 50651 |
- bpo-23260: Update Windows installer |
| 50652 |
|
| 50653 |
- The bundled version of Tcl/Tk has been updated to 8.6.3. The most visible |
| 50654 |
result of this change is the addition of new native file dialogs when |
| 50655 |
running on Windows Vista or newer. See Tcl/Tk's TIP 432 for more |
| 50656 |
information. Also, this version of Tcl/Tk includes support for Windows |
| 50657 |
10. |
| 50658 |
|
| 50659 |
- bpo-17896: The Windows build scripts now expect external library sources |
| 50660 |
to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``. |
| 50661 |
|
| 50662 |
- bpo-17717: The Windows build scripts now use a copy of NASM pulled from |
| 50663 |
svn.python.org to build OpenSSL. |
| 50664 |
|
| 50665 |
- bpo-21907: Improved the batch scripts provided for building Python. |
| 50666 |
|
| 50667 |
- bpo-22644: The bundled version of OpenSSL has been updated to 1.0.1j. |
| 50668 |
|
| 50669 |
- bpo-10747: Use versioned labels in the Windows start menu. Patch by Olive |
| 50670 |
Kilburn. |
| 50671 |
|
| 50672 |
- bpo-22980: .pyd files with a version and platform tag (for example, |
| 50673 |
".cp35-win32.pyd") will now be loaded in preference to those without tags. |
| 50674 |
|
| 50675 |
|
| 50676 |
**(For information about older versions, consult the HISTORY file.)** |