Back to Cpython

3.14.0a3

Misc/NEWS.d/3.14.0a3.rst

3.15.0a825.3 KB
Original Source

.. date: 2024-11-28-15-55-48 .. gh-issue: 127353 .. nonce: i-XOXg .. release date: 2024-12-17 .. section: Windows

Allow to force color output on Windows using environment variables. Patch by Andrey Efremov.

..

.. date: 2024-10-31-09-46-53 .. gh-issue: 125729 .. nonce: KdKVLa .. section: Windows

Makes the presence of the :mod:turtle module dependent on the Tcl/Tk installer option. Previously, the module was always installed but would be unusable without Tcl/Tk.

..

.. date: 2024-11-16-20-47-20 .. gh-issue: 126700 .. nonce: ayrHv4 .. section: Tools/Demos

Add support for multi-argument :mod:gettext functions in :program:pygettext.py.

..

.. date: 2024-12-13-13-41-34 .. gh-issue: 127906 .. nonce: NuRHlB .. section: Tests

Test the limited C API in test_cppext. Patch by Victor Stinner.

..

.. date: 2024-12-09-12-35-44 .. gh-issue: 127637 .. nonce: KLx-9I .. section: Tests

Add tests for the :mod:dis command-line interface. Patch by Bénédikt Tran.

..

.. date: 2024-12-04-15-03-24 .. gh-issue: 126925 .. nonce: uxAMK- .. section: Tests

iOS test results are now streamed during test execution, and the deprecated xcresulttool is no longer used.

..

.. date: 2024-11-21-02-03-48 .. gh-issue: 127076 .. nonce: a3avV1 .. section: Tests

Disable strace based system call tests when LD_PRELOAD is set.

..

.. date: 2024-11-20-18-49-01 .. gh-issue: 127076 .. nonce: DHnXxo .. section: Tests

Filter out memory-related mmap, munmap, and mprotect calls from file-related ones when testing :mod:io behavior using strace.

..

.. date: 2024-12-05-21-35-19 .. gh-issue: 127655 .. nonce: xpPoOf .. section: Security

Fixed the :class:!asyncio.selector_events._SelectorSocketTransport transport not pausing writes for the protocol when the buffer reaches the high water mark when using :meth:asyncio.WriteTransport.writelines.

..

.. date: 2024-12-13-22-20-54 .. gh-issue: 126907 .. nonce: fWRL_R .. section: Library

Fix crash when using :mod:atexit concurrently on the :term:free-threaded <free threading> build.

..

.. date: 2024-12-12-16-59-42 .. gh-issue: 127870 .. nonce: _NFG-3 .. section: Library

Detect recursive calls in ctypes _as_parameter_ handling. Patch by Victor Stinner.

..

.. date: 2024-12-08-08-36-18 .. gh-issue: 127732 .. nonce: UEKxoa .. section: Library

The :mod:platform module now correctly detects Windows Server 2025.

..

.. date: 2024-12-07-23-06-44 .. gh-issue: 126789 .. nonce: 4dqfV1 .. section: Library

Fixed :func:sysconfig.get_config_vars, :func:sysconfig.get_paths, and siblings, returning outdated cached data if the value of :data:sys.prefix or :data:sys.exec_prefix changes. Overwriting :data:sys.prefix or :data:sys.exec_prefix still is discouraged, as that might break other parts of the code.

..

.. date: 2024-12-07-15-28-31 .. gh-issue: 127718 .. nonce: 9dpLfi .. section: Library

Add colour to :mod:test.regrtest output. Patch by Hugo van Kemenade.

..

.. date: 2024-12-06-17-28-55 .. gh-issue: 127610 .. nonce: ctv_NP .. section: Library

Added validation for more than one var-positional or var-keyword parameters in :class:inspect.Signature. Patch by Maxim Ageev.

..

.. date: 2024-12-05-10-14-52 .. gh-issue: 127627 .. nonce: fgCHOZ .. section: Library

Added posix._emscripten_debugger() to help with debugging the test suite on the Emscripten target.

..

.. date: 2024-12-04-15-04-12 .. gh-issue: 126821 .. nonce: lKCLVV .. section: Library

