From d30510674eff7464dd8f4567fa40906262314b7461c1685f77f056ffa1fa45b1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 11 Aug 2023 20:15:40 +0000 Subject: [PATCH] Fix patches OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=375 --- Revert-gh105127-left-tests.patch | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Revert-gh105127-left-tests.patch b/Revert-gh105127-left-tests.patch index b233898..6ee92a2 100644 --- a/Revert-gh105127-left-tests.patch +++ b/Revert-gh105127-left-tests.patch @@ -13,10 +13,11 @@ See https://github.com/python/cpython/issues/106669.. Co-authored-by: Gregory P. Smith --- Doc/library/email.utils.rst | 24 ---------- - Lib/email/test/test_email.py | 17 +++++++ + Lib/email/test/test_email.py | 19 +++++++ + Lib/email/test/test_email_renamed.py | 2 Lib/email/utils.py | 15 +----- Misc/NEWS.d/next/Security/2023-06-13-20-52-24.gh-issue-102988.Kei7Vf.rst | 5 ++ - 4 files changed, 25 insertions(+), 36 deletions(-) + 5 files changed, 27 insertions(+), 38 deletions(-) create mode 100644 Misc/NEWS.d/next/Security/2023-06-13-20-52-24.gh-issue-102988.Kei7Vf.rst --- a/Doc/library/email.utils.rst @@ -61,7 +62,7 @@ Co-authored-by: Gregory P. Smith --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py -@@ -2414,6 +2414,23 @@ Foo +@@ -2414,12 +2414,29 @@ Foo [('Al Person', 'aperson@dom.ain'), ('Bud Person', 'bperson@dom.ain')]) @@ -85,6 +86,24 @@ Co-authored-by: Gregory P. Smith def test_getaddresses_nasty(self): eq = self.assertEqual eq(Utils.getaddresses(['foo: ;']), [('', '')]) + eq(Utils.getaddresses( + ['[]*-- =~$']), +- [('', ''), ('', ''), ('', '*--')]) ++ [('', ''),]) + eq(Utils.getaddresses( + ['foo: ;', '"Jason R. Mastaler" ']), + [('', ''), ('Jason R. Mastaler', 'jason@dom.ain')]) +--- a/Lib/email/test/test_email_renamed.py ++++ b/Lib/email/test/test_email_renamed.py +@@ -2280,7 +2280,7 @@ Foo + eq(utils.getaddresses(['foo: ;']), [('', '')]) + eq(utils.getaddresses( + ['[]*-- =~$']), +- [('', ''), ('', ''), ('', '*--')]) ++ [('', ''),]) + eq(utils.getaddresses( + ['foo: ;', '"Jason R. Mastaler" ']), + [('', ''), ('Jason R. Mastaler', 'jason@dom.ain')]) --- a/Lib/email/utils.py +++ b/Lib/email/utils.py @@ -262,18 +262,9 @@ def parseaddr(addr):