惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
H
Help Net Security
Last Week in AI
Last Week in AI
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
IT之家
IT之家
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Jina AI
Jina AI
Google DeepMind News
Google DeepMind News
B
Blog
C
Check Point Blog
T
Tailwind CSS Blog
云风的 BLOG
云风的 BLOG
D
Docker
Recent Announcements
Recent Announcements
Vercel News
Vercel News
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
月光博客
月光博客
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
B
Blog RSS Feed
The Register - Security
The Register - Security
V
Visual Studio Blog
F
Full Disclosure
Hugging Face - Blog
Hugging Face - Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
PCI Perspectives
PCI Perspectives
Cisco Talos Blog
Cisco Talos Blog
博客园 - Franky
D
DataBreaches.Net
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
Google Developers Blog
P
Palo Alto Networks Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
T
Tenable Blog
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy

Blog - Astral

Vulnerability and malware checks in uv Open source security at Astral Astral to join OpenAI Ruff v0.15.0 ty: An extremely fast Python type checker and language server Python 3.14 Ruff v0.13.0 Astral OSS Fund: One Year Later pyx: a Python-native package registry, now in Beta An experimental, variant-enabled build of uv uv security advisory: ZIP payload obfuscation Ruff v0.12.0 Ruff v0.10.0 Ruff v0.9.0 A new home for python-build-standalone Ruff v0.8.0 uv: Unified Python packaging Ruff v0.6.0 Announcing the Astral OSS Fund Ruff v0.5.0 Ruff v0.4.5: Ruff's language server is now written in Rust Ruff v0.4.0: a hand-written recursive descent parser for Python Ruff v0.3.0 uv: Python packaging in Rust Ruff v0.2.0 Ruff v0.1.8 Ruff v0.1.5 The Ruff Formatter: An extremely fast, Black-compatible Python formatter Ruff v0.1.0 Ruff v0.0.292 Ruff v0.0.285 Ruff v0.0.283 Ruff v0.0.281 Ruff v0.0.278 Ruff v0.0.276 Announcing Astral, the company behind Ruff
Ruff v0.7.0
alex@astral. · 2024-10-17 · via Blog - Astral

Ruff v0.7.0 is available now! Install it from PyPI, or your package manager of choice:

uv pip install --upgrade ruff

As a reminder: Ruff is an extremely fast Python linter and formatter, written in Rust. Ruff can be used to replace Black, Flake8 (plus dozens of plugins), isort, pydocstyle, pyupgrade, and more, all while executing tens or hundreds of times faster than any individual tool.


Migrating to v0.7 #

As with most Ruff minor releases, this release contains few breaking changes: most of our users should be able to upgrade to the latest Ruff version without having to make any significant edits to their code or configuration.

With that said, here are a few things to keep in mind when upgrading:

  • Some users will experience new default settings for the rules PT001 and PT023 (in our flake8-pytest category). This was a change we tried to make in Ruff v0.6 but, due to an error on our part, not all users saw the change in behavior. See below for more details.
  • The useless-try-except rule (in our tryceratops category) has been recoded from TRY302 to TRY203. This ensures Ruff's code is consistent with the same rule in the tryceratops linter.
  • The lint.allow-unused-imports setting has been removed. Use lint.pyflakes.allow-unused-imports instead.
  • open-file-with-context-handler (SIM115), a rule which looks for files opened without the use of context managers, now has more expansive behavior. Whereas before it would only look for files opened using the builtin open() function or pathlib.Path(...).open(), it can now detect files being opened using a wide range of other standard-library functions and classes. This improved capability has been available to users of preview mode for several months, but has now been promoted to stable.

Default behavior changed for flake8-pytest-style rules #

(This time with feeling.)

In Ruff v0.6, we tried to change the default behavior for pytest-fixture-incorrect-parentheses-style and pytest-incorrect-mark-parentheses-style (PT001 and PT023 respectively). The default behavior did indeed change in Ruff v0.6 for many of our users.

Unfortunately, however, some users were still experiencing the old defaults. The specific details of whether users would receive the updated behavior depended on exactly which configuration options were specified (or unspecified) in their Ruff configuration file (pyproject.toml, ruff.toml, or similar).

This bug has now been fixed, thanks to a contribution from Alexey Preobrazhenskiy: in Ruff v0.7, all users will experience the new default behavior.

To recap on the changes that were only partially made in Ruff v0.6: previously, PT001 would by default change @pytest.fixture decorators to @pytest.fixture(), and PT023 would change @pytest.mark.foo decorators to @pytest.mark.foo().

They will now both remove parentheses by default, rather than adding them. This means that these rules now adhere more closely to the style recommendations made by the official pytest project.

These rules are both configurable. To revert to Ruff's previous default behaviors, use the lint.flake8-pytest-style.mark-parentheses and lint.flake8-pytest-style.fixture-parentheses settings in your Ruff configuration file. For example, in a pyproject.toml file:

[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = true
mark-parentheses = true

These rules also both come with safe fixes, so you should be able to easily fix any new violations of these rules caused by this change by running ruff check . --fix --select=PT001 --select=PT023.


View the full changelog on GitHub.

Read more about Astral — the company behind Ruff.