Skip to content

Upgrading ruff 0.16 to 0.17

Breaking0.16.10 → 0.17.3Breaking10Security1New5Changed7Fixed17Other3

Fetching 4 releases from GitHub…3 / 4
BreakingUpgrade verdict

10 breaking changes and a security fix.

  • If you do not set a Python version, Ruff now assumes a newer Python by default, which can change which rules and syntax checks apply.
  • The default set of lint rules changed: some datetime checks are now off unless you enable them, and one syntax-error rule is now on.
  • Variables with Unicode names starting with an underscore, like _次, are now treated as intentionally unused.
  • Ruff's default output now lists unsafe fixes and suggestions needing manual review, though it still will not apply unsafe fixes without opt-in.
Top 4 of 11 that need code or config changes

ruff publishes an official migration guide for version 0.17. It covers more than the release notes do.

Migration guide ↗
Breaking10
Defaults to Python 3.11 instead of 3.10 for target version and to Python 3.15 instead of 3.14 for syntax error checks.
target-versionrequires-python
Disables several flake8-datetimez rules by default and enables F406 by default.
DTZ001DTZ005DTZ006DTZ007DTZ011DTZ012DTZ901F406
Default lint.dummy-variable-rgx now recognizes underscore-prefixed Unicode names as dummy variables.
lint.dummy-variable-rgx
The default full output format now always shows unsafe and display-only fixes regardless of the unsafe-fixes setting.
unsafe-fixes
Removes the Python dependency from conda-forge builds, so python -m ruff and import ruff no longer work there.
python -m ruffimport ruff
Removes support for the legacy ruff-lsp language server; ruff.nativeServer is deprecated and ignored.
ruff-lspruff.nativeServer
Updates quick-junit to 0.8.0, changing JUnit output to use a skipped attribute instead of disabled.
quick-junit
Adds datetime as dt as a conventional alias for ICN001.
ICN001datetime
Uses Unicode 17 data for identifier normalization and named character escapes.
Stabilizes ignoring trailing pragma comments when computing line length for the formatter, I001, E501, and W505.
I001E501W505
Security1
Code-signs macOS and Windows release executables and ruff wheels to enable publisher verification and binary integrity checks.