crate-archive / crate-site

OBSOLETE, SEE crate.io, crate.web, and crate.pypi
https://crate.io/
BSD 2-Clause "Simplified" License
87 stars 13 forks source link

release recency order different from pypi #81

Open JasperVanDenBosch opened 12 years ago

JasperVanDenBosch commented 12 years ago

Hi there, nice work.

I just noticed that after I implemented PEP 386, the latest release (0.1.post18) of fexpect, my package for scripting remote prompts in fabric seems to be ordered as older than some previous releases on crate.io:

https://crate.io/packages/fexpect/

Whereas pypi correctly seems to recognize it as the latest release:

http://pypi.python.org/pypi/fexpect

Would be great if this were consistent.

dstufft commented 12 years ago

I believe PyPI doesn't special order releases by version number unless you use metadata v1.2 (which is only in distutils2). So for PyPI you are still getting date based release ordering I believe. I took a more aggresssive approach and I order by version where I can. Typically I attempt to (using the library from distutils2) normalize versions which will either already be PEP386 complaint, the library will be able to normalize it, or it falls back to date based.

The underlying issue here is that the normalization provided by distutils2 See's 0.1-20120420 as 0.1.post20120420 which is obviously (in PEP386 land) later than 0.1.post18.

distutils2 attempts to detect when you are using a date based versioning scheme and fails to normalize if you are. However I believe this detection only extends to the first version number. I'm going to reach out to the distutils2 devs and see what their thoughts are for this.

JasperVanDenBosch commented 12 years ago

Alright, thanks for clarifying, that makes sense.

I guess that means in my case if I wanted this 'fixed' the best bet is to bump the next version to 0.2

dstufft commented 12 years ago

If you want it fixed ASAP yes. I want to get it fixed the "right" way, but I want to talk to the distutils2 folks first to see what their thoughts are on this sort of loophole in the normalization routine.