diff --git a/stdlib/3/sqlite3/dbapi2.pyi b/stdlib/3/sqlite3/dbapi2.pyi index ef46085cb..f9858ab76 100644 --- a/stdlib/3/sqlite3/dbapi2.pyi +++ b/stdlib/3/sqlite3/dbapi2.pyi @@ -6,6 +6,8 @@ from numbers import Integral from datetime import time, datetime from collections import Iterable +import sys + paramstyle = ... # type: str threadsafety = ... # type: int apilevel = ... # type: str @@ -66,13 +68,10 @@ version = ... # type: str # TODO: adapt needs to get probed def adapt(obj, protocol, alternate): ... def complete_statement(sql: str) -> bool: ... -def connect(database: Union[bytes, AnyStr], - timeout: float = ..., - detect_types: int = ..., - isolation_level: Union[str, None] = ..., - check_same_thread: bool = ..., - factory: Union[Connection, None] = ..., - cached_statements: int = ...) -> Connection: ... +if sys.version_info >= (3, 4): + def connect(database: Union[bytes, AnyStr], timeout: float = ..., detect_types: int = ..., isolation_level: Union[str, None] = ..., check_same_thread: bool = ..., factory: Union[Connection, None] = ..., cached_statements: int = ..., uri: bool = ...) -> Connection: ... +else: + def connect(database: Union[bytes, AnyStr], timeout: float = ..., detect_types: int = ..., isolation_level: Union[str, None] = ..., check_same_thread: bool = ..., factory: Union[Connection, None] = ..., cached_statements: int = ...) -> Connection: ... def enable_callback_tracebacks(flag: bool) -> None: ... def enable_shared_cache(do_enable: int) -> None: ... def register_adapter(type: type, callable: Any) -> None: ...