What's New in 3.3: reorder modules
Remove also duplicate functions in the "os" module section
This commit is contained in:
parent
2e63177e94
commit
f4c54ff5cd
|
@ -300,6 +300,23 @@ Some smaller changes made to the core Python language are:
|
||||||
New and Improved Modules
|
New and Improved Modules
|
||||||
========================
|
========================
|
||||||
|
|
||||||
|
abc
|
||||||
|
---
|
||||||
|
|
||||||
|
Improved support for abstract base classes containing descriptors composed with
|
||||||
|
abstract methods. The recommended approach to declaring abstract descriptors is
|
||||||
|
now to provide :attr:`__isabstractmethod__` as a dynamically updated
|
||||||
|
property. The built-in descriptors have been updated accordingly.
|
||||||
|
|
||||||
|
* :class:`abc.abstractproperty` has been deprecated, use :class:`property`
|
||||||
|
with :func:`abc.abstractmethod` instead.
|
||||||
|
* :class:`abc.abstractclassmethod` has been deprecated, use
|
||||||
|
:class:`classmethod` with :func:`abc.abstractmethod` instead.
|
||||||
|
* :class:`abc.abstractstaticmethod` has been deprecated, use
|
||||||
|
:class:`staticmethod` with :func:`abc.abstractmethod` instead.
|
||||||
|
|
||||||
|
(Contributed by Darren Dale in :issue:`11610`)
|
||||||
|
|
||||||
array
|
array
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -368,23 +385,6 @@ curses
|
||||||
|
|
||||||
(Contributed by Iñigo Serna in :issue:`6755`)
|
(Contributed by Iñigo Serna in :issue:`6755`)
|
||||||
|
|
||||||
abc
|
|
||||||
---
|
|
||||||
|
|
||||||
Improved support for abstract base classes containing descriptors composed with
|
|
||||||
abstract methods. The recommended approach to declaring abstract descriptors is
|
|
||||||
now to provide :attr:`__isabstractmethod__` as a dynamically updated
|
|
||||||
property. The built-in descriptors have been updated accordingly.
|
|
||||||
|
|
||||||
* :class:`abc.abstractproperty` has been deprecated, use :class:`property`
|
|
||||||
with :func:`abc.abstractmethod` instead.
|
|
||||||
* :class:`abc.abstractclassmethod` has been deprecated, use
|
|
||||||
:class:`classmethod` with :func:`abc.abstractmethod` instead.
|
|
||||||
* :class:`abc.abstractstaticmethod` has been deprecated, use
|
|
||||||
:class:`staticmethod` with :func:`abc.abstractmethod` instead.
|
|
||||||
|
|
||||||
(Contributed by Darren Dale in :issue:`11610`)
|
|
||||||
|
|
||||||
faulthandler
|
faulthandler
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -393,19 +393,6 @@ New module: :mod:`faulthandler`.
|
||||||
* :envvar:`PYTHONFAULTHANDLER`
|
* :envvar:`PYTHONFAULTHANDLER`
|
||||||
* :option:`-X` ``faulthandler``
|
* :option:`-X` ``faulthandler``
|
||||||
|
|
||||||
time
|
|
||||||
----
|
|
||||||
|
|
||||||
The :mod:`time` module has new functions:
|
|
||||||
|
|
||||||
* :func:`~time.clock_getres` and :func:`~time.clock_gettime` functions and
|
|
||||||
``CLOCK_xxx`` constants.
|
|
||||||
* :func:`~time.monotonic`: monotonic clock.
|
|
||||||
* :func:`~time.wallclock`.
|
|
||||||
|
|
||||||
(Contributed by Victor Stinner in :issue:`10278`)
|
|
||||||
|
|
||||||
|
|
||||||
ftplib
|
ftplib
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -508,7 +495,6 @@ os
|
||||||
* :func:`~os.fchownat`
|
* :func:`~os.fchownat`
|
||||||
* :func:`~os.fstatat`
|
* :func:`~os.fstatat`
|
||||||
* :func:`~os.futimesat`
|
* :func:`~os.futimesat`
|
||||||
* :func:`~os.futimesat`
|
|
||||||
* :func:`~os.linkat`
|
* :func:`~os.linkat`
|
||||||
* :func:`~os.mkdirat`
|
* :func:`~os.mkdirat`
|
||||||
* :func:`~os.mkfifoat`
|
* :func:`~os.mkfifoat`
|
||||||
|
@ -519,7 +505,6 @@ os
|
||||||
* :func:`~os.symlinkat`
|
* :func:`~os.symlinkat`
|
||||||
* :func:`~os.unlinkat`
|
* :func:`~os.unlinkat`
|
||||||
* :func:`~os.utimensat`
|
* :func:`~os.utimensat`
|
||||||
* :func:`~os.utimensat`
|
|
||||||
|
|
||||||
* extended attributes (:issue:`12720`):
|
* extended attributes (:issue:`12720`):
|
||||||
|
|
||||||
|
@ -553,12 +538,9 @@ os
|
||||||
|
|
||||||
* :func:`~os.fexecve`
|
* :func:`~os.fexecve`
|
||||||
* :func:`~os.futimens`
|
* :func:`~os.futimens`
|
||||||
* :func:`~os.futimens`
|
|
||||||
* :func:`~os.futimes`
|
|
||||||
* :func:`~os.futimes`
|
* :func:`~os.futimes`
|
||||||
* :func:`~os.lockf`
|
* :func:`~os.lockf`
|
||||||
* :func:`~os.lutimes`
|
* :func:`~os.lutimes`
|
||||||
* :func:`~os.lutimes`
|
|
||||||
* :func:`~os.posix_fadvise`
|
* :func:`~os.posix_fadvise`
|
||||||
* :func:`~os.posix_fallocate`
|
* :func:`~os.posix_fallocate`
|
||||||
* :func:`~os.pread`
|
* :func:`~os.pread`
|
||||||
|
@ -596,13 +578,43 @@ The Tk GUI and the :func:`~pydoc.serve` function have been removed from the
|
||||||
in Python 3.2.
|
in Python 3.2.
|
||||||
|
|
||||||
|
|
||||||
sys
|
sched
|
||||||
---
|
-----
|
||||||
|
|
||||||
* The :mod:`sys` module has a new :data:`~sys.thread_info` :term:`struct
|
* :meth:`~sched.scheduler.run` now accepts a *blocking* parameter which when
|
||||||
sequence` holding informations about the thread implementation.
|
set to False makes the method execute the scheduled events due to expire
|
||||||
|
soonest (if any) and then return immediately.
|
||||||
|
This is useful in case you want to use the :class:`~sched.scheduler` in
|
||||||
|
non-blocking applications. (Contributed by Giampaolo Rodolà in :issue:`13449`)
|
||||||
|
|
||||||
(:issue:`11223`)
|
* :class:`~sched.scheduler` class can now be safely used in multi-threaded
|
||||||
|
environments. (Contributed by Josiah Carlson and Giampaolo Rodolà in
|
||||||
|
:issue:`8684`)
|
||||||
|
|
||||||
|
* *timefunc* and *delayfunct* parameters of :class:`~sched.scheduler` class
|
||||||
|
constructor are now optional and defaults to :func:`time.time` and
|
||||||
|
:func:`time.sleep` respectively. (Contributed by Chris Clark in
|
||||||
|
:issue:`13245`)
|
||||||
|
|
||||||
|
* :meth:`~sched.scheduler.enter` and :meth:`~sched.scheduler.enterabs`
|
||||||
|
*argument* parameter is now optional. (Contributed by Chris Clark in
|
||||||
|
:issue:`13245`)
|
||||||
|
|
||||||
|
* :meth:`~sched.scheduler.enter` and :meth:`~sched.scheduler.enterabs`
|
||||||
|
now accept a *kwargs* parameter. (Contributed by Chris Clark in
|
||||||
|
:issue:`13245`)
|
||||||
|
|
||||||
|
|
||||||
|
shutil
|
||||||
|
------
|
||||||
|
|
||||||
|
* The :mod:`shutil` module has these new fuctions:
|
||||||
|
|
||||||
|
* :func:`~shutil.disk_usage`: provides total, used and free disk space
|
||||||
|
statistics. (Contributed by Giampaolo Rodolà in :issue:`12442`)
|
||||||
|
* :func:`~shutil.chown`: allows one to change user and/or group of the given
|
||||||
|
path also specifying the user/group names and not only their numeric
|
||||||
|
ids. (Contributed by Sandro Tosi in :issue:`12191`)
|
||||||
|
|
||||||
|
|
||||||
signal
|
signal
|
||||||
|
@ -627,6 +639,16 @@ signal
|
||||||
* :func:`signal.signal` and :func:`signal.siginterrupt` raise an OSError,
|
* :func:`signal.signal` and :func:`signal.siginterrupt` raise an OSError,
|
||||||
instead of a RuntimeError: OSError has an errno attribute.
|
instead of a RuntimeError: OSError has an errno attribute.
|
||||||
|
|
||||||
|
smtplib
|
||||||
|
-------
|
||||||
|
|
||||||
|
The :class:`~smtplib.SMTP_SSL` constructor and the :meth:`~smtplib.SMTP.starttls`
|
||||||
|
method now accept an SSLContext parameter to control parameters of the secure
|
||||||
|
channel.
|
||||||
|
|
||||||
|
(Contributed by Kasun Herath in :issue:`8809`)
|
||||||
|
|
||||||
|
|
||||||
socket
|
socket
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -650,6 +672,7 @@ socket
|
||||||
(http://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and
|
(http://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and
|
||||||
http://oss.oracle.com/projects/rds/).
|
http://oss.oracle.com/projects/rds/).
|
||||||
|
|
||||||
|
|
||||||
ssl
|
ssl
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -689,25 +712,27 @@ ssl
|
||||||
(Contributed by Antoine Pitrou in :issue:`13634`)
|
(Contributed by Antoine Pitrou in :issue:`13634`)
|
||||||
|
|
||||||
|
|
||||||
shutil
|
sys
|
||||||
------
|
---
|
||||||
|
|
||||||
* The :mod:`shutil` module has these new fuctions:
|
* The :mod:`sys` module has a new :data:`~sys.thread_info` :term:`struct
|
||||||
|
sequence` holding informations about the thread implementation.
|
||||||
|
|
||||||
* :func:`~shutil.disk_usage`: provides total, used and free disk space
|
(:issue:`11223`)
|
||||||
statistics. (Contributed by Giampaolo Rodolà in :issue:`12442`)
|
|
||||||
* :func:`~shutil.chown`: allows one to change user and/or group of the given
|
|
||||||
path also specifying the user/group names and not only their numeric
|
|
||||||
ids. (Contributed by Sandro Tosi in :issue:`12191`)
|
|
||||||
|
|
||||||
smtplib
|
|
||||||
-------
|
|
||||||
|
|
||||||
The :class:`~smtplib.SMTP_SSL` constructor and the :meth:`~smtplib.SMTP.starttls`
|
time
|
||||||
method now accept an SSLContext parameter to control parameters of the secure
|
----
|
||||||
channel.
|
|
||||||
|
The :mod:`time` module has new functions:
|
||||||
|
|
||||||
|
* :func:`~time.clock_getres` and :func:`~time.clock_gettime` functions and
|
||||||
|
``CLOCK_xxx`` constants.
|
||||||
|
* :func:`~time.monotonic`: monotonic clock.
|
||||||
|
* :func:`~time.wallclock`.
|
||||||
|
|
||||||
|
(Contributed by Victor Stinner in :issue:`10278`)
|
||||||
|
|
||||||
(Contributed by Kasun Herath in :issue:`8809`)
|
|
||||||
|
|
||||||
urllib
|
urllib
|
||||||
------
|
------
|
||||||
|
@ -720,31 +745,6 @@ should be used. For example, this will send a ``'HEAD'`` request::
|
||||||
|
|
||||||
(:issue:`1673007`)
|
(:issue:`1673007`)
|
||||||
|
|
||||||
sched
|
|
||||||
-----
|
|
||||||
|
|
||||||
* :meth:`~sched.scheduler.run` now accepts a *blocking* parameter which when
|
|
||||||
set to False makes the method execute the scheduled events due to expire
|
|
||||||
soonest (if any) and then return immediately.
|
|
||||||
This is useful in case you want to use the :class:`~sched.scheduler` in
|
|
||||||
non-blocking applications. (Contributed by Giampaolo Rodolà in :issue:`13449`)
|
|
||||||
|
|
||||||
* :class:`~sched.scheduler` class can now be safely used in multi-threaded
|
|
||||||
environments. (Contributed by Josiah Carlson and Giampaolo Rodolà in
|
|
||||||
:issue:`8684`)
|
|
||||||
|
|
||||||
* *timefunc* and *delayfunct* parameters of :class:`~sched.scheduler` class
|
|
||||||
constructor are now optional and defaults to :func:`time.time` and
|
|
||||||
:func:`time.sleep` respectively. (Contributed by Chris Clark in
|
|
||||||
:issue:`13245`)
|
|
||||||
|
|
||||||
* :meth:`~sched.scheduler.enter` and :meth:`~sched.scheduler.enterabs`
|
|
||||||
*argument* parameter is now optional. (Contributed by Chris Clark in
|
|
||||||
:issue:`13245`)
|
|
||||||
|
|
||||||
* :meth:`~sched.scheduler.enter` and :meth:`~sched.scheduler.enterabs`
|
|
||||||
now accept a *kwargs* parameter. (Contributed by Chris Clark in
|
|
||||||
:issue:`13245`)
|
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
=============
|
=============
|
||||||
|
|
Loading…
Reference in New Issue