]> git.ipfire.org Git - thirdparty/psycopg.git/log
thirdparty/psycopg.git
3 years agoAdd _dns module
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.

3 years agoSmall cleanup to conninfo docs
Daniele Varrazzo [Sun, 29 Aug 2021 17:00:43 +0000 (19:00 +0200)] 
Small cleanup to conninfo docs

3 years agoAdd docs for conninfo module
Daniele Varrazzo [Sun, 29 Aug 2021 16:55:08 +0000 (18:55 +0200)] 
Add docs for conninfo module

3 years agoChange link to postgres docs from v13 to current
Daniele Varrazzo [Sun, 29 Aug 2021 16:12:42 +0000 (18:12 +0200)] 
Change link to postgres docs from v13 to current

3 years agoAdd pg_lsn to the builtin types registry
Daniele Varrazzo [Sun, 29 Aug 2021 06:47:26 +0000 (08:47 +0200)] 
Add pg_lsn to the builtin types registry

3 years agoUpdate errors table to PostgreSQL 14
Daniele Varrazzo [Sun, 29 Aug 2021 06:15:05 +0000 (08:15 +0200)] 
Update errors table to PostgreSQL 14

3 years agoReorder statements in a function where black didn't do a good job
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

3 years agomark compat module internal
Daniele Varrazzo [Sun, 29 Aug 2021 05:32:50 +0000 (07:32 +0200)] 
mark compat module internal

3 years agoImprove TypeRegistry docs
Daniele Varrazzo [Sat, 28 Aug 2021 16:46:03 +0000 (18:46 +0200)] 
Improve TypeRegistry docs

3 years agoAdd XML Dumper example
Daniele Varrazzo [Sat, 28 Aug 2021 16:36:04 +0000 (18:36 +0200)] 
Add XML Dumper example

3 years agoMake TEXT the default format for psycopg.adapt.Dumper and Loader
Daniele Varrazzo [Sat, 28 Aug 2021 16:18:35 +0000 (18:18 +0200)] 
Make TEXT the default format for psycopg.adapt.Dumper and Loader

3 years agoAdd UUID, network examples in the docs
Daniele Varrazzo [Sat, 28 Aug 2021 15:23:29 +0000 (17:23 +0200)] 
Add UUID, network examples in the docs

3 years agoAdd links out of the basic usage page towards more advanced topics
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

3 years agoImprove rows documentation
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.

3 years agoxml adaptation example and more about types registry
Daniele Varrazzo [Sat, 28 Aug 2021 05:38:53 +0000 (07:38 +0200)] 
xml adaptation example and more about types registry

3 years agoAdd composite types adaptation docs
Daniele Varrazzo [Sat, 28 Aug 2021 04:59:48 +0000 (06:59 +0200)] 
Add composite types adaptation docs

3 years agoFix type var annotation
Daniele Varrazzo [Sat, 28 Aug 2021 04:10:49 +0000 (06:10 +0200)] 
Fix type var annotation

3 years agoAdd hstore docs
Daniele Varrazzo [Sat, 28 Aug 2021 04:10:41 +0000 (06:10 +0200)] 
Add hstore docs

3 years agoAdd documentation for range types
Daniele Varrazzo [Sat, 28 Aug 2021 03:51:16 +0000 (05:51 +0200)] 
Add documentation for range types

3 years agoRegister array dumpers for oid lookups
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.

3 years agoAdd test to verify empty ranges can be copied in ok
Daniele Varrazzo [Sat, 28 Aug 2021 02:12:08 +0000 (04:12 +0200)] 
Add test to verify empty ranges can be copied in ok

3 years agoFix shortcuts examples
Daniele Varrazzo [Sat, 28 Aug 2021 01:32:42 +0000 (03:32 +0200)] 
Fix shortcuts examples

3 years agoMore standard adaptation docs
Daniele Varrazzo [Sat, 28 Aug 2021 01:32:21 +0000 (03:32 +0200)] 
More standard adaptation docs

3 years agoDrop docs topic I won't write
Daniele Varrazzo [Fri, 27 Aug 2021 22:51:44 +0000 (00:51 +0200)] 
Drop docs topic I won't write

3 years agoMerge branch 'dump-by-oid'
Daniele Varrazzo [Fri, 27 Aug 2021 22:51:22 +0000 (00:51 +0200)] 
Merge branch 'dump-by-oid'

3 years agoAdd dumping by oid in the C implementation too
Daniele Varrazzo [Fri, 27 Aug 2021 22:20:51 +0000 (00:20 +0200)] 
Add dumping by oid in the C implementation too

3 years agoReturn only the params from Transformer.dump_sequence()
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.

3 years agoReplace git_row_types() with get_dumper_types/get_loader_types()
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.

3 years agoUse the composite type info to choose dumpers, instead of the Python type
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.

3 years agoAdd mapping oid -> Dumper in AdaptersMap
Daniele Varrazzo [Fri, 27 Aug 2021 00:17:53 +0000 (02:17 +0200)] 
Add mapping oid -> Dumper in AdaptersMap

3 years agoMake Dumper.oid a class attribute for C classes too
Daniele Varrazzo [Thu, 26 Aug 2021 22:20:45 +0000 (00:20 +0200)] 
Make Dumper.oid a class attribute for C classes too

3 years agoMake Dumper.oid a class attribute for every Dumper subclass
Daniele Varrazzo [Thu, 26 Aug 2021 22:01:12 +0000 (00:01 +0200)] 
Make Dumper.oid a class attribute for every Dumper subclass

3 years agoMerge remote-tracking branch 'origin/better-composite'
Daniele Varrazzo [Fri, 27 Aug 2021 22:23:27 +0000 (00:23 +0200)] 
Merge remote-tracking branch 'origin/better-composite'

3 years agoAdd binary composite dumper
Daniele Varrazzo [Thu, 26 Aug 2021 21:39:33 +0000 (23:39 +0200)] 
Add binary composite dumper

3 years agoDrop TypeInfo.async_fetch(), use fetch() for both connection types
Daniele Varrazzo [Thu, 26 Aug 2021 18:58:05 +0000 (20:58 +0200)] 
Drop TypeInfo.async_fetch(), use fetch() for both connection types

3 years agoA more elegant way to customise TypeInfo registration in subclasses
Daniele Varrazzo [Thu, 26 Aug 2021 18:18:57 +0000 (20:18 +0200)] 
A more elegant way to customise TypeInfo registration in subclasses

3 years agoMake register_composite(), register_range() the public interface
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).

3 years agoRegister composite dumper if the factory is a type
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.

3 years agoClean up datetime adaptation docs
Daniele Varrazzo [Thu, 26 Aug 2021 12:51:08 +0000 (14:51 +0200)] 
Clean up datetime adaptation docs

3 years agoDon't use the generic name register_adapters
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...

3 years agoVerify that arrays of binary types dump correctly
Daniele Varrazzo [Thu, 26 Aug 2021 01:14:32 +0000 (03:14 +0200)] 
Verify that arrays of binary types dump correctly

3 years agoMore types adaptation docs
Daniele Varrazzo [Thu, 26 Aug 2021 01:13:56 +0000 (03:13 +0200)] 
More types adaptation docs

3 years agoDrop TODO doc point to something that people can discover themselves
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.

3 years agoAdd binary parameter to cursor.execute()
Daniele Varrazzo [Wed, 25 Aug 2021 17:57:46 +0000 (19:57 +0200)] 
Add binary parameter to cursor.execute()

3 years agoDrop Cursor.pgresult duplication in docs
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.

3 years agoDocument pgconn, pgresult properties
Daniele Varrazzo [Wed, 25 Aug 2021 02:58:24 +0000 (04:58 +0200)] 
Document pgconn, pgresult properties

3 years agoDon't use --no-deps to install the pool package
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).

3 years agoReadmes and metadata cleanup
Daniele Varrazzo [Wed, 25 Aug 2021 02:02:30 +0000 (04:02 +0200)] 
Readmes and metadata cleanup

3 years agoDrop TODO point after understanding that Windows has no IANA db
Daniele Varrazzo [Wed, 25 Aug 2021 01:02:54 +0000 (03:02 +0200)] 
Drop TODO point after understanding that Windows has no IANA db

