Skip to content

Commit

Permalink
Use LooseVersion instead of StrictVersion to parse urllib3 versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jun 29, 2024
1 parent faf24fd commit fec81a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/902-loose-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "vendored Docker SDK for Python - use ``LooseVersion`` instead of ``StrictVersion`` to compare urllib3 versions. This is needed for development versions (https://github.com/ansible-collections/community.docker/pull/902)."
4 changes: 2 additions & 2 deletions plugins/module_utils/_api/transport/ssladapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
https://github.com/kennethreitz/requests/pull/799
"""

from ansible_collections.community.docker.plugins.module_utils.version import StrictVersion
from ansible_collections.community.docker.plugins.module_utils.version import LooseVersion

from .._import_helper import HTTPAdapter, urllib3
from .basehttpadapter import BaseHTTPAdapter
Expand Down Expand Up @@ -66,4 +66,4 @@ def can_override_ssl_version(self):
return False
if urllib_ver == 'dev':
return True
return StrictVersion(urllib_ver) > StrictVersion('1.5')
return LooseVersion(urllib_ver) > LooseVersion('1.5')

0 comments on commit fec81a0

Please sign in to comment.