diff options
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | CONTRIBUTORS.txt | 1 | ||||
-rw-r--r-- | README.txt | 2 | ||||
-rw-r--r-- | distutils2/tests/test_version.py | 4 | ||||
-rw-r--r-- | distutils2/version.py | 3 |
5 files changed, 9 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 2a00895..27409cf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -21,6 +21,7 @@ CONTRIBUTORS.txt for full names. Bug numbers refer to http://bugs.python.org/. - #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 ------------------ diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 8f8e059..40bd735 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -42,6 +42,7 @@ Thanks to: - Preston Holmes - Christian Hudon - Julien Jehannet +- Richard Jones - Jeremy Kloth - Amos Latteier - Mathieu Leduc-Hamel @@ -26,7 +26,7 @@ to use Distutils2; only the package name is different (packaging vs. distutils2), all modules, classes and functions have the same name. If you want to contribute, please have a look at DEVNOTES.txt or -http://wiki.python.org/Distutils2/Contributing . +http://wiki.python.org/moin/Distutils2/Contributing . Beware that Distutils2 is still in alpha stage and its API is subject to change. It should be not used for critical deployments. That said, it diff --git a/distutils2/tests/test_version.py b/distutils2/tests/test_version.py index d2d43ce..849ad5a 100644 --- a/distutils2/tests/test_version.py +++ b/distutils2/tests/test_version.py @@ -21,7 +21,9 @@ class VersionTestCase(unittest.TestCase): (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): diff --git a/distutils2/version.py b/distutils2/version.py index 351ae3a..1d0dbbd 100644 --- a/distutils2/version.py +++ b/distutils2/version.py @@ -174,6 +174,9 @@ class NormalizedVersion: 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: |