Skip to content

Commit 9cb1fc4

Browse files
authored
Merge branch 'main' into gh-93963/remove-importlib-resources-abcs
2 parents 17f614e + f81a6c5 commit 9cb1fc4

File tree

427 files changed

+12703
-9447
lines changed

Some content is hidden

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

427 files changed

+12703
-9447
lines changed

.gitattributes

+2-2
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

+1-1
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

+2-2
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

+3-3
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

+1-1
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

+3-3
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,

Doc/c-api/datetime.rst

+19
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,15 @@ Macros to create objects:
132132
resulting number of microseconds and seconds lie in the ranges documented for
133133
:class:`datetime.timedelta` objects.
134134
135+
135136
.. c:function:: PyObject* PyTimeZone_FromOffset(PyDateTime_DeltaType* offset)
136137
137138
Return a :class:`datetime.timezone` object with an unnamed fixed offset
138139
represented by the *offset* argument.
139140
140141
.. versionadded:: 3.7
141142
143+
142144
.. c:function:: PyObject* PyTimeZone_FromOffsetAndName(PyDateTime_DeltaType* offset, PyUnicode* name)
143145
144146
Return a :class:`datetime.timezone` object with a fixed offset represented
@@ -190,12 +192,21 @@ must not be ``NULL``, and the type is not checked:
190192
191193
Return the microsecond, as an int from 0 through 999999.
192194
195+
196+
.. c:function:: int PyDateTime_DATE_GET_FOLD(PyDateTime_DateTime *o)
197+
198+
Return the fold, as an int from 0 through 1.
199+
200+
.. versionadded:: 3.6
201+
202+
193203
.. c:function:: PyObject* PyDateTime_DATE_GET_TZINFO(PyDateTime_DateTime *o)
194204
195205
Return the tzinfo (which may be ``None``).
196206
197207
.. versionadded:: 3.10
198208
209+
199210
Macros to extract fields from time objects. The argument must be an instance of
200211
:c:data:`PyDateTime_Time`, including subclasses. The argument must not be ``NULL``,
201212
and the type is not checked:
@@ -219,6 +230,14 @@ and the type is not checked:
219230
220231
Return the microsecond, as an int from 0 through 999999.
221232
233+
234+
.. c:function:: int PyDateTime_TIME_GET_FOLD(PyDateTime_Time *o)
235+
236+
Return the fold, as an int from 0 through 1.
237+
238+
.. versionadded:: 3.6
239+
240+
222241
.. c:function:: PyObject* PyDateTime_TIME_GET_TZINFO(PyDateTime_Time *o)
223242
224243
Return the tzinfo (which may be ``None``).

Doc/c-api/long.rst

+9-8
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

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

+1-1
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/contents.rst

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

+6-6
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

-5
This file was deleted.

0 commit comments

Comments
 (0)