|
1 | | -import sys |
2 | 1 | import types |
| 2 | +from _typeshed import Incomplete |
3 | 3 | from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence |
4 | 4 | from typing import Any, ClassVar, Literal, NoReturn, ParamSpec, TypeAlias, TypeVar, final |
5 | | -from typing_extensions import disjoint_base |
| 5 | +from typing_extensions import Buffer, Self, disjoint_base |
6 | 6 |
|
7 | 7 | from cysqlite.metadata import Column, ColumnMetadata, ForeignKey, Index, View |
8 | 8 |
|
9 | | -if sys.version_info >= (3, 12): |
10 | | - from collections.abc import Buffer |
11 | | -else: |
12 | | - from typing_extensions import Buffer |
13 | | - |
14 | | -if sys.version_info >= (3, 11): |
15 | | - from typing import Self |
16 | | -else: |
17 | | - from typing_extensions import Self |
18 | | - |
19 | | -from _typeshed import Incomplete |
20 | | - |
21 | 9 | _SqliteData: TypeAlias = str | Buffer | float | None |
22 | 10 | _AdaptedInputData: TypeAlias = _SqliteData | Any |
23 | 11 | _Parameters: TypeAlias = Sequence[_AdaptedInputData] | Mapping[str, _AdaptedInputData] |
@@ -108,7 +96,6 @@ class Blob: |
108 | 96 | def __setitem__(self, key: int | slice[int, int, int] | slice[int, int], value: Buffer) -> None: ... |
109 | 97 |
|
110 | 98 | @final |
111 | | -@disjoint_base |
112 | 99 | class Connection(_callable_context_manager): |
113 | 100 | cached_statements: int |
114 | 101 | callback_error: BaseException | None |
@@ -249,7 +236,6 @@ class Connection(_callable_context_manager): |
249 | 236 | def __reduce__(self) -> Any: ... |
250 | 237 |
|
251 | 238 | @final |
252 | | -@disjoint_base |
253 | 239 | class Cursor: |
254 | 240 | conn: Connection |
255 | 241 | description: tuple[str, ...] |
|
0 commit comments