diff options
| author | John L. Villalovos <john@sodarock.com> | 2022-01-03 21:48:49 -0800 |
|---|---|---|
| committer | John L. Villalovos <john@sodarock.com> | 2022-01-03 21:48:49 -0800 |
| commit | 789122d5df9b4f39331e23c7fdb6e9021e7836cf (patch) | |
| tree | ad4414de643a01eb94598283ab8ae44272a31811 | |
| parent | c6d7e9aaddda2f39262b695bb98ea4d90575fcce (diff) | |
| download | gitlab-789122d5df9b4f39331e23c7fdb6e9021e7836cf.tar.gz | |
chore: rename __version__.py to version.py
It was confusing having __version__.py as we were importing the
__version__ variable from __version__.py into the top-level namespace
while also having __version__.py. So depending where we were in the
import chain __version__ could refer to the module __version__.py or
it could refer to the variable __version__
| -rw-r--r-- | gitlab/__init__.py | 2 | ||||
| -rw-r--r-- | gitlab/const.py | 2 | ||||
| -rw-r--r-- | gitlab/version.py (renamed from gitlab/__version__.py) | 0 | ||||
| -rw-r--r-- | pyproject.toml | 2 | ||||
| -rw-r--r-- | setup.py | 2 |
5 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 824f177..be1794a 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -20,7 +20,7 @@ import warnings from typing import Any import gitlab.config # noqa: F401 -from gitlab.__version__ import ( # noqa: F401 +from gitlab.version import ( # noqa: F401 __author__, __copyright__, __email__, diff --git a/gitlab/const.py b/gitlab/const.py index 48aa96d..bccbcf8 100644 --- a/gitlab/const.py +++ b/gitlab/const.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from gitlab.__version__ import __title__, __version__ +from .version import __title__, __version__ # NOTE(jlvillal): '_DEPRECATED' only affects users accessing constants via the # top-level gitlab.* namespace. See 'gitlab/__init__.py:__getattr__()' for the diff --git a/gitlab/__version__.py b/gitlab/version.py index d7e8431..d7e8431 100644 --- a/gitlab/__version__.py +++ b/gitlab/version.py diff --git a/pyproject.toml b/pyproject.toml index bc0530a..43c0c8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ ignore_errors = true [tool.semantic_release] branch = "main" -version_variable = "gitlab/__version__.py:__version__" +version_variable = "gitlab/version.py:__version__" commit_subject = "chore: release v{version}" commit_message = "" @@ -6,7 +6,7 @@ from setuptools import find_packages, setup def get_version() -> str: version = "" - with open("gitlab/__version__.py") as f: + with open("gitlab/version.py") as f: for line in f: if line.startswith("__version__"): version = eval(line.split("=")[-1]) |
