Skip to content

Commit

Permalink
Merge pull request #76 from jburel/fix_warning
Browse files Browse the repository at this point in the history
replace StrictVersion by Version
  • Loading branch information
jburel authored Apr 6, 2023
2 parents 9a3dc47 + 778c1f1 commit a749920
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions omero_marshal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import re
from .encode import encoders
from .decode import decoders
from distutils.version import StrictVersion
from packaging.version import Version
from omero_version import omero_version

logger = logging.getLogger('omero-marshal')
Expand Down Expand Up @@ -52,10 +52,10 @@ def get_schema_version(version):
m = VERSION_REGEXP.search(version)
if m is None:
raise Exception("Invalid OMERO version number: " + version)
v = StrictVersion(m.group(1))
if v >= StrictVersion('5.1.0') and v < StrictVersion('5.3.0'):
v = Version(m.group(1))
if v >= Version('5.1.0') and v < Version('5.3.0'):
return '2015-01'
elif v >= StrictVersion('5.3.0') and v < StrictVersion('6.0.0'):
elif v >= Version('5.3.0') and v < Version('6.0.0'):
return '2016-06'
else:
raise Exception("Unsupported OMERO version: " + version)
Expand Down

0 comments on commit a749920

Please sign in to comment.