Add an FAQ question around Python version support (#2908)

This commit is contained in:
Charlie Marsh 2023-02-14 22:11:44 -05:00 committed by GitHub
parent 298498e934
commit 016ff01a04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,6 @@ An extremely fast Python linter, written in Rust.
* ⚡️ 10-100x faster than existing linters
* 🐍 Installable via `pip`
* 🤝 Python 3.11 compatibility
* 🛠️ `pyproject.toml` support
* 📦 Built-in caching, to avoid re-analyzing unchanged files
* 🔧 Autofix support, for automatic error correction (e.g., automatically remove unused imports)
@ -1907,6 +1906,22 @@ implemented in [pyupgrade](https://pypi.org/project/pyupgrade/) ([#827](https://
If you're looking to use Ruff, but rely on an unsupported Flake8 plugin, feel free to file an Issue.
### What versions of Python does Ruff support?
Ruff can lint code for any Python version from 3.7 onwards. However, Ruff lacks support for a few
language features that were introduced in Python 3.10 and later. Specifically, Ruff does not
support:
- "Structural Pattern Matching" ([PEP 622](https://peps.python.org/pep-0622/)), introduced in Python 3.10.
- "Exception Groups and except* ([PEP 654](https://www.python.org/dev/peps/pep-0654/)), introduced in Python 3.11.
Support for these features is planned.
Ruff does not support Python 2. Ruff _may_ run on pre-Python 3.7 code, although such versions
are not officially supported (e.g., Ruff does _not_ respect type comments).
Ruff is installable under any Python version from 3.7 onwards.
### Do I need to install Rust to use Ruff?
Nope! Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI: