]> git.ipfire.org Git - thirdparty/psycopg.git/log
thirdparty/psycopg.git
2 years agotest: fail test session in case of segfault maint-3.0
Daniele Varrazzo [Thu, 15 Sep 2022 01:07:57 +0000 (02:07 +0100)] 
test: fail test session in case of segfault

Before that, tox reruns would have made tests pass, because failed tests
wouldn't have gotten a chance to be written in the cache.

2 years agoMerge branch 'fix-372-3.0' into maint-3.0
Daniele Varrazzo [Wed, 14 Sep 2022 21:54:26 +0000 (22:54 +0100)] 
Merge branch 'fix-372-3.0' into maint-3.0

2 years agofix(psycopg_c): propagate exceptions in Transformer.set_pgresult()
Daniele Varrazzo [Wed, 14 Sep 2022 21:02:38 +0000 (22:02 +0100)] 
fix(psycopg_c): propagate exceptions in Transformer.set_pgresult()

Fix #372

2 years agotest: add test to verify the behavior of adapters failing init
Daniele Varrazzo [Wed, 14 Sep 2022 20:57:05 +0000 (21:57 +0100)] 
test: add test to verify the behavior of adapters failing init

An exception in loader init doesn't get raised and causes a segfault.
This reproduces the issue in #372.

2 years agorefactor(psycopg_c): define loggers at module level
Daniele Varrazzo [Wed, 14 Sep 2022 14:14:32 +0000 (15:14 +0100)] 
refactor(psycopg_c): define loggers at module level

2 years agochore: bump to next dev version number
Daniele Varrazzo [Tue, 6 Sep 2022 11:48:36 +0000 (12:48 +0100)] 
chore: bump to next dev version number

2 years agochore: bump to version number 3.0.18 3.0.18
Daniele Varrazzo [Mon, 5 Sep 2022 12:26:02 +0000 (13:26 +0100)] 
chore: bump to version number 3.0.18

2 years agoMerge branch 'macos-broken-3.0' into maint-3.0
Daniele Varrazzo [Mon, 5 Sep 2022 12:24:34 +0000 (13:24 +0100)] 
Merge branch 'macos-broken-3.0' into maint-3.0

2 years agodocs: add news entry about Homebrew fix
Daniele Varrazzo [Mon, 5 Sep 2022 11:28:05 +0000 (12:28 +0100)] 
docs: add news entry about Homebrew fix

2 years agorefactor: add find_libpq_full_path() to use both in library and tests
Daniele Varrazzo [Mon, 5 Sep 2022 11:09:33 +0000 (12:09 +0100)] 
refactor: add find_libpq_full_path() to use both in library and tests

2 years agofix(macos): find the libpq in non-standard places
Daniele Varrazzo [Mon, 5 Sep 2022 09:56:06 +0000 (10:56 +0100)] 
fix(macos): find the libpq in non-standard places

2 years agochore: upgrade QEMU to v2 for build
Daniele Varrazzo [Sat, 3 Sep 2022 18:24:52 +0000 (19:24 +0100)] 
chore: upgrade QEMU to v2 for build

Also make sure to use a version not affected by bug #304

2 years agofix: make sure to pass a port number to getaddrinfo
Daniele Varrazzo [Fri, 2 Sep 2022 15:30:23 +0000 (16:30 +0100)] 
fix: make sure to pass a port number to getaddrinfo

Was passing an empty string by mistake, if no port was specified. Mostly
not a problem, except on some platforms, where it causes an
"unrecognized service" error.

Close #366.

2 years agochore: bump to next dev release
Daniele Varrazzo [Sun, 4 Sep 2022 09:21:06 +0000 (10:21 +0100)] 
chore: bump to next dev release

2 years agochore: bump to version 3.0.17 3.0.17
Daniele Varrazzo [Mon, 29 Aug 2022 22:52:03 +0000 (23:52 +0100)] 
chore: bump to version 3.0.17

