Skip to content

Latest commit

 

History

History
995 lines (701 loc) · 20.2 KB

3.10.0a4.rst

File metadata and controls

995 lines (701 loc) · 20.2 KB

Fix undefined behavior in Objects/genericaliasobject.c.

Fix the column offsets for f-strings :mod:`ast` nodes surrounded by parentheses and for nodes that spawn multiple lines. Patch by Pablo Galindo.

Fix regression where a single parenthesized starred expression was a valid assignment target.

Improve the error message for failed writes/deletes to property objects. When possible, the attribute name is now shown. Patch provided by Yurii Karabas.

Make the type attribute lookup cache per-interpreter. Patch by Victor Stinner.

Jumps to jumps are not eliminated when it would break PEP 626.

Make sure that the f_lasti and f_lineno attributes of a frame are set correctly when an exception is raised or re-raised. Required for PEP 626.

The coding cookie (ex: # coding: latin1) is now ignored in the command passed to the :option:`-c` command line option. Patch by Victor Stinner.

Improve error location in expressions that contain assignments. Patch by Pablo Galindo and Lysandros Nikolaou.

Remove jump commands made redundant by the deletion of unreachable bytecode blocks

Make the :mod:`atexit` module state per-interpreter. It is now safe have more than one :mod:`atexit` module instance. Patch by Donghee Na and Victor Stinner.

Fix encoding name when running a .pyc file on Windows: :c:func:`PyRun_SimpleFileExFlags()` now uses the correct encoding to decode the filename.

The __args__ of the parameterized generics for :data:`typing.Callable` and :class:`collections.abc.Callable` are now consistent. The __args__ for :class:`collections.abc.Callable` are now flattened while :data:`typing.Callable`'s have not changed. To allow this change, :class:`types.GenericAlias` can now be subclassed and collections.abc.Callable's __class_getitem__ will now return a subclass of types.GenericAlias. Tests for typing were also updated to not subclass things like Callable[..., T] as that is not a valid base class. Finally, both Callables no longer validate their argtypes, in Callable[[argtypes], resulttype] to prepare for PEP 612. Patch by Ken Jin.

Convert functools module to use :c:func:`PyType_FromModuleAndSpec`.

Convert :mod:`array` to use heap types, and establish module state for these.

Fix _random.Random() seeding.

Port the :mod:`pyexpat` extension module to multi-phase initialization (PEP 489).

Make the Unicode dictionary of interned strings compatible with subinterpreters. Patch by Victor Stinner.

Make :c:func:`!_PyUnicode_FromId` function compatible with subinterpreters. Each interpreter now has an array of identifier objects (interned strings decoded from UTF-8). Patch by Victor Stinner.

Handle empty string in variable executable in platform.libc_ver()

randrange() now raises a TypeError when step is specified without a stop argument. Formerly, it silently ignored the step argument.

Fixed equality comparison of :class:`tkinter.Variable` and :class:`tkinter.font.Font`. Objects which belong to different Tcl interpreters are now always different, even if they have the same name.

Configure LMTP Unix-domain socket to use socket global default timeout when a timeout is not explicitly provided.

Allow / character in username, password fields on _PROXY envars.

:func:`typing.get_args` and :func:`typing.get_origin` now support PEP 604 union types and PEP 612 additions to Callable.

:mod:`subprocess` extra_groups is now correctly passed into setgroups() system call.

EnumMeta.__prepare__ now accepts **kwds to properly support __init_subclass__

Add optional weights to statistics.harmonic_mean().

When simple query dialogs (:mod:`tkinter.simpledialog`), message boxes (:mod:`tkinter.messagebox`) or color choose dialog (:mod:`tkinter.colorchooser`) are created without arguments master and parent, and the default root window is not yet created, and :func:`~tkinter.NoDefaultRoot` was not called, a new temporal hidden root window will be created automatically. It will not be set as the default root window and will be destroyed right after closing the dialog window. It will help to use these simple dialog windows in programs which do not need other GUI.

Optimized :meth:`collections.deque.remove`.

Added a root parameter to :func:`tkinter.font.nametofont`.

:mod:`tkinter` supports now widgets with boolean value False.

Fixed range checks for color and pair numbers in :mod:`curses`.

Improved placing of simple query windows in Tkinter (such as :func:`tkinter.simpledialog.askinteger`). They are now centered at the center of the parent window if it is specified and shown, otherwise at the center of the screen.

Argparse help no longer uses the confusing phrase, "optional arguments". It uses "options" instead.

Port the :mod:`!_thread` extension module to the multiphase initialization API (PEP 489) and convert its static types to heap types.

Fix crash in :func:`tracemalloc.Traceback.__repr__` (regressed in Python 3.9).

:mod:`tkinter` functions and constructors which need a default root window raise now :exc:`RuntimeError` with descriptive message instead of obscure :exc:`AttributeError` or :exc:`NameError` if it is not created yet or cannot be created automatically.

:func:`atexit._run_exitfuncs` now logs callback exceptions using :data:`sys.unraisablehook`, rather than logging them directly into :data:`sys.stderr` and raise the last exception.

logging.disable will now validate the types and value of its parameter. It also now accepts strings representing the levels (as does logging.setLevel) instead of only the numerical values.

At Python exit, if a callback registered with :func:`atexit.register` fails, its exception is now logged. Previously, only some exceptions were logged, and the last exception was always silently ignored.

Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only argument syntax.

In importlib.metadata: - EntryPoint objects now expose a .dist object referencing the Distribution when constructed from a Distribution. - Add support for package discovery under package normalization rules. - The object returned by metadata() now has a formally defined protocol called PackageMetadata with declared support for the .get_all() method. - Synced with importlib_metadata 3.3.

A check is added against misspellings of autospect, auto_spec and set_spec being passed as arguments to patch, patch.object and create_autospec.

[tarfile] update nested exception raising to use from None or from e

AttributeError for suspected misspellings of assertions on mocks are now pointing out that the cause are misspelled assertions and also what to do if the misspelling is actually an intended attribute name. The unittest.mock document is also updated to reflect the current set of recognised misspellings.

Implemented PEP 612: added ParamSpec and Concatenate to :mod:`typing`. Patch by Ken Jin.

StrEnum: fix _generate_next_value_ to return a str

Define THREAD_STACK_SIZE for VxWorks.

[Enum] _EnumDict.update() is now supported.

Enum: private names do not become members / do not generate errors -- they remain normal attributes

Enum: call __init_subclass__ after members have been added

:func:`ast.literal_eval` adds line number information (if available) in error message for malformed nodes.

:func:`random.sample` no longer warns on a sequence which is also a set.

:func:`posixpath.expanduser` returns the input path unchanged if user home directory is None on VxWorks.

Fix subprocess.check_output(..., input=None) behavior when text=True to be consistent with that of the documentation and universal_newlines=True.

Fixed discrepancy between :mod:`traceback` and the interpreter in formatting of SyntaxError with lineno not set (:mod:`traceback` was changed to match interpreter).

Raise :exc:`OverflowError` instead of silent truncation in :meth:`socket.ntohs` and :meth:`socket.htons`. Silent truncation was deprecated in Python 3.7. Patch by Erlend E. Aasland

Harmonized :func:`random.randrange` argument handling to match :func:`range`.

  • The integer test and conversion in randrange() now uses :func:`operator.index`.
  • Non-integer arguments to randrange() are deprecated.
  • The ValueError is deprecated in favor of a TypeError.
  • It now runs a little faster than before.

(Contributed by Raymond Hettinger and Serhiy Storchaka.)

Restore compatibility for uname_result around deepcopy and _replace.

zipfile.Path.joinpath now accepts arbitrary arguments, same as pathlib.Path.joinpath.

Port the _csv module to the multi-phase initialization API (PEP 489).

:class:`typing.TypedDict` types created using the alternative call-style syntax now correctly respect the total keyword argument when setting their __required_keys__ and __optional_keys__ class attributes.

Add globalns and localns parameters to the :func:`inspect.signature` and :meth:`inspect.Signature.from_callable`.

fix format() behavior for IntFlag

Ensure asyncio.wait_for waits for task completion

Fixed bug where :mod:`zipimporter` sometimes reports an incorrect cause of import errors.

Fix site and sysconfig modules for VxWorks RTOS which has no home directories.

Add :func:`os.set_blocking()` support for VxWorks RTOS.

Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to prevent hiding part of the content label.

Fixed memory leak in socketserver.ThreadingMixIn introduced in Python 3.7.

Fix initialization race condition in :func:`a85encode` and :func:`b85encode` in :mod:`base64`. Patch by Brandon Stansbury.

Add documentation for the :class:`multiprocessing.pool.ThreadPool` class.

Prominently feature listings from the glossary in documentation search results. Patch by Ammar Askar.

Update test_nntplib to use official group name of news.aioe.org for testing. Patch by Donghee Na.

Skip some asyncio tests on VxWorks.

Enhance test_select.test_select(): it now takes 500 milliseconds rather than 10 seconds. Use Python rather than a shell to make the test more portable.

Skip some tests in _test_all_chown_common() on VxWorks.

Fix bytecode helper assertNotInBytecode.

Add more attribute checking in test_posix.py

Disable os.popen and impacted tests on VxWorks

Port test_ssl and test_uuid to VxWorks RTOS.

Fix __builtin_available check on older compilers. Patch by Joshua Root.

Added --disable-test-modules option to the configure script: don't build nor install test modules. Patch by Xavier de Gaye, Thomas Petazzoni and Peixing Xin.

Now all platforms use a value for the "EXT_SUFFIX" build variable derived from SOABI (for instance in freeBSD, "EXT_SUFFIX" is now ".cpython-310d.so" instead of ".so"). Previously only Linux, Mac and VxWorks were using a value for "EXT_SUFFIX" that included "SOABI".

Fix implicit function declarations in configure which could have resulted in incorrect configuration checks. Patch contributed by Joshua Root.

Enable libpython3.so for VxWorks.

Add fish shell support to macOS installer.

Update macOS installer build to use Tcl/Tk 8.6.11 (rc2, expected to be final release).

Update macOS installer build to use OpenSSL 1.1.1i.

Update macOS installer to use SQLite 3.34.0.

Fixed Python 3 compatibility issue with gdb/libpython.py handling of attribute dictionaries.

Fix freeze.py tool to use the prope config and library directories. Patch by Victor Stinner.

Export the :c:func:`Py_FrozenMain` function: fix a Python 3.9.0 regression. Python 3.9 uses -fvisibility=hidden and the function was not exported explicitly and so not exported.

Remove the private :c:func:`!_Py_fopen` function which is no longer needed. Use :c:func:`!_Py_wfopen` or :c:func:`!_Py_fopen_obj` instead. Patch by Victor Stinner.

Port :mod:`resource` extension module to module state

Update the xxlimited module to be a better example of how to use the limited C API.

Fix an alignment build warning/error in function PyVectorcall_Function(). Patch by Andreas Schneider, Antoine Pitrou and Petr Viktorin.