From d5926420d39b617f5f130bd974f9bd38be532352 Mon Sep 17 00:00:00 2001 From: Tomer Nosrati Date: Wed, 3 Jan 2024 01:15:06 +0200 Subject: [PATCH] Prepare for (pre) release: v1.0.0a9 (#140) * Reverted version matching regex check * Bumping version from 1.0.0a8 to 1.0.0a9 --- pyproject.toml | 2 +- src/pytest_celery/__init__.py | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d7dac1d4..d154f2be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ description = "Pytest plugin for Celery" homepage = "https://github.com/celery/pytest-celery" license = "BSD" name = "pytest-celery" -version = "1.0.0a8" +version = "1.0.0a9" [tool.poetry_bumpversion.file."src/pytest_celery/__init__.py"] search = '__version__ = "{current_version}"' diff --git a/src/pytest_celery/__init__.py b/src/pytest_celery/__init__.py index ee0881a9..a2e6fd4a 100644 --- a/src/pytest_celery/__init__.py +++ b/src/pytest_celery/__init__.py @@ -5,7 +5,7 @@ # flake8: noqa -__version__ = "1.0.0a8" +__version__ = "1.0.0a9" import re @@ -47,14 +47,10 @@ ), ) + # bumpversion can only search for {current_version} # so we have to parse the version here. -match = re.match(r"(\d+)\.(\d+)\.(\d+)(.+)?", __version__) -if match: - _temp = match.groups() -else: - # Comments are not allowed in the same line as the version string. - raise ValueError(f"The version string '{__version__}' does not match the expected pattern.") +_temp = re.match(r"(\d+)\.(\d+).(\d+)(.+)?", __version__).groups() # type: ignore VERSION = version_info = version_info_t(int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or "", "") del _temp del re