Commits

Éric Araujo  committed 6e98237 Draft

Fix stringification of final versions (#16107).

Report and patch by Richard Jones.

  • Participants
  • Parent commits 747eec4

Comments (0)

Files changed (4)

 - #10374: Recreate scripts everytime build_scripts is called [pierre paul]
 - #14733: Have pysetup read setup.cfg early enough to find custom commands
   [éric, janusz]
+- #16107: Fix trailing '.z' in str('1.0.post1') result [richard]
 
 1.0a4 - 2012-03-13
 ------------------

File CONTRIBUTORS.txt

 - Preston Holmes
 - Christian Hudon
 - Julien Jehannet
+- Richard Jones
 - Jeremy Kloth
 - Amos Latteier
 - Mathieu Leduc-Hamel

File distutils2/tests/test_version.py

                 (V('1.2.3.4.0b3', drop_trailing_zeros=True), '1.2.3.4b3'),
                 (V('1.2.0.0.0', drop_trailing_zeros=True), '1.2'),
                 (V('1.0.dev345'), '1.0.dev345'),
-                (V('1.0.post456.dev623'), '1.0.post456.dev623'))
+                (V('1.0.post456.dev623'), '1.0.post456.dev623'),
+                (V('1.0.post1'), '1.0.post1'),
+               )
 
     def test_repr(self):
 

File distutils2/version.py

         if postdev and postdev is not _FINAL_MARKER:
             if postdev[0] == _FINAL_MARKER[0]:
                 postdev = postdev[1:]
+            # remove trailing '.z'
+            if postdev[-1] == _FINAL_MARKER[0]:
+                postdev = postdev[:-1]
             i = 0
             while i < len(postdev):
                 if i % 2 == 0: