summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorRed4Ru <39802734+Red4Ru@users.noreply.github.com>2024-11-13 08:20:38 (GMT)
committerGitHub <noreply@github.com>2024-11-13 08:20:38 (GMT)
commit1e40c5ba47780ddd91868abb3aa064f5ba3015e4 (patch)
tree1ee9d4458d80c7a853a342f4676ead7de1085994 /Misc
parent2e39d77ddeb51505d65fd54ccfcd72615c6b1927 (diff)
downloadcpython-1e40c5ba47780ddd91868abb3aa064f5ba3015e4.zip
cpython-1e40c5ba47780ddd91868abb3aa064f5ba3015e4.tar.gz
cpython-1e40c5ba47780ddd91868abb3aa064f5ba3015e4.tar.bz2
gh-104745: Limit starting a patcher more than once without stopping it (#126649)
Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object. --------- Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2024-11-10-18-14-51.gh-issue-104745.zAa5Ke.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-11-10-18-14-51.gh-issue-104745.zAa5Ke.rst b/Misc/NEWS.d/next/Library/2024-11-10-18-14-51.gh-issue-104745.zAa5Ke.rst
new file mode 100644
index 0000000..c83a107
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2024-11-10-18-14-51.gh-issue-104745.zAa5Ke.rst
@@ -0,0 +1,3 @@
+Limit starting a patcher (from :func:`unittest.mock.patch` or
+:func:`unittest.mock.patch.object`) more than
+once without stopping it