From e9373e964599657211ba8256095c00b820595212d40bcc1245d5d1cc3a471791 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 17 Sep 2024 05:27:24 +0000 Subject: [PATCH] - Update to 0.9.0: * Added + Allow SQLite query parameters and support cached databases + Support for unix socket for aiomysql and asyncmy * Changed + Drop support for Python 3.7 and add support for Python 3.12 + Add support for SQLAlchemy 2+ + Allow SSL string parameters in PostgresSQL URL + Change isolation connections and transactions during concurrent usage + Bump up asyncmy version to fix No module named 'asyncmy.connection' * Fixed + Fix the type-hints using more standard mode - Switch to pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-databases?expand=0&rev=17 --- .gitattributes | 23 +++++++++ .gitignore | 1 + databases-0.7.0.tar.gz | 3 ++ databases-0.9.0.tar.gz | 3 ++ python-databases.changes | 101 +++++++++++++++++++++++++++++++++++++++ python-databases.spec | 78 ++++++++++++++++++++++++++++++ 6 files changed, 209 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 databases-0.7.0.tar.gz create mode 100644 databases-0.9.0.tar.gz create mode 100644 python-databases.changes create mode 100644 python-databases.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/databases-0.7.0.tar.gz b/databases-0.7.0.tar.gz new file mode 100644 index 0000000..3a5bec6 --- /dev/null +++ b/databases-0.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c938f27865d1cb304838ac0962332b07ee738165b7fd4993907195df1165302c +size 32169 diff --git a/databases-0.9.0.tar.gz b/databases-0.9.0.tar.gz new file mode 100644 index 0000000..28f9ae0 --- /dev/null +++ b/databases-0.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dc05d1810ae683930b150c1325ec2e35854fc5838ed91d3bfe94ff7dadb59e5 +size 37952 diff --git a/python-databases.changes b/python-databases.changes new file mode 100644 index 0000000..6b9da79 --- /dev/null +++ b/python-databases.changes @@ -0,0 +1,101 @@ +------------------------------------------------------------------- +Tue Sep 17 05:26:56 UTC 2024 - Steve Kowalik + +- Update to 0.9.0: + * Added + + Allow SQLite query parameters and support cached databases + + Support for unix socket for aiomysql and asyncmy + * Changed + + Drop support for Python 3.7 and add support for Python 3.12 + + Add support for SQLAlchemy 2+ + + Allow SSL string parameters in PostgresSQL URL + + Change isolation connections and transactions during concurrent usage + + Bump up asyncmy version to fix No module named 'asyncmy.connection' + * Fixed + + Fix the type-hints using more standard mode +- Switch to pyproject macros. + +------------------------------------------------------------------- +Tue Jul 4 13:09:38 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Tue Jun 6 01:56:24 UTC 2023 - Steve Kowalik + +- Update to 0.7.0: + * Fixed breaking changes in SQLAlchemy cursor; supports >=1.4.42,<1.5 + * Wrapped types in typing.Optional where applicable +- Change {Build,}Requires for SQLAlchemy so we don't install >= 2. +- Drop patch sqlalchemy1442.patch, included upstream. + +------------------------------------------------------------------- +Thu Nov 24 11:40:22 UTC 2022 - Daniel Garcia + +- Add patch sqlalchemy1442.patch to make it compatible with latest sqlalchemy + gh#encode/databases#513 +- Remove python_module macro definition +- Update to 0.6.2: + * Pinned SQLAlchemy <=1.4.41 to avoid breaking changes (#520). +- 0.6.1: + * Improve typing for Transaction (#493) + * Allow string indexing into Record (#501) +- 0.6.0: + * Dropped Python 3.6 support (#458) + * Add _mapping property to the result set interface (#447 ) + * Add contributing docs (#453 ) + * Fix query result named access (#448) + * Fix connections getting into a bad state when a task is cancelled (#457) + * Revert #328 parallel transactions (#472) + * Change extra installations to specific drivers (#436) +- 0.5.5: + * Revert the change of Record type to Sequence from Mapping(#408) to maintain + backward compatibility +- 0.5.4: + * Support for Unix domain in connections (#423) + * asyncmy MySQL driver (#382) + * Fix SQLite fetch queries with multiple parameters (#435) + * Change Record type to Sequence (#408) + +------------------------------------------------------------------- +Sun Oct 17 14:40:53 UTC 2021 - Ben Greiner + +- Update to version 0.5.3 + * Support dialect+driver for default database drivers like + postgresql+asyncpg (#396) + * Documentation of low-level transaction (#390) +- Release 0.5.2 + * Reset counter for failed connections (#385) + * Avoid dangling task-local connections after + Database.disconnect() (#211) +- Release 0.5.1 + * Make database connect and disconnect calls idempotent (#379) + * Fix in_ and notin_ queries in SQLAlchemy 1.4 (#378) +- Release 0.5.0 (August 26th, 2021) + * Support SQLAlchemy 1.4 (#299) + * Fix concurrent transactions (#328) +- Drop sqlalchemy-14.patch fixed upstream + +------------------------------------------------------------------- +Wed May 26 12:10:35 UTC 2021 - Matej Cepl + +- Add sqlalchemy-14.patch upgrading used API of SQLAlchemy to 1.4. + +------------------------------------------------------------------- +Tue Apr 13 21:28:51 UTC 2021 - simmphonie@opensuse.org + +- update to version 0.4.3 + * Pin SQLAlchemy to < 1.4 (#314) +- version 0.4.2 + * Fix memory leak with asyncpg for SQLAlchemy generic functions (#273) +- fix python version to "< 3.7" for aiocontextvars + +------------------------------------------------------------------- +Sat Jan 16 18:42:21 UTC 2021 - Benjamin Greiner + +- Requires aiocontextvars for python <= 3.6 + +------------------------------------------------------------------- +Sat Nov 21 10:25:27 AM UTC 2020 - John Vandenberg + +- Initial spec for v0.4.1 diff --git a/python-databases.spec b/python-databases.spec new file mode 100644 index 0000000..c8bcb72 --- /dev/null +++ b/python-databases.spec @@ -0,0 +1,78 @@ +# +# spec file for package python-databases +# +# 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} +Name: python-databases +Version: 0.9.0 +Release: 0 +Summary: Async database support for Python +License: BSD-3-Clause +URL: https://github.com/encode/databases +Source: https://github.com/encode/databases/archive/%{version}.tar.gz#/databases-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-sqlalchemy >= 2.0.7 +Suggests: python-aiomysql +Suggests: python-aiopg +Suggests: python-aiosqlite +Suggests: python-asyncpg +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module aiosqlite} +BuildRequires: %{python_module asyncpg} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module sqlalchemy >= 2.0.7} +# /SECTION +%python_subpackages + +%description +Async database support for Python. + +%prep +%autosetup -p1 -n databases-%{version} + +# tests/test_integration.py depends on starlette +rm tests/test_integration.py + +# Remove test dependencies aiopg, aiomysql and asyncmy +sed -Ei 's/from .*(aiopg|mysql|asyncmy).* import .*/pass/' tests/test_connection_options.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export TEST_DATABASE_URLS=sqlite:///mytestdb +export PYTHONPATH=${PWD} +%pytest -k 'not (aiopg or mysql or asyncmy)' + +%files %{python_files} +%doc README.md +%license LICENSE.md +%{python_sitelib}/databases +%{python_sitelib}/databases-%{version}.dist-info + +%changelog