From c56c3eb6bdade9c4bcec91db9327d6567187d4560301750fffbfbc1bb702b79b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 24 Oct 2024 19:02:44 +0000 Subject: [PATCH] - update to 2.2.5: * (Windows wheel) Update MariaDB Connector/C to 3.4.1. #726 * (Windows wheel) Build wheels for Python 3.13. #726 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mysqlclient?expand=0&rev=43 --- .gitattributes | 23 +++ .gitignore | 1 + _multibuild | 3 + mysqlclient-2.2.4.tar.gz | 3 + mysqlclient-2.2.5.tar.gz | 3 + python-mysqlclient.changes | 364 +++++++++++++++++++++++++++++++++++++ python-mysqlclient.spec | 115 ++++++++++++ 7 files changed, 512 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 mysqlclient-2.2.4.tar.gz create mode 100644 mysqlclient-2.2.5.tar.gz create mode 100644 python-mysqlclient.changes create mode 100644 python-mysqlclient.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/mysqlclient-2.2.4.tar.gz b/mysqlclient-2.2.4.tar.gz new file mode 100644 index 0000000..0079c03 --- /dev/null +++ b/mysqlclient-2.2.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33bc9fb3464e7d7c10b1eaf7336c5ff8f2a3d3b88bab432116ad2490beb3bf41 +size 90400 diff --git a/mysqlclient-2.2.5.tar.gz b/mysqlclient-2.2.5.tar.gz new file mode 100644 index 0000000..8594668 --- /dev/null +++ b/mysqlclient-2.2.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:add8643c32f738014d252d2bdebb478623b04802e8396d5903905db36474d3ff +size 90519 diff --git a/python-mysqlclient.changes b/python-mysqlclient.changes new file mode 100644 index 0000000..0d9adea --- /dev/null +++ b/python-mysqlclient.changes @@ -0,0 +1,364 @@ +------------------------------------------------------------------- +Thu Oct 24 19:02:36 UTC 2024 - Dirk Müller + +- update to 2.2.5: + * (Windows wheel) Update MariaDB Connector/C to 3.4.1. #726 + * (Windows wheel) Build wheels for Python 3.13. #726 + +------------------------------------------------------------------- +Fri Feb 9 10:37:44 UTC 2024 - Dirk Müller + +- update to 2.2.4: + * Support ssl=True in connect(). + +------------------------------------------------------------------- +Sat Dec 16 19:08:47 UTC 2023 - Dirk Müller + +- update to 2.2.1: + * ``Connection.ping()`` avoid using ``MYSQL_OPT_RECONNECT`` + option until ``reconnect=True`` is specified. + MySQL 8.0.33 start showing warning when the option is used. + +------------------------------------------------------------------- +Mon Nov 27 19:37:59 UTC 2023 - Dirk Müller + +- update to 2.2.0: + * Use ``pkg-config`` instead of ``mysql_config`` (#586) + * Raise ProgrammingError on -inf (#557) + * Raise IntegrityError for ER_BAD_NULL. (#579) + * Windows: Use MariaDB Connector/C 3.3.4 (#585) + * Use pkg-config instead of mysql_config (#586) + * Add collation option (#564) + * Drop Python 3.7 support (#593) + * Use pyproject.toml for build (#598) + * Add Cursor.mogrify (#477) + * Partial support of ssl_mode option with mariadbclient (#475) + * Discard remaining results without creating Python objects + * Fix executemany with binary prefix (#605) + +------------------------------------------------------------------- +Wed Jul 26 07:14:20 UTC 2023 - Bernhard Wiedemann + +- Drop sphinx doctrees for reproducible builds + +------------------------------------------------------------------- +Sun Jun 25 08:28:34 UTC 2023 - Andreas Schneider + +- Use sle15_python_module_pythons + +------------------------------------------------------------------- +Wed May 3 11:10:33 UTC 2023 - Martin Liška + +- 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 + +- 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 + +- 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 + +- 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 + +- fix test package by adding BuildRequires: %{python_module mysqlclient + >= %{version}} + +------------------------------------------------------------------- +Fri Feb 21 10:04:38 UTC 2020 - Kristyna Streitova + +- 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 + +- 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 + +- 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 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 + +- Generate documentation only with sphinx3 no need to do it + twice + +------------------------------------------------------------------- +Fri Feb 8 23:12:28 UTC 2019 - Alexei Podvalsky + +- 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 + +- 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 + diff --git a/python-mysqlclient.spec b/python-mysqlclient.spec new file mode 100644 index 0000000..4eb0bca --- /dev/null +++ b/python-mysqlclient.spec @@ -0,0 +1,115 @@ +# +# spec file for package python-mysqlclient +# +# 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 +# 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/ +# + + +%{?sle15_python_module_pythons} +%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.2.5 +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 -r build/sphinx/html/.{buildinfo,doctrees} +%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 +# +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