-
Notifications
You must be signed in to change notification settings - Fork 66
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
ccmlib: Remove usages of distutils #544
Conversation
12f6590
to
dd6ea47
Compare
ccmlib/repository.py
Outdated
@@ -385,15 +386,15 @@ def get_tagged_version_numbers(series='stable'): | |||
for ref in (i.get('ref', '') for i in json.loads(tag_url.read())): | |||
m = tag_regex.match(ref) | |||
if m: | |||
releases.append(LooseVersion(m.groups()[0])) | |||
releases.append(Version(m.groups()[0])) |
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.
lets try using parse_version
? instead to supporting old LooseVersion
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.
Usng parse_version (or packaging.version) seems to be incompatible with tests we're running which check 2.6-dev-0.20211108.5f1e01cbb34-SNAPSHOT-5f1e01cbb34
(packaging.version.Version raises an exception there) as a parseable version, so I don't know if we can quite fit the version parsing as it is in parse_version.
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.
Lets avoid dragging in deprecated code
dd6ea47
to
de7e839
Compare
c296323
to
5ef0c8d
Compare
This change removes all uses of distutils modules and replaces them with either direct replacements or extractions from the library. LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree is replaced by shutil.copytree. Fixes scylladb#537
5ef0c8d
to
3bbcbcb
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.
LGTM
This change removes all uses of distutils modules and replaces them with
either direct replacements or extractions from the library.
LooseVersion is extracted into ccmlib.utils.version and dir_util.copy_tree
is replaced by shutil.copytree.
Fixes #537