15
0

Accepting request 672904 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/672904
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mysqlclient?expand=0&rev=3
This commit is contained in:
2019-02-11 20:24:46 +00:00
committed by Git OBS Bridge
5 changed files with 14 additions and 51 deletions

View File

@@ -1,41 +0,0 @@
diff -ruN mysqlclient-1.3.13.orig/_mysql.c mysqlclient-1.3.13/_mysql.c
--- mysqlclient-1.3.13.orig/_mysql.c 2017-12-21 14:09:51.000000000 +0300
+++ mysqlclient-1.3.13/_mysql.c 2018-06-28 01:04:11.433787292 +0300
@@ -225,7 +225,7 @@
PyObject *kwargs) {
static char *kwlist[] = {"args", "groups", NULL};
char **cmd_args_c=NULL, **groups_c=NULL, *s;
- int cmd_argc=0, i, groupc;
+ Py_ssize_t cmd_argc=0, i, groupc;
PyObject *cmd_args=NULL, *groups=NULL, *ret=NULL, *item;
if (_mysql_server_init_done) {
@@ -249,6 +249,10 @@
PyErr_SetString(PyExc_TypeError,
"args could not be sized");
goto finish;
+ } else if (cmd_argc > INT_MAX) {
+ PyErr_SetString(PyExc_ValueError,
+ "more than INT_MAX args, this is unsupported");
+ goto finish;
}
cmd_args_c = (char **) PyMem_Malloc(cmd_argc*sizeof(char *));
for (i=0; i< cmd_argc; i++) {
@@ -415,7 +419,7 @@
else if (PySequence_Check(fun)) {
long flags = fields[i].flags;
PyObject *fun2=NULL;
- int j, n2=PySequence_Size(fun);
+ Py_ssize_t j, n2=PySequence_Size(fun);
if (fields[i].charsetnr != 63) { /* maaagic */
flags &= ~BINARY_FLAG;
}
@@ -1181,7 +1185,7 @@
PyObject *args)
{
PyObject *o=NULL, *d=NULL, *r=NULL, *item, *quoted;
- int i, n;
+ Py_ssize_t i, n;
if (!PyArg_ParseTuple(args, "OO:escape_sequence", &o, &d))
goto error;
if (!PyMapping_Check(d)) {

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3981ae9ce545901a36a8b7aed76ed02960a429f75dc53b7ad77fb2f9ab7cd56b
size 91391

3
mysqlclient-1.4.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b95edaa41d6cc47deecabcdcbb5ab437ad9ae6d8955f5cf10d1847b37e66ef5e
size 85634

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Feb 8 23:12:28 UTC 2019 - Alexei Podvalsky <avvissu@yandex.by>
- Update to 1.4.2:
* Fix Django 1.11 compatibility.
- Drop MySQL-python-Py_ssize.patch
-------------------------------------------------------------------
Mon Dec 10 11:39:10 UTC 2018 - Alexei Podvalsky <avvissu@yandex.by>
@@ -5,7 +12,7 @@ Mon Dec 10 11:39:10 UTC 2018 - Alexei Podvalsky <avvissu@yandex.by>
* Support static linking of MariaDB Connector/C (#265)
* Better converter for Decimal and Float (#267, #268, #273, #286)
* Add Connection._get_native_connection for XTA project (#269)
* Fix SEGV on MariaDB Connector/C when Connection.close() is called
* Fix SEGV on MariaDB Connector/C when Connection.close() is called
for closed connection. (#270, #272, #276)
* Fix Connection.client_flag (#266)
* Fix SSCursor may raise same exception twice (#282)
@@ -58,7 +65,7 @@ Mon Sep 20 11:51:54 UTC 2010 - coolo@novell.com
Thu Sep 16 08:11:10 UTC 2010 - coolo@novell.com
- update to 1.2.3
- no upstream changelog available
- no upstream changelog available
- taking out the reconnect patch as the upstream sources contain
a very specific comment that this means trouble
@@ -172,7 +179,7 @@ Wed Jan 22 14:36:52 CET 2003 - mcihar@suse.cz
-------------------------------------------------------------------
Tue Jan 15 18:06:17 CET 2002 - ro@suse.de
- up to 0.9.1 to make it build on python-2.2
- up to 0.9.1 to make it build on python-2.2
-------------------------------------------------------------------
Sat Dec 29 22:07:39 CET 2001 - schwab@suse.de
@@ -184,4 +191,3 @@ Thu Nov 1 16:02:14 CET 2001 - vinil@suse.cz
- initial version 0.9.0

View File

@@ -19,14 +19,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-mysqlclient
Version: 1.3.14
Version: 1.4.2
Release: 0
Summary: Python interface to MySQL
License: GPL-2.0-or-later
Group: Development/Languages/Python
URL: https://github.com/PyMySQL/mysqlclient-python
Source: https://files.pythonhosted.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz
Patch0: MySQL-python-Py_ssize.patch
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
@@ -55,7 +54,6 @@ This package adds Python 3 support and bug fixes to MySQLdb1.
%prep
%setup -q -n mysqlclient-%{version}
%patch0 -p1
%build
%python_build