Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e5cf4868
Commit
e5cf4868
authored
Nov 02, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #22388: Unified the style of "Contributed by" sentences in What's New.
parent
4b2b1de0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
107 deletions
+107
-107
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.3.rst
+51
-51
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.4.rst
+56
-56
No files found.
Doc/whatsnew/3.3.rst
View file @
e5cf4868
...
@@ -171,7 +171,7 @@ Features
...
@@ -171,7 +171,7 @@ Features
* Multi-dimensional comparisons are supported for any array type.
* Multi-dimensional comparisons are supported for any array type.
* One-dimensional memoryviews of hashable (read-only) types with formats B,
* One-dimensional memoryviews of hashable (read-only) types with formats B,
b or c are now hashable.
(Contributed by Antoine Pitrou in :issue:`13411`
)
b or c are now hashable.
(Contributed by Antoine Pitrou in :issue:`13411`.
)
* Arbitrary slicing of any 1-D arrays type is supported. For example, it
* Arbitrary slicing of any 1-D arrays type is supported. For example, it
is now possible to reverse a memoryview in O(1) by using a negative step.
is now possible to reverse a memoryview in O(1) by using a negative step.
...
@@ -196,7 +196,7 @@ API changes
...
@@ -196,7 +196,7 @@ API changes
* For further changes see `Build and C API Changes`_ and `Porting C code`_.
* For further changes see `Build and C API Changes`_ and `Porting C code`_.
(Contributed by Stefan Krah in :issue:`10181`)
(Contributed by Stefan Krah in :issue:`10181`
.
)
.. seealso::
.. seealso::
...
@@ -307,8 +307,8 @@ Python 2 is also installed, or ``-2.6`` to specifclly request an earlier
...
@@ -307,8 +307,8 @@ Python 2 is also installed, or ``-2.6`` to specifclly request an earlier
Python version when a more recent version is installed).
Python version when a more recent version is installed).
In addition to the launcher, the Windows installer now includes an
In addition to the launcher, the Windows installer now includes an
option to add the newly installed Python to the system PATH
(c
ontributed
option to add the newly installed Python to the system PATH
. (C
ontributed
by Brian Curtin in :issue:`3561`
).
by Brian Curtin in :issue:`3561`
.)
.. seealso::
.. seealso::
...
@@ -781,7 +781,7 @@ Some smaller changes made to the core Python language are:
...
@@ -781,7 +781,7 @@ Some smaller changes made to the core Python language are:
Both :func:`unicodedata.lookup()` and ``'
\
N
{...}
'`` now resolve name aliases,
Both :func:`unicodedata.lookup()` and ``'
\
N
{...}
'`` now resolve name aliases,
and :func:`unicodedata.lookup()` resolves named sequences too.
and :func:`unicodedata.lookup()` resolves named sequences too.
(Contributed by Ezio Melotti in :issue:`12753`)
(Contributed by Ezio Melotti in :issue:`12753`
.
)
* Unicode database updated to UCD version 6.1.0
* Unicode database updated to UCD version 6.1.0
...
@@ -793,7 +793,7 @@ Some smaller changes made to the core Python language are:
...
@@ -793,7 +793,7 @@ Some smaller changes made to the core Python language are:
methods of :class:`bytes` and :class:`bytearray` objects now accept an
methods of :class:`bytes` and :class:`bytearray` objects now accept an
integer between 0 and 255 as their first argument.
integer between 0 and 255 as their first argument.
(Contributed by Petri Lehtinen in :issue:`12170`)
(Contributed by Petri Lehtinen in :issue:`12170`
.
)
* The ``rjust()``, ``ljust()``, and ``center()`` methods of :class:`bytes`
* The ``rjust()``, ``ljust()``, and ``center()`` methods of :class:`bytes`
and :class:`bytearray` now accept a :class:`bytearray` for the ``fill``
and :class:`bytearray` now accept a :class:`bytearray` for the ``fill``
...
@@ -854,7 +854,7 @@ Builtin functions and types
...
@@ -854,7 +854,7 @@ Builtin functions and types
* The sequence documentation has been substantially rewritten to better
* The sequence documentation has been substantially rewritten to better
explain the binary/text sequence distinction and to provide specific
explain the binary/text sequence distinction and to provide specific
documentation sections for the individual builtin sequence types
documentation sections for the individual builtin sequence types
(:issue:`4966`)
(:issue:`4966`)
.
New Modules
New Modules
...
@@ -891,7 +891,7 @@ The new :mod:`ipaddress` module provides tools for creating and manipulating
...
@@ -891,7 +891,7 @@ The new :mod:`ipaddress` module provides tools for creating and manipulating
objects representing IPv4 and IPv6 addresses, networks and interfaces (i.e.
objects representing IPv4 and IPv6 addresses, networks and interfaces (i.e.
an IP address associated with a specific IP subnet).
an IP address associated with a specific IP subnet).
(Contributed by Google and Peter Moody in :pep:`3144`)
(Contributed by Google and Peter Moody in :pep:`3144`
.
)
lzma
lzma
----
----
...
@@ -900,7 +900,7 @@ The newly-added :mod:`lzma` module provides data compression and decompression
...
@@ -900,7 +900,7 @@ The newly-added :mod:`lzma` module provides data compression and decompression
using the LZMA algorithm, including support for the ``.xz`` and ``.lzma``
using the LZMA algorithm, including support for the ``.xz`` and ``.lzma``
file formats.
file formats.
(Contributed by Nadeem Vawda and Per Øyvind Karlsen in :issue:`6715`)
(Contributed by Nadeem Vawda and Per Øyvind Karlsen in :issue:`6715`
.
)
Improved Modules
Improved Modules
...
@@ -921,7 +921,7 @@ property. The built-in descriptors have been updated accordingly.
...
@@ -921,7 +921,7 @@ property. The built-in descriptors have been updated accordingly.
* :class:`abc.abstractstaticmethod` has been deprecated, use
* :class:`abc.abstractstaticmethod` has been deprecated, use
:class:`staticmethod` with :func:`abc.abstractmethod` instead.
:class:`staticmethod` with :func:`abc.abstractmethod` instead.
(Contributed by Darren Dale in :issue:`11610`)
(Contributed by Darren Dale in :issue:`11610`
.
)
:meth:`abc.ABCMeta.register` now returns the registered subclass, which means
:meth:`abc.ABCMeta.register` now returns the registered subclass, which means
it can now be used as a class decorator (:issue:`10868`).
it can now be used as a class decorator (:issue:`10868`).
...
@@ -933,7 +933,7 @@ array
...
@@ -933,7 +933,7 @@ array
The :mod:`array` module supports the :c:type:`long long` type using ``q`` and
The :mod:`array` module supports the :c:type:`long long` type using ``q`` and
``Q`` type codes.
``Q`` type codes.
(Contributed by Oren Tirosh and Hirokazu Yamamoto in :issue:`1172711`)
(Contributed by Oren Tirosh and Hirokazu Yamamoto in :issue:`1172711`
.
)
base64
base64
...
@@ -964,14 +964,14 @@ new features have been added:
...
@@ -964,14 +964,14 @@ new features have been added:
* :class:`bz2.BZ2File` can now read from and write to arbitrary file-like
* :class:`bz2.BZ2File` can now read from and write to arbitrary file-like
objects, by means of its constructor'
s
*
fileobj
*
argument
.
objects, by means of its constructor'
s
*
fileobj
*
argument
.
(
Contributed
by
Nadeem
Vawda
in
:
issue
:`
5863
`)
(
Contributed
by
Nadeem
Vawda
in
:
issue
:`
5863
`
.
)
*
:
class
:`
bz2
.
BZ2File
`
and
:
func
:`
bz2
.
decompress
`
can
now
decompress
*
:
class
:`
bz2
.
BZ2File
`
and
:
func
:`
bz2
.
decompress
`
can
now
decompress
multi
-
stream
inputs
(
such
as
those
produced
by
the
:
program
:`
pbzip2
`
tool
).
multi
-
stream
inputs
(
such
as
those
produced
by
the
:
program
:`
pbzip2
`
tool
).
:
class
:`
bz2
.
BZ2File
`
can
now
also
be
used
to
create
this
type
of
file
,
using
:
class
:`
bz2
.
BZ2File
`
can
now
also
be
used
to
create
this
type
of
file
,
using
the
``
'a'
``
(
append
)
mode
.
the
``
'a'
``
(
append
)
mode
.
(
Contributed
by
Nir
Aides
in
:
issue
:`
1625
`)
(
Contributed
by
Nir
Aides
in
:
issue
:`
1625
`
.
)
*
:
class
:`
bz2
.
BZ2File
`
now
implements
all
of
the
:
class
:`
io
.
BufferedIOBase
`
API
,
*
:
class
:`
bz2
.
BZ2File
`
now
implements
all
of
the
:
class
:`
io
.
BufferedIOBase
`
API
,
except
for
the
:
meth
:`
detach
`
and
:
meth
:`
truncate
`
methods
.
except
for
the
:
meth
:`
detach
`
and
:
meth
:`
truncate
`
methods
.
...
@@ -1018,7 +1018,7 @@ collections
...
@@ -1018,7 +1018,7 @@ collections
Addition
of
a
new
:
class
:`~
collections
.
ChainMap
`
class
to
allow
treating
a
Addition
of
a
new
:
class
:`~
collections
.
ChainMap
`
class
to
allow
treating
a
number
of
mappings
as
a
single
unit
.
(
Written
by
Raymond
Hettinger
for
number
of
mappings
as
a
single
unit
.
(
Written
by
Raymond
Hettinger
for
:
issue
:`
11089
`,
made
public
in
:
issue
:`
11297
`)
:
issue
:`
11089
`,
made
public
in
:
issue
:`
11297
`
.
)
The
abstract
base
classes
have
been
moved
in
a
new
:
mod
:`
collections
.
abc
`
The
abstract
base
classes
have
been
moved
in
a
new
:
mod
:`
collections
.
abc
`
module
,
to
better
differentiate
between
the
abstract
and
the
concrete
module
,
to
better
differentiate
between
the
abstract
and
the
concrete
...
@@ -1069,7 +1069,7 @@ curses
...
@@ -1069,7 +1069,7 @@ curses
push
a
wide
character
so
the
next
:
meth
:`~
curses
.
window
.
get_wch
`
will
return
push
a
wide
character
so
the
next
:
meth
:`~
curses
.
window
.
get_wch
`
will
return
it
it
(
Contributed
by
I
ñ
igo
Serna
in
:
issue
:`
6755
`)
(
Contributed
by
I
ñ
igo
Serna
in
:
issue
:`
6755
`
.
)
datetime
datetime
--------
--------
...
@@ -1376,11 +1376,11 @@ ftplib
...
@@ -1376,11 +1376,11 @@ ftplib
:
func
:`~
ftplib
.
FTP_TLS
.
ccc
`
function
to
revert
control
channel
back
to
:
func
:`~
ftplib
.
FTP_TLS
.
ccc
`
function
to
revert
control
channel
back
to
plaintext
.
This
can
be
useful
to
take
advantage
of
firewalls
that
know
how
plaintext
.
This
can
be
useful
to
take
advantage
of
firewalls
that
know
how
to
handle
NAT
with
non
-
secure
FTP
without
opening
fixed
ports
.
(
Contributed
to
handle
NAT
with
non
-
secure
FTP
without
opening
fixed
ports
.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
12139
`)
by
Giampaolo
Rodol
à
in
:
issue
:`
12139
`
.
)
*
Added
:
meth
:`
ftplib
.
FTP
.
mlsd
`
method
which
provides
a
parsable
directory
*
Added
:
meth
:`
ftplib
.
FTP
.
mlsd
`
method
which
provides
a
parsable
directory
listing
format
and
deprecates
:
meth
:`
ftplib
.
FTP
.
nlst
`
and
listing
format
and
deprecates
:
meth
:`
ftplib
.
FTP
.
nlst
`
and
:
meth
:`
ftplib
.
FTP
.
dir
`.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
11072
`)
:
meth
:`
ftplib
.
FTP
.
dir
`.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
11072
`
.
)
functools
functools
...
@@ -1404,7 +1404,7 @@ hmac
...
@@ -1404,7 +1404,7 @@ hmac
A
new
:
func
:`~
hmac
.
compare_digest
`
function
has
been
added
to
prevent
side
A
new
:
func
:`~
hmac
.
compare_digest
`
function
has
been
added
to
prevent
side
channel
attacks
on
digests
through
timing
analysis
.
(
Contributed
by
Nick
channel
attacks
on
digests
through
timing
analysis
.
(
Contributed
by
Nick
Coghlan
and
Christian
Heimes
in
:
issue
:`
15061
`)
Coghlan
and
Christian
Heimes
in
:
issue
:`
15061
`
.
)
http
http
...
@@ -1436,13 +1436,13 @@ are also available on the latest bug fix releases of Python 2.7/3.2.
...
@@ -1436,13 +1436,13 @@ are also available on the latest bug fix releases of Python 2.7/3.2.
(
Contributed
by
Ezio
Melotti
in
:
issue
:`
15114
`,
and
:
issue
:`
14538
`,
(
Contributed
by
Ezio
Melotti
in
:
issue
:`
15114
`,
and
:
issue
:`
14538
`,
:
issue
:`
13993
`,
:
issue
:`
13960
`,
:
issue
:`
13358
`,
:
issue
:`
1745761
`,
:
issue
:`
13993
`,
:
issue
:`
13960
`,
:
issue
:`
13358
`,
:
issue
:`
1745761
`,
:
issue
:`
755670
`,
:
issue
:`
13357
`,
:
issue
:`
12629
`,
:
issue
:`
1200313
`,
:
issue
:`
755670
`,
:
issue
:`
13357
`,
:
issue
:`
12629
`,
:
issue
:`
1200313
`,
:
issue
:`
670664
`,
:
issue
:`
13273
`,
:
issue
:`
12888
`,
:
issue
:`
7311
`)
:
issue
:`
670664
`,
:
issue
:`
13273
`,
:
issue
:`
12888
`,
:
issue
:`
7311
`
.
)
A
new
:
data
:`~
html
.
entities
.
html5
`
dictionary
that
maps
HTML5
named
character
A
new
:
data
:`~
html
.
entities
.
html5
`
dictionary
that
maps
HTML5
named
character
references
to
the
equivalent
Unicode
character
(
s
)
(
e
.
g
.
``
html5
[
'gt;'
]
==
references
to
the
equivalent
Unicode
character
(
s
)
(
e
.
g
.
``
html5
[
'gt;'
]
==
'>'
``)
has
been
added
to
the
:
mod
:`
html
.
entities
`
module
.
The
dictionary
is
'>'
``)
has
been
added
to
the
:
mod
:`
html
.
entities
`
module
.
The
dictionary
is
now
also
used
by
:
class
:`~
html
.
parser
.
HTMLParser
`.
(
Contributed
by
Ezio
now
also
used
by
:
class
:`~
html
.
parser
.
HTMLParser
`.
(
Contributed
by
Ezio
Melotti
in
:
issue
:`
11113
`
and
:
issue
:`
15156
`)
Melotti
in
:
issue
:`
11113
`
and
:
issue
:`
15156
`
.
)
imaplib
imaplib
...
@@ -1451,7 +1451,7 @@ imaplib
...
@@ -1451,7 +1451,7 @@ imaplib
The
:
class
:`~
imaplib
.
IMAP4_SSL
`
constructor
now
accepts
an
SSLContext
The
:
class
:`~
imaplib
.
IMAP4_SSL
`
constructor
now
accepts
an
SSLContext
parameter
to
control
parameters
of
the
secure
channel
.
parameter
to
control
parameters
of
the
secure
channel
.
(
Contributed
by
Sijin
Joseph
in
:
issue
:`
8808
`)
(
Contributed
by
Sijin
Joseph
in
:
issue
:`
8808
`
.
)
inspect
inspect
...
@@ -1462,14 +1462,14 @@ reports the current binding of all names referenced from the function body and
...
@@ -1462,14 +1462,14 @@ reports the current binding of all names referenced from the function body and
where
those
names
were
resolved
,
making
it
easier
to
verify
correct
internal
where
those
names
were
resolved
,
making
it
easier
to
verify
correct
internal
state
when
testing
code
that
relies
on
stateful
closures
.
state
when
testing
code
that
relies
on
stateful
closures
.
(
Contributed
by
Meador
Inge
and
Nick
Coghlan
in
:
issue
:`
13062
`)
(
Contributed
by
Meador
Inge
and
Nick
Coghlan
in
:
issue
:`
13062
`
.
)
A
new
:
func
:`~
inspect
.
getgeneratorlocals
`
function
has
been
added
.
This
A
new
:
func
:`~
inspect
.
getgeneratorlocals
`
function
has
been
added
.
This
function
reports
the
current
binding
of
local
variables
in
the
generator
's
function
reports
the
current
binding
of
local
variables
in
the
generator
's
stack frame, making it easier to verify correct internal state when testing
stack frame, making it easier to verify correct internal state when testing
generators.
generators.
(Contributed by Meador Inge in :issue:`15153`)
(Contributed by Meador Inge in :issue:`15153`
.
)
io
io
--
--
...
@@ -1478,7 +1478,7 @@ The :func:`~io.open` function has a new ``'x'`` mode that can be used to
...
@@ -1478,7 +1478,7 @@ The :func:`~io.open` function has a new ``'x'`` mode that can be used to
exclusively create a new file, and raise a :exc:`FileExistsError` if the file
exclusively create a new file, and raise a :exc:`FileExistsError` if the file
already exists. It is based on the C11 '
x
' mode to fopen().
already exists. It is based on the C11 '
x
' mode to fopen().
(Contributed by David Townshend in :issue:`12760`)
(Contributed by David Townshend in :issue:`12760`
.
)
The constructor of the :class:`~io.TextIOWrapper` class has a new
The constructor of the :class:`~io.TextIOWrapper` class has a new
*write_through* optional argument. If *write_through* is ``True``, calls to
*write_through* optional argument. If *write_through* is ``True``, calls to
...
@@ -1513,7 +1513,7 @@ math
...
@@ -1513,7 +1513,7 @@ math
The :mod:`math` module has a new function, :func:`~math.log2`, which returns
The :mod:`math` module has a new function, :func:`~math.log2`, which returns
the base-2 logarithm of *x*.
the base-2 logarithm of *x*.
(Written by Mark Dickinson in :issue:`11888`
).
(Written by Mark Dickinson in :issue:`11888`
.)
mmap
mmap
...
@@ -1567,7 +1567,7 @@ connection when done::
...
@@ -1567,7 +1567,7 @@ connection when done::
('
211
1755
1
1755
gmane
.
comp
.
python
.
committers
', 1755, 1, 1755, '
gmane
.
comp
.
python
.
committers
')
('
211
1755
1
1755
gmane
.
comp
.
python
.
committers
', 1755, 1, 1755, '
gmane
.
comp
.
python
.
committers
')
>>>
>>>
(Contributed by Giampaolo Rodolà in :issue:`9795`)
(Contributed by Giampaolo Rodolà in :issue:`9795`
.
)
os
os
...
@@ -1744,24 +1744,24 @@ sched
...
@@ -1744,24 +1744,24 @@ sched
set
to
False
makes
the
method
execute
the
scheduled
events
due
to
expire
set
to
False
makes
the
method
execute
the
scheduled
events
due
to
expire
soonest
(
if
any
)
and
then
return
immediately
.
soonest
(
if
any
)
and
then
return
immediately
.
This
is
useful
in
case
you
want
to
use
the
:
class
:`~
sched
.
scheduler
`
in
This
is
useful
in
case
you
want
to
use
the
:
class
:`~
sched
.
scheduler
`
in
non
-
blocking
applications
.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
13449
`)
non
-
blocking
applications
.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
13449
`
.
)
*
:
class
:`~
sched
.
scheduler
`
class
can
now
be
safely
used
in
multi
-
threaded
*
:
class
:`~
sched
.
scheduler
`
class
can
now
be
safely
used
in
multi
-
threaded
environments
.
(
Contributed
by
Josiah
Carlson
and
Giampaolo
Rodol
à
in
environments
.
(
Contributed
by
Josiah
Carlson
and
Giampaolo
Rodol
à
in
:
issue
:`
8684
`)
:
issue
:`
8684
`
.
)
*
*
timefunc
*
and
*
delayfunct
*
parameters
of
:
class
:`~
sched
.
scheduler
`
class
*
*
timefunc
*
and
*
delayfunct
*
parameters
of
:
class
:`~
sched
.
scheduler
`
class
constructor
are
now
optional
and
defaults
to
:
func
:`
time
.
time
`
and
constructor
are
now
optional
and
defaults
to
:
func
:`
time
.
time
`
and
:
func
:`
time
.
sleep
`
respectively
.
(
Contributed
by
Chris
Clark
in
:
func
:`
time
.
sleep
`
respectively
.
(
Contributed
by
Chris
Clark
in
:
issue
:`
13245
`)
:
issue
:`
13245
`
.
)
*
:
meth
:`~
sched
.
scheduler
.
enter
`
and
:
meth
:`~
sched
.
scheduler
.
enterabs
`
*
:
meth
:`~
sched
.
scheduler
.
enter
`
and
:
meth
:`~
sched
.
scheduler
.
enterabs
`
*
argument
*
parameter
is
now
optional
.
(
Contributed
by
Chris
Clark
in
*
argument
*
parameter
is
now
optional
.
(
Contributed
by
Chris
Clark
in
:
issue
:`
13245
`)
:
issue
:`
13245
`
.
)
*
:
meth
:`~
sched
.
scheduler
.
enter
`
and
:
meth
:`~
sched
.
scheduler
.
enterabs
`
*
:
meth
:`~
sched
.
scheduler
.
enter
`
and
:
meth
:`~
sched
.
scheduler
.
enterabs
`
now
accept
a
*
kwargs
*
parameter
.
(
Contributed
by
Chris
Clark
in
now
accept
a
*
kwargs
*
parameter
.
(
Contributed
by
Chris
Clark
in
:
issue
:`
13245
`)
:
issue
:`
13245
`
.
)
select
select
...
@@ -1787,10 +1787,10 @@ shutil
...
@@ -1787,10 +1787,10 @@ shutil
*
New
functions
:
*
New
functions
:
*
:
func
:`~
shutil
.
disk_usage
`:
provides
total
,
used
and
free
disk
space
*
:
func
:`~
shutil
.
disk_usage
`:
provides
total
,
used
and
free
disk
space
statistics
.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
12442
`
)
statistics
.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
12442
`.
)
*
:
func
:`~
shutil
.
chown
`:
allows
one
to
change
user
and
/
or
group
of
the
given
*
:
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
path
also
specifying
the
user
/
group
names
and
not
only
their
numeric
ids
.
(
Contributed
by
Sandro
Tosi
in
:
issue
:`
12191
`
)
ids
.
(
Contributed
by
Sandro
Tosi
in
:
issue
:`
12191
`.
)
*
:
func
:`
shutil
.
get_terminal_size
`:
returns
the
size
of
the
terminal
window
*
:
func
:`
shutil
.
get_terminal_size
`:
returns
the
size
of
the
terminal
window
to
which
the
interpreter
is
attached
.
(
Contributed
by
Zbigniew
to
which
the
interpreter
is
attached
.
(
Contributed
by
Zbigniew
J
ę
drzejewski
-
Szmek
in
:
issue
:`
13609
`.)
J
ę
drzejewski
-
Szmek
in
:
issue
:`
13609
`.)
...
@@ -1813,7 +1813,7 @@ shutil
...
@@ -1813,7 +1813,7 @@ shutil
* :func:`~shutil.rmtree` is now resistant to symlink attacks on platforms
* :func:`~shutil.rmtree` is now resistant to symlink attacks on platforms
which support the new ``dir_fd`` parameter in :func:`os.open` and
which support the new ``dir_fd`` parameter in :func:`os.open` and
:func:`os.unlink`. (Contributed by Martin von Löwis and Hynek Schlawack
:func:`os.unlink`.
(Contributed by Martin von Löwis and Hynek Schlawack
in :issue:`4489`.)
in :issue:`4489`.)
...
@@ -1867,7 +1867,7 @@ by Giampaolo Rodolà in :issue:`11289`.)
...
@@ -1867,7 +1867,7 @@ by Giampaolo Rodolà in :issue:`11289`.)
The :class:`~smtplib.SMTP_SSL` constructor and the :meth:`~smtplib.SMTP.starttls`
The :class:`~smtplib.SMTP_SSL` constructor and the :meth:`~smtplib.SMTP.starttls`
method now accept an SSLContext parameter to control parameters of the secure
method now accept an SSLContext parameter to control parameters of the secure
channel. (Contributed by Kasun Herath in :issue:`8809`)
channel. (Contributed by Kasun Herath in :issue:`8809`
.
)
socket
socket
...
@@ -1887,7 +1887,7 @@ socket
...
@@ -1887,7 +1887,7 @@ socket
(http://en.wikipedia.org/wiki/Socketcan), on Linux
(http://en.wikipedia.org/wiki/Socketcan), on Linux
(http://lwn.net/Articles/253425).
(http://lwn.net/Articles/253425).
(Contributed by Matthias Fuchs, updated by Tiago Gonçalves in :issue:`10141`)
(Contributed by Matthias Fuchs, updated by Tiago Gonçalves in :issue:`10141`
.
)
* The :class:`~socket.socket` class now supports the PF_RDS protocol family
* The :class:`~socket.socket` class now supports the PF_RDS protocol family
(http://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and
(http://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and
...
@@ -1929,37 +1929,37 @@ ssl
...
@@ -1929,37 +1929,37 @@ ssl
pseudo-random bytes.
pseudo-random bytes.
* :func:`~ssl.RAND_pseudo_bytes`: generate pseudo-random bytes.
* :func:`~ssl.RAND_pseudo_bytes`: generate pseudo-random bytes.
(Contributed by Victor Stinner in :issue:`12049`)
(Contributed by Victor Stinner in :issue:`12049`
.
)
* The :mod:`ssl` module now exposes a finer-grained exception hierarchy
* The :mod:`ssl` module now exposes a finer-grained exception hierarchy
in order to make it easier to inspect the various kinds of errors.
in order to make it easier to inspect the various kinds of errors.
(Contributed by Antoine Pitrou in :issue:`11183`)
(Contributed by Antoine Pitrou in :issue:`11183`
.
)
* :meth:`~ssl.SSLContext.load_cert_chain` now accepts a *password* argument
* :meth:`~ssl.SSLContext.load_cert_chain` now accepts a *password* argument
to be used if the private key is encrypted.
to be used if the private key is encrypted.
(Contributed by Adam Simpkins in :issue:`12803`)
(Contributed by Adam Simpkins in :issue:`12803`
.
)
* Diffie-Hellman key exchange, both regular and Elliptic Curve-based, is
* Diffie-Hellman key exchange, both regular and Elliptic Curve-based, is
now supported through the :meth:`~ssl.SSLContext.load_dh_params` and
now supported through the :meth:`~ssl.SSLContext.load_dh_params` and
:meth:`~ssl.SSLContext.set_ecdh_curve` methods.
:meth:`~ssl.SSLContext.set_ecdh_curve` methods.
(Contributed by Antoine Pitrou in :issue:`13626` and :issue:`13627`)
(Contributed by Antoine Pitrou in :issue:`13626` and :issue:`13627`
.
)
* SSL sockets have a new :meth:`~ssl.SSLSocket.get_channel_binding` method
* SSL sockets have a new :meth:`~ssl.SSLSocket.get_channel_binding` method
allowing the implementation of certain authentication mechanisms such as
allowing the implementation of certain authentication mechanisms such as
SCRAM-SHA-1-PLUS. (Contributed by Jacek Konieczny in :issue:`12551`)
SCRAM-SHA-1-PLUS. (Contributed by Jacek Konieczny in :issue:`12551`
.
)
* You can query the SSL compression algorithm used by an SSL socket, thanks
* You can query the SSL compression algorithm used by an SSL socket, thanks
to its new :meth:`~ssl.SSLSocket.compression` method. The new attribute
to its new :meth:`~ssl.SSLSocket.compression` method. The new attribute
:attr:`~ssl.OP_NO_COMPRESSION` can be used to disable compression.
:attr:`~ssl.OP_NO_COMPRESSION` can be used to disable compression.
(Contributed by Antoine Pitrou in :issue:`13634`)
(Contributed by Antoine Pitrou in :issue:`13634`
.
)
* Support has been added for the Next Procotol Negotiation extension using
* Support has been added for the Next Procotol Negotiation extension using
the :meth:`ssl.SSLContext.set_npn_protocols` method.
the :meth:`ssl.SSLContext.set_npn_protocols` method.
(Contributed by Colin Marc in :issue:`14204`)
(Contributed by Colin Marc in :issue:`14204`
.
)
* SSL errors can now be introspected more easily thanks to
* SSL errors can now be introspected more easily thanks to
:attr:`~ssl.SSLError.library` and :attr:`~ssl.SSLError.reason` attributes.
:attr:`~ssl.SSLError.library` and :attr:`~ssl.SSLError.reason` attributes.
(Contributed by Antoine Pitrou in :issue:`14837`)
(Contributed by Antoine Pitrou in :issue:`14837`
.
)
* The :func:`~ssl.get_server_certificate` function now supports IPv6.
* The :func:`~ssl.get_server_certificate` function now supports IPv6.
(Contributed by Charles-François Natali in :issue:`11811`.)
(Contributed by Charles-François Natali in :issue:`11811`.)
...
@@ -1976,7 +1976,7 @@ The undocumented tarfile.filemode function has been moved to
...
@@ -1976,7 +1976,7 @@ The undocumented tarfile.filemode function has been moved to
:func:`stat.filemode`. It can be used to convert a file'
s
mode
to
a
string
of
:func:`stat.filemode`. It can be used to convert a file'
s
mode
to
a
string
of
the
form
'-rwxrwxrwx'
.
the
form
'-rwxrwxrwx'
.
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
14807
`)
(
Contributed
by
Giampaolo
Rodol
à
in
:
issue
:`
14807
`
.
)
struct
struct
...
@@ -2035,8 +2035,8 @@ threading
...
@@ -2035,8 +2035,8 @@ threading
:class:`threading.Condition`, :class:`threading.Semaphore`,
:class:`threading.Condition`, :class:`threading.Semaphore`,
:class:`threading.BoundedSemaphore`, :class:`threading.Event`, and
:class:`threading.BoundedSemaphore`, :class:`threading.Event`, and
:class:`threading.Timer`, all of which used to be factory functions returning a
:class:`threading.Timer`, all of which used to be factory functions returning a
class instance, are now classes and may be subclassed. (Contributed by Éric
class instance, are now classes and may be subclassed.
(Contributed by Éric
Araujo in :issue:`10968`
).
Araujo in :issue:`10968`
.)
The :class:`threading.Thread` constructor now accepts a ``daemon`` keyword
The :class:`threading.Thread` constructor now accepts a ``daemon`` keyword
argument to override the default behavior of inheriting the ``deamon`` flag
argument to override the default behavior of inheriting the ``deamon`` flag
...
@@ -2066,7 +2066,7 @@ Other new functions:
...
@@ -2066,7 +2066,7 @@ Other new functions:
* :func:`~time.clock_getres`, :func:`~time.clock_gettime` and
* :func:`~time.clock_getres`, :func:`~time.clock_gettime` and
:func:`~time.clock_settime` functions with ``CLOCK_xxx`` constants.
:func:`~time.clock_settime` functions with ``CLOCK_xxx`` constants.
(Contributed by Victor Stinner in :issue:`10278`)
(Contributed by Victor Stinner in :issue:`10278`
.
)
To improve cross platform consistency, :func:`~time.sleep` now raises a
To improve cross platform consistency, :func:`~time.sleep` now raises a
:exc:`ValueError` when passed a negative sleep value. Previously this was an
:exc:`ValueError` when passed a negative sleep value. Previously this was an
...
@@ -2090,7 +2090,7 @@ unittest
...
@@ -2090,7 +2090,7 @@ unittest
:meth:`.assertRaises`, :meth:`.assertRaisesRegex`, :meth:`.assertWarns`, and
:meth:`.assertRaises`, :meth:`.assertRaisesRegex`, :meth:`.assertWarns`, and
:meth:`.assertWarnsRegex` now accept a keyword argument *msg* when used as
:meth:`.assertWarnsRegex` now accept a keyword argument *msg* when used as
context managers. (Contributed by Ezio Melotti and Winston Ewert in
context managers. (Contributed by Ezio Melotti and Winston Ewert in
:issue:`10775`)
:issue:`10775`
.
)
:meth:`unittest.TestCase.run` now returns the :class:`~unittest.TestResult`
:meth:`unittest.TestCase.run` now returns the :class:`~unittest.TestResult`
object.
object.
...
@@ -2117,7 +2117,7 @@ The :mod:`webbrowser` module supports more "browsers": Google Chrome (named
...
@@ -2117,7 +2117,7 @@ The :mod:`webbrowser` module supports more "browsers": Google Chrome (named
and the generic launchers :program:`xdg-open`, from the FreeDesktop.org
and the generic launchers :program:`xdg-open`, from the FreeDesktop.org
project, and :program:`gvfs-open`, which is the default URI handler for GNOME
project, and :program:`gvfs-open`, which is the default URI handler for GNOME
3. (The former contributed by Arnaud Calmettes in :issue:`13620`, the latter
3. (The former contributed by Arnaud Calmettes in :issue:`13620`, the latter
by Matthias Klose in :issue:`14493`)
by Matthias Klose in :issue:`14493`
.
)
xml.etree.ElementTree
xml.etree.ElementTree
...
@@ -2160,7 +2160,7 @@ Major performance enhancements have been added:
...
@@ -2160,7 +2160,7 @@ Major performance enhancements have been added:
* UTF-8 is now 2x to 4x faster. UTF-16 encoding is now up to 10x faster.
* UTF-8 is now 2x to 4x faster. UTF-16 encoding is now up to 10x faster.
(
c
ontributed by Serhiy Storchaka, :issue:`14624`, :issue:`14738` and
(
C
ontributed by Serhiy Storchaka, :issue:`14624`, :issue:`14738` and
:issue:`15026`.)
:issue:`15026`.)
...
...
Doc/whatsnew/3.4.rst
View file @
e5cf4868
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
* It's helpful to add the bug/patch number as a comment:
* It's helpful to add the bug/patch number as a comment:
The :ref:`~socket.transmogrify()` function was added to the
The :ref:`~socket.transmogrify()` function was added to the
:mod:`socket` module. (Contributed by P.Y. Developer in :issue:`12345`.)
:mod:`socket` module.
(Contributed by P.Y. Developer in :issue:`12345`.)
This saves the maintainer the effort of going through the Mercurial log
This saves the maintainer the effort of going through the Mercurial log
when researching a change.
when researching a change.
...
@@ -372,7 +372,7 @@ The binary and text transforms provided in the standard library are detailed
...
@@ -372,7 +372,7 @@ The binary and text transforms provided in the standard library are detailed
in :ref:`binary-transforms` and :ref:`text-transforms`.
in :ref:`binary-transforms` and :ref:`text-transforms`.
(Contributed by Nick Coghlan in :issue:`7475`, :issue:`17827`,
(Contributed by Nick Coghlan in :issue:`7475`, :issue:`17827`,
:issue:`17828` and :issue:`19619`)
:issue:`17828` and :issue:`19619`
.
)
.. _whatsnew-pep-451:
.. _whatsnew-pep-451:
...
@@ -414,14 +414,14 @@ Some smaller changes made to the core Python language are:
...
@@ -414,14 +414,14 @@ Some smaller changes made to the core Python language are:
* Module ``__file__`` attributes (and related values) should now always
* Module ``__file__`` attributes (and related values) should now always
contain absolute paths by default, with the sole exception of
contain absolute paths by default, with the sole exception of
``__main__.__file__`` when a script has been executed directly using
``__main__.__file__`` when a script has been executed directly using
a relative path
(Contributed by Brett Cannon in :issue:`18416`).
a relative path
. (Contributed by Brett Cannon in :issue:`18416`.)
* All the UTF-\* codecs (except UTF-7) now reject surrogates during both
* All the UTF-\* codecs (except UTF-7) now reject surrogates during both
encoding and decoding unless the ``surrogatepass`` error handler is used,
encoding and decoding unless the ``surrogatepass`` error handler is used,
with the exception of the UTF-16 decoder (which accepts valid surrogate pairs)
with the exception of the UTF-16 decoder (which accepts valid surrogate pairs)
and the UTF-16 encoder (which produces them while encoding non-BMP characters).
and the UTF-16 encoder (which produces them while encoding non-BMP characters).
Contributed by Victor Stinner, Kang-Hao (Kenny) Lu and Serhiy Storchaka in
(
Contributed by Victor Stinner, Kang-Hao (Kenny) Lu and Serhiy Storchaka in
:issue:`12892`.
:issue:`12892`.
)
* New German EBCDIC :ref:`codec <standard-encodings>` ``cp273``. (Contributed
* New German EBCDIC :ref:`codec <standard-encodings>` ``cp273``. (Contributed
by Michael Bierenfeld and Andrew Kuchling in :issue:`1097797`.)
by Michael Bierenfeld and Andrew Kuchling in :issue:`1097797`.)
...
@@ -633,8 +633,8 @@ audioop
...
@@ -633,8 +633,8 @@ audioop
in :issue:`12866`.)
in :issue:`12866`.)
New :func:`~audioop.byteswap` function converts big-endian samples to
New :func:`~audioop.byteswap` function converts big-endian samples to
little-endian and vice versa (Contributed by Serhiy Storchaka in
little-endian and vice versa
.
(Contributed by Serhiy Storchaka in
:issue:`19641`
).
:issue:`19641`
.)
All :mod:`audioop` functions now accept any :term:`bytes-like object`. Strings
All :mod:`audioop` functions now accept any :term:`bytes-like object`. Strings
are not accepted: they didn't work before, now they raise an error right away.
are not accepted: they didn't work before, now they raise an error right away.
...
@@ -681,8 +681,8 @@ contextlib
...
@@ -681,8 +681,8 @@ contextlib
The new :class:`contextlib.suppress` context manager helps to clarify the
The new :class:`contextlib.suppress` context manager helps to clarify the
intent of code that deliberately suppresses exceptions from a single
intent of code that deliberately suppresses exceptions from a single
statement. (Contributed by Raymond Hettinger in :issue:`15806` and
statement.
(Contributed by Raymond Hettinger in :issue:`15806` and
Zero Piraeus in :issue:`19266`)
Zero Piraeus in :issue:`19266`
.
)
The new :func:`contextlib.redirect_stdout` context manager makes it easier
The new :func:`contextlib.redirect_stdout` context manager makes it easier
for utility scripts to handle inflexible APIs that write their output to
for utility scripts to handle inflexible APIs that write their output to
...
@@ -693,7 +693,7 @@ The latter can be especially useful, for example, to capture output
...
@@ -693,7 +693,7 @@ The latter can be especially useful, for example, to capture output
from a function that was written to implement a command line interface.
from a function that was written to implement a command line interface.
It is recommended only for utility scripts because it affects the
It is recommended only for utility scripts because it affects the
global state of :data:`sys.stdout`. (Contributed by Raymond Hettinger
global state of :data:`sys.stdout`. (Contributed by Raymond Hettinger
in :issue:`15805`)
in :issue:`15805`
.
)
The :mod:`contextlib` documentation has also been updated to include a
The :mod:`contextlib` documentation has also been updated to include a
:ref:`discussion <single-use-reusable-and-reentrant-cms>` of the
:ref:`discussion <single-use-reusable-and-reentrant-cms>` of the
...
@@ -765,7 +765,7 @@ traceback (that is, ``print(Bytecode.from_traceback(tb).dis())`` is equivalent
...
@@ -765,7 +765,7 @@ traceback (that is, ``print(Bytecode.from_traceback(tb).dis())`` is equivalent
to ``distb(tb)``).
to ``distb(tb)``).
(Contributed by Nick Coghlan, Ryan Kelly and Thomas Kluyver in :issue:`11816`
(Contributed by Nick Coghlan, Ryan Kelly and Thomas Kluyver in :issue:`11816`
and Claudiu Popa in :issue:`17916`)
and Claudiu Popa in :issue:`17916`
.
)
New function :func:`~dis.stack_effect` computes the effect on the Python stack
New function :func:`~dis.stack_effect` computes the effect on the Python stack
of a given opcode and argument, information that is not otherwise available.
of a given opcode and argument, information that is not otherwise available.
...
@@ -855,7 +855,7 @@ application to descriptors, just as :func:`~functools.partial` provides
...
@@ -855,7 +855,7 @@ application to descriptors, just as :func:`~functools.partial` provides
for normal callables. The new descriptor also makes it easier to get
for normal callables. The new descriptor also makes it easier to get
arbitrary callables (including :func:`~functools.partial` instances)
arbitrary callables (including :func:`~functools.partial` instances)
to behave like normal instance methods when included in a class definition.
to behave like normal instance methods when included in a class definition.
(Contributed by Alon Horev and Nick Coghlan in :issue:`4331`)
(Contributed by Alon Horev and Nick Coghlan in :issue:`4331`
.
)
.. _whatsnew-singledispatch:
.. _whatsnew-singledispatch:
...
@@ -903,7 +903,7 @@ hashlib
...
@@ -903,7 +903,7 @@ hashlib
A new :func:`hashlib.pbkdf2_hmac` function provides
A new :func:`hashlib.pbkdf2_hmac` function provides
the `PKCS#5 password-based key derivation function 2
the `PKCS#5 password-based key derivation function 2
<http://en.wikipedia.org/wiki/PBKDF2>`_. (Contributed by Christian
<http://en.wikipedia.org/wiki/PBKDF2>`_. (Contributed by Christian
Heimes in :issue:`18582`)
Heimes in :issue:`18582`
.
)
The :attr:`~hashlib.hash.name` attribute of :mod:`hashlib` hash objects is now
The :attr:`~hashlib.hash.name` attribute of :mod:`hashlib` hash objects is now
a formally supported interface. It has always existed in CPython's
a formally supported interface. It has always existed in CPython's
...
@@ -939,17 +939,17 @@ html
...
@@ -939,17 +939,17 @@ html
New function :func:`~html.unescape` function converts HTML5 character references to
New function :func:`~html.unescape` function converts HTML5 character references to
the corresponding Unicode characters. (Contributed by Ezio Melotti in
the corresponding Unicode characters. (Contributed by Ezio Melotti in
:issue:`2927`)
:issue:`2927`
.
)
:class:`~html.parser.HTMLParser` accepts a new keyword argument
:class:`~html.parser.HTMLParser` accepts a new keyword argument
*convert_charrefs* that, when ``True``, automatically converts all character
*convert_charrefs* that, when ``True``, automatically converts all character
references. For backward-compatibility, its value defaults to ``False``, but
references. For backward-compatibility, its value defaults to ``False``, but
it will change to ``True`` in a future version of Python, so you are invited to
it will change to ``True`` in a future version of Python, so you are invited to
set it explicitly and update your code to use this new feature. (Contributed
set it explicitly and update your code to use this new feature. (Contributed
by Ezio Melotti in :issue:`13633`)
by Ezio Melotti in :issue:`13633`
.
)
The *strict* argument of :class:`~html.parser.HTMLParser` is now deprecated.
The *strict* argument of :class:`~html.parser.HTMLParser` is now deprecated.
(Contributed by Ezio Melotti in :issue:`15114`)
(Contributed by Ezio Melotti in :issue:`15114`
.
)
http
http
...
@@ -1015,19 +1015,19 @@ inspect
...
@@ -1015,19 +1015,19 @@ inspect
The :mod:`inspect` module now offers a basic :ref:`command line interface
The :mod:`inspect` module now offers a basic :ref:`command line interface
<inspect-module-cli>` to quickly display source code and other
<inspect-module-cli>` to quickly display source code and other
information for modules, classes and functions. (Contributed by Claudiu Popa
information for modules, classes and functions.
(Contributed by Claudiu Popa
and Nick Coghlan in :issue:`18626`)
and Nick Coghlan in :issue:`18626`
.
)
:func:`~inspect.unwrap` makes it easy to unravel wrapper function chains
:func:`~inspect.unwrap` makes it easy to unravel wrapper function chains
created by :func:`functools.wraps` (and any other API that sets the
created by :func:`functools.wraps` (and any other API that sets the
``__wrapped__`` attribute on a wrapper function). (Contributed by
``__wrapped__`` attribute on a wrapper function).
(Contributed by
Daniel Urban, Aaron Iles and Nick Coghlan in :issue:`13266`)
Daniel Urban, Aaron Iles and Nick Coghlan in :issue:`13266`
.
)
As part of the implementation of the new :mod:`enum` module, the
As part of the implementation of the new :mod:`enum` module, the
:mod:`inspect` module now has substantially better support for custom
:mod:`inspect` module now has substantially better support for custom
``__dir__`` methods and dynamic class attributes provided through
``__dir__`` methods and dynamic class attributes provided through
metaclasses (Contributed by Ethan Furman in :issue:`18929` and
metaclasses
.
(Contributed by Ethan Furman in :issue:`18929` and
:issue:`19030`)
:issue:`19030`
.
)
:func:`~inspect.getfullargspec` and :func:`~inspect.getargspec`
:func:`~inspect.getfullargspec` and :func:`~inspect.getargspec`
now use the :func:`~inspect.signature` API. This allows them to
now use the :func:`~inspect.signature` API. This allows them to
...
@@ -1038,11 +1038,11 @@ clinic, :func:`functools.partial` objects and more. Note that, unlike
...
@@ -1038,11 +1038,11 @@ clinic, :func:`functools.partial` objects and more. Note that, unlike
attributes, and report the already bound first argument for bound methods,
attributes, and report the already bound first argument for bound methods,
so it is still necessary to update your code to use
so it is still necessary to update your code to use
:func:`~inspect.signature` directly if those features are desired.
:func:`~inspect.signature` directly if those features are desired.
(Contributed by Yury Selivanov in :issue:`17481`)
(Contributed by Yury Selivanov in :issue:`17481`
.
)
:func:`~inspect.signature` now supports duck types of CPython functions,
:func:`~inspect.signature` now supports duck types of CPython functions,
which adds support for functions compiled with Cython. (Contributed
which adds support for functions compiled with Cython.
(Contributed
by Stefan Behnel and Yury Selivanov in :issue:`17159`)
by Stefan Behnel and Yury Selivanov in :issue:`17159`
.
)
ipaddress
ipaddress
...
@@ -1082,7 +1082,7 @@ the application modifies the configuration before passing it to
...
@@ -1082,7 +1082,7 @@ the application modifies the configuration before passing it to
Logging configuration data received from a socket via the
Logging configuration data received from a socket via the
:func:`logging.config.listen` function can now be validated before being
:func:`logging.config.listen` function can now be validated before being
processed by supplying a verification function as the argument to the new
processed by supplying a verification function as the argument to the new
*verify* keyword argument. (Contributed by Vinay Sajip in :issue:`15452`.)
*verify* keyword argument.
(Contributed by Vinay Sajip in :issue:`15452`.)
.. _whatsnew-marshal-3:
.. _whatsnew-marshal-3:
...
@@ -1120,7 +1120,7 @@ always used on Windows. New function
...
@@ -1120,7 +1120,7 @@ always used on Windows. New function
:func:`~multiprocessing.get_all_start_methods` reports all start methods
:func:`~multiprocessing.get_all_start_methods` reports all start methods
available on the platform, :func:`~multiprocessing.get_start_method` reports
available on the platform, :func:`~multiprocessing.get_start_method` reports
the current start method, and :func:`~multiprocessing.set_start_method` sets
the current start method, and :func:`~multiprocessing.set_start_method` sets
the start method. (Contributed by Richard Oudkerk in :issue:`8713`
).
the start method. (Contributed by Richard Oudkerk in :issue:`8713`
.)
:mod:`multiprocessing` also now has the concept of a ``context``, which
:mod:`multiprocessing` also now has the concept of a ``context``, which
determines how child processes are created. New function
determines how child processes are created. New function
...
@@ -1141,7 +1141,7 @@ inherit unneeded handles/file descriptors from their parents (part of
...
@@ -1141,7 +1141,7 @@ inherit unneeded handles/file descriptors from their parents (part of
when using the ``spawn`` or ``forkserver`` start methods. This resolves some
when using the ``spawn`` or ``forkserver`` start methods. This resolves some
edge cases where combining multiprocessing, the ``-m`` command line switch,
edge cases where combining multiprocessing, the ``-m`` command line switch,
and explicit relative imports could cause obscure failures in child
and explicit relative imports could cause obscure failures in child
processes.
(Contributed by Nick Coghlan in :issue:`19946`
)
processes.
(Contributed by Nick Coghlan in :issue:`19946`.
)
operator
operator
...
@@ -1176,7 +1176,7 @@ Victor Stinner, and Charles-François Natali in :issue:`17914`.)
...
@@ -1176,7 +1176,7 @@ Victor Stinner, and Charles-François Natali in :issue:`17914`.)
Windows). (Contributed by Brian Curtin in :issue:`11939`.)
Windows). (Contributed by Brian Curtin in :issue:`11939`.)
:func:`os.path.ismount` now recognizes volumes mounted below a drive
:func:`os.path.ismount` now recognizes volumes mounted below a drive
root on Windows. (Contributed by Tim Golden in :issue:`9035`.)
root on Windows.
(Contributed by Tim Golden in :issue:`9035`.)
:func:`os.open` supports two new flags on platforms that provide them,
:func:`os.open` supports two new flags on platforms that provide them,
:data:`~os.O_PATH` (un-opened file descriptor), and :data:`~os.O_TMPFILE`
:data:`~os.O_PATH` (un-opened file descriptor), and :data:`~os.O_TMPFILE`
...
@@ -1230,7 +1230,7 @@ stdlib serialization protocols, with new :func:`~plistlib.load`,
...
@@ -1230,7 +1230,7 @@ stdlib serialization protocols, with new :func:`~plistlib.load`,
functions. (The older API is now deprecated.) In addition to the already
functions. (The older API is now deprecated.) In addition to the already
supported XML plist format (:data:`~plistlib.FMT_XML`), it also now supports
supported XML plist format (:data:`~plistlib.FMT_XML`), it also now supports
the binary plist format (:data:`~plistlib.FMT_BINARY`). (Contributed by Ronald
the binary plist format (:data:`~plistlib.FMT_BINARY`). (Contributed by Ronald
Oussoren and others in :issue:`14455`
).
Oussoren and others in :issue:`14455`
.)
poplib
poplib
...
@@ -1254,7 +1254,7 @@ sequence elements as will fit within *width* on each (indented) line.
...
@@ -1254,7 +1254,7 @@ sequence elements as will fit within *width* on each (indented) line.
(Contributed by Serhiy Storchaka in :issue:`19132`.)
(Contributed by Serhiy Storchaka in :issue:`19132`.)
Long strings are now wrapped using Python's normal line continuation
Long strings are now wrapped using Python's normal line continuation
syntax. (Contributed by Antoine Pitrou in :issue:`17150`
).
syntax. (Contributed by Antoine Pitrou in :issue:`17150`
.)
pty
pty
...
@@ -1270,13 +1270,13 @@ pydoc
...
@@ -1270,13 +1270,13 @@ pydoc
The :mod:`pydoc` module is now based directly on the :func:`inspect.signature`
The :mod:`pydoc` module is now based directly on the :func:`inspect.signature`
introspection API, allowing it to provide signature information for a wider
introspection API, allowing it to provide signature information for a wider
variety of callable objects. This change also means that ``__wrapped__``
variety of callable objects. This change also means that ``__wrapped__``
attributes are now taken into account when displaying help information
attributes are now taken into account when displaying help information
.
(Contributed by Larry Hastings in :issue:`19674`)
(Contributed by Larry Hastings in :issue:`19674`
.
)
The :mod:`pydoc` module no longer displays the ``self`` parameter for
The :mod:`pydoc` module no longer displays the ``self`` parameter for
already bound methods. Instead, it aims to always display the exact current
already bound methods. Instead, it aims to always display the exact current
signature of the supplied callable (Contributed by Larry Hastings in
signature of the supplied callable
.
(Contributed by Larry Hastings in
:issue:`20710`)
:issue:`20710`
.
)
In addition to the changes that have been made to :mod:`pydoc` directly,
In addition to the changes that have been made to :mod:`pydoc` directly,
its handling of custom ``__dir__`` methods and various descriptor
its handling of custom ``__dir__`` methods and various descriptor
...
@@ -1372,7 +1372,7 @@ smtplib
...
@@ -1372,7 +1372,7 @@ smtplib
:exc:`~smtplib.SMTPException` is now a subclass of :exc:`OSError`, which allows
:exc:`~smtplib.SMTPException` is now a subclass of :exc:`OSError`, which allows
both socket level errors and SMTP protocol level errors to be caught in one
both socket level errors and SMTP protocol level errors to be caught in one
try/except statement by code that only cares whether or not an error occurred.
try/except statement by code that only cares whether or not an error occurred.
(Contributed by Ned Jackson Lovely in :issue:`2118`
).
(Contributed by Ned Jackson Lovely in :issue:`2118`
.)
socket
socket
...
@@ -1412,7 +1412,7 @@ ssl
...
@@ -1412,7 +1412,7 @@ ssl
:data:`~ssl.PROTOCOL_TLSv1_1` and :data:`~ssl.PROTOCOL_TLSv1_2` (TLSv1.1 and
:data:`~ssl.PROTOCOL_TLSv1_1` and :data:`~ssl.PROTOCOL_TLSv1_2` (TLSv1.1 and
TLSv1.2 support) have been added; support for these protocols is only available if
TLSv1.2 support) have been added; support for these protocols is only available if
Python is linked with OpenSSL 1.0.1 or later. (Contributed by Michele Orrù and
Python is linked with OpenSSL 1.0.1 or later. (Contributed by Michele Orrù and
Antoine Pitrou in :issue:`16692`)
Antoine Pitrou in :issue:`16692`
.
)
.. _whatsnew34-sslcontext:
.. _whatsnew34-sslcontext:
...
@@ -1596,7 +1596,7 @@ traceback
...
@@ -1596,7 +1596,7 @@ traceback
A new :func:`traceback.clear_frames` function takes a traceback object
A new :func:`traceback.clear_frames` function takes a traceback object
and clears the local variables in all of the frames it references,
and clears the local variables in all of the frames it references,
reducing the amount of memory consumed. (Contributed by Andrew Kuchling in
reducing the amount of memory consumed. (Contributed by Andrew Kuchling in
:issue:`1565525`
).
:issue:`1565525`
.)
types
types
...
@@ -1619,7 +1619,7 @@ in :issue:`16423`.)
...
@@ -1619,7 +1619,7 @@ in :issue:`16423`.)
The http method that will be used by a :class:`~urllib.request.Request` class
The http method that will be used by a :class:`~urllib.request.Request` class
can now be specified by setting a :class:`~urllib.request.Request.method`
can now be specified by setting a :class:`~urllib.request.Request.method`
class attribute on the subclass. (Contributed by Jason R Coombs in
class attribute on the subclass.
(Contributed by Jason R Coombs in
:issue:`18978`.)
:issue:`18978`.)
:class:`~urllib.request.Request` objects are now reusable: if the
:class:`~urllib.request.Request` objects are now reusable: if the
...
@@ -1701,14 +1701,14 @@ or name, instead of only by position. (Contributed by Antoine Pitrou in
...
@@ -1701,14 +1701,14 @@ or name, instead of only by position. (Contributed by Antoine Pitrou in
:issue:`17015`.)
:issue:`17015`.)
:func:`~mock.mock_open` objects now have ``readline`` and ``readlines``
:func:`~mock.mock_open` objects now have ``readline`` and ``readlines``
methods. (Contributed by Toshio Kuratomi in :issue:`17467`.)
methods.
(Contributed by Toshio Kuratomi in :issue:`17467`.)
venv
venv
----
----
:mod:`venv` now includes activation scripts for the ``csh`` and ``fish``
:mod:`venv` now includes activation scripts for the ``csh`` and ``fish``
shells (Contributed by Andrew Svetlov in :issue:`15417`.)
shells
.
(Contributed by Andrew Svetlov in :issue:`15417`.)
:class:`~venv.EnvBuilder` and the :func:`~venv.create` convenience function
:class:`~venv.EnvBuilder` and the :func:`~venv.create` convenience function
take a new keyword argument *with_pip*, which defaults to ``False``, that
take a new keyword argument *with_pip*, which defaults to ``False``, that
...
@@ -1739,12 +1739,12 @@ weakref
...
@@ -1739,12 +1739,12 @@ weakref
-------
-------
New :class:`~weakref.WeakMethod` class simulates weak references to bound
New :class:`~weakref.WeakMethod` class simulates weak references to bound
methods. (Contributed by Antoine Pitrou in :issue:`14631`.)
methods.
(Contributed by Antoine Pitrou in :issue:`14631`.)
New :class:`~weakref.finalize` class makes it possible to register a callback
New :class:`~weakref.finalize` class makes it possible to register a callback
to be invoked when an object is garbage collected, without needing to
to be invoked when an object is garbage collected, without needing to
carefully manage the lifecycle of the weak reference itself. (Contributed by
carefully manage the lifecycle of the weak reference itself.
(Contributed by
Richard Oudkerk in :issue:`15528`)
Richard Oudkerk in :issue:`15528`
.
)
The callback, if any, associated with a :class:`~weakref.ref` is now
The callback, if any, associated with a :class:`~weakref.ref` is now
exposed via the :attr:`~weakref.ref.__callback__` attribute. (Contributed
exposed via the :attr:`~weakref.ref.__callback__` attribute. (Contributed
...
@@ -1879,16 +1879,16 @@ Other Build and C API Changes
...
@@ -1879,16 +1879,16 @@ Other Build and C API Changes
* The new :c:func:`PyType_GetSlot` function has been added to the stable ABI,
* The new :c:func:`PyType_GetSlot` function has been added to the stable ABI,
allowing retrieval of function pointers from named type slots when using
allowing retrieval of function pointers from named type slots when using
the limited API.
(Contributed by Martin von Löwis in :issue:`17162`
)
the limited API.
(Contributed by Martin von Löwis in :issue:`17162`.
)
* The new :c:func:`Py_SetStandardStreamEncoding` pre-initialization API
* The new :c:func:`Py_SetStandardStreamEncoding` pre-initialization API
allows applications embedding the CPython interpreter to reliably force
allows applications embedding the CPython interpreter to reliably force
a particular encoding and error handler for the standard streams
a particular encoding and error handler for the standard streams
.
(Contributed by Bastien Montagne and Nick Coghlan in :issue:`16129`)
(Contributed by Bastien Montagne and Nick Coghlan in :issue:`16129`
.
)
* Most Python C APIs that don't mutate string arguments are now correctly
* Most Python C APIs that don't mutate string arguments are now correctly
marked as accepting ``const char *`` rather than ``char *`` (Contributed
marked as accepting ``const char *`` rather than ``char *``
.
(Contributed
by Serhiy Storchaka in :issue:`1772673`
).
by Serhiy Storchaka in :issue:`1772673`
.)
* A new shell version of ``python-config`` can be used even when a python
* A new shell version of ``python-config`` can be used even when a python
interpreter is not available (for example, in cross compilation scenarios).
interpreter is not available (for example, in cross compilation scenarios).
...
@@ -1958,7 +1958,7 @@ Other Improvements
...
@@ -1958,7 +1958,7 @@ Other Improvements
* The ``-R`` option to the :ref:`python regression test suite <regrtest>` now
* The ``-R`` option to the :ref:`python regression test suite <regrtest>` now
also checks for memory allocation leaks, using
also checks for memory allocation leaks, using
:func:`sys.getallocatedblocks()`. (Contributed by Antoine Pitrou in
:func:`sys.getallocatedblocks()`. (Contributed by Antoine Pitrou in
:issue:`13390`
).
:issue:`13390`
.)
* ``python -m`` now works with namespace packages.
* ``python -m`` now works with namespace packages.
...
@@ -2021,14 +2021,14 @@ Significant Optimizations
...
@@ -2021,14 +2021,14 @@ Significant Optimizations
longer imported by default. The marshal module has been improved to load
longer imported by default. The marshal module has been improved to load
compiled Python code faster. (Contributed by Antoine Pitrou, Christian
compiled Python code faster. (Contributed by Antoine Pitrou, Christian
Heimes and Victor Stinner in :issue:`19219`, :issue:`19218`, :issue:`19209`,
Heimes and Victor Stinner in :issue:`19219`, :issue:`19218`, :issue:`19209`,
:issue:`19205` and :issue:`9548`)
:issue:`19205` and :issue:`9548`
.
)
* :class:`bz2.BZ2File` is now as fast or faster than the Python2 version for
* :class:`bz2.BZ2File` is now as fast or faster than the Python2 version for
most cases. :class:`lzma.LZMAFile` has also been optimized. (Contributed by
most cases. :class:`lzma.LZMAFile` has also been optimized. (Contributed by
Serhiy Storchaka and Nadeem Vawda in :issue:`16034`.)
Serhiy Storchaka and Nadeem Vawda in :issue:`16034`.)
* :func:`random.getrandbits` is 20%-40% faster for small integers (the most
* :func:`random.getrandbits` is 20%-40% faster for small integers (the most
common use case). (Contributed by Serhiy Storchaka in :issue:`16674`
).
common use case). (Contributed by Serhiy Storchaka in :issue:`16674`
.)
* By taking advantage of the new storage format for strings, pickling of
* By taking advantage of the new storage format for strings, pickling of
strings is now significantly faster. (Contributed by Victor Stinner and
strings is now significantly faster. (Contributed by Victor Stinner and
...
@@ -2048,7 +2048,7 @@ Significant Optimizations
...
@@ -2048,7 +2048,7 @@ Significant Optimizations
* :func:`os.urandom` now uses a lazily-opened persistent file descriptor
* :func:`os.urandom` now uses a lazily-opened persistent file descriptor
so as to avoid using many file descriptors when run in parallel from
so as to avoid using many file descriptors when run in parallel from
multiple threads. (Contributed by Antoine Pitrou in :issue:`18756`.)
multiple threads.
(Contributed by Antoine Pitrou in :issue:`18756`.)
.. _deprecated-3.4:
.. _deprecated-3.4:
...
@@ -2246,7 +2246,7 @@ Changes in 'python' Command Behavior
...
@@ -2246,7 +2246,7 @@ Changes in 'python' Command Behavior
* The [X refs, Y blocks] output of a debug (``--with-pydebug``) build of the
* The [X refs, Y blocks] output of a debug (``--with-pydebug``) build of the
CPython interpreter is now off by default. It can be re-enabled using the
CPython interpreter is now off by default. It can be re-enabled using the
``-X showrefcount`` option. (Contributed by Ezio Melotti in :issue:`17323`.)
``-X showrefcount`` option.
(Contributed by Ezio Melotti in :issue:`17323`.)
* The python command and most stdlib scripts (as well as :mod:`argparse`) now
* The python command and most stdlib scripts (as well as :mod:`argparse`) now
output ``--version`` information to ``stdout`` instead of ``stderr`` (for
output ``--version`` information to ``stdout`` instead of ``stderr`` (for
...
@@ -2395,8 +2395,8 @@ Changes in the Python API
...
@@ -2395,8 +2395,8 @@ Changes in the Python API
storage). (:issue:`17094`.)
storage). (:issue:`17094`.)
* Parameter names in ``__annotations__`` dicts are now mangled properly,
* Parameter names in ``__annotations__`` dicts are now mangled properly,
similarly to ``__kwdefaults__``. (Contributed by Yury Selivanov in
similarly to ``__kwdefaults__``.
(Contributed by Yury Selivanov in
:issue:`20625`
).
:issue:`20625`
.)
* :attr:`hashlib.hash.name` now always returns the identifier in lower case.
* :attr:`hashlib.hash.name` now always returns the identifier in lower case.
Previously some builtin hashes had uppercase names, but now that it is a
Previously some builtin hashes had uppercase names, but now that it is a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment