forked from pool/python-asyncpg
- Remove 0001-notice-also-the-MERGE-command.patch not needed anymore.
- update to 0.30.0: * Implement GSSAPI authentication * Implement SSPI authentication * Add initial typings * Allow building with Cython 3 * docs: fix connection pool close call (#1125) * Add support for the sslnegotiation parameter * Test and build on Python 3.13 * Support PostgreSQL 17 * Add fetchmany to execute many and return rows * Add connect kwarg to Pool to better support GCP's CloudSQL * Allow customizing connection state reset (#1191) * s/quote/quote_plus/ in the note about DSN part quoting * Use asyncio.run() instead of run_until_complete() * Require async_timeout for python < 3.11 (#1177) * Allow testing with uvloop on Python 3.12 (#1182) * Mark pool-wrapped connection coroutine methods as coroutines * handle None parameters in copy_from_query, returning NULL * fix: return the pool from async_init_ if it's already initialized (#1104) * Replace obsolete, unsafe Py_TRASHCAN_SAFE_BEGIN/END (#1150) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asyncpg?expand=0&rev=22
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
55
0001-notice-also-the-MERGE-command.patch
Normal file
55
0001-notice-also-the-MERGE-command.patch
Normal file
@@ -0,0 +1,55 @@
|
||||
From 75f68ce46da7c3393ec07ff0e03b654158b6e9f9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mark=C3=A9ta?= <meggy.calabkova@gmail.com>
|
||||
Date: Wed, 2 Oct 2024 15:14:07 +0200
|
||||
Subject: [PATCH] notice also the MERGE command
|
||||
|
||||
---
|
||||
asyncpg/prepared_stmt.py | 4 ++--
|
||||
asyncpg/protocol/prepared_stmt.pyx | 2 +-
|
||||
tests/test_exceptions.py | 2 +-
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/asyncpg/prepared_stmt.py b/asyncpg/prepared_stmt.py
|
||||
index 8e241d6..195d005 100644
|
||||
--- a/asyncpg/prepared_stmt.py
|
||||
+++ b/asyncpg/prepared_stmt.py
|
||||
@@ -147,8 +147,8 @@ class PreparedStatement(connresource.ConnectionResource):
|
||||
# will discard any output that a SELECT would return, other
|
||||
# side effects of the statement will happen as usual. If you
|
||||
# wish to use EXPLAIN ANALYZE on an INSERT, UPDATE, DELETE,
|
||||
- # CREATE TABLE AS, or EXECUTE statement without letting the
|
||||
- # command affect your data, use this approach:
|
||||
+ # MERGE, CREATE TABLE AS, or EXECUTE statement without letting
|
||||
+ # the command affect your data, use this approach:
|
||||
# BEGIN;
|
||||
# EXPLAIN ANALYZE ...;
|
||||
# ROLLBACK;
|
||||
diff --git a/asyncpg/protocol/prepared_stmt.pyx b/asyncpg/protocol/prepared_stmt.pyx
|
||||
index 7335825..cb0afa2 100644
|
||||
--- a/asyncpg/protocol/prepared_stmt.pyx
|
||||
+++ b/asyncpg/protocol/prepared_stmt.pyx
|
||||
@@ -142,7 +142,7 @@ cdef class PreparedStatementState:
|
||||
# that the user tried to parametrize a statement that does
|
||||
# not support parameters.
|
||||
hint += (r' Note that parameters are supported only in'
|
||||
- r' SELECT, INSERT, UPDATE, DELETE, and VALUES'
|
||||
+ r' SELECT, INSERT, UPDATE, DELETE, MERGE and VALUES'
|
||||
r' statements, and will *not* work in statements '
|
||||
r' like CREATE VIEW or DECLARE CURSOR.')
|
||||
|
||||
diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py
|
||||
index dbffcc2..e8bb7a1 100644
|
||||
--- a/tests/test_exceptions.py
|
||||
+++ b/tests/test_exceptions.py
|
||||
@@ -42,7 +42,7 @@ class TestExceptions(tb.ConnectedTestCase):
|
||||
self.assertEqual(
|
||||
e.detail,
|
||||
"Function's final statement must be SELECT or "
|
||||
- "INSERT/UPDATE/DELETE RETURNING.")
|
||||
+ "INSERT/UPDATE/DELETE/MERGE RETURNING.")
|
||||
self.assertIn(
|
||||
'DETAIL: Function', str(e)
|
||||
)
|
||||
--
|
||||
2.46.1
|
||||
|
||||
3
asyncpg-0.29.0.tar.gz
Normal file
3
asyncpg-0.29.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d1c49e1f44fffafd9a55e1a9b101590859d881d639ea2922516f5d9c512d354e
|
||||
size 820455
|
||||
BIN
asyncpg-0.30.0.tar.gz
LFS
Normal file
BIN
asyncpg-0.30.0.tar.gz
LFS
Normal file
Binary file not shown.
211
python-asyncpg.changes
Normal file
211
python-asyncpg.changes
Normal file
@@ -0,0 +1,211 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 23 12:16:37 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Remove 0001-notice-also-the-MERGE-command.patch not needed anymore.
|
||||
- update to 0.30.0:
|
||||
* Implement GSSAPI authentication
|
||||
* Implement SSPI authentication
|
||||
* Add initial typings
|
||||
* Allow building with Cython 3
|
||||
* docs: fix connection pool close call (#1125)
|
||||
* Add support for the sslnegotiation parameter
|
||||
* Test and build on Python 3.13
|
||||
* Support PostgreSQL 17
|
||||
* Add fetchmany to execute many and return rows
|
||||
* Add connect kwarg to Pool to better support GCP's CloudSQL
|
||||
* Allow customizing connection state reset (#1191)
|
||||
* s/quote/quote_plus/ in the note about DSN part quoting
|
||||
* Use asyncio.run() instead of run_until_complete()
|
||||
* Require async_timeout for python < 3.11 (#1177)
|
||||
* Allow testing with uvloop on Python 3.12 (#1182)
|
||||
* Mark pool-wrapped connection coroutine methods as coroutines
|
||||
* handle None parameters in copy_from_query, returning NULL
|
||||
* fix: return the pool from async_init_ if it's already initialized (#1104)
|
||||
* Replace obsolete, unsafe Py_TRASHCAN_SAFE_BEGIN/END (#1150)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 2 13:16:22 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add 0001-notice-also-the-MERGE-command.patch to support Postgres 15+,
|
||||
sent upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 25 14:10:47 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.29.0:
|
||||
* 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)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 11 13:32:37 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.28.0:
|
||||
* Minor fixes and improvements.
|
||||
* Do not try to cleanup statements (#981)
|
||||
* Add Pool.is_closing() method (#973)
|
||||
* Fix test_tls_version for LibreSSL (#974)
|
||||
* Handle environments without home dir (#1011)
|
||||
* fix: salt and iterations parsing for scram (#1026)
|
||||
* Add support for target_session_attrs (#987)
|
||||
* Add support for READ UNCOMMITTED (#1039)
|
||||
* Update benchmarks, add psycopg3 (#1042)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 4 13:09:00 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Add %{?sle15_python_module_pythons}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 7 20:50:09 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- Update to 0.27.0
|
||||
Support Python 3.11 and PostgreSQL 15. This release also drops support
|
||||
for Python 3.6.
|
||||
* Changes
|
||||
Add arm64 mac and linux wheels
|
||||
Add Python 3.11 to the test matrix
|
||||
Exclude .venv from flake8 (#958)
|
||||
Upgrade to flake8 5.0.4 (from 3.9.2) (#961)
|
||||
Show an example of a custom Record class (#960)
|
||||
Use the exact type name in Record.repr (#959)
|
||||
Drop Python 3.6 support (#940)
|
||||
Test on Python 3.11 and PostgreSQL 15, fix workflow deprecations (#968)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 14 07:33:54 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Disable failing test test_executemany_uvloop_ssl_issue_700, because
|
||||
the ssl_user role doesn't have permission to create tables by default with
|
||||
the current postgresql configuration.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 4 08:57:47 UTC 2022 - Otto Hollmann <otto.hollmann@suse.com>
|
||||
|
||||
- Update to 0.26.0:
|
||||
* Changes
|
||||
-------
|
||||
* Add support to use awaitable object in password function. (#889)
|
||||
(by @kwarunek in fb3b6bf7 for #889)
|
||||
* Support direct TLS connections (i.e. no STARTTLS) (#923)
|
||||
(by @jackwotherspoon in f2a937d2 for #923)
|
||||
* Fixes
|
||||
-----
|
||||
* Fix invalid `pyproject.toml` (#900)
|
||||
(by @Rongronggg9 in eddb649c for #900)
|
||||
* Add record_class parameter Pool.fetch and Pool.fetchrow (#896)
|
||||
(by @baltitenger in 2519cf38 for #896)
|
||||
* Domain basetypes are introspected (#886) (#887)
|
||||
(by @QuantumTM in cca4a2d3 for #886)
|
||||
* Properly handle exceptions raised while handling server auth messages (#862)
|
||||
(by @elprans in bd192623 for #862)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 23 16:35:31 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 23 16:30:52 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.25.0:
|
||||
* Improve SSL option compatibility in URIs
|
||||
* Add Pool methods to determine its min, max, current and idle size
|
||||
* Make it possible to specify a statement name in Connection.prepare()
|
||||
* Implement support for multirange types
|
||||
* Make sure timeout callbacks always get cleaned up
|
||||
* Update __all__ statements to a simpler form that is better supported by typecheckers
|
||||
* Fix test_timetz_encoding on Python 3.10
|
||||
* Fix a bunch of ResourceWarnings in the test suite
|
||||
* Fix SSLContext deprecation warnings
|
||||
* Fix the description of the database argument to connect()
|
||||
* Fix parsing of IPv6 addresses in the connection URI
|
||||
* Improve diagnostics of invalid executemany() input
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 17 14:19:32 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 0.24.0
|
||||
* Drop support for Python 3.5 (#777)
|
||||
* Add support for Python 3.10 (#795)
|
||||
* Add support for asynchronous iterables to
|
||||
copy_records_to_table() (#713)
|
||||
* Add support for coroutine functions as listener callbacks
|
||||
(#802)
|
||||
* Add support for sslcert, sslkey and sslrootcert parameters to
|
||||
DSN (#768)
|
||||
* Add copy_ wrappers to Pool (#661)
|
||||
* Add issubset and issuperset methods to the Range type (#563)
|
||||
* Break connection internal circular reference (#774)
|
||||
* Make Server Version Extraction More Flexible (#778)
|
||||
- Release 0.23.0
|
||||
* Avoid TypeError in Transaction.__repr__ (#703)
|
||||
* Feed memoryview to writelines() (#715)
|
||||
* Add sslmode=allow support and fix =prefer retry (#720)
|
||||
* Loosen message test in test_invalid_input (#751)
|
||||
* Support readonly and deferrable for non-serializable
|
||||
transactions (#747)
|
||||
* Fix asyncpg with Py_DEBUG mode (#719)
|
||||
* Fix docs/Makefile and docs/_static/theme_overrides.css missing
|
||||
from PyPI package (#708)
|
||||
- Reactivate python36: uvloop for testing is optional
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 17 07:01:53 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
- Do not build for python 3.6: the required dependency uvloop does
|
||||
no longer support Python 3.6 since version 0.16.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 3 20:51:42 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.22.0:
|
||||
* Add support for connection termination listeners
|
||||
* Add support for password functions (useful for RDS IAM auth)
|
||||
* Fix possible uninitalized pointer access on unexpected array
|
||||
* message data (CVE-2020-17446,
|
||||
* Vastly speedup executemany by batching protocol messages
|
||||
* Add Python 3.9 support
|
||||
* Allow using custom Record class
|
||||
* Prefer SSL connections by default
|
||||
* Add codecs for a bunch of new builtin types
|
||||
* Expose Pool as asyncpg.Pool
|
||||
* Avoid unnecessary overhead during connection reset
|
||||
* Bugfixes
|
||||
- drop merged-static-fix.patch (upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 22 14:12:03 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Tidy spec
|
||||
- Add merged-static-fix.patch to support Python 3.8
|
||||
- Activate test suite
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 24 08:54:51 UTC 2020 - Bruno Friedmann <bruno@ioda-net.ch>
|
||||
|
||||
- Update to version 0.20.1
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 26 14:01:50 UTC 2018 - Bruno Friedmann <bruno@ioda-net.ch>
|
||||
|
||||
- Initial packaging asyncpg version 0.18.2
|
||||
|
||||
99
python-asyncpg.spec
Normal file
99
python-asyncpg.spec
Normal file
@@ -0,0 +1,99 @@
|
||||
#
|
||||
# spec file for package python-asyncpg
|
||||
#
|
||||
# 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-asyncpg
|
||||
Version: 0.30.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 if %python-base < 3.11}
|
||||
BuildRequires: %{python_module devel >= 3.6}
|
||||
BuildRequires: %{python_module distro}
|
||||
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} < 311
|
||||
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
|
||||
Reference in New Issue
Block a user