3 years agoDrop TODO point regarding Travis
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.

3 years agoMerge branch 'array-delim'
Daniele Varrazzo [Wed, 25 Aug 2021 01:05:24 +0000 (03:05 +0200)] 
Merge branch 'array-delim'

3 years agoDump lists keeping the type delimiter into account
Daniele Varrazzo [Tue, 24 Aug 2021 20:55:09 +0000 (22:55 +0200)] 
Dump lists keeping the type delimiter into account

3 years agoLoad arrays of types with delimiters different than comma (e.g. box)
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)

3 years agoAdd "char" data type loading
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.

3 years agoFix typeinfo fetch of alt_name
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.

3 years agoAdd oid to column representation
Daniele Varrazzo [Tue, 24 Aug 2021 19:05:39 +0000 (21:05 +0200)] 
Add oid to column representation

3 years agoPlease mypy and NoReturn function
Daniele Varrazzo [Tue, 24 Aug 2021 20:59:58 +0000 (22:59 +0200)] 
Please mypy and NoReturn function

3 years agoDrop Cursor query, params attribute.
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.

3 years agoAdd cursor.statusmessage attribute
Daniele Varrazzo [Tue, 24 Aug 2021 16:34:38 +0000 (18:34 +0200)] 
Add cursor.statusmessage attribute

3 years agoDrop Cursor.status property
Daniele Varrazzo [Tue, 24 Aug 2021 15:58:34 +0000 (17:58 +0200)] 
Drop Cursor.status property

3 years agoRealign async copy tests to the sync ones
Daniele Varrazzo [Tue, 24 Aug 2021 15:54:47 +0000 (17:54 +0200)] 
Realign async copy tests to the sync ones

3 years agoDrop TODO point now working
Daniele Varrazzo [Tue, 24 Aug 2021 15:20:09 +0000 (17:20 +0200)] 
Drop TODO point now working

Add tests to prove it works.

3 years agoMore helpful error looking up for missing types in the registry
Daniele Varrazzo [Tue, 24 Aug 2021 15:18:30 +0000 (17:18 +0200)] 
More helpful error looking up for missing types in the registry

3 years agoDrop TODO point on which I'm wrong
Daniele Varrazzo [Tue, 24 Aug 2021 14:47:45 +0000 (16:47 +0200)] 
Drop TODO point on which I'm wrong

3 years agoDrop TODO point for something that probably can't be improved
Daniele Varrazzo [Tue, 24 Aug 2021 14:46:24 +0000 (16:46 +0200)] 
Drop TODO point for something that probably can't be improved

3 years agoAdd test for as_bytes method of sql objects
Daniele Varrazzo [Tue, 24 Aug 2021 14:22:16 +0000 (16:22 +0200)] 
Add test for as_bytes method of sql objects

3 years agoAdd links to GitHub tickets related to DSN mangling
Daniele Varrazzo [Tue, 24 Aug 2021 14:21:36 +0000 (16:21 +0200)] 
Add links to GitHub tickets related to DSN mangling

3 years agoAdd _get_connection_params method to connections
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.

3 years agoBump to next dev version
Daniele Varrazzo [Tue, 24 Aug 2021 01:59:15 +0000 (03:59 +0200)] 
Bump to next dev version

3 years agoUse dev dependencies in tox checking 3.0.dev2
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.

3 years agoLink mypy ignore comment to issue reported upstream
Daniele Varrazzo [Sat, 21 Aug 2021 15:32:32 +0000 (17:32 +0200)] 
Link mypy ignore comment to issue reported upstream

3 years agoFix building pool docs
Daniele Varrazzo [Sat, 21 Aug 2021 20:56:33 +0000 (22:56 +0200)] 
Fix building pool docs

3 years agoDrop ConnectionInfo.protocol_version.
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.

3 years agoMerge branch 'separate-pool'
Daniele Varrazzo [Sat, 21 Aug 2021 14:22:36 +0000 (16:22 +0200)] 
Merge branch 'separate-pool'

3 years agoDocument that the connection pool is in a separate package
Daniele Varrazzo [Sat, 21 Aug 2021 13:42:18 +0000 (15:42 +0200)] 
Document that the connection pool is in a separate package

3 years agoBuild the pool package and include it testing other packages
Daniele Varrazzo [Thu, 19 Aug 2021 23:15:20 +0000 (01:15 +0200)] 
Build the pool package and include it testing other packages

3 years agoMove the pool into a separate package
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.

3 years agoUpdate doc building requirements
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.

3 years agoMerge branch 'older-libpq'
Daniele Varrazzo [Sat, 21 Aug 2021 01:51:01 +0000 (03:51 +0200)] 
Merge branch 'older-libpq'

3 years agoRun windows tests in a way more similar to the built packages
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

3 years agoAllow building the C module with older libpq versions
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.

3 years agoMerge branch 'split-async'
Daniele Varrazzo [Sat, 21 Aug 2021 01:50:40 +0000 (03:50 +0200)] 
Merge branch 'split-async'

3 years agoasync_pool module renamed for consistency with other _async ones
Daniele Varrazzo [Fri, 13 Aug 2021 09:58:33 +0000 (10:58 +0100)] 
async_pool module renamed for consistency with other _async ones

3 years agoMove the AsyncCursor implementation in its own module
Daniele Varrazzo [Fri, 13 Aug 2021 09:55:59 +0000 (10:55 +0100)] 
Move the AsyncCursor implementation in its own module

3 years agoMove the AsyncConnection 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

4 years agoRevert commit 044077e420471e86b51f1feecdc5927818db55d4.
Daniele Varrazzo [Mon, 9 Aug 2021 14:39:24 +0000 (15:39 +0100)] 
Revert commit 044077e420471e86b51f1feecdc5927818db55d4.

4 years agoAdd @bloomberg sponsorship
Daniele Varrazzo [Sat, 7 Aug 2021 17:55:20 +0000 (18:55 +0100)] 
Add @bloomberg sponsorship

4 years agoMerge branch 'generic-row-factories'
Daniele Varrazzo [Thu, 5 Aug 2021 20:32:10 +0000 (21:32 +0100)] 
Merge branch 'generic-row-factories'

4 years agoSimplify rows example
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.

4 years agoAdd psycopg.rows.args_row and kwargs_row factories
Daniele Varrazzo [Thu, 5 Aug 2021 19:39:57 +0000 (20:39 +0100)] 
Add psycopg.rows.args_row and kwargs_row factories

4 years agoEarly bailout style in the row factory functions
Daniele Varrazzo [Thu, 5 Aug 2021 16:50:15 +0000 (17:50 +0100)] 
Early bailout style in the row factory functions

4 years agoAdd class_row row factory generator
Daniele Varrazzo [Wed, 4 Aug 2021 13:49:14 +0000 (14:49 +0100)] 
Add class_row row factory generator

4 years agoMove dict/namedtuple row factory cursor inspection outside row maker
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.

4 years agoFix description for cursors returning no column
Daniele Varrazzo [Wed, 4 Aug 2021 13:28:51 +0000 (14:28 +0100)] 
Fix description for cursors returning no column

4 years agoFix a typo in ConnectionInfo.dsn docstring
Denis Laxalde [Thu, 5 Aug 2021 06:45:50 +0000 (08:45 +0200)] 
Fix a typo in ConnectionInfo.dsn docstring

4 years agoAdd pgconn.encrypt_password function
Daniele Varrazzo [Mon, 2 Aug 2021 00:47:52 +0000 (02:47 +0200)] 
Add pgconn.encrypt_password function

4 years agoInclude the '()' in the links to the libpq functions
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.

4 years agoSome docs cleanup
Daniele Varrazzo [Mon, 2 Aug 2021 09:59:50 +0000 (11:59 +0200)] 
Some docs cleanup

4 years agoAdd ConnectionInfo.dsn property
Daniele Varrazzo [Mon, 2 Aug 2021 09:59:20 +0000 (11:59 +0200)] 
Add ConnectionInfo.dsn property

4 years agoFix returning connection params in get_parameters() with empty default
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.