Skip to content

Commit 259ac02

Browse files
Merge branch 'main' into dis-theme-support
2 parents 60f0904 + 61ebb99 commit 259ac02

153 files changed

Lines changed: 1746 additions & 935 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: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,7 @@ InternalDocs/jit.md @brandtbucher @savannahostrowski @diegorusso @AA-T
298298
# Lazy imports (PEP 810)
299299
Objects/lazyimportobject.c @yhg1s @DinoV @pablogsal
300300
Include/internal/pycore_lazyimportobject.h @yhg1s @DinoV @pablogsal
301-
Lib/test/test_import/test_lazy_imports.py @yhg1s @DinoV @pablogsal
302-
Lib/test/test_import/data/lazy_imports/ @yhg1s @DinoV @pablogsal
301+
Lib/test/test_lazy_import @yhg1s @DinoV @pablogsal
303302

304303
# Micro-op / μop / Tier 2 Optimiser
305304
Python/optimizer.c @markshannon @Fidget-Spinner
@@ -426,19 +425,19 @@ Lib/dataclasses.py @ericvsmith
426425
Lib/test/test_dataclasses/ @ericvsmith
427426

428427
# Dates and times
429-
Doc/**/*time.rst @pganssle @abalkin
430-
Doc/library/datetime-* @pganssle
431-
Doc/library/zoneinfo.rst @pganssle
432-
Include/datetime.h @pganssle @abalkin
433-
Include/internal/pycore_time.h @pganssle @abalkin
434-
Lib/test/test_zoneinfo/ @pganssle
435-
Lib/zoneinfo/ @pganssle
436-
Lib/*time.py @pganssle @abalkin
437-
Lib/test/datetimetester.py @pganssle @abalkin
438-
Lib/test/test_*time.py @pganssle @abalkin
439-
Modules/*zoneinfo* @pganssle
440-
Modules/*time* @pganssle @abalkin
441-
Python/pytime.c @pganssle @abalkin
428+
Doc/**/*time.rst @pganssle @abalkin @StanFromIreland
429+
Doc/library/datetime-* @pganssle @StanFromIreland
430+
Doc/library/zoneinfo.rst @pganssle @StanFromIreland
431+
Include/datetime.h @pganssle @abalkin @StanFromIreland
432+
Include/internal/pycore_time.h @pganssle @abalkin @StanFromIreland
433+
Lib/test/test_zoneinfo/ @pganssle @StanFromIreland
434+
Lib/zoneinfo/ @pganssle @StanFromIreland
435+
Lib/*time.py @pganssle @abalkin @StanFromIreland
436+
Lib/test/datetimetester.py @pganssle @abalkin @StanFromIreland
437+
Lib/test/test_*time.py @pganssle @abalkin @StanFromIreland
438+
Modules/*zoneinfo* @pganssle @StanFromIreland
439+
Modules/*time* @pganssle @abalkin @StanFromIreland
440+
Python/pytime.c @pganssle @abalkin @StanFromIreland
442441

443442
# Dbm
444443
Doc/library/dbm.rst @corona10 @erlend-aasland @serhiy-storchaka

Doc/.ruff.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ ignore = [
3232
"E501", # Ignore line length errors (we use auto-formatting)
3333
]
3434

35+
[lint.per-file-ignores]
36+
"tools/check-html-ids.py" = ["I001"] # Unsorted imports
37+
3538
[format]
3639
preview = true
3740
quote-style = "preserve"

Doc/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,3 +336,9 @@ autobuild-stable-html:
336336
exit 1;; \
337337
esac
338338
@$(MAKE) autobuild-dev-html
339+
340+
# Collect HTML IDs to a JSON document
341+
.PHONY: html-ids
342+
html-ids:
343+
$(PYTHON) tools/check-html-ids.py collect build/html \
344+
-o build/html/html-ids.json.gz

Doc/c-api/dict.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ Dictionary objects
8282
8383
Return a new dictionary that contains the same key-value pairs as *p*.
8484
85+
.. versionchanged:: next
86+
If *p* is a subclass of :class:`frozendict`, the result will be a
87+
:class:`frozendict` instance instead of a :class:`dict` instance.
8588
8689
.. c:function:: int PyDict_SetItem(PyObject *p, PyObject *key, PyObject *val)
8790

Doc/c-api/frame.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ See also :ref:`Reflection <reflection>`.
5050
5151
Return a :term:`strong reference`, or ``NULL`` if *frame* has no outer
5252
frame.
53+
This raises no exceptions.
5354
5455
.. versionadded:: 3.9
5556

Doc/c-api/typeobj.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,52 @@ and :c:data:`PyType_Type` effectively act as defaults.)
14991499
It will be removed in a future version of CPython
15001500

15011501

1502+
.. c:macro:: Py_TPFLAGS_HAVE_VERSION_TAG
1503+
1504+
This is a :term:`soft deprecated` macro that does nothing.
1505+
Historically, this would indicate that the
1506+
:c:member:`~PyTypeObject.tp_version_tag` field was available and
1507+
initialized.
1508+
1509+
1510+
.. c:macro:: Py_TPFLAGS_INLINE_VALUES
1511+
1512+
This bit indicates that instances of this type will have an "inline values"
1513+
array (containing the object's attributes) placed directly after the end
1514+
of the object.
1515+
1516+
This requires that :c:macro:`Py_TPFLAGS_HAVE_GC` is set.
1517+
1518+
**Inheritance:**
1519+
1520+
This flag is not inherited.
1521+
1522+
.. versionadded:: 3.13
1523+
1524+
1525+
.. c:macro:: Py_TPFLAGS_IS_ABSTRACT
1526+
1527+
This bit indicates that this is an abstract type and therefore cannot
1528+
be instantiated.
1529+
1530+
**Inheritance:**
1531+
1532+
This flag is not inherited.
1533+
1534+
.. seealso::
1535+
:mod:`abc`
1536+
1537+
1538+
.. c:macro:: Py_TPFLAGS_HAVE_STACKLESS_EXTENSION
1539+
1540+
Internal. Do not set or unset this flag.
1541+
Historically, this was a reserved flag for use in Stackless Python.
1542+
1543+
.. warning::
1544+
This flag is present in header files, but is not be used.
1545+
This may be removed in a future version of CPython.
1546+
1547+
15021548
.. c:member:: const char* PyTypeObject.tp_doc
15031549
15041550
.. corresponding-type-slot:: Py_tp_doc

Doc/deprecations/pending-removal-in-3.20.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Pending removal in Python 3.20
2121
- :mod:`re`
2222
- :mod:`socketserver`
2323
- :mod:`tabnanny`
24+
- :mod:`tarfile`
2425
- :mod:`tkinter.font`
2526
- :mod:`tkinter.ttk`
2627
- :mod:`wsgiref.simple_server`

Doc/library/bisect.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ example uses :py:func:`~bisect.bisect` to look up a letter grade for an exam sco
200200
based on a set of ordered numeric breakpoints: 90 and up is an 'A', 80 to 89 is
201201
a 'B', and so on::
202202

203-
>>> def grade(score, breakpoints=[60, 70, 80, 90], grades='FDCBA'):
204-
... i = bisect(breakpoints, score)
205-
... return grades[i]
203+
>>> def grade(score)
204+
... i = bisect([60, 70, 80, 90], score)
205+
... return "FDCBA"[i]
206206
...
207207
>>> [grade(score) for score in [33, 99, 77, 70, 89, 90, 100]]
208208
['F', 'A', 'C', 'C', 'B', 'A', 'A']

Doc/library/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ the `Python Package Index <https://pypi.org>`_.
4343
constants.rst
4444
stdtypes.rst
4545
exceptions.rst
46+
threadsafety.rst
4647

4748
text.rst
4849
binary.rst

Doc/library/shutil.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -618,22 +618,23 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
618618

619619
Create an archive file (such as zip or tar) and return its name.
620620

621-
*base_name* is the name of the file to create, including the path, minus
622-
any format-specific extension.
621+
*base_name* is a string or :term:`path-like object` specifying the name of
622+
the file to create, including the path, minus any format-specific extension.
623623

624624
*format* is the archive format: one of
625625
"zip" (if the :mod:`zlib` module is available), "tar", "gztar" (if the
626626
:mod:`zlib` module is available), "bztar" (if the :mod:`bz2` module is
627627
available), "xztar" (if the :mod:`lzma` module is available), or "zstdtar"
628628
(if the :mod:`compression.zstd` module is available).
629629

630-
*root_dir* is a directory that will be the root directory of the
631-
archive, all paths in the archive will be relative to it; for example,
632-
we typically chdir into *root_dir* before creating the archive.
630+
*root_dir* is a string or :term:`path-like object` specifying a directory
631+
that will be the root directory of the archive, all paths in the archive
632+
will be relative to it; for example, we typically chdir into *root_dir*
633+
before creating the archive.
633634

634-
*base_dir* is the directory where we start archiving from;
635-
i.e. *base_dir* will be the common prefix of all files and
636-
directories in the archive. *base_dir* must be given relative
635+
*base_dir* is a string or :term:`path-like object` specifying a directory
636+
where we start archiving from; i.e. *base_dir* will be the common prefix of
637+
all files and directories in the archive. *base_dir* must be given relative
637638
to *root_dir*. See :ref:`shutil-archiving-example-with-basedir` for how to
638639
use *base_dir* and *root_dir* together.
639640

@@ -668,6 +669,10 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
668669
This function is now made thread-safe during creation of standard
669670
``.zip`` and tar archives.
670671

672+
.. versionchanged:: next
673+
Accepts a :term:`path-like object` for *base_name*, *root_dir* and
674+
*base_dir*.
675+
671676
.. function:: get_archive_formats()
672677

673678
Return a list of supported formats for archiving.

0 commit comments

Comments
 (0)