forked from pool/python-asyncpg
* Python 3.12 and PostgreSQL 16 support (#1084) * Add support for tuple-format custom codecs on composite types * Support `target_session_attrs` in URL format, add tests * Infinity numeric support (#1067) * Add support for the `WHERE` clause in `copy_to` methods * Add query logging callbacks and context manager (#1043) * When prepared statements are disabled, avoid relying on them harder (#1065) * Handle environments with HOME set to a not-a-directory * Fix handling of non-ASCII passwords (#1062) * Disable JIT while doing type introspection (#1082) * Remove connection parameter caching in `Pool` (#1053) * Switch to Python 3.12-style `wait_for` (#1086) * Update automatic PostGIS type conversion for Shapely 2.0 * Use the `timeout` context manager in the connection path * Small fix for documentation on using SSL in Connection (#995) * Use cleanup_ctx in pool usage doc (#878) * Close cursor portals once the iterator is exhausted (#1088) * Cut BaseProtocol circular reference on close. (#1049) * Allow passing hosts as tuples to `connect()` (in addition to * Drop support for Python 3.7 (#1064) - Update to 0.27.0 - update * Add support for password functions (useful for RDS IAM auth) * Vastly speedup executemany by batching protocol messages * Avoid unnecessary overhead during connection reset - Update to version 0.20.1 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asyncpg?expand=0&rev=18
99 lines
3.1 KiB
RPMSpec
99 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-asyncpg
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-asyncpg
|
|
Version: 0.29.0
|
|
Release: 0
|
|
Summary: Python asyncio PosgtreSQL driver
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/MagicStack/asyncpg
|
|
Source: https://files.pythonhosted.org/packages/source/a/asyncpg/asyncpg-%{version}.tar.gz
|
|
BuildRequires: %{python_module Cython}
|
|
BuildRequires: %{python_module async_timeout}
|
|
BuildRequires: %{python_module devel >= 3.6}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module typing-extensions >= 3.7.4.3 if %python-base < 3.8}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: libpq5 >= 9.4
|
|
%if 0%{?python_version_nodots} < 312
|
|
Requires: python-async_timeout
|
|
%endif
|
|
%if 0%{?python_version_nodots} < 38
|
|
Requires: python-typing-extensions >= 3.7.4.3
|
|
%endif
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module pytest >= 6}
|
|
BuildRequires: postgresql-contrib
|
|
BuildRequires: postgresql-server
|
|
%if 0%{?suse_version} > 1500
|
|
# uvloop >= 0.15.3 does not exist in Leap nor in python36 flavor
|
|
BuildRequires: %{python_module uvloop >= 0.15.3 if (%python-base without python36-base)}
|
|
%endif
|
|
# /SECTION
|
|
%python_subpackages
|
|
|
|
%description
|
|
A fast PostgreSQL Database Client Library for Python/asyncio.
|
|
|
|
**asyncpg** is a database interface library designed specifically for
|
|
PostgreSQL and Python/asyncio with clean implementation
|
|
|
|
%prep
|
|
%autosetup -p1 -n asyncpg-%{version}
|
|
# no uvloop in python36 but in newer flavors
|
|
sed -i asyncpg/_testbase/__init__.py \
|
|
-e "/import re/ a import sys" \
|
|
-e "s/if os.environ.get('USE_UVLOOP')/& and sys.version_info[:2] > (3, 6)/"
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%{python_expand find %{buildroot}%{$python_sitearch} -name '*.[ch]' -delete
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
|
}
|
|
|
|
%check
|
|
# Needed to avoid asyncpg.cluster.ClusterError:
|
|
# could not find pg_config executable
|
|
export PGINSTALLATION=%{_bindir}
|
|
%if 0%{?suse_version} > 1500
|
|
export USE_UVLOOP=1
|
|
%endif
|
|
# fails inside obs chroot
|
|
donttest="test_timetz_encoding"
|
|
# fails because ssl_user doesn't have permission to create tables
|
|
# permission denied for schema public
|
|
donttest+=" or test_executemany_uvloop_ssl_issue_700"
|
|
|
|
mv asyncpg .asyncpg
|
|
%pytest_arch -rs -k "not ($donttest)"
|
|
mv .asyncpg asyncpg
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%{python_sitearch}/asyncpg
|
|
%{python_sitearch}/asyncpg-%{version}*-info
|
|
|
|
%changelog
|