]> git.ipfire.org Git - thirdparty/psycopg.git/log
thirdparty/psycopg.git
24 hours agodocs: drop `pq.error_message()` function from public docs master
Daniele Varrazzo [Sat, 4 Oct 2025 16:46:17 +0000 (18:46 +0200)] 
docs: drop `pq.error_message()` function from public docs

There should be no need for this function to be used by end users.

24 hours agodocs: document the package to install in the "from psycopg2" page
Daniele Varrazzo [Sat, 4 Oct 2025 16:33:40 +0000 (18:33 +0200)] 
docs: document the package to install in the "from psycopg2" page

See #1156.

2 weeks agochore: have a scrap directory where to put work scripts light on myoy
Daniele Varrazzo [Sat, 13 Sep 2025 13:54:11 +0000 (15:54 +0200)] 
chore: have a scrap directory where to put work scripts light on myoy

2 weeks agoMerge pull request #1149 from psycopg/fix/binary-copy
Daniele Varrazzo [Tue, 16 Sep 2025 00:07:42 +0000 (02:07 +0200)] 
Merge pull request #1149 from psycopg/fix/binary-copy

Fix binary copy

2 weeks agofix(copy): avoid sending copy data if an error is set 1149/head
Daniele Varrazzo [Mon, 1 Sep 2025 16:06:43 +0000 (18:06 +0200)] 
fix(copy): avoid sending copy data if an error is set

It would result in a partial message. The server seems to do the right
thing anyway, but let's not waste its precious time.

2 weeks agofix(c): fix excessive buffer allocation in binary copy
Daniele Varrazzo [Mon, 1 Sep 2025 15:22:34 +0000 (17:22 +0200)] 
fix(c): fix excessive buffer allocation in binary copy

Fix #1147

3 weeks agochore: bump mypy, remove a now unneeded ignore
Daniele Varrazzo [Fri, 12 Sep 2025 15:18:37 +0000 (17:18 +0200)] 
chore: bump mypy, remove a now unneeded ignore

3 weeks agotest: fix tests with master version of crdb
Daniele Varrazzo [Fri, 12 Sep 2025 15:14:00 +0000 (17:14 +0200)] 
test: fix tests with master version of crdb

The server version reported is 250300. Tests fail with the error:

    psycopg.errors.OperatorIntervention: this schema change is
    disallowed because table "execmany" is locked and this operation cannot
    automatically unlock the table

    DETAIL:  To unlock the table, execute `ALTER TABLE execmany SET (schema_locked = false);`

    After the schema change completes, we recommend setting it back to
    true with `ALTER TABLE execmany SET (schema_locked = true);`.

    HINT:  Locking the table improves changefeed performance; see
    https://www.cockroachlabs.com/docs/dev/changefeed-best-practices.html#lock-the-schema-on-changefeed-watched-tables

3 weeks agochore(ci): bump crdb test versions
Daniele Varrazzo [Fri, 12 Sep 2025 15:13:38 +0000 (17:13 +0200)] 
chore(ci): bump crdb test versions

3 weeks agoci: run lint/tests in any branches
Daniele Varrazzo [Fri, 12 Sep 2025 14:33:23 +0000 (16:33 +0200)] 
ci: run lint/tests in any branches

The `*` results in branches with a `/` excluded.

Also exclude running tests if only docs change.

3 weeks agoMerge pull request #1166 from psycopg/fix-builtin-dumper-loader
Daniele Varrazzo [Thu, 11 Sep 2025 10:26:41 +0000 (12:26 +0200)] 
Merge pull request #1166 from psycopg/fix-builtin-dumper-loader

Don't raise a warning using a builtin for JSON dumps/loads

3 weeks agofix: drop warning for objects passed as JSON lods/dump function 1166/head
Daniele Varrazzo [Wed, 10 Sep 2025 19:55:02 +0000 (21:55 +0200)] 
fix: drop warning for objects passed as JSON lods/dump function

Just optimistically assume that they are ok and will not cause leaks.
The possibility of there being something else which might cause a leak
is lower than the possibility that we didn't think about something else
and raise a warning, refusing to cache the loader, and really cause a
leak.

3 weeks agofix: don't raise a warning using a builtin for JSON dumps/loads
Daniele Varrazzo [Wed, 10 Sep 2025 10:07:46 +0000 (12:07 +0200)] 
fix: don't raise a warning using a builtin for JSON dumps/loads

These types are stable so will not leak. However they have no
code/closure dunder attr so they will raise a warning.

Fix #1165.

3 weeks agodocs: add simple example of identifier binding with t-strings
Daniele Varrazzo [Tue, 9 Sep 2025 00:03:50 +0000 (02:03 +0200)] 
docs: add simple example of identifier binding with t-strings

3 weeks agochore: bump psycopg package version to 3.3.0.dev2
Daniele Varrazzo [Mon, 8 Sep 2025 22:14:41 +0000 (00:14 +0200)] 
chore: bump psycopg package version to 3.3.0.dev2

3 weeks agodocs: mention version 3.3.0.dev1 download link in template string page
Daniele Varrazzo [Mon, 8 Sep 2025 22:13:50 +0000 (00:13 +0200)] 
docs: mention version 3.3.0.dev1 download link in template string page

3 weeks agofix: typo in notifications warning
Daniele Varrazzo [Mon, 8 Sep 2025 11:06:44 +0000 (13:06 +0200)] 
fix: typo in notifications warning

3 weeks agoMerge pull request #1054 from psycopg/template-strings
Daniele Varrazzo [Mon, 8 Sep 2025 15:29:24 +0000 (17:29 +0200)] 
Merge pull request #1054 from psycopg/template-strings

Add template strings support.

3 weeks agodocs: add template strings query documentation 1054/head
Daniele Varrazzo [Sun, 25 May 2025 22:22:13 +0000 (23:22 +0100)] 
docs: add template strings query documentation

3 weeks agofeat: implement template strings
Daniele Varrazzo [Sun, 25 May 2025 19:20:26 +0000 (20:20 +0100)] 
feat: implement template strings

3 weeks agofeat: add typing support for template strings
Daniele Varrazzo [Tue, 29 Apr 2025 20:32:18 +0000 (22:32 +0200)] 
feat: add typing support for template strings

3 weeks agorefactor(query): add private method to convert to bytes
Daniele Varrazzo [Sun, 25 May 2025 18:50:19 +0000 (19:50 +0100)] 
refactor(query): add private method to convert to bytes

3 weeks agorefactor: move PostgresRawQuery to _queries module
Daniele Varrazzo [Tue, 29 Apr 2025 22:00:09 +0000 (00:00 +0200)] 
refactor: move PostgresRawQuery to _queries module

3 weeks agotest: add module to test with template strings
Daniele Varrazzo [Tue, 29 Apr 2025 17:04:50 +0000 (19:04 +0200)] 
test: add module to test with template strings

Skip module collection on Python version which don't support the syntax.

3 weeks agochore: exclude linters run on tstring test module
Daniele Varrazzo [Tue, 29 Apr 2025 17:09:18 +0000 (19:09 +0200)] 
chore: exclude linters run on tstring test module

Currently the tooling doesn't support the syntax yet.

3 weeks agoci: switch to windows-2025 runners
Daniele Varrazzo [Sun, 7 Sep 2025 14:16:30 +0000 (16:16 +0200)] 
ci: switch to windows-2025 runners

3 weeks agochore: bump psycopg package version to 3.2.10
Daniele Varrazzo [Sun, 7 Sep 2025 15:44:54 +0000 (17:44 +0200)] 
chore: bump psycopg package version to 3.2.10

4 weeks agochore: isort
Daniele Varrazzo [Sun, 7 Sep 2025 15:41:32 +0000 (17:41 +0200)] 
chore: isort

4 weeks agoMerge pull request #1139 from psycopg/gssencmode-disable
Daniele Varrazzo [Sun, 7 Sep 2025 14:09:39 +0000 (16:09 +0200)] 
Merge pull request #1139 from psycopg/gssencmode-disable

Set gssencmode default to disable in binary package builds

4 weeks agoci: use separate build caches between psycopg 3.2 and 3.3 1139/head
Daniele Varrazzo [Tue, 26 Aug 2025 11:22:12 +0000 (13:22 +0200)] 
ci: use separate build caches between psycopg 3.2 and 3.3

Introduce a suffix to change the cache key arbitrarily, to keep libpq
builds on different branches separate and not pollute each other's
cache.

4 weeks agofix: change default gssencmode to disable in built libpq
Daniele Varrazzo [Tue, 26 Aug 2025 02:47:57 +0000 (04:47 +0200)] 
fix: change default gssencmode to disable in built libpq

Fix #1136

4 weeks agofeat: raise a warning if a GSS connection is obtained using the libpq default
Daniele Varrazzo [Tue, 26 Aug 2025 01:28:16 +0000 (03:28 +0200)] 
feat: raise a warning if a GSS connection is obtained using the libpq default

Suggest the user to specify a 'gssencmode' setting explicitly so that,
in the future, we will be able to change the setting default to 'disable'.

Note: the warning in psycopg 3.3 is a runtime warning; in 3.2.x was a
deprectation warning.

See #1136

4 weeks agochore: restrict flake8 ignore on generated file to lines length only
Daniele Varrazzo [Sun, 7 Sep 2025 14:05:58 +0000 (16:05 +0200)] 
chore: restrict flake8 ignore on generated file to lines length only

4 weeks agoMerge branch 'pg18'
Daniele Varrazzo [Sun, 7 Sep 2025 13:53:56 +0000 (15:53 +0200)] 
Merge branch 'pg18'

4 weeks agofeat: add `ConnectionInfo.full_protocol_version` 1098/head
Daniele Varrazzo [Sat, 5 Jul 2025 12:54:39 +0000 (14:54 +0200)] 
feat: add `ConnectionInfo.full_protocol_version`

Add matching Capabilities methods too to allow checking if supported.

4 weeks agofeat: add PGconn.full_protocol_version attributes
Daniele Varrazzo [Sat, 5 Jul 2025 11:50:02 +0000 (13:50 +0200)] 
feat: add PGconn.full_protocol_version attributes

Wrap libpq 18 PQfullProtocolVersion functions.

See #1079

4 weeks agodocs: mention PostgreSQL v18 support
Daniele Varrazzo [Sun, 11 May 2025 20:50:58 +0000 (22:50 +0200)] 
docs: mention PostgreSQL v18 support

4 weeks agoci: add PostgreSQL 18 to the test grid
Daniele Varrazzo [Sun, 7 Sep 2025 11:46:57 +0000 (13:46 +0200)] 
ci: add PostgreSQL 18 to the test grid

4 weeks agochore: add PostgreSQL 18 exceptions
Daniele Varrazzo [Sun, 11 May 2025 20:48:26 +0000 (22:48 +0200)] 
chore: add PostgreSQL 18 exceptions

4 weeks agofix: add ConnStatus.CONNECTION_AUTHENTICATING value
Daniele Varrazzo [Sun, 11 May 2025 20:43:00 +0000 (22:43 +0200)] 
fix: add ConnStatus.CONNECTION_AUTHENTICATING value

Introduced in PostgreSQL 18

4 weeks agoMerge branch 'fix-notifies-leak'
Daniele Varrazzo [Sun, 7 Sep 2025 11:42:25 +0000 (13:42 +0200)] 
Merge branch 'fix-notifies-leak'

4 weeks agodocs: document the changes to notifies generator
Daniele Varrazzo [Sat, 6 Sep 2025 21:44:42 +0000 (23:44 +0200)] 
docs: document the changes to notifies generator

4 weeks agofix: raise a warning when notifies generator and handlers are used together
Daniele Varrazzo [Sat, 6 Sep 2025 22:14:48 +0000 (00:14 +0200)] 
fix: raise a warning when notifies generator and handlers are used together

4 weeks agofix: collect notifies only if no handler was registered
Daniele Varrazzo [Wed, 14 May 2025 15:16:03 +0000 (17:16 +0200)] 
fix: collect notifies only if no handler was registered

If someone is listening to notifications by using an handler, the
notifies backlog would fill without ever being emptied.

This change has the risk of breaking something if someone is relying on
notifies being received both via callback and via generator, but I don't
know how to satisfy it without creating a leak to users who don't use the
generator. Will ask around...

Fix #1091.

4 weeks agoMerge branch 'fix-executemany-lock'
Daniele Varrazzo [Sat, 6 Sep 2025 20:22:46 +0000 (22:22 +0200)] 
Merge branch 'fix-executemany-lock'

4 weeks agofix: keep a lock for the entire duration of executemany
Daniele Varrazzo [Sat, 6 Sep 2025 01:00:24 +0000 (03:00 +0200)] 
fix: keep a lock for the entire duration of executemany

Before this change we had the lock context inside the pipeline context,
because conn.pipepline() and Pipeline.__enter/exit__ take a lock. But
this created windows of opportunities for other threads to execute
concurrent operations on the connection, resulting in "another command
is already in progress" errors.

Fix #1130.

4 weeks agorefactor: auto-generate sync pipeline object from async one
Daniele Varrazzo [Fri, 5 Sep 2025 23:57:52 +0000 (01:57 +0200)] 
refactor: auto-generate sync pipeline object from async one

4 weeks agorefactor: separate sync/async pipeline in their own modules
Daniele Varrazzo [Fri, 5 Sep 2025 23:48:48 +0000 (01:48 +0200)] 
refactor: separate sync/async pipeline in their own modules

4 weeks agorefactor: introduce ALock/Lock in acompat
Daniele Varrazzo [Sat, 6 Sep 2025 00:21:22 +0000 (02:21 +0200)] 
refactor: introduce ALock/Lock in acompat

4 weeks agofix: fix excessive buffer resizing on int16 dump
jerch [Sat, 6 Sep 2025 14:47:31 +0000 (16:47 +0200)] 
fix: fix excessive buffer resizing on int16 dump

Fix #1160

4 weeks agoMerge pull request #1053 from psycopg/py314
Daniele Varrazzo [Tue, 2 Sep 2025 22:25:57 +0000 (00:25 +0200)] 
Merge pull request #1053 from psycopg/py314

Add support for Python 3.14

4 weeks agodocs: mention Python 3.14 support in news file 1053/head
Daniele Varrazzo [Tue, 2 Sep 2025 22:23:15 +0000 (00:23 +0200)] 
docs: mention Python 3.14 support in news file

4 weeks agotest: fix pproxy compatibility with Python 3.14
Daniele Varrazzo [Sun, 31 Aug 2025 19:20:50 +0000 (21:20 +0200)] 
test: fix pproxy compatibility with Python 3.14

Work around the issue reported in https://github.com/qwj/python-proxy/issues/200

4 weeks agoci: test with Python 3.14 non-dev
Daniele Varrazzo [Fri, 29 Aug 2025 18:11:05 +0000 (20:11 +0200)] 
ci: test with Python 3.14 non-dev

4 weeks agochore(test): drop use of asyncio event loop policy
Daniele Varrazzo [Fri, 29 Aug 2025 16:52:42 +0000 (18:52 +0200)] 
chore(test): drop use of asyncio event loop policy

Deprecated since Python 3.14

4 weeks agoci(alpine): install missing libraris required to test and package wheels
Daniele Varrazzo [Fri, 29 Aug 2025 15:11:54 +0000 (17:11 +0200)] 
ci(alpine): install missing libraris required to test and package wheels

