Skip to content

Commit

Permalink
Update PyMySQL to 1.1.1 (#12001)
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
srittau and JelleZijlstra committed May 23, 2024
1 parent 4bc70e1 commit f3ca300
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions stubs/PyMySQL/pymysql/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions stubs/PyMySQL/pymysql/connections.pyi
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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,
Expand Down
7 changes: 4 additions & 3 deletions stubs/PyMySQL/pymysql/converters.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down

0 comments on commit f3ca300

Please sign in to comment.