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

core: Bump ruff from 0.9.10 to 0.10.0 #13523

Closed
wants to merge 2 commits into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 14, 2025

Bumps ruff from 0.9.10 to 0.10.0.

Release notes

Sourced from ruff's releases.

0.10.0

Release Notes

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Changes to how the Python version is inferred when a target-version is not specified (#16319)

    In previous versions of Ruff, you could specify your Python version with:

    • The target-version option in a ruff.toml file or the [tool.ruff] section of a pyproject.toml file.
    • The project.requires-python field in a pyproject.toml file with a [tool.ruff] section.

    These options worked well in most cases, and are still recommended for fine control of the Python version. However, because of the way Ruff discovers config files, pyproject.toml files without a [tool.ruff] section would be ignored, including the requires-python setting. Ruff would then use the default Python version (3.9 as of this writing) instead, which is surprising when you've attempted to request another version.

    In v0.10, config discovery has been updated to address this issue:

    • If Ruff finds a ruff.toml file without a target-version, it will check for a pyproject.toml file in the same directory and respect its requires-python version, even if it does not contain a [tool.ruff] section.
    • If Ruff finds a user-level configuration, the requires-python field of the closest pyproject.toml in a parent directory will take precedence.
    • If there is no config file (ruff.tomlor pyproject.toml with a [tool.ruff] section) in the directory of the file being checked, Ruff will search for the closest pyproject.toml in the parent directories and use its requires-python setting.
  • Updated TYPE_CHECKING behavior (#16669)

    Previously, Ruff only recognized typechecking blocks that tested the typing.TYPE_CHECKING symbol. Now, Ruff recognizes any local variable named TYPE_CHECKING. This release also removes support for the legacy if 0: and if False: typechecking checks. Use a local TYPE_CHECKING variable instead.

  • More robust noqa parsing (#16483)

    The syntax for both file-level and in-line suppression comments has been unified and made more robust to certain errors. In most cases, this will result in more suppression comments being read by Ruff, but there are a few instances where previously read comments will now log an error to the user instead. Please refer to the documentation on Error suppression for the full specification.

  • Avoid unnecessary parentheses around with statements with a single context manager and a trailing comment (#14005)

    This change fixes a bug in the formatter where it introduced unnecessary parentheses around with statements with a single context manager and a trailing comment. This change may result in a change in formatting for some users.

  • Bump alpine default tag to 3.21 for derived Docker images (#16456)

    Alpine 3.21 was released in Dec 2024 and is used in the official Alpine-based Python images. Now the ruff:alpine image will use 3.21 instead of 3.20 and ruff:alpine3.20 will no longer be updated.

Deprecated Rules

The following rules have been deprecated:

... (truncated)

Changelog

Sourced from ruff's changelog.

0.10.0

Check out the blog post for a migration guide and overview of the changes!

Breaking changes

See also, the "Remapped rules" section which may result in disabled rules.

  • Changes to how the Python version is inferred when a target-version is not specified (#16319)

    In previous versions of Ruff, you could specify your Python version with:

    • The target-version option in a ruff.toml file or the [tool.ruff] section of a pyproject.toml file.
    • The project.requires-python field in a pyproject.toml file with a [tool.ruff] section.

    These options worked well in most cases, and are still recommended for fine control of the Python version. However, because of the way Ruff discovers config files, pyproject.toml files without a [tool.ruff] section would be ignored, including the requires-python setting. Ruff would then use the default Python version (3.9 as of this writing) instead, which is surprising when you've attempted to request another version.

    In v0.10, config discovery has been updated to address this issue:

    • If Ruff finds a ruff.toml file without a target-version, it will check for a pyproject.toml file in the same directory and respect its requires-python version, even if it does not contain a [tool.ruff] section.
    • If Ruff finds a user-level configuration, the requires-python field of the closest pyproject.toml in a parent directory will take precedence.
    • If there is no config file (ruff.tomlor pyproject.toml with a [tool.ruff] section) in the directory of the file being checked, Ruff will search for the closest pyproject.toml in the parent directories and use its requires-python setting.
  • Updated TYPE_CHECKING behavior (#16669)

    Previously, Ruff only recognized typechecking blocks that tested the typing.TYPE_CHECKING symbol. Now, Ruff recognizes any local variable named TYPE_CHECKING. This release also removes support for the legacy if 0: and if False: typechecking checks. Use a local TYPE_CHECKING variable instead.

  • More robust noqa parsing (#16483)

    The syntax for both file-level and in-line suppression comments has been unified and made more robust to certain errors. In most cases, this will result in more suppression comments being read by Ruff, but there are a few instances where previously read comments will now log an error to the user instead. Please refer to the documentation on Error suppression for the full specification.

  • Avoid unnecessary parentheses around with statements with a single context manager and a trailing comment (#14005)

    This change fixes a bug in the formatter where it introduced unnecessary parentheses around with statements with a single context manager and a trailing comment. This change may result in a change in formatting for some users.

  • Bump alpine default tag to 3.21 for derived Docker images (#16456)

    Alpine 3.21 was released in Dec 2024 and is used in the official Alpine-based Python images. Now the ruff:alpine image will use 3.21 instead of 3.20 and ruff:alpine3.20 will no longer be updated.

Deprecated Rules

The following rules have been deprecated:

... (truncated)

Commits
  • 27e9d1f Ruff v0.10 Release (#16708)
  • acf35c5 Add new noqa specification to the docs (#16703)
  • b9b2562 describe requires-python fallback in docs (#16704)
  • abaa189 [red-knot] handle cycles in MRO/bases resolution (#16693)
  • 360ba09 [red-knot] Auto generate statement nodes (#16645)
  • d8159e8 [pylint] Better inference for str.strip (PLE310) (#16671)
  • 04ad562 [pylint] Improve repeated-equality-comparison fix to use a set when all...
  • 9167471 [pylint/pep8-naming] Check __new__ argument name in `bad-staticmethod-a...
  • 348815d [flake8-pyi] Stabilize fix for unused-private-type-var (PYI018) (#16682)
  • 1326d55 [flake8-bandit] Deprecate suspicious-xmle-tree-usage (S320) (#16680)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.10 to 0.10.0.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.9.10...0.10.0)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 14, 2025
@dependabot dependabot bot requested a review from a team as a code owner March 14, 2025 04:16
Copy link

netlify bot commented Mar 14, 2025

Deploy Preview for authentik-docs canceled.

Name Link
🔨 Latest commit 3bdecb4
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67d43e21ab1ef600089d39b2

Copy link

netlify bot commented Mar 14, 2025

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit 3bdecb4
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67d43e2152bf2a0008a2bcf9
😎 Deploy Preview https://deploy-preview-13523--authentik-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rissson
Copy link
Member

rissson commented Mar 14, 2025

This might be a good opportunity to use the project.requires-python key, since poetry 2 supports it too.

Signed-off-by: Jens Langhammer <[email protected]>
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.74%. Comparing base (749e015) to head (3bdecb4).
Report is 39 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13523      +/-   ##
==========================================
+ Coverage   92.68%   92.74%   +0.05%     
==========================================
  Files         794      794              
  Lines       40419    40597     +178     
==========================================
+ Hits        37462    37650     +188     
+ Misses       2957     2947      -10     
Flag Coverage Δ
e2e 48.16% <66.66%> (+0.31%) ⬆️
integration 24.42% <66.66%> (+0.34%) ⬆️
unit 90.51% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-3bdecb4787cb66b2a10556feb03907fbb02b1075
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-3bdecb4787cb66b2a10556feb03907fbb02b1075

Afterwards, run the upgrade commands from the latest release notes.

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 17, 2025

A newer version of ruff exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@melizeche melizeche closed this Mar 17, 2025
Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 17, 2025

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/pip/ruff-0.10.0 branch March 17, 2025 17:51
@melizeche melizeche restored the dependabot/pip/ruff-0.10.0 branch March 17, 2025 22:52
@melizeche melizeche reopened this Mar 17, 2025
@rissson
Copy link
Member

rissson commented Mar 19, 2025

@dependabot recreate

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 19, 2025

The dependabot.yml entry that created this PR has been deleted so this PR can't be recreated. Please close the PR so Dependabot can create a new one with the current dependabot.yml.

@rissson rissson closed this Mar 19, 2025
@dependabot dependabot bot deleted the dependabot/pip/ruff-0.10.0 branch March 19, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants