Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up python 3.8 leftovers #3740

Merged
merged 2 commits into from
Dec 24, 2024
Merged

Clean up python 3.8 leftovers #3740

merged 2 commits into from
Dec 24, 2024

Conversation

DoctorJohn
Copy link
Member

@DoctorJohn DoctorJohn commented Dec 24, 2024

Description

This PR is a micro follow-up to #3730 and contains essentially the diff of Thiago's PR and a Python 3.9 upgrade branch I was working on. The diff amounts to the update of one 3.8 reference in our docs and the removal of an now unnecessary version constrain.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Documentation

Copy link
Contributor

sourcery-ai bot commented Dec 24, 2024

Reviewer's Guide by Sourcery

This PR upgrades the project to Python 3.9 and removes some type casts and version constraints that are no longer needed.

Class diagram showing typing changes in Python 3.9 upgrade

classDiagram
    class AST {
        +Index
        +value
    }
    class ExprSlice {
        +value
    }
    AST -- ExprSlice
    note for ExprSlice "No longer needs type casting in Python 3.9+"
Loading

File-Level Changes

Change Details Files
Removed unnecessary version constraint for Litestar.
  • Removed python = \">=3.8\" from the Litestar dependency specification in pyproject.toml.
  • Updated poetry.lock to reflect the changes in pyproject.toml. This change also updates the Litestar dependency to the latest version compatible with the project's other dependencies and removes the Python version constraint from the lock file as well.
pyproject.toml
poetry.lock
Updated documentation to reflect the new minimum Python version.
  • Changed the minimum required Python version from 3.8+ to 3.9+ in the documentation.
docs/index.md
Removed type casts that are no longer required in Python 3.9.
  • Removed two unnecessary type casts from strawberry/utils/typing.py. These casts were previously needed for compatibility with Python 3.8, but are no longer necessary with Python 3.9.
strawberry/utils/typing.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @DoctorJohn - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a note to the changelog/documentation about this breaking change, explaining why Python 3.9+ is now required and providing upgrade guidance for users still on Python 3.8.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

pyproject.toml Outdated Show resolved Hide resolved
@DoctorJohn DoctorJohn marked this pull request as draft December 24, 2024 02:40
@DoctorJohn DoctorJohn force-pushed the require-python-3.9-or-higher branch from b663b61 to 8f35ea7 Compare December 24, 2024 02:46
@botberry
Copy link
Member

botberry commented Dec 24, 2024

Apollo Federation Subgraph Compatibility Results

Federation 1 Support Federation 2 Support
_service🟢
@key (single)🟢
@key (multi)🟢
@key (composite)🟢
repeatable @key🟢
@requires🟢
@provides🟢
federated tracing🔲
@link🟢
@shareable🟢
@tag🟢
@override🟢
@inaccessible🟢
@composeDirective🟢
@interfaceObject🟢

Learn more:

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.22%. Comparing base (bd29cff) to head (dd5abd3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3740   +/-   ##
=======================================
  Coverage   97.22%   97.22%           
=======================================
  Files         502      502           
  Lines       33428    33428           
  Branches     5484     5484           
=======================================
  Hits        32499    32499           
  Misses        721      721           
  Partials      208      208           

@DoctorJohn DoctorJohn marked this pull request as ready for review December 24, 2024 02:56
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @DoctorJohn - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@botberry
Copy link
Member

botberry commented Dec 24, 2024

Hi, thanks for contributing to Strawberry 🍓!

We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!

So as soon as this PR is merged, a release will be made 🚀.

Here's an example of RELEASE.md:

Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :)

Here's the tweet text:

🆕 Release (next) is out! Thanks to @NucleonJohn for the PR 👏

Get it here 👉 https://strawberry.rocks/release/(next)

Copy link

codspeed-hq bot commented Dec 24, 2024

CodSpeed Performance Report

Merging #3740 will not alter performance

Comparing require-python-3.9-or-higher (dd5abd3) with main (bd29cff)

Summary

✅ 21 untouched benchmarks

@DoctorJohn DoctorJohn changed the title Require python 3.9 or higher Clean up python 3.8 leftovers Dec 24, 2024
@DoctorJohn DoctorJohn force-pushed the require-python-3.9-or-higher branch 2 times, most recently from 2c6944d to 379623e Compare December 24, 2024 03:06
@DoctorJohn DoctorJohn force-pushed the require-python-3.9-or-higher branch 2 times, most recently from 21c9c29 to dd5abd3 Compare December 24, 2024 03:18
Copy link
Member

@bellini666 bellini666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.9 upgrade branch I was working on

OMG hahaha, I didn't know you were working on that lol

Let's join forces next time!

@patrick91 patrick91 merged commit 85789d5 into main Dec 24, 2024
93 of 94 checks passed
@patrick91 patrick91 deleted the require-python-3.9-or-higher branch December 24, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants