Skip to content

Latest commit

 

History

History
544 lines (386 loc) · 11.8 KB

3.8.0a2.rst

File metadata and controls

544 lines (386 loc) · 11.8 KB

Raise a :exc:`SyntaxError` when assigning a value to __debug__ with the Assignment Operator. Contributed by Stéphane Wirtel and Pablo Galindo.

Doubled the speed of class variable writes. When a non-dunder attribute was updated, there was an unnecessary call to update slots.

The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing :class:`~os.PathLike` objects has been improved and now it does explain the origin of the error.

gc.get_objects can now receive an optional parameter indicating a generation to get objects from. Patch by Pablo Galindo.

When the main interpreter exits due to an uncaught KeyboardInterrupt, the process now exits in the appropriate manner for its parent process to detect that a SIGINT or ^C terminated the process. This allows shells and batch scripts to understand that the user has asked them to stop.

Fix __class_getitem__() not being called on a class with a custom non-subscriptable metaclass.

Fix a crash on fork when using subinterpreters. Contributed by Stéphane Wirtel

Fix a potential double free in Modules/_randommodule.c.

Fix a crash in slice_richcompare(): use strong references rather than stolen references for the two temporary internal tuples.

Enable the creation of cell objects by adding a cell.__new__ method, and expose the type cell in Lib/types.py under the name CellType. Patch by Pierre Glaser.

Use monotonic clock for pthread_cond_timedwait when pthread_condattr_setclock and CLOCK_MONOTONIC are available.

The compiler emits now syntax warnings in the case when a comma is likely missed before tuple or list.

The implementation of PyInterpreterState has been moved into the internal header files (guarded by Py_BUILD_CORE).

Clarify the errors reported when object.__new__ and object.__init__ receive more than one argument. Contributed by Sanyam Khurana.

Signal-handling is now guaranteed to happen relative to the main interpreter.

We added a new internal _Py_AddPendingCall() that operates relative to the provided interpreter. This allows us to use the existing implementation to ask another interpreter to do work that cannot be done in the current interpreter, like decref an object the other interpreter owns. The existing Py_AddPendingCall() only operates relative to the main interpreter.

Fix a possible crash in :meth:`list.sort` when sorting objects with ob_type->tp_richcompare == NULL. Patch by Zackery Spytz.

:func:`unittest.mock.patch.dict` used as a decorator with string target resolves the target during function call instead of during decorator construction. Patch by Karthikeyan Singaravelan.

Add statistics.NormalDist, a tool for creating and manipulating normal distributions of random variable. Features a composite class that treats the mean and standard deviation of measurement data as single entity.

Added statistics.fmean() as a faster, floating point variant of the existing mean() function.

Removed broken has_key method from multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre.

Add support for bytes to :func:`shutil.which`.

Fix :func:`dataclasses.field` throwing away empty mapping objects passed as metadata.

Write expected and actual call parameters on separate lines in :meth:`unittest.mock.Mock.assert_called_with` assertion errors. Contributed by Susan Su.

The :mod:`pdb` debug command now gracefully handles syntax errors.

In http.server script, rely on getaddrinfo to bind to preferred address based on the bind parameter. Now default bind or binding to a name may bind to IPv6 or dual-stack, depending on the environment.

Set __spec__.origin of _frozen_importlib to frozen so that it matches the behavior of _frozen_importlib_external. Patch by Nina Zakharenko.

Fix a reference issue inside :class:`multiprocessing.Pool` that caused the pool to remain alive if it was deleted without being closed or terminated explicitly. A new strong reference is added to the pool iterators to link the lifetime of the pool to the lifetime of its iterators so the pool does not get destroyed if a pool iterator is still alive.

re module, fix wrong capturing groups in rare cases. :func:`re.search`, :func:`re.findall`, :func:`re.sub` and other functions that scan through string looking for a match, should reset capturing groups between two match attempts. Patch by Ma Lin.

:mod:`weakref`: Fix a RuntimeError when copying a WeakKeyDictionary or a WeakValueDictionary, due to some keys or values disappearing while iterating.

Implement :func:`math.prod` as analogous function to :func:`sum` that returns the product of a 'start' value (default: 1) times an iterable of numbers. Patch by Pablo Galindo.

Performing arithmetic between :class:`datetime.datetime` subclasses and :class:`datetime.timedelta` now returns an object of the same type as the :class:`datetime.datetime` subclass. As a result, :meth:`datetime.datetime.astimezone` and alternate constructors like :meth:`datetime.datetime.now` and :meth:`datetime.fromtimestamp` called with a tz argument now also retain their subclass.

Add headers optional keyword-only parameter to :class:`xmlrpc.client.ServerProxy`, :class:`xmlrpc.client.Transport` and :class:`xmlrpc.client.SafeTransport`. Patch by Cédric Krier.

Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules. Patch by Tim Burgess.

Fix formatting of --check-hash-based-pycs options in the manpage Synopsis.

Bump minimum sphinx version to 1.8. Patch by Anthony Sottile.

Update documentation and docstrings for pathlib. Original patch by Mike Short.

Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa Tk.

Add test.support.TEST_HTTP_URL and replace references of http://www.example.com by this new constant. Contributed by Stéphane Wirtel.

Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy. Use older TLS version for minimum TLS version of the server SSL context if needed, to test TLS version older than default minimum TLS version.

Added :func:`test.support.check_syntax_warning`.

Make test_imap4_host_default_value independent on whether the local IMAP server is running.

multiprocessing: provide unit tests for SyncManager and SharedMemoryManager classes + all the shareable types which are supposed to be supported by them. (patch by Giampaolo Rodola)

Skip test_shutil.test_unpack_archive_xztar to prevent a MemoryError on 32-bit AIX when MAXDATA setting is less than 0x20000000.

Patch by Michael Felt (aixtools)

Assert m_state != NULL to mimic GC traversal functions that do not correctly handle module creation when the module state has not been created.

Added ARM build support to Windows build files in PCBuild.

pathlib no longer raises when checking file and directory existence on drives that are not ready

Uses the base Python executable when invoking venv in a virtual environment

Prevents venv paths being inherited by child processes

Fix sysconfig detection of the source directory and distutils handling of pyconfig.h during PGO profiling

IDLE -- Document settings dialog font tab sample.

Revise IDLE doc for control codes sent to Shell. Add a code example block.

Add docstrings and unittests for colorizer.py.