Skip to content

Commit b0caba5

Browse files
Merge remote-tracking branch 'upstream/main' into specialize_overridden
2 parents a2b0121 + 71868a0 commit b0caba5

472 files changed

Lines changed: 5627 additions & 5204 deletions

File tree

Some content is hidden

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

‎.github/CODEOWNERS‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ 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
@@ -97,7 +98,7 @@ Lib/ast.py @isidentical
9798

9899
# Mock
99100
/Lib/unittest/mock.py @cjw296
100-
/Lib/unittest/test/testmock/* @cjw296
101+
/Lib/test/test_unittest/testmock/* @cjw296
101102

102103
# SQLite 3
103104
**/*sqlite* @berkerpeksag @erlend-aasland

‎.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/typeobj.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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/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: 1 addition & 1 deletion
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

‎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: 4 additions & 3 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

@@ -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

‎Doc/howto/functional.rst‎

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,15 @@ line of a file like this::
315315
Sets can take their contents from an iterable and let you iterate over the set's
316316
elements::
317317

318-
S = {2, 3, 5, 7, 11, 13}
319-
for i in S:
320-
print(i)
318+
>>> S = {2, 3, 5, 7, 11, 13}
319+
>>> for i in S:
320+
... print(i)
321+
2
322+
3
323+
5
324+
7
325+
11
326+
13
321327

322328

323329

@@ -335,18 +341,18 @@ List comprehensions and generator expressions (short form: "listcomps" and
335341
functional programming language Haskell (https://www.haskell.org/). You can strip
336342
all the whitespace from a stream of strings with the following code::
337343

338-
line_list = [' line 1\n', 'line 2 \n', ...]
344+
>>> line_list = [' line 1\n', 'line 2 \n', ' \n', '']
339345

340-
# Generator expression -- returns iterator
341-
stripped_iter = (line.strip() for line in line_list)
346+
>>> # Generator expression -- returns iterator
347+
>>> stripped_iter = (line.strip() for line in line_list)
342348

343-
# List comprehension -- returns list
344-
stripped_list = [line.strip() for line in line_list]
349+
>>> # List comprehension -- returns list
350+
>>> stripped_list = [line.strip() for line in line_list]
345351

346352
You can select only certain elements by adding an ``"if"`` condition::
347353

348-
stripped_list = [line.strip() for line in line_list
349-
if line != ""]
354+
>>> stripped_list = [line.strip() for line in line_list
355+
... if line != ""]
350356

351357
With a list comprehension, you get back a Python list; ``stripped_list`` is a
352358
list containing the resulting lines, not an iterator. Generator expressions
@@ -363,7 +369,8 @@ have the form::
363369
if condition1
364370
for expr2 in sequence2
365371
if condition2
366-
for expr3 in sequence3 ...
372+
for expr3 in sequence3
373+
...
367374
if condition3
368375
for exprN in sequenceN
369376
if conditionN )

0 commit comments

Comments
 (0)