Since some recent alpine version the krb5-libs package is not installed by
default anymore. When building the libpq the package got installed as a
side effect of installing krb5-dev, but, in case libpq build was cached,
the libraries would have been missing when packaging the wheel or
importing psycopg for test.

4 weeks agochore: bump cibuildwheel to 3.1.4
Daniele Varrazzo [Tue, 26 Aug 2025 15:54:24 +0000 (17:54 +0200)] 
chore: bump cibuildwheel to 3.1.4

It should help with Python 3.14 builds.

4 weeks agochore: add Python 3.14 to supported version metadata and docs
Daniele Varrazzo [Tue, 29 Apr 2025 12:26:39 +0000 (14:26 +0200)] 
chore: add Python 3.14 to supported version metadata and docs

4 weeks agoci: add Python 3.14 dev to package build
Daniele Varrazzo [Tue, 29 Apr 2025 12:26:15 +0000 (14:26 +0200)] 
ci: add Python 3.14 dev to package build

4 weeks agoci: add Python 3.14 version to test grid
Daniele Varrazzo [Sun, 27 Apr 2025 21:47:15 +0000 (23:47 +0200)] 
ci: add Python 3.14 version to test grid

4 weeks agochore(tests): drop deprecated unittest redefinitions
Daniele Varrazzo [Mon, 1 Sep 2025 09:16:22 +0000 (11:16 +0200)] 
chore(tests): drop deprecated unittest redefinitions

Not used anymore in legacy tests.

5 weeks agodoc: fix formatting of SQL command in documentation
Ao Liu, Ph.D., CSM [Sat, 30 Aug 2025 00:36:23 +0000 (19:36 -0500)] 
doc: fix formatting of SQL command in documentation

5 weeks agodocs: fix reST typo
Daniele Varrazzo [Tue, 26 Aug 2025 15:11:33 +0000 (17:11 +0200)] 
docs: fix reST typo

5 weeks agodocs: add notes about how to add libpq wrapper functions
Daniele Varrazzo [Tue, 26 Aug 2025 15:07:36 +0000 (17:07 +0200)] 
docs: add notes about how to add libpq wrapper functions

5 weeks agoMerge pull request #1140 from psycopg/add-used-gssapi
Daniele Varrazzo [Tue, 26 Aug 2025 15:07:04 +0000 (17:07 +0200)] 
Merge pull request #1140 from psycopg/add-used-gssapi

Add `PGconn.used_gssapi` attribute

5 weeks agofeat: expose used_gssapi attribute to the public API 1140/head
Daniele Varrazzo [Tue, 26 Aug 2025 02:16:25 +0000 (04:16 +0200)] 
feat: expose used_gssapi attribute to the public API

Already implemented in 3.1.10, but kept as internal implementation.

Fix #1138

5 weeks agofeat: add support for libpq PQconnectionUsedGSSAPI()
Daniele Varrazzo [Mon, 25 Aug 2025 16:35:30 +0000 (18:35 +0200)] 
feat: add support for libpq PQconnectionUsedGSSAPI()

We will not advertise its presence as PGconn.used_gssapi until Psycopg
3.3. However we can use it internally to implement a warning to check
the implicit usage of gssencmode=prefer.

See #1136

5 weeks agodocs: fix confusing comment from readme
Daniele Varrazzo [Tue, 26 Aug 2025 03:24:48 +0000 (05:24 +0200)] 
docs: fix confusing comment from readme

5 weeks agodocs: drop pip upgrade info from readme
Daniele Varrazzo [Tue, 26 Aug 2025 03:22:55 +0000 (05:22 +0200)] 
docs: drop pip upgrade info from readme

Most systems will have the minimum required version 20.3 already.

5 weeks agofix: fix typo require version X and greater -> or greater
Daniele Varrazzo [Tue, 26 Aug 2025 02:00:48 +0000 (04:00 +0200)] 
fix: fix typo require version X and greater -> or greater

