Update minimum python to 3.11 from 3.10

3.10 is failing in CI and I cant be arsed to figure out why. It's anyway
a few months from EOL
This commit is contained in:
Kovid Goyal 2026-04-19 21:41:58 +05:30
parent 08c3ab106d
commit 04fcac72ec
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
13 changed files with 22 additions and 14 deletions

View file

@ -6,7 +6,8 @@ import sys
from contextlib import suppress
from functools import partial
from types import MappingProxyType
from typing import Any, Iterable, Mapping, Sequence
from typing import Any
from collections.abc import Iterable, Mapping, Sequence
from kitty.cli import parse_args
from kitty.cli_stub import PanelCLIOptions

View file

@ -9,7 +9,8 @@ from collections.abc import Generator, Sequence
from contextlib import contextmanager, suppress
from itertools import count
from time import monotonic
from typing import TYPE_CHECKING, DefaultDict, Iterable, Mapping, Optional, TypedDict
from typing import TYPE_CHECKING, DefaultDict, Optional, TypedDict
from collections.abc import Iterable, Mapping
import kitty.fast_data_types as fast_data_types

View file

@ -517,7 +517,7 @@ def seq_as_rst(
if (otype := opt.type).startswith('bool-'):
val_name = f' [={help_defval_for_bool(otype)}]'
else:
val_name = ' <{}>'.format(opt.dest.upper())
val_name = f' <{opt.dest.upper()}>'
a(defn + ', '.join(o + val_name for o in sorted(opt.aliases)))
if opt.help:
defval = opt.default

View file

@ -9,7 +9,8 @@ from collections.abc import Callable, Iterable, Iterator
from functools import lru_cache
from importlib import import_module
from re import Match
from typing import Any, Optional, Sequence, Union, cast
from typing import Any, Optional, Union, cast
from collections.abc import Sequence
import kitty.conf.utils as generic_parsers
from kitty.constants import website_url

View file

@ -236,7 +236,7 @@ def geninclude(path: str) -> list[str]:
if path.endswith('.py'):
return pygeninclude(path)
import subprocess
cp = subprocess.run([path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
cp = subprocess.run([path], capture_output=True, text=True)
if cp.returncode != 0:
raise GenincludeError(f'Running the geninclude program: {path} failed with exit code: {cp.returncode} and STDERR:\n{cp.stderr}')
return cp.stdout.splitlines()

View file

@ -6,7 +6,8 @@ import os
import shutil
from collections.abc import Container, Iterable, Iterator, Sequence
from contextlib import suppress
from typing import Any, Callable, Literal, NamedTuple, TypedDict
from typing import Any, Literal, NamedTuple, TypedDict
from collections.abc import Callable
from .boss import Boss
from .child import Child

View file

@ -5,7 +5,8 @@ from collections.abc import Generator, Iterable, Iterator, Sequence
from enum import Enum
from functools import partial
from itertools import repeat
from typing import Any, Callable, ClassVar, NamedTuple
from typing import Any, ClassVar, NamedTuple
from collections.abc import Callable
from kitty.borders import BorderColor
from kitty.fast_data_types import BOTTOM_EDGE, RIGHT_EDGE, Region, get_options, set_active_window, viewport_for_window

View file

@ -10,7 +10,8 @@ from collections.abc import Callable, Generator, Iterator, Mapping
from contextlib import suppress
from functools import partial
from gettext import gettext as _
from typing import TYPE_CHECKING, Any, Optional, Sequence, Union
from typing import TYPE_CHECKING, Any, Optional, Union
from collections.abc import Sequence
from .cli_stub import CLIOptions, GotoSessionOptions, SaveAsSessionOptions
from .constants import config_dir, unserialize_launch_flag

View file

@ -7,7 +7,7 @@ import re
import subprocess
from collections.abc import Callable
from contextlib import suppress
from typing import Iterable
from collections.abc import Iterable
from .constants import shell_integration_dir
from .fast_data_types import get_options

View file

@ -8,7 +8,8 @@ import re
import sys
from enum import Enum, auto
from functools import lru_cache
from typing import Any, Iterator, NamedTuple, Sequence
from typing import Any, NamedTuple
from collections.abc import Iterator, Sequence
if getattr(sys, 'running_from_setup', False):
is_macos = 'darwin' in sys.platform.lower()

View file

@ -19,12 +19,12 @@ from typing import (
TYPE_CHECKING,
Any,
Deque,
Iterator,
Literal,
NamedTuple,
Optional,
Union,
)
from collections.abc import Iterator
from .child import ProcessDesc
from .cli_stub import CLIOptions, SaveAsSessionOptions

View file

@ -6,7 +6,8 @@ from collections import deque
from collections.abc import Iterator
from contextlib import suppress
from itertools import count
from typing import Any, Deque, Sequence, Union
from typing import Any, Deque, Union
from collections.abc import Sequence
from .fast_data_types import Color, get_options
from .types import OverlayType, WindowGeometry
@ -238,7 +239,7 @@ class WindowList:
for wg in state['window_groups']:
old_group_id = wg['id']
if new_group_id := ans.get(old_group_id):
groups.append((g := gmap[new_group_id]))
groups.append(g := gmap[new_group_id])
new_window_ids = []
for old_window_id in wg['window_ids']:
if new_window_id := window_id_map.get(old_window_id):

View file

@ -1,5 +1,5 @@
[project]
requires-python = ">=3.10"
requires-python = ">=3.11"
license = "GPL-3.0-only"
[build-system]