[PATCH] gnu: Added patch to python-w3lib for broken test.

  • Open
  • quality assurance status badge
Details
One participant
  • Pradana Adrinusa AUMARS
Owner
unassigned
Submitted by
Pradana Adrinusa AUMARS
Severity
normal
P
P
Pradana Adrinusa AUMARS wrote on 19 Mar 2022 14:56
(address . guix-patches@gnu.org)
3cc10d3afa3e4f9edd2adcf88618857e197a37b7.camel@courrier.dev
From 8aaddbdd5b5c51043b3ddfa4aefb72361f0f763f Mon Sep 17 00:00:00 2001
From: Pradana AUMARS <paumars@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

Toggle diff (51 lines)
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@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@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
P
P
Pradana Adrinusa AUMARS wrote on 21 Nov 2022 10:05
(address . 54465@debbugs.gnu.org)
0c9e39bc94e4ed8ecd7992fe5d19c549e8c0eea5.camel@courrier.dev
Please close.

This issue has been fixed by issue 54697 by Felix Gruber.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 54465@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 54465
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch