From unknown Tue Jun 17 22:22:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27216: [PATCH 0/1] Update CPAN importer to use MetaCPAN v1 API. Resent-From: James Richardson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Jun 2017 18:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27216 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27216@debbugs.gnu.org Cc: James Richardson X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.149651492512372 (code B ref -1); Sat, 03 Jun 2017 18:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jun 2017 18:35:25 +0000 Received: from localhost ([127.0.0.1]:54113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDtV-0003DT-Aq for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDtT-0003DG-C4 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDtN-0007Lr-E9 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHDtN-0007Ln-Aq for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHDtM-0001hK-Cu for guix-patches@gnu.org; Sat, 03 Jun 2017 14:35:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDtJ-0007Jz-BO for guix-patches@gnu.org; Sat, 03 Jun 2017 14:35:16 -0400 Received: from gandalf.jamestechnotes.com ([45.79.219.18]:40676) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHDtJ-0007Jv-6j for guix-patches@gnu.org; Sat, 03 Jun 2017 14:35:13 -0400 Received: from cpe-75-190-233-89.nc.res.rr.com ([75.190.233.89] helo=thor.lab01.jamestechnotes.com) by gandalf.jamestechnotes.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHDtH-0000Ai-N6; Sat, 03 Jun 2017 14:35:11 -0400 Received: from james by thor.lab01.jamestechnotes.com with local (Exim 4.87) (envelope-from ) id 1dHDtC-0006Cl-3Y; Sat, 03 Jun 2017 14:35:06 -0400 From: James Richardson Date: Sat, 3 Jun 2017 14:34:40 -0400 Message-Id: <20170603183440.23770-1-james@jamestechnotes.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) 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: -4.1 (----) The v0 MetaCPAN api has been shutdown. These changes allow the CPAN importer to use v1 api. -- 2.13.0 From unknown Tue Jun 17 22:22:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27216: [PATCH 1/1] Update CPAN importer to use MetaCPAN v1 API. References: <20170603183440.23770-1-james@jamestechnotes.com> In-Reply-To: <20170603183440.23770-1-james@jamestechnotes.com> Resent-From: James Richardson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Jun 2017 18:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27216 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 27216@debbugs.gnu.org Cc: James Richardson Received: via spool by 27216-submit@debbugs.gnu.org id=B27216.149651509212636 (code B ref 27216); Sat, 03 Jun 2017 18:39:02 +0000 Received: (at 27216) by debbugs.gnu.org; 3 Jun 2017 18:38:12 +0000 Received: from localhost ([127.0.0.1]:54118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDwB-0003Hj-Pc for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:38:12 -0400 Received: from gandalf.jamestechnotes.com ([45.79.219.18]:46906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDwA-0003HX-Pu for 27216@debbugs.gnu.org; Sat, 03 Jun 2017 14:38:11 -0400 Received: from cpe-75-190-233-89.nc.res.rr.com ([75.190.233.89] helo=thor.lab01.jamestechnotes.com) by gandalf.jamestechnotes.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHDw5-0000B8-Gd; Sat, 03 Jun 2017 14:38:05 -0400 Received: from james by thor.lab01.jamestechnotes.com with local (Exim 4.87) (envelope-from ) id 1dHDvz-0006I4-U6; Sat, 03 Jun 2017 14:38:00 -0400 From: James Richardson Date: Sat, 3 Jun 2017 14:37:54 -0400 Message-Id: <20170603183754.24132-1-james@jamestechnotes.com> X-Mailer: git-send-email 2.11.0 X-Spam-Score: -0.0 (/) 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 (/) --- guix/import/cpan.scm | 4 ++-- tests/cpan.scm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm index 32c5c310e..a41f91804 100644 --- a/guix/import/cpan.scm +++ b/guix/import/cpan.scm @@ -88,7 +88,7 @@ "Return the base distribution module for a given module. E.g. the 'ok' module is distributed with 'Test::Simple', so (module->dist-name \"ok\") would return \"Test-Simple\"" - (assoc-ref (json-fetch (string-append "https://api.metacpan.org/module/" + (assoc-ref (json-fetch (string-append "https://fastapi.metacpan.org/v1/module/" module "?fields=distribution")) "distribution")) @@ -113,7 +113,7 @@ return \"Test-Simple\"" "Return an alist representation of the CPAN metadata for the perl module MODULE, or #f on failure. MODULE should be e.g. \"Test::Script\"" ;; This API always returns the latest release of the module. - (json-fetch (string-append "https://api.metacpan.org/release/" name))) + (json-fetch (string-append "https://fastapi.metacpan.org/v1/release/" name))) (define (cpan-home name) (string-append "http://search.cpan.org/dist/" name)) diff --git a/tests/cpan.scm b/tests/cpan.scm index 8b588517c..de865b22b 100644 --- a/tests/cpan.scm +++ b/tests/cpan.scm @@ -74,10 +74,10 @@ (mock ((guix http-client) http-fetch (lambda (url . rest) (match url - ("https://api.metacpan.org/release/Foo-Bar" + ("https://fastapi.metacpan.org/v1/release/Foo-Bar" (values (open-input-string test-json) (string-length test-json))) - ("https://api.metacpan.org/module/Test::Script?fields=distribution" + ("https://fastapi.metacpan.org/v1/module/Test::Script?fields=distribution" (let ((result "{ \"distribution\" : \"Test-Script\" }")) (values (open-input-string result) (string-length result)))) -- 2.13.0 From unknown Tue Jun 17 22:22:31 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: James Richardson Subject: bug#27216: closed (Re: bug#27216: [PATCH 1/1] Update CPAN importer to use MetaCPAN v1 API.) Message-ID: References: <87lgp42bai.fsf@gnu.org> <20170603183440.23770-1-james@jamestechnotes.com> X-Gnu-PR-Message: they-closed 27216 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 27216@debbugs.gnu.org Date: Wed, 07 Jun 2017 13:11:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1496841062-12133-1" This is a multi-part message in MIME format... ------------=_1496841062-12133-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #27216: [PATCH 0/1] Update CPAN importer to use MetaCPAN v1 API. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 27216@debbugs.gnu.org. --=20 27216: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D27216 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1496841062-12133-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 27216-done) by debbugs.gnu.org; 7 Jun 2017 13:11:00 +0000 Received: from localhost ([127.0.0.1]:60546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIaji-00039R-T2 for submit@debbugs.gnu.org; Wed, 07 Jun 2017 09:10:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dIajh-00039F-3U for 27216-done@debbugs.gnu.org; Wed, 07 Jun 2017 09:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIajY-00081K-B0 for 27216-done@debbugs.gnu.org; Wed, 07 Jun 2017 09:10:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIajY-000810-7r; Wed, 07 Jun 2017 09:10:48 -0400 Received: from wifi-eduroam-161098.inria.fr ([128.93.161.98]:43224 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dIajX-0003sp-MV; Wed, 07 Jun 2017 09:10:48 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: James Richardson Subject: Re: bug#27216: [PATCH 1/1] Update CPAN importer to use MetaCPAN v1 API. References: <20170603183440.23770-1-james@jamestechnotes.com> <20170603183754.24132-1-james@jamestechnotes.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 Prairial an 225 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 07 Jun 2017 15:10:45 +0200 In-Reply-To: <20170603183754.24132-1-james@jamestechnotes.com> (James Richardson's message of "Sat, 3 Jun 2017 14:37:54 -0400") Message-ID: <87lgp42bai.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 27216-done Cc: 27216-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: -5.0 (-----) Hi James, James Richardson skribis: > --- > guix/import/cpan.scm | 4 ++-- > tests/cpan.scm | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) I confirm that this fixes =E2=80=98guix import cpan=E2=80=99. I added a commit log and pushed. Thank you! Ludo=E2=80=99. ------------=_1496841062-12133-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Jun 2017 18:35:25 +0000 Received: from localhost ([127.0.0.1]:54113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDtV-0003DT-Aq for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHDtT-0003DG-C4 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDtN-0007Lr-E9 for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:44246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHDtN-0007Ln-Aq for submit@debbugs.gnu.org; Sat, 03 Jun 2017 14:35:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHDtM-0001hK-Cu for guix-patches@gnu.org; Sat, 03 Jun 2017 14:35:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHDtJ-0007Jz-BO for guix-patches@gnu.org; Sat, 03 Jun 2017 14:35:16 -0400 Received: from gandalf.jamestechnotes.com ([45.79.219.18]:40676) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHDtJ-0007Jv-6j for guix-patches@gnu.org; Sat, 03 Jun 2017 14:35:13 -0400 Received: from cpe-75-190-233-89.nc.res.rr.com ([75.190.233.89] helo=thor.lab01.jamestechnotes.com) by gandalf.jamestechnotes.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dHDtH-0000Ai-N6; Sat, 03 Jun 2017 14:35:11 -0400 Received: from james by thor.lab01.jamestechnotes.com with local (Exim 4.87) (envelope-from ) id 1dHDtC-0006Cl-3Y; Sat, 03 Jun 2017 14:35:06 -0400 From: James Richardson To: guix-patches@gnu.org Subject: [PATCH 0/1] Update CPAN importer to use MetaCPAN v1 API. Date: Sat, 3 Jun 2017 14:34:40 -0400 Message-Id: <20170603183440.23770-1-james@jamestechnotes.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit Cc: James Richardson 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: -4.1 (----) The v0 MetaCPAN api has been shutdown. These changes allow the CPAN importer to use v1 api. -- 2.13.0 ------------=_1496841062-12133-1--