Sync from SUSE:SLFO:Main python-mysqlclient revision 707ebdd05a8eec41a616c07a499cf403

This commit is contained in:
Adrian Schröter 2024-05-03 21:34:59 +02:00
commit db2c1dbee1
5 changed files with 463 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

BIN
mysqlclient-2.1.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

316
python-mysqlclient.changes Normal file
View File

@ -0,0 +1,316 @@
-------------------------------------------------------------------
Wed May 3 11:10:33 UTC 2023 - Martin Liška <mliska@suse.cz>
- Use sphinx-build and do not depend on removed build_sphinx
in Sphinx 7.0 (boo#1211051).
-------------------------------------------------------------------
Sat Sep 24 10:58:20 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2.1.1:
* Fix qualname of exception classes.
* Fix range check in ``MySQLdb._mysql.result.fetch_row()``. Invalid ``how``
argument caused SEGV.
* Fix docstring of ``_mysql.connect``.
* Windows: Binary wheels are updated.
* Use MariaDB Connector/C 3.3.1.
* Use cibuildwheel to build wheels.
* Python 3.8-3.11
-------------------------------------------------------------------
Thu Mar 24 13:10:53 UTC 2022 - pgajdos@suse.com
- version update to 2.1.0
* Add ``multistatement=True`` option. You can disable multi statement. (#500).
* Remove unnecessary bytes encoder which is remained for Django 1.11
compatibility (#490).
* Deprecate ``passwd`` and ``db`` keyword. Use ``password`` and ``database``
instead. (#488).
* Windows: Binary wheels are built with MariaDB Connector/C 3.2.4. (#508)
* ``set_character_set()`` sends ``SET NAMES`` query always. This means
all new connections send it too. This solves compatibility issues
when server and client library are different version. (#509)
* Remove ``escape()`` and ``escape_string()`` from ``MySQLdb`` package.
(#511)
* Add Python 3.10 support and drop Python 3.5 support.
- deleted patches
- liberally-accept-charsets.patch (upstreamed)
-------------------------------------------------------------------
Fri Sep 10 07:48:36 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Add liberally-accept-charsets.patch:
* Support multibyte utf8 return values with new versions of MariaDB.
-------------------------------------------------------------------
Tue Mar 16 20:42:57 UTC 2021 - Matthias Fehring <buschmann23@opensuse.org>
- Update to 2.0.3:
* Add -std=c99 option to cflags by default for ancient compilers
that doesn't accept C99 by default.
* You can customize cflags and ldflags by setting MYSQLCLIENT_CFLAGS
and MYSQLCLIENT_LDFLAGS. It overrides mysql_config.
- Change in 2.0.2:
* Optimize fetching many rows with DictCursor.
- Change in 2.0.1:
* Fixed multithread safety issue in fetching row.
* Removed obsolete members from Cursor. (e.g. messages, _warnings,
_last_executed)
- Change in 2.0.0:
* Dropped Python 2 support
* Dropped Django 1.11 support
* Add context manager interface to Connection which closes the
connection on __exit__.
* Add ssl_mode option.
-------------------------------------------------------------------
Thu Jun 4 07:18:37 UTC 2020 - pgajdos@suse.com
- do mysql shutdown even if testsuite fails, exit 1 afterwards
-------------------------------------------------------------------
Thu Mar 5 13:33:30 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>
- fix test package by adding BuildRequires: %{python_module mysqlclient
>= %{version}}
-------------------------------------------------------------------
Fri Feb 21 10:04:38 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>
- switch to multibuild to run tests and avoid a buildcycle with
mariadb
-------------------------------------------------------------------
Tue Feb 11 16:02:55 UTC 2020 - pgajdos@suse.com
- %check: choose better database user name
-------------------------------------------------------------------
Mon Dec 9 20:22:50 UTC 2019 - pgajdos@suse.com
- run the testsuite against test mysqld server
-------------------------------------------------------------------
Fri Nov 22 17:31:43 UTC 2019 - Alexei Podvalsky <avvissu@yandex.by>
- Update to 1.4.6:
* The cp1252 encoding is used when charset is "latin1". (#390)
- Change in 1.4.5:
* The auth_plugin option is added. (#389)
-------------------------------------------------------------------
Thu Aug 15 19:25:35 UTC 2019 - Alexei Podvalsky <avvissu@yandex.by>
- Update to 1.4.4:
* charset option is passed to mysql_options(mysql, MYSQL_SET_CHARSET_NAME,
charset) before mysql_real_connect is called. This avoid extra
SET NAMES <charset> query when creating connection.
- Change in 1.4.3:
* --static build supports libmariadbclient.a
* Try mariadb_config when mysql_config is not found
* Fixed warning happend in Python 3.8 (#359)
* Fixed from MySQLdb import *, while I don't recommend it. (#369)
* Fixed SEGV MySQLdb.escape_string("1") when libmariadb is used and
no connection is created. (#367)
* Fixed many circular references are created in Cursor.executemany().
- Add python3-attrs to build
-------------------------------------------------------------------
Thu Jun 6 14:30:26 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Generate documentation only with sphinx3 no need to do it
twice
-------------------------------------------------------------------
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>
- Update to 1.3.14:
* 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
for closed connection. (#270, #272, #276)
* Fix Connection.client_flag (#266)
* Fix SSCursor may raise same exception twice (#282)
* Fixed SSL support is not detected when built with MySQL < 5.1 (#291)
-------------------------------------------------------------------
Sat Jun 30 11:35:55 UTC 2018 - avvissu@yandex.by
- Add obsoletes/provides with "python-" prefix (oldpython macro)
- Fix build on openSUSE 42.3 (rename: libmariadb-devel to
libmysqlclient-devel)
-------------------------------------------------------------------
Wed Jun 27 22:44:56 UTC 2018 - avvissu@yandex.by
- Switch to fork of MySQLdb1
- Update a package description
- Build with python3 and python2 (singlespec)
- Mark obsolete packages: python-mysql, python-MySQL-python
- Spec file cleanup
-------------------------------------------------------------------
Fri Jul 24 20:41:53 UTC 2015 - seife+obs@b1-systems.com
- Fix build on non-SUSE distros by conditionalizing Recommends: tag
-------------------------------------------------------------------
Sun Dec 8 15:23:42 UTC 2013 - p.drouand@gmail.com
- Update to version 1.2.4
+ No changelog available
- Set correct Group : Development/Languages/Python
- Use download Url as source
- Spec file general clean-up
- Add MySQL-python-1.2.4-dont-use-python-distribute.patch; don't try
to use unavailable python-distribute
- Remove depreciate AutoReqProv, %{py_requires} and # norootforbuild tags
- Add unzip requirement to support tarball format
- Add python-Sphinx requirement and generate html documentation
- Remove --record-rpm=INSTALLED_FILES option and add %{python_sitearch}
in %files instead
- Package GPL-2.0, HISTORY and Sphinx documentation
-------------------------------------------------------------------
Mon Sep 20 11:51:54 UTC 2010 - coolo@novell.com
- fix the previous fix, patch went upstream
-------------------------------------------------------------------
Thu Sep 16 08:11:10 UTC 2010 - coolo@novell.com
- update to 1.2.3
- no upstream changelog available
- taking out the reconnect patch as the upstream sources contain
a very specific comment that this means trouble
-------------------------------------------------------------------
Fri Jan 16 14:57:21 CET 2009 - matejcik@suse.cz
- removed usage of deprecated sets module (bnc#462974)
-------------------------------------------------------------------
Thu Dec 13 17:30:49 CET 2007 - matejcik@suse.cz
- update to 1.2.2
- various bugfixes
- much better support for mysql5
- python2.5 support (crude, though, let's keep our patch for a while)
- switch from distutils to setuptools
- added patch supporting reconnect in mysql5
-------------------------------------------------------------------
Fri Oct 20 15:57:22 CEST 2006 - jmatejek@suse.cz
- update to 1.2.1_p2
- support for some new features of mysql 4.1 and 5.0
- fixes for 64bit bugs due to PEP353
-------------------------------------------------------------------
Tue Feb 28 16:46:03 CET 2006 - jmatejek@suse.cz
- updated to reflect python changes due to #149809
-------------------------------------------------------------------
Wed Jan 25 21:40:49 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Feb 9 17:55:05 CET 2005 - mcihar@suse.cz
- update to 1.2.0
-------------------------------------------------------------------
Fri Jan 28 18:08:31 CET 2005 - mcihar@suse.cz
- update to 1.1.9 (MySQL 4.1 support)
-------------------------------------------------------------------
Wed Aug 04 15:26:35 CEST 2004 - mcihar@suse.cz
- updated to 1.1.1
-------------------------------------------------------------------
Wed May 19 17:46:23 CEST 2004 - mcihar@suse.cz
- fixed lib64 build
-------------------------------------------------------------------
Wed May 19 15:28:22 CEST 2004 - mcihar@suse.cz
- update to 1.1.0
-------------------------------------------------------------------
Tue Mar 02 18:33:06 CET 2004 - mcihar@suse.cz
- drop python 2.1 support
-------------------------------------------------------------------
Sun Jan 11 10:28:35 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Tue Dec 16 15:23:22 CET 2003 - mcihar@suse.cz
- updated to 0.9.3a2:
* Add some support for Python 2.3 datetime classes.
* Removed some casts in _mysql_init() that caused problems with
Python 2.3. The type for tp_free was changed from destructor
to freefunc. Removing the casts make both 2.2 and 2.3 happy.
* Fixed the bug that prevented member access.
* Embedded server support. Can't get it use InnoDB tables yet.
However, MyISAM (default) tables seem to work fine.
- one source package for both python versions
- added few more files to docs
-------------------------------------------------------------------
Mon Aug 11 11:52:57 CEST 2003 - mcihar@suse.cz
- builds on lib64
-------------------------------------------------------------------
Thu Aug 07 17:01:20 CEST 2003 - mcihar@suse.cz
- updated to 0.9.2
-------------------------------------------------------------------
Mon Jun 16 15:02:16 CEST 2003 - mcihar@suse.cz
- use record-rpm
-------------------------------------------------------------------
Mon May 12 14:18:18 CEST 2003 - mcihar@suse.cz
- use versioned dependency on python
-------------------------------------------------------------------
Wed Jan 22 14:36:52 CET 2003 - mcihar@suse.cz
- using build root
- file list is correct on lib64 arches
-------------------------------------------------------------------
Tue Jan 15 18:06:17 CET 2002 - ro@suse.de
- up to 0.9.1 to make it build on python-2.2
-------------------------------------------------------------------
Sat Dec 29 22:07:39 CET 2001 - schwab@suse.de
- Add mysql-shared to neededforbuild.
-------------------------------------------------------------------
Thu Nov 1 16:02:14 CET 2001 - vinil@suse.cz
- initial version 0.9.0

118
python-mysqlclient.spec Normal file
View File

@ -0,0 +1,118 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Python2 support has been dropped in version 2.0.0
%define skip_python2 1
%define oldpython python
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-mysqlclient%{psuffix}
Version: 2.1.1
Release: 0
Summary: Python interface to MySQL
License: GPL-2.0-or-later
URL: https://github.com/PyMySQL/mysqlclient-python
Source: https://files.pythonhosted.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: libmysqlclient-devel
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
BuildRequires: python3-attrs
BuildRequires: unzip
Recommends: mariadb
Provides: python-mysql = %{version}
Obsoletes: python-mysql < %{version}
Provides: python-MySQL-python = %{version}
Obsoletes: python-MySQL-python < %{version}
%if %{with test}
BuildRequires: %{python_module mysqlclient >= %{version}}
BuildRequires: %{python_module pytest}
BuildRequires: mariadb-rpm-macros
%endif
%ifpython2
Provides: %{oldpython}-mysql = %{version}
Obsoletes: %{oldpython}-mysql < %{version}
Provides: %{oldpython}-MySQL-python = %{version}
Obsoletes: %{oldpython}-MySQL-python < %{version}
%endif
%python_subpackages
%description
MySQLdb is an interface to the popular MySQL database server for Python.
This package adds Python 3 support and bug fixes to MySQLdb1.
%prep
%setup -q -n mysqlclient-%{version}
%autopatch -p1
%build
%if !%{with test}
%python_build
sphinx-build -b html doc build/sphinx/html && rm build/sphinx/html/.buildinfo
%endif
%check
%if %{with test}
exit_code=0
cconf=abuild-myclient.cnf
#
# start the mariadb server
#
%mysql_testserver_start -u auth_db_user -p auth_db_pass -d test_database
#
# creating client mysql config
#
%mysql_testserver_cconf -n $cconf -d test_database
#
# running the test
#
rm -r MySQLdb
export TESTDB="$PWD/$cconf"
%pytest_arch -k "not (test_LONG or test_TEXT)" || exit_code=1
#
# stopping mariadb
#
%mysql_testserver_stop
exit $exit_code
%endif
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc HISTORY.rst MANIFEST.in README.md build/sphinx/html
%{python_sitearch}/*
%endif
%changelog