types-PyMySQL 1.1.0.20260518__tar.gz → 1.2.0.20260807__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/CHANGELOG.md +12 -0
  2. {types_pymysql-1.1.0.20260518/types_PyMySQL.egg-info → types_pymysql-1.2.0.20260807}/PKG-INFO +6 -5
  3. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/README.md +5 -4
  4. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/METADATA.toml +1 -1
  5. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/connections.pyi +58 -5
  6. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/converters.pyi +3 -3
  7. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/cursors.pyi +2 -2
  8. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/err.pyi +7 -3
  9. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pyproject.toml +8 -5
  10. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807/types_PyMySQL.egg-info}/PKG-INFO +6 -5
  11. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/LICENSE +0 -0
  12. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/MANIFEST.in +0 -0
  13. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/__init__.pyi +0 -0
  14. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/_auth.pyi +0 -0
  15. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/charset.pyi +0 -0
  16. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/CLIENT.pyi +0 -0
  17. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/COMMAND.pyi +0 -0
  18. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/CR.pyi +0 -0
  19. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/ER.pyi +0 -0
  20. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/FIELD_TYPE.pyi +0 -0
  21. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/FLAG.pyi +0 -0
  22. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/SERVER_STATUS.pyi +0 -0
  23. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/constants/__init__.pyi +0 -0
  24. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/optionfile.pyi +0 -0
  25. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/protocol.pyi +0 -0
  26. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/py.typed +0 -0
  27. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/pymysql-stubs/times.pyi +0 -0
  28. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/setup.cfg +0 -0
  29. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/types_PyMySQL.egg-info/SOURCES.txt +0 -0
  30. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/types_PyMySQL.egg-info/dependency_links.txt +0 -0
  31. {types_pymysql-1.1.0.20260518 → types_pymysql-1.2.0.20260807}/types_PyMySQL.egg-info/top_level.txt +0 -0
