unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Xinglu Chen <public@yoctocell.xyz>
Cc: Ricardo Wurmus <rekado@elephly.net>, 47746@debbugs.gnu.org
Subject: bug#47746: pypi importer generates wrong pypi-uri without underscore
Date: Sun, 18 Apr 2021 22:37:16 -0400	[thread overview]
Message-ID: <87pmyrhueb.fsf@gmail.com> (raw)
In-Reply-To: <871rbdhw6g.fsf@yoctocell.xyz> (Xinglu Chen's message of "Wed, 14 Apr 2021 14:45:11 +0200")

Hi,

Xinglu Chen <public@yoctocell.xyz> writes:

> On Tue, Apr 13 2021, Ricardo Wurmus wrote:
>
>> You’re 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.
>
> Looking at the JSON object at
> <https://pypi.org/pypi/jupyterlab-widgets/json>, it specifies
> “jupyterlabs-widgets” as ‘info.downloads.name’, 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. ‘./pre-inst-env guix import pypi
> PACKAGE-NAME’ (see the patch below)?  Or will this potentially mess up
> other PyPi URIs?
>
>>From ec5612e9d4c2026541874c6a3eaf7c9009ce4a31 Mon Sep 17 00:00:00 2001
> Message-Id: <ec5612e9d4c2026541874c6a3eaf7c9009ce4a31.1618404153.git.public@yoctocell.xyz>
> From: Xinglu Chen <public@yoctocell.xyz>
> 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.

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




      reply	other threads:[~2021-04-19  2:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13  8:17 bug#47746: pypi importer generates wrong pypi-uri without underscore Ricardo Wurmus
2021-04-13 18:54 ` Xinglu Chen
2021-04-13 21:39   ` Ricardo Wurmus
2021-04-14 12:45     ` Xinglu Chen
2021-04-19  2:37       ` Maxim Cournoyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmyrhueb.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=47746@debbugs.gnu.org \
    --cc=public@yoctocell.xyz \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).