Update PyMySQL to 1.1.1 (#12001)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Sebastian Rittau
2024-05-23 19:14:43 +02:00
committed by GitHub
parent 4bc70e1e4d
commit f3ca3001ee
3 changed files with 11 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
from typing import Final
from .connections import Connection as Connection
from .constants import FIELD_TYPE as FIELD_TYPE
from .converters import escape_dict as escape_dict, escape_sequence as escape_sequence, escape_string as escape_string
@@ -23,6 +25,9 @@ from .times import (
TimestampFromTicks as TimestampFromTicks,
)
VERSION: Final[tuple[str | int, ...]]
VERSION_STRING: Final[str]
threadsafety: int
apilevel: str
paramstyle: str

View File

@@ -1,6 +1,7 @@
from _typeshed import Incomplete
from collections.abc import Mapping
from socket import socket as _socket
from ssl import _PasswordType
from typing import Any, AnyStr, Generic, TypeVar, overload
from typing_extensions import Self
@@ -103,6 +104,7 @@ class Connection(Generic[_C]):
ssl_cert=None,
ssl_disabled=None,
ssl_key=None,
ssl_key_password: _PasswordType | None = None,
ssl_verify_cert=None,
ssl_verify_identity=None,
read_default_group: Incomplete | None = None,

View File

@@ -3,14 +3,15 @@ import time
from _typeshed import Unused
from collections.abc import Callable, Mapping, Sequence
from decimal import Decimal
from typing import Any, TypeVar
from typing_extensions import TypeAlias
from typing import Any, NoReturn, TypeVar
from typing_extensions import TypeAlias, deprecated
_EscaperMapping: TypeAlias = Mapping[type[object], Callable[..., str]] | None
_T = TypeVar("_T")
def escape_item(val: object, charset: object, mapping: _EscaperMapping = None) -> str: ...
def escape_dict(val: Mapping[str, object], charset: object, mapping: _EscaperMapping = None) -> dict[str, str]: ...
@deprecated("dict cannot be used as parameter. It didn't produce valid SQL and might cause SQL injection.")
def escape_dict(val: Mapping[str, object], charset: object, mapping: _EscaperMapping = None) -> NoReturn: ...
def escape_sequence(val: Sequence[object], charset: object, mapping: _EscaperMapping = None) -> str: ...
def escape_set(val: set[object], charset: object, mapping: _EscaperMapping = None) -> str: ...
def escape_bool(value: bool, mapping: _EscaperMapping = None) -> str: ...