Skip to content

Commit bcb339d

Browse files
committed
Merge branch 'main' into fix-issue-93180
2 parents 59561bf + 8136606 commit bcb339d

File tree

166 files changed

+1600
-1117
lines changed

Some content is hidden

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

166 files changed

+1600
-1117
lines changed

Doc/c-api/bytes.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ called with a non-bytes parameter.
5858
5959
.. % XXX: This should be exactly the same as the table in PyErr_Format.
6060
.. % One should just refer to the other.
61-
.. % XXX: The descriptions for %zd and %zu are wrong, but the truth is complicated
62-
.. % because not all compilers support the %z width modifier -- we fake it
63-
.. % when necessary via interpolating PY_FORMAT_SIZE_T.
6461
6562
.. tabularcolumns:: |l|l|L|
6663

Doc/c-api/init_config.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,9 @@ PyConfig
986986
Incremented by the :option:`-d` command line option. Set to the
987987
:envvar:`PYTHONDEBUG` environment variable value.
988988
989+
Need a :ref:`debug build of Python <debug-build>` (the ``Py_DEBUG`` macro
990+
must be defined).
991+
989992
Default: ``0``.
990993
991994
.. c:member:: int pathconfig_warnings

Doc/c-api/type.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,16 @@ Creating Heap-Allocated Types
190190
The following functions and structs are used to create
191191
:ref:`heap types <heap-types>`.
192192
193-
.. c:function:: PyObject* PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases)
193+
.. c:function:: PyObject* PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases)
194194
195-
Creates and returns a :ref:`heap type <heap-types>` from the *spec*
195+
Create and return a :ref:`heap type <heap-types>` from the *spec*
196196
(:const:`Py_TPFLAGS_HEAPTYPE`).
197197
198+
The metaclass *metaclass* is used to construct the resulting type object.
199+
When *metaclass* is ``NULL``, the default :c:type:`PyType_Type` is used
200+
instead. Note that metaclasses that override
201+
:c:member:`~PyTypeObject.tp_new` are not supported.
202+
198203
The *bases* argument can be used to specify base classes; it can either
199204
be only one class or a tuple of classes.
200205
If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead.
@@ -210,22 +215,29 @@ The following functions and structs are used to create
210215
211216
This function calls :c:func:`PyType_Ready` on the new type.
212217
218+
.. versionadded:: 3.12
219+
220+
.. c:function:: PyObject* PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases)
221+
222+
Equivalent to ``PyType_FromMetaclass(NULL, module, spec, bases)``.
223+
213224
.. versionadded:: 3.9
214225
215226
.. versionchanged:: 3.10
216227
217228
The function now accepts a single class as the *bases* argument and
218229
``NULL`` as the ``tp_doc`` slot.
219230
231+
220232
.. c:function:: PyObject* PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
221233
222-
Equivalent to ``PyType_FromModuleAndSpec(NULL, spec, bases)``.
234+
Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, bases)``.
223235
224236
.. versionadded:: 3.3
225237
226238
.. c:function:: PyObject* PyType_FromSpec(PyType_Spec *spec)
227239
228-
Equivalent to ``PyType_FromSpecWithBases(spec, NULL)``.
240+
Equivalent to ``PyType_FromMetaclass(NULL, NULL, spec, NULL)``.
229241
230242
.. c:type:: PyType_Spec
231243

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ flag set.
20712071

20722072
This is done by filling a :c:type:`PyType_Spec` structure and calling
20732073
:c:func:`PyType_FromSpec`, :c:func:`PyType_FromSpecWithBases`,
2074-
or :c:func:`PyType_FromModuleAndSpec`.
2074+
:c:func:`PyType_FromModuleAndSpec`, or :c:func:`PyType_FromMetaclass`.
20752075

20762076

20772077
.. _number-structs:

Doc/c-api/unicode.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,6 @@ APIs:
397397
ASCII-encoded string. The following format characters are allowed:
398398
399399
.. % This should be exactly the same as the table in PyErr_Format.
400-
.. % The descriptions for %zd and %zu are wrong, but the truth is complicated
401-
.. % because not all compilers support the %z width modifier -- we fake it
402-
.. % when necessary via interpolating PY_FORMAT_SIZE_T.
403-
.. % Similar comments apply to the %ll width modifier and
404400
405401
.. tabularcolumns:: |l|l|L|
406402

