summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-10-27 13:20:29 -0400
committerÉric Araujo <merwok@netwok.org>2012-10-27 13:20:29 -0400
commitcf3f3298a6653700a80b0f61243970fb54fe68ef (patch)
treea16e2b599e6b5c9b3bb78f4502b6226e1f68e3c3
parent7e12306509188e264a99b529d16cc5f80839b2f6 (diff)
parentfc8b839fa21965dc8acbfe468f4d88e68f0004d2 (diff)
downloaddisutils2-python3.tar.gz
Merge fixes for #16107 and #15957 from defaultpython3
-rw-r--r--CHANGES.txt1
-rw-r--r--CONTRIBUTORS.txt1
-rw-r--r--README.txt2
-rw-r--r--distutils2/tests/test_version.py4
-rw-r--r--distutils2/version.py3
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
diff --git a/README.txt b/README.txt
index d30326a..ecc6607 100644
--- a/README.txt
+++ b/README.txt
@@ -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: