8000 Merge branch 'main' into re-atomic-groups · python/cpython@1ff76c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ff76c3

Browse files
Merge branch 'main' into re-atomic-groups
2 parents 711975d + 3ae975f commit 1ff76c3

36 files changed

+258
-311
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ jobs:
113113
steps:
114114
- uses: actions/checkout@v2
115115
- name: Build CPython
116-
run: .\PCbuild\build.bat -e -p Win32
116+
run: .\PCbuild\build.bat -e -d -p Win32
117117
timeout-minutes: 30
118118
- name: Display build info
119119
run: .\python.bat -m test.pythoninfo
120120
- name: Tests
121-
run: .\PCbuild\rt.bat -p Win32 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
121+
run: .\PCbuild\rt.bat -p Win32 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
122122

123123
build_win_amd64:
124124
name: 'Windows (x64)'
@@ -132,12 +132,12 @@ jobs:
132132
- name: Register MSVC problem matcher
133133
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
134134
- name: Build CPython
135-
run: .\PCbuild\build.bat -e -p x64
135+
run: .\PCbuild\build.bat -e -d -p x64
136136
timeout-minutes: 30
137137
- name: Display build info
138138
run: .\python.bat -m test.pythoninfo
139139
- name: Tests
140-
run: .\PCbuild\rt.bat -p x64 -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
140+
run: .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
141141

142142
build_macos:
143143
name: 'macOS'

Doc/library/asynchat.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
.. module:: asynchat
55
:synopsis: Support for asynchronous command/response protocols.
6+
:deprecated:
67

78
.. moduleauthor:: Sam Rushing <rushing@nightmare.com>
89
.. sectionauthor:: Steve Holden <sholden@holdenweb.com>
910

1011
**Source code:** :source:`Lib/asynchat.py`
1112

1213
.. deprecated:: 3.6
14+
:mod:`asynchat` will be removed in Python 3.12 (:pep:`594`).
1315
Please use :mod:`asyncio` instead.
1416

1517
--------------

Doc/library/asyncore.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.. module:: asyncore
55
:synopsis: A base class for developing asynchronous socket handling
66
services.
7+
:deprecated:
78

89
.. moduleauthor:: Sam Rushing <rushing@nightmare.com>
910
.. sectionauthor:: Christopher Petrilli <petrilli@amber.org>
@@ -13,6 +14,7 @@
1314
**Source code:** :source:`Lib/asyncore.py`
1415

1516
.. deprecated:: 3.6
17+
:mod:`asyncore` will be removed in Python 3.12 (:pep:`594`).
1618
Please use :mod:`asyncio` instead.
1719

1820
--------------

Doc/library/binascii.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The :mod:`binascii` module defines the following functions:
107107

108108
.. function:: crc32(data[, value])
109109

110-
Compute CRC-32, the 32-bit checksum of *data*, starting with an
110+
Compute CRC-32, the unsigned 32-bit checksum of *data*, starting with an
111111
initial CRC of *value*. The default initial CRC is zero. The algorithm
112112
is consistent with the ZIP file checksum. Since the algorithm is designed for
113113
use as a checksum algorithm, it is not suitable for use as a general hash
@@ -121,9 +121,8 @@ The :mod:`binascii` module defines the following functions:
121121

122122
.. versionchanged:: 3.0
123123
The result is always unsigned.
124-
To generate the same numeric value across all Python versions and
125-
platforms, use ``crc32(data) & 0xffffffff``.
126-
124+
To generate the same numeric value when using Python 2 or earlier,
125+
use ``crc32(data) & 0xffffffff``.
127126

128127
.. function:: b2a_hex(data[, sep[, bytes_per_sep=1]])
129128
hexlify(data[, sep[, bytes_per_sep=1]])

Doc/library/dataclasses.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ Module contents
188188

189189
.. versionadded:: 3.10
190190

