mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
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:
@@ -6,7 +6,8 @@ import sys
|
|||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from types import MappingProxyType
|
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 import parse_args
|
||||||
from kitty.cli_stub import PanelCLIOptions
|
from kitty.cli_stub import PanelCLIOptions
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ from collections.abc import Generator, Sequence
|
|||||||
from contextlib import contextmanager, suppress
|
from contextlib import contextmanager, suppress
|
||||||
from itertools import count
|
from itertools import count
|
||||||
from time import monotonic
|
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
|
import kitty.fast_data_types as fast_data_types
|
||||||
|
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ def seq_as_rst(
|
|||||||
if (otype := opt.type).startswith('bool-'):
|
if (otype := opt.type).startswith('bool-'):
|
||||||
val_name = f' [={help_defval_for_bool(otype)}]'
|
val_name = f' [={help_defval_for_bool(otype)}]'
|
||||||
else:
|
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)))
|
a(defn + ', '.join(o + val_name for o in sorted(opt.aliases)))
|
||||||
if opt.help:
|
if opt.help:
|
||||||
defval = opt.default
|
defval = opt.default
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ from collections.abc import Callable, Iterable, Iterator
|
|||||||
from functools import lru_cache
|
from functools import lru_cache
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
from re import Match
|
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
|
import kitty.conf.utils as generic_parsers
|
||||||
from kitty.constants import website_url
|
from kitty.constants import website_url
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ def geninclude(path: str) -> list[str]:
|
|||||||
if path.endswith('.py'):
|
if path.endswith('.py'):
|
||||||
return pygeninclude(path)
|
return pygeninclude(path)
|
||||||
import subprocess
|
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:
|
if cp.returncode != 0:
|
||||||
raise GenincludeError(f'Running the geninclude program: {path} failed with exit code: {cp.returncode} and STDERR:\n{cp.stderr}')
|
raise GenincludeError(f'Running the geninclude program: {path} failed with exit code: {cp.returncode} and STDERR:\n{cp.stderr}')
|
||||||
return cp.stdout.splitlines()
|
return cp.stdout.splitlines()
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
from collections.abc import Container, Iterable, Iterator, Sequence
|
from collections.abc import Container, Iterable, Iterator, Sequence
|
||||||
from contextlib import suppress
|
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 .boss import Boss
|
||||||
from .child import Child
|
from .child import Child
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ from collections.abc import Generator, Iterable, Iterator, Sequence
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from itertools import repeat
|
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.borders import BorderColor
|
||||||
from kitty.fast_data_types import BOTTOM_EDGE, RIGHT_EDGE, Region, get_options, set_active_window, viewport_for_window
|
from kitty.fast_data_types import BOTTOM_EDGE, RIGHT_EDGE, Region, get_options, set_active_window, viewport_for_window
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ from collections.abc import Callable, Generator, Iterator, Mapping
|
|||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from gettext import gettext as _
|
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 .cli_stub import CLIOptions, GotoSessionOptions, SaveAsSessionOptions
|
||||||
from .constants import config_dir, unserialize_launch_flag
|
from .constants import config_dir, unserialize_launch_flag
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from typing import Iterable
|
from collections.abc import Iterable
|
||||||
|
|
||||||
from .constants import shell_integration_dir
|
from .constants import shell_integration_dir
|
||||||
from .fast_data_types import get_options
|
from .fast_data_types import get_options
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
from functools import lru_cache
|
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):
|
if getattr(sys, 'running_from_setup', False):
|
||||||
is_macos = 'darwin' in sys.platform.lower()
|
is_macos = 'darwin' in sys.platform.lower()
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ from typing import (
|
|||||||
TYPE_CHECKING,
|
TYPE_CHECKING,
|
||||||
Any,
|
Any,
|
||||||
Deque,
|
Deque,
|
||||||
Iterator,
|
|
||||||
Literal,
|
Literal,
|
||||||
NamedTuple,
|
NamedTuple,
|
||||||
Optional,
|
Optional,
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
from collections.abc import Iterator
|
||||||
|
|
||||||
from .child import ProcessDesc
|
from .child import ProcessDesc
|
||||||
from .cli_stub import CLIOptions, SaveAsSessionOptions
|
from .cli_stub import CLIOptions, SaveAsSessionOptions
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ from collections import deque
|
|||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from itertools import count
|
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 .fast_data_types import Color, get_options
|
||||||
from .types import OverlayType, WindowGeometry
|
from .types import OverlayType, WindowGeometry
|
||||||
@@ -238,7 +239,7 @@ class WindowList:
|
|||||||
for wg in state['window_groups']:
|
for wg in state['window_groups']:
|
||||||
old_group_id = wg['id']
|
old_group_id = wg['id']
|
||||||
if new_group_id := ans.get(old_group_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 = []
|
new_window_ids = []
|
||||||
for old_window_id in wg['window_ids']:
|
for old_window_id in wg['window_ids']:
|
||||||
if new_window_id := window_id_map.get(old_window_id):
|
if new_window_id := window_id_map.get(old_window_id):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[project]
|
[project]
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.11"
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
Reference in New Issue
Block a user