Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 472db759e0 | |||
| 1942bb8420 | |||
| ff5e23b007 | |||
| a61d16be69 |
36
0001-Fix-CookieTests-following-fix-for-CPython-130631.patch
Normal file
36
0001-Fix-CookieTests-following-fix-for-CPython-130631.patch
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
From 0c1cd4b65697dee4e4192902c9a2965d94700502 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Colin Watson <cjwatson@debian.org>
|
||||||
|
Date: Mon, 26 May 2025 12:59:44 +0100
|
||||||
|
Subject: [PATCH] Fix CookieTests following fix for CPython #130631
|
||||||
|
|
||||||
|
The fix for https://github.com/python/cpython/issues/130631 in Python
|
||||||
|
3.14.0b1 (also cherry-picked to 3.13, but not yet released) causes
|
||||||
|
`www.acme.com` to be unquoted in cookie strings. Adjust a test to cope
|
||||||
|
with this.
|
||||||
|
---
|
||||||
|
test/test_cookies.py | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_cookies.py b/test/test_cookies.py
|
||||||
|
index ec0c2ff..92227fc 100644
|
||||||
|
--- a/test/test_cookies.py
|
||||||
|
+++ b/test/test_cookies.py
|
||||||
|
@@ -332,9 +332,13 @@ class CookieTests(unittest.TestCase):
|
||||||
|
cookie = c._cookies["www.acme.com"]['/foo/']['"spam"']
|
||||||
|
assert cookie.name == '"spam"'
|
||||||
|
assert cookie.value is None
|
||||||
|
- assert lwp_cookie_str(cookie) == (
|
||||||
|
+ assert lwp_cookie_str(cookie) in (
|
||||||
|
+ r'"spam"; path="/foo/"; domain=www.acme.com; '
|
||||||
|
+ 'path_spec; discard; version=0',
|
||||||
|
+ # prior to fix for https://github.com/python/cpython/issues/130631:
|
||||||
|
r'"spam"; path="/foo/"; domain="www.acme.com"; '
|
||||||
|
- 'path_spec; discard; version=0')
|
||||||
|
+ 'path_spec; discard; version=0',
|
||||||
|
+ )
|
||||||
|
old_str = repr(c)
|
||||||
|
c.save(ignore_expires=True, ignore_discard=True)
|
||||||
|
try:
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
||||||
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 9 09:42:10 UTC 2025 - Max Lin <mlin@suse.com>
|
||||||
|
|
||||||
|
- Fix CookieTests
|
||||||
|
* Add 0001-Fix-CookieTests-following-fix-for-CPython-130631.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 2 08:53:17 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to pip-based build
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 3 07:40:41 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Fri May 3 07:40:41 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-mechanize
|
# spec file for package python-mechanize
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -25,9 +25,13 @@ Summary: Stateful programmatic web browsing
|
|||||||
License: BSD-3-Clause AND (BSD-3-Clause OR ZPL-2.1)
|
License: BSD-3-Clause AND (BSD-3-Clause OR ZPL-2.1)
|
||||||
URL: https://github.com/python-mechanize/mechanize
|
URL: https://github.com/python-mechanize/mechanize
|
||||||
Source: https://files.pythonhosted.org/packages/source/m/mechanize/%{modname}-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/m/mechanize/%{modname}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM https://github.com/python-mechanize/mechanize/pull/102
|
||||||
|
Patch1: 0001-Fix-CookieTests-following-fix-for-CPython-130631.patch
|
||||||
BuildRequires: %{python_module Twisted}
|
BuildRequires: %{python_module Twisted}
|
||||||
BuildRequires: %{python_module html5lib}
|
BuildRequires: %{python_module html5lib}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: %{python_module zope.interface}
|
BuildRequires: %{python_module zope.interface}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -47,10 +51,10 @@ sed -i -e '1{/^#!/d}' examples/forms/{echo.cgi,example.py,simple.py}
|
|||||||
chmod -x examples/forms/{echo.cgi,example.py,simple.py}
|
chmod -x examples/forms/{echo.cgi,example.py,simple.py}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
|||||||
Reference in New Issue
Block a user