From unknown Fri Jun 13 10:12:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 13 Apr 2021 08:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 47746@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16183018409142 (code B ref -1); Tue, 13 Apr 2021 08:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Apr 2021 08:17:20 +0000 Received: from localhost ([127.0.0.1]:58929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWEEa-0002NO-M0 for submit@debbugs.gnu.org; Tue, 13 Apr 2021 04:17:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:57252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWEEZ-0002NH-AD for submit@debbugs.gnu.org; Tue, 13 Apr 2021 04:17:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWEEY-00067l-OV for bug-guix@gnu.org; Tue, 13 Apr 2021 04:17:19 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWEEW-0003jg-Qd for bug-guix@gnu.org; Tue, 13 Apr 2021 04:17:18 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1618301831; cv=none; d=zohomail.com; s=zohoarc; b=d15Al8uHTaXWoBKXGSgXUduuEN3otZ/mXFeaWDtmIpxnopsWSX2cxDG/S94VXS28PXSfOAH+n6anX8X19EqhgKFDawqkEjyP0adTDvyj/LbGpKusALYNZMy7qT839KKdxZWORck04O1oZwe5TgWwNXy5hkylmIInMHK2EGR5SJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618301831; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=0VjzmFwHjESXhE8Xd549kYDgGOKhbs0c5GAvjFFXiCQ=; b=Bc4HzEhE4deYxBSH0AcPDYTx013/UhxHZ5J/g04A/aALXsb3g4wdu1ONfX4TmmKGZ8nkTtzODDXbyY70h5rbz4+Btzj/yas9Yl50eb7v2tVjpdh69LHHVjn+4Pi4AvVTffqgWX/vWQLYFV4FAsGKEzuXdq+LNaZlG3hiGP5xCPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1618301831; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; bh=0VjzmFwHjESXhE8Xd549kYDgGOKhbs0c5GAvjFFXiCQ=; b=F5dO1IprT6FqxI0xBq5a8UrEGqfYAjrrgMbgkvSKk1NYwoKw0ADTGW6cf4eqd93+ 0dBrPLKSsEQKplPoUXeYcAYjxSR94phVDlHGr2MYUI0SWXNacKWbKNsHk99XzmFPwJY jGwqV5CRiVw/13h+0uY6r8eKfEobjTTjNM8zqJAk= Received: from localhost (p54ad4d62.dip0.t-ipconnect.de [84.173.77.98]) by mx.zohomail.com with SMTPS id 161830182973486.45260611659921; Tue, 13 Apr 2021 01:17:09 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 27.2 From: Ricardo Wurmus X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 13 Apr 2021 10:17:06 +0200 Message-ID: <87pmyytx8d.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) When importing a package from Pypi whose name includes an underscore, the importer will generate a pypi-uri expression where the underscore has been replaced with a dash. -- Ricardo From unknown Fri Jun 13 10:12:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 13 Apr 2021 18:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus , 47746@debbugs.gnu.org Received: via spool by 47746-submit@debbugs.gnu.org id=B47746.161834010816033 (code B ref 47746); Tue, 13 Apr 2021 18:56:01 +0000 Received: (at 47746) by debbugs.gnu.org; 13 Apr 2021 18:55:08 +0000 Received: from localhost ([127.0.0.1]:60826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWOBo-0004AX-Bf for submit@debbugs.gnu.org; Tue, 13 Apr 2021 14:55:08 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:53414 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWOBl-00049v-Tg for 47746@debbugs.gnu.org; Tue, 13 Apr 2021 14:55:06 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1618340097; bh=Fb8WyQibmCEwnnjPlA7x8tvd479hAsrABV4RQlTpZMY=; h=From:To:Subject:In-Reply-To:References:Date; b=HB1EP96PZNXOsdepbsrFYfb2kzfHxolQC3NpLyQJPJnlr3c/T+3n5uV0vElPGHVaT owRQESpGtXU5RaWrsScmZNq2yk0Q1shrX/MPBZt2OeOFNxApxnnsv1VhHgAvscC/Cm DsDHiZWLi0czAMMdJ3QHWpIvT6Q11yoWSD8vnYmg= In-Reply-To: <87pmyytx8d.fsf@elephly.net> References: <87pmyytx8d.fsf@elephly.net> Date: Tue, 13 Apr 2021 20:54:56 +0200 Message-ID: <87y2dmf20v.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, Apr 13 2021, Ricardo Wurmus wrote: > When importing a package from Pypi whose name includes an > underscore, the importer will generate a pypi-uri expression where > the underscore has been replaced with a dash. Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, Apr 13 2021, Ricardo Wurmus wrote: > When importing a package from Pypi whose name includes an > underscore, the importer will generate a pypi-uri expression where > the underscore has been replaced with a dash. Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS On Tue, Apr 13 2021, Ricardo Wurmus wrote: > When importing a package from Pypi whose name includes an=20 > underscore, the importer will generate a pypi-uri expression where=20 > the underscore has been replaced with a dash. Hmm, I just grabbed a random package from PyPi, and the URI seems fine to me. --8<---------------cut here---------------start------------->8--- ~/src/guix $ ./pre-inst-env guix import pypi angreal_data_science_project Starting download of /tmp/guix-file.4MH43L From https://files.pythonhosted.org/packages/28/5a/6c77f8f5c2333ab2d3e83c2761535= 8a0badcfeb6513a36079ba0fee78524/angreal_data_science_project-0.5.5.tar.gz... =E2=80=A6_project-0.5.5.tar.gz 15KiB 378KiB/s 00:00 [#############= #####] 100.0% Starting download of /tmp/guix-file.hrC4cL From https://files.pythonhosted.org/packages/f4/18/e4747e2f3232ca1fbbd1286455fe5= 7f3390a94b14c26a37dba72eb829523/angreal_data_science_project-0.5.5-py3-none= -any.whl... =E2=80=A6ect-0.5.5-py3-none-any.whl 28KiB 244KiB/s 00:00 [#############= #####] 100.0% (package (name "python-angreal-data-science-project") (version "0.5.5") (source (origin (method url-fetch) (uri (pypi-uri "angreal_data_science_project" version)) (sha256 (base32 "1krvhwmlmv77j8w3sxaxlkmhd0xzmr24f4n873p00631lacwmpck")))) (build-system python-build-system) (home-page "https://gitlab.com/angreal/data-science-project") (synopsis "An angreal template for data science projects.") (description "An angreal template for data science projects.") (license #f)) --8<---------------cut here---------------end--------------->8--- How would I reproduce the bug? From unknown Fri Jun 13 10:12:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 13 Apr 2021 21:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Xinglu Chen Cc: 47746@debbugs.gnu.org Received: via spool by 47746-submit@debbugs.gnu.org id=B47746.161834998524961 (code B ref 47746); Tue, 13 Apr 2021 21:40:01 +0000 Received: (at 47746) by debbugs.gnu.org; 13 Apr 2021 21:39:45 +0000 Received: from localhost ([127.0.0.1]:32807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWQl6-0006UX-U0 for submit@debbugs.gnu.org; Tue, 13 Apr 2021 17:39:45 -0400 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWQl5-0006UO-1r for 47746@debbugs.gnu.org; Tue, 13 Apr 2021 17:39:43 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1618349978; cv=none; d=zohomail.com; s=zohoarc; b=fzX3o55g1T6L6UnfKPcoOnfvFLQw0ARMe8w5EgnJ24IjfBB2+TFQAjxcKU1jTfFfWiFwHziCsOB5lYqyftRQdySO5DJMRqqmxJI+pODCQYxh0efWQx7TaKF0YwFB1gLdFqrLGvPAUIlygiQAKyRPP1hiP2clYbEcRctD7YWgYA8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618349978; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=OnAHQPvYwafgeWJmqrJVCFzwxVNiE8KVae5iyipoX+M=; b=bMFYE30IJbqAEuGAWwj+55LoW6F9n0mwbzAEr/gxI/xzreCsV4MEnUcRCouHWFuqloKqeTqzC/k6NeMUYGo3KBfxwRtlakWnmsP2EuPQHQvYRqX3QrvROTYJZEXPxLvtH0n7qBnj+MEE0wFsoOEGJoVL13LavXA705urN3/lyxg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1618349978; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=OnAHQPvYwafgeWJmqrJVCFzwxVNiE8KVae5iyipoX+M=; b=InCppcmKTxc3TJ+XRwqMzr+aZdgVjgLoSdq+d1QuSGG1cByxkUkLsVVNgijiExHI 9L21/Cg9MU1+tN13Xx5yi7Rp5oCxbGNgUF0mog1JN2Hid1s23RurxCzyR29sD+r1VzZ w5+SQDzOJHd/zYOaAv6fvCKbiXh2y5geTN2RlFBc= Received: from localhost (p54ad4d62.dip0.t-ipconnect.de [84.173.77.98]) by mx.zohomail.com with SMTPS id 1618349976262589.7481458616595; Tue, 13 Apr 2021 14:39:36 -0700 (PDT) References: <87pmyytx8d.fsf@elephly.net> <87y2dmf20v.fsf@yoctocell.xyz> User-agent: mu4e 1.4.15; emacs 27.2 From: Ricardo Wurmus In-reply-to: <87y2dmf20v.fsf@yoctocell.xyz> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 13 Apr 2021 23:39:32 +0200 Message-ID: <87h7k9uanf.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Xinglu Chen writes: > On Tue, Apr 13 2021, Ricardo Wurmus wrote: > >> When importing a package from Pypi whose name includes an >> underscore, the importer will generate a pypi-uri expression >> where >> the underscore h [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [136.143.188.50 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [136.143.188.50 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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: 1.0 (+) Xinglu Chen writes: > On Tue, Apr 13 2021, Ricardo Wurmus wrote: > >> When importing a package from Pypi whose name includes an=20 >> underscore, the importer will generate a pypi-uri expression=20 >> where=20 >> the underscore has been replaced with a dash. > > Hmm, I just grabbed a random package from PyPi, and the URI=20 > seems fine > to me. [=E2=80=A6] > How would I reproduce the bug? You=E2=80=99re right, this only affects some packages. Here are two=20 examples: --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix import pypi -r jupyterlab_widgets following redirection to=20 `https://pypi.org/pypi/jupyterlab-widgets/json'... [=E2=80=A6] (uri (pypi-uri "jupyterlab-widgets" version)) [=E2=80=A6] --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix import pypi -r jupyter_packaging following redirection to=20 `https://pypi.org/pypi/jupyter-packaging/json'... [=E2=80=A6] (uri (pypi-uri "jupyter-packaging" version)) [=E2=80=A6] --8<---------------cut here---------------end--------------->8--- They both have a redirection in common, but the pypi-uri is=20 incorrect as it needs to have the underscore. --=20 Ricardo From unknown Fri Jun 13 10:12:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 14 Apr 2021 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus Cc: 47746@debbugs.gnu.org Received: via spool by 47746-submit@debbugs.gnu.org id=B47746.161840433525876 (code B ref 47746); Wed, 14 Apr 2021 12:46:02 +0000 Received: (at 47746) by debbugs.gnu.org; 14 Apr 2021 12:45:35 +0000 Received: from localhost ([127.0.0.1]:33886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWetd-0006j4-W7 for submit@debbugs.gnu.org; Wed, 14 Apr 2021 08:45:35 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:47104 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWetY-0006iY-Nm for 47746@debbugs.gnu.org; Wed, 14 Apr 2021 08:45:28 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1618404314; bh=JeDp4TlTqa9c5mvjB1pYiDnHVJ5DCKNAQ0YxqpgzCcE=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=QvYL2N6g2iZZ9/F3zcSIfoMc/qZUmq2kS/kNIxDTg15PZzSjGosT8njrtMkmQJcBb akz8T3Snr+5BNAYYQ4WJonHTxPa26dIPnP1CzwrsL9IH7cubI6Nl7/5H0UFtiKif3e CN23uEh40DJ5ipeDB6lRH3xoiWdpyTSPYMC8EM70= In-Reply-To: <87h7k9uanf.fsf@elephly.net> References: <87pmyytx8d.fsf@elephly.net> <87y2dmf20v.fsf@yoctocell.xyz> <87h7k9uanf.fsf@elephly.net> Date: Wed, 14 Apr 2021 14:45:11 +0200 Message-ID: <871rbdhw6g.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.9 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, Apr 13 2021, Ricardo Wurmus wrote: > =?UTF-8?Q?You=E2=80=99re?= right, this only affects some packages. Here are two > examples: > > [...] > > They both have a redirection in common, but the pypi-uri is > incorrect as it needs to have the underscore. Content analysis details: (2.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 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: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On Tue, Apr 13 2021, Ricardo Wurmus wrote: > =?UTF-8?Q?You=E2=80=99re?= right, this only affects some packages. Here are two > examples: > > [...] > > They both have a redirection in common, but the pypi-uri is > incorrect as it needs to have the underscore. Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Apr 13 2021, Ricardo Wurmus wrote: > You=E2=80=99re right, this only affects some packages. Here are two=20 > examples: > > [...] > > They both have a redirection in common, but the pypi-uri is=20 > incorrect as it needs to have the underscore. Looking at the JSON object at , it specifies =E2=80=9Cjupyterlabs-widgets=E2=80=9D as =E2=80=98info.downloads.name=E2=80= =99, which is what the PyPi importer reads to determine the PyPi URI. Would it make sense to just make it read the name that the user specifies in the shell, i.e. =E2=80=98./pre-inst-env guix import pypi PACKAGE-NAME=E2=80=99 (see the patch below)? Or will this potentially mess= up other PyPi URIs? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-import-pypi-Use-package-name-from-the-shell-to-const.patch Content-Transfer-Encoding: quoted-printable Content-Description: fix-pypi-uri >From ec5612e9d4c2026541874c6a3eaf7c9009ce4a31 Mon Sep 17 00:00:00 2001 Message-Id: From: Xinglu Chen Date: Wed, 14 Apr 2021 14:37:01 +0200 Subject: [PATCH] import: pypi: Use package name from the shell to construct the URI. Some packages will list an incorrect package name in the JSON object, resulting in PyPi URIs that lead to nowhere. * guix/import/pypi.scm (pypi->guix-package): Use the package name specified= in the shell (guix import pypi PACKAGE-NAME) to construct the PyPi URI. Fixes . Reported by Ricardo Wurmus . --- guix/import/pypi.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index bf4dc50138..be9470ad26 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -9,6 +9,7 @@ ;;; Copyright =C2=A9 2020 Lars-Dominik Braun ;;; Copyright =C2=A9 2020 Arun Isaac ;;; Copyright =C2=A9 2020 Martin Becze +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -483,7 +484,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, = and LICENSE." (leave (G_ "no source release for pypi package ~a= ~a~%") (project-info-name info) (project-info-version info))))) - (make-pypi-sexp (project-info-name info) + (make-pypi-sexp package-name (project-info-version info) (and=3D> (latest-source-release project) distribution-url) base-commit: 82543e9649da2da9a5285ede4ec4f718fd740fcb --=20 2.31.1 --=-=-=-- From unknown Fri Jun 13 10:12:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 19 Apr 2021 02:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Xinglu Chen Cc: Ricardo Wurmus , 47746@debbugs.gnu.org Received: via spool by 47746-submit@debbugs.gnu.org id=B47746.161879986012314 (code B ref 47746); Mon, 19 Apr 2021 02:38:02 +0000 Received: (at 47746) by debbugs.gnu.org; 19 Apr 2021 02:37:40 +0000 Received: from localhost ([127.0.0.1]:48106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYJmv-0003CI-EL for submit@debbugs.gnu.org; Sun, 18 Apr 2021 22:37:40 -0400 Received: from mail-qk1-f172.google.com ([209.85.222.172]:42887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYJmt-0003C3-LA for 47746@debbugs.gnu.org; Sun, 18 Apr 2021 22:37:24 -0400 Received: by mail-qk1-f172.google.com with SMTP id d15so21515320qkc.9 for <47746@debbugs.gnu.org>; Sun, 18 Apr 2021 19:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=CJDHsED1Ksv6lPSMJWqsgqWTXHhaVcDRHMeOQBhdEJM=; b=e5reiqT5gp9qqNtcfn+dAWjno7IK9XnDo6JhQGSJaRsc4waGnCQ9YR/w955JsErLo8 oxaUiwllhZJmKPa5tFS1TVXKTmJX9khL8XM+IPbjqE//trMcFfmS+1cribfsmGtDKw0j Yc+0JGRvEbUYkeNfeZHICeQXWATOsP/Fc75Di29VaUaTiQ8OyIGOZqWVJVxKBVu9+sAb XNv0AVAwIrTjORnPEB3IErLkc1wlvM266WYNjJOshlLTIhhlLGmLpMscPGReW0fFsb80 xM2uG5K4lLurmi3+wRxF5c1gpSRSjwQM6nTYyISx6u3CYrSVR3XoIsCwuvTaY3dhM55w HNnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=CJDHsED1Ksv6lPSMJWqsgqWTXHhaVcDRHMeOQBhdEJM=; b=XRFum2R6/RIMGoOHmRtSHvoMosA2LmUbobC1E4SiXKU1FWf80bHYYfGMLo7jmOtQL5 ckEVb2HvQHPlGaOw/Qwbh/AaSzVFIPfVd9hKePqSmw3qjeWkekfi2aEfZYjkNDx98eIy C3p+NwTW8kxVaZSelF1g2SdahORy5L3SsIzRHOb/VjfJQjCsFWfV2fDKZagNXC8Jldl+ HBGBcBo1d+kVNCsReRnP8Z5iTkrwhGzeuwtINnQ9gnIAMMZMA0bcK9tmm7j56J+FgT32 /FzbT6K90WPw0SYzMoHiVWQr4cu7ciMG61umuzl6BDarxxQ/SX0pbDGTJlcO7gb81DKZ FR9A== X-Gm-Message-State: AOAM532Xd7sp4sjouiI0BUw6QKFsUDf6z3V+1c5vSoQay9LfnbbDEZVS d4zCdEfu+t5R4CvR5K1UU6aPDh5udIV9BQ== X-Google-Smtp-Source: ABdhPJyzC0n3wWppTicgDhd+9ma4dQXXVpcAxzqyHIXJU1Fk2qX4Kw4fvpQoRO5RyHfUM0h+Tgg3Ig== X-Received: by 2002:a05:620a:7d1:: with SMTP id 17mr9981573qkb.403.1618799837954; Sun, 18 Apr 2021 19:37:17 -0700 (PDT) Received: from hurd (dsl-152-210.b2b2c.ca. [66.158.152.210]) by smtp.gmail.com with ESMTPSA id a189sm8952392qkd.46.2021.04.18.19.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 19:37:17 -0700 (PDT) From: Maxim Cournoyer References: <87pmyytx8d.fsf@elephly.net> <87y2dmf20v.fsf@yoctocell.xyz> <87h7k9uanf.fsf@elephly.net> <871rbdhw6g.fsf@yoctocell.xyz> Date: Sun, 18 Apr 2021 22:37:16 -0400 In-Reply-To: <871rbdhw6g.fsf@yoctocell.xyz> (Xinglu Chen's message of "Wed, 14 Apr 2021 14:45:11 +0200") Message-ID: <87pmyrhueb.fsf@gmail.com> 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.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Xinglu Chen writes: > On Tue, Apr 13 2021, Ricardo Wurmus wrote: > >> =?UTF-8?Q?You=E2=80=99re?= right, this only affects some packages. Here are two >> examples: >> >> [...] >> >> They both have a redirection in common, but the pypi-uri [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (maxim.cournoyer[at]gmail.com) 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.222.172 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.222.172 listed in wl.mailspike.net] 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: 1.0 (+) Hi, Xinglu Chen writes: > On Tue, Apr 13 2021, Ricardo Wurmus wrote: > >> You=E2=80=99re right, this only affects some packages. Here are two=20 >> examples: >> >> [...] >> >> They both have a redirection in common, but the pypi-uri is=20 >> incorrect as it needs to have the underscore. > > Looking at the JSON object at > , it specifies > =E2=80=9Cjupyterlabs-widgets=E2=80=9D as =E2=80=98info.downloads.name=E2= =80=99, which is what the PyPi > importer reads to determine the PyPi URI. > > Would it make sense to just make it read the name that the user > specifies in the shell, i.e. =E2=80=98./pre-inst-env guix import pypi > PACKAGE-NAME=E2=80=99 (see the patch below)? Or will this potentially me= ss up > other PyPi URIs? > >>>From ec5612e9d4c2026541874c6a3eaf7c9009ce4a31 Mon Sep 17 00:00:00 2001 > Message-Id: > From: Xinglu Chen > Date: Wed, 14 Apr 2021 14:37:01 +0200 > Subject: [PATCH] import: pypi: Use package name from the shell to constru= ct > the URI. > > Some packages will list an incorrect package name in the JSON object, > resulting in PyPi URIs that lead to nowhere. In my opinion, if a package contains wrong values in their metadata, it's a problem that should be reported to that package. As with other things, garbage in -> garbage out; Guix cannot do much here. I seem to recall that some older PyPI mirror had that problem. It may be that their metadata name -> URI is not consistent. We could try to find what that 2nd scheme is and attempt both, although that's not very elegant and it probably points to packages being very outdated to start with. Thanks, Maxim