From 3b61383da54e54cd665ffc4c2138f8f27e830efb Mon Sep 17 00:00:00 2001 From: Marc Troelitzsch Date: Wed, 4 Sep 2024 16:53:15 +0200 Subject: [PATCH 1/3] Update PyPI classifiers, add keywords --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8ae41ba..4a072e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ description = "PHP-compatible version comparison for Python" readme = "README.md" requires-python = ">=3.6" classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: MIT License", @@ -26,6 +26,7 @@ classifiers = [ "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ] +keywords = ["php", "version", "compare", "comparison", "compatibility"] dependencies = [ "typing-extensions; python_version < '3.8'", ] From 3c6c625e0214bca327b63449566ab52ec1ffec44 Mon Sep 17 00:00:00 2001 From: Marc Troelitzsch Date: Wed, 4 Sep 2024 16:56:19 +0200 Subject: [PATCH 2/3] Replace current_segment list with str --- src/php_version_compare/versioning.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/php_version_compare/versioning.py b/src/php_version_compare/versioning.py index c714a22..d5ec049 100644 --- a/src/php_version_compare/versioning.py +++ b/src/php_version_compare/versioning.py @@ -43,22 +43,22 @@ def _split_version(version: str) -> Iterable[str]: Yields: The components of the version string. """ - current_segment = [] + current_segment = '' for curr_char in version: if curr_char in "-+_.": - yield "".join(current_segment) - current_segment = [] + yield current_segment + current_segment = '' elif current_segment and ( (current_segment[-1].isdigit() and curr_char.isalpha()) or (current_segment[-1].isalpha() and curr_char.isdigit()) ): - yield "".join(current_segment) - current_segment = [curr_char] + yield current_segment + current_segment = curr_char else: - current_segment.append(curr_char) + current_segment += curr_char - yield "".join(current_segment) + yield current_segment def canonicalize_version(version: str) -> str: From db3884ca2459ec5d2d03253890c7b11515ba7c5c Mon Sep 17 00:00:00 2001 From: Marc Troelitzsch Date: Wed, 4 Sep 2024 16:56:44 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Bump=20version:=201.0.0=20=E2=86=92=201.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/php_version_compare/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4a072e6..d2d361b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ path = "src/php_version_compare/__init__.py" exclude = ["tox.ini", "tests"] [tool.bumpversion] -current_version = "1.0.0" +current_version = "1.0.1" commit = true tag = true tag_name = "v{new_version}" diff --git a/src/php_version_compare/__init__.py b/src/php_version_compare/__init__.py index 3d48b04..5f08686 100644 --- a/src/php_version_compare/__init__.py +++ b/src/php_version_compare/__init__.py @@ -4,4 +4,4 @@ Operator as Operator, ) -__version__ = "1.0.0" +__version__ = "1.0.1"