Skip to content

Update LooseVersion dependency #300

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

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
async-generator==1.10; python_version>="3.6"
codacy-coverage==1.3.11
looseversion==1.3.0
mock==3.0.5
pytest-cov==2.10.1
pytest-tornasync==0.6.0.post2; python_version >= '3.5'
Expand Down
6 changes: 3 additions & 3 deletions rethinkdb/utils_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import collections
import copy
import distutils.version
from looseversion import LooseVersion
import getpass
import inspect
import optparse
Expand Down Expand Up @@ -146,7 +146,7 @@ def print_progress(ratio, indent=0, read=None, write=None):


def check_minimum_version(options, minimum_version="1.6", raise_exception=True):
minimum_version = distutils.version.LooseVersion(minimum_version)
minimum_version = LooseVersion(minimum_version)
version_string = options.retryQuery(
"get server version",
query.db("rethinkdb").table("server_status")[0]["process"]["version"],
Expand All @@ -159,7 +159,7 @@ def check_minimum_version(options, minimum_version="1.6", raise_exception=True):
if not matches:
raise RuntimeError("invalid version string format: %s" % version_string)

if distutils.version.LooseVersion(matches.group("version")) < minimum_version:
if LooseVersion(matches.group("version")) < minimum_version:
if raise_exception:
raise RuntimeError(
"Incompatible version, expected >= %s got: %s"
Expand Down