Commit e8dbe7e
gh-104745: Limit starting a patcher more than once without stopping it (GH-126649)
Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object.
---------
(cherry picked from commit 1e40c5b)
Co-authored-by: Red4Ru <39802734+Red4Ru@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent b03ba54 commit e8dbe7e
File tree
3 files changed
+62
-2
lines changed- Lib
- test/test_unittest/testmock
- unittest
- Misc/NEWS.d/next/Library
3 files changed
+62
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
748 | 796 | | |
749 | 797 | | |
750 | 798 | | |
| |||
1098 | 1146 | | |
1099 | 1147 | | |
1100 | 1148 | | |
1101 | | - | |
| 1149 | + | |
1102 | 1150 | | |
1103 | 1151 | | |
1104 | 1152 | | |
| |||
1111 | 1159 | | |
1112 | 1160 | | |
1113 | 1161 | | |
1114 | | - | |
| 1162 | + | |
1115 | 1163 | | |
1116 | 1164 | | |
1117 | 1165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1357 | 1357 | | |
1358 | 1358 | | |
1359 | 1359 | | |
| 1360 | + | |
1360 | 1361 | | |
1361 | 1362 | | |
1362 | 1363 | | |
| |||
1469 | 1470 | | |
1470 | 1471 | | |
1471 | 1472 | | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
1472 | 1476 | | |
1473 | 1477 | | |
1474 | 1478 | | |
| |||
1600 | 1604 | | |
1601 | 1605 | | |
1602 | 1606 | | |
| 1607 | + | |
1603 | 1608 | | |
1604 | 1609 | | |
1605 | 1610 | | |
| |||
1619 | 1624 | | |
1620 | 1625 | | |
1621 | 1626 | | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
1622 | 1630 | | |
1623 | 1631 | | |
1624 | 1632 | | |
| |||
1635 | 1643 | | |
1636 | 1644 | | |
1637 | 1645 | | |
| 1646 | + | |
1638 | 1647 | | |
1639 | 1648 | | |
1640 | 1649 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments