From 1804bd7e81f58da3b4a92206debb51e95e80c498 Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Wed, 29 Sep 2021 16:22:34 +0200 Subject: [PATCH] Up to date with GraphQL.js 16.0.0rc2 now Replicates graphql/graphql-js@976d64b7633c5b3e1123ae3f657804907d7a4800 --- .github/workflows/publish.yml | 2 +- src/graphql/version.py | 7 +++++-- tests/test_version.py | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fa617eae..fc166745 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: python setup.py sdist bdist_wheel - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@v1 + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} diff --git a/src/graphql/version.py b/src/graphql/version.py index 1e21c06d..f5b5aa4e 100644 --- a/src/graphql/version.py +++ b/src/graphql/version.py @@ -6,7 +6,7 @@ version = "3.2.0rc1" -version_js = "16.0.0rc1" +version_js = "16.0.0rc2" _re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(\D*)(\d*)") @@ -40,7 +40,10 @@ def __str__(self) -> str: v = f"{self.major}.{self.minor}.{self.micro}" level = self.releaselevel if level and level != "final": - v = f"{v}{level[:1]}{self.serial}" + level = level[:1] + if level == "c": + level = "rc" + v = f"{v}{level}{self.serial}" return v diff --git a/tests/test_version.py b/tests/test_version.py index a7a1b4ea..78c0cb23 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -9,7 +9,7 @@ version_info_js, ) -_re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(?:(a|b|c)(\d+))?$") +_re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(?:(a|b|r?c)(\d+))?$") def describe_version(): @@ -77,7 +77,7 @@ def version_info_has_correct_fields(): if groups[3] is None: # pragma: no cover assert groups[4] is None else: # pragma: no cover - assert version_info.releaselevel[:1] == groups[3] + assert version_info.releaselevel[:1] == groups[3].lstrip("r") assert version_info.serial == int(groups[4]) def describe_graphql_js_version(): @@ -103,5 +103,5 @@ def version_info_js_has_correct_fields(): if groups[3] is None: # pragma: no cover assert groups[4] is None else: # pragma: no cover - assert version_info_js.releaselevel[:1] == groups[3] + assert version_info_js.releaselevel[:1] == groups[3].lstrip("r") assert version_info_js.serial == int(groups[4])