Skip to content

Commit

Permalink
Remove python-future dependency
Browse files Browse the repository at this point in the history
Replace all future/past as well as builtins imports
  • Loading branch information
sbesson committed May 29, 2024
1 parent 53e3f42 commit f042f25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ def read(fname):
install_requires=[
'PyYAML',
'omero-py>=5.6.0',
'future'
],
python_requires='>=3',
python_requires='>=3.8',
url='%s' % url,
zip_safe=False,
download_url='%s/v%s.tar.gz' % (url, version),
Expand Down
9 changes: 2 additions & 7 deletions src/omero_cli_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

from __future__ import print_function
from past.builtins import long
from builtins import str
from builtins import range
from builtins import object
import sys
import time
import json
Expand Down Expand Up @@ -783,7 +778,7 @@ def test_per_image(self, client, img, force, thumb):
pixid = img.getPrimaryPixels().id

try:
rps.setPixelsId(long(pixid), False, fail)
rps.setPixelsId(int(pixid), False, fail)
msg = "ok:"
except Exception as e:
error = e
Expand All @@ -793,7 +788,7 @@ def test_per_image(self, client, img, force, thumb):
rps.close()
else:
try:
rps.setPixelsId(long(pixid), False, make)
rps.setPixelsId(int(pixid), False, make)
msg = "fill:"
except KeyboardInterrupt:
msg = "cancel:"
Expand Down
6 changes: 1 addition & 5 deletions test/integration/clitest/test_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

from __future__ import division
from builtins import str
from builtins import range
from past.utils import old_div
import json
import pytest

Expand Down Expand Up @@ -205,7 +201,7 @@ def assert_target_rdef(self, target, rdef):
assert img.getDefaultZ() == rdef.get('z') - 1
else:
# If not set, default Z plane is the middle one
assert img.getDefaultZ() == (int)(old_div(img.getSizeZ(), 2))
assert img.getDefaultZ() == (int)(img.getSizeZ() // 2 )

def assert_channel_rdef(self, channel, rdef, version=2):
assert channel.getLabel() == rdef['label']
Expand Down

0 comments on commit f042f25

Please sign in to comment.