This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Anders.Hovmöller, brett.cannon, ezio.melotti, malin, michael.foord, rhettinger, serhiy.storchaka
Date 2019-04-02.20:34:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1554237252.9.0.552655111144.issue36485@roundup.psfhosted.org>
In-reply-to
Content
> Did you mean importlib.reload() instead of sys.reload()?

Yes.

> And technically it would *if* you're okay with the other 
> side-effects of reloading,

If you want to go forward with this, go for it. I would like to be able to explain to another person why this is needed, but personally can't visualize a circumstance where a person is testing module, doesn't know how to use the existing cache clearing APIs, but needs to clear caches (not sure why), and doesn't either know or want what happens on import.  I've never seen this situation arise, but if it's something you want, I won't stand it the way.

BTW, if you're going to have some sort of clear_all(), perhaps it should cover the sys.intern() dictionary and string hashes as well.  AFAICT, there's nothing special about a regex cache that gives it a greater need to be cleared
History
Date User Action Args
2019-04-02 20:34:12rhettingersetrecipients: + rhettinger, brett.cannon, ezio.melotti, michael.foord, serhiy.storchaka, Anders.Hovmöller, malin
2019-04-02 20:34:12rhettingersetmessageid: <1554237252.9.0.552655111144.issue36485@roundup.psfhosted.org>
2019-04-02 20:34:12rhettingerlinkissue36485 messages
2019-04-02 20:34:12rhettingercreate