diff --git a/lib/galaxy/managers/context.py b/lib/galaxy/managers/context.py index 24c29567a80b..f578fe79b8f2 100644 --- a/lib/galaxy/managers/context.py +++ b/lib/galaxy/managers/context.py @@ -79,11 +79,13 @@ class ProvidesAppContext: Mixed in class must provide `app` property. """ - @abc.abstractproperty + @property + @abc.abstractmethod def app(self) -> MinimalManagerApp: """Provide access to the Galaxy ``app`` object.""" - @abc.abstractproperty + @property + @abc.abstractmethod def url_builder(self) -> Optional[Callable[..., str]]: """ Provide access to Galaxy URLs (if available). @@ -217,7 +219,8 @@ def async_request_user(self) -> RequestUser: raise AuthenticationRequired("The async task requires user authentication.") return RequestUser(user_id=self.user.id) - @abc.abstractproperty + @property + @abc.abstractmethod def user(self): """Provide access to the user object.""" @@ -290,7 +293,8 @@ class ProvidesHistoryContext(ProvidesUserContext): properties. """ - @abc.abstractproperty + @property + @abc.abstractmethod def history(self) -> Optional[History]: """Provide access to the user's current history model object. diff --git a/lib/galaxy/tool_util/deps/container_resolvers/__init__.py b/lib/galaxy/tool_util/deps/container_resolvers/__init__.py index 6407ba2fa609..8a5682a3b39f 100644 --- a/lib/galaxy/tool_util/deps/container_resolvers/__init__.py +++ b/lib/galaxy/tool_util/deps/container_resolvers/__init__.py @@ -3,7 +3,6 @@ from abc import ( ABCMeta, abstractmethod, - abstractproperty, ) from typing import ( Any, @@ -65,7 +64,8 @@ def resolve( of the tool and its requirements. """ - @abstractproperty + @property + @abstractmethod def resolver_type(self) -> str: """Short label for the type of container resolution.""" diff --git a/lib/galaxy/tool_util/deps/resolvers/__init__.py b/lib/galaxy/tool_util/deps/resolvers/__init__.py index 492219665e0d..707e3e1cfa14 100644 --- a/lib/galaxy/tool_util/deps/resolvers/__init__.py +++ b/lib/galaxy/tool_util/deps/resolvers/__init__.py @@ -5,7 +5,6 @@ from abc import ( ABCMeta, abstractmethod, - abstractproperty, ) from typing import ( Any, @@ -237,7 +236,8 @@ def _expand_specs(self, requirement): class SpecificationPatternDependencyResolver(SpecificationAwareDependencyResolver): """Implement the :class:`SpecificationAwareDependencyResolver` with a regex pattern.""" - @abstractproperty + @property + @abstractmethod def _specification_pattern(self): """Pattern of URI to match against.""" @@ -275,7 +275,8 @@ def shell_commands(self): Return shell commands to enable this dependency. """ - @abstractproperty + @property + @abstractmethod def exact(self): """Return true if version information wasn't discarded to resolve the dependency. diff --git a/lib/galaxy/webapps/galaxy/api/workflows.py b/lib/galaxy/webapps/galaxy/api/workflows.py index 64d1d2a4c0ba..5de6e9d9b47c 100644 --- a/lib/galaxy/webapps/galaxy/api/workflows.py +++ b/lib/galaxy/webapps/galaxy/api/workflows.py @@ -21,7 +21,7 @@ Response, status, ) -from gxformat2._yaml import ordered_dump +from gxformat2.yaml import ordered_dump from pydantic import ( UUID1, UUID4, diff --git a/lib/galaxy/work/context.py b/lib/galaxy/work/context.py index 8e4fc74afc21..025fb7aac920 100644 --- a/lib/galaxy/work/context.py +++ b/lib/galaxy/work/context.py @@ -89,15 +89,18 @@ def set_user(self, user): class GalaxyAbstractRequest: """Abstract interface to provide access to some request properties.""" - @abc.abstractproperty + @property + @abc.abstractmethod def base(self) -> str: """Base URL of the request.""" - @abc.abstractproperty + @property + @abc.abstractmethod def host(self) -> str: """The host address.""" - @abc.abstractproperty + @property + @abc.abstractmethod def is_secure(self) -> bool: """Was this a secure (https) request.""" @@ -109,7 +112,8 @@ def get_cookie(self, name): class GalaxyAbstractResponse: """Abstract interface to provide access to some response utilities.""" - @abc.abstractproperty + @property + @abc.abstractmethod def headers(self) -> dict: """The response headers.""" diff --git a/lib/galaxy_test/base/populators.py b/lib/galaxy_test/base/populators.py index d373b23d389d..1e284135937b 100644 --- a/lib/galaxy_test/base/populators.py +++ b/lib/galaxy_test/base/populators.py @@ -76,7 +76,7 @@ convert_and_import_workflow, ImporterGalaxyInterface, ) -from gxformat2._yaml import ordered_load +from gxformat2.yaml import ordered_load from requests import Response from rocrate.rocrate import ROCrate from typing_extensions import Literal diff --git a/lib/tool_shed/context.py b/lib/tool_shed/context.py index 613c52b79a36..b936a7b7bf93 100644 --- a/lib/tool_shed/context.py +++ b/lib/tool_shed/context.py @@ -24,7 +24,8 @@ class ProvidesAppContext(Protocol): Mixed in class must provide `app` property. """ - @abc.abstractproperty + @property + @abc.abstractmethod def app(self) -> ToolShedApp: """Provide access to the shed ``app`` object.""" @@ -54,7 +55,8 @@ class ProvidesUserContext(ProvidesAppContext, Protocol): properties. """ - @abc.abstractproperty + @property + @abc.abstractmethod def user(self) -> Optional[User]: """Provide access to the user object.""" @@ -74,7 +76,8 @@ def user_is_bootstrap_admin(self) -> bool: class ProvidesRepositoriesContext(ProvidesUserContext, Protocol): - @abc.abstractproperty + @property + @abc.abstractmethod def repositories_hostname(self) -> str: """Provide access to hostname used by target mercurial server.""" @@ -86,16 +89,19 @@ def get_galaxy_session(self) -> Optional[GalaxySession]: ... @abc.abstractmethod def set_galaxy_session(self, galaxy_session: GalaxySession): ... - @abc.abstractproperty + @property + @abc.abstractmethod def request(self) -> GalaxyAbstractRequest: ... - @abc.abstractproperty + @property + @abc.abstractmethod def response(self) -> GalaxyAbstractResponse: ... @abc.abstractmethod def url_builder(self): ... - @abc.abstractproperty + @property + @abc.abstractmethod def session_csrf_token(self) -> str: ... diff --git a/lib/tool_shed/test/base/browser.py b/lib/tool_shed/test/base/browser.py index 559ce7468cf3..f20804eecc09 100644 --- a/lib/tool_shed/test/base/browser.py +++ b/lib/tool_shed/test/base/browser.py @@ -36,7 +36,8 @@ def submit_form(self, form_no=-1, button="runtool_btn", form=None, **kwd): def submit_form_with_name(self, form_name: str, button="runtool_btn", **kwd): """Submit the target button.""" - @abc.abstractproperty + @property + @abc.abstractmethod def is_twill(self) -> bool: """Return whether this is a twill browser.""" diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/twilltestcase.py index 87eaf2c3ab8d..a8414ff3dc69 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/twilltestcase.py @@ -150,11 +150,13 @@ def update_installed_repository( ) -> Dict[str, Any]: """""" - @abc.abstractproperty + @property + @abc.abstractmethod def tool_data_path(self) -> str: """""" - @abc.abstractproperty + @property + @abc.abstractmethod def shed_tool_data_table_conf(self) -> str: """"""