summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-10-11 13:51:07 (GMT)
committerGitHub <noreply@github.com>2020-10-11 13:51:07 (GMT)
commit8287aadb75f6bd0154996424819334cd3839707c (patch)
treea8c1bdba620f33bd02e9558fe2a8bae6df69d37b /Misc/NEWS.d/next
parentfa1d83db62a545580d9a1a585b2c1fb55961a5c3 (diff)
downloadcpython-8287aadb75f6bd0154996424819334cd3839707c.zip
cpython-8287aadb75f6bd0154996424819334cd3839707c.tar.gz
cpython-8287aadb75f6bd0154996424819334cd3839707c.tar.bz2
bpo-41993: Fix possible issues in remove_module() (GH-22631)
* PyMapping_HasKey() is not safe because it silences all exceptions and can return incorrect result. * Informative exceptions from PyMapping_DelItem() are overridden with RuntimeError and the original exception raised before calling remove_module() is lost. * There is a race condition between PyMapping_HasKey() and PyMapping_DelItem().
Diffstat (limited to 'Misc/NEWS.d/next')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2020-10-10-13-53-52.bpo-41993.YMzixQ.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-10-10-13-53-52.bpo-41993.YMzixQ.rst b/Misc/NEWS.d/next/Core and Builtins/2020-10-10-13-53-52.bpo-41993.YMzixQ.rst
new file mode 100644
index 0000000..3669cf1
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2020-10-10-13-53-52.bpo-41993.YMzixQ.rst
@@ -0,0 +1,2 @@
+Fixed potential issues with removing not completely initialized module from
+``sys.modules`` when import fails.