macOS and iOS apps can now choose to redirect stdout and stderr to the system log during interpreter configuration.

..

.. date: 2024-12-04-11-01-16 .. gh-issue: 93312 .. nonce: 9sB-Qw .. section: Library

Include <sys/pidfd.h> to get os.PIDFD_NONBLOCK constant. Patch by Victor Stinner.

..

.. date: 2024-12-01-23-18-43 .. gh-issue: 127481 .. nonce: K36AoP .. section: Library

Add the EPOLLWAKEUP constant to the :mod:select module.

..

.. date: 2024-12-01-22-28-41 .. gh-issue: 127065 .. nonce: tFpRer .. section: Library

Make :func:operator.methodcaller thread-safe and re-entrant safe.

..

.. date: 2024-11-30-21-46-15 .. gh-issue: 127321 .. nonce: M78fBv .. section: Library

:func:pdb.set_trace will not stop at an opcode that does not have an associated line number anymore.

..

.. date: 2024-11-29-23-02-43 .. gh-issue: 127429 .. nonce: dQf2w4 .. section: Library

Fixed bug where, on cross-builds, the :mod:sysconfig POSIX data was being generated with the host Python's Makefile. The data is now generated from current build's Makefile.

..

.. date: 2024-11-29-14-45-26 .. gh-issue: 127413 .. nonce: z11AUc .. section: Library

Add the :option:dis --specialized command-line option to show specialized bytecode. Patch by Bénédikt Tran.

..

.. date: 2024-11-29-00-15-59 .. gh-issue: 125413 .. nonce: WCN0vv .. section: Library

Revert addition of :meth:!pathlib.Path.scandir. This method was added in 3.14.0a2. The optimizations remain for file system paths, but other subclasses should only have to implement :meth:pathlib.Path.iterdir.

..

.. date: 2024-11-28-14-14-46 .. gh-issue: 127257 .. nonce: n6-jU9 .. section: Library

In :mod:ssl, system call failures that OpenSSL reports using ERR_LIB_SYS are now raised as :exc:OSError.

..

.. date: 2024-11-27-17-04-38 .. gh-issue: 59705 .. nonce: sAGyvs .. section: Library

On Linux, :class:threading.Thread now sets the thread name to the operating system. Patch by Victor Stinner.

..

.. date: 2024-11-27-16-06-10 .. gh-issue: 127303 .. nonce: asqkgh .. section: Library

Publicly expose :data:~token.EXACT_TOKEN_TYPES in :attr:!token.__all__.

..

.. date: 2024-11-27-14-23-02 .. gh-issue: 127331 .. nonce: 9sNEC9 .. section: Library

:mod:ssl can show descriptions for errors added in OpenSSL 3.4.

..

.. date: 2024-11-27-14-06-35 .. gh-issue: 123967 .. nonce: wxUmnW .. section: Library

Fix faulthandler for trampoline frames. If the top-most frame is a trampoline frame, skip it. Patch by Victor Stinner.

..

.. date: 2024-11-26-17-42-00 .. gh-issue: 127178 .. nonce: U8hxjc .. section: Library

A _sysconfig_vars_(...).json file is now shipped in the standard library directory. It contains the output of :func:sysconfig.get_config_vars on the default environment encoded as JSON data. This is an implementation detail, and may change at any time.

..

.. date: 2024-11-25-19-04-10 .. gh-issue: 127072 .. nonce: -c284K .. section: Library

Remove outdated socket.NETLINK_* constants not present in Linux kernels beyond 2.6.17.

..

.. date: 2024-11-25-15-02-44 .. gh-issue: 127255 .. nonce: UXeljc .. section: Library

The :func:~ctypes.CopyComPointer function is now public. Previously, this was private and only available in _ctypes.

..

.. date: 2024-11-24-14-20-17 .. gh-issue: 127182 .. nonce: WmfY2g .. section: Library

Fix :meth:!io.StringIO.__setstate__ crash, when :const:None was passed as the first value.

..

.. date: 2024-11-24-12-41-31 .. gh-issue: 127217 .. nonce: UAXGFr .. section: Library

Fix :func:urllib.request.pathname2url for paths starting with multiple slashes on Posix.

..

.. date: 2024-11-23-12-25-06 .. gh-issue: 125866 .. nonce: wEOP66 .. section: Library

:func:urllib.request.pathname2url now adds an empty authority when generating a URL for a path that begins with exactly one slash. For example, the path /etc/hosts is converted to the scheme-less URL ///etc/hosts. As a result of this change, URLs without authorities are only generated for relative paths.

..

.. date: 2024-11-23-00-17-29 .. gh-issue: 127221 .. nonce: OSXdFE .. section: Library

Add colour to :mod:unittest output. Patch by Hugo van Kemenade.

..

.. date: 2024-11-22-10-42-34 .. gh-issue: 127035 .. nonce: UnbDlr .. section: Library

Fix :mod:shutil.which on Windows. Now it looks at direct match if and only if the command ends with a PATHEXT extension or X_OK is not in mode. Support extensionless files if "." is in PATHEXT. Support PATHEXT extensions that end with a dot.

..

.. date: 2024-11-22-09-23-41 .. gh-issue: 122273 .. nonce: H8M6fd .. section: Library

Support PyREPL history on Windows. Patch by devdanzin and Victor Stinner.

..

.. date: 2024-11-22-04-49-31 .. gh-issue: 125866 .. nonce: TUtvPK .. section: Library

:func:urllib.request.pathname2url and :func:~urllib.request.url2pathname no longer convert Windows drive letters to uppercase.

..

.. date: 2024-11-22-03-40-02 .. gh-issue: 127078 .. nonce: gI_PaP .. section: Library

Fix issue where :func:urllib.request.url2pathname failed to discard an extra slash before a UNC drive in the URL path on Windows.

..

.. date: 2024-11-22-02-31-55 .. gh-issue: 126766 .. nonce: jfkhBH .. section: Library

Fix issue where :func:urllib.request.url2pathname failed to discard any 'localhost' authority present in the URL.

..

.. date: 2024-11-21-16-23-16 .. gh-issue: 127065 .. nonce: cfL1zd .. section: Library

Fix crash when calling a :func:operator.methodcaller instance from multiple threads in the free threading build.

..

.. date: 2024-11-21-06-03-46 .. gh-issue: 127090 .. nonce: yUYwdh .. section: Library

Fix value of :attr:urllib.response.addinfourl.url for file: URLs that express relative paths and absolute Windows paths. The canonical URL generated by :func:urllib.request.pathname2url is now used.

..

.. date: 2024-11-20-21-20-56 .. gh-issue: 126992 .. nonce: RbU0FZ .. section: Library

Fix LONG and INT opcodes to only use base 10 for string to integer conversion in :mod:pickle.

..

.. date: 2024-11-20-16-58-59 .. gh-issue: 126997 .. nonce: 0PI41Y .. section: Library

Fix support of STRING and GLOBAL opcodes with non-ASCII arguments in :mod:pickletools. :func:pickletools.dis now outputs non-ASCII bytes in STRING, BINSTRING and SHORT_BINSTRING arguments as escaped (\xXX).

..

.. date: 2024-11-20-11-37-08 .. gh-issue: 126316 .. nonce: ElkZmE .. section: Library

:mod:grp: Make :func:grp.getgrall thread-safe by adding a mutex. Patch by Victor Stinner.

..

.. date: 2024-11-20-08-54-11 .. gh-issue: 126618 .. nonce: ef_53g .. section: Library

Fix the representation of :class:itertools.count objects when the count value is :data:sys.maxsize.

..

.. date: 2024-11-19-14-34-05 .. gh-issue: 126615 .. nonce: LOskwi .. section: Library

The :exc:~ctypes.COMError exception is now public. Previously, this was private and only available in _ctypes.

..

.. date: 2024-11-18-23-42-06 .. gh-issue: 126985 .. nonce: 7XplY9 .. section: Library

When running under a virtual environment with the :mod:site disabled (see :option:-S), :data:sys.prefix and :data:sys.base_prefix will now point to the virtual environment, instead of the base installation.

..

.. date: 2024-11-18-23-18-27 .. gh-issue: 112192 .. nonce: DRdRgP .. section: Library

In the :mod:trace module, increase the coverage precision (cov%) to one decimal.

..

.. date: 2024-11-18-22-02-47 .. gh-issue: 118761 .. nonce: GQKD_J .. section: Library

Improve import time of :mod:mimetypes by around 11-16 times. Patch by Hugo van Kemenade.

..

.. date: 2024-11-18-19-03-46 .. gh-issue: 126947 .. nonce: NiDYUe .. section: Library

Raise :exc:TypeError in :meth:!_pydatetime.timedelta.__new__ if the passed arguments are not :class:int or :class:float, so that the Python implementation is in line with the C implementation.

..

.. date: 2024-11-18-16-43-11 .. gh-issue: 126946 .. nonce: 52Ou-B .. section: Library

Improve the :exc:~getopt.GetoptError error message when a long option prefix matches multiple accepted options in :func:getopt.getopt and :func:getopt.gnu_getopt.

..

.. date: 2024-11-16-10-52-48 .. gh-issue: 126899 .. nonce: GFnfBt .. section: Library

Make tkinter widget methods :meth:!after and :meth:!after_idle accept arguments passed by keyword.

..

.. date: 2024-11-15-01-50-36 .. gh-issue: 85168 .. nonce: bP8VIN .. section: Library

Fix issue where :func:urllib.request.url2pathname and :func:~urllib.request.pathname2url always used UTF-8 when quoting and unquoting file URIs. They now use the :term:filesystem encoding and error handler.

..

.. date: 2024-11-13-19-15-18 .. gh-issue: 126780 .. nonce: ZZqJvI .. section: Library

Fix :func:os.path.normpath for drive-relative paths on Windows.

..

.. date: 2024-11-13-10-44-25 .. gh-issue: 126775 .. nonce: a3ubjh .. section: Library

Make :func:linecache.checkcache thread safe and GC re-entrancy safe.

..

.. date: 2024-11-12-20-05-09 .. gh-issue: 126601 .. nonce: Nj7bA9 .. section: Library

Fix issue where :func:urllib.request.pathname2url raised :exc:OSError when given a Windows path containing a colon character not following a drive letter, such as before an NTFS alternate data stream.

..

.. date: 2024-11-12-13-14-47 .. gh-issue: 126727 .. nonce: 5Eqfqd .. section: Library

locale.nl_langinfo(locale.ERA) now returns multiple era description segments separated by semicolons. Previously it only returned the first segment on platforms with Glibc.

..

.. date: 2024-11-04-22-02-30 .. gh-issue: 85046 .. nonce: Y5d_ZN .. section: Library

Add :data:~errno.EHWPOISON error code to :mod:errno.

..

.. date: 2024-10-28-19-49-18 .. gh-issue: 118201 .. nonce: v41XXh .. section: Library

Fixed intermittent failures of :any:os.confstr, :any:os.pathconf and :any:os.sysconf on iOS and Android.

..

.. date: 2024-10-23-20-05-54 .. gh-issue: 86463 .. nonce: jvFTI_ .. section: Library

The usage parameter of :class:argparse.ArgumentParser no longer affects the default value of the prog parameter in subparsers.

..

.. date: 2024-09-13-18-24-27 .. gh-issue: 124008 .. nonce: XaiPQx .. section: Library

Fix possible crash (in debug build), incorrect output or returning incorrect value from raw binary write() when writing to console on Windows.

..

.. date: 2024-08-27-18-58-01 .. gh-issue: 123401 .. nonce: t4-FpI .. section: Library

The :mod:http.cookies module now supports parsing obsolete :rfc:850 date formats, in accordance with :rfc:9110 requirements. Patch by Nano Zheng.

..

.. date: 2024-07-30-11-37-40 .. gh-issue: 122431 .. nonce: lAzVtu .. section: Library

:func:readline.append_history_file now raises a :exc:ValueError when given a negative value.

..

.. date: 2024-07-29-15-20-30 .. gh-issue: 122356 .. nonce: wKCmFx .. section: Library

Guarantee that the position of a file-like object passed to :func:zipfile.is_zipfile is left untouched after the call. Patch by Bénédikt Tran.

..

.. date: 2024-07-25-18-06-51 .. gh-issue: 122288 .. nonce: -_xxOR .. section: Library

