8000 gh-119584: Fix test_import Failed Assertion by ericsnowcurrently · Pull Request #119623 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119584: Fix test_import Failed Assertion #119623

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Move a line up.
  • Loading branch information
ericsnowcurrently committed May 27, 2024
commit 3699d15b75b5c0d33b121dd5111cd3f2ba6d80f9
3 changes: 1 addition & 2 deletions Python/import.c
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ clear_singlephase_extension(PyInterpreterState *interp,
/* Clear data set when the module was initially loaded. */
def->m_base.m_init = NULL;
Py_CLEAR(def->m_base.m_copy);
// We leave m_index alone since there's no reason to reset it.
def->m_base.m_index = 0;

/* Clear the PyState_*Module() cache entry. */
Py_ssize_t index = _get_cached_module_index(cached);
Expand All @@ -2192,7 +2192,6 @@ clear_singlephase_extension(PyInterpreterState *interp,
return -1;
}
}
def->m_base.m_index = 0;

/* Clear the cached module def. */
_extensions_cache_delete(path, name);
Expand Down
Loading
0