]>
git.ipfire.org Git - thirdparty/psycopg.git/log
Daniele Varrazzo [Mon, 12 Jul 2021 17:26:29 +0000 (19:26 +0200)]
Move copy docs to the basic section
Daniele Varrazzo [Mon, 12 Jul 2021 17:05:28 +0000 (19:05 +0200)]
Add docs for the psycopg module
Daniele Varrazzo [Mon, 12 Jul 2021 16:37:17 +0000 (18:37 +0200)]
Retry more flaky tests
Daniele Varrazzo [Mon, 12 Jul 2021 22:31:32 +0000 (00:31 +0200)]
Merge branch 'adapters-protocols'
Daniele Varrazzo [Mon, 12 Jul 2021 15:54:57 +0000 (17:54 +0200)]
proto modules renamed to abc
Daniele Varrazzo [Mon, 12 Jul 2021 15:36:19 +0000 (17:36 +0200)]
Improvements to the adaptation documentation
Daniele Varrazzo [Sun, 11 Jul 2021 13:02:44 +0000 (15:02 +0200)]
Add unit tests for register_loader/dumper types
Use the more idiomatic type name for the other tests.
Daniele Varrazzo [Sun, 11 Jul 2021 12:41:54 +0000 (14:41 +0200)]
Expose postgres.adapters from the psycopg package
Daniele Varrazzo [Sun, 11 Jul 2021 12:24:30 +0000 (14:24 +0200)]
Drop flake8 ignore on types/__init__ file
Daniele Varrazzo [Sun, 11 Jul 2021 02:16:25 +0000 (04:16 +0200)]
Drop .register() method from Dumper/Loader classes
Use the register_dumper/loader() method on the adapters, readily
available from the context. A bit of a violation of Demeter law, but
much more intuitive and simplifies the Dumper/Loader interface (the
methods were outside the protocol).
Daniele Varrazzo [Sun, 11 Jul 2021 02:14:17 +0000 (04:14 +0200)]
Add postgres module
The module exports PostgreSQL specific configurations: the mapping
oid -> types and the mapping from oid/types to dumpers/loaders.
Daniele Varrazzo [Sun, 11 Jul 2021 02:27:20 +0000 (04:27 +0200)]
Allow adapter protocols tests to run on Python 3.6
Daniele Varrazzo [Sat, 10 Jul 2021 16:46:07 +0000 (18:46 +0200)]
Add Loader protocol
Daniele Varrazzo [Sat, 10 Jul 2021 16:41:44 +0000 (18:41 +0200)]
Remove the cls attribute from the Dumper protocol
Where used, in recursive types, get_key() can be used instead.
Daniele Varrazzo [Sat, 10 Jul 2021 15:42:30 +0000 (17:42 +0200)]
Rename adapt.Format to PyFormat
Daniele Varrazzo [Sat, 10 Jul 2021 15:13:21 +0000 (17:13 +0200)]
Add Dumper protocol
The presence of this protocol allows to implement custom dumper that
don't inherit from psycopg ones and still be statically checked.
Daniele Varrazzo [Sat, 10 Jul 2021 13:09:22 +0000 (15:09 +0200)]
Don't chain exceptions on pool timeout
Daniele Varrazzo [Wed, 30 Jun 2021 16:05:22 +0000 (17:05 +0100)]
Cleanup of install docs
Daniele Varrazzo [Wed, 30 Jun 2021 16:04:42 +0000 (17:04 +0100)]
More terse import error of the requested implementation
Daniele Varrazzo [Wed, 30 Jun 2021 16:04:19 +0000 (17:04 +0100)]
Cleanup of metadata and readme presented on PyPI
Daniele Varrazzo [Wed, 30 Jun 2021 11:21:11 +0000 (12:21 +0100)]
Note in the first docs example that the module name is psycopg
Daniele Varrazzo [Wed, 30 Jun 2021 11:14:25 +0000 (12:14 +0100)]
Bump to version 3.0.dev0 to release testing packages
Daniele Varrazzo [Wed, 30 Jun 2021 01:59:15 +0000 (02:59 +0100)]
Add workflow to create sdist packages
Daniele Varrazzo [Wed, 30 Jun 2021 00:49:30 +0000 (01:49 +0100)]
Merge branch 'cibuildwheel'
Daniele Varrazzo [Wed, 30 Jun 2021 00:31:12 +0000 (01:31 +0100)]
Disable building Windows packages.
Daniele Varrazzo [Tue, 29 Jun 2021 22:55:38 +0000 (23:55 +0100)]
Install Postgres in the image to build Windows packages
Daniele Varrazzo [Tue, 29 Jun 2021 16:03:54 +0000 (17:03 +0100)]
Build Windows binary packages
Daniele Varrazzo [Mon, 28 Jun 2021 13:07:34 +0000 (14:07 +0100)]
Build MacOS binary packages
Daniele Varrazzo [Mon, 28 Jun 2021 13:32:23 +0000 (14:32 +0100)]
Make the script to build the binary package portable
Daniele Varrazzo [Sun, 27 Jun 2021 23:38:39 +0000 (00:38 +0100)]
Build psycopg-binary package for Linux
Daniele Varrazzo [Tue, 29 Jun 2021 13:29:26 +0000 (14:29 +0100)]
Test all the Python versions on MacOS and Windows
Daniele Varrazzo [Tue, 29 Jun 2021 15:48:18 +0000 (16:48 +0100)]
Merge branch 'windows'
Daniele Varrazzo [Tue, 29 Jun 2021 15:35:21 +0000 (16:35 +0100)]
Don't use the Cython IF construct
This produces independent .c files which can be included in the sdist
and be compiled on every supported platform.
Daniele Varrazzo [Tue, 29 Jun 2021 14:14:12 +0000 (15:14 +0100)]
Drop compile warinings on MSVC
Daniele Varrazzo [Tue, 29 Jun 2021 12:55:37 +0000 (13:55 +0100)]
Disable testing the C exception for Windows
Added libpq.lib to the path to run tests, but it didn't help.
I can't work around the import problem. Maybe delocating the package
would fix it? However, will ask for help for it.
Daniele Varrazzo [Tue, 29 Jun 2021 12:00:33 +0000 (13:00 +0100)]
Work around getpid on Windows
Daniele Varrazzo [Tue, 29 Jun 2021 11:47:43 +0000 (12:47 +0100)]
Add ws2_32 lib dependency on Windows
Daniele Varrazzo [Tue, 29 Jun 2021 10:32:50 +0000 (11:32 +0100)]
Pass the correct libdir to the window builder
"pg_config --libdir" returns "C:/STRAWB~1/c/lib"
Reported in https://github.com/actions/runner/issues/1178
Daniele Varrazzo [Tue, 29 Jun 2021 04:00:42 +0000 (05:00 +0100)]
Skip timing tests on windows
They fail less often than Mac OS, but they are still unreliable.
Daniele Varrazzo [Tue, 29 Jun 2021 03:53:30 +0000 (04:53 +0100)]
Add libpq dir to link options
Daniele Varrazzo [Tue, 29 Jun 2021 03:41:07 +0000 (04:41 +0100)]
Skip tests requiring an IANA db on Windows
Daniele Varrazzo [Tue, 29 Jun 2021 03:33:49 +0000 (04:33 +0100)]
Fix libpq name in windows linking
Daniele Varrazzo [Tue, 29 Jun 2021 03:19:25 +0000 (04:19 +0100)]
Work around _timezone name clash on windows
https://bugs.python.org/issue24643
Daniele Varrazzo [Tue, 29 Jun 2021 02:58:05 +0000 (03:58 +0100)]
Skip proxy tests on windows
It doesn't come up. zfg.
Daniele Varrazzo [Tue, 29 Jun 2021 02:47:40 +0000 (03:47 +0100)]
Fix inclusion of sys/param.h on Windows compiler
The header is probably available on Cygwin but not on MSVC.
Daniele Varrazzo [Tue, 29 Jun 2021 02:40:03 +0000 (03:40 +0100)]
Skip asyncio tests on windows
Daniele Varrazzo [Tue, 29 Jun 2021 02:19:30 +0000 (03:19 +0100)]
Add windows compatibility to endian functions
Daniele Varrazzo [Tue, 29 Jun 2021 01:57:36 +0000 (02:57 +0100)]
Run tests on windows
Daniele Varrazzo [Tue, 29 Jun 2021 00:38:35 +0000 (01:38 +0100)]
Refactor test workflow to avoid repetitions
Also test a sample Python implementation on MacOS.
Daniele Varrazzo [Tue, 29 Jun 2021 01:37:24 +0000 (02:37 +0100)]
Merge branch 'macos'
Daniele Varrazzo [Tue, 29 Jun 2021 00:08:30 +0000 (01:08 +0100)]
Skip proxy-based tests on MacOS tests
The proxy doesn't start in time 2s seem plenty.
Daniele Varrazzo [Mon, 28 Jun 2021 23:40:10 +0000 (00:40 +0100)]
Skip timing-based tests on GitHub Actions MacOS runners
Daniele Varrazzo [Tue, 29 Jun 2021 00:22:18 +0000 (01:22 +0100)]
Give a gc hit before running gc tests
Sometimes these tests fail because there is garbage before.
Daniele Varrazzo [Mon, 28 Jun 2021 14:24:34 +0000 (15:24 +0100)]
Run CI tests on MacOS too
Daniele Varrazzo [Mon, 28 Jun 2021 14:07:14 +0000 (15:07 +0100)]
Don't assume that the user "postgres" always exists in tests
Daniele Varrazzo [Mon, 28 Jun 2021 13:56:08 +0000 (14:56 +0100)]
Add compatibility with Mac OS
Daniele Varrazzo [Mon, 28 Jun 2021 18:38:00 +0000 (19:38 +0100)]
Retry a few time-based pool tests
Daniele Varrazzo [Mon, 28 Jun 2021 12:00:36 +0000 (13:00 +0100)]
Fix tests run with libpq 9.6
Daniele Varrazzo [Mon, 28 Jun 2021 04:31:10 +0000 (05:31 +0100)]
Fix compatibility with 32 bit platforms
Daniele Varrazzo [Mon, 28 Jun 2021 02:14:20 +0000 (03:14 +0100)]
Use the _psycopg module from either psycopg_c or psycopg_binary
Daniele Varrazzo [Mon, 28 Jun 2021 02:29:33 +0000 (03:29 +0100)]
Fix test if the connection string specifies a password
Daniele Varrazzo [Sun, 27 Jun 2021 15:59:07 +0000 (16:59 +0100)]
Configure libpq libcrypto callback
Import the ssl module beforehand and set up libpq callbacks to avoid clobbering
the former ones.
Daniele Varrazzo [Sun, 27 Jun 2021 02:11:06 +0000 (03:11 +0100)]
Merge branch 'better-json'
Daniele Varrazzo [Sun, 27 Jun 2021 01:40:41 +0000 (02:40 +0100)]
Update json documentation to describe the new interfaces
Daniele Varrazzo [Sun, 27 Jun 2021 00:51:28 +0000 (01:51 +0100)]
Allow specifying a context to `set_json_loads/dumps()` functions
Drop subclasses tests from the test suite because they are an
implementation detail: the real interface are the `set_json_*()` functions.
Daniele Varrazzo [Sun, 27 Jun 2021 00:23:30 +0000 (01:23 +0100)]
More consistent inheritance graph of json dumpers
Daniele Varrazzo [Sun, 27 Jun 2021 00:17:02 +0000 (01:17 +0100)]
Customise json dumpers and loaders using a class attribute
This is an intermediary step: the class attribute can be set by
subclassing but the idea is to extend set_json_dumps/loads functions to
create these subclasses automatically.
Daniele Varrazzo [Sat, 26 Jun 2021 23:36:35 +0000 (00:36 +0100)]
Give Json wrappers a dumps method
In the previous model, dumping a specific json object with a specific
dumper was excessively difficult (it would have required subclassing a
wrapper and a dumper).
Daniele Varrazzo [Sat, 26 Jun 2021 03:37:53 +0000 (04:37 +0100)]
Package renamed to psycopg
Calling the package psycopg3 doesn't allow to apply semver.
Daniele Varrazzo [Sat, 26 Jun 2021 02:37:35 +0000 (03:37 +0100)]
Define the package_data info in the setup.cfg files
It wasn't working... because there was a typo.
Also fix inclusion of pxd files in the psycopg3_c sdist package: finding
them recursively doesn't work because the subdirectories are not
packages (and making them so, adding __init__.py files, breaks
everything) so specify all the paths where they are to be found.
Daniele Varrazzo [Sat, 26 Jun 2021 02:11:27 +0000 (03:11 +0100)]
Merge branch 'types-reorg'
Daniele Varrazzo [Sat, 26 Jun 2021 01:59:27 +0000 (02:59 +0100)]
Rename internal numeric adapter classes as private
Daniele Varrazzo [Sat, 26 Jun 2021 01:54:08 +0000 (02:54 +0100)]
Uniform datetime dumpers names
Daniele Varrazzo [Sat, 26 Jun 2021 01:42:46 +0000 (02:42 +0100)]
StringDumper renamed to StrDumper
Daniele Varrazzo [Sat, 26 Jun 2021 01:38:09 +0000 (02:38 +0100)]
Module types.text renamed to string
Daniele Varrazzo [Sat, 26 Jun 2021 01:28:12 +0000 (02:28 +0100)]
Module types.date renamed to datetime
Daniele Varrazzo [Sat, 26 Jun 2021 01:22:49 +0000 (02:22 +0100)]
Module types.network renamed to net
Daniele Varrazzo [Sat, 26 Jun 2021 01:18:24 +0000 (02:18 +0100)]
Split types.singleton module into bool and none
Daniele Varrazzo [Sat, 26 Jun 2021 00:59:35 +0000 (01:59 +0100)]
Don't expose all the adapters in the types package
Daniele Varrazzo [Fri, 25 Jun 2021 17:17:45 +0000 (18:17 +0100)]
Stop using the psycopg3.types module as facade for all the types
Drop the psycopg3.wrappers package too and define the interface where to
take the wrapper to be psycopg3.types.MODULE
Daniele Varrazzo [Fri, 25 Jun 2021 16:54:19 +0000 (17:54 +0100)]
Merge branch 'binary-range'
Daniele Varrazzo [Tue, 8 Jun 2021 18:24:39 +0000 (19:24 +0100)]
Move basic struct-related functions to a common module
Daniele Varrazzo [Wed, 23 Jun 2021 16:04:09 +0000 (17:04 +0100)]
Use type-specific range subclasses to avoid the dump upgrade mechanism
This allows binary dump of empty ranges, for which the type can be
inferred. In normal dumping these are dumped in text format with unknown
oid but that would break binary copy.
Daniele Varrazzo [Wed, 23 Jun 2021 12:30:24 +0000 (13:30 +0100)]
Drop unneeded imports in types package
Probably they used to have side effects, overtaken by
register_default_globals().
Daniele Varrazzo [Wed, 23 Jun 2021 12:10:57 +0000 (13:10 +0100)]
Fix rounding error in float comparison tests with postgres < 12
Daniele Varrazzo [Tue, 22 Jun 2021 17:00:43 +0000 (18:00 +0100)]
Allow random testing with text format
Ranges are a bit complicated because upgrading empty ones only works in
text mode. This should be addressed, but hopefully it only affects
binary copy for now.
Daniele Varrazzo [Wed, 9 Jun 2021 15:44:34 +0000 (16:44 +0100)]
Test random range objects
Daniele Varrazzo [Wed, 9 Jun 2021 00:31:48 +0000 (01:31 +0100)]
Add range binary dumpers
Daniele Varrazzo [Wed, 9 Jun 2021 15:43:05 +0000 (16:43 +0100)]
Add Range.bounds attribute
Daniele Varrazzo [Tue, 8 Jun 2021 20:27:40 +0000 (21:27 +0100)]
Add RecursiveDumper, RecursiveLoader
Daniele Varrazzo [Tue, 8 Jun 2021 19:08:29 +0000 (20:08 +0100)]
Add range binary loaders
Daniele Varrazzo [Wed, 23 Jun 2021 11:45:03 +0000 (12:45 +0100)]
Fix interval and timezone parsing in copy buffers
Daniele Varrazzo [Tue, 22 Jun 2021 10:57:01 +0000 (11:57 +0100)]
Make tests.pq a module to allow relative import
Daniele Varrazzo [Tue, 22 Jun 2021 10:54:02 +0000 (11:54 +0100)]
Mark timing based test flaky
Daniele Varrazzo [Tue, 22 Jun 2021 10:38:18 +0000 (11:38 +0100)]
Insist more on the GC tests
Daniele Varrazzo [Tue, 22 Jun 2021 09:48:29 +0000 (10:48 +0100)]
Merge branch 'sql-as-bytes'
Denis Laxalde [Thu, 10 Jun 2021 11:56:06 +0000 (13:56 +0200)]
Drop TestSqlFormat::test_unicode
The same is already checked in test_pos_spec() method.
Denis Laxalde [Thu, 10 Jun 2021 11:52:28 +0000 (13:52 +0200)]
Auto-document Composable.as_bytes()
Denis Laxalde [Thu, 10 Jun 2021 11:27:05 +0000 (13:27 +0200)]
Make Composable an abstract base class
Denis Laxalde [Thu, 10 Jun 2021 11:24:10 +0000 (13:24 +0200)]
Drop inheritance from 'object' in sql module and tests