Odd behaviour of SimpleScrapingLocator for projects with legacy package versions.

Issue #96 new
James Tocknell
created an issue

This simple script produces an odd result,

>>> from distlib.locators import SimpleScrapingLocator
>>> loc = SimpleScrapingLocator("https://pypi.python.org/simple/")
>>> loc.get_project("pytz")
{'2015.4': <Distribution pytz (2015.4) [https://pypi.python.org/packages/fd/7a/6a80f73ec6e714b1fd2cbaa3674c2f108ff5071cc2bcc37d5226e0ca1ee0/pytz-2015.4.tar.bz2]>, 'urls': {'2015.4': {'https://pypi.python.o
rg/packages/fd/7a/6a80f73ec6e714b1fd2cbaa3674c2f108ff5071cc2bcc37d5226e0ca1ee0/pytz-2015.4.tar.bz2'}}, 'digests': {'https://pypi.python.org/packages/fd/7a/6a80f73ec6e714b1fd2cbaa3674c2f108ff5071cc2bcc37d52
26e0ca1ee0/pytz-2015.4.tar.bz2': ('md5', '39f7375c4b1fa34cdcb4b4765d08f817')}}

rather than listing all the releases with non-legacy versions. If I instead use my local devpi instance, I get the 2016.1 release. It's easy enough to work around this by using scheme='legacy', but I'd have expected choosing the PEP 440/508 scheme would skip the legacy versions, or raise an error, not produce an implementation specific version.

Comments (1)

  1. Log in to comment