8000 What's New in Python 3.9: sort improved modules by vstinner · Pull Request #18383 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

What's New in Python 3.9: sort improved modules #18383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ with this change. The overridden methods of :class:`~imaplib.IMAP4_SSL` and
:class:`~imaplib.IMAP4_stream` were applied to this change.
(Contributed by Dong-hee Na in :issue:`38615`.)

importlib
---------

To improve consistency with import statements, :func:`importlib.util.resolve_name`
now raises :exc:`ImportError` instead of :exc:`ValueError` for invalid relative
import attempts.
(Contributed by Ngalim Siregar in :issue:`37444`.)

math
----

Expand Down Expand Up @@ -240,52 +248,31 @@ The :func:`os.putenv` and :func:`os.unsetenv` functions are now always
available.
(Contributed by Victor Stinner in :issue:`39395`.)

poplib
------

:class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a :class:`ValueError`
if the given timeout for their constructor is zero to prevent the creation of
a non-blocking socket. (Contributed by Dong-hee Na in :issue:`39259`.)

threading
---------

In a subinterpreter, spawning a daemon thread now raises a :exc:`RuntimeError`. Daemon
threads were never supported in subinterpreters. Previously, the subinterpreter
finalization crashed with a Python fatal error if a daemon thread was still
running.
(Contributed by Victor Stinner in :issue:`37266`.)

venv
----

The activation scripts provided by :mod:`venv` now all specify their prompt
customization consistently by always using the value specified by
``__VENV_PROMPT__``. Previously some scripts unconditionally used
``__VENV_PROMPT__``, others only if it happened to be set (which was the default
case), and one used ``__VENV_NAME__`` instead.
(Contributed by Brett Cannon in :issue:`37663`.)

pathlib
-------

Added :meth:`pathlib.Path.readlink()` which acts similarly to
:func:`os.readlink`.
(Contributed by Girts Folkmanis in :issue:`30618`)

poplib
------

:class:`~poplib.POP3` and :class:`~poplib.POP3_SSL` now raise a :class:`ValueError`
if the given timeout for their constructor is zero to prevent the creation of
a non-blocking socket. (Contributed by Dong-hee Na in :issue:`39259`.)

pprint
------

:mod:`pprint` can now pretty-print :class:`types.SimpleNamespace`.
(Contributed by Carl Bordum Hansen in :issue:`37376`.)

importlib
---------
signal
------

To improve consistency with import statements, :func:`importlib.util.resolve_name`
now raises :exc:`ImportError` instead of :exc:`ValueError` for invalid relative
import attempts.
(Contributed by Ngalim Siregar in :issue:`37444`.)
Exposed the Linux-specific :func:`signal.pidfd_send_signal` for sending to
signals to a process using a file descriptor instead of a pid. (:issue:`38712`)

smtplib
-------
Expand All @@ -297,11 +284,14 @@ a non-blocking socket. (Contributed by Dong-hee Na in :issue:`39259`.)
:class:`~smtplib.LMTP` constructor now has an optional *timeout* parameter.
(Contributed by Dong-hee Na in :issue:`39329`.)

signal
------
threading
---------

Exposed the Linux-specific :func:`signal.pidfd_send_signal` for sending to
signals to a process using a file descriptor instead of a pid. (:issue:`38712`)
In a subinterpreter, spawning a daemon thread now raises a :exc:`RuntimeError`. Daemon
threads were never supported in subinterpreters. Previously, the subinterpreter
finalization crashed with a Python fatal error if a daemon thread was still
running.
(Contributed by Victor Stinner in :issue:`37266`.)

typing
------
Expand All @@ -311,6 +301,16 @@ types with context-specific metadata and new ``include_extras`` parameter to
:func:`typing.get_type_hints` to access the metadata at runtime. (Contributed
by Till Varoquaux and Konstantin Kashin.)

venv
----

The activation scripts provided by :mod:`venv` now all specify their prompt
customization consistently by always using the value specified by
``__VENV_PROMPT__``. Previously some scripts unconditionally used
``__VENV_PROMPT__``, others only if it happened to be set (which was the default
case), and one used ``__VENV_NAME__`` instead.
(Contributed by Brett Cannon in :issue:`37663`.)


Optimizations
=============
Expand Down
0