GNU bug report logs -
#24450
pypi importer outputs strange character series in optional dependency case.
Previous Next
Full log
View this message in rfc822 format
Hi again,
Ricardo Wurmus <ricardo.wurmus <at> mdc-berlin.de> writes:
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> 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 :)
Done!
Maxim
This bug report was last modified 6 years and 13 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.