Skip to content

Commit e968f2f

Browse files
Merge branch 'main' into fix/fnmatch-filter-pathlike
2 parents 5df7949 + 7054b71 commit e968f2f

65 files changed

Lines changed: 1479 additions & 313 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.

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*.pyo
2121
*.rej
2222
*.swp
23+
*.pickle
2324
*~
2425
*.gc??
2526
*.profclang?

‎Doc/builtins/threadsafety.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,3 +604,13 @@ underlying object supports it:
604604
Resizing or reallocating the underlying object (such as calling
605605
:meth:`bytearray.resize`) while a memoryview is exported raises
606606
:exc:`BufferError`. This is enforced regardless of threading.
607+
608+
In the :term:`free-threaded build`, :meth:`~memoryview.release` is
609+
thread-safe. If another thread has an in-flight operation on the memoryview
610+
when it is released, the underlying buffer may remain exported until that
611+
operation completes. Restrictions on the exporter, such as prohibiting
612+
resizing, remain in effect until then.
613+
614+
For read-heavy workloads that share an underlying object across threads,
615+
creating a separate memoryview of that object in each thread may improve
616+
performance.

‎Doc/c-api/frame.rst‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ See also :ref:`Reflection <reflection>`.
9999
100100
Get the *frame*'s :attr:`~frame.f_lasti` attribute.
101101
102-
Returns -1 if ``frame.f_lasti`` is ``None``.
103-
104102
.. versionadded:: 3.11
105103
106104

‎Doc/c-api/gcsupport.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rules:
4242
.. warning::
4343
If a type adds the Py_TPFLAGS_HAVE_GC, then it *must* implement at least
4444
a :c:member:`~PyTypeObject.tp_traverse` handler or explicitly use one
45-
from its subclass or subclasses.
45+
from a base class.
4646

4747
When calling :c:func:`PyType_Ready` or some of the APIs that indirectly
4848
call it like :c:func:`PyType_FromSpecWithBases` or

‎Doc/c-api/gen.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Generator Objects
66
-----------------
77

88
Generator objects are what Python uses to implement generator iterators. They
9-
are normally created by iterating over a function that yields values, rather
10-
than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
9+
are normally created by calling a generator function, rather than explicitly
10+
calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
1111

1212

1313
.. c:type:: PyGenObject

‎Doc/c-api/object.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ Object Protocol
423423
If *cls* has a :meth:`~type.__subclasscheck__` method, it will be called to
424424
determine the subclass status as described in :pep:`3119`. Otherwise,
425425
*derived* is a subclass of *cls* if it is a direct or indirect subclass,
426-
i.e. contained in :attr:`cls.__mro__ <type.__mro__>`.
426+
i.e. if *cls* is contained in :attr:`derived.__mro__ <type.__mro__>`.
427427
428428
Normally only class objects, i.e. instances of :class:`type` or a derived
429429
class, are considered classes. However, objects can override this by having

‎Doc/c-api/typeobj.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2527,7 +2527,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
25272527

25282528
Specifically, if *type* uses the default metaclass,
25292529
``type->tp_vectorcall`` must behave the same as
2530-
:c:expr:`PyType_Type->tp_call`, which:
2530+
``Py_TYPE(type)->tp_call``, which:
25312531

25322532
- calls ``type->tp_new``,
25332533

‎Doc/howto/descriptor.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ At this point, the metaclass has loaded member objects for *x* and *y*::
17541754
>>> isinstance(vars(H)['y'], Member)
17551755
True
17561756

1757-
When instances are created, they have a ``slot_values`` list where the
1757+
When instances are created, they have a ``_slotvalues`` list where the
17581758
attributes are stored:
17591759

17601760
.. doctest::

‎Doc/howto/enum.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ Some rules:
913913
:class:`~dataclasses.dataclass`
914914
6. %-style formatting: ``%s`` and ``%r`` call the :class:`Enum` class's
915915
:meth:`~object.__str__` and :meth:`~object.__repr__` respectively; other codes (such as
916-
``%i`` or ``%h`` for IntEnum) treat the enum member as its mixed-in type.
916+
``%i`` or ``%x`` for IntEnum) treat the enum member as its mixed-in type.
917917
7. :ref:`Formatted string literals <f-strings>`, :meth:`str.format`,
918918
and :func:`format` will use the enum's :meth:`~object.__str__` method.
919919

‎Doc/howto/isolating-extensions.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ and the corresponding :c:type:`PyCMethod` signature::
530530
PyTypeObject *defining_class, // defining class
531531
PyObject *const *args, // C array of arguments
532532
Py_ssize_t nargs, // length of "args"
533-
PyObject *kwnames) // NULL, or dict of keyword arguments
533+
PyObject *kwnames) // NULL, or tuple of keyword argument names
534534

535535
Once you have the defining class, call :c:func:`PyType_GetModuleState` to get
536536
the state of its associated module.

0 commit comments

Comments
 (0)