Skip to content

Commit 691a82a

Browse files
authored
Merge branch 'main' into gh-93963/remove-importlib-resources-abcs
2 parents 96f14c2 + 78307c7 commit 691a82a

File tree

709 files changed

+20129
-13253
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

709 files changed

+20129
-13253
lines changed

.gitattributes

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,26 +62,27 @@ PCbuild/readme.txt dos
6262
#
6363
[attr]generated linguist-generated=true diff=generated
6464

65-
**/clinic/*.c.h generated
66-
*_db.h generated
67-
Doc/data/stable_abi.dat generated
68-
Doc/library/token-list.inc generated
69-
Include/internal/pycore_ast.h generated
70-
Include/internal/pycore_ast_state.h generated
71-
Include/internal/pycore_opcode.h generated
72-
Include/opcode.h generated
73-
Include/token.h generated
74-
Lib/keyword.py generated
75-
Lib/test/test_stable_abi_ctypes.py generated
76-
Lib/token.py generated
77-
Objects/typeslots.inc generated
78-
PC/python3dll.c generated
79-
Parser/parser.c generated
80-
Parser/token.c generated
81-
Programs/test_frozenmain.h generated
82-
Python/Python-ast.c generated
83-
Python/opcode_targets.h generated
84-
Python/stdlib_module_names.h generated
85-
Tools/peg_generator/pegen/grammar_parser.py generated
86-
aclocal.m4 generated
87-
configure generated
65+
**/clinic/*.c.h generated
66+
*_db.h generated
67+
Doc/data/stable_abi.dat generated
68+
Doc/library/token-list.inc generated
69+
Include/internal/pycore_ast.h generated
70+
Include/internal/pycore_ast_state.h generated
71+
Include/internal/pycore_opcode.h generated
72+
Include/internal/pycore_runtime_init_generated.h generated
73+
Include/opcode.h generated
74+
Include/token.h generated
75+
Lib/keyword.py generated
76+
Lib/test/test_stable_abi_ctypes.py generated
77+
Lib/token.py generated
78+
Objects/typeslots.inc generated
79+
PC/python3dll.c generated
80+
Parser/parser.c generated
81+
Parser/token.c generated
82+
Programs/test_frozenmain.h generated
83+
Python/Python-ast.c generated
84+
Python/opcode_targets.h generated
85+
Python/stdlib_module_names.h generated
86+
Tools/peg_generator/pegen/grammar_parser.py generated
87+
aclocal.m4 generated
88+
configure generated

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,16 @@ Python/pythonrun.c @iritkatriel
5353
/Lib/html/ @ezio-melotti
5454
/Lib/_markupbase.py @ezio-melotti
5555
/Lib/test/test_html*.py @ezio-melotti
56+
/Tools/scripts/*html5* @ezio-melotti
5657

5758
# Import (including importlib).
5859
# Ignoring importlib.h so as to not get flagged on
5960
# all pull requests that change the emitted
6061
# bytecode.
6162
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6263
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
64+
**/importlib/resources/* @jaraco @warsaw @brettcannon
65+
**/importlib/metadata/* @jaraco @warsaw
6366

6467
# Dates and times
6568
**/*datetime* @pganssle @abalkin
@@ -95,7 +98,7 @@ Lib/ast.py @isidentical
9598

9699
# Mock
97100
/Lib/unittest/mock.py @cjw296
98-
/Lib/unittest/test/testmock/* @cjw296
101+
/Lib/test/test_unittest/testmock/* @cjw296
99102

100103
# SQLite 3
101104
**/*sqlite* @berkerpeksag @erlend-aasland

.github/workflows/build_msi.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,27 @@ on:
55
push:
66
branches:
77
- 'main'
8-
- '3.11'
9-
- '3.10'
10-
- '3.9'
11-
- '3.8'
12-
- '3.7'
8+
- '3.*'
139
paths:
1410
- 'Tools/msi/**'
1511
pull_request:
1612
branches:
1713
- 'main'
18-
- '3.11'
19-
- '3.10'
20-
- '3.9'
21-
- '3.8'
22-
- '3.7'
14+
- '3.*'
2315
paths:
2416
- 'Tools/msi/**'
2517

