https://github.com/python/cpython/commit/a2f1d22a362cccab59691fa4fa2b202475480b04 commit: a2f1d22a362cccab59691fa4fa2b202475480b04 branch: 3.13 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: ZeroIntensity <zintensity...@gmail.com> date: 2025-06-28T13:07:42Z summary:
[3.13] gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022) (GH-136075) gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022) (cherry picked from commit 579acf45629fa0b7787ec78fa4049fc6a6388b71) Co-authored-by: Nicolas Trangez <i...@nicolast.be> files: M Doc/c-api/capsule.rst diff --git a/Doc/c-api/capsule.rst b/Doc/c-api/capsule.rst index cdb8aa33e9fd32..64dc4f5275b512 100644 --- a/Doc/c-api/capsule.rst +++ b/Doc/c-api/capsule.rst @@ -105,9 +105,19 @@ Refer to :ref:`using-capsules` for more information on using these objects. ``module.attribute``. The *name* stored in the capsule must match this string exactly. + This function splits *name* on the ``.`` character, and imports the first + element. It then processes further elements using attribute lookups. + Return the capsule's internal *pointer* on success. On failure, set an exception and return ``NULL``. + .. note:: + + If *name* points to an attribute of some submodule or subpackage, this + submodule or subpackage must be previously imported using other means + (for example, by using :c:func:`PyImport_ImportModule`) for the + attribute lookups to succeed. + .. versionchanged:: 3.3 *no_block* has no effect anymore. _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: arch...@mail-archive.com