191+
.. versionchanged:: 3.11
192+
If a field name is already included in the ``__slots__``
193+
of a base class, it will not be included in the generated ``__slots__``
194+
to prevent `overriding them <https://docs.python.org/3/reference/datamodel.html#notes-on-using-slots>`_.
195+
Therefore, do not use ``__slots__`` to retrieve the field names of a
196+
dataclass. Use :func:`fields` instead.
197+
To be able to determine inherited slots,
198+
base class ``__slots__`` may be any iterable, but *not* an iterator.
199+
200+
191201
``field``\s may optionally specify a default value, using normal
192202
Python syntax::
193203

Doc/library/re.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ The special characters are:
338338
:func:`re.compile` function. Flags should be used first in the
339339
expression string.
340340

341+
.. versionchanged:: 3.11
342+
This construction can only be used at the start of the expression.
343+
341344
.. index:: single: (?:; in regular expressions
342345

343346
``(?:...)``

Doc/library/smtpd.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
.. module:: smtpd
55
:synopsis: A SMTP server implementation in Python.
6+
:deprecated:
67

78
.. moduleauthor:: Barry Warsaw <barry@python.org>
89
.. sectionauthor:: Moshe Zadka <moshez@moshez.org>
@@ -14,6 +15,7 @@
1415
This module offers several classes to implement SMTP (email) servers.
1516

1617
.. deprecated:: 3.6
18+
:mod:`smtpd` will be removed in Python 3.12 (:pep:`594`).
1719
The `aiosmtpd <https://aiosmtpd.readthedocs.io/>`_ package is a recommended
1820
replacement for this module. It is based on :mod:`asyncio` and provides a
1921
more straightforward API.

Doc/library/superseded.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ backwards compatibility. They have been superseded by other modules.
1010

1111
.. toctree::
1212

13-
optparse.rst
13+
asynchat.rst
14+
asyncore.rst
15+
smtpd.rst
1416
imp.rst
17+
optparse.rst

Doc/library/textwrap.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ functions should be good enough; otherwise, you should use an instance of
2121
subsequent_indent="", expand_tabs=True, \
2222
replace_whitespace=True, fix_sentence_endings=False, \
2323
break_long_words=True, drop_whitespace=True, \
24-
break_on_hyphens=True, tabsize=8, max_lines=None)
24+
break_on_hyphens=True, tabsize=8, max_lines=None, \
25+
placeholder=' [...]')
2526

2627
Wraps the single paragraph in *text* (a string) so every line is at most
2728
*width* characters long. Returns a list of output lines, without final
@@ -39,7 +40,7 @@ functions should be good enough; otherwise, you should use an instance of
3940
replace_whitespace=True, fix_sentence_endings=False, \
4041
break_long_words=True, drop_whitespace=True, \
4142
break_on_hyphens=True, tabsize=8, \
42-
max_lines=None)
43+
max_lines=None, placeholder=' [...]')
4344

4445
Wraps the single paragraph in *text*, and returns a single string containing the
4546
wrapped paragraph. :func:`fill` is shorthand for ::

Doc/library/zlib.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ The available exception and functions in this module are:
4242
for use as a general hash algorithm.
4343

4444
.. versionchanged:: 3.0
45-
Always returns an unsigned value.
46-
To generate the same numeric value across all Python versions and
47-
platforms, use ``adler32(data) & 0xffffffff``.
48-
45+
The result is always unsigned.
46+
To generate the same numeric value when using Python 2 or earlier,
47+
use ``adler32(data) & 0xffffffff``.
4948

5049
.. function:: compress(data, /, level=-1, wbits=MAX_WBITS)
5150

@@ -137,10 +136,9 @@ The available exception and functions in this module are:
137136
for use as a general hash algorithm.
138137

139138
.. versionchanged:: 3.0
140-
Always returns an unsigned value.
141-
To generate the same numeric value across all Python versions and
142-
platforms, use ``crc32(data) & 0xffffffff``.
143-
139+
The result is always unsigned.
140+
To generate the same numeric value when using Python 2 or earlier,
141+
use ``crc32(data) & 0xffffffff``.
144142

145143
.. function:: decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
146144

0 commit comments

Comments
 (0)
0