2 years agofix: load bytea as bytes, not memoryview, in Python implementation
Daniele Varrazzo [Mon, 29 Aug 2022 01:10:27 +0000 (02:10 +0100)] 
fix: load bytea as bytes, not memoryview, in Python implementation

2 years agofix: use a "finally" to clear the result pointer after handling notifies
Daniele Varrazzo [Sat, 27 Aug 2022 20:29:56 +0000 (21:29 +0100)] 
fix: use a "finally" to clear the result pointer after handling notifies

The chance for this to fail failed is slim (an error in the logger? A
ctrl-c just there?) but a bit of paranoia has never hurt anyone.

2 years agoperf(pq_ctypes): use the faster byref() rather than pointer()
Daniele Varrazzo [Sat, 27 Aug 2022 20:28:22 +0000 (21:28 +0100)] 
perf(pq_ctypes): use the faster byref() rather than pointer()

2 years agoMerge branch 'pgnotifyfixes-3.0' into maint-3.0
Daniele Varrazzo [Sun, 28 Aug 2022 12:01:00 +0000 (13:01 +0100)] 
Merge branch 'pgnotifyfixes-3.0' into maint-3.0

2 years agodocs: add entry about segfault on fork fixed
Daniele Varrazzo [Sun, 28 Aug 2022 10:00:12 +0000 (11:00 +0100)] 
docs: add entry about segfault on fork fixed

2 years agofix: use a static notification function for PQsetNoticeReceiver.
Florian Apolloner [Sat, 27 Aug 2022 15:36:33 +0000 (17:36 +0200)] 
fix: use a static notification function for PQsetNoticeReceiver.

The connection is passed via the optional *arg.

Fixes #300

2 years agochore: bump to next dev version number
Daniele Varrazzo [Sun, 28 Aug 2022 10:02:27 +0000 (11:02 +0100)] 
chore: bump to next dev version number

2 years agobuild: build ldap with sasl and ssl support
Daniele Varrazzo [Sat, 27 Aug 2022 11:37:45 +0000 (12:37 +0100)] 
build: build ldap with sasl and ssl support

Pass the libpq build prefix to configure in order to find just built
libraries.

2 years agobuild: upgrade system packages before building libpq
Daniele Varrazzo [Sat, 27 Aug 2022 12:12:55 +0000 (13:12 +0100)] 
build: upgrade system packages before building libpq

2 years agochore: upgrade libpq dependencies
Daniele Varrazzo [Sat, 27 Aug 2022 10:01:48 +0000 (11:01 +0100)] 
chore: upgrade libpq dependencies

2 years agodocs: fix link to numeric-to-float recipe
Daniele Varrazzo [Wed, 24 Aug 2022 17:50:18 +0000 (19:50 +0200)] 
docs: fix link to numeric-to-float recipe

2 years agoci: don't install modules in editable mode to run packages test
Daniele Varrazzo [Mon, 22 Aug 2022 09:42:52 +0000 (11:42 +0200)] 
ci: don't install modules in editable mode to run packages test

Something else that broke after setuptools 64 release. See tox-dev/tox#2479
for more details.

Reported something at pypa/setuptools#3557

2 years agorefactor(psycopg_c): define and use an ARRAYSIZE macro
Daniele Varrazzo [Sat, 13 Aug 2022 01:44:17 +0000 (03:44 +0200)] 
refactor(psycopg_c): define and use an ARRAYSIZE macro

2 years agorefactor(psycopg_c): drop deprecated use of DEF in Cython
Daniele Varrazzo [Sat, 13 Aug 2022 01:19:35 +0000 (03:19 +0200)] 
refactor(psycopg_c): drop deprecated use of DEF in Cython

See cython/cython#4310

2 years agorefactor: expose optimized functions directly from the origin modules
Daniele Varrazzo [Mon, 15 Aug 2022 00:49:24 +0000 (02:49 +0200)] 
refactor: expose optimized functions directly from the origin modules

Don't check for the availability of the optimized module in every module
using potentially optimized functions.

2 years agofix(psycopg_c): guard PQflush calls for invalid connections
Daniele Varrazzo [Mon, 15 Aug 2022 00:46:19 +0000 (02:46 +0200)] 
fix(psycopg_c): guard PQflush calls for invalid connections

Unlike other libpq functions, PQflush() doesn't have a guard for invalid
connections and will segfault if the connection gets closed.

Also check the return value of the PQflush calls: as we are not using
the wrapped version pgconn.flush(), the function doesn't automatically
throw an exception on failure.

2 years agochore: use `license_files` entry in metadata
Daniele Varrazzo [Sat, 13 Aug 2022 00:32:21 +0000 (02:32 +0200)] 
chore: use `license_files` entry in metadata

`license_file` is deprecated.

2 years agoci: specify non-editable install in tox tests
Daniele Varrazzo [Fri, 12 Aug 2022 23:35:41 +0000 (01:35 +0200)] 
ci: specify non-editable install in tox tests

Work around tox-dev/tox#2479 (editable installs in tox broken by setuptools
v64) and tox-dev/tox#2480 (failure to use `toxinidir` in `deps`).

Use -e consistently in the linting steps instead, because they are
defined with skip_install=True so it seems a good idea to use it. These
steps don't seem affect by the setuptools issue.

2 years agobuild(docs): don't exit with success if building html docs failed
Daniele Varrazzo [Sun, 20 Mar 2022 11:32:36 +0000 (12:32 +0100)] 
build(docs): don't exit with success if building html docs failed

Responsible of 2020-03-19 docs downtime. See #252.

3 years agobuild: use "latest" version of github builders
Daniele Varrazzo [Thu, 28 Jul 2022 13:19:16 +0000 (15:19 +0200)] 
build: use "latest" version of github builders

3 years agoMerge branch 'build-macos-arm64-3' into maint-3.0 3.0.16
Daniele Varrazzo [Thu, 28 Jul 2022 11:20:04 +0000 (13:20 +0200)] 
Merge branch 'build-macos-arm64-3' into maint-3.0

3 years agodocs: mention macOS arm64 build script in news file
Daniele Varrazzo [Thu, 28 Jul 2022 11:17:23 +0000 (13:17 +0200)] 
docs: mention macOS arm64 build script in news file

3 years agobuild: add scripts to build macOS arm64 packages
Daniele Varrazzo [Sat, 16 Jul 2022 18:50:45 +0000 (19:50 +0100)] 
build: add scripts to build macOS arm64 packages

3 years agochore: bump version number to 3.0.16
Daniele Varrazzo [Thu, 28 Jul 2022 10:08:06 +0000 (12:08 +0200)] 
chore: bump version number to 3.0.16

3 years agoMerge branch 'fix-343' into maint-3.0
Daniele Varrazzo [Thu, 28 Jul 2022 10:05:46 +0000 (12:05 +0200)] 
Merge branch 'fix-343' into maint-3.0

3 years agofix: fix Cursor.rowcount after non-SELECT tuple-returining queries
Daniele Varrazzo [Thu, 28 Jul 2022 09:34:57 +0000 (11:34 +0200)] 
fix: fix Cursor.rowcount after non-SELECT tuple-returining queries

PQcmdTuples doesn't return a value after SHOW and other type of queries.

Close #343

3 years agotest: add tests to reveal the rowcount problem with SHOW
Daniele Varrazzo [Thu, 28 Jul 2022 09:26:49 +0000 (11:26 +0200)] 
test: add tests to reveal the rowcount problem with SHOW

See #343

3 years agochore: re-export names to fix mypy 0.971 error
Daniele Varrazzo [Thu, 28 Jul 2022 10:03:20 +0000 (12:03 +0200)] 
chore: re-export names to fix mypy 0.971 error

3 years agoMerge branch 'docs-no-external-modules' into maint-3.0
Daniele Varrazzo [Mon, 18 Jul 2022 23:43:43 +0000 (00:43 +0100)] 
Merge branch 'docs-no-external-modules' into maint-3.0

3 years agodocs: allow to read the libpq definitions from a local file
Daniele Varrazzo [Mon, 18 Jul 2022 13:39:55 +0000 (14:39 +0100)] 
docs: allow to read the libpq definitions from a local file

