#118 Merged at bda406c
  1. Min RK

It seems inappropriate to show a warning on schemes officially supported in PEP 440.

From PEP 440:

Development releases allow a . , - , or a _ separator as well as omitting the separator all together. The normal form of this is with the . separator. This allows versions such as 1.2-dev2 or 1.2dev2 which normalize to 1.2.dev2 .

So 1.2.3-dev is a perfectly valid version number according to PEP 440, but setuptools produces the warning:

The version specified requires normalization, consider using '1.2.3.dev0' instead of '1.2.3-dev'.

which doesn't seem to accurately represent PEP 440.

Comments (10)

  1. Donald Stufft

    I wouldn't feel bad if we removed it, but the reason I added it is because we're normalizing versions so even though "1.2-dev2" is valid, it's going to get turned into "1.2.dev2" on setuptools 8+ but it won't do that on older setuptools so I think it's better to use the normalized form as the input already.

  2. Jason R. Coombs

    I'm slightly disinclined to remove the warning outright because it has revealed that some package names aren't being parsed correctly. See #307.

  3. Jason R. Coombs

    @minrk If you were to use the normal form rather than allowed form, that would omit the warning. What is your reaction to that?

  4. Donald Stufft

    That's a different warning. That warning comes from pkg_resources and it'll get triggered anytime you use pkg_resources to parse a version that can't be parsed as PEP 440 at all (normalized or not). This warning is only specific to the project whose setup.py is being executed right now and is only there if it needs normalization. IOW this warning is only there to say that the output version is going to be different than the input version.

  5. Min RK author

    If you were to use the normal form rather than allowed form, that would omit the warning. What is your reaction to that?

    My reaction is that it seems incongruous with PEP 440, which doesn't seem to suggest that any of the documented, supported forms in PEP 440 need changing.

  6. Min RK author

    If a message about the transform seems like a good idea, I don't have a problem with that in general, I just find the "please consider" part a bit problematic. A less opinionated "Normalizing 1.2.3-dev to 1.2.3.dev0" message (warning or info-level) would be fine with me.

  7. E. Madison Bray

    I was glad for the warning but I also agree that as worded it was a little more disconcerting than it really needed to be. I think it should be kept in for now, but considered for removal again at some point in the future...you know...once every package has fully PEP-440 normalized versions ;)

  8. Min RK author

    Rather than removing the warning, this now just changes the message to indicate that normalization is taking place, without the "consider using..." part.