GH-69695: Update documentation for PyImport_ImportModule#103700
Closed
patenaud wants to merge 1 commit into
Closed
GH-69695: Update documentation for PyImport_ImportModule#103700patenaud wants to merge 1 commit into
patenaud wants to merge 1 commit into
Conversation
AA-Turner
reviewed
Apr 23, 2023
| 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 *``. |
Member
There was a problem hiding this comment.
You could maybe use c:expr syntax here?
Member
|
@patenaud If you deleted your clone by mistake, you can create a new PR after recreation. |
Contributor
Author
|
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:
***@***.***>
|
Member
From 47f3a71b48ac6fd8b98e6d35abe3d9c3462a1bc0 Mon Sep 17 00:00:00 2001
From: Denis Patenaude <denis.patenaude@gmail.com>
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) |
Contributor
Author
|
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:
***@***.***>
|
Contributor
Author
|
Done. Newbie. Let me know if I could have done something better. |
Member
Rather not. When GitHub gives no warning that the deletion affects some open PRs, it begs for troubles sooner or later. |
Member
|
New PR: #103836 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.