Closed bollwyvl closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.75%. Comparing base (
4ada2cc
) to head (30e90fb
). Report is 5 commits behind head on main.
Comparing bollwyvl:gh-3621-use-graphql-versioning
(30e90fb) with main
(a1f3275)
β
15
untouched benchmarks
This pull request updates the version checking mechanism for GraphQL in the Strawberry project. It replaces the use of the packaging
library with GraphQL's built-in VersionInfo
object for version comparison. This change simplifies the dependency structure and potentially improves performance.
Change | Details | Files |
---|---|---|
Replace packaging library with GraphQL's built-in VersionInfo for version checking |
|
strawberry/utils/__init__.py |
Add release notes for the version checking update |
|
RELEASE.md |
Thanks for adding the RELEASE.md
file!
Here's a preview of the changelog:
This release updates how we check for GraphQL core's version to remove a
dependency on the packaging
package.
Here's the tweet text:
π Release (next) is out! Thanks to Nicholas Bollweg 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 π https://strawberry.rocks/release/(next)
Thanks for contributing to Strawberry! π You've been invited to join the Strawberry GraphQL organisation π
You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67
And don't forget to join our discord server: https://strawberry.rocks/discord π₯
Description
Alternative to to #3621.
Uses
graphql.version.VersionInfo
instead ofpackaging
to do version sniffing instead ofpackaging
(or evenimportlib.metadata.version
, as that only provides strings).That API has been there for five years, certainly above the current minimum dependency.
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Use GraphQL's built-in
VersionInfo
for version checking instead of thepackaging
library, simplifying dependencies and ensuring compatibility with GraphQL core.Bug Fixes:
packaging
library withgraphql.version.VersionInfo
for version checking, ensuring compatibility with GraphQL core's built-in version object.Chores:
RELEASE.md
file to document the release type as a patch and note the update in version checking.