diff -Nru python-mechanize-0.4.8+pypi/debian/changelog python-mechanize-0.4.8+pypi/debian/changelog --- python-mechanize-0.4.8+pypi/debian/changelog 2022-08-09 15:25:49.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/changelog 2022-12-18 16:20:00.000000000 +0000 @@ -1,3 +1,12 @@ +python-mechanize (1:0.4.8+pypi-5) unstable; urgency=medium + + * Upgrade Debian standards + * Rediff patches + Import upstream code fix to build on Python 3.11 + * Renumber patches + + -- YOKOTA Hiroshi Mon, 19 Dec 2022 01:20:00 +0900 + python-mechanize (1:0.4.8+pypi-4) unstable; urgency=medium * Lintian fix diff -Nru python-mechanize-0.4.8+pypi/debian/control python-mechanize-0.4.8+pypi/debian/control --- python-mechanize-0.4.8+pypi/debian/control 2022-05-14 00:57:56.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/control 2022-12-18 11:53:59.000000000 +0000 @@ -11,7 +11,7 @@ python3-html5lib, python3-setuptools, python3-twisted -Standards-Version: 4.6.1 +Standards-Version: 4.6.2 Homepage: https://github.com/python-mechanize/mechanize Vcs-Browser: https://salsa.debian.org/python-team/packages/python-mechanize Vcs-Git: https://salsa.debian.org/python-team/packages/python-mechanize.git diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0001-Use-Python-3.patch python-mechanize-0.4.8+pypi/debian/patches/0001-Use-Python-3.patch --- python-mechanize-0.4.8+pypi/debian/patches/0001-Use-Python-3.patch 2022-05-04 09:35:32.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0001-Use-Python-3.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -From: YOKOTA Hiroshi -Date: Fri, 4 Mar 2022 02:27:04 +0900 -Subject: Use Python 3 - -Forwarded: not-needed ---- - examples/forms/echo.cgi | 2 +- - examples/forms/example.py | 2 +- - examples/forms/simple.py | 2 +- - examples/hack21.py | 2 +- - examples/pypi.py | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/examples/forms/echo.cgi b/examples/forms/echo.cgi -index d132129..7e95e2e 100755 ---- a/examples/forms/echo.cgi -+++ b/examples/forms/echo.cgi -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # -*-python-*- - - print "Content-Type: text/html\n" -diff --git a/examples/forms/example.py b/examples/forms/example.py -index 1d0c490..be88c36 100755 ---- a/examples/forms/example.py -+++ b/examples/forms/example.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - from __future__ import print_function - import sys -diff --git a/examples/forms/simple.py b/examples/forms/simple.py -index 771b7ba..1a8ce38 100755 ---- a/examples/forms/simple.py -+++ b/examples/forms/simple.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - from __future__ import print_function - import sys -diff --git a/examples/hack21.py b/examples/hack21.py -index 161ca17..d117145 100644 ---- a/examples/hack21.py -+++ b/examples/hack21.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Port of Hack 21 from the O'Reilly book "Spidering Hacks" by Tara - # Calishain and Kevin Hemenway. Of course, there's no need to explicitly -diff --git a/examples/pypi.py b/examples/pypi.py -index b17352a..ea5adb5 100644 ---- a/examples/pypi.py -+++ b/examples/pypi.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Search PyPI, the Python Package Index, and retrieve latest mechanize tarball. - diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0002-Add-installation-package-name-to-install-codes.patch python-mechanize-0.4.8+pypi/debian/patches/0002-Add-installation-package-name-to-install-codes.patch --- python-mechanize-0.4.8+pypi/debian/patches/0002-Add-installation-package-name-to-install-codes.patch 2022-05-04 09:35:32.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0002-Add-installation-package-name-to-install-codes.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -From: YOKOTA Hiroshi -Date: Sun, 17 Apr 2022 04:20:39 +0900 -Subject: Add installation package name to install codes - ---- - setup.cfg | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/setup.cfg b/setup.cfg -index 4103d25..aacf64d 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -37,6 +37,7 @@ classifiers = - Topic :: Text Processing :: Markup :: XML - - [options] -+packages = mechanize - zip_safe = True - install_requires = html5lib>=0.999999999 - diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0003-Sort-lines.patch python-mechanize-0.4.8+pypi/debian/patches/0003-Sort-lines.patch --- python-mechanize-0.4.8+pypi/debian/patches/0003-Sort-lines.patch 2022-05-04 14:12:05.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0003-Sort-lines.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -From: YOKOTA Hiroshi -Date: Wed, 4 May 2022 18:17:27 +0900 -Subject: Sort lines - -Add some hack to restore original files at end of a package build process. -These files are rebuild in each build processes. ---- - mechanize.egg-info/PKG-INFO | 2 +- - mechanize.egg-info/requires.txt | 6 +++--- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/mechanize.egg-info/PKG-INFO b/mechanize.egg-info/PKG-INFO -index 7ae7e6a..ab9ba04 100644 ---- a/mechanize.egg-info/PKG-INFO -+++ b/mechanize.egg-info/PKG-INFO -@@ -32,9 +32,9 @@ Classifier: Topic :: Text Processing - Classifier: Topic :: Text Processing :: Markup - Classifier: Topic :: Text Processing :: Markup :: HTML - Classifier: Topic :: Text Processing :: Markup :: XML -+Provides-Extra: binarytest - Provides-Extra: fast - Provides-Extra: test --Provides-Extra: binarytest - License-File: LICENSE - - mechanize - Automate interaction with HTTP web servers -diff --git a/mechanize.egg-info/requires.txt b/mechanize.egg-info/requires.txt -index 36397f9..225f94d 100644 ---- a/mechanize.egg-info/requires.txt -+++ b/mechanize.egg-info/requires.txt -@@ -1,14 +1,14 @@ - html5lib>=0.999999999 - - [binarytest] --lxml - html5-parser -+lxml - - [fast] - html5-parser>=0.4.4 - - [test] --twisted -+html5lib - service_identity - six --html5lib -+twisted diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0004-Fix-warning.patch python-mechanize-0.4.8+pypi/debian/patches/0004-Fix-warning.patch --- python-mechanize-0.4.8+pypi/debian/patches/0004-Fix-warning.patch 2022-05-04 14:12:05.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0004-Fix-warning.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -From: YOKOTA Hiroshi -Date: Wed, 4 May 2022 18:34:01 +0900 -Subject: Fix warning - -Remove unused word ---- - MANIFEST.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/MANIFEST.in b/MANIFEST.in -index 80682a1..52808f6 100644 ---- a/MANIFEST.in -+++ b/MANIFEST.in -@@ -8,4 +8,4 @@ recursive-include examples *.py - recursive-include examples/forms *.dat *.txt *.html *.cgi *.py - recursive-include test/test_form_data *.html - recursive-include test *.py *.doctest *.special_doctest --recursive-include test-tools *.py *.cgi -+recursive-include test-tools *.py diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0009-Use-Python-3.patch python-mechanize-0.4.8+pypi/debian/patches/0009-Use-Python-3.patch --- python-mechanize-0.4.8+pypi/debian/patches/0009-Use-Python-3.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0009-Use-Python-3.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,63 @@ +From: YOKOTA Hiroshi +Date: Fri, 4 Mar 2022 02:27:04 +0900 +Subject: Use Python 3 + +Forwarded: not-needed +--- + examples/forms/echo.cgi | 2 +- + examples/forms/example.py | 2 +- + examples/forms/simple.py | 2 +- + examples/hack21.py | 2 +- + examples/pypi.py | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/examples/forms/echo.cgi b/examples/forms/echo.cgi +index d132129..7e95e2e 100755 +--- a/examples/forms/echo.cgi ++++ b/examples/forms/echo.cgi +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*-python-*- + + print "Content-Type: text/html\n" +diff --git a/examples/forms/example.py b/examples/forms/example.py +index 1d0c490..be88c36 100755 +--- a/examples/forms/example.py ++++ b/examples/forms/example.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from __future__ import print_function + import sys +diff --git a/examples/forms/simple.py b/examples/forms/simple.py +index 771b7ba..1a8ce38 100755 +--- a/examples/forms/simple.py ++++ b/examples/forms/simple.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + from __future__ import print_function + import sys +diff --git a/examples/hack21.py b/examples/hack21.py +index 161ca17..d117145 100644 +--- a/examples/hack21.py ++++ b/examples/hack21.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Port of Hack 21 from the O'Reilly book "Spidering Hacks" by Tara + # Calishain and Kevin Hemenway. Of course, there's no need to explicitly +diff --git a/examples/pypi.py b/examples/pypi.py +index b17352a..ea5adb5 100644 +--- a/examples/pypi.py ++++ b/examples/pypi.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + # Search PyPI, the Python Package Index, and retrieve latest mechanize tarball. + diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0010-Sort-lines.patch python-mechanize-0.4.8+pypi/debian/patches/0010-Sort-lines.patch --- python-mechanize-0.4.8+pypi/debian/patches/0010-Sort-lines.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0010-Sort-lines.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,48 @@ +From: YOKOTA Hiroshi +Date: Wed, 4 May 2022 18:17:27 +0900 +Subject: Sort lines + +Add some hack to restore original files at end of a package build process. +These files are rebuild in each build processes. +--- + mechanize.egg-info/PKG-INFO | 2 +- + mechanize.egg-info/requires.txt | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mechanize.egg-info/PKG-INFO b/mechanize.egg-info/PKG-INFO +index 7ae7e6a..ab9ba04 100644 +--- a/mechanize.egg-info/PKG-INFO ++++ b/mechanize.egg-info/PKG-INFO +@@ -32,9 +32,9 @@ Classifier: Topic :: Text Processing + Classifier: Topic :: Text Processing :: Markup + Classifier: Topic :: Text Processing :: Markup :: HTML + Classifier: Topic :: Text Processing :: Markup :: XML ++Provides-Extra: binarytest + Provides-Extra: fast + Provides-Extra: test +-Provides-Extra: binarytest + License-File: LICENSE + + mechanize - Automate interaction with HTTP web servers +diff --git a/mechanize.egg-info/requires.txt b/mechanize.egg-info/requires.txt +index 36397f9..225f94d 100644 +--- a/mechanize.egg-info/requires.txt ++++ b/mechanize.egg-info/requires.txt +@@ -1,14 +1,14 @@ + html5lib>=0.999999999 + + [binarytest] +-lxml + html5-parser ++lxml + + [fast] + html5-parser>=0.4.4 + + [test] +-twisted ++html5lib + service_identity + six +-html5lib ++twisted diff -Nru python-mechanize-0.4.8+pypi/debian/patches/0011-Fix-warning.patch python-mechanize-0.4.8+pypi/debian/patches/0011-Fix-warning.patch --- python-mechanize-0.4.8+pypi/debian/patches/0011-Fix-warning.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/0011-Fix-warning.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,19 @@ +From: YOKOTA Hiroshi +Date: Wed, 4 May 2022 18:34:01 +0900 +Subject: Fix warning + +Remove unused word +--- + MANIFEST.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/MANIFEST.in b/MANIFEST.in +index 80682a1..52808f6 100644 +--- a/MANIFEST.in ++++ b/MANIFEST.in +@@ -8,4 +8,4 @@ recursive-include examples *.py + recursive-include examples/forms *.dat *.txt *.html *.cgi *.py + recursive-include test/test_form_data *.html + recursive-include test *.py *.doctest *.special_doctest +-recursive-include test-tools *.py *.cgi ++recursive-include test-tools *.py diff -Nru python-mechanize-0.4.8+pypi/debian/patches/series python-mechanize-0.4.8+pypi/debian/patches/series --- python-mechanize-0.4.8+pypi/debian/patches/series 2022-05-04 14:12:05.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/series 2022-12-18 16:15:42.000000000 +0000 @@ -1,4 +1,11 @@ -0001-Use-Python-3.patch -0002-Add-installation-package-name-to-install-codes.patch -0003-Sort-lines.patch -0004-Fix-warning.patch +upstream/0001-Fix-an-error-on-pypy3.patch +upstream/0002-setup.cfg-Move-packages-def-to-options-section.patch +upstream/0003-Use-asserts-for-failing-test-so-we-get-better-feedba.patch +upstream/0004-DRYer.patch +upstream/0005-Change-test-to-not-rely-on-order-of-cookie-iteration.patch +upstream/0006-Deduplicate-doc-for-context-param.patch +upstream/0007-debugging-enable-HTTPRedirectDebugProcessor-for-http.patch +upstream/0008-Fix-previous-PR.patch +0009-Use-Python-3.patch +0010-Sort-lines.patch +0011-Fix-warning.patch diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0001-Fix-an-error-on-pypy3.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0001-Fix-an-error-on-pypy3.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0001-Fix-an-error-on-pypy3.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0001-Fix-an-error-on-pypy3.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,34 @@ +From: Kovid Goyal +Date: Mon, 25 Apr 2022 08:12:00 +0530 +Subject: Fix an error on pypy3 + +Fix #72 +--- + mechanize/_urllib2_fork.py | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/mechanize/_urllib2_fork.py b/mechanize/_urllib2_fork.py +index df6bef2..f14f7fc 100644 +--- a/mechanize/_urllib2_fork.py ++++ b/mechanize/_urllib2_fork.py +@@ -75,10 +75,16 @@ def md5_digest(data): + if platform.python_implementation() == 'PyPy': + def create_readline_wrapper(fh): + fh.recv = fh.read +- if not hasattr(fh, '_drop'): +- fh._drop = lambda: None +- fh._reuse = lambda: None +- return socket._fileobject(fh, close=True) ++ if is_py2: ++ if not hasattr(fh, '_drop'): ++ fh._drop = lambda: None ++ fh._reuse = lambda: None ++ ans = socket._fileobject(fh, close=True) ++ else: ++ fh.recv_into = fh.readinto ++ fh._decref_socketios = lambda: None ++ ans = BufferedReader(socket.SocketIO(fh, 'r')) ++ return ans + else: + def create_readline_wrapper(fh): + fh.recv = fh.read diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0002-setup.cfg-Move-packages-def-to-options-section.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0002-setup.cfg-Move-packages-def-to-options-section.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0002-setup.cfg-Move-packages-def-to-options-section.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0002-setup.cfg-Move-packages-def-to-options-section.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,29 @@ +From: Li-Wen Hsu +Date: Mon, 25 Apr 2022 22:03:01 +0800 +Subject: setup.cfg: Move packages def to options section + +Fix packaging with older setuptools. +--- + setup.cfg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.cfg b/setup.cfg +index 4103d25..8076375 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -8,7 +8,6 @@ license = BSD + description = Stateful, programmatic web browsing + long_description = file: README.rst + url = https://github.com/python-mechanize/mechanize +-packages = mechanize + classifiers = + Development Status :: 5 - Production/Stable + Intended Audience :: Developers +@@ -37,6 +36,7 @@ classifiers = + Topic :: Text Processing :: Markup :: XML + + [options] ++packages = mechanize + zip_safe = True + install_requires = html5lib>=0.999999999 + diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0003-Use-asserts-for-failing-test-so-we-get-better-feedba.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0003-Use-asserts-for-failing-test-so-we-get-better-feedba.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0003-Use-asserts-for-failing-test-so-we-get-better-feedba.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0003-Use-asserts-for-failing-test-so-we-get-better-feedba.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,28 @@ +From: Kovid Goyal +Date: Tue, 24 May 2022 11:13:16 +0530 +Subject: Use asserts for failing test so we get better feedback on the + failure + +--- + test/test_cookies.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/test_cookies.py b/test/test_cookies.py +index cb03060..e699e3e 100644 +--- a/test/test_cookies.py ++++ b/test/test_cookies.py +@@ -1028,10 +1028,10 @@ class CookieTests(unittest.TestCase): + i = 0 + for c in cs: + # assert isinstance(c, Cookie) +- assert c.version == versions[i] +- assert c.name == names[i] +- assert c.domain == domains[i] +- assert c.path == paths[i] ++ self.assertEqual(c.version, versions[i]) ++ self.assertEqual(c.name, names[i]) ++ self.assertEqual(c.domain, domains[i]) ++ self.assertEqual(c.path, paths[i]) + i = i + 1 + + self.assertRaises(IndexError, lambda cs=cs: cs[5]) diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0004-DRYer.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0004-DRYer.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0004-DRYer.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0004-DRYer.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,29 @@ +From: Kovid Goyal +Date: Tue, 24 May 2022 17:54:50 +0530 +Subject: DRYer + +--- + test/test_cookies.py | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/test/test_cookies.py b/test/test_cookies.py +index e699e3e..20055d8 100644 +--- a/test/test_cookies.py ++++ b/test/test_cookies.py +@@ -1025,14 +1025,9 @@ class CookieTests(unittest.TestCase): + + # sequential iteration + for i in range(4): +- i = 0 +- for c in cs: ++ for c, expected in zip(cs, zip(versions, names, domains, paths)): + # assert isinstance(c, Cookie) +- self.assertEqual(c.version, versions[i]) +- self.assertEqual(c.name, names[i]) +- self.assertEqual(c.domain, domains[i]) +- self.assertEqual(c.path, paths[i]) +- i = i + 1 ++ self.assertEqual((c.version, c.name, c.domain, c.path), expected) + + self.assertRaises(IndexError, lambda cs=cs: cs[5]) + diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0005-Change-test-to-not-rely-on-order-of-cookie-iteration.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0005-Change-test-to-not-rely-on-order-of-cookie-iteration.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0005-Change-test-to-not-rely-on-order-of-cookie-iteration.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0005-Change-test-to-not-rely-on-order-of-cookie-iteration.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,35 @@ +From: Kovid Goyal +Date: Tue, 24 May 2022 18:09:16 +0530 +Subject: Change test to not rely on order of cookie iteration + +python 3.11 iterates in add order, earlier pythons iterate in domain +sorted order + +Fix #74 +--- + test/test_cookies.py | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/test/test_cookies.py b/test/test_cookies.py +index 20055d8..ec0c2ff 100644 +--- a/test/test_cookies.py ++++ b/test/test_cookies.py +@@ -1022,13 +1022,12 @@ class CookieTests(unittest.TestCase): + "www.acme.com" + ] + paths = ["/", "/", "/", "/blah", "/blah/"] +- ++ expected = set(zip(versions, names, domains, paths)) + # sequential iteration +- for i in range(4): +- for c, expected in zip(cs, zip(versions, names, domains, paths)): +- # assert isinstance(c, Cookie) +- self.assertEqual((c.version, c.name, c.domain, c.path), expected) +- ++ # python 3.11 iterates in add order, earlier pythons iterate in domain ++ # sorted order ++ actual = {(c.version, c.name, c.domain, c.path) for c in cs} ++ self.assertEqual(expected, actual) + self.assertRaises(IndexError, lambda cs=cs: cs[5]) + + def test_parse_ns_headers(self): diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0006-Deduplicate-doc-for-context-param.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0006-Deduplicate-doc-for-context-param.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0006-Deduplicate-doc-for-context-param.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0006-Deduplicate-doc-for-context-param.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,30 @@ +From: Samuel Freilich +Date: Fri, 3 Jun 2022 13:37:33 -0400 +Subject: Deduplicate doc for context param + +The documentation for Browser.set_ca_param documents the context parameter twice. This prunes the redundancy. +--- + mechanize/_useragent.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/mechanize/_useragent.py b/mechanize/_useragent.py +index 0375b6d..057940e 100644 +--- a/mechanize/_useragent.py ++++ b/mechanize/_useragent.py +@@ -251,11 +251,11 @@ class UserAgentBase(_opener.OpenerDirector): + Set the SSL Context used for connecting to SSL servers. + + This method accepts the same arguments as the +- :py:meth:`ssl.SSLContext.load_verify_locations()` method from the +- python standard library. You can also pass a pre-built context via the +- `context` keyword argument. Note that to use this feature, you must be +- using python >= 2.7.9. In addition you can directly pass in +- a pre-built :class:`ssl.SSLContext` as the `context` argument. ++ :py:meth:`ssl.SSLContext.load_verify_locations()` method from ++ the Python standard library. You can also pass a pre-built ++ :class:`ssl.SSLContext` via the `context` keyword argument. ++ Note that to use this feature, you must be using Python >= ++ 2.7.9. + + ''' + import ssl diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0007-debugging-enable-HTTPRedirectDebugProcessor-for-http.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0007-debugging-enable-HTTPRedirectDebugProcessor-for-http.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0007-debugging-enable-HTTPRedirectDebugProcessor-for-http.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0007-debugging-enable-HTTPRedirectDebugProcessor-for-http.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,19 @@ +From: Markus Koetter +Date: Tue, 1 Nov 2022 11:06:39 +0100 +Subject: debugging - enable HTTPRedirectDebugProcessor for https + +--- + mechanize/_debug.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/mechanize/_debug.py b/mechanize/_debug.py +index 4bb1c7c..8e3b098 100644 +--- a/mechanize/_debug.py ++++ b/mechanize/_debug.py +@@ -30,3 +30,6 @@ class HTTPRedirectDebugProcessor(BaseHandler): + info = logging.getLogger("mechanize.http_redirects").info + info("redirecting to %s", request.get_full_url()) + return request ++ ++ https_response = http_response ++ diff -Nru python-mechanize-0.4.8+pypi/debian/patches/upstream/0008-Fix-previous-PR.patch python-mechanize-0.4.8+pypi/debian/patches/upstream/0008-Fix-previous-PR.patch --- python-mechanize-0.4.8+pypi/debian/patches/upstream/0008-Fix-previous-PR.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-mechanize-0.4.8+pypi/debian/patches/upstream/0008-Fix-previous-PR.patch 2022-12-18 16:15:42.000000000 +0000 @@ -0,0 +1,21 @@ +From: Kovid Goyal +Date: Wed, 2 Nov 2022 08:16:41 +0530 +Subject: Fix previous PR + +--- + mechanize/_debug.py | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/mechanize/_debug.py b/mechanize/_debug.py +index 8e3b098..7b50cbe 100644 +--- a/mechanize/_debug.py ++++ b/mechanize/_debug.py +@@ -30,6 +30,5 @@ class HTTPRedirectDebugProcessor(BaseHandler): + info = logging.getLogger("mechanize.http_redirects").info + info("redirecting to %s", request.get_full_url()) + return request +- +- https_response = http_response +- ++ ++ https_request = http_request