Skip to content

Commit 3546c79

Browse files
Revert "psycopg2: Accept Composable in place of query string (#7494)"
This reverts commit b78f0c2.
1 parent b78f0c2 commit 3546c79

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

stubs/psycopg2/psycopg2/_psycopg.pyi

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ from typing import Any, TypeVar, overload
55

66
import psycopg2
77
import psycopg2.extensions
8-
from psycopg2.sql import Composable
98

109
_Vars = Sequence[Any] | Mapping[str, Any] | None
1110

@@ -361,11 +360,11 @@ class cursor:
361360
def callproc(self, procname, parameters=...): ...
362361
def cast(self, oid, s): ...
363362
def close(self): ...
364-
def copy_expert(self, sql: str | bytes | Composable, file, size=...): ...
363+
def copy_expert(self, sql, file, size=...): ...
365364
def copy_from(self, file, table, sep=..., null=..., size=..., columns=...): ...
366365
def copy_to(self, file, table, sep=..., null=..., columns=...): ...
367-
def execute(self, query: str | bytes | Composable, vars: _Vars = ...) -> None: ...
368-
def executemany(self, query: str | bytes | Composable, vars_list: Iterable[_Vars]) -> None: ...
366+
def execute(self, query: str | bytes, vars: _Vars = ...) -> None: ...
367+
def executemany(self, query: str | bytes, vars_list: Iterable[_Vars]) -> None: ...
369368
def fetchall(self) -> list[tuple[Any, ...]]: ...
370369
def fetchmany(self, size=...) -> list[tuple[Any, ...]]: ...
371370
def fetchone(self) -> tuple[Any, ...] | Any: ...

0 commit comments

Comments
 (0)