diff --git a/openml/__init__.py b/openml/__init__.py index 374ebfc48..9b2a1a6dd 100644 --- a/openml/__init__.py +++ b/openml/__init__.py @@ -18,6 +18,8 @@ # License: BSD 3-Clause from __future__ import annotations +__version__ = "0.16.0" + from typing import TYPE_CHECKING from . import ( @@ -34,7 +36,6 @@ tasks, utils, ) -from .__version__ import __version__ from ._api import _backend from .datasets import OpenMLDataFeature, OpenMLDataset from .datasets.functions import get_dataset, list_datasets diff --git a/openml/__version__.py b/openml/__version__.py deleted file mode 100644 index cf5a8535d..000000000 --- a/openml/__version__.py +++ /dev/null @@ -1,8 +0,0 @@ -"""Version information.""" - -# License: BSD 3-Clause - -# The following line *must* be the last in the module, exactly as formatted: -from __future__ import annotations - -__version__ = "0.16.0" diff --git a/openml/_api_calls.py b/openml/_api_calls.py index 179c814e7..9e59e712a 100644 --- a/openml/_api_calls.py +++ b/openml/_api_calls.py @@ -22,7 +22,7 @@ import openml -from .__version__ import __version__ +from . import __version__ from .exceptions import ( OpenMLAuthenticationError, OpenMLHashException, diff --git a/openml/_config.py b/openml/_config.py index d6850b7b0..26b5e0411 100644 --- a/openml/_config.py +++ b/openml/_config.py @@ -21,7 +21,7 @@ from openml.enums import APIVersion, ServerMode -from .__version__ import __version__ +from . import __version__ logger = logging.getLogger(__name__) openml_logger = logging.getLogger("openml") diff --git a/openml/cli.py b/openml/cli.py index 1415d0af9..9f3fc5452 100644 --- a/openml/cli.py +++ b/openml/cli.py @@ -12,7 +12,7 @@ from urllib.parse import urlparse import openml -from openml.__version__ import __version__ +from openml import __version__ from openml.enums import APIVersion diff --git a/pyproject.toml b/pyproject.toml index 8c463968b..de75eae43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,7 @@ namespaces = false openml = ["*.txt", "*.md", "py.typed"] [tool.setuptools.dynamic] -version = {attr = "openml.__version__.__version__"} +version = {attr = "openml.__version__"} # https://docs.pytest.org/en/7.2.x/reference/reference.html#ini-options-ref [tool.pytest.ini_options]