]>
git.ipfire.org Git - thirdparty/psycopg.git/log
Daniele Varrazzo [Sun, 22 Aug 2021 04:03:18 +0000 (06:03 +0200)]
Add _dns module
Add a function to allow async resolution of the `host` entry in the
connection string.
The module is experimental and depends on the `dnspython` external
package, which is currently not installed as a dependency.
Daniele Varrazzo [Sun, 29 Aug 2021 17:00:43 +0000 (19:00 +0200)]
Small cleanup to conninfo docs
Daniele Varrazzo [Sun, 29 Aug 2021 16:55:08 +0000 (18:55 +0200)]
Add docs for conninfo module
Daniele Varrazzo [Sun, 29 Aug 2021 16:12:42 +0000 (18:12 +0200)]
Change link to postgres docs from v13 to current
Daniele Varrazzo [Sun, 29 Aug 2021 06:47:26 +0000 (08:47 +0200)]
Add pg_lsn to the builtin types registry
Daniele Varrazzo [Sun, 29 Aug 2021 06:15:05 +0000 (08:15 +0200)]
Update errors table to PostgreSQL 14
Daniele Varrazzo [Sun, 29 Aug 2021 05:59:24 +0000 (07:59 +0200)]
Reorder statements in a function where black didn't do a good job
Daniele Varrazzo [Sun, 29 Aug 2021 05:32:50 +0000 (07:32 +0200)]
mark compat module internal
Daniele Varrazzo [Sat, 28 Aug 2021 16:46:03 +0000 (18:46 +0200)]
Improve TypeRegistry docs
Daniele Varrazzo [Sat, 28 Aug 2021 16:36:04 +0000 (18:36 +0200)]
Add XML Dumper example
Daniele Varrazzo [Sat, 28 Aug 2021 16:18:35 +0000 (18:18 +0200)]
Make TEXT the default format for psycopg.adapt.Dumper and Loader
Daniele Varrazzo [Sat, 28 Aug 2021 15:23:29 +0000 (17:23 +0200)]
Add UUID, network examples in the docs
Daniele Varrazzo [Sat, 28 Aug 2021 15:18:09 +0000 (17:18 +0200)]
Add links out of the basic usage page towards more advanced topics
Daniele Varrazzo [Sat, 28 Aug 2021 14:35:39 +0000 (16:35 +0200)]
Improve rows documentation
Add api section, move from examples to theory instead of the other way
around.
Daniele Varrazzo [Sat, 28 Aug 2021 05:38:53 +0000 (07:38 +0200)]
xml adaptation example and more about types registry
Daniele Varrazzo [Sat, 28 Aug 2021 04:59:48 +0000 (06:59 +0200)]
Add composite types adaptation docs
Daniele Varrazzo [Sat, 28 Aug 2021 04:10:49 +0000 (06:10 +0200)]
Fix type var annotation
Daniele Varrazzo [Sat, 28 Aug 2021 04:10:41 +0000 (06:10 +0200)]
Add hstore docs
Daniele Varrazzo [Sat, 28 Aug 2021 03:51:16 +0000 (05:51 +0200)]
Add documentation for range types
Daniele Varrazzo [Sat, 28 Aug 2021 03:21:20 +0000 (05:21 +0200)]
Register array dumpers for oid lookups
This allows, among other things, to dump composite types containing array
in binary.
Daniele Varrazzo [Sat, 28 Aug 2021 02:12:08 +0000 (04:12 +0200)]
Add test to verify empty ranges can be copied in ok
Daniele Varrazzo [Sat, 28 Aug 2021 01:32:42 +0000 (03:32 +0200)]
Fix shortcuts examples
Daniele Varrazzo [Sat, 28 Aug 2021 01:32:21 +0000 (03:32 +0200)]
More standard adaptation docs
Daniele Varrazzo [Fri, 27 Aug 2021 22:51:44 +0000 (00:51 +0200)]
Drop docs topic I won't write
Daniele Varrazzo [Fri, 27 Aug 2021 22:51:22 +0000 (00:51 +0200)]
Merge branch 'dump-by-oid'
Daniele Varrazzo [Fri, 27 Aug 2021 22:20:51 +0000 (00:20 +0200)]
Add dumping by oid in the C implementation too
Daniele Varrazzo [Fri, 27 Aug 2021 16:16:33 +0000 (18:16 +0200)]
Return only the params from Transformer.dump_sequence()
The types and formats can be read as object attributes.
Daniele Varrazzo [Fri, 27 Aug 2021 12:50:41 +0000 (14:50 +0200)]
Replace git_row_types() with get_dumper_types/get_loader_types()
dump_sequence() can make use of the dumpers pre-set by get_dumper_types()
and is now used in composite binary dump and in binary COPY FROM.
The interface should be better iterated because for the latter use cases
the extra info (oids, formats) are just a waste of resources.
Only the Python implementation has been changed so far, the C
implementation will be changed down the line.
Daniele Varrazzo [Fri, 27 Aug 2021 01:27:59 +0000 (03:27 +0200)]
Use the composite type info to choose dumpers, instead of the Python type
This allows to dump composites in binary format without the need to use
object wrappers to specify e.g. the type of integer.
Daniele Varrazzo [Fri, 27 Aug 2021 00:17:53 +0000 (02:17 +0200)]
Add mapping oid -> Dumper in AdaptersMap
Daniele Varrazzo [Thu, 26 Aug 2021 22:20:45 +0000 (00:20 +0200)]
Make Dumper.oid a class attribute for C classes too
Daniele Varrazzo [Thu, 26 Aug 2021 22:01:12 +0000 (00:01 +0200)]
Make Dumper.oid a class attribute for every Dumper subclass
Daniele Varrazzo [Fri, 27 Aug 2021 22:23:27 +0000 (00:23 +0200)]
Merge remote-tracking branch 'origin/better-composite'
Daniele Varrazzo [Thu, 26 Aug 2021 21:39:33 +0000 (23:39 +0200)]
Add binary composite dumper
Daniele Varrazzo [Thu, 26 Aug 2021 18:58:05 +0000 (20:58 +0200)]
Drop TypeInfo.async_fetch(), use fetch() for both connection types
Daniele Varrazzo [Thu, 26 Aug 2021 18:18:57 +0000 (20:18 +0200)]
A more elegant way to customise TypeInfo registration in subclasses
Daniele Varrazzo [Thu, 26 Aug 2021 17:46:53 +0000 (19:46 +0200)]
Make register_composite(), register_range() the public interface
Drop subclassing of `TypeInfo.register()`, leaving it only for the base
task of registering type info and array. This makes them consistent with
other types which don't have a TypeInfo subclass of their own and only
expose a `register_*()` function (e.g. hstore).
Daniele Varrazzo [Thu, 26 Aug 2021 15:24:26 +0000 (17:24 +0200)]
Register composite dumper if the factory is a type
Expose the type as info.python_type after registering.
Daniele Varrazzo [Thu, 26 Aug 2021 12:51:08 +0000 (14:51 +0200)]
Clean up datetime adaptation docs
Daniele Varrazzo [Thu, 26 Aug 2021 02:54:24 +0000 (04:54 +0200)]
Don't use the generic name register_adapters
There will be cases in which there is more than one type in the same
module...
Daniele Varrazzo [Thu, 26 Aug 2021 01:14:32 +0000 (03:14 +0200)]
Verify that arrays of binary types dump correctly
Daniele Varrazzo [Thu, 26 Aug 2021 01:13:56 +0000 (03:13 +0200)]
More types adaptation docs
Daniele Varrazzo [Wed, 25 Aug 2021 23:22:45 +0000 (01:22 +0200)]
Drop TODO doc point to something that people can discover themselves
Let's leave devs some thrill, or this job becomes boring.
Daniele Varrazzo [Wed, 25 Aug 2021 17:57:46 +0000 (19:57 +0200)]
Add binary parameter to cursor.execute()
Daniele Varrazzo [Wed, 25 Aug 2021 11:37:32 +0000 (13:37 +0200)]
Drop Cursor.pgresult duplication in docs
Better style for Connection.pgconn docs. The old version of the cursor
attribute was better.
Daniele Varrazzo [Wed, 25 Aug 2021 02:58:24 +0000 (04:58 +0200)]
Document pgconn, pgresult properties
Daniele Varrazzo [Wed, 25 Aug 2021 02:05:12 +0000 (04:05 +0200)]
Don't use --no-deps to install the pool package
It shouldn't be required at the moment, the package doesn't have any
dependency (although it does depend on psycopg).
Daniele Varrazzo [Wed, 25 Aug 2021 02:02:30 +0000 (04:02 +0200)]
Readmes and metadata cleanup
Daniele Varrazzo [Wed, 25 Aug 2021 01:02:54 +0000 (03:02 +0200)]
Drop TODO point after understanding that Windows has no IANA db
Daniele Varrazzo [Tue, 24 Aug 2021 21:08:29 +0000 (23:08 +0200)]
Drop TODO point regarding Travis
On GitHub Action it's OK.
On flaky platforms these tests are skipped, so let's fail hard if the
proxy fails to come up.
Daniele Varrazzo [Wed, 25 Aug 2021 01:05:24 +0000 (03:05 +0200)]
Merge branch 'array-delim'
Daniele Varrazzo [Tue, 24 Aug 2021 20:55:09 +0000 (22:55 +0200)]
Dump lists keeping the type delimiter into account
Daniele Varrazzo [Tue, 24 Aug 2021 19:14:50 +0000 (21:14 +0200)]
Load arrays of types with delimiters different than comma (e.g. box)
Daniele Varrazzo [Tue, 24 Aug 2021 19:11:20 +0000 (21:11 +0200)]
Add "char" data type loading
Not very used so won't implement it in C, but useful to read catalog
data.
Daniele Varrazzo [Tue, 24 Aug 2021 19:08:43 +0000 (21:08 +0200)]
Fix typeinfo fetch of alt_name
It was returned as the binary value of the oid number.
Daniele Varrazzo [Tue, 24 Aug 2021 19:05:39 +0000 (21:05 +0200)]
Add oid to column representation
Daniele Varrazzo [Tue, 24 Aug 2021 20:59:58 +0000 (22:59 +0200)]
Please mypy and NoReturn function
Daniele Varrazzo [Tue, 24 Aug 2021 17:05:50 +0000 (19:05 +0200)]
Drop Cursor query, params attribute.
Document instead a `_query` object (renamed from the previous `_pgq`) as
helpful but subject to change.
Daniele Varrazzo [Tue, 24 Aug 2021 16:34:38 +0000 (18:34 +0200)]
Add cursor.statusmessage attribute
Daniele Varrazzo [Tue, 24 Aug 2021 15:58:34 +0000 (17:58 +0200)]
Drop Cursor.status property
Daniele Varrazzo [Tue, 24 Aug 2021 15:54:47 +0000 (17:54 +0200)]
Realign async copy tests to the sync ones
Daniele Varrazzo [Tue, 24 Aug 2021 15:20:09 +0000 (17:20 +0200)]
Drop TODO point now working
Add tests to prove it works.
Daniele Varrazzo [Tue, 24 Aug 2021 15:18:30 +0000 (17:18 +0200)]
More helpful error looking up for missing types in the registry
Daniele Varrazzo [Tue, 24 Aug 2021 14:47:45 +0000 (16:47 +0200)]
Drop TODO point on which I'm wrong
Daniele Varrazzo [Tue, 24 Aug 2021 14:46:24 +0000 (16:46 +0200)]
Drop TODO point for something that probably can't be improved
Daniele Varrazzo [Tue, 24 Aug 2021 14:22:16 +0000 (16:22 +0200)]
Add test for as_bytes method of sql objects
Daniele Varrazzo [Tue, 24 Aug 2021 14:21:36 +0000 (16:21 +0200)]
Add links to GitHub tickets related to DSN mangling
Daniele Varrazzo [Sat, 21 Aug 2021 12:39:36 +0000 (14:39 +0200)]
Add _get_connection_params method to connections
Move there the connect_timeout extraction logic, but the method is
intended to do more elaboration on the parameters before connection,
which should include asynchronous DNS lookup and possibly SRV lookup
(RFC 2782) and allows overriding in subclasses to allow experimenting.
Daniele Varrazzo [Tue, 24 Aug 2021 01:59:15 +0000 (03:59 +0200)]
Bump to next dev version
Daniele Varrazzo [Sun, 22 Aug 2021 13:44:32 +0000 (15:44 +0200)]
Use dev dependencies in tox checking
Allow to specify a them in a single place and not having to repeat
package dependencies in the mypy test.
Daniele Varrazzo [Sat, 21 Aug 2021 15:32:32 +0000 (17:32 +0200)]
Link mypy ignore comment to issue reported upstream
Daniele Varrazzo [Sat, 21 Aug 2021 20:56:33 +0000 (22:56 +0200)]
Fix building pool docs
Daniele Varrazzo [Mon, 2 Aug 2021 14:06:16 +0000 (16:06 +0200)]
Drop ConnectionInfo.protocol_version.
Of limited utility. Left exposed in the underlying pgconn obecjt.
Daniele Varrazzo [Sat, 21 Aug 2021 14:22:36 +0000 (16:22 +0200)]
Merge branch 'separate-pool'
Daniele Varrazzo [Sat, 21 Aug 2021 13:42:18 +0000 (15:42 +0200)]
Document that the connection pool is in a separate package
Daniele Varrazzo [Thu, 19 Aug 2021 23:15:20 +0000 (01:15 +0200)]
Build the pool package and include it testing other packages
Daniele Varrazzo [Fri, 13 Aug 2021 13:09:38 +0000 (14:09 +0100)]
Move the pool into a separate package
This would allow different release cycles from the core adapter.
Daniele Varrazzo [Sat, 21 Aug 2021 13:02:19 +0000 (15:02 +0200)]
Update doc building requirements
Drop requirement file from makefile, long gone.
Update furo, as the theme selector was broken.
Daniele Varrazzo [Sat, 21 Aug 2021 01:51:01 +0000 (03:51 +0200)]
Merge branch 'older-libpq'
Daniele Varrazzo [Sat, 21 Aug 2021 01:14:52 +0000 (03:14 +0200)]
Run windows tests in a way more similar to the built packages
Daniele Varrazzo [Fri, 20 Aug 2021 00:46:45 +0000 (02:46 +0200)]
Allow building the C module with older libpq versions
Mostly to work around the obsolete libpq version available for aarch64.
Daniele Varrazzo [Sat, 21 Aug 2021 01:50:40 +0000 (03:50 +0200)]
Merge branch 'split-async'
Daniele Varrazzo [Fri, 13 Aug 2021 09:58:33 +0000 (10:58 +0100)]
async_pool module renamed for consistency with other _async ones
Daniele Varrazzo [Fri, 13 Aug 2021 09:55:59 +0000 (10:55 +0100)]
Move the AsyncCursor implementation in its own module
Daniele Varrazzo [Fri, 13 Aug 2021 09:45:18 +0000 (10:45 +0100)]
Move the AsyncConnection implementation in its own module
Daniele Varrazzo [Mon, 9 Aug 2021 14:39:24 +0000 (15:39 +0100)]
Daniele Varrazzo [Sat, 7 Aug 2021 17:55:20 +0000 (18:55 +0100)]
Add @bloomberg sponsorship
Daniele Varrazzo [Thu, 5 Aug 2021 20:32:10 +0000 (21:32 +0100)]
Merge branch 'generic-row-factories'
Daniele Varrazzo [Thu, 5 Aug 2021 19:40:36 +0000 (20:40 +0100)]
Simplify rows example
Use class_row instead of making your own, drop the recipe that has
become class_row itself.
Daniele Varrazzo [Thu, 5 Aug 2021 19:39:57 +0000 (20:39 +0100)]
Add psycopg.rows.args_row and kwargs_row factories
Daniele Varrazzo [Thu, 5 Aug 2021 16:50:15 +0000 (17:50 +0100)]
Early bailout style in the row factory functions
Daniele Varrazzo [Wed, 4 Aug 2021 13:49:14 +0000 (14:49 +0100)]
Add class_row row factory generator
Daniele Varrazzo [Wed, 4 Aug 2021 01:47:26 +0000 (02:47 +0100)]
Move dict/namedtuple row factory cursor inspection outside row maker
The list of fields names is supposed to be cached at every query result,
not at every row.
Daniele Varrazzo [Wed, 4 Aug 2021 13:28:51 +0000 (14:28 +0100)]
Fix description for cursors returning no column
Denis Laxalde [Thu, 5 Aug 2021 06:45:50 +0000 (08:45 +0200)]
Fix a typo in ConnectionInfo.dsn docstring
Daniele Varrazzo [Mon, 2 Aug 2021 00:47:52 +0000 (02:47 +0200)]
Add pgconn.encrypt_password function
Daniele Varrazzo [Mon, 2 Aug 2021 12:29:42 +0000 (14:29 +0200)]
Include the '()' in the links to the libpq functions
This is more consistent with the rest of the documentation.
Daniele Varrazzo [Mon, 2 Aug 2021 09:59:50 +0000 (11:59 +0200)]
Some docs cleanup
Daniele Varrazzo [Mon, 2 Aug 2021 09:59:20 +0000 (11:59 +0200)]
Add ConnectionInfo.dsn property
Daniele Varrazzo [Mon, 2 Aug 2021 09:34:01 +0000 (11:34 +0200)]
Fix returning connection params in get_parameters() with empty default
"options" and "tty" were returned even if they were set to their
default.