Doc/data/stable_abi.dat

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/howto/logging.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,9 @@ need:
11011101
| Current process name when using ``multiprocessing`` | Set ``logging.logMultiprocessing`` to ``False``. |
11021102
| to manage multiple processes. | |
11031103
+-----------------------------------------------------+---------------------------------------------------+
1104+
| Current :class:`asyncio.Task` name when using | Set ``logging.logAsyncioTasks`` to ``False``. |
1105+
| ``asyncio``. | |
1106+
+-----------------------------------------------------+---------------------------------------------------+
11041107

11051108
Also note that the core logging module only includes the basic handlers. If
11061109
you don't import :mod:`logging.handlers` and :mod:`logging.config`, they won't

Doc/library/locale.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ The :mod:`locale` module defines the following exception and functions:
375375
The default setting is determined by calling :func:`getdefaultlocale`.
376376
*category* defaults to :const:`LC_ALL`.
377377

378+
.. deprecated:: 3.11 3.13
379+
378380

379381
.. function:: strcoll(string1, string2)
380382

Doc/library/logging.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,10 +872,14 @@ the options available to you.
872872
+----------------+-------------------------+-----------------------------------------------+
873873
| threadName | ``%(threadName)s`` | Thread name (if available). |
874874
+----------------+-------------------------+-----------------------------------------------+
875+
| taskName | ``%(taskName)s`` | :class:`asyncio.Task` name (if available). |
876+
+----------------+-------------------------+-----------------------------------------------+
875877

876878
.. versionchanged:: 3.1
877879
*processName* was added.
878880

881+
.. versionchanged:: 3.12
882+
*taskName* was added.
879883

880884
.. _logger-adapter:
881885

Doc/library/re.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,14 @@ Match objects support the following methods and attributes:
13271327
>>> m[2] # The second parenthesized subgroup.
13281328
'Newton'
13291329

1330+
Named groups are supported as well::
1331+
1332+
>>> m = re.match(r"(?P<first_name>\w+) (?P<last_name>\w+)", "Isaac Newton")
1333+
>>> m['first_name']
1334+
'Isaac'
1335+
>>> m['last_name']
1336+
'Newton'
1337+
13301338
.. versionadded:: 3.6
13311339

13321340

Doc/library/socket.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,29 @@ created. Socket addresses are represented as follows:
225225

226226
.. versionadded:: 3.9
227227

228+
- :const:`AF_HYPERV` is a Windows-only socket based interface for communicating
229+
with Hyper-V hosts and guests. The address family is represented as a
230+
``(vm_id, service_id)`` tuple where the ``vm_id`` and ``service_id`` are
231+
UUID strings.
232+
233+
The ``vm_id`` is the virtual machine identifier or a set of known VMID values
234+
if the target is not a specific virtual machine. Known VMID constants
235+
defined on ``socket`` are:
236+
237+
- ``HV_GUID_ZERO``
238+
- ``HV_GUID_BROADCAST``
239+
- ``HV_GUID_WILDCARD`` - Used to bind on itself and accept connections from
240+
all partitions.
241+
- ``HV_GUID_CHILDREN`` - Used to bind on itself and accept connection from
242+
child partitions.
243+
- ``HV_GUID_LOOPBACK`` - Used as a target to itself.
244+
- ``HV_GUID_PARENT`` - When used as a bind accepts connection from the parent
245+
partition. When used as an address target it will connect to the parent parition.
246+
247+
The ``service_id`` is the service identifier of the registered service.
248+
249+
.. versionadded:: 3.12
250+
228251
If you use a hostname in the *host* portion of IPv4/v6 socket address, the
229252
program may show a nondeterministic behavior, as Python uses the first address
230253
returned from the DNS resolution. The socket address will be resolved
@@ -589,6 +612,26 @@ Constants
589612

590613
.. availability:: Linux >= 3.9
591614

615+
.. data:: AF_HYPERV
616+
HV_PROTOCOL_RAW
617+
HVSOCKET_CONNECT_TIMEOUT
618+
HVSOCKET_CONNECT_TIMEOUT_MAX
619+
HVSOCKET_CONTAINER_PASSTHRU
620+
HVSOCKET_CONNECTED_SUSPEND
621+
HVSOCKET_ADDRESS_FLAG_PASSTHRU
622+
HV_GUID_ZERO
623+
HV_GUID_WILDCARD
624+
HV_GUID_BROADCAST
625+
HV_GUID_CHILDREN
626+
HV_GUID_LOOPBACK
627+
HV_GUID_LOOPBACK
628+
629+
Constants for Windows Hyper-V sockets for host/guest communications.
630+
631+
.. availability:: Windows.
632+
633+
.. versionadded:: 3.12
634+
592635
Functions
593636
^^^^^^^^^
594637

0 commit comments

Comments
 (0)