[issue11841] Bug in the verson comparison
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2105ab8553b7 by Éric Araujo in branch 'default': Add tests for comparing candidate and final versions in packaging (#11841). http://hg.python.org/cpython/rev/2105ab8553b7 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
Éric Araujo mer...@netwok.org added the comment: I couldn’t reproduce the bugs but added the tests. Thanks! -- resolution: - out of date stage: - committed/rejected status: open - closed versions: +3rd party ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
Éric Araujo mer...@netwok.org added the comment: Thanks, looks great! Why does the code use both a string and a singleton tuple? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
Filip Gruszczyński grusz...@gmail.com added the comment: The reason for the use of two constants is that previously there was comparison in the code with a hardcoded 'f': if postdev[0] == 'f': I think it's a common practice to create constants for such hardcoded values. Also this hit when I was making a patch. I didn't know, that 'f' was used in the code and when I changed _FINAL_MARKER to ('f',), some tests failed. Alternatively to what I did in the patch you can use: if postdev[0] == _FINAL_MARKER[0]: but it just doesn't feel right for me. Anyway, I can't find packaging package in default branch of python. Where is the development done? I'd be happy to try to provide some more patches for this package, if there is a need for any. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
Éric Araujo mer...@netwok.org added the comment: I think it's a common practice to create constants for such hardcoded values. Yep, _FINAL_MARKER is clearer here that a cryptic character. An alternate fix would be to use a c as rc marker (like what Python itself does in sys.hexversion and elsewhere). I’ll see if I can use only one object instead of two. Anyway, I can't find packaging package in default branch of python. The merge started at the PyCon sprints is still underway at https://bitbucket.org/tarek/cpython/ Follow the fellowship ML for details. There’ll be an announcement on python-dev too when it’s complete, and then we’ll restart fixing bugs. -- assignee: tarek - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
Filip Gruszczyński grusz...@gmail.com added the comment: I understand that ML is mailing list, but I have no idea what is fellowship mailing list. Could you elaborate on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
New submission from Tarek Ziadé ziade.ta...@gmail.com: The NormalizedVersion class is not correctly sorting rc1: from packaging.version import NormalizedVersion NormalizedVersion('0.7.0') NormalizedVersion('0.7.0rc1') True NormalizedVersion('0.7.0rc1') NormalizedVersion('0.7rc1') NormalizedVersion('0.7.0') NormalizedVersion('0.7.0a1') False NormalizedVersion('0.7.0') NormalizedVersion('0.7.0c1') False -- assignee: tarek components: Distutils2 messages: 133656 nosy: alexis, brett.cannon, eric.araujo, tarek priority: normal severity: normal status: open title: Bug in the verson comparison type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11841] Bug in the verson comparison
Filip Gruszczyński grusz...@gmail.com added the comment: Here is a patch that I made against distutils2 tip. I have changed _FINAL_MARKER from 'f' to 'z', which works with rc. Also I have added constant _FINAL_MARKER_CHAR, since later in the code you make a check against 'f' and it surprised me a little at first. There are also tests in the patch. I hope it's good to make patch against the distutils2, since I couldn't yet find packaging in cpython default branch. -- keywords: +patch nosy: +gruszczy Added file: http://bugs.python.org/file21650/11841.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com