Commit c3511c1d authored by Brett Cannon's avatar Brett Cannon

Issue #17953: document that sys.modules shouldn't be replaced (thanks

to interp->modules) and that deleting essential items from the dict
can cause Python to blow up.

Thanks to Terry Reedy for coming up with initial wording and Yogesh
Chaudhari for coming up with a patch using that wording in parallel to
my own patch.
parent 27a4ac53
...@@ -732,6 +732,8 @@ always available. ...@@ -732,6 +732,8 @@ always available.
This is a dictionary that maps module names to modules which have already been This is a dictionary that maps module names to modules which have already been
loaded. This can be manipulated to force reloading of modules and other tricks. loaded. This can be manipulated to force reloading of modules and other tricks.
However, replacing the dictionary will not necessarily work as expected and
deleting essential items from the dictionary may cause Python to fail.
.. data:: path .. data:: path
......
...@@ -59,6 +59,9 @@ Tests ...@@ -59,6 +59,9 @@ Tests
Documentation Documentation
------------- -------------
- Issue #17953: Mention that you shouldn't replace sys.modules and deleting key
items will cause Python to not be happy.
- Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs. - Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs.
- Issue #14097: improve the "introduction" page of the tutorial. - Issue #14097: improve the "introduction" page of the tutorial.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment