Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mysqlclient for 
openSUSE:Factory checked in at 2024-02-09 23:51:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mysqlclient (Old)
 and      /work/SRC/openSUSE:Factory/.python-mysqlclient.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mysqlclient"

Fri Feb  9 23:51:57 2024 rev:20 rq:1145385 version:2.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-mysqlclient/python-mysqlclient.changes    
2023-12-17 21:29:08.066632319 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-mysqlclient.new.1815/python-mysqlclient.changes
  2024-02-09 23:52:14.422791948 +0100
@@ -1,0 +2,6 @@
+Fri Feb  9 10:37:44 UTC 2024 - Dirk Müller <[email protected]>
+
+- update to 2.2.4:
+  * Support ssl=True in connect().
+
+-------------------------------------------------------------------

Old:
----
  mysqlclient-2.2.1.tar.gz

New:
----
  mysqlclient-2.2.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-mysqlclient.spec ++++++
--- /var/tmp/diff_new_pack.R3yoam/_old  2024-02-09 23:52:15.110816740 +0100
+++ /var/tmp/diff_new_pack.R3yoam/_new  2024-02-09 23:52:15.114816884 +0100
@@ -1,7 +1,7 @@
 #
-# spec file
+# spec file for package python-mysqlclient
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,7 +27,7 @@
 %bcond_with test
 %endif
 Name:           python-mysqlclient%{psuffix}
-Version:        2.2.1
+Version:        2.2.4
 Release:        0
 Summary:        Python interface to MySQL
 License:        GPL-2.0-or-later

++++++ mysqlclient-2.2.1.tar.gz -> mysqlclient-2.2.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/HISTORY.rst 
new/mysqlclient-2.2.4/HISTORY.rst
--- old/mysqlclient-2.2.1/HISTORY.rst   2023-12-13 14:23:59.000000000 +0100
+++ new/mysqlclient-2.2.4/HISTORY.rst   2024-02-08 16:35:43.000000000 +0100
@@ -1,4 +1,36 @@
 ======================
