Skip to content

chore: Backlog/remove distutils dependency #37

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 2 commits into from
Mar 22, 2024
Merged
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
14 changes: 9 additions & 5 deletions source/ftrack_api/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import getpass
import functools
import itertools
import distutils.version
import hashlib
import tempfile
import threading
Expand Down Expand Up @@ -438,10 +437,15 @@ def check_server_compatibility(self):

# Perform basic version check.
if server_version != "dev":
min_server_version = "3.3.11"
if distutils.version.LooseVersion(
min_server_version
) > distutils.version.LooseVersion(server_version):
import re

match = re.match(r"(\d+)\.(\d+)\.(\d+)", server_version)
if not match:
return

min_server_version = (3, 3, 11)
server_version = tuple(map(int, match.groups()))
if server_version < min_server_version:
raise ftrack_api.exception.ServerCompatibilityError(
"Server version {0} incompatible with this version of the "
"API which requires a server version >= {1}".format(
Expand Down