-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: collective.monkeypatcher
Branch: refs/heads/master Date: 2024-11-27T15:11:02-03:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/collective.monkeypatcher@8c5a3dd remove deprecated unittest.makeSuite Files changed: M src/collective/monkeypatcher/tests/test_monkeypatcher.py Repository: collective.monkeypatcher Branch: refs/heads/master Date: 2024-11-27T15:12:13-03:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/collective.monkeypatcher@dd64846 changenote Files changed: A news/14.bugfix Repository: collective.monkeypatcher Branch: refs/heads/master Date: 2024-11-28T22:48:09-03:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/collective.monkeypatcher@b68bd2b Merge pull request #14 from plone/py-3.13-unittest Fix removed `unittest.makeSuite` in py 3.13 Files changed: A news/14.bugfix M src/collective/monkeypatcher/tests/test_monkeypatcher.py
- Loading branch information
Showing
1 changed file
with
39 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
Repository: Products.CMFPlone | ||
Repository: collective.monkeypatcher | ||
|
||
|
||
Branch: refs/heads/5.2.x | ||
Date: 2024-10-30T08:47:17-07:00 | ||
Branch: refs/heads/master | ||
Date: 2024-11-27T15:11:02-03:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/collective.monkeypatcher/commit/8c5a3ddc436f6a0c10e62564ca3788d9cdf373f9 | ||
|
||
remove deprecated unittest.makeSuite | ||
|
||
Files changed: | ||
M src/collective/monkeypatcher/tests/test_monkeypatcher.py | ||
|
||
b'diff --git a/src/collective/monkeypatcher/tests/test_monkeypatcher.py b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\nindex fec3dff..30a7c8f 100644\n--- a/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n+++ b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n@@ -67,7 +67,8 @@ def test_monkeyPatchEvent(self):\n \n \n def test_suite():\n- from unittest import TestSuite, makeSuite\n- suite = TestSuite()\n- suite.addTest(makeSuite(TestMonkeyPatcher))\n- return suite\n+ import unittest\n+\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestMonkeyPatcher),\n+ ))\n' | ||
|
||
Repository: collective.monkeypatcher | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-27T15:12:13-03:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/collective.monkeypatcher/commit/dd64846474ae56e32d1be52d2e24c228a18af032 | ||
|
||
changenote | ||
|
||
Files changed: | ||
A news/14.bugfix | ||
|
||
b'diff --git a/news/14.bugfix b/news/14.bugfix\nnew file mode 100644\nindex 0000000..41e6fd2\n--- /dev/null\n+++ b/news/14.bugfix\n@@ -0,0 +1,2 @@\n+Fix removed `unittest.makeSuite` in python 3.13.\n+[petschki]\n' | ||
|
||
Repository: collective.monkeypatcher | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-11-28T22:48:09-03:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/7f494f98716dfce3f3c9897bd8cf95bb4661f351 | ||
Commit: https://github.com/plone/collective.monkeypatcher/commit/b68bd2bca30c5d7b4b9d192c40fd06c0d64a431d | ||
|
||
Respect new strict parsing of `email.utils.getaddresses` [5.2] (#4039) | ||
Merge pull request #14 from plone/py-3.13-unittest | ||
|
||
* Respect new strict parsing of `email.utils.getaddresses` | ||
|
||
* changenote | ||
Fix removed `unittest.makeSuite` in py 3.13 | ||
|
||
Files changed: | ||
A news/4039.bugfix | ||
M Products/CMFPlone/PloneTool.py | ||
M Products/CMFPlone/tests/testPloneTool.py | ||
A news/14.bugfix | ||
M src/collective/monkeypatcher/tests/test_monkeypatcher.py | ||
|
||
b'diff --git a/Products/CMFPlone/PloneTool.py b/Products/CMFPlone/PloneTool.py\nindex 8deb7e2b52..79763dc2e6 100644\n--- a/Products/CMFPlone/PloneTool.py\n+++ b/Products/CMFPlone/PloneTool.py\n@@ -141,6 +141,12 @@ def validateSingleNormalizedEmailAddress(self, address):\n if not isinstance(address, six.string_types):\n return False\n \n+ address = address.strip()\n+\n+ # address can be empty if getaddresses has parsing errors (returns [("", "")])\n+ if address == "":\n+ return False\n+\n sub = EMAIL_CUTOFF_RE.match(address)\n if sub is not None:\n # Address contains two newlines (possible spammer relay attack)\ndiff --git a/Products/CMFPlone/tests/testPloneTool.py b/Products/CMFPlone/tests/testPloneTool.py\nindex 683df9e898..f3468dcc84 100644\n--- a/Products/CMFPlone/tests/testPloneTool.py\n+++ b/Products/CMFPlone/tests/testPloneTool.py\n@@ -75,7 +75,6 @@ def testvalidateEmailAddresses(self):\n validInputs = (\n \'[email protected]\',\n \'[email protected],\\n [email protected]\',\n- \'[email protected]\\n [email protected]\', # omitting comma is ok\n \'[email protected],\\n [email protected]\',\n )\n invalidInputs = (\ndiff --git a/news/4039.bugfix b/news/4039.bugfix\nnew file mode 100644\nindex 0000000000..e9cc73c207\n--- /dev/null\n+++ b/news/4039.bugfix\n@@ -0,0 +1,2 @@\n+Update for strict parsing in `email.utils.getaddresses` newest versions.\n+[petschki]\n' | ||
b'diff --git a/news/14.bugfix b/news/14.bugfix\nnew file mode 100644\nindex 0000000..41e6fd2\n--- /dev/null\n+++ b/news/14.bugfix\n@@ -0,0 +1,2 @@\n+Fix removed `unittest.makeSuite` in python 3.13.\n+[petschki]\ndiff --git a/src/collective/monkeypatcher/tests/test_monkeypatcher.py b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\nindex fec3dff..30a7c8f 100644\n--- a/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n+++ b/src/collective/monkeypatcher/tests/test_monkeypatcher.py\n@@ -67,7 +67,8 @@ def test_monkeyPatchEvent(self):\n \n \n def test_suite():\n- from unittest import TestSuite, makeSuite\n- suite = TestSuite()\n- suite.addTest(makeSuite(TestMonkeyPatcher))\n- return suite\n+ import unittest\n+\n+ return unittest.TestSuite((\n+ unittest.defaultTestLoader.loadTestsFromTestCase(TestMonkeyPatcher),\n+ ))\n' | ||
|