Improve the performances of :func:fnmatch.translate by a factor 1.7. Patch by Bénédikt Tran.

..

.. date: 2023-02-15-23-54-42 .. gh-issue: 88110 .. nonce: KU6erv .. section: Library

Fixed :class:multiprocessing.Process reporting a .exitcode of 1 even on success when using the "fork" start method while using a :class:concurrent.futures.ThreadPoolExecutor.

..

.. date: 2022-11-10-17-16-45 .. gh-issue: 97514 .. nonce: kzA0zl .. section: Library

Authentication was added to the :mod:multiprocessing forkserver start method control socket so that only processes with the authentication key generated by the process that spawned the forkserver can control it. This is an enhancement over the other :gh:97514 fixes so that access is no longer limited only by filesystem permissions.

The file descriptor exchange of control pipes with the forked worker process now requires an explicit acknowledgement byte to be sent over the socket after the exchange on all forkserver supporting platforms. That makes testing the above much easier.

..

.. date: 2024-11-27-22-56-48 .. gh-issue: 127347 .. nonce: xyddWS .. section: Documentation

Publicly expose :func:traceback.print_list in :attr:!traceback.__all__.

..

.. date: 2024-12-10-21-08-05 .. gh-issue: 127740 .. nonce: 0tWC9h .. section: Core and Builtins

Fix error message in :func:bytes.fromhex when given an odd number of digits to properly indicate that an even number of hexadecimal digits is required.

..

.. date: 2024-12-09-11-29-10 .. gh-issue: 127058 .. nonce: pqtBcZ .. section: Core and Builtins

PySequence_Tuple now creates the resulting tuple atomically, preventing partially created tuples being visible to the garbage collector or through gc.get_referrers()

..

.. date: 2024-12-07-13-06-09 .. gh-issue: 127599 .. nonce: tXCZb_ .. section: Core and Builtins

Fix statistics for increments of object reference counts (in particular, when a reference count was increased by more than 1 in a single operation).

..

.. date: 2024-12-06-01-09-40 .. gh-issue: 127651 .. nonce: 80cm6j .. section: Core and Builtins

When raising :exc:ImportError for missing symbols in from imports, use __file__ in the error message if __spec__.origin is not a location

..

.. date: 2024-12-05-19-25-00 .. gh-issue: 127582 .. nonce: ogUY2a .. section: Core and Builtins

Fix non-thread-safe object resurrection when calling finalizers and watcher callbacks in the free threading build.

..

.. date: 2024-12-04-09-52-08 .. gh-issue: 127434 .. nonce: RjkGT_ .. section: Core and Builtins

The iOS compiler shims can now accept arguments with spaces.

..

.. date: 2024-12-03-21-07-06 .. gh-issue: 127536 .. nonce: 3jMMrT .. section: Core and Builtins

Add missing locks around some list assignment operations in the free threading build.

..

.. date: 2024-11-30-23-35-45 .. gh-issue: 127085 .. nonce: KLKylb .. section: Core and Builtins

Fix race when exporting a buffer from a :class:memoryview object on the :term:free-threaded <free threading> build.

..

.. date: 2024-11-25-05-15-21 .. gh-issue: 127238 .. nonce: O8wkH- .. section: Core and Builtins

Correct error message for :func:sys.set_int_max_str_digits.

..

.. date: 2024-11-24-07-01-28 .. gh-issue: 113841 .. nonce: WFg-Bu .. section: Core and Builtins

Fix possible undefined behavior division by zero in :class:complex's :c:func:_Py_c_pow.

..

.. date: 2024-11-23-04-54-42 .. gh-issue: 127133 .. nonce: WMoJjF .. section: Library

Calling :meth:argparse.ArgumentParser.add_argument_group on an argument group, and calling :meth:argparse.ArgumentParser.add_argument_group or :meth:argparse.ArgumentParser.add_mutually_exclusive_group on a mutually exclusive group now raise exceptions. This nesting was never supported, often failed to work correctly, and was unintentionally exposed through inheritance. This functionality has been deprecated since Python 3.11.

..

.. date: 2024-11-21-16-13-52 .. gh-issue: 126491 .. nonce: 0YvL94 .. section: Core and Builtins

