Metadata 2.0 and single-component version numbers
Metadata 2.0 doesn't support versions that are a single number. This has recently been flagged as a pip issue (https://github.com/pypa/pip/pull/1445) because pip won't handle wheels with a single-component version. We can obviously accept the patch for pip as a backward-compatibility measure, but I'm not sure if that's a good idea. wheels, and much of the new pip functionality, is based around Metadata 2.0 and the new packaging PEPs, at least in principle, so I'd rather get a better view on why Metadata 2.0 doesn't accept these versions. Based on that, we can decide what to do in pip. As a data point, pywin32 uses a single-digit version and can't be built with the free MS compilers, so it would be an ideal candidate for distribution as a wheel. But I've seen nothing from the project indicating that they are even aware of wheels yet, and there may be good reasons why wheels won't work for them (registration of WIndows COM components, for example) So - should Metadata 2.0 allow single-number versions? Should we be advocating a version format change to projects like pywin32? If neither, what will be the impact (and do people have views on whether it's a serious enough issue to warrant pip special-casing this)? Thanks, Paul
On 16 Jan 2014 02:24, "Paul Moore" <p.f.moore@gmail.com> wrote:
Metadata 2.0 doesn't support versions that are a single number.
Yes it does - that was one of the compatibility changes I made quite some time ago. It's also listed as one of the differences relative to PEP 346. The only things preventing me from accepting PEP 440 at this point are: - needing an updated version parsing regex - needing updated compatibility stats - needing to discuss the idea of supporting version epochs, which are an interesting way of allowing a shift from date based to semantic versioning without order confusion (you include a leading "1:" to indicate a new epoch, with "0:" as the implied default). Cheers, Nick.
On 15 January 2014 23:13, Nick Coghlan <ncoghlan@gmail.com> wrote:
On 16 Jan 2014 02:24, "Paul Moore" <p.f.moore@gmail.com> wrote:
Metadata 2.0 doesn't support versions that are a single number.
Yes it does - that was one of the compatibility changes I made quite some time ago. It's also listed as one of the differences relative to PEP 346.
My apologies. I misread N[.N]+ as the '+' meaning "one or more" (as in regular expressions). Marcus pointed my mistake out to me. Paul
My apologies. I misread N[.N]+ as the '+' meaning "one or more" (as in regular expressions). Marcus pointed my mistake out to me.
It reads the same way to me - I would expect N[.N]* to indicate that a single numeric component is valid. Still, as long as the regex is right ... distlib has added some support for recent version related changes (e.g. local versions), but this isn't yet in. Regards, Vinay Sajip
On 16 Jan 2014 10:03, "Marcus Smith" <qwcode@gmail.com> wrote:
My apologies. I misread N[.N]+ as the '+' meaning "one or more" (as in
maybe N[(.N)+] would be clearer.
all of (.N)+ is optional but when it's present it can be .N or .N.N or .N.N.N etc...
Yeah, that's a good idea. Simply switching to * might encourage the idea it's a regex, when it's more the kind of pseudo grammar people use to describe command line parameters. Cheers, Nick.
participants (4)
-
Marcus Smith
-
Nick Coghlan
-
Paul Moore
-
Vinay Sajip