This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: distutils.version.StrictVersion objects cannot be compared with distutils.version.LooseVersionobjects
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.6
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Harry Seeber, dstufft, eric.araujo
Priority: normal Keywords:

Created on 2019-03-14 23:15 by Harry Seeber, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg337957 - (view) Author: Harry Seeber (Harry Seeber) Date: 2019-03-14 23:15
The self.version used in Version._cmp is a List in LooseVersion's implementation, a Tuple in StrictVersion's implementation. Attempting to compare Strict & Loose versions results in a TypeError.

I'd like to PR a fix, but I'd like to know if I'm being stupid first :)
msg337958 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2019-03-14 23:32
Hello!  Are you seeing this problem when building or installing some package, or are you using the classes directly?

If it’s the latter, I would recommand you to use https://pypi.org/project/packaging/ rather than distutils, which is not meant to be used as a generic library.
msg338003 - (view) Author: Harry Seeber (Harry Seeber) Date: 2019-03-15 16:47
I'm using these classes directly to parse semantic-ish versions in metadata
for Munki packages (a package manager for MacOS). Looks like this packaging
library is what I should use. Thanks you!

On Thu, Mar 14, 2019 at 5:32 PM Éric Araujo <report@bugs.python.org> wrote:

>
> Éric Araujo <merwok@netwok.org> added the comment:
>
> Hello!  Are you seeing this problem when building or installing some
> package, or are you using the classes directly?
>
> If it’s the latter, I would recommand you to use
> https://pypi.org/project/packaging/ rather than distutils, which is not
> meant to be used as a generic library.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue36296>
> _______________________________________
>

-- 

Harry Seeber

IT Support | Gusto <http://gusto.com/>

Gusto | all-in-one platform for HR, payroll, and benefits

noun (guhs-toh)

great enjoyment, energy, and enthusiasm

ex: Harry's cat Edgar pounces upon butterflies #withGusto
msg338004 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2019-03-15 16:49
OK!
History
Date User Action Args
2022-04-11 14:59:12adminsetgithub: 80477
2019-03-15 16:49:28eric.araujosetstatus: open -> closed
type: behavior
messages: + msg338004

resolution: wont fix
stage: resolved
2019-03-15 16:47:22Harry Seebersetmessages: + msg338003
2019-03-14 23:32:31eric.araujosetmessages: + msg337958
2019-03-14 23:15:29Harry Seebercreate