Skip to content

Commit 7bac703

Browse files
committed
feat!: move hcloud.__version__.VERSION to hcloud.__version__
1 parent 8e66f30 commit 7bac703

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

.github/release-please-config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
".": {
88
"release-type": "python",
99
"package-name": "hcloud",
10-
"extra-files": ["hcloud/__version__.py"]
10+
"extra-files": ["hcloud/_version.py"]
1111
}
1212
}
1313
}

docs/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from datetime import datetime
66

77
sys.path.insert(0, os.path.abspath(".."))
8-
from hcloud.__version__ import VERSION # noqa
8+
import hcloud # noqa
99

1010
# Configuration file for the Sphinx documentation builder.
1111
#
@@ -19,8 +19,8 @@
1919
author = "Hetzner Cloud GmbH"
2020
copyright = f"{datetime.now().year}, {author}"
2121

22-
version = VERSION
23-
release = VERSION
22+
version = hcloud.__version__
23+
release = hcloud.__version__
2424

2525
# -- General configuration ---------------------------------------------------
2626
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

hcloud/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
APIException as APIException,
66
HCloudException as HCloudException,
77
)
8+
from ._version import __version__ # noqa

hcloud/__version__.py

-3
This file was deleted.

hcloud/_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import requests
77

8-
from .__version__ import VERSION
98
from ._exceptions import APIException
9+
from ._version import __version__
1010
from .actions import ActionsClient
1111
from .certificates import CertificatesClient
1212
from .datacenters import DatacentersClient
@@ -29,7 +29,7 @@
2929
class Client:
3030
"""Base Client for accessing the Hetzner Cloud API"""
3131

32-
_version = VERSION
32+
_version = __version__
3333
_retry_wait_time = 0.5
3434
__user_agent_prefix = "hcloud-python"
3535

hcloud/_version.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from __future__ import annotations
2+
3+
__version__ = "1.35.0" # x-release-please-version

setup.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@
55
with open("README.md", encoding="utf-8") as readme_file:
66
readme = readme_file.read()
77

8-
version = {}
9-
with open("hcloud/__version__.py", encoding="utf-8") as fp:
10-
exec(fp.read(), version)
11-
128
setup(
139
name="hcloud",
14-
version=version["VERSION"],
10+
version="1.35.0",
1511
keywords="hcloud hetzner cloud",
1612
description="Official Hetzner Cloud python library",
1713
long_description=readme,

0 commit comments

Comments
 (0)