Skip to content
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

Add support for Python 3.11 #385

Merged
merged 6 commits into from
Nov 14, 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
3 changes: 2 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
os:
- ubuntu-20.04
- ubuntu-22.04
include:
- python-version: '3.8'
os: macos-latest
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
autodoc_mock_imports = ["omero", "omero_ext", "past", "future",
"Ice", "IceImport", "Glacier2", "pytest",
"appdirs", "IcePy", "omero_version",
"mox3", "IceGrid", "mx", "matplotlib",
"IceGrid", "mx", "matplotlib",
"omero_model_FileAnnotationI",
"omero_model_TimestampAnnotationI",
"omero_model_BooleanAnnotationI",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def read(fname):
],
tests_require=[
'pytest',
'mox3',
'pytest-mock',
],
cmdclass={
'devtarget': DevTargetCommand,
Expand Down
10 changes: 9 additions & 1 deletion src/omero/testlib/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
from omero.rtypes import rstring

from omero.testlib import ITest
from mox3 import mox

import warnings

class AbstractCLITest(ITest):

Expand All @@ -40,9 +41,16 @@ def setup_class(cls):
cls.cli.register("sessions", SessionsControl, "TEST")

def setup_mock(self):
from mox3 import mox
warnings.warn(
"The usage of mox3 is deprecated as of OMERO.py 5.17.0",
DeprecationWarning)
self.mox = mox.Mox()

def teardown_mock(self):
warnings.warn(
"The usage of mox3 is deprecated as of OMERO.py 5.17.0",
DeprecationWarning)
self.mox.UnsetStubs()
self.mox.VerifyAll()

Expand Down
4 changes: 2 additions & 2 deletions src/omero_ext/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ def text(self, encoding=None, errors='strict'):
"""
if encoding is None:
# 8-bit
with self.open('U') as f:
with self.open('r') as f:
return f.read()
else:
# Unicode
Expand Down Expand Up @@ -934,7 +934,7 @@ def lines(self, encoding=None, errors='strict', retain=True):
.. seealso:: :meth:`text`
"""
if encoding is None and retain:
with self.open('U') as f:
with self.open('r') as f:
return f.readlines()
else:
return self.text(encoding, errors).splitlines(retain)
Expand Down
130 changes: 0 additions & 130 deletions test/unit/clitest/mocks.py

This file was deleted.

Loading