6 weeks agotest: use current timezone name
Daniele Varrazzo [Tue, 19 Aug 2025 14:51:35 +0000 (16:51 +0200)] 
test: use current timezone name

2 months agochore: bump mypy to 1.17 in dev extra dependencies too
Daniele Varrazzo [Tue, 22 Jul 2025 11:44:16 +0000 (13:44 +0200)] 
chore: bump mypy to 1.17 in dev extra dependencies too

2 months agoMerge branch 'fix-binary-version'
Daniele Varrazzo [Tue, 22 Jul 2025 11:39:05 +0000 (13:39 +0200)] 
Merge branch 'fix-binary-version'

2 months agofix(binary): fix __version__
Daniele Varrazzo [Tue, 22 Jul 2025 01:31:15 +0000 (03:31 +0200)] 
fix(binary): fix __version__

It was taken from the psycopg-c package, so it might have been wrong or,
more likely, reported as 0.0.0.0 because not installed.

2 months agotest: verify the version is sane
Daniele Varrazzo [Tue, 22 Jul 2025 00:33:22 +0000 (02:33 +0200)] 
test: verify the version is sane

2 months agochore: bump mypy to 1.17
Daniele Varrazzo [Tue, 22 Jul 2025 00:16:21 +0000 (02:16 +0200)] 
chore: bump mypy to 1.17

2 months agoMerge branch 'cursor-results'
Daniele Varrazzo [Wed, 16 Jul 2025 13:08:38 +0000 (15:08 +0200)] 
Merge branch 'cursor-results'

2 months agotest: more comprehensive results() tests 1081/head
Daniele Varrazzo [Sat, 12 Jul 2025 05:42:59 +0000 (07:42 +0200)] 
test: more comprehensive results() tests

Test the records returned, not only the generator results.

2 months agochore(async-to-sync): handle generator expressions
Daniele Varrazzo [Sat, 12 Jul 2025 05:44:04 +0000 (07:44 +0200)] 
chore(async-to-sync): handle generator expressions

2 months agotest: fix results() test
Daniele Varrazzo [Sat, 12 Jul 2025 05:08:45 +0000 (07:08 +0200)] 
test: fix results() test

Test a server-side cursor for real, drop unneeded parametrization.

2 months agodocs: cleanup of `results()` documentation
Daniele Varrazzo [Sat, 12 Jul 2025 05:03:08 +0000 (07:03 +0200)] 
docs: cleanup of `results()` documentation

2 months agodocs: document Cursor.results() and add rease note
Martin Baláž [Fri, 9 May 2025 10:10:05 +0000 (12:10 +0200)] 
docs: document Cursor.results() and add rease note

2 months agotest: test Cursor.results() method
Martin Baláž [Fri, 9 May 2025 10:08:54 +0000 (12:08 +0200)] 
test: test Cursor.results() method

2 months agofeat: add Cursor.results() method
Martin Baláž [Fri, 9 May 2025 10:08:05 +0000 (12:08 +0200)] 
feat: add Cursor.results() method

2 months agoMerge branch 'fix-cancelled-error-shadowing'
Daniele Varrazzo [Sat, 12 Jul 2025 04:39:48 +0000 (06:39 +0200)] 
Merge branch 'fix-cancelled-error-shadowing'

2 months agofix(c): avoid a TypeError shadowing CancelledError on task cancellation
Daniele Varrazzo [Fri, 11 Jul 2025 23:13:32 +0000 (01:13 +0200)] 
fix(c): avoid a TypeError shadowing CancelledError on task cancellation

Fix #1005.

2 months agoMerge branch 'dependabot/github_actions/master/actions-d86b61c7bf'
Daniele Varrazzo [Wed, 9 Jul 2025 11:23:28 +0000 (13:23 +0200)] 
Merge branch 'dependabot/github_actions/master/actions-d86b61c7bf'

2 months agochore: drop i686 images build 1114/head
Daniele Varrazzo [Sat, 5 Jul 2025 17:38:43 +0000 (19:38 +0200)] 
chore: drop i686 images build

