[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24450: [PATCHv2] Re: pypi importer outputs strange character series
From: |
Ricardo Wurmus |
Subject: |
bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case. |
Date: |
Mon, 10 Jun 2019 11:12:03 +0200 |
User-agent: |
mu4e 1.2.0; emacs 26.2 |
Maxim Cournoyer <address@hidden> 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’t be asking myself this same question in a year :)
--
Ricardo
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/09
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/09
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/10
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case.,
Ricardo Wurmus <=
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/10
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/10
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/11
- bug#24450: [PATCHv2] Re: pypi importer outputs strange character series in optional dependency case., Maxim Cournoyer, 2019/06/16