2618
permissions:
2719
contents: read
2820

2921
jobs:
30-
build_win32:
31-
name: 'Windows (x86) Installer'
22+
build:
23+
name: Windows Installer
3224
runs-on: windows-latest
25+
strategy:
26+
matrix:
27+
type: [x86, x64, arm64]
3328
steps:
3429
- uses: actions/checkout@v3
3530
- name: Build CPython installer
36-
run: .\Tools\msi\build.bat -x86
37-
38-
build_win_amd64:
39-
name: 'Windows (x64) Installer'
40-
runs-on: windows-latest
41-
steps:
42-
- uses: actions/checkout@v3
43-
- name: Build CPython installer
44-
run: .\Tools\msi\build.bat -x64
45-
46-
build_win_arm64:
47-
name: 'Windows (ARM64) Installer'
48-
runs-on: windows-latest
49-
steps:
50-
- uses: actions/checkout@v3
51-
- name: Build CPython installer
52-
run: .\Tools\msi\build.bat -arm64
31+
run: .\Tools\msi\build.bat -${{ matrix.type }}

.github/workflows/project-updater.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Update GH projects
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- labeled
8+
9+
jobs:
10+
add-to-project:
11+
name: Add to the Release and Deferred Blocker project
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/[email protected]
15+
with:
16+
project-url: https://github.com/orgs/python/projects/2
17+
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
18+
labeled: release-blocker, deferred-blocker
19+
label-operator: OR

.github/workflows/regen-abidump.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
set -ex
2+
3+
export DEBIAN_FRONTEND=noninteractive
4+
./.github/workflows/posix-deps-apt.sh
5+
apt-get install -yq abigail-tools python3
6+
export CFLAGS="-g3 -O0"
7+
./configure --enable-shared && make
8+
make regen-abidump
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Verify bundled pip and setuptools
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- 'Lib/ensurepip/_bundled/**'
8+
- '.github/workflows/verify-ensurepip-wheels.yml'
9+
- 'Tools/scripts/verify_ensurepip_wheels.py'
10+
pull_request:
11+
paths:
12+
- 'Lib/ensurepip/_bundled/**'
13+
- '.github/workflows/verify-ensurepip-wheels.yml'
14+
- 'Tools/scripts/verify_ensurepip_wheels.py'
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
verify:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- uses: actions/setup-python@v4
25+
with:
26+
python-version: '3'
27+
- name: Compare checksums of bundled pip and setuptools to ones published on PyPI
28+
run: ./Tools/scripts/verify_ensurepip_wheels.py

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,6 @@ Python/frozen_modules/MANIFEST
150150
# Ignore ./python binary on Unix but still look into ./Python/ directory.
151151
/python
152152
!/Python/
153+
154+
# main branch only: ABI files are not checked/maintained
155+
Doc/data/python*.abi

Doc/c-api/allocation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Allocating Objects on the Heap
1414
1515
.. c:function:: PyObject* PyObject_Init(PyObject *op, PyTypeObject *type)
1616
17-
Initialize a newly-allocated object *op* with its type and initial
17+
Initialize a newly allocated object *op* with its type and initial
1818
reference. Returns the initialized object. If *type* indicates that the
1919
object participates in the cyclic garbage detector, it is added to the
2020
detector's set of observed objects. Other fields of the object are not

Doc/c-api/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ A full list of the various types of debugging builds is in the file
779779
:file:`Misc/SpecialBuilds.txt` in the Python source distribution. Builds are
780780
available that support tracing of reference counts, debugging the memory
781781
allocator, or low-level profiling of the main interpreter loop. Only the most
782-
frequently-used builds will be described in the remainder of this section.
782+
frequently used builds will be described in the remainder of this section.
783783

784784
Compiling the interpreter with the :c:macro:`Py_DEBUG` macro defined produces
785785
what is generally meant by :ref:`a debug build of Python <debug-build>`.

Doc/c-api/memory.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ memory manager. For example, this is required when the interpreter is extended
7575
with new object types written in C. Another reason for using the Python heap is
7676
the desire to *inform* the Python memory manager about the memory needs of the
7777
extension module. Even when the requested memory is used exclusively for
78-
internal, highly-specific purposes, delegating all memory requests to the Python
78+
internal, highly specific purposes, delegating all memory requests to the Python
7979
memory manager causes the interpreter to have a more accurate image of its
8080
memory footprint as a whole. Consequently, under certain circumstances, the
8181
Python memory manager may or may not trigger appropriate actions, like garbage

