bpo-36485: Add sys.clear_caches(). by serhiy-storchaka · Pull Request #12632 · python/cpython
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 34.4k
Open
serhiy-storchaka wants to merge 1 commit intopython:mainfrom
Open
bpo-36485: Add sys.clear_caches().#12632
serhiy-storchaka wants to merge 1 commit intopython:mainfrom
bpo-36485: Add sys.clear_caches().#12632
serhiy-storchaka wants to merge 1 commit intopython:mainfrom
Conversation
Copy link Copy Markdown
Member
It calls the __clearcache__() functions for every imported module
if it is defined.
serhiy-storchaka
requested review from
a team,
gvanrossum and
ilevkivskyi
as code owners
the-knights-who-say-ni
added
the
CLA signed
label
bedevere-bot
added
the
awaiting core review
label
It calls the __clearcache__() functions for every imported module if it is defined.
serhiy-storchaka
force-pushed
the
clear_caches
branch
from
d7d88a9 to
c3dbcd1
Compare
serhiy-storchaka
mentioned this pull request
Copy link Copy Markdown
Member
ilevkivskyi
commented
Apr 3, 2019
ilevkivskyi commented
Apr 3, 2019I am not sure this is really needed, but FWIW I like this approach more than #12639
| /*[clinic end generated code: output=7bbac9db7bbef6c3 input=9e739bbc710495ff]*/ | ||
| { | ||
| _Py_IDENTIFIER(__clearcache__); | ||
| PyObject *modules = PyMapping_Values(PyImport_GetModuleDict()); |
Copy link Copy Markdown
Contributor
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyMapping_Values() should be checked for failure, no?
ezio-melotti
removed
the
CLA signed
label
Copy link Copy Markdown
github-actions
bot
commented
Sep 21, 2025
github-actions bot commented
Sep 21, 2025This PR is stale because it has been open for 30 days with no activity.
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