types-PyMySQL 1.1.0.20260508__tar.gz → 1.2.0.20260724__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.20260508 → types_pymysql-1.2.0.20260724}/CHANGELOG.md +12 -0
  2. {types_pymysql-1.1.0.20260508/types_PyMySQL.egg-info → types_pymysql-1.2.0.20260724}/PKG-INFO +5 -5
  3. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/README.md +4 -4
  4. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/METADATA.toml +1 -1
  5. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/connections.pyi +61 -5
  6. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/converters.pyi +3 -3
  7. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/err.pyi +7 -3
  8. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pyproject.toml +5 -5
  9. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724/types_PyMySQL.egg-info}/PKG-INFO +5 -5
  10. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/LICENSE +0 -0
  11. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/MANIFEST.in +0 -0
  12. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/__init__.pyi +0 -0
  13. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/_auth.pyi +0 -0
  14. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/charset.pyi +0 -0
  15. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/CLIENT.pyi +0 -0
  16. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/COMMAND.pyi +0 -0
  17. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/CR.pyi +0 -0
  18. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/ER.pyi +0 -0
  19. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/FIELD_TYPE.pyi +0 -0
  20. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/FLAG.pyi +0 -0
  21. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/SERVER_STATUS.pyi +0 -0
  22. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/constants/__init__.pyi +0 -0
  23. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/cursors.pyi +0 -0
  24. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/optionfile.pyi +0 -0
  25. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/protocol.pyi +0 -0
  26. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/py.typed +0 -0
  27. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/pymysql-stubs/times.pyi +0 -0
  28. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/setup.cfg +0 -0
  29. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/types_PyMySQL.egg-info/SOURCES.txt +0 -0
  30. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/types_PyMySQL.egg-info/dependency_links.txt +0 -0
  31. {types_pymysql-1.1.0.20260508 → types_pymysql-1.2.0.20260724}/types_PyMySQL.egg-info/top_level.txt +0 -0
@@ -1,3 +1,15 @@
1
+ ## [1.2.0.20260724](https://pypi.org/project/types-PyMySQL/1.2.0.20260724/) (2026-07-24)
2
+
3
+ * Replace `NoReturn` with `Never` ([#16079](https://github.com/python/typeshed/pull/16079))
4
+
5
+ ## [1.2.0.20260722](https://pypi.org/project/types-PyMySQL/1.2.0.20260722/) (2026-07-22)
6
+
7
+ * Update to 1.2.* ([#16053](https://github.com/python/typeshed/pull/16053))
8
+
9
+ ## 1.1.0.20260518 (2026-05-18)
10
+
11
+ Upgrade black to 26.5.0 ([#15801](https://github.com/python/typeshed/pull/15801))
12
+
1
13
  ## 1.1.0.20260508 (2026-05-08)
2
14
 
3
15
  Import some items from typing instead of typing_extensions ([#15711](https://github.com/python/typeshed/pull/15711))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: types-PyMySQL
3
- Version: 1.1.0.20260508
3
+ Version: 1.2.0.20260724
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,8 @@ 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/) 1.20.0
35
- * [pyright](https://github.com/microsoft/pyright) 1.1.408
34
+ * [mypy](https://github.com/python/mypy/) 2.3.0
35
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
36
36
 
37
37
  It was generated from typeshed commit
38
- [`a7f0a8286aaf594602b81bef79c77175fcf9ceda`](https://github.com/python/typeshed/commit/a7f0a8286aaf594602b81bef79c77175fcf9ceda).
38
+ [`97e83f65cee88c0c978fa34668d9f59b8c362fce`](https://github.com/python/typeshed/commit/97e83f65cee88c0c978fa34668d9f59b8c362fce).
@@ -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,8 @@ 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/) 1.20.0
18
- * [pyright](https://github.com/microsoft/pyright) 1.1.408
17
+ * [mypy](https://github.com/python/mypy/) 2.3.0
18
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
19
19
 
20
20
  It was generated from typeshed commit
21
- [`a7f0a8286aaf594602b81bef79c77175fcf9ceda`](https://github.com/python/typeshed/commit/a7f0a8286aaf594602b81bef79c77175fcf9ceda).
21
+ [`97e83f65cee88c0c978fa34668d9f59b8c362fce`](https://github.com/python/typeshed/commit/97e83f65cee88c0c978fa34668d9f59b8c362fce).
@@ -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,
@@ -152,6 +199,7 @@ class Connection(Generic[_C]):
152
199
  passwd: str | bytes | None = None, # deprecated
153
200
  db: str | bytes | None = None, # deprecated
154
201
  ) -> None: ...
202
+
155
203
  def close(self) -> None: ...
156
204
  @property
157
205
  def open(self) -> bool: ...
@@ -165,16 +213,24 @@ class Connection(Generic[_C]):
165
213
  def escape(self, obj, mapping: Mapping[str, Incomplete] | None = None): ...
166
214
  def literal(self, obj): ...
167
215
  def escape_string(self, s: AnyStr) -> AnyStr: ...
216
+
168
217
  @overload
169
218
  def cursor(self, cursor: None = None) -> _C: ...
170
219
  @overload
171
220
  def cursor(self, cursor: type[_C2]) -> _C2: ...
221
+
172
222
  def query(self, sql, unbuffered: bool = False) -> int: ...
173
223
  def next_result(self, unbuffered: bool = False) -> int: ...
174
224
  def affected_rows(self): ...
175
225
  def kill(self, thread_id): ...
176
- def ping(self, reconnect: bool = True) -> None: ...
177
- @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.")
178
234
  def set_charset(self, charset: str) -> None: ...
179
235
  def set_character_set(self, charset: str, collation: str | None = None) -> None: ...
180
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: ...
@@ -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.20260508"
7
+ version = "1.2.0.20260724"
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,11 @@ 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/) 1.20.0
29
- * [pyright](https://github.com/microsoft/pyright) 1.1.408
28
+ * [mypy](https://github.com/python/mypy/) 2.3.0
29
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
30
30
 
31
31
  It was generated from typeshed commit
32
- [`a7f0a8286aaf594602b81bef79c77175fcf9ceda`](https://github.com/python/typeshed/commit/a7f0a8286aaf594602b81bef79c77175fcf9ceda).
32
+ [`97e83f65cee88c0c978fa34668d9f59b8c362fce`](https://github.com/python/typeshed/commit/97e83f65cee88c0c978fa34668d9f59b8c362fce).
33
33
  """, content-type = "text/markdown" }
34
34
  classifiers = [
35
35
  "Programming Language :: Python :: 3",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: types-PyMySQL
3
- Version: 1.1.0.20260508
3
+ Version: 1.2.0.20260724
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,8 @@ 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/) 1.20.0
35
- * [pyright](https://github.com/microsoft/pyright) 1.1.408
34
+ * [mypy](https://github.com/python/mypy/) 2.3.0
35
+ * [pyright](https://github.com/microsoft/pyright) 1.1.411
36
36
 
37
37
  It was generated from typeshed commit
38
- [`a7f0a8286aaf594602b81bef79c77175fcf9ceda`](https://github.com/python/typeshed/commit/a7f0a8286aaf594602b81bef79c77175fcf9ceda).
38
+ [`97e83f65cee88c0c978fa34668d9f59b8c362fce`](https://github.com/python/typeshed/commit/97e83f65cee88c0c978fa34668d9f59b8c362fce).