Doc/c-api/typeobj.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ type objects) *must* have the :attr:`ob_size` field.
529529
``PyObject_HEAD_INIT`` macro. For :ref:`statically allocated objects
530530
<static-types>`, these fields always remain ``NULL``. For :ref:`dynamically
531531
allocated objects <heap-types>`, these two fields are used to link the
532-
object into a doubly-linked list of *all* live objects on the heap.
532+
object into a doubly linked list of *all* live objects on the heap.
533533

534534
This could be used for various debugging purposes; currently the only uses
535535
are the :func:`sys.getobjects` function and to print the objects that are
@@ -2523,11 +2523,11 @@ Slot Type typedefs
25232523

25242524
.. c:type:: PyObject *(*descrgetfunc)(PyObject *, PyObject *, PyObject *)
25252525
2526-
See :c:member:`~PyTypeObject.tp_descrget`.
2526+
See :c:member:`~PyTypeObject.tp_descr_get`.
25272527

25282528
.. c:type:: int (*descrsetfunc)(PyObject *, PyObject *, PyObject *)
25292529
2530-
See :c:member:`~PyTypeObject.tp_descrset`.
2530+
See :c:member:`~PyTypeObject.tp_descr_set`.
25312531

25322532
.. c:type:: Py_hash_t (*hashfunc)(PyObject *)
25332533

Doc/c-api/weakref.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ as much as it can.
3535
callable object that receives notification when *ob* is garbage collected; it
3636
should accept a single parameter, which will be the weak reference object
3737
itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a
38-
weakly-referencable object, or if *callback* is not callable, ``None``, or
38+
weakly referencable object, or if *callback* is not callable, ``None``, or
3939
``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
4040
4141
@@ -47,7 +47,7 @@ as much as it can.
4747
be a callable object that receives notification when *ob* is garbage
4848
collected; it should accept a single parameter, which will be the weak
4949
reference object itself. *callback* may also be ``None`` or ``NULL``. If *ob*
50-
is not a weakly-referencable object, or if *callback* is not callable,
50+
is not a weakly referencable object, or if *callback* is not callable,
5151
``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`.
5252
5353

Doc/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,5 +237,3 @@
237237
# bpo-40204: Disable warnings on Sphinx 2 syntax of the C domain since the
238238
# documentation is built with -W (warnings treated as errors).
239239
c_warn_on_allowed_pre_v3 = False
240-
241-
strip_signature_backslash = True

Doc/distutils/apiref.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ API Reference
1111
and other APIs, makes the API consistent across different Python versions,
1212
and is hence recommended over using ``distutils`` directly.
1313

14-
.. _New and changed setup.py arguments in setuptools: https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords
14+
.. _New and changed setup.py arguments in setuptools: https://web.archive.org/web/20210614192516/https://setuptools.pypa.io/en/stable/userguide/keywords.html
1515

1616
.. include:: ./_setuptools_disclaimer.rst
1717

@@ -1198,7 +1198,7 @@ other utility module.
11981198
it contains certain values: see :func:`check_environ`. Raise :exc:`ValueError`
11991199
for any variables not found in either *local_vars* or ``os.environ``.
12001200

1201-
Note that this is not a fully-fledged string interpolation function. A valid
1201+
Note that this is not a full-fledged string interpolation function. A valid
12021202
``$variable`` can consist only of upper and lower case letters, numbers and an
12031203
underscore. No { } or ( ) style quoting is available.
12041204

Doc/extending/building.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The initialization function has the signature:
1717

1818
.. c:function:: PyObject* PyInit_modulename(void)
1919
20-
It returns either a fully-initialized module, or a :c:type:`PyModuleDef`
20+
It returns either a fully initialized module, or a :c:type:`PyModuleDef`
2121
instance. See :ref:`initializing-modules` for details.
2222
2323
.. highlight:: python

Doc/extending/newtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ example::
175175
}
176176

177177
If no :c:member:`~PyTypeObject.tp_repr` handler is specified, the interpreter will supply a
178-
representation that uses the type's :c:member:`~PyTypeObject.tp_name` and a uniquely-identifying
178+
representation that uses the type's :c:member:`~PyTypeObject.tp_name` and a uniquely identifying
179179
value for the object.
180180

181181
The :c:member:`~PyTypeObject.tp_str` handler is to :func:`str` what the :c:member:`~PyTypeObject.tp_repr` handler
@@ -589,7 +589,7 @@ with the required field::
589589
PyObject *weakreflist; /* List of weak references */
590590
} TrivialObject;
591591

592-
And the corresponding member in the statically-declared type object::
592+
And the corresponding member in the statically declared type object::
593593

594594
static PyTypeObject TrivialType = {
595595
PyVarObject_HEAD_INIT(NULL, 0)

Doc/faq/design.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ you're too lazy to define a function.
313313

314314
Functions are already first class objects in Python, and can be declared in a
315315
local scope. Therefore the only advantage of using a lambda instead of a
316-
locally-defined function is that you don't need to invent a name for the
316+
locally defined function is that you don't need to invent a name for the
317317
function -- but that's just a local variable to which the function object (which
318318
is exactly the same type of object that a lambda expression yields) is assigned!
319319

Doc/faq/library.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ A summary of available frameworks is maintained by Paul Boddie at
670670
https://wiki.python.org/moin/WebProgramming\ .
671671
672672
Cameron Laird maintains a useful set of pages about Python web technologies at
673-
http://phaseit.net/claird/comp.lang.python/web_python.
673+
https://web.archive.org/web/20210224183619/http://phaseit.net/claird/comp.lang.python/web_python.
674674
675675
676676
How can I mimic CGI form submission (METHOD=POST)?

Doc/faq/programming.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Are there tools to help find bugs or perform static analysis?
5656

5757
Yes.
5858

59-
`Pylint <https://www.pylint.org/>`_ and
59+
`Pylint <https://pylint.pycqa.org/en/latest/index.html>`_ and
6060
`Pyflakes <https://github.com/PyCQA/pyflakes>`_ do basic checking that will
6161
help you catch bugs sooner.
6262

