← 返回首页
[3.11] gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742) by serhiy-storchaka · Pull Request #93792 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

[3.11] gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742)#93792

Merged
serhiy-storchaka merged 1 commit into
python:3.11from
serhiy-storchaka:backport-6fd4c8e-3.11
Jun 14, 2022
Merged

[3.11] gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742)#93792
serhiy-storchaka merged 1 commit into
python:3.11from
serhiy-storchaka:backport-6fd4c8e-3.11

Conversation

Copy link
Copy Markdown
Member

It combines PyImport_ImportModule() and PyObject_GetAttrString()
and saves 4-6 lines of code on every use.

Add also _PyImport_GetModuleAttr() which takes Python strings as arguments.
(cherry picked from commit 6fd4c8e)

…g() (pythonGH-93742) It combines PyImport_ImportModule() and PyObject_GetAttrString() and saves 4-6 lines of code on every use. Add also _PyImport_GetModuleAttr() which takes Python strings as arguments. (cherry picked from commit 6fd4c8e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

serhiy-storchaka deleted the backport-6fd4c8e-3.11 branch June 14, 2022 05:51
serhiy-storchaka added needs backport to 3.10 only security fixes and removed needs backport to 3.10 only security fixes labels Jun 16, 2022

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

bedevere-bot removed the needs backport to 3.10 only security fixes label Jun 16, 2022

Copy link
Copy Markdown

GH-93887 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 16, 2022
…g() (pythonGH-93742) (pythonGH-93792) It combines PyImport_ImportModule() and PyObject_GetAttrString() and saves 4-6 lines of code on every use. Add also _PyImport_GetModuleAttr() which takes Python strings as arguments. (cherry picked from commit 6fd4c8e) (cherry picked from commit d42b368) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this pull request Jun 16, 2022
…H-93742) (GH-93792) It combines PyImport_ImportModule() and PyObject_GetAttrString() and saves 4-6 lines of code on every use. Add also _PyImport_GetModuleAttr() which takes Python strings as arguments. (cherry picked from commit 6fd4c8e) (cherry picked from commit d42b368) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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

Labels

skip news type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Footer

© 2026 GitHub, Inc.