For the poor souls which don't have external access building the docs.
See #337.

3 years agodocs: upgrade sphinx version to build docs
Daniele Varrazzo [Mon, 18 Jul 2022 13:28:30 +0000 (14:28 +0100)] 
docs: upgrade sphinx version to build docs

The version of furo used is not compatible with the newly available
Sphinx.

3 years agodocs: fix build with sphinx 5.0
Martin Weinelt [Mon, 18 Jul 2022 11:58:55 +0000 (13:58 +0200)] 
docs: fix build with sphinx 5.0

The `no_docstring` argument to `Documenter.add_content()` has been
deprecated in Sphinx 3.4.0 and removed in Sphinx 5.0.

This will not break compatibility with earlier versions, since the
`no_docstring` argument always carried a default value.

https://github.com/sphinx-doc/sphinx/blob/v4.2.0/sphinx/ext/autodoc/__init__.py#L601
https://github.com/sphinx-doc/sphinx/blob/v4.5.0/sphinx/ext/autodoc/__init__.py#L596

3 years agodocs: move documentation from shapely module docstrings to docs
Daniele Varrazzo [Mon, 18 Jul 2022 07:34:25 +0000 (08:34 +0100)] 
docs: move documentation from shapely module docstrings to docs

This avoids the dependency on shapely to build the docs.

3 years agodocs: move documentation from _dns module docstrings to docs
Daniele Varrazzo [Mon, 18 Jul 2022 07:27:22 +0000 (08:27 +0100)] 
docs: move documentation from _dns module docstrings to docs

Allow to build the _dns documentation without importing the module,
which requires external dependencies.

3 years agodocs: add skip-list to avoid importing external module
Daniele Varrazzo [Mon, 18 Jul 2022 07:23:55 +0000 (08:23 +0100)] 
docs: add skip-list to avoid importing external module

In sandboxed environments dnspython doesn't work because it cannot read
`/etc/resolv.conf`/

See #337 for details.

3 years agotest: fix proxy-based tests confused by the PGHOST env var
Daniele Varrazzo [Tue, 12 Jul 2022 23:29:19 +0000 (00:29 +0100)] 
test: fix proxy-based tests confused by the PGHOST env var

3 years agotest: fix dsn manipulation tests confused by the env vars
Daniele Varrazzo [Tue, 12 Jul 2022 23:19:24 +0000 (00:19 +0100)] 
test: fix dsn manipulation tests confused by the env vars

Add fixture to clean up the PG* vars from the env and replace them with
the values to test.

3 years agodocs: fix install instruction in docker to test the pool too
Daniele Varrazzo [Tue, 12 Jul 2022 23:18:45 +0000 (00:18 +0100)] 
docs: fix install instruction in docker to test the pool too

3 years agochore: bump to next dev version
Daniele Varrazzo [Thu, 16 Jun 2022 22:43:19 +0000 (00:43 +0200)] 
chore: bump to next dev version

3 years agochore: bump version to release 3.0.15 3.0.15
Daniele Varrazzo [Tue, 14 Jun 2022 23:04:55 +0000 (01:04 +0200)] 
chore: bump version to release 3.0.15

3 years agoMerge branch 'manylinux2014' into maint-3.0
Daniele Varrazzo [Tue, 14 Jun 2022 22:54:01 +0000 (00:54 +0200)] 
Merge branch 'manylinux2014' into maint-3.0

3 years agotest: test wheel packages using PostgreSQL 14
Daniele Varrazzo [Tue, 14 Jun 2022 15:31:52 +0000 (17:31 +0200)] 
test: test wheel packages using PostgreSQL 14

Now all built packages support SCRAM authentication.

3 years agotest: verify that we distribute the libpq we want to build
Daniele Varrazzo [Tue, 14 Jun 2022 14:57:01 +0000 (16:57 +0200)] 
test: verify that we distribute the libpq we want to build

3 years agobuild: cache libpq build
Daniele Varrazzo [Mon, 13 Jun 2022 07:12:01 +0000 (09:12 +0200)] 
build: cache libpq build

3 years agobuild: build libpq 14 for musllinux packages
Daniele Varrazzo [Mon, 13 Jun 2022 01:15:31 +0000 (03:15 +0200)] 
build: build libpq 14 for musllinux packages

Currently Alpine ships with libpq 12, which wouldn't allow to use the
pipeline mode.

Use the system packages for the other libraries, for the moment.

3 years agobuild: build manylinux2014 packages
Daniele Varrazzo [Mon, 13 Jun 2022 00:04:59 +0000 (02:04 +0200)] 
build: build manylinux2014 packages

manylinux_2_24 is soon EOL and 2_28 will be incompatible with many
distributions to come. See <https://github.com/pypa/manylinux/issues/1332>.

Close #124

3 years agobuild: build the libpq from source when building wheels on centos platform
Daniele Varrazzo [Mon, 13 Jun 2022 00:01:57 +0000 (02:01 +0200)] 
build: build the libpq from source when building wheels on centos platform

3 years agobuild: set expected sysconfdir in libpq shipped with the binary package
Daniele Varrazzo [Sun, 12 Jun 2022 23:58:11 +0000 (01:58 +0200)] 
build: set expected sysconfdir in libpq shipped with the binary package

This affects where the pg_service.conf file is looked for.

See https://github.com/psycopg/psycopg2/issues/1365

3 years agochore: upgrade libraries to build binary packages
Daniele Varrazzo [Sun, 12 Jun 2022 23:26:06 +0000 (01:26 +0200)] 
chore: upgrade libraries to build binary packages

3 years agobuild: add script to build the libpq
Daniele Varrazzo [Sun, 12 Jun 2022 23:25:29 +0000 (01:25 +0200)] 
build: add script to build the libpq

Added as it currently is in the psycopg2 project.

3 years agochore: upgrade cibuildwheel to 2.6.1
Daniele Varrazzo [Sun, 12 Jun 2022 23:01:31 +0000 (01:01 +0200)] 
chore: upgrade cibuildwheel to 2.6.1

3 years agorefactor(copy) use already looked-up pgconn instead of the connection one
Daniele Varrazzo [Sat, 11 Jun 2022 08:46:01 +0000 (10:46 +0200)] 
refactor(copy) use already looked-up pgconn instead of the connection one

Left out of previous refactoring.

3 years agoMerge branch 'fix-315' into maint-3.0
Daniele Varrazzo [Wed, 8 Jun 2022 23:12:42 +0000 (01:12 +0200)] 
Merge branch 'fix-315' into maint-3.0

3 years agofix: raise DataError instead of OverflowError loading intervals too large
Daniele Varrazzo [Wed, 8 Jun 2022 22:12:20 +0000 (00:12 +0200)] 
fix: raise DataError instead of OverflowError loading intervals too large

This happened only for the binary format, not the text format.

3 years agodocs: mention different infinity date adaptation in psycopg2 differences pages
Daniele Varrazzo [Wed, 8 Jun 2022 22:11:52 +0000 (00:11 +0200)] 
docs: mention different infinity date adaptation in psycopg2 differences pages

See #315

3 years agofix: produce consistent error messages on timestamp overflow
Daniele Varrazzo [Wed, 8 Jun 2022 21:26:41 +0000 (23:26 +0200)] 
fix: produce consistent error messages on timestamp overflow

- State if the date is too small or too large, not just "not supported".
- Use similar messages in text and binary format.

See #315

3 years agofix: produce consistent error messages on date overflow
Daniele Varrazzo [Wed, 8 Jun 2022 16:30:13 +0000 (18:30 +0200)] 
fix: produce consistent error messages on date overflow

- State if the date is too small or too large, not just "not supported".
- Use similar messages in text and binary format.
- Avoid an overflow error with the infinity date in Python.

See #315

3 years agotest: move date-related tests to the date tests class
Daniele Varrazzo [Wed, 8 Jun 2022 16:29:35 +0000 (18:29 +0200)] 
test: move date-related tests to the date tests class