@@ -294,7 +294,7 @@ It's good practice if you import modules in the following order:
294294
1. standard library modules -- e.g. ``sys``, ``os``, ``getopt``, ``re``
295295
2. third-party library modules (anything installed in Python's site-packages
296296
directory) -- e.g. mx.DateTime, ZODB, PIL.Image, etc.
297-
3. locally-developed modules
297+
3. locally developed modules
298298

299299
It is sometimes necessary to move imports to a function or class to avoid
300300
problems with circular imports. Gordon McMillan says:
@@ -409,8 +409,9 @@ What is the difference between arguments and parameters?
409409

410410
:term:`Parameters <parameter>` are defined by the names that appear in a
411411
function definition, whereas :term:`arguments <argument>` are the values
412-
actually passed to a function when calling it. Parameters define what types of
413-
arguments a function can accept. For example, given the function definition::
412+
actually passed to a function when calling it. Parameters define what
413+
:term:`kind of arguments <parameter>` a function can accept. For
414+
example, given the function definition::
414415

415416
def func(foo, bar=None, **kwargs):
416417
pass
@@ -770,7 +771,7 @@ What does the slash(/) in the parameter list of a function mean?
770771

771772
A slash in the argument list of a function denotes that the parameters prior to
772773
it are positional-only. Positional-only parameters are the ones without an
773-
externally-usable name. Upon calling a function that accepts positional-only
774+
externally usable name. Upon calling a function that accepts positional-only
774775
parameters, arguments are mapped to parameters based solely on their position.
775776
For example, :func:`divmod` is a function that accepts positional-only
776777
parameters. Its documentation looks like this::

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ Glossary
532532
machines.
533533

534534
However, some extension modules, either standard or third-party,
535-
are designed so as to release the GIL when doing computationally-intensive
535+
are designed so as to release the GIL when doing computationally intensive
536536
tasks such as compression or hashing. Also, the GIL is always released
537537
when doing I/O.
538538

0 commit comments

Comments
 (0)