GNU bug report logs - #54465
[PATCH] gnu: Added patch to python-w3lib for broken test.

Previous Next

Package: guix-patches;

Reported by: Pradana Adrinusa AUMARS <paumars <at> courrier.dev>

Date: Sat, 19 Mar 2022 13:57:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 54465 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#54465; Package guix-patches. (Sat, 19 Mar 2022 13:57:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pradana Adrinusa AUMARS <paumars <at> courrier.dev>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 19 Mar 2022 13:57:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pradana Adrinusa AUMARS <paumars <at> courrier.dev>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Added patch to python-w3lib for broken test.
Date: Sat, 19 Mar 2022 14:56:21 +0100
From 8aaddbdd5b5c51043b3ddfa4aefb72361f0f763f Mon Sep 17 00:00:00 2001
From: Pradana AUMARS <paumars <at> courrier.dev>
Date: Sat, 19 Mar 2022 14:51:22 +0100
Subject: [PATCH] gnu: Added patch to python-w3lib for broken test.

* gnu/packages/python-web.scm (python-w3lib): Added a patch for the broken test.
* gnu/packages/patches/python-w3lib-broken-test.patch: New file.
---
 .../patches/python-w3lib-broken-test.patch    | 31 +++++++++++++++++++
 gnu/packages/python-web.scm                   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 gnu/packages/patches/python-w3lib-broken-test.patch

diff --git a/gnu/packages/patches/python-w3lib-broken-test.patch b/gnu/packages/patches/python-w3lib-broken-test.patch
new file mode 100644
index 0000000000..5b4a628268
--- /dev/null
+++ b/gnu/packages/patches/python-w3lib-broken-test.patch
@@ -0,0 +1,31 @@
+From 78054f19bfe20555792b0f336b423921fe88b994 Mon Sep 17 00:00:00 2001
+From: Anders Kaseorg <andersk <at> mit.edu>
+Date: Mon, 1 Mar 2021 11:34:23 -0800
+Subject: [PATCH] Remove test broken by Python CVE-2021-23336 fix
+
+In Python 3.6.13, 3.7.10, 3.8.8, and 3.9.2, urllib.parse.parse_qsl no
+longer treats ; as a separator by default
+(https://bugs.python.org/issue42967).
+
+Fixes #164.
+
+Signed-off-by: Anders Kaseorg <andersk <at> mit.edu>
+---
+ tests/test_url.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/tests/test_url.py b/tests/test_url.py
+index 3ff544e..e90065c 100644
+--- a/tests/test_url.py
++++ b/tests/test_url.py
+@@ -299,10 +299,6 @@ def test_add_or_replace_parameter(self):
+         self.assertEqual(add_or_replace_parameter(url, 'arg3', 'nv3'),
+                          'http://domain/test?arg1=v1&arg2=v2&arg3=nv3')
+ 
+-        url = 'http://domain/test?arg1=v1;arg2=v2'
+-        self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'),
+-                         'http://domain/test?arg1=v3&arg2=v2')
+-
+         self.assertEqual(add_or_replace_parameter("http://domain/moreInfo.asp?prodID=", 'prodID', '20'),
+                          'http://domain/moreInfo.asp?prodID=20')
+         url = 'http://rmc-offers.co.uk/productlist.asp?BCat=2%2C60&CatID=60'
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9c2a48166a..8b460075c0 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6189,6 +6189,7 @@ (define-public python-w3lib
      (origin
        (method url-fetch)
        (uri (pypi-uri "w3lib" version))
+       (patches (search-patches "python-w3lib-broken-test.patch"))
        (sha256
         (base32
          "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha"))))
-- 
2.34.0






Information forwarded to guix-patches <at> gnu.org:
bug#54465; Package guix-patches. (Mon, 21 Nov 2022 09:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 54465 <at> debbugs.gnu.org (full text, mbox):

From: Pradana Adrinusa AUMARS <paumars <at> courrier.dev>
To: 54465 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Added patch to python-w3lib for broken test.
Date: Mon, 21 Nov 2022 10:05:12 +0100
Please close.

This issue has been fixed by issue 54697 by Felix Gruber.




This bug report was last modified 2 years and 204 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.