Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-mechanize for openSUSE:Factory checked in at 2023-03-31 21:15:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mechanize (Old)
and /work/SRC/openSUSE:Factory/.python-mechanize.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-mechanize"
Fri Mar 31 21:15:57 2023 rev:31 rq:1076397 version:0.4.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mechanize/python-mechanize.changes 2023-01-19 16:44:23.869829474 +0100
+++ /work/SRC/openSUSE:Factory/.python-mechanize.new.31432/python-mechanize.changes 2023-03-31 21:16:03.918536918 +0200
@@ -1,0 +2,7 @@
+Fri Mar 31 07:05:30 UTC 2023 - Steve Kowalik
+
+- Add patch support-python-311.patch:
+ * http.cookiejar changed behaviour from Python 3.11 onwards, support
+ both.
+
+-------------------------------------------------------------------
New:
----
support-python-311.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-mechanize.spec ++++++
--- /var/tmp/diff_new_pack.Wy1uRM/_old 2023-03-31 21:16:04.446539437 +0200
+++ /var/tmp/diff_new_pack.Wy1uRM/_new 2023-03-31 21:16:04.450539456 +0200
@@ -17,7 +17,6 @@
%define modname mechanize
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-mechanize
Version: 0.4.8
Release: 0
@@ -26,7 +25,10 @@
URL: https://github.com/python-mechanize/mechanize
Source: https://files.pythonhosted.org/packages/source/m/mechanize/%{modname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM python-mechanize-setup.cfg.patch gh#python-mechanize/mechanize#73 -- setup.cfg: Move packages def to options section
-Patch1: %{name}-setup.cfg.patch
+Patch0: %{name}-setup.cfg.patch
+# PATCH-FIX-OPENSUSE Python 3.11 no longer sorts cookies by key when iterating
+# Re: gh#python/cpython#22745
+Patch1: support-python-311.patch
BuildRequires: %{python_module Twisted}
BuildRequires: %{python_module html5lib}
BuildRequires: %{python_module setuptools}
@@ -43,8 +45,7 @@
of links.
%prep
-%setup -q -n %{modname}-%{version}
-%patch1 -p1
+%autosetup -p1 -n %{modname}-%{version}
sed -i -e '1{/^#!\/usr\/bin\/env python/d}' %{modname}/{_entities,_equiv,_form_controls,polyglot}.py
sed -i -e '1{/^#!/d}' examples/forms/{echo.cgi,example.py,simple.py}
chmod -x examples/forms/{echo.cgi,example.py,simple.py}
++++++ support-python-311.patch ++++++
Index: mechanize-0.4.8/test/test_cookies.py
===================================================================
--- mechanize-0.4.8.orig/test/test_cookies.py
+++ mechanize-0.4.8/test/test_cookies.py
@@ -1015,13 +1015,23 @@ class CookieTests(unittest.TestCase):
r'port="90,100, 80,8080"; '
r'max-age=100; Comment = "Just kidding! (\"|\\\\) "')
- versions = [1, 1, 1, 0, 1]
- names = ["bang", "foo", "foo", "spam", "foo"]
- domains = [
- ".sol.no", "blah.spam.org", "www.acme.com", "www.acme.com",
- "www.acme.com"
- ]
- paths = ["/", "/", "/", "/blah", "/blah/"]
+ # Python 3.11+ no longer sort cookies when returning them.
+ if sys.version_info >= (3, 11):
+ versions = [1, 0, 1, 1, 1]
+ names = ["foo", "spam", "foo", "foo", "bang"]
+ domains = [
+ "blah.spam.org", "www.acme.com", "www.acme.com",
+ "www.acme.com", ".sol.no"
+ ]
+ paths = ["/", "/blah", "/blah/", "/", "/"]
+ else:
+ versions = [1, 1, 1, 0, 1]
+ names = ["bang", "foo", "foo", "spam", "foo"]
+ domains = [
+ ".sol.no", "blah.spam.org", "www.acme.com", "www.acme.com",
+ "www.acme.com"
+ ]
+ paths = ["/", "/", "/", "/blah", "/blah/"]
# sequential iteration
for i in range(4):