From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 03 14:37:10 2022 Received: (at submit) by debbugs.gnu.org; 3 Apr 2022 18:37:10 +0000 Received: from localhost ([127.0.0.1]:49505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nb55z-00029y-22 for submit@debbugs.gnu.org; Sun, 03 Apr 2022 14:37:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:57650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nb55x-00029c-6n for submit@debbugs.gnu.org; Sun, 03 Apr 2022 14:37:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nb55w-0004T9-WC for guix-patches@gnu.org; Sun, 03 Apr 2022 14:37:01 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nb55p-0005gl-Hg for guix-patches@gnu.org; Sun, 03 Apr 2022 14:36:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 96854240026 for ; Sun, 3 Apr 2022 20:36:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1649011010; bh=85A6AlHzhRYA1DNyZyYPe36WCiFiNMS9PooSddFWd+U=; h=From:To:Cc:Subject:Date:From; b=VpZzDYhlmjZW6EJVZh76NqvMK8cN7sPutTghomNOdfe73t2r76BgUYsy/gXPCK3Ib XCgVJV4qZsyMlyE8e50BYqHi1YdhGAwGxvxxWhDOJvYYlxWd6k7ne9aiz+nqgA0rwk O/m2nvfgW47tnyWjX7hPI0PLk202s09rMSHP9QEDPBSKGgM7IprwbqCqLPYtt8Z4no bILQ3SwyJBnC+QAuW1yQwXPIDznNsz7nAeFoif9/Ps5nvkyZjsopwtoGnEVXA93og6 svUiaSaA/s/MQm4TRtGJjZ3JgXw+FS6UDt6rm86hOEO0KNF0k4vW4AL2TQRQX+VWRK jW3hqA6otEXQA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4KWjLB0Lwmz6tmG; Sun, 3 Apr 2022 20:36:49 +0200 (CEST) From: Felix Gruber To: guix-patches@gnu.org Subject: [PATCH] gnu: python-w3lib: Fix build. Date: Sun, 3 Apr 2022 18:36:39 +0000 Message-Id: <20220403183639.55110-1-felgru@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=felgru@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Felix Gruber X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/python-web.scm (python-w3lib): Fix build. [source]: Add python-w3lib-fix-test-failure.patch. [arguments]: Use pytest in the 'check phase. [native-inputs]: Add python-pytest. * gnu/packages/patches/python-w3lib-fix-test-failure.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../python-w3lib-fix-test-failure.patch | 60 +++++++++++++++++++ gnu/packages/python-web.scm | 11 +++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-w3lib-fix-test-failure.patch diff --git a/gnu/local.mk b/gnu/local.mk index aac7362475..6ac1ceb147 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1592,6 +1592,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-chai-drop-python2.patch \ %D%/packages/patches/python-random2-getrandbits-test.patch \ %D%/packages/patches/python-poppler-qt5-fix-build.patch \ + %D%/packages/patches/python-w3lib-fix-test-failure.patch \ %D%/packages/patches/sdcc-disable-non-free-code.patch \ %D%/packages/patches/sdl-pango-api_additions.patch \ %D%/packages/patches/sdl-pango-blit_overflow.patch \ diff --git a/gnu/packages/patches/python-w3lib-fix-test-failure.patch b/gnu/packages/patches/python-w3lib-fix-test-failure.patch new file mode 100644 index 0000000000..f38fc749df --- /dev/null +++ b/gnu/packages/patches/python-w3lib-fix-test-failure.patch @@ -0,0 +1,60 @@ +From fae6cc40e112cd13697cb0e8d79976f32c72491d Mon Sep 17 00:00:00 2001 +From: Eugenio Lacuesta +Date: Wed, 10 Mar 2021 12:31:05 -0300 +Subject: [PATCH] [CI] Mark single add_or_replace_parameter test as xfail + +--- +This patch is based on upstream commit +fae6cc40e112cd13697cb0e8d79976f32c72491d which is part of +https://github.com/scrapy/w3lib/pull/166. + + .gitignore | 3 ++- + tests/test_url.py | 25 ++++++++++++++----------- + 2 files changed, 16 insertions(+), 12 deletions(-) + +diff --git a/tests/test_url.py b/tests/test_url.py +index 8b07c00..0f7458e 100644 +--- a/tests/test_url.py ++++ b/tests/test_url.py +@@ -1,12 +1,14 @@ +-# -*- coding: utf-8 -*- + from __future__ import absolute_import + import os + import unittest ++ ++import pytest ++from six.moves.urllib.parse import urlparse ++ + from w3lib.url import (is_url, safe_url_string, safe_download_url, + url_query_parameter, add_or_replace_parameter, url_query_cleaner, + file_uri_to_path, parse_data_uri, path_to_file_uri, any_to_uri, + urljoin_rfc, canonicalize_url, parse_url, add_or_replace_parameters) +-from six.moves.urllib.parse import urlparse + + + class UrlTests(unittest.TestCase): +@@ -310,10 +311,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' +@@ -338,6 +335,13 @@ def test_add_or_replace_parameter(self): + self.assertEqual(add_or_replace_parameter(url, 'arg1', 'v3'), + 'http://domain/test?arg1=v3&arg2=v2') + ++ @pytest.mark.xfail(reason="https://github.com/scrapy/w3lib/issues/164") ++ def test_add_or_replace_parameter_fail(self): ++ self.assertEqual( ++ add_or_replace_parameter('http://domain/test?arg1=v1;arg2=v2', 'arg1', 'v3'), ++ 'http://domain/test?arg1=v3&arg2=v2' ++ ) ++ + def test_add_or_replace_parameters(self): + url = 'http://domain/test' + self.assertEqual(add_or_replace_parameters(url, {'arg': 'v'}), diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 41e0d1c3d6..f77d163833 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -49,6 +49,7 @@ ;;; Copyright © 2021 Alice Brenon ;;; Copyright © 2022 John Kehayias ;;; Copyright © 2022 Denis 'GNUtoo' Carikli +;;; Copyright © 2022 Felix Gruber ;;; ;;; This file is part of GNU Guix. ;;; @@ -6188,12 +6189,20 @@ communicate with Microsoft Azure Storage services.") (origin (method url-fetch) (uri (pypi-uri "w3lib" version)) + (patches (search-patches "python-w3lib-fix-test-failure.patch")) (sha256 (base32 "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest"))))))) (native-inputs - (list python-six)) + (list python-pytest python-six)) (home-page "https://github.com/scrapy/w3lib") (synopsis "Python library of web-related functions") (description -- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 05 14:26:42 2022 Received: (at 54697-done) by debbugs.gnu.org; 5 Apr 2022 18:26:42 +0000 Received: from localhost ([127.0.0.1]:56143 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbnt3-0003Wk-Uo for submit@debbugs.gnu.org; Tue, 05 Apr 2022 14:26:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbnt2-0003WO-0F for 54697-done@debbugs.gnu.org; Tue, 05 Apr 2022 14:26:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40114) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbnsw-0006Hi-La; Tue, 05 Apr 2022 14:26:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Ud3sfzL/+vN/myn7PKaQOMFZxstxDHgEMYpG2QY+DcY=; b=QHGTwavL9M4q0vH3hFL4 KAvf7NXZUTW9AusVNVKR2AfOq9SXnjVKqZGDuG1ZYy+lx88r/Q86hf6gigzH91Ki8nbewP6Zz9d1e VDOs0Iv9NPGHFAxesCEJY4RucPwiYnRyS+F/SP1A3kdQQ1n8L1K3o9hNrWvuTYYBoL17tyvlVGjH7 9rLNsh8e3X6ziWC9T4qL6sVXWEaE2AbPu5uevNME3ekv5mpp3TehDHqp47UJR2u25IdGVkR5RbIe4 GOcwEs1xvDTqBsvIH3lcsJ4m+CQUfXDbfUpq0bsRHQSdvmF+uWH7V8dMd+qZ4pKLU3exez9t2aBBd vNNOnPc3VTK71A==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54922 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbnsw-0002lA-87; Tue, 05 Apr 2022 14:26:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Felix Gruber Subject: Re: bug#54697: [PATCH] gnu: python-w3lib: Fix build. References: <20220403183639.55110-1-felgru@posteo.net> Date: Tue, 05 Apr 2022 20:26:32 +0200 In-Reply-To: <20220403183639.55110-1-felgru@posteo.net> (Felix Gruber's message of "Sun, 3 Apr 2022 18:36:39 +0000") Message-ID: <87czhvjsiv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54697-done Cc: 54697-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Felix Gruber skribis: > * gnu/packages/python-web.scm (python-w3lib): Fix build. > [source]: Add python-w3lib-fix-test-failure.patch. > [arguments]: Use pytest in the 'check phase. > [native-inputs]: Add python-pytest. > * gnu/packages/patches/python-w3lib-fix-test-failure.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. Applied, thanks! Ludo=E2=80=99. From unknown Mon Aug 11 12:55:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 04 May 2022 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator