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

feat: support back again Python 3.6 modules #193

Merged
merged 3 commits into from
Nov 11, 2024
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
5 changes: 3 additions & 2 deletions deepaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 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.5.2"
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__
62 changes: 9 additions & 53 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,66 +43,22 @@ deepaas-run = "deepaas.cmd.run:main"
deepaas-predict = "deepaas.cmd.execute: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.log" = "^6.0.0"
"oslo.config" = "^9.4.0"
stevedore = "^5.2.0"
aiohttp = "^3.9.5"
python = "^3.6"
"oslo.log" = "^4.8.0"
"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"
fixtures = "^4.1.0"
reno = "^4.1.0"
mock = "^5.1.0"
testtools = "^2.7.1"
setuptools = "^70.0.0"


[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"

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