Skip to content

Commit

Permalink
feat: restore compatibility with Python 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia committed Oct 17, 2024
1 parent b6c97cc commit 835a4b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.4.0"
".": "2.5.2"
}
7 changes: 4 additions & 3 deletions deepaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
# under the License.

from contextlib import suppress
import importlib.metadata
# import importlib.metadata # does not work with 3.6
from pathlib import Path

__version__ = "2.4.0"
__version__ = "2.5.2"


def extract_version() -> str:
Expand All @@ -32,4 +32,5 @@ def extract_version() -> str:
.strip("'\"\n ")
)
return f"{version}-dev (at {root_dir})"
return importlib.metadata.version(__package__ or __name__.split(".", maxsplit=1)[0])
# return importlib.metadata.version(__package__ or __name__.split(".", maxsplit=1)[0])
return __version__
69 changes: 9 additions & 60 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "deepaas"
version = "2.4.0"
version = "2.5.2"
description = "DEEPaaS is a REST API to expose a machine learning model."
authors = ["Alvaro Lopez Garcia <[email protected]>"]
license = "Apache-2"
Expand Down Expand Up @@ -42,72 +42,21 @@ classifiers = [
deepaas-run = "deepaas.cmd.run:main"
deepaas-cli = "deepaas.cmd.cli:main"

[tool.poetry.plugins] # Optional super table
[tool.poetry.plugins] # Optional super table

[tool.poetry.plugins."oslo.config.opts"]
[tool.poetry.plugins."oslo.config.opts"]
deepaas = "deepaas.opts:list_opts"

[tool.poetry.dependencies]
python = "^3.10"
"oslo.config" = "^9.4.0"
stevedore = "^5.2.0"
aiohttp = "^3.9.5"
python = "^3.6"
"oslo.config" = "^8.8.1"
stevedore = "^3.5.2"
aiohttp = "^3.8.6"
aiohttp-apispec = "^2.2.3"
Werkzeug = "^3.0.3"
marshmallow = "^3.21.3"
Werkzeug = "^2.0.3"
marshmallow = "^3.14.1"
webargs = "<6.0.0"


[tool.poetry.group.dev.dependencies]
tox = "^4.15.1"


[tool.poetry.group.test.dependencies]
pytest = "^8.2.2"
pytest-aiohttp = "^1.0.5"
pytest-cov = "^5.0.0"
reno = "^4.1.0"
mock = "^5.1.0"
setuptools = "^70.0.0"
pytest-asyncio = "^0.23.7"


[tool.poetry.group.test-flake8.dependencies]
flake8 = "^7.0.0"
flake8-bugbear = "^24.4.26"
flake8-typing-imports = "^1.15.0"
flake8-colors = "^0.1.9"
pep8-naming = "^0.14.1"
pydocstyle = "^6.3.0"


[tool.poetry.group.test-black.dependencies]
black = "^24.4.2"


[tool.poetry.group.test-bandit.dependencies]
bandit = "^1.7.8"


[tool.poetry.group.test-mypy.dependencies]
mypy = "^1.10.0"


[tool.poetry.group.test-pypi.dependencies]
twine = "^5.1.0"


[tool.poetry.group.test-pip-missing-reqs.dependencies]
pip-check-reqs = "^2.5.3"
poetry-plugin-export = "^1.8.0"


[tool.poetry.group.test-docs.dependencies]
sphinx = "^7.3.7"
sphinx-rtd-theme = "^2.0.0"
recommonmark = "^0.7.1"
reno = "^4.1.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 835a4b8

Please sign in to comment.