From 4dc05edff69b685c2b866d63f076b5000ece76fefedd0a8fe23ce446432e5e7c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 23 Feb 2026 09:14:47 +0000 Subject: [PATCH] - update to 3.3.3: * Retain Error.pgconn when raising a single exception for multiple connection attempt errors * Return a proper error when server sends ErrorResponse for a Sync after a Parse OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psycopg?expand=0&rev=29 --- .gitattributes | 24 ++++ .gitignore | 4 + psycopg-3.3.2.tar.gz | 3 + psycopg-3.3.3.tar.gz | 3 + python-psycopg.changes | 285 +++++++++++++++++++++++++++++++++++++++++ python-psycopg.spec | 76 +++++++++++ 6 files changed, 395 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 psycopg-3.3.2.tar.gz create mode 100644 psycopg-3.3.3.tar.gz create mode 100644 python-psycopg.changes create mode 100644 python-psycopg.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..37a8eaa --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +*.changes merge=merge-changes +*.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 +*.tar 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..8b731c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.obscpio +*.osc +_build.* +.pbuild diff --git a/psycopg-3.3.2.tar.gz b/psycopg-3.3.2.tar.gz new file mode 100644 index 0000000..69b2997 --- /dev/null +++ b/psycopg-3.3.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca10f87344be1eadd81063d6a49b871d8a0ca779ccce8b8a2fc1acc4f4a0987a +size 607955 diff --git a/psycopg-3.3.3.tar.gz b/psycopg-3.3.3.tar.gz new file mode 100644 index 0000000..1226a7c --- /dev/null +++ b/psycopg-3.3.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43652b187cfd4becec9b419180e0bfe876888a7ff5c09a9ebc288b14dc543c21 +size 610053 diff --git a/python-psycopg.changes b/python-psycopg.changes new file mode 100644 index 0000000..c1c6824 --- /dev/null +++ b/python-psycopg.changes @@ -0,0 +1,285 @@ +------------------------------------------------------------------- +Mon Feb 23 08:44:46 UTC 2026 - Dirk Müller + +- update to 3.3.3: + * Retain Error.pgconn when raising a single exception for + multiple connection attempt errors + * Return a proper error when server sends ErrorResponse for a + Sync after a Parse + +------------------------------------------------------------------- +Tue Jan 27 07:37:13 UTC 2026 - Dirk Müller + +- update to 3.3.2: + * Add :ref:`template strings queries ` + (:ticket:`#1054`). + * More flexible :ref:`composite adaptation`: + it is now possible to adapt Python objects to PostgreSQL + composites and back even if they are not sequences or if they + take keyword arguments (:ticket:`#932`, :ticket:`#1202`). + * Cursors are now iterators, not just iterables. This means you + can call next(cur) or anext(cur), which is useful as a + :ref:`type-safe expression ` + (:ticket:`#1064`). + * Add Cursor.set_result() and Cursor.results() to move across + the result sets of queries executed though + ~Cursor.executemany() or ~Cursor.execute() with multiple + statements (:tickets:`#1080, #1170`). + * Add :ref:`transaction-status` to report the status during and + after a ~Connection.transaction() block (:ticket:`#969`). + * Allow to change loaders using + ~adapt.AdaptersMap.register_loader() on Cursor.adapters after + a query result has been already returned (:ticket:`#884`). + * Add pq.PGconn.used_gssapi attribute and + Capabilities.has_used_gssapi() function (:ticket:`#1138`). + * Add ConnectionInfo.full_protocol_version attribute, + Capabilities.has_full_protocol_version() function + (:ticket:`#1079`). + * Disable default GSSAPI preferential connection in the binary + package (:ticket:`#1136`). Warning Please explicitly set the + gssencmode_ connection parameter or the + :envvar:`PGGSSENCMODE` environment variable to interact + reliably with the GSSAPI. + * Drop support for Python 3.8 (:ticket:`#976`) and 3.9 + (:ticket:`#1056`). + * Show the host name in the error message in case of name + resolution error (:ticket:`#1205`). + * Fix Cursor.copy() and AsyncCursor.copy() to hold the + connection lock for the entire operation, preventing + concurrent access issues (:ticket:`#1210`). + * Fix GSSAPI check with C extension built with libpq < v16 + (:ticket:`#1216`). + +------------------------------------------------------------------- +Tue Nov 11 15:36:00 UTC 2025 - Dirk Müller + +- update to 3.2.12: + * Allow copy to pass different types per column, as long as the + database can convert them. Regression introduced in 3.2.11 + * Fix spurious readiness flags in some of the wait functions + * Fix high CPU usage using the wait_c function on Windows + * Fix bad data on error in binary copy (ticket #1147). + * Respect Copy.set_types() in TEXT copy in C version, + consistently with the Python version (ticket #1153). + * Don’t raise warning, and don’t leak resources, if a builtin + function is used as JSON dumper/loader function (ticket #1165). + * Improve performance of Python conversion on results loading + (ticket #1155). + +------------------------------------------------------------------- +Mon Sep 29 21:11:53 UTC 2025 - Dirk Müller + +- update to 3.2.10: + * Fix TypeError shadowing CancelledError upon task cancellation + during pipeline execution (ticket #1005). + * Fix memory leak when lambda/local functions are used as + argument for set_json_dumps(), set_json_loads() (ticket #1108). + * Fix coordination of executemany() with other concurrent + operations on other cursors (ticket #1130). + * Fix leak receiving notifications if the notifies() generator + is not called (ticket #1091). + * Using both the generator and handlers to receive notifications + on the same connection is therefore deprecated and will now + generate a runtime warning. + * Add support for Python 3.14 (ticket #1053). + +------------------------------------------------------------------- +Thu May 29 09:46:59 UTC 2025 - Dirk Müller + +- update to 3.2.9: + * Fix `DateFromTicks` and `TimeFromTicks` return values to return + a date and a time referred to the UTC timezone rather than to + the local timezone. For consistency, `TimestampFromTicks` to + return a datetime in UTC rather than in the local timezone + * Fix `~Cursor.rownumber` after using `~AsyncServerCursor.scroll()` + on `AsyncServerCursor` (:ticket:`#1066`). + * Fix interval parsing with days or other parts and negative time + in C module + * Don't process further connection attempts after Ctrl-C + * Fix cursors to correctly iterate over rows even if their row + factory returns `None` (:ticket:`#1073`). + * Fix `ConnectionInfo.port` when the port is specified as an + empty string + * Report all the attempts error messages in the exception raised + for a connection failure (:ticket:`#1069`). + * Improve logging on connection (:ticket:`#1085`). + * Add support for PostgreSQL 18 libpq (:ticket:`#1082`). + * Add SRID support to shapely dumpers/loaders (:ticket:`#1028`). + * Add support for binary hstore (:ticket:`#1030`). + +------------------------------------------------------------------- +Wed Apr 9 06:50:45 UTC 2025 - Antonio Larrosa + +- update to 3.2.6: + * Fix connection semantic when using + target_session_attrs=prefer-standby (ticket #1021). +- update to 3.2.5: + * 3x faster UUID loading thanks to C implementation + (tickets #447, #998). +- update to 3.2.4: + * Don’t lose notifies received whilst the notifies() iterator + is not running (ticket #962). + * Make sure that the notifies callback is called during the use + of the notifies() generator (ticket #972). + * Raise the correct error returned by the database (such as + AdminShutdown or IdleInTransactionSessionTimeout) instead of + a generic OperationalError when a server error causes a client + disconnection (ticket #988). + * Build macOS dependencies from sources instead using the + Homebrew versions in order to avoid problems with + MACOSX_DEPLOYMENT_TARGET (ticket #858). + * Bump libpq to 17.2 in Linux and macOS binary packages. + * Bump libpq to 16.4 in Windows binary packages, using the + vcpkg library (ticket #966). + +------------------------------------------------------------------- +Tue Nov 12 16:27:40 UTC 2024 - Dirk Müller + +- update to 3.2.3: + * Release binary packages including PostgreSQL 17 libpq + (:ticket:`#852`). + * Drop !TypeDef specifications as string from public modules, + as they cannot be composed by users as !typing objects + previously could (:ticket:`#860`). + * Release Python 3.13 binary packages. + +------------------------------------------------------------------- +Sat Aug 31 12:26:21 UTC 2024 - Dirk Müller + +- update to 3.2.1: + * Fix packaging metadata breaking [c], [binary] dependencies + * Add support for integer, floating point, boolean NumPy scalar + types (ticket #332). + * Add timeout and stop_after parameters to Connection.notifies() + * Allow dumpers to return None, to be converted to NULL (ticket + * Add Raw query cursors to execute queries using placeholders in + PostgreSQL format ($1, $2…) (tickets #560, #839). + * Add capabilities object to inspect the libpq capabilities + * Add scalar_row to return scalar values from a query + * Add cancel_safe() for encrypted and non-blocking cancellation when + using libpq v17. Use such method internally to implement + KeyboardInterrupt and copy termination + * The context parameter of sql objects as_string() and as_bytes() + methods is now optional + * Add set_autocommit() on sync connections, and similar transaction + control methods available on the async connections. + * Add a size parameter to stream() to enable results retrieval in + chunks instead of row-by-row +- drop fix-pool-import.patch (upstream) + +------------------------------------------------------------------- +Thu May 16 08:40:25 UTC 2024 - Dirk Müller + +- update to 3.1.19: + * Fix unaligned access undefined behaviour in C extension + * Fix excessive stripping of error message prefixes + * Allow to specify the connect_timeout connection parameter as + float + * Improve COPY performance on macOS + +------------------------------------------------------------------- +Thu Mar 21 17:15:28 UTC 2024 - Dirk Müller + +- update to 3.1.18: + * Fix possible deadlock on pipeline exit (:ticket:`#685`). + * Fix overflow loading large intervals in C module + * Fix compatibility with musl libc distributions affected by + CPython issue #65821 + +------------------------------------------------------------------- +Mon Jan 15 13:02:19 UTC 2024 - Antonio Larrosa + +- Use %sle15_python_module_pythons + +------------------------------------------------------------------- +Mon Jan 15 05:04:06 UTC 2024 - Steve Kowalik + +- Update to 3.1.17: + * Fix multiple connection attempts when a host name resolve to multiple + IP addresses (:ticket:`699`). + * Use `typing.Self` as a more correct return value annotation of context + managers and other self-returning methods (see :ticket:`708`). +- Add patch fix-pool-import.patch: + * Correct where we are importing from due to new pool release. + +------------------------------------------------------------------- +Fri Jan 5 17:50:05 UTC 2024 - Dirk Müller + +- update to 3.1.16: + * Fix empty ports handling in async multiple connection attempts + +------------------------------------------------------------------- +Thu Dec 14 21:11:45 UTC 2023 - Dirk Müller + +- update to 3.1.15: + * Fix use of ``service`` in connection string (regression in + 3.1.13, :ticket:`#694`). + * Fix async connection to hosts resolving to multiple IP + addresses (regression in 3.1.13, :ticket:`#695`). + * Respect the :envvar:`PGCONNECT_TIMEOUT` environment variable + to determine the connection timeout. + * Fix :ref:`interaction with gevent ` (:ticket:`#527`). + * Add support for PyPy (:ticket:`#686`). + +------------------------------------------------------------------- +Fri Nov 24 13:58:45 UTC 2023 - Antonio Larrosa + +- Update to 3.1.13: + * Raise DataError instead of whatever internal failure trying to + dump a time object with with a tzinfo specified as ZoneInfo + (ambiguous offset, see ticket #652). + * Handle gracefully EINTR on signals instead of raising + InterruptedError, consistently with PEP 475 guideline + (ticket #667). + * Fix support for connection strings with multiple hosts/ports + and for the load_balance_hosts connection parameter + (ticket #674). + * Fix memory leak receiving notifications in Python + implementation (ticket #679). +- Update to 3.1.12: + * Fix possible hanging if a connection is closed while querying + (ticket #608). + * Fix memory leak when register_*() functions are called + repeatedly (ticket #647). + * Release Python 3.12 binary packages. +- Update to 3.1.11: + * Avoid caching the parsing results of large queries to avoid + excessive memory usage (ticket #628). + * Fix integer overflow in C/binary extension with OID > 2^31 + (ticket #630). + * Fix loading of intervals with days and months or years + (ticket #643). + * Work around excessive CPU usage on Windows (reported in + ticket #645). + * Fix building on Solaris and derivatives (ticket #632). + * Fix possible lack of critical section guard in + async executemany(). + * Fix missing pipeline fetch in async scroll(). + * Build binary packages with libpq 15.4, which allows + group-readable permissions on the SSL certificate on the client + (ticket #528). +- Update to 3.1.10 + * Allow JSON dumpers to dump bytes directly instead of str, for + better compatibility with libraries like orjson and msgspec + (ticket #569) + * Fix prepared statement cache validation when exiting pipeline + mode (or executemany()) in case an error occurred within the + pipeline (ticket #585). + * Fix connect() to avoid “leaking” an open PGconn attached to + the OperationalError in case of connection failure. + Error.pgconn is now a shallow copy of the real libpq + connection, and the latter is closed before the exception + propagates (ticket #565). + * Fix possible (ignored) exception on objects deletion + (ticket #591). + * Don’t clobber a Python exception raised during COPY FROM with + the resulting QueryCanceled raised as a consequence + (ticket #593). + * Fix resetting Connection.read_only and deferrable to their + default value using None (ticket #612). + * Add support for Python 3.12. + +------------------------------------------------------------------- +Wed Jul 12 05:41:29 UTC 2023 - Steve Kowalik + +- Initial release of 3.1.9 diff --git a/python-psycopg.spec b/python-psycopg.spec new file mode 100644 index 0000000..8e91c92 --- /dev/null +++ b/python-psycopg.spec @@ -0,0 +1,76 @@ +# +# spec file for package python-psycopg +# +# Copyright (c) 2026 SUSE LLC and contributors +# +# 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-psycopg +# This needs to upgraded in lockstep with python-psycopg-c +Version: 3.3.3 +Release: 0 +Summary: PostgreSQL database adapter for Python +License: LGPL-3.0-only +URL: https://psycopg.org/psycopg3/ +Source: https://github.com/psycopg/psycopg/archive/refs/tags/%{version}.tar.gz#/psycopg-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 49.2.0} +BuildRequires: %{python_module wheel >= 0.37} +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module typing-extensions >= 4.1} +BuildRequires: %{python_module psycopg-c == %{version}} +# psycopg-pool has a different release schedule, version number is likely +# different +BuildRequires: %{python_module psycopg-pool} +BuildRequires: %{python_module anyio} +BuildRequires: %{python_module mypy} +BuildRequires: %{python_module pytest} +# /SECTION +BuildRequires: fdupes +Requires: python-psycopg-c == %{version} +Requires: python-typing-extensions >= 4.1 +Suggests: python-dnspython >= 2.1 +Suggests: python-psycopg-pool +BuildArch: noarch +%python_subpackages + +%description +PostgreSQL database adapter for Python + +%prep +%autosetup -p1 -n psycopg-%{version} + +%build +pushd psycopg +%pyproject_wheel +popd + +%install +pushd psycopg +%pyproject_install +popd +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -k 'not test_wait_r' + +%files %{python_files} +%doc README.rst +%license LICENSE.txt +%{python_sitelib}/psycopg +%{python_sitelib}/psycopg-%{version}.dist-info + +%changelog