It has become opt-in in cibuildwheel, so it's a good moment to remove
these packages.

2 months agochore(deps): bump pypa/cibuildwheel in the actions group
dependabot[bot] [Tue, 1 Jul 2025 09:16:38 +0000 (09:16 +0000)] 
chore(deps): bump pypa/cibuildwheel in the actions group

Bumps the actions group with 1 update: [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel).

Updates `pypa/cibuildwheel` from 2.23.3 to 3.0.0
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.23.3...v3.0.0)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2 months agotest: fix failure in test_connection_warn_close
Daniele Varrazzo [Sat, 5 Jul 2025 22:47:40 +0000 (00:47 +0200)] 
test: fix failure in test_connection_warn_close

Create all the connections beforehand otherwise some may reuse the same
address, resulting in a duplicated warning message, which would be
omitted and fail the test.

3 months agofix: don't call str(self) or imported objects in __del__
Daniele Varrazzo [Wed, 30 Apr 2025 00:37:23 +0000 (02:37 +0200)] 
fix: don't call str(self) or imported objects in __del__

We easily end up trying to access resources already unavailable in the
objects representation. In Python 3.14 this seems to happen aggressively
(or maybe it's just more visible because testing a dev version).

3 months agofix: change signature of SQL.join() to allow a sequence of Any
Daniele Varrazzo [Tue, 20 May 2025 15:06:06 +0000 (17:06 +0200)] 
fix: change signature of SQL.join() to allow a sequence of Any

We declared accepting a sequence of Composable, but, because we passed
the joined values to `Composite`, actually non-composable were
interpreted as `Literal`.

Make this behaviour explicit by testing it and fixing the signature.

3 months agochore: run isort before other hooks
Daniele Varrazzo [Mon, 12 May 2025 15:13:57 +0000 (17:13 +0200)] 
chore: run isort before other hooks

It's quicker to fail than mypy.

3 months agoMerge branch 'fix-jsonb-function-caching-master'
Daniele Varrazzo [Sat, 5 Jul 2025 17:07:52 +0000 (19:07 +0200)] 
Merge branch 'fix-jsonb-function-caching-master'

3 months agofix(json): don't leak when lambdas are used as dumps/loads function
Daniele Varrazzo [Fri, 4 Jul 2025 18:00:43 +0000 (20:00 +0200)] 
fix(json): don't leak when lambdas are used as dumps/loads function

Cache functions on the code, not on the function identity itself:
different lambdas or local functions are different objects but he
underlying code object is the same.

Avoid caching if the function is a closure because it then becomes a can
of worms (if the argument is not hashable etc). Throw a warning in that
case.

Fix #1108

fix(json): don't leak when lambdas are used as loads function

3 months agofix: add missing interface for PGconn.protocol_version
Daniele Varrazzo [Sat, 5 Jul 2025 13:22:12 +0000 (15:22 +0200)] 
fix: add missing interface for PGconn.protocol_version

4 months agoMerge branch 'fix-1088'
Daniele Varrazzo [Wed, 4 Jun 2025 19:09:09 +0000 (20:09 +0100)] 
Merge branch 'fix-1088'

4 months agoci: cancel concurrent binary build jobs
Daniele Varrazzo [Wed, 4 Jun 2025 15:40:29 +0000 (16:40 +0100)] 
ci: cancel concurrent binary build jobs

4 months agodocs: mention fix in version 3.2.9
Daniele Varrazzo [Tue, 13 May 2025 14:07:47 +0000 (16:07 +0200)] 
docs: mention fix in version 3.2.9

4 months agoRevert "ci: install win32 libpq from conda force"
Daniele Varrazzo [Wed, 4 Jun 2025 15:38:36 +0000 (16:38 +0100)] 
Revert "ci: install win32 libpq from conda force"

This reverts commit a05131ded8f1ec1816528341c5453fd586e70a4b.

Fix #1088