Add a marking phase to the GC. All objects that can be transitively reached from builtin modules or the stacks are marked as reachable before cycle detection. This reduces the amount of work done by the GC by approximately half.

..

.. date: 2024-11-19-21-49-58 .. gh-issue: 127020 .. nonce: 5vvI17 .. section: Core and Builtins

Fix a crash in the free threading build when :c:func:PyCode_GetCode, :c:func:PyCode_GetVarnames, :c:func:PyCode_GetCellvars, or :c:func:PyCode_GetFreevars were called from multiple threads at the same time.

..

.. date: 2024-11-19-17-17-32 .. gh-issue: 127010 .. nonce: 9Cl4bb .. section: Core and Builtins

Simplify GC tracking of dictionaries. All dictionaries are tracked when created, rather than being lazily tracked when a trackable object was added to them. This simplifies the code considerably and results in a slight speedup.

..

.. date: 2024-11-18-23-18-17 .. gh-issue: 126980 .. nonce: r8QHdi .. section: Core and Builtins

Fix :meth:~object.__buffer__ of :class:bytearray crashing when :attr:~inspect.BufferFlags.READ or :attr:~inspect.BufferFlags.WRITE are passed as flags.

..

.. date: 2024-11-17-21-35-55 .. gh-issue: 126937 .. nonce: qluVM0 .. section: Core and Builtins

Fix :exc:TypeError when a :class:ctypes.Structure has a field size that doesn't fit into an unsigned 16-bit integer. Instead, the maximum number of bits is :data:sys.maxsize.

..

.. date: 2024-11-16-22-37-46 .. gh-issue: 126868 .. nonce: yOoHSY .. section: Core and Builtins

Increase performance of :class:int by adding a freelist for compact ints.

..

.. date: 2024-11-16-11-11-35 .. gh-issue: 126881 .. nonce: ijofLZ .. section: Core and Builtins

Fix crash in finalization of dtoa state. Patch by Kumar Aditya.

..

.. date: 2024-11-15-16-39-37 .. gh-issue: 126892 .. nonce: QR6Yo3 .. section: Core and Builtins

Require cold or invalidated code to "warm up" before being JIT compiled again.

..

.. date: 2024-11-07-21-48-23 .. gh-issue: 126091 .. nonce: ETaRGE .. section: Core and Builtins

Ensure stack traces are complete when throwing into a generator chain that ends in a custom generator.

..

.. date: 2024-10-27-04-47-28 .. gh-issue: 126024 .. nonce: XCQSqT .. section: Core and Builtins

Optimize decoding of short UTF-8 sequences containing non-ASCII characters by approximately 15%.

..

.. date: 2024-10-14-13-28-16 .. gh-issue: 125420 .. nonce: hNKixM .. section: Core and Builtins

Add :meth:memoryview.index to :class:memoryview objects. Patch by Bénédikt Tran.

..

.. date: 2024-10-14-12-34-51 .. gh-issue: 125420 .. nonce: jABXoZ .. section: Core and Builtins

Add :meth:memoryview.count to :class:memoryview objects. Patch by Bénédikt Tran.

..

.. date: 2024-09-25-21-50-23 .. gh-issue: 124470 .. nonce: pFr3_d .. section: Core and Builtins

Fix crash in free-threaded builds when replacing object dictionary while reading attribute on another thread

..

.. date: 2024-08-03-14-02-27 .. gh-issue: 69639 .. nonce: mW3iKq .. section: Core and Builtins

Implement mixed-mode arithmetic rules combining real and complex numbers as specified by C standards since C99. Patch by Sergey B Kirpichev.

..

.. date: 2024-06-04-08-26-25 .. gh-issue: 120010 .. nonce: _z-AWz .. section: Core and Builtins

Correct invalid corner cases which resulted in (nan+nanj) output in complex multiplication, e.g., (1e300+1j)*(nan+infj). Patch by Sergey B Kirpichev.

..

.. date: 2023-09-22-21-01-56 .. gh-issue: 109746 .. nonce: 32MHt9 .. section: Core and Builtins

If :func:!_thread.start_new_thread fails to start a new thread, it deletes its state from interpreter and thus avoids its repeated cleanup on finalization.

