Skip to content

Commit 4994663

Browse files
authored
Merge branch 'main' into gh-145142-dict-next-critical-section
2 parents 28af6d8 + 8775f90 commit 4994663

File tree

78 files changed

+1094
-380
lines changed

Some content is hidden

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

78 files changed

+1094
-380
lines changed

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/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)