+ What's new in 2.2.4
+======================
+
+Release: 2024-02-09
+
+* Support ``ssl=True`` in ``connect()``. (#700)
+  This makes better compatibility with PyMySQL and mysqlclient==2.2.1
+  with libmariadb. See #698 for detail.
+
+
+======================
+ What's new in 2.2.3
+======================
+
+Release: 2024-02-04
+
+* Fix ``Connection.kill()`` method that broken in 2.2.2. (#689)
+
+
+======================
+ What's new in 2.2.2
+======================
+
+Release: 2024-02-04
+
+* Support building with MySQL 8.3 (#688).
+* Deprecate ``db.shutdown()`` and ``db.kill()`` methods in docstring.
+  This is because ``mysql_shutdown()`` and ``mysql_kill()`` were removed in 
MySQL 8.3.
+  They will emit DeprecationWarning in the future but not for now.
+
+
+======================
  What's new in 2.2.1
 ======================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/PKG-INFO 
new/mysqlclient-2.2.4/PKG-INFO
--- old/mysqlclient-2.2.1/PKG-INFO      2023-12-13 14:30:34.741773000 +0100
+++ new/mysqlclient-2.2.4/PKG-INFO      2024-02-08 16:43:10.570814100 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: mysqlclient
-Version: 2.2.1
+Version: 2.2.4
 Summary: Python interface to MySQL
 Author-email: Inada Naoki <[email protected]>
 License: GNU General Public License v2 (GPLv2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/doc/user_guide.rst 
new/mysqlclient-2.2.4/doc/user_guide.rst
--- old/mysqlclient-2.2.1/doc/user_guide.rst    2023-12-13 14:23:59.000000000 
+0100
+++ new/mysqlclient-2.2.4/doc/user_guide.rst    2024-02-08 16:35:43.000000000 
+0100
@@ -14,7 +14,7 @@
 Installation
 ------------
 
-The ``README`` file has complete installation instructions.
+The `README <https://github.com/PyMySQL/mysqlclient/blob/main/README.md>`_ 
file has complete installation instructions.
 
 
 MySQLdb._mysql
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/src/MySQLdb/_mysql.c 
new/mysqlclient-2.2.4/src/MySQLdb/_mysql.c
--- old/mysqlclient-2.2.1/src/MySQLdb/_mysql.c  2023-12-13 14:23:59.000000000 
+0100
+++ new/mysqlclient-2.2.4/src/MySQLdb/_mysql.c  2024-02-08 16:35:43.000000000 
+0100
@@ -391,10 +391,10 @@
 };
 
 static int
-_get_ssl_mode_num(char *ssl_mode)
+_get_ssl_mode_num(const char *ssl_mode)
 {
-    static char *ssl_mode_list[] = { "DISABLED", "PREFERRED",
-                  "REQUIRED", "VERIFY_CA", "VERIFY_IDENTITY" };
+    static const char *ssl_mode_list[] = {
+        "DISABLED", "PREFERRED", "REQUIRED", "VERIFY_CA", "VERIFY_IDENTITY" };
     unsigned int i;
     for (i=0; i < sizeof(ssl_mode_list)/sizeof(ssl_mode_list[0]); i++) {
         if (strcmp(ssl_mode, ssl_mode_list[i]) == 0) {
@@ -414,7 +414,7 @@
     MYSQL *conn = NULL;
     PyObject *conv = NULL;
     PyObject *ssl = NULL;
-    char *ssl_mode = NULL;
+    const char *ssl_mode = NULL;
     const char *key = NULL, *cert = NULL, *ca = NULL,
          *capath = NULL, *cipher = NULL;
     PyObject *ssl_keepref[5] = {NULL};
@@ -437,7 +437,7 @@
     int read_timeout = 0;
     int write_timeout = 0;
     int compress = -1, named_pipe = -1, local_infile = -1;
-    int ssl_mode_num = SSLMODE_DISABLED;
+    int ssl_mode_num = SSLMODE_PREFERRED;
     char *init_command=NULL,
          *read_default_file=NULL,
          *read_default_group=NULL,
@@ -470,19 +470,31 @@
         if(t){d=PyUnicode_AsUTF8(t);ssl_keepref[n_ssl_keepref++]=t;}\
         PyErr_Clear();}
 
+    char ssl_mode_set = 0;
     if (ssl) {
-        PyObject *value = NULL;
-        _stringsuck(ca, value, ssl);
-        _stringsuck(capath, value, ssl);
-        _stringsuck(cert, value, ssl);
-        _stringsuck(key, value, ssl);
-        _stringsuck(cipher, value, ssl);
+        if (PyMapping_Check(ssl)) {
+            PyObject *value = NULL;
+            _stringsuck(ca, value, ssl);
+            _stringsuck(capath, value, ssl);
+            _stringsuck(cert, value, ssl);
+            _stringsuck(key, value, ssl);
+            _stringsuck(cipher, value, ssl);
+        } else if (PyObject_IsTrue(ssl)) {
+            // Support ssl=True from mysqlclient 2.2.4.
+            // for compatibility with PyMySQL and 
mysqlclient==2.2.1&libmariadb.
+            ssl_mode_num = SSLMODE_REQUIRED;
+            ssl_mode_set = 1;
+        } else {
+            ssl_mode_num = SSLMODE_DISABLED;
+            ssl_mode_set = 1;
+        }
     }
     if (ssl_mode) {
         if ((ssl_mode_num = _get_ssl_mode_num(ssl_mode)) <= 0) {
             PyErr_SetString(_mysql_NotSupportedError, "Unknown ssl_mode 
specification");
             return -1;
         }
+        ssl_mode_set = 1;
     }
 
     conn = mysql_init(&(self->connection));
@@ -524,9 +536,14 @@
         mysql_options(&(self->connection), MYSQL_OPT_LOCAL_INFILE, (char *) 
&local_infile);
 
     if (ssl) {
-        mysql_ssl_set(&(self->connection), key, cert, ca, capath, cipher);
+        mysql_options(&(self->connection), MYSQL_OPT_SSL_KEY, key);
+        mysql_options(&(self->connection), MYSQL_OPT_SSL_CERT, cert);
+        mysql_options(&(self->connection), MYSQL_OPT_SSL_CA, ca);
+        mysql_options(&(self->connection), MYSQL_OPT_SSL_CAPATH, capath);
+        mysql_options(&(self->connection), MYSQL_OPT_SSL_CIPHER, cipher);
     }
-    if (ssl_mode) {
+
+    if (ssl_mode_set) {
 #ifdef HAVE_ENUM_MYSQL_OPT_SSL_MODE
         mysql_options(&(self->connection), MYSQL_OPT_SSL_MODE, &ssl_mode_num);
 #else
@@ -1780,7 +1797,7 @@
 
 static char _mysql_ConnectionObject_kill__doc__[] =
 "Asks the server to kill the thread specified by pid.\n\
-Non-standard.";
+Non-standard. Deprecated.";
 
 static PyObject *
 _mysql_ConnectionObject_kill(
@@ -1789,10 +1806,12 @@
 {
     unsigned long pid;
     int r;
+    char query[50];
     if (!PyArg_ParseTuple(args, "k:kill", &pid)) return NULL;
     check_connection(self);
+    snprintf(query, 50, "KILL %lu", pid);
     Py_BEGIN_ALLOW_THREADS
-    r = mysql_kill(&(self->connection), pid);
+    r = mysql_query(&(self->connection), query);
     Py_END_ALLOW_THREADS
     if (r) return _mysql_Exception(self);
     Py_RETURN_NONE;
@@ -1997,7 +2016,7 @@
 
 static char _mysql_ConnectionObject_shutdown__doc__[] =
 "Asks the database server to shut down. The connected user must\n\
-have shutdown privileges. Non-standard.\n\
+have shutdown privileges. Non-standard. Deprecated.\n\
 ";
 
 static PyObject *
@@ -2008,7 +2027,7 @@
     int r;
     check_connection(self);
     Py_BEGIN_ALLOW_THREADS
-    r = mysql_shutdown(&(self->connection), SHUTDOWN_DEFAULT);
+    r = mysql_query(&(self->connection), "SHUTDOWN");
     Py_END_ALLOW_THREADS
     if (r) return _mysql_Exception(self);
     Py_RETURN_NONE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/src/MySQLdb/connections.py 
new/mysqlclient-2.2.4/src/MySQLdb/connections.py
--- old/mysqlclient-2.2.1/src/MySQLdb/connections.py    2023-12-13 
14:23:59.000000000 +0100
+++ new/mysqlclient-2.2.4/src/MySQLdb/connections.py    2024-02-08 
16:35:43.000000000 +0100
@@ -134,6 +134,8 @@
             see the MySQL documentation for more details
             (mysql_ssl_set()).  If this is set, and the client does not
             support SSL, NotSupportedError will be raised.
+            Since mysqlclient 2.2.4, ssl=True is alias of ssl_mode=REQUIRED
+            for better compatibility with PyMySQL and MariaDB.
 
         :param bool local_infile:
             enables LOAD LOCAL INFILE; zero disables
@@ -193,7 +195,9 @@
         super().__init__(*args, **kwargs2)
         self.cursorclass = cursorclass
         self.encoders = {
-            k: v for k, v in conv.items() if type(k) is not int  # noqa: E721
+            k: v
+            for k, v in conv.items()
+            if type(k) is not int  # noqa: E721
         }
 
         self._server_version = tuple(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/src/MySQLdb/release.py 
new/mysqlclient-2.2.4/src/MySQLdb/release.py
--- old/mysqlclient-2.2.1/src/MySQLdb/release.py        2023-12-13 
14:23:59.000000000 +0100
+++ new/mysqlclient-2.2.4/src/MySQLdb/release.py        2024-02-08 
16:35:43.000000000 +0100
@@ -1,3 +1,3 @@
 __author__ = "Inada Naoki <[email protected]>"
-__version__ = "2.2.1"
-version_info = (2, 2, 1, "final", 0)
+__version__ = "2.2.4"
+version_info = (2, 2, 4, "final", 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mysqlclient-2.2.1/src/mysqlclient.egg-info/PKG-INFO 
new/mysqlclient-2.2.4/src/mysqlclient.egg-info/PKG-INFO
--- old/mysqlclient-2.2.1/src/mysqlclient.egg-info/PKG-INFO     2023-12-13 
14:30:34.000000000 +0100
+++ new/mysqlclient-2.2.4/src/mysqlclient.egg-info/PKG-INFO     2024-02-08 
16:43:10.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: mysqlclient
-Version: 2.2.1
+Version: 2.2.4
 Summary: Python interface to MySQL
 Author-email: Inada Naoki <[email protected]>
 License: GNU General Public License v2 (GPLv2)

Reply via email to