mysqlclient 2.2.7__tar.gz → 2.2.8__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 (45) hide show
  1. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/HISTORY.rst +14 -0
  2. {mysqlclient-2.2.7/src/mysqlclient.egg-info → mysqlclient-2.2.8}/PKG-INFO +17 -7
  3. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/README.md +11 -0
  4. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/doc/user_guide.rst +11 -0
  5. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/pyproject.toml +3 -5
  6. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/_mysql.c +26 -5
  7. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/connections.py +7 -1
  8. mysqlclient-2.2.8/src/MySQLdb/release.py +3 -0
  9. {mysqlclient-2.2.7 → mysqlclient-2.2.8/src/mysqlclient.egg-info}/PKG-INFO +17 -7
  10. mysqlclient-2.2.7/src/MySQLdb/release.py +0 -3
  11. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/LICENSE +0 -0
  12. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/MANIFEST.in +0 -0
  13. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/doc/FAQ.rst +0 -0
  14. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/doc/MySQLdb.constants.rst +0 -0
  15. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/doc/MySQLdb.rst +0 -0
  16. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/doc/conf.py +0 -0
  17. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/doc/index.rst +0 -0
  18. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/setup.cfg +0 -0
  19. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/setup.py +0 -0
  20. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/site.cfg +0 -0
  21. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/__init__.py +0 -0
  22. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/_exceptions.py +0 -0
  23. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/constants/CLIENT.py +0 -0
  24. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/constants/CR.py +0 -0
  25. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/constants/ER.py +0 -0
  26. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/constants/FIELD_TYPE.py +0 -0
  27. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/constants/FLAG.py +0 -0
  28. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/constants/__init__.py +0 -0
  29. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/converters.py +0 -0
  30. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/cursors.py +0 -0
  31. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/MySQLdb/times.py +0 -0
  32. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/mysqlclient.egg-info/SOURCES.txt +0 -0
  33. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/mysqlclient.egg-info/dependency_links.txt +0 -0
  34. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/src/mysqlclient.egg-info/top_level.txt +0 -0
  35. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/capabilities.py +0 -0
  36. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/configdb.py +0 -0
  37. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/dbapi20.py +0 -0
  38. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_MySQLdb_capabilities.py +0 -0
  39. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_MySQLdb_dbapi20.py +0 -0
  40. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_MySQLdb_nonstandard.py +0 -0
  41. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_MySQLdb_times.py +0 -0
  42. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test__mysql.py +0 -0
  43. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_connection.py +0 -0
  44. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_cursor.py +0 -0
  45. {mysqlclient-2.2.7 → mysqlclient-2.2.8}/tests/test_errors.py +0 -0
@@ -1,3 +1,17 @@
1
+ ======================
2
+ What's new in 2.2.8
3
+ ======================
4
+
5
+ Release: 2026-02-10
6
+
7
+ * Add ``local_infile_dir`` option to restrict LOAD DATA LOCAL INFILE file path. (#755)
8
+ * windows wheel: Update mariadb-connector to 3.4.8 (#773)
9
+ * Add Python 3.14 and drop Python 3.8, 3.9 support. (#774)
10
+ * Experimental support for free threaded Python. Importing ``MySQLdb`` doesn't
11
+ enable the GIL anymore. This doesn't mean mysqlclient is thread safe.
12
+ You must not use same connection object from multiple threads concurrently. (#775)
13
+
14
+
1
15
  ======================
2
16
  What's new in 2.2.7
3
17
  ======================
@@ -1,15 +1,14 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: mysqlclient
3
- Version: 2.2.7
3
+ Version: 2.2.8
4
4
  Summary: Python interface to MySQL
5
5
  Author-email: Inada Naoki <songofacandy@gmail.com>
6
- License: GNU General Public License v2 or later (GPLv2+)
6
+ License-Expression: GPL-2.0-or-later
7
7
  Project-URL: Project, https://github.com/PyMySQL/mysqlclient
8
8
  Project-URL: Documentation, https://mysqlclient.readthedocs.io/
9
9
  Keywords: MySQL
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Other Environment
12
- Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
13
12
  Classifier: Operating System :: MacOS :: MacOS X
14
13
  Classifier: Operating System :: Microsoft :: Windows :: Windows NT/2000
15
14
  Classifier: Operating System :: OS Independent
@@ -19,17 +18,17 @@ Classifier: Operating System :: Unix
19
18
  Classifier: Programming Language :: C
20
19
  Classifier: Programming Language :: Python
21
20
  Classifier: Programming Language :: Python :: 3
22
- Classifier: Programming Language :: Python :: 3.8
23
- Classifier: Programming Language :: Python :: 3.9
24
21
  Classifier: Programming Language :: Python :: 3.10
25
22
  Classifier: Programming Language :: Python :: 3.11
26
23
  Classifier: Programming Language :: Python :: 3.12
27
24
  Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
28
26
  Classifier: Topic :: Database
29
27
  Classifier: Topic :: Database :: Database Engines/Servers
30
- Requires-Python: >=3.8
28
+ Requires-Python: >=3.10
31
29
  Description-Content-Type: text/markdown
32
30
  License-File: LICENSE
31
+ Dynamic: license-file
33
32
 
34
33
  # mysqlclient
35
34
 
@@ -54,6 +53,17 @@ Or when you have question about MySQL/MariaDB:
54
53
  * [MySQL Support](https://dev.mysql.com/support/)
55
54
  * [Getting Help With MariaDB](https://mariadb.com/kb/en/getting-help-with-mariadb/)
56
55
 
56
+ ## Free threading Python
57
+
58
+ > [!NOTE]
59
+ > The support for Free threading Python is experimental.
60
+
61
+ Since v2.2.8, free threading is supported when importing the extension module. Therefore, importing MySQLdb does not acquire GIL.
62
+
63
+ However, this library does not support simultaneous operations on a single Connection object from multiple threads, regardless of free threading, and the behavior in such cases remains undefined.
64
+
65
+ > [!WARNING]
66
+ > Do not use a single Connection object from multiple threads simultaneously.
57
67
 
58
68
  ## Install
59
69
 
@@ -21,6 +21,17 @@ Or when you have question about MySQL/MariaDB:
21
21
  * [MySQL Support](https://dev.mysql.com/support/)
22
22
  * [Getting Help With MariaDB](https://mariadb.com/kb/en/getting-help-with-mariadb/)
23
23
 
24
+ ## Free threading Python
25
+
26
+ > [!NOTE]
27
+ > The support for Free threading Python is experimental.
28
+
29
+ Since v2.2.8, free threading is supported when importing the extension module. Therefore, importing MySQLdb does not acquire GIL.
30
+
31
+ However, this library does not support simultaneous operations on a single Connection object from multiple threads, regardless of free threading, and the behavior in such cases remains undefined.
32
+
33
+ > [!WARNING]
34
+ > Do not use a single Connection object from multiple threads simultaneously.
24
35
 
25
36
  ## Install
26
37
 
@@ -396,6 +396,17 @@ connect(parameters...)
396
396
  server_public_key_path
397
397
  specifies path to a RSA public key used by caching sha2 password authentication.
398
398
  See https://dev.mysql.com/doc/refman/9.0/en/caching-sha2-pluggable-authentication.html
399
+
400
+ local_infile
401
+ sets ``MYSQL_OPT_LOCAL_INFILE`` in ``mysql_options()`` enabling LOAD LOCAL INFILE from any path; zero disables;
402
+
403
+ *This must be a keyword parameter.*
404
+
405
+ local_infile_dir
406
+ sets ``MYSQL_OPT_LOAD_DATA_LOCAL_DIR`` in ``mysql_options()`` enabling LOAD LOCAL INFILE from any path;
407
+ if ``local_infile`` is set to ``True`` then this is ignored;
408
+
409
+ *This must be a keyword parameter.*
399
410
 
400
411
  .. _mysql_ssl_set: http://dev.mysql.com/doc/refman/en/mysql-ssl-set.html
401
412
 
@@ -2,16 +2,15 @@
2
2
  name = "mysqlclient"
3
3
  description = "Python interface to MySQL"
4
4
  readme = "README.md"
5
- requires-python = ">=3.8"
5
+ requires-python = ">=3.10"
6
6
  authors = [
7
7
  {name = "Inada Naoki", email = "songofacandy@gmail.com"}
8
8
  ]
9
- license = {text = "GNU General Public License v2 or later (GPLv2+)"}
9
+ license = "GPL-2.0-or-later"
10
10
  keywords = ["MySQL"]
11
11
  classifiers = [
12
12
  "Development Status :: 5 - Production/Stable",
13
13
  "Environment :: Other Environment",
14
- "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
15
14
  "Operating System :: MacOS :: MacOS X",
16
15
  "Operating System :: Microsoft :: Windows :: Windows NT/2000",
17
16
  "Operating System :: OS Independent",
@@ -21,12 +20,11 @@ classifiers = [
21
20
  "Programming Language :: C",
22
21
  "Programming Language :: Python",
23
22
  "Programming Language :: Python :: 3",
24
- "Programming Language :: Python :: 3.8",
25
- "Programming Language :: Python :: 3.9",
26
23
  "Programming Language :: Python :: 3.10",
27
24
  "Programming Language :: Python :: 3.11",
28
25
  "Programming Language :: Python :: 3.12",
29
26
  "Programming Language :: Python :: 3.13",
27
+ "Programming Language :: Python :: 3.14",
30
28
  "Topic :: Database",
31
29
  "Topic :: Database :: Database Engines/Servers",
32
30
  ]
@@ -48,6 +48,10 @@ PERFORMANCE OF THIS SOFTWARE.
48
48
  #define HAVE_MYSQL_SERVER_PUBLIC_KEY
49
49
  #endif
50
50
 
51
+ #if !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 80021
52
+ #define HAVE_MYSQL_OPT_LOCAL_INFILE_DIR
53
+ #endif
54
+
51
55
  #define PY_SSIZE_T_CLEAN 1
52
56
  #include "Python.h"
53
57
 
@@ -436,7 +440,7 @@ _mysql_ConnectionObject_Initialize(
436
440
  "client_flag", "ssl", "ssl_mode",
437
441
  "local_infile",
438
442
  "read_timeout", "write_timeout", "charset",
439
- "auth_plugin", "server_public_key_path",
443
+ "auth_plugin", "server_public_key_path", "local_infile_dir",
440
444
  NULL } ;
441
445
  int connect_timeout = 0;
442
446
  int read_timeout = 0;
@@ -448,14 +452,15 @@ _mysql_ConnectionObject_Initialize(
448
452
  *read_default_group=NULL,
449
453
  *charset=NULL,
450
454
  *auth_plugin=NULL,
451
- *server_public_key_path=NULL;
455
+ *server_public_key_path=NULL,
456
+ *local_infile_dir=NULL;
452
457
 
453
458
  self->converter = NULL;
454
459
  self->open = false;
455
460
  self->reconnect = false;
456
461
 
457
462
  if (!PyArg_ParseTupleAndKeywords(args, kwargs,
458
- "|ssssisOiiisssiOsiiisss:connect",
463
+ "|ssssisOiiisssiOsiiissss:connect",
459
464
  kwlist,
460
465
  &host, &user, &passwd, &db,
461
466
  &port, &unix_socket, &conv,
@@ -469,7 +474,8 @@ _mysql_ConnectionObject_Initialize(
469
474
  &write_timeout,
470
475
  &charset,
471
476
  &auth_plugin,
472
- &server_public_key_path
477
+ &server_public_key_path,
478
+ &local_infile_dir
473
479
  ))
474
480
  return -1;
475
481
 
@@ -479,6 +485,13 @@ _mysql_ConnectionObject_Initialize(
479
485
  return -1;
480
486
  }
481
487
  #endif
488
+
489
+ #ifndef HAVE_MYSQL_OPT_LOCAL_INFILE_DIR
490
+ if (local_infile_dir) {
491
+ PyErr_SetString(_mysql_NotSupportedError, "local_infile_dir is not supported");
492
+ return -1;
493
+ }
494
+ #endif
482
495
  // For compatibility with PyPy, we need to keep strong reference
483
496
  // to unicode objects until we use UTF8.
484
497
  #define _stringsuck(d,t,s) {t=PyMapping_GetItemString(s,#d);\
@@ -599,6 +612,12 @@ _mysql_ConnectionObject_Initialize(
599
612
  }
600
613
  #endif
601
614
 
615
+ #ifdef HAVE_MYSQL_OPT_LOCAL_INFILE_DIR
616
+ if (local_infile_dir) {
617
+ mysql_options(&(self->connection), MYSQL_OPT_LOAD_DATA_LOCAL_DIR, local_infile_dir);
618
+ }
619
+ #endif
620
+
602
621
  Py_BEGIN_ALLOW_THREADS
603
622
  conn = mysql_real_connect(&(self->connection), host, user, passwd, db,
604
623
  port, unix_socket, client_flag);
@@ -2892,7 +2911,9 @@ PyInit__mysql(void)
2892
2911
 
2893
2912
  module = PyModule_Create(&_mysqlmodule);
2894
2913
  if (!module) return module; /* this really should never happen */
2895
-
2914
+ #ifdef Py_GIL_DISABLED
2915
+ PyUnstable_Module_SetGIL(module, Py_MOD_GIL_NOT_USED);
2916
+ #endif
2896
2917
  if (!(dict = PyModule_GetDict(module))) goto error;
2897
2918
  if (PyDict_SetItemString(dict, "version_info",
2898
2919
  PyRun_String(QUOTE(version_info), Py_eval_input,
@@ -142,7 +142,13 @@ class Connection(_mysql.connection):
142
142
  See https://dev.mysql.com/doc/refman/9.0/en/caching-sha2-pluggable-authentication.html
143
143
 
144
144
  :param bool local_infile:
145
- enables LOAD LOCAL INFILE; zero disables
145
+ sets ``MYSQL_OPT_LOCAL_INFILE`` in ``mysql_options()`` enabling LOAD LOCAL INFILE from any path; zero disables;
146
+
147
+ :param str local_infile_dir:
148
+ sets ``MYSQL_OPT_LOAD_DATA_LOCAL_DIR`` in ``mysql_options()`` enabling LOAD LOCAL INFILE from any path;
149
+ if ``local_infile`` is set to ``True`` then this is ignored;
150
+
151
+ supported for mysql version >= 8.0.21
146
152
 
147
153
  :param bool autocommit:
148
154
  If False (default), autocommit is disabled.
@@ -0,0 +1,3 @@
1
+ __author__ = "Inada Naoki <songofacandy@gmail.com>"
2
+ __version__ = "2.2.8"
3
+ version_info = (2, 2, 8, "final", 0)
@@ -1,15 +1,14 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: mysqlclient
3
- Version: 2.2.7
3
+ Version: 2.2.8
4
4
  Summary: Python interface to MySQL
5
5
  Author-email: Inada Naoki <songofacandy@gmail.com>
6
- License: GNU General Public License v2 or later (GPLv2+)
6
+ License-Expression: GPL-2.0-or-later
7
7
  Project-URL: Project, https://github.com/PyMySQL/mysqlclient
8
8
  Project-URL: Documentation, https://mysqlclient.readthedocs.io/
9
9
  Keywords: MySQL
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Other Environment
12
- Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
13
12
  Classifier: Operating System :: MacOS :: MacOS X
14
13
  Classifier: Operating System :: Microsoft :: Windows :: Windows NT/2000
15
14
  Classifier: Operating System :: OS Independent
@@ -19,17 +18,17 @@ Classifier: Operating System :: Unix
19
18
  Classifier: Programming Language :: C
20
19
  Classifier: Programming Language :: Python
21
20
  Classifier: Programming Language :: Python :: 3
22
- Classifier: Programming Language :: Python :: 3.8
23
- Classifier: Programming Language :: Python :: 3.9
24
21
  Classifier: Programming Language :: Python :: 3.10
25
22
  Classifier: Programming Language :: Python :: 3.11
26
23
  Classifier: Programming Language :: Python :: 3.12
27
24
  Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Programming Language :: Python :: 3.14
28
26
  Classifier: Topic :: Database
29
27
  Classifier: Topic :: Database :: Database Engines/Servers
30
- Requires-Python: >=3.8
28
+ Requires-Python: >=3.10
31
29
  Description-Content-Type: text/markdown
32
30
  License-File: LICENSE
31
+ Dynamic: license-file
33
32
 
34
33
  # mysqlclient
35
34
 
@@ -54,6 +53,17 @@ Or when you have question about MySQL/MariaDB:
54
53
  * [MySQL Support](https://dev.mysql.com/support/)
55
54
  * [Getting Help With MariaDB](https://mariadb.com/kb/en/getting-help-with-mariadb/)
56
55
 
56
+ ## Free threading Python
57
+
58
+ > [!NOTE]
59
+ > The support for Free threading Python is experimental.
60
+
61
+ Since v2.2.8, free threading is supported when importing the extension module. Therefore, importing MySQLdb does not acquire GIL.
62
+
63
+ However, this library does not support simultaneous operations on a single Connection object from multiple threads, regardless of free threading, and the behavior in such cases remains undefined.
64
+
65
+ > [!WARNING]
66
+ > Do not use a single Connection object from multiple threads simultaneously.
57
67
 
58
68
  ## Install
59
69
 
@@ -1,3 +0,0 @@
1
- __author__ = "Inada Naoki <songofacandy@gmail.com>"
2
- __version__ = "2.2.7"
3
- version_info = (2, 2, 7, "final", 0)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes