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-119560: Drop an Invalid Assert in PyState_FindModule()#119561

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
ericsnowcurrently merged 4 commits intopython:mainfromericsnowcurrently:fix-ujson
May 25, 2024

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrentlyericsnowcurrently commentedMay 25, 2024
edited by bedevere-appbot
Loading

The assertion was added ingh-118532 but was based on the invalid assumption thatPyState_FindModule() would only be called with an already-initialized module def. I've added a test to make sure we don't make that assumption again.

@ericsnowcurrentlyericsnowcurrentlyenabled auto-merge (squash)May 25, 2024 19:09
@ericsnowcurrentlyericsnowcurrently merged commit0c5ebe1 intopython:mainMay 25, 2024
36 checks passed
@ericsnowcurrentlyericsnowcurrently deleted the fix-ujson branchMay 25, 2024 19:30
@ericsnowcurrentlyericsnowcurrently added the needs backport to 3.13bugs and security fixes labelMay 27, 2024
@miss-islington-app
Copy link

Thanks@ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 27, 2024
…ongh-119561)The assertion was added inpythongh-118532 but was based on the invalid assumption that PyState_FindModule() would only be called with an already-initialized module def.  I've added a test to make sure we don't make that assumption again.(cherry picked from commit0c5ebe1)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
@bedevere-app
Copy link

GH-119632 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 27, 2024
ericsnowcurrently added a commit that referenced this pull requestMay 27, 2024
…119561) (gh-119632)The assertion was added ingh-118532 but was based on the invalid assumption that PyState_FindModule() would only be called with an already-initialized module def.  I've added a test to make sure we don't make that assumption again.(cherry picked from commit0c5ebe1)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
ericsnowcurrently added a commit that referenced this pull requestMay 27, 2024
The fix ingh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once.  This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag.  We fix that here by clearing each of the three modules after loading them.  We also tweak a check in _modules_by_index_check().
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 27, 2024
The fix inpythongh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once.  This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag.  We fix that here by clearing each of the three modules after loading them.  We also tweak a check in _modules_by_index_check().(cherry picked from commitae7b176)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
ericsnowcurrently added a commit that referenced this pull requestMay 27, 2024
…9633)The fix ingh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once.  This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag.  We fix that here by clearing each of the three modules after loading them.  We also tweak a check in _modules_by_index_check().(cherry picked from commitae7b176)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
…ongh-119561)The assertion was added inpythongh-118532 but was based on the invalid assumption that PyState_FindModule() would only be called with an already-initialized module def.  I've added a test to make sure we don't make that assumption again.
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
The fix inpythongh-119561 introduced an assertion that doesn't hold true if any of the three new test extension modules are loaded more than once.  This is fine normally but breaks if the new test_check_state_first() is run more than once, which happens for refleak checking and with the regrtest --forever flag.  We fix that here by clearing each of the three modules after loading them.  We also tweak a check in _modules_by_index_check().
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@ericsnowcurrently

[8]ページ先頭

©2009-2025 Movatter.jp