Skip to content

Commit 71e9d20

Browse files
Merge branch 'main' into pythongh-94906
2 parents cbb1b0b + 50b2261 commit 71e9d20

File tree

384 files changed

+11436
-7490
lines changed

Some content is hidden

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

384 files changed

+11436
-7490
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Lib/test/cjkencodings/* noeol
2828
Lib/test/coding20731.py noeol
2929
Lib/test/decimaltestdata/*.decTest noeol
3030
Lib/test/test_email/data/*.txt noeol
31-
Lib/test/test_importlib/data01/* noeol
32-
Lib/test/test_importlib/namespacedata01/* noeol
31+
Lib/test/test_importlib/resources/data01/* noeol
32+
Lib/test/test_importlib/resources/namespacedata01/* noeol
3333
Lib/test/xmltestdata/* noeol
3434

3535
# CRLF files

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Python/pythonrun.c @iritkatriel
6161
# bytecode.
6262
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6363
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
64-
**/importlib/resources/* @jaraco @warsaw @brettcannon
64+
**/*importlib/resources/* @jaraco @warsaw @brettcannon
6565
**/importlib/metadata/* @jaraco @warsaw
6666

6767
# Dates and times

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ labels: "type-bug"
1515
your problem has already been reported
1616
-->
1717

18-
**Bug report**
18+
# Bug report
1919

2020
A clear and concise description of what the bug is.
2121
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.
2222

23-
**Your environment**
23+
# Your environment
2424

2525
<!-- Include as many relevant details as possible about the environment you experienced the bug in -->
2626

.github/ISSUE_TEMPLATE/crash.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ labels: "type-crash"
1313
For CPython, a "crash" is when Python itself fails, leading to a traceback in the C stack.
1414
-->
1515

16-
**Crash report**
16+
# Crash report
1717

1818
Tell us what happened, ideally including a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example).
1919

20-
**Error messages**
20+
# Error messages
2121

2222
Enter any relevant error message caused by the crash, including a core dump if there is one.
2323

24-
**Your environment**
24+
# Your environment
2525

2626
<!-- Include as many relevant details as possible about the environment you experienced the bug in -->
2727

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ about: Report a problem with the documentation
44
labels: "docs"
55
---
66

7-
**Documentation**
7+
# Documentation
88

99
(A clear and concise description of the issue.)

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ about: Submit a proposal for a new CPython feature or enhancement
44
labels: "type-feature"
55
---
66

7-
**Feature or enhancement**
7+
# Feature or enhancement
88

99
(A clear and concise description of your proposal.)
1010

11-
**Pitch**
11+
# Pitch
1212

1313
(Explain why this feature or enhancement should be implemented and how it would be used.
1414
Add examples, if applicable.)
1515

16-
**Previous discussion**
16+
# Previous discussion
1717

1818
<!--
1919
New features to Python should first be discussed elsewhere before creating issues on GitHub,

.github/workflows/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ jobs:
7878
run: make -C Doc/ PYTHON=../python venv
7979
# Use "xvfb-run" since some doctest tests open GUI windows
8080
- name: 'Run documentation doctest'
81-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" doctest
81+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest

Doc/c-api/long.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
8484
.. c:function:: PyObject* PyLong_FromString(const char *str, char **pend, int base)
8585
8686
Return a new :c:type:`PyLongObject` based on the string value in *str*, which
87-
is interpreted according to the radix in *base*. If *pend* is non-``NULL``,
88-
*\*pend* will point to the first character in *str* which follows the
89-
representation of the number. If *base* is ``0``, *str* is interpreted using
90-
the :ref:`integers` definition; in this case, leading zeros in a
91-
non-zero decimal number raises a :exc:`ValueError`. If *base* is not ``0``,
92-
it must be between ``2`` and ``36``, inclusive. Leading spaces and single
93-
underscores after a base specifier and between digits are ignored. If there
94-
are no digits, :exc:`ValueError` will be raised.
87+
is interpreted according to the radix in *base*, or ``NULL`` on failure. If
88+
*pend* is non-``NULL``, *\*pend* will point to the end of *str* on success or
89+
to the first character that could not be processed on error. If *base* is ``0``,
90+
*str* is interpreted using the :ref:`integers` definition; in this case, leading
91+
zeros in a non-zero decimal number raises a :exc:`ValueError`. If *base* is not
92+
``0``, it must be between ``2`` and ``36``, inclusive. Leading and trailing
93+
whitespace and single underscores after a base specifier and between digits are
94+
ignored. If there are no digits or *str* is not NULL-terminated following the
95+
digits and trailing whitespace, :exc:`ValueError` will be raised.
9596
9697
9798
.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base)

Doc/c-api/typeobj.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,6 +1942,13 @@ and :c:type:`PyType_Type` effectively act as defaults.)
19421942
Weak reference list head, for weak references to this type object. Not
19431943
inherited. Internal use only.
19441944

1945+
.. versionchanged:: 3.12
1946+
1947+
Internals detail: For the static builtin types this is always ``NULL``,
1948+
even if weakrefs are added. Instead, the weakrefs for each are stored
1949+
on ``PyInterpreterState``. Use the public C-API or the internal
1950+
``_PyObject_GET_WEAKREFS_LISTPTR()`` macro to avoid the distinction.
1951+
19451952
**Inheritance:**
19461953

19471954
This field is not inherited.

Doc/c-api/unicode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ wchar_t Support
819819
most C functions. If *size* is ``NULL`` and the :c:type:`wchar_t*` string
820820
contains null characters a :exc:`ValueError` is raised.
821821
822-
Returns a buffer allocated by :c:func:`PyMem_Alloc` (use
822+
Returns a buffer allocated by :c:func:`PyMem_New` (use
823823
:c:func:`PyMem_Free` to free it) on success. On error, returns ``NULL``
824824
and *\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation
825825
is failed.

Doc/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
import _tkinter
2323
except ImportError:
2424
_tkinter = None
25+
# Treat warnings as errors, done here to prevent warnings in Sphinx code from
26+
# causing spurious test failures.
27+
import warnings
28+
warnings.simplefilter('error')
29+
del warnings
2530
'''
2631

2732
manpages_url = 'https://manpages.debian.org/{path}'

Doc/contents.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@
2727
.. toctree::
2828
:hidden:
2929

30-
distutils/index.rst
3130
install/index.rst

Doc/distributing/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ Key terms
4141
file format standards. They maintain a variety of tools, documentation
4242
and issue trackers on both `GitHub <https://github.com/pypa>`__ and
4343
`Bitbucket <https://bitbucket.org/pypa/>`__.
44-
* :mod:`distutils` is the original build and distribution system first added
45-
to the Python standard library in 1998. While direct use of :mod:`distutils`
44+
* ``distutils`` is the original build and distribution system first added
45+
to the Python standard library in 1998. While direct use of ``distutils``
4646
is being phased out, it still laid the foundation for the current packaging
4747
and distribution infrastructure, and it not only remains part of the
4848
standard library, but its name lives on in other ways (such as the name
4949
of the mailing list used to coordinate Python packaging standards
5050
development).
51-
* `setuptools`_ is a (largely) drop-in replacement for :mod:`distutils` first
51+
* `setuptools`_ is a (largely) drop-in replacement for ``distutils`` first
5252
published in 2004. Its most notable addition over the unmodified
53-
:mod:`distutils` tools was the ability to declare dependencies on other
53+
``distutils`` tools was the ability to declare dependencies on other
5454
packages. It is currently recommended as a more regularly updated
55-
alternative to :mod:`distutils` that offers consistent support for more
55+
alternative to ``distutils`` that offers consistent support for more
5656
recent packaging standards across a wide range of Python versions.
5757
* `wheel`_ (in this context) is a project that adds the ``bdist_wheel``
58-
command to :mod:`distutils`/`setuptools`_. This produces a cross platform
58+
command to ``distutils``/`setuptools`_. This produces a cross platform
5959
binary packaging format (called "wheels" or "wheel files" and defined in
6060
:pep:`427`) that allows Python libraries, even those including binary
6161
extensions, to be installed on a system without needing to be built

Doc/distutils/_setuptools_disclaimer.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)