-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop packaging
dependency
#3205
Conversation
534c665
to
e54691f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packaging.Version
is used in docker/utils/utils.py
:
docker-py/docker/utils/utils.py
Lines 58 to 59 in f467fd9
s1 = Version(v1) | |
s2 = Version(v2) |
That was changed from distutils.Version
:
I'm happy to get rid of the dependency, especially given the small surface area. Do you have a suggested alternative?
Ah, sorry, yeah, good catch.
How are Docker versions specified? If they're specified to be just |
Yep, that's effectively what Moby does: https://github.com/moby/moby/blob/e7001c14558af124d7959c1d1cfe3a16b507c521/api/types/versions/compare.go#L8-L40 (Technically there can be an arbitrary number of version sections; in practice, I hope we never make an API version |
e54691f
to
9bf9a02
Compare
Compare versions like Moby (api/types/versions/compare.go) Signed-off-by: Aarni Koskela <akx@iki.fi>
9bf9a02
to
249654d
Compare
@milas Great :) Rebased, implemented the same algorithm here, added tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and 😲 with that turn-around time 🎉
It doesn't seem to be required.Implement the same version comparison algorithm Moby uses instead.