Python 3.11 (#9515)

## Problem

On Debian 12 (Bookworm), Python 3.11 is the latest available version.

## Summary of changes
- Update Python to 3.11 in build-tools
- Fix ruff check / format
- Fix mypy
- Use `StrEnum` instead of pair `str`, `Enum`
- Update docs
This commit is contained in:
Alexander Bayandin
2024-11-21 16:25:31 +00:00
committed by GitHub
parent 0713ff3176
commit 8d1c44039e
68 changed files with 567 additions and 759 deletions

View File

@@ -16,7 +16,8 @@ from fixtures.neon_fixtures import (
from fixtures.pageserver.utils import wait_until_all_tenants_state
if TYPE_CHECKING:
from typing import Any, Callable, Optional
from collections.abc import Callable
from typing import Any
def ensure_pageserver_ready_for_benchmarking(env: NeonEnv, n_tenants: int):
@@ -46,7 +47,7 @@ def setup_pageserver_with_tenants(
name: str,
n_tenants: int,
setup: Callable[[NeonEnv], tuple[TenantId, TimelineId, dict[str, Any]]],
timeout_in_seconds: Optional[int] = None,
timeout_in_seconds: int | None = None,
) -> NeonEnv:
"""
Utility function to set up a pageserver with a given number of identical tenants.