@@ -1,3 +1,15 @@
1
+ ## [1.2.0.20260807](https://pypi.org/project/types-PyMySQL/1.2.0.20260807/) (2026-08-07)
2
+
3
+ * Run Pyrefly on typeshed stubs in CI ([#16155](https://github.com/python/typeshed/pull/16155))
4
+
5
+ ## [1.2.0.20260724](https://pypi.org/project/types-PyMySQL/1.2.0.20260724/) (2026-07-24)
6
+
7
+ * Replace `NoReturn` with `Never` ([#16079](https://github.com/python/typeshed/pull/16079))
8
+
9
+ ## [1.2.0.20260722](https://pypi.org/project/types-PyMySQL/1.2.0.20260722/) (2026-07-22)
10
+
11
+ * Update to 1.2.* ([#16053](https://github.com/python/typeshed/pull/16053))
12
+
1
13
  ## 1.1.0.20260518 (2026-05-18)
2
14
 
3
15
  Upgrade black to 26.5.0 ([#15801](https://github.com/python/typeshed/pull/15801))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: types-PyMySQL
3
- Version: 1.1.0.20260518
3
+ Version: 1.2.0.20260807
4
4
  Summary: Typing stubs for PyMySQL
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/python/typeshed
@@ -21,7 +21,7 @@ This is a [type stub package](https://typing.python.org/en/latest/tutorials/exte
21
21
  for the [`PyMySQL`](https://github.com/PyMySQL/PyMySQL) package. It can be used by type checkers
22
22
  to check code that uses `PyMySQL`. This version of
23
23
  `types-PyMySQL` aims to provide accurate annotations for
24
- `PyMySQL==1.1.*`.
24
+ `PyMySQL==1.2.*`.
25
25
 
26
26
  This package is part of the [typeshed project](https://github.com/python/typeshed).
27
27
  All fixes for types and metadata should be contributed there.
@@ -31,8 +31,9 @@ for more details. The source for this package can be found in the
31
31
  directory.
32
32
 
33
33
  This package was tested with the following type checkers:
34
- * [mypy](https://github.com/python/mypy/) 2.1.0
35
- * [pyright](https://github.com/microsoft/pyright) 1.1.409
34
+ * [mypy](https://github.com/python/mypy/) 2.3.0
35
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
36
+ * [ty](https://docs.astral.sh/ty/) 0.0.59
36
37
 
37
38
  It was generated from typeshed commit
38
- [`3402466d17144ed7edfc92940c6973167ba285af`](https://github.com/python/typeshed/commit/3402466d17144ed7edfc92940c6973167ba285af).
39
+ [`e0efbeef901e9b6998d016e1ab9352678f09ae77`](https://github.com/python/typeshed/commit/e0efbeef901e9b6998d016e1ab9352678f09ae77).
@@ -4,7 +4,7 @@ This is a [type stub package](https://typing.python.org/en/latest/tutorials/exte
4
4
  for the [`PyMySQL`](https://github.com/PyMySQL/PyMySQL) package. It can be used by type checkers
5
5
  to check code that uses `PyMySQL`. This version of
6
6
  `types-PyMySQL` aims to provide accurate annotations for
7
- `PyMySQL==1.1.*`.
7
+ `PyMySQL==1.2.*`.
8
8
 
9
9
  This package is part of the [typeshed project](https://github.com/python/typeshed).
10
10
  All fixes for types and metadata should be contributed there.
@@ -14,8 +14,9 @@ for more details. The source for this package can be found in the
14
14
  directory.
15
15
 
16
16
  This package was tested with the following type checkers:
17
- * [mypy](https://github.com/python/mypy/) 2.1.0
18
- * [pyright](https://github.com/microsoft/pyright) 1.1.409
17
+ * [mypy](https://github.com/python/mypy/) 2.3.0
18
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
19
+ * [ty](https://docs.astral.sh/ty/) 0.0.59
19
20
 
20
21
  It was generated from typeshed commit
21
- [`3402466d17144ed7edfc92940c6973167ba285af`](https://github.com/python/typeshed/commit/3402466d17144ed7edfc92940c6973167ba285af).
22
+ [`e0efbeef901e9b6998d016e1ab9352678f09ae77`](https://github.com/python/typeshed/commit/e0efbeef901e9b6998d016e1ab9352678f09ae77).
@@ -1,2 +1,2 @@
1
- version = "1.1.*"
1
+ version = "1.2.*"
2
2
  upstream-repository = "https://github.com/PyMySQL/PyMySQL"
@@ -2,7 +2,7 @@ from _typeshed import FileDescriptorOrPath, Incomplete, Unused
2
2
  from collections.abc import Callable, Mapping
3
3
  from socket import _Address, socket as _socket
4
4
  from ssl import SSLContext, _PasswordType
5
- from typing import Any, AnyStr, Generic, overload
5
+ from typing import Any, AnyStr, Generic, Literal, overload
6
6
  from typing_extensions import Self, TypeVar, deprecated
7
7
 
8
8
  from .charset import charset_by_id as charset_by_id, charset_by_name as charset_by_name
@@ -91,7 +91,7 @@ class Connection(Generic[_C]):
91
91
  binary_prefix: bool = False,
92
92
  program_name: str | None = None,
93
93
  server_public_key: bytes | None = None,
94
- ssl: dict[str, Incomplete] | SSLContext | None = None,
94
+ ssl: SSLContext | None = None, # Passing a dict is deprecated
95
95
  ssl_ca: str | None = None,
96
96
  ssl_cert: str | None = None,
97
97
  ssl_disabled: bool | None = None,
@@ -106,6 +106,53 @@ class Connection(Generic[_C]):
106
106
  db: None = None, # deprecated
107
107
  ) -> None: ...
108
108
  @overload
109
+ @deprecated("Passing a dict for 'ssl' parameter is deprecated. Use 'ssl_*' parameters or 'ssl.SSLContext' instead.")
110
+ def __init__(
111
+ self,
112
+ *,
113
+ user: str | bytes | None = None,
114
+ password: str | bytes = "",
115
+ host: str | None = None,
116
+ database: str | bytes | None = None,
117
+ unix_socket: _Address | None = None,
118
+ port: int = 0,
119
+ charset: str = "",
120
+ collation: str | None = None,
121
+ sql_mode: str | None = None,
122
+ read_default_file: str | None = None,
123
+ conv: dict[int | type[Any], Callable[[Any], str] | Callable[[str], Any]] | None = None,
124
+ use_unicode: bool = True,
125
+ client_flag: int = 0,
126
+ cursorclass: type[_C] = ...,
127
+ init_command: str | None = None,
128
+ connect_timeout: float = 10,
129
+ read_default_group: str | None = None,
130
+ autocommit: bool | None = False,
131
+ local_infile: bool = False,
132
+ max_allowed_packet: int = 16_777_216,
133
+ defer_connect: bool = False,
134
+ auth_plugin_map: dict[str, Callable[[Connection[Any]], Any]] | None = None,
135
+ read_timeout: float | None = None,
136
+ write_timeout: float | None = None,
137
+ bind_address: str | None = None,
138
+ binary_prefix: bool = False,
139
+ program_name: str | None = None,
140
+ server_public_key: bytes | None = None,
141
+ ssl: dict[str, Incomplete], # Passing a dict is deprecated
142
+ ssl_ca: str | None = None,
143
+ ssl_cert: str | None = None,
144
+ ssl_disabled: bool | None = None,
145
+ ssl_key: str | None = None,
146
+ ssl_key_password: _PasswordType | None = None,
147
+ ssl_verify_cert: bool | None = None,
148
+ ssl_verify_identity: bool | None = None,
149
+ compress: Unused = None,
150
+ named_pipe: Unused = None,
151
+ # different between overloads:
152
+ passwd: str | bytes | None = None, # deprecated
153
+ db: str | bytes | None = None, # deprecated
154
+ ) -> None: ...
155
+ @overload
109
156
  @deprecated("'passwd' and 'db' arguments are deprecated. Use 'password' and 'database' instead.")
110
157
  def __init__(
111
158
  self,
@@ -138,7 +185,7 @@ class Connection(Generic[_C]):
138
185
  binary_prefix: bool = False,
139
186
  program_name: str | None = None,
140
187
  server_public_key: bytes | None = None,
141
- ssl: dict[str, Incomplete] | SSLContext | None = None,
188
+ ssl: dict[str, Incomplete] | SSLContext | None = None, # Passing a dict is deprecated
142
189
  ssl_ca: str | None = None,
143
190
  ssl_cert: str | None = None,
144
191
  ssl_disabled: bool | None = None,
@@ -176,8 +223,14 @@ class Connection(Generic[_C]):
176
223
  def next_result(self, unbuffered: bool = False) -> int: ...
177
224
  def affected_rows(self): ...
178
225
  def kill(self, thread_id): ...
179
- def ping(self, reconnect: bool = True) -> None: ...
180
- @deprecated("Method is deprecated. Use set_character_set() instead.")
226
+
227
+ @overload
228
+ def ping(self, reconnect: Literal[False] | None = False) -> None: ...
229
+ @overload
230
+ @deprecated("The 'reconnect' parameter is deprecated. Create a new connection if you want to reconnect.")
231
+ def ping(self, reconnect: Literal[True]) -> None: ...
232
+
233
+ @deprecated("Method is deprecated. Use 'set_character_set()' instead.")
181
234
  def set_charset(self, charset: str) -> None: ...
182
235
  def set_character_set(self, charset: str, collation: str | None = None) -> None: ...
183
236
  def connect(self, sock: _socket | None = None) -> None: ...
@@ -4,15 +4,15 @@ import time
4
4
  from _typeshed import Unused
5
5
  from collections.abc import Callable, Mapping, Sequence
6
6
  from decimal import Decimal
7
- from typing import Any, NoReturn, TypeAlias, TypeVar
8
- from typing_extensions import deprecated
7
+ from typing import Any, TypeAlias, TypeVar
8
+ from typing_extensions import Never, deprecated
9
9
 
10
10
  _EscaperMapping: TypeAlias = Mapping[type[object], Callable[..., str]] | None
11
11
  _T = TypeVar("_T")
12
12
 
13
13
  def escape_item(val: object, charset: object, mapping: _EscaperMapping = None) -> str: ...
14
14
  @deprecated("dict cannot be used as parameter. It didn't produce valid SQL and might cause SQL injection.")
15
- def escape_dict(val: Mapping[str, object], charset: object, mapping: _EscaperMapping = None) -> NoReturn: ...
15
+ def escape_dict(val: Mapping[str, object], charset: object, mapping: _EscaperMapping = None) -> Never: ...
16
16
  def escape_sequence(val: Sequence[object], charset: object, mapping: _EscaperMapping = None) -> str: ...
17
17
  def escape_set(val: set[object], charset: object, mapping: _EscaperMapping = None) -> str: ...
18
18
  def escape_bool(value: bool, mapping: _EscaperMapping = None) -> str: ...
@@ -51,8 +51,8 @@ class SSCursor(Cursor):
51
51
  def fetchall_unbuffered(self) -> Iterator[tuple[Any, ...]]: ...
52
52
  def scroll(self, value: int, mode: str = "relative") -> None: ...
53
53
 
54
- class DictCursor(DictCursorMixin, Cursor): ... # type: ignore[misc]
54
+ class DictCursor(DictCursorMixin, Cursor): ... # type: ignore[misc] # pyrefly: ignore [inconsistent-inheritance]
55
55
 
56
- class SSDictCursor(DictCursorMixin, SSCursor): # type: ignore[misc]
56
+ class SSDictCursor(DictCursorMixin, SSCursor): # type: ignore[misc] # pyrefly: ignore [inconsistent-inheritance]
57
57
  def fetchall_unbuffered(self) -> Iterator[dict[str, Any]]: ... # type: ignore[override]
58
58
  def read_next(self) -> dict[str, Any] | None: ... # type: ignore[override]
@@ -1,11 +1,15 @@
1
1
  import builtins
2
- from typing import NoReturn
2
+ from typing_extensions import Never
3
3
 
4
4
  from .constants import ER as ER
5
5
 
6
6
  class MySQLError(Exception): ...
7
7
  class Warning(builtins.Warning, MySQLError): ...
8
- class Error(MySQLError): ...
8
+
9
+ class Error(MySQLError):
10
+ sqlstate: str | None
11
+ def __init__(self, *args: object, sqlstate: str | None = None) -> None: ...
12
+
9
13
  class InterfaceError(Error): ...
10
14
  class DatabaseError(Error): ...
11
15
  class DataError(DatabaseError): ...
@@ -17,4 +21,4 @@ class NotSupportedError(DatabaseError): ...
17
21
 
18
22
  error_map: dict[int, type[DatabaseError]]
19
23
 
20
- def raise_mysql_exception(data: bytes | bytearray) -> NoReturn: ...
24
+ def raise_mysql_exception(data: bytes | bytearray) -> Never: ...
@@ -4,7 +4,7 @@ requires = ["setuptools>=82.0.1"]
4
4
 
5
5
  [project]
6
6
  name = "types-PyMySQL"
7
- version = "1.1.0.20260518"
7
+ version = "1.2.0.20260807"
8
8
  license = "Apache-2.0"
9
9
  license-files = ["LICENSE"]
10
10
  description = "Typing stubs for PyMySQL"
@@ -15,7 +15,7 @@ This is a [type stub package](https://typing.python.org/en/latest/tutorials/exte
15
15
  for the [`PyMySQL`](https://github.com/PyMySQL/PyMySQL) package. It can be used by type checkers
16
16
  to check code that uses `PyMySQL`. This version of
17
17
  `types-PyMySQL` aims to provide accurate annotations for
18
- `PyMySQL==1.1.*`.
18
+ `PyMySQL==1.2.*`.
19
19
 
20
20
  This package is part of the [typeshed project](https://github.com/python/typeshed).
21
21
  All fixes for types and metadata should be contributed there.
@@ -25,11 +25,12 @@ for more details. The source for this package can be found in the
25
25
  directory.
26
26
 
27
27
  This package was tested with the following type checkers:
28
- * [mypy](https://github.com/python/mypy/) 2.1.0
29
- * [pyright](https://github.com/microsoft/pyright) 1.1.409
28
+ * [mypy](https://github.com/python/mypy/) 2.3.0
29
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
30
+ * [ty](https://docs.astral.sh/ty/) 0.0.59
30
31
 
31
32
  It was generated from typeshed commit
32
- [`3402466d17144ed7edfc92940c6973167ba285af`](https://github.com/python/typeshed/commit/3402466d17144ed7edfc92940c6973167ba285af).
33
+ [`e0efbeef901e9b6998d016e1ab9352678f09ae77`](https://github.com/python/typeshed/commit/e0efbeef901e9b6998d016e1ab9352678f09ae77).
33
34
  """, content-type = "text/markdown" }
34
35
  classifiers = [
35
36
  "Programming Language :: Python :: 3",
@@ -38,6 +39,8 @@ classifiers = [
38
39
  requires-python = ">=3.10"
39
40
  dependencies = []
40
41
 
42
+
43
+
41
44
  [project.urls]
42
45
  "Homepage" = "https://github.com/python/typeshed"
43
46
  "GitHub" = "https://github.com/python/typeshed"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: types-PyMySQL
3
- Version: 1.1.0.20260518
3
+ Version: 1.2.0.20260807
4
4
  Summary: Typing stubs for PyMySQL
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/python/typeshed
@@ -21,7 +21,7 @@ This is a [type stub package](https://typing.python.org/en/latest/tutorials/exte
21
21
  for the [`PyMySQL`](https://github.com/PyMySQL/PyMySQL) package. It can be used by type checkers
22
22
  to check code that uses `PyMySQL`. This version of
23
23
  `types-PyMySQL` aims to provide accurate annotations for
24
- `PyMySQL==1.1.*`.
24
+ `PyMySQL==1.2.*`.
25
25
 
26
26
  This package is part of the [typeshed project](https://github.com/python/typeshed).
27
27
  All fixes for types and metadata should be contributed there.
@@ -31,8 +31,9 @@ for more details. The source for this package can be found in the
31
31
  directory.
32
32
 
33
33
  This package was tested with the following type checkers:
34
- * [mypy](https://github.com/python/mypy/) 2.1.0
35
- * [pyright](https://github.com/microsoft/pyright) 1.1.409
34
+ * [mypy](https://github.com/python/mypy/) 2.3.0
35
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
36
+ * [ty](https://docs.astral.sh/ty/) 0.0.59
36
37
 
37
38
  It was generated from typeshed commit
38
- [`3402466d17144ed7edfc92940c6973167ba285af`](https://github.com/python/typeshed/commit/3402466d17144ed7edfc92940c6973167ba285af).
39
+ [`e0efbeef901e9b6998d016e1ab9352678f09ae77`](https://github.com/python/typeshed/commit/e0efbeef901e9b6998d016e1ab9352678f09ae77).