Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-105922: Add PyImport_AddModuleRef() function#105923

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:pyimport_addmoduleref
Jun 20, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedJun 19, 2023
edited
Loading

  • Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and
    PyImport_AddModuleObject().
  • pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with
    PyImport_AddModuleRef(name).

📚 Documentation preview 📚:https://cpython-previews--105923.org.readthedocs.build/

Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice; I left some comments.

Too bad we cannot run the ref leak bots now; there's already a ref leak intest_import andtest_peg_generator that has not been resolved :(

@vstinnervstinnerforce-pushed thepyimport_addmoduleref branch from631c02c tobf2a756CompareJune 19, 2023 23:08
@vstinner
Copy link
MemberAuthor

I updated my PR:

  • Rebased on the merged pythonrunc.c refactoring: commita5c2ad0
  • Don't deprecate PyImport_AddModule() and PyImport_AddModuleObject() in this PR anymore: I prefer to handle this in a separated PR.
  • Fix pythonrun.c
  • Use PyImport_AddModuleRef() for_frozen_importlib
erlend-aasland reacted with thumbs up emoji

Copy link
Contributor

@erlend-aaslanderlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Small typo nit. Otherwise looks good to me.

* Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and  PyImport_AddModuleObject().* pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with  PyImport_AddModuleRef(name).
@vstinner
Copy link
MemberAuthor

I fixed the typo: similar than => similar to.

@vstinnervstinnerforce-pushed thepyimport_addmoduleref branch from22c5f8c tof3a223dCompareJune 20, 2023 00:36
@vstinnervstinner merged commit03f1a13 intopython:mainJun 20, 2023
@vstinnervstinner deleted the pyimport_addmoduleref branchJune 20, 2023 06:48
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

@encukouencukouAwaiting requested review from encukouencukou is a code owner

@brettcannonbrettcannonAwaiting requested review from brettcannonbrettcannon is a code owner

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@ncoghlanncoghlanAwaiting requested review from ncoghlanncoghlan is a code owner

@warsawwarsawAwaiting requested review from warsawwarsaw is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@erlend-aasland@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp