You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use Python 3.11 features now that 3.10 is dropped #331
Part of #177. When Python 3.10 support is dropped (requires-python >= 3.11), the code can use what 3.11 added. This issue tracks a review of where that makes the code simpler or more correct.
What to look for
Standard library instead of backports and workarounds
tomllib instead of a tomli fallback.
typing.Self, Never, LiteralString, assert_never, reveal_type, Required/NotRequired, dataclass_transform, TypeVarTuple/Unpack from typing instead of typing_extensions. About 49 imports use typing_extensions today. Keep it only for names that need 3.12+, and drop the dependency where nothing is left.
enum.StrEnum where a str, Enum mix-in is used.
datetime.UTC instead of timezone.utc.
Error handling
BaseException.add_note() for adding context to a re-raised error, where code builds a new message by hand today.
ExceptionGroup / except* where several errors are collected and reported together.
Async
asyncio.TaskGroup and asyncio.timeout() instead of gather plus cancellation by hand, or wait_for.
Small helpers
contextlib.chdir, operator.call, and hashlib.file_digest, where they fit.
Tooling
Set ruff's target-version to py311 (or let it follow requires-python) and apply the UP fixes it then reports.
Check mypy's python_version.
Check whether the Rust extension's abi3 floor moves to py311 (done with the PyO3 upgrade or the 3.10 drop).
How
One focused PR per area. Ruff's automatic fixes can go in a single PR. Behaviour stays the same; any public type hint that changes (for example Self) gets a changelog line only if users could see it.
Activity