Skip to content

Commit

Permalink
use graphql's built-in version object (#3622)
Browse files Browse the repository at this point in the history
* use graphql's built-in version object

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add RELEASE.md

* Add tweet file

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Patrick Arminio <[email protected]>
  • Loading branch information
3 people authored Sep 11, 2024
1 parent a1f3275 commit 22bd2fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Release type: patch

This release updates how we check for GraphQL core's version to remove a
dependency on the `packaging` package.
6 changes: 6 additions & 0 deletions TWEET.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
🆕 Release $version is out! Thanks to $contributor for the PR 👏

This release updates how we check for GraphQL core's version to remove a
dependency on the `packaging` package.

Get it here 👉 $release_url
5 changes: 2 additions & 3 deletions strawberry/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import graphql
from packaging.version import Version
from graphql.version import VersionInfo, version_info

IS_GQL_33 = Version(graphql.__version__) >= Version("3.3.0a")
IS_GQL_33 = version_info >= VersionInfo.from_str("3.3.0a0")
IS_GQL_32 = not IS_GQL_33

0 comments on commit 22bd2fc

Please sign in to comment.