3 years agoMerge branch 'fix-stream' into maint-3.0
Daniele Varrazzo [Tue, 7 Jun 2022 07:55:15 +0000 (09:55 +0200)] 
Merge branch 'fix-stream' into maint-3.0

3 years agotest: add test to verify stream+close interaction
Daniele Varrazzo [Tue, 7 Jun 2022 07:41:14 +0000 (09:41 +0200)] 
test: add test to verify stream+close interaction

3 years agofix: restore the connection in usable state after an error in stream()
Daniele Varrazzo [Tue, 7 Jun 2022 07:21:03 +0000 (09:21 +0200)] 
fix: restore the connection in usable state after an error in stream()

3 years agofix: shorter tracebacks on stream() error
Daniele Varrazzo [Tue, 7 Jun 2022 04:46:56 +0000 (06:46 +0200)] 
fix: shorter tracebacks on stream() error

3 years agoMerge branch 'fix-copy-escape' into maint-3.0
Daniele Varrazzo [Sat, 28 May 2022 01:00:07 +0000 (02:00 +0100)] 
Merge branch 'fix-copy-escape' into maint-3.0

3 years agofix(copy): correctly escape non-printable chars
Daniele Varrazzo [Wed, 25 May 2022 21:10:04 +0000 (22:10 +0100)] 
fix(copy): correctly escape non-printable chars

Postgres was doing the right thing with them, but the format was wrong.

3 years agoperf(copy): avoid to call _write with empty buffer
Daniele Varrazzo [Wed, 25 May 2022 17:33:18 +0000 (18:33 +0100)] 
perf(copy): avoid to call _write with empty buffer

There is a call per row we can avoid if the formatter is buffering the
data produced.

3 years agotest: fix binary timedelta dumping text
Daniele Varrazzo [Fri, 20 May 2022 13:43:11 +0000 (15:43 +0200)] 
test: fix binary timedelta dumping text

We were testing text twice.

3 years agofix: drop "char" - character alias
Daniele Varrazzo [Mon, 23 May 2022 00:46:42 +0000 (02:46 +0200)] 
fix: drop "char" - character alias

"char", with quotes, is not an alias for character, bpchar is.
Don't rely on regtype to get its alias.

3 years agofix: don't emit a comma dumping timedelta objects
Daniele Varrazzo [Fri, 20 May 2022 13:35:31 +0000 (15:35 +0200)] 
fix: don't emit a comma dumping timedelta objects

The format '-1 day, 23:59:59' is understood OK by PostgreSQL but it's
not documented so it seems unwise to rely on it.

3 years agofix: shorter traceback even on COPY statement error
Daniele Varrazzo [Fri, 20 May 2022 08:55:17 +0000 (10:55 +0200)] 
fix: shorter traceback even on COPY statement error

The previous commit only addressed errors raised during transferring
data, not the initial COPY statement.

3 years agofix: shorter traceback on COPY error
Daniele Varrazzo [Thu, 19 May 2022 23:58:01 +0000 (01:58 +0200)] 
fix: shorter traceback on COPY error

3 years agofix: raise a shorter trackeback on interrupted notify connection
Daniele Varrazzo [Wed, 18 May 2022 20:45:48 +0000 (22:45 +0200)] 
fix: raise a shorter trackeback on interrupted notify connection

3 years agoTest: fix mypy 0.941 run
Daniele Varrazzo [Thu, 19 May 2022 21:41:26 +0000 (23:41 +0200)] 
Test: fix mypy 0.941 run

This seems a mypy shortcoming fixed in 0.950 as the CI didn't complain.
The row factory definition was exotic but arguably correct. Not worth
bumping up the min version for it anyway.

3 years agofix: only use covariant Row type variable
Denis Laxalde [Mon, 16 May 2022 17:16:53 +0000 (19:16 +0200)] 
fix: only use covariant Row type variable

The real variance of Row type variable is covariant, per definition of
RowMaker (RowMaker[B] is a subtype of RowMaker[A] if B is a subtype of
A; similar to the Box type in [mypy documentation][]).

By dropping the Row type variable from Cursor argument in RowFactory, we
are now able to only use the covariant Row variable (previously Row_co,
now Row). Indeed, RowFactory does not actually depend on Cursor on being
parametrized on Row; rather it's the other way around (Cursor's Row type
variable comes from its row factory).

[mypy documentation]: https://mypy.readthedocs.io/en/latest/generics.html#variance-of-generic-types

3 years agorefactor: streamline 'type: ignore' in *Cursor.stream()
Denis Laxalde [Sun, 15 May 2022 09:13:38 +0000 (11:13 +0200)] 
refactor: streamline 'type: ignore' in *Cursor.stream()

Make AsyncCursor code similar to Cursor one.

3 years agochore: bump to next dev version
Daniele Varrazzo [Wed, 18 May 2022 20:47:07 +0000 (22:47 +0200)] 
chore: bump to next dev version

3 years agoMerge branch 'fix-304' into maint-3.0 3.0.14
Daniele Varrazzo [Mon, 16 May 2022 01:15:08 +0000 (03:15 +0200)] 
Merge branch 'fix-304' into maint-3.0

3 years agofix: add C Float4 binary dumper
Daniele Varrazzo [Mon, 16 May 2022 00:41:53 +0000 (02:41 +0200)] 
fix: add C Float4 binary dumper

This should hopefully work around issue #304, at least when C is used.
When Python is used we raise an error instead.

Close #304

3 years agofix: raise an exception if the struct package is affected by issue #304
Daniele Varrazzo [Mon, 16 May 2022 00:14:56 +0000 (02:14 +0200)] 
fix: raise an exception if the struct package is affected by issue #304

Cowardly refuse to transform ones in zeros.

3 years agotest: Fix implicit f-string conversion to value
Daniele Varrazzo [Sun, 15 May 2022 17:49:14 +0000 (19:49 +0200)] 
test: Fix implicit f-string conversion to value

Behaviour changed in Python 3.11.

3 years agofix: Don't rely on f-string converting str enums in their values
Daniele Varrazzo [Sun, 15 May 2022 17:46:34 +0000 (19:46 +0200)] 
fix: Don't rely on f-string converting str enums in their values

The behaviour seems changed in Python 3.11: now f"%{PyFormat.AUTO}" is
evaluated as `%PyFormat.AUTO` instead of `%s`, for the general hilarity.

3 years agofix: fix typo: ingeger
Daniele Varrazzo [Mon, 16 May 2022 00:58:46 +0000 (02:58 +0200)] 
fix: fix typo: ingeger

3 years agochore: bump version to release 3.0.14
Daniele Varrazzo [Sun, 15 May 2022 15:46:00 +0000 (17:46 +0200)] 
chore: bump version to release 3.0.14

3 years agofix: don't barf on errors with blank sqlstate
Daniele Varrazzo [Sat, 14 May 2022 08:22:44 +0000 (10:22 +0200)] 
fix: don't barf on errors with blank sqlstate

Such messages are not entirely valid (sqlstate is documented to be
always present), however we receive them after a SHOW HELP in the
PgBouncer admin database.

The SHOW HELP actually does generate a sqlstate `00000` but the message
is somehow parsed incorrectly by the libpq, which goes on to report an
error:

    message contents do not agree with length in message type "N"

See #303. PgBouncer issue reported upstream in
https://github.com/pgbouncer/pgbouncer/issues/718

3 years agotest: skip testing random multirange arrays with empty last elements
Daniele Varrazzo [Sat, 14 May 2022 22:24:17 +0000 (00:24 +0200)] 
test: skip testing random multirange arrays with empty last elements

Previously we were skipping the ones with an empty first element,
because of a known shortcoming in finding the right OID. Now that we
scan the whole array to find all the elements' classes, it's the last
entry which might break dumping.

3 years agoMerge branch 'fix-301' into maint-3.0
Daniele Varrazzo [Fri, 13 May 2022 23:57:39 +0000 (01:57 +0200)] 
Merge branch 'fix-301' into maint-3.0