From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case. Date: Sun, 16 Jun 2019 15:05:27 +0900 Message-ID: <87wohm12vs.fsf@gmail.com> References: <87pnod7ot4.fsf@gmail.com> <87imtd6dtq.fsf@gmail.com> <87d0jldct8.fsf@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38393) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcOVp-0002wa-UO for bug-guix@gnu.org; Sun, 16 Jun 2019 02:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcOIl-0007sj-Pr for bug-guix@gnu.org; Sun, 16 Jun 2019 02:06:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcOIk-0007rZ-P3 for bug-guix@gnu.org; Sun, 16 Jun 2019 02:06:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hcOIk-0003i4-Hi for bug-guix@gnu.org; Sun, 16 Jun 2019 02:06:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87d0jldct8.fsf@mdc-berlin.de> (Ricardo Wurmus's message of "Mon, 10 Jun 2019 11:12:03 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ricardo Wurmus Cc: 24450@debbugs.gnu.org Hi again, Ricardo Wurmus writes: > Maxim Cournoyer writes: > >> While I agree that a regexp is a bigger hammer than basic string >> manipulation, I see some merit to it here: >> >> 1) We can be assured of conformance with upstream, again, per PEP-0508. >> 2) It is easier to extend; we might want to add parsing for the version >> spec in order to disregard dependencies specified for Python < 3, for >> example. >> >> The use of the PEP-0508 grammar to define the regexp is useful to detail >> in a more human-friendly language the components of the regexp. We >> could have otherwise used the more cryptic regexp for Python >> distribution names: >> >> --8<---------------cut here---------------start------------->8--- >> ^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$ >> --8<---------------cut here---------------end--------------->8--- >> >> So I guess that what I'm saying is that I prefer this approach to using >> string-index with invalid characters, for the reasons above. >> >> [0] https://www.python.org/dev/peps/pep-0508/ > > Okay, sounds good. Please make sure to note this in a comment, so that > I won=E2=80=99t be asking myself this same question in a year :) Done! Maxim