-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
GH-69695: Update documentation for PyImport_ImportModule #103700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| import of a module doesn't leave the module in :data:`sys.modules`. | ||
| This function always uses absolute imports. | ||
| This is a wrapper around :c:func:`PyImport_Import()` which takes a ``const char *`` as an argument instead of a ``PyObject *``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could maybe use c:expr syntax here?
|
@patenaud If you deleted your clone by mistake, you can create a new PR after recreation. |
|
Ah crap. I did...
…On Mon, Apr 24, 2023, 12:12 p.m. Oleg Iarygin ***@***.***> wrote:
@patenaud <https://github.com/patenaud> If you deleted your clone by
mistake, you can create a new PR after recreation.
—
Reply to this email directly, view it on GitHub
<#103700 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIDCNVATN2ZSBQ3FQURIHHTXC27BZANCNFSM6AAAAAAXIDLSKY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
From 47f3a71b48ac6fd8b98e6d35abe3d9c3462a1bc0 Mon Sep 17 00:00:00 2001
From: Denis Patenaude <[email protected]>
Date: Sat, 22 Apr 2023 18:23:59 -0400
Subject: [PATCH] Update documentation for PyImport_ImportModule
---
Doc/c-api/import.rst | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index a51619db6d3d..e72fd84bbfac 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -13,19 +13,7 @@ Importing Modules
single: __all__ (package variable)
single: modules (in module sys)
- This is a simplified interface to :c:func:`PyImport_ImportModuleEx` below,
- leaving the *globals* and *locals* arguments set to ``NULL`` and *level* set
- to 0. When the *name*
- argument contains a dot (when it specifies a submodule of a package), the
- *fromlist* argument is set to the list ``['*']`` so that the return value is the
- named module rather than the top-level package containing it as would otherwise
- be the case. (Unfortunately, this has an additional side effect when *name* in
- fact specifies a subpackage instead of a submodule: the submodules specified in
- the package's ``__all__`` variable are loaded.) Return a new reference to the
- imported module, or ``NULL`` with an exception set on failure. A failing
- import of a module doesn't leave the module in :data:`sys.modules`.
-
- This function always uses absolute imports.
+ This is a wrapper around :c:func:`PyImport_Import()` which takes a ``const char *`` as an argument instead of a ``PyObject *``.
.. c:function:: PyObject* PyImport_ImportModuleNoBlock(const char *name) |
|
I'll do this first thing in the morning.
Denis
…On Mon, Apr 24, 2023, 12:12 p.m. Oleg Iarygin ***@***.***> wrote:
@patenaud <https://github.com/patenaud> If you deleted your clone by
mistake, you can create a new PR after recreation.
—
Reply to this email directly, view it on GitHub
<#103700 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIDCNVATN2ZSBQ3FQURIHHTXC27BZANCNFSM6AAAAAAXIDLSKY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Done. Newbie. Let me know if I could have done something better. |
Rather not. When GitHub gives no warning that the deletion affects some open PRs, it begs for troubles sooner or later. |
|
New PR: #103836 |
Uh oh!
There was an error while loading. Please reload this page.