From 13fd4c694e9afa270e1725019f4856af0f384c18 Mon Sep 17 00:00:00 2001 From: Gagan Deep Date: Thu, 19 Dec 2024 15:35:15 +0530 Subject: [PATCH] [deps] Bumped version to 1.2.0a - Fixed get_version function - Bumped openwisp-utils~=1.2.0a --- CHANGES.rst | 5 +++++ requirements-test.txt | 2 +- rest_framework_gis/__init__.py | 18 +++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7c5c3f94..68fc1f1d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ Changelog ========= +Version 1.2.0 [Unreleased] +-------------------------- + +Work in progress. + Version 1.1.0 [2024-08-17] -------------------------- diff --git a/requirements-test.txt b/requirements-test.txt index 849bcb85..8e3fb1ea 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -2,4 +2,4 @@ psycopg2~=2.9.10 django-filter>=2.0 contexttimer # QA checks -openwisp-utils[qa]~=1.1.1 +openwisp-utils[qa] @ https://github.com/openwisp/openwisp-utils/tarball/1.2 diff --git a/rest_framework_gis/__init__.py b/rest_framework_gis/__init__.py index b2d6732d..c8e813a3 100644 --- a/rest_framework_gis/__init__.py +++ b/rest_framework_gis/__init__.py @@ -1,14 +1,14 @@ -VERSION = (1, 1, 0, 'final') +VERSION = (1, 2, 0, 'alpha') __version__ = VERSION # alias def get_version(): - version = f'{VERSION[0]}.{VERSION[1]}' - if VERSION[2]: - version = f'{version}.{VERSION[2]}' - if VERSION[3:] == ('alpha', 0): - version = '%s pre-alpha' % version - else: - if VERSION[3] != 'final': - version = f'{version} {VERSION[3]}' + version = '%s.%s.%s' % (VERSION[0], VERSION[1], VERSION[2]) + if VERSION[3] != 'final': + first_letter = VERSION[3][0:1] + try: + suffix = VERSION[4] + except IndexError: + suffix = 0 + version = '%s%s%s' % (version, first_letter, suffix) return version