Skip to content

Commit

Permalink
Merge branch 'main' into pythongh-111926-simplify-weakref-creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Mar 14, 2024
2 parents e7dda6b + 5f52d20 commit ac0e684
Show file tree
Hide file tree
Showing 37 changed files with 1,564 additions and 1,233 deletions.
15 changes: 15 additions & 0 deletions Doc/c-api/type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,21 @@ Type Objects
.. versionadded:: 3.11
.. c:function:: PyObject* PyType_GetFullyQualifiedName(PyTypeObject *type)
Return the type's fully qualified name. Equivalent to
``f"{type.__module__}.{type.__qualname__}"``, or ``type.__qualname__`` if
``type.__module__`` is not a string or is equal to ``"builtins"``.
.. versionadded:: 3.13
.. c:function:: PyObject* PyType_GetModuleName(PyTypeObject *type)
Return the type's module name. Equivalent to getting the ``type.__module__``
attribute.
.. versionadded:: 3.13
.. c:function:: void* PyType_GetSlot(PyTypeObject *type, int slot)
Return the function pointer stored in the given slot. If the
Expand Down
2 changes: 2 additions & 0 deletions Doc/data/stable_abi.dat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

178 changes: 94 additions & 84 deletions Doc/library/itertools.rst

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,16 @@ New Features
between native integer types and Python :class:`int` objects.
(Contributed by Steve Dower in :gh:`111140`.)

* Add :c:func:`PyType_GetFullyQualifiedName` function to get the type's fully
qualified name. Equivalent to ``f"{type.__module__}.{type.__qualname__}"``,
or ``type.__qualname__`` if ``type.__module__`` is not a string or is equal
to ``"builtins"``.
(Contributed by Victor Stinner in :gh:`111696`.)

* Add :c:func:`PyType_GetModuleName` function to get the type's module name.
Equivalent to getting the ``type.__module__`` attribute.
(Contributed by Eric Snow and Victor Stinner in :gh:`111696`.)


Porting to Python 3.13
----------------------
Expand Down
20 changes: 10 additions & 10 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Include/internal/pycore_typeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ PyAPI_FUNC(PyObject*) _PySuper_Lookup(PyTypeObject *su_type, PyObject *su_obj,
PyObject *name, int *meth_found);


// This is exported for the _testinternalcapi module.
PyAPI_FUNC(PyObject *) _PyType_GetModuleName(PyTypeObject *);


#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit ac0e684

Please sign in to comment.