..

.. date: 2024-12-16-07-12-15 .. gh-issue: 127896 .. nonce: HmI9pk .. section: C API

The previously undocumented function :c:func:PySequence_In is :term:soft deprecated. Use :c:func:PySequence_Contains instead.

..

.. date: 2024-12-10-14-25-22 .. gh-issue: 127791 .. nonce: YRw4GU .. section: C API

Fix loss of callbacks after more than one call to :c:func:PyUnstable_AtExit.

..

.. date: 2024-12-06-16-53-34 .. gh-issue: 127691 .. nonce: k_Jitp .. section: C API

The :ref:Unicode Exception Objects <unicodeexceptions> C API now raises a :exc:TypeError if its exception argument is not a :exc:UnicodeError object. Patch by Bénédikt Tran.

..

.. date: 2024-12-02-16-10-36 .. gh-issue: 123378 .. nonce: Q6YRwe .. section: C API

Ensure that the value of :attr:UnicodeEncodeError.end <UnicodeError.end> retrieved by :c:func:PyUnicodeEncodeError_GetEnd lies in [min(1, objlen), max(min(1, objlen), objlen)] where objlen is the length of :attr:UnicodeEncodeError.object <UnicodeError.object>. Similar arguments apply to :exc:UnicodeDecodeError and :exc:UnicodeTranslateError and their corresponding C interface. Patch by Bénédikt Tran.

..

.. date: 2024-11-26-22-06-10 .. gh-issue: 127314 .. nonce: SsRrIu .. section: C API

Improve error message when calling the C API without an active thread state on the :term:free-threaded <free threading> build.

..

.. date: 2024-08-27-09-07-56 .. gh-issue: 123378 .. nonce: JJ6n_u .. section: C API

Ensure that the value of :attr:UnicodeEncodeError.start <UnicodeError.start> retrieved by :c:func:PyUnicodeEncodeError_GetStart lies in [0, max(0, objlen - 1)] where objlen is the length of :attr:UnicodeEncodeError.object <UnicodeError.object>. Similar arguments apply to :exc:UnicodeDecodeError and :exc:UnicodeTranslateError and their corresponding C interface. Patch by Bénédikt Tran.

..

.. date: 2024-08-12-10-15-19 .. gh-issue: 109523 .. nonce: S2c3fi .. section: C API

Reading text from a non-blocking stream with read may now raise a :exc:BlockingIOError if the operation cannot immediately return bytes.

..

.. date: 2024-07-03-17-26-53 .. gh-issue: 102471 .. nonce: XpmKYk .. section: C API

Add a new import and export API for Python :class:int objects (:pep:757):

  • :c:func:PyLong_GetNativeLayout;
  • :c:func:PyLong_Export;
  • :c:func:PyLong_FreeExport;
  • :c:func:PyLongWriter_Create;
  • :c:func:PyLongWriter_Finish;
  • :c:func:PyLongWriter_Discard.

Patch by Victor Stinner.

..

.. date: 2024-07-03-13-39-13 .. gh-issue: 121058 .. nonce: MKi1MV .. section: C API

PyThreadState_Clear() now warns (and calls sys.excepthook) if the thread state still has an active exception.

..

.. date: 2024-12-12-17-21-45 .. gh-issue: 127865 .. nonce: 30GDzs .. section: Build

Fix build failure on systems without thread-locals support.

..

.. date: 2024-12-06-12-47-52 .. gh-issue: 127629 .. nonce: tD-ERQ .. section: Build

Emscripten builds now include ctypes support.

..

.. date: 2024-11-30-16-36-09 .. gh-issue: 127111 .. nonce: QI9mMZ .. section: Build

Updated the Emscripten web example to use ES6 modules and be built into a distinct web_example subfolder.

..

.. date: 2024-11-22-08-46-46 .. gh-issue: 115869 .. nonce: UVLSKd .. section: Build

Make jit_stencils.h (which is produced during JIT builds) reproducible.

..

.. date: 2024-11-20-17-12-40 .. gh-issue: 126898 .. nonce: I2zILt .. section: Build

The Emscripten build of Python is now based on ES6 modules.