]>
git.ipfire.org Git - thirdparty/psycopg.git/log
Federico Caselli [Mon, 27 Sep 2021 20:39:31 +0000 (22:39 +0200)]
Support py36, test exception
Federico Caselli [Sun, 26 Sep 2021 19:53:22 +0000 (21:53 +0200)]
Require selector event loop on windows; enable aync tests
Fixes #76
Daniele Varrazzo [Mon, 27 Sep 2021 09:23:26 +0000 (11:23 +0200)]
Fix doc for Notify
Probably autoclass is confused by the class module being changed.
Daniele Varrazzo [Mon, 27 Sep 2021 00:01:30 +0000 (02:01 +0200)]
Print a log instead of a warning on swallowed exit exception
Daniele Varrazzo [Sun, 26 Sep 2021 23:33:16 +0000 (01:33 +0200)]
Drop TODO points covered by the _dns module
Daniele Varrazzo [Sun, 26 Sep 2021 23:37:02 +0000 (01:37 +0200)]
Merge branch 'no-connection-encoding'
Daniele Varrazzo [Sun, 26 Sep 2021 23:26:59 +0000 (01:26 +0200)]
Document that client_encoding is gone
Daniele Varrazzo [Fri, 14 May 2021 22:24:24 +0000 (00:24 +0200)]
Drop Connection.client_encoding attribute
Expose it as `Connection.info.encoding`, but use pgconn_encoding()
internally.
Daniele Varrazzo [Fri, 14 May 2021 21:55:31 +0000 (23:55 +0200)]
Add Cursor._pgconn internal property
Daniele Varrazzo [Fri, 14 May 2021 21:30:54 +0000 (23:30 +0200)]
Make encodings module private
Daniele Varrazzo [Fri, 14 May 2021 21:11:50 +0000 (23:11 +0200)]
Drop connection.set_client_encoding
The property might have been super useful in pre-unicode times, but now
it is really an implementation detail.
The connection encoding can be still changed setting the GUC or with a
PGOPTION or option in the connection params.
Daniele Varrazzo [Sun, 26 Sep 2021 22:08:10 +0000 (00:08 +0200)]
Fix beta release number to normalised form... again!
I seem unable to learn what that form is.
Daniele Varrazzo [Sun, 26 Sep 2021 21:08:11 +0000 (23:08 +0200)]
Drop "installing from source" from readme and install docs cleanup
Daniele Varrazzo [Sun, 26 Sep 2021 20:31:33 +0000 (22:31 +0200)]
Merge branch 'fix-dumping-by-oid'
Daniele Varrazzo [Sun, 26 Sep 2021 20:02:22 +0000 (22:02 +0200)]
Note fix of dumping by oid in news file
Daniele Varrazzo [Sun, 26 Sep 2021 20:18:54 +0000 (22:18 +0200)]
Improve AdaptersMap and Copy.set_types() docs
Daniele Varrazzo [Sun, 26 Sep 2021 19:47:06 +0000 (21:47 +0200)]
Fix BytesDumper return type annotation
Daniele Varrazzo [Thu, 23 Sep 2021 14:28:12 +0000 (16:28 +0200)]
Add C version of numeric dumpers by oid too
Daniele Varrazzo [Sun, 26 Sep 2021 19:02:22 +0000 (21:02 +0200)]
Better wording: writing to attribute -> setting the attribute
Daniele Varrazzo [Thu, 23 Sep 2021 14:22:26 +0000 (16:22 +0200)]
Fix selection of dumper by oid
Add a few dumpers which can deal with the different types and make sure
to register them so that the lookup by oid would use them. Because they
are slightly less efficient (with isinstance tests) we prefer to have
them only used by oid, instead of extending the domain of the dumpers
used in normal adaptation by type.
This commit only fixes the Python side. The C numeric dumpers require
more work.
Daniele Varrazzo [Thu, 23 Sep 2021 14:30:16 +0000 (16:30 +0200)]
Use natural iteration over pq.Format in parametrised tests
Daniele Varrazzo [Sun, 26 Sep 2021 19:41:08 +0000 (21:41 +0200)]
Better tests of dumping after set_types
These tests reveal that When there is a 1-n mapping between oid and
python classes, we might pick a dumper that cannot really deal with the
object to dump (for instance trying to dump an int to numeric with the
Decimal dumper).
Daniele Varrazzo [Sun, 26 Sep 2021 18:32:36 +0000 (20:32 +0200)]
Add news file to the docs
Daniele Varrazzo [Thu, 23 Sep 2021 15:23:39 +0000 (17:23 +0200)]
Allow to specify a custom adapt context on connect
Close #83
Daniele Varrazzo [Fri, 24 Sep 2021 15:36:22 +0000 (17:36 +0200)]
Fix beta release number to normalised form
Daniele Varrazzo [Thu, 23 Sep 2021 01:59:19 +0000 (03:59 +0200)]
Fix partially written comment
The issue was addressed before the comment could be written in all its ugliness.
Daniele Varrazzo [Wed, 22 Sep 2021 20:10:09 +0000 (22:10 +0200)]
Clear the prepared statements if the catalog might have changed
This could happen on DROP (and re-creation) of some object or on the
implicit drop caused by a rollback.
Issues happen if a prepared transaction is executed after an object has
been dropped: see
https://github.com/sqlalchemy/sqlalchemy/issues/6842#issuecomment-
925131836
Postgres devs suggestion is to avoid to do that: see
https://www.postgresql.org/message-id/
2220999 .
1632335261 %40sss.pgh.pa.us
Daniele Varrazzo [Thu, 23 Sep 2021 01:15:52 +0000 (03:15 +0200)]
Improve range random testing
Make sure to create a numrange[] field instead of text, which would have
happened if the random selection in Faker.types_names() had picked an
array whose first object is an empty range.
Also extend the tests to certain binary range types which previously
couldn't be managed.
Daniele Varrazzo [Fri, 14 May 2021 21:18:38 +0000 (23:18 +0200)]
Fix a couple of imports as relative
Daniele Varrazzo [Wed, 22 Sep 2021 13:55:19 +0000 (15:55 +0200)]
Specify better that registering adapters only affects new object
It is unclear that registering adapters globally doesn't affect existing
connections, including the one used to fetch info... See
https://github.com/sqlalchemy/sqlalchemy/issues/6842#issuecomment-
924425360
for instance.
Daniele Varrazzo [Tue, 21 Sep 2021 19:01:48 +0000 (20:01 +0100)]
Improve pq.version() doc
Daniele Varrazzo [Tue, 21 Sep 2021 18:54:24 +0000 (19:54 +0100)]
Expose the libpq build version as psycopg.pq.__build_version__
Daniele Varrazzo [Tue, 21 Sep 2021 18:27:41 +0000 (19:27 +0100)]
Merge branch 'add-shapely-adapters'
Daniele Varrazzo [Tue, 21 Sep 2021 16:09:23 +0000 (17:09 +0100)]
Use class instead of type to create shapely dumpers
Daniele Varrazzo [Tue, 21 Sep 2021 15:54:14 +0000 (16:54 +0100)]
Report a friendly message if the geometry info is not available
Daniele Varrazzo [Tue, 21 Sep 2021 15:32:01 +0000 (16:32 +0100)]
Create postgis extension if needed by tests, shapely tests cleanup
Daniele Varrazzo [Tue, 21 Sep 2021 15:24:32 +0000 (16:24 +0100)]
Move shapely test to the types package
Daniele Varrazzo [Tue, 21 Sep 2021 15:19:17 +0000 (16:19 +0100)]
Shapely docs cleanup
Jacopo Farina [Mon, 20 Sep 2021 12:57:30 +0000 (14:57 +0200)]
Fix test MultiPolygon geometry, add test for it
Jacopo Farina [Thu, 16 Sep 2021 12:45:48 +0000 (14:45 +0200)]
Pass test geoJSON as parameter, not with string interpolation
Jacopo Farina [Thu, 16 Sep 2021 09:19:35 +0000 (11:19 +0200)]
Parametrize input format too
Daniele Varrazzo [Sun, 12 Sep 2021 22:00:22 +0000 (00:00 +0200)]
Fix shapely documentation
Jacopo Farina [Wed, 15 Sep 2021 14:28:35 +0000 (16:28 +0200)]
Force different placeholder to increase the coverage
Jacopo Farina [Wed, 15 Sep 2021 13:55:32 +0000 (15:55 +0200)]
Import modules for shapely test only at runtime
Jacopo Farina [Wed, 15 Sep 2021 13:38:25 +0000 (15:38 +0200)]
Add tests for the Shapely adapter based on PostGIS
Jacopo Farina [Wed, 15 Sep 2021 11:17:23 +0000 (13:17 +0200)]
Make binary dumper the default one
The latest registered dumper is the one used by default if the %s
placeholder is used in a query. The binary one is preferred.
Jacopo Farina [Wed, 15 Sep 2021 11:10:22 +0000 (13:10 +0200)]
Rename module from types.geometry to types.shapely
In case in the future further adapters for geometry types are added,
this naming makes more sense
Jacopo Farina [Tue, 14 Sep 2021 09:24:13 +0000 (11:24 +0200)]
Handle memoriview and buffer data as well as bytes, better import
Jacopo Farina [Tue, 14 Sep 2021 09:14:26 +0000 (11:14 +0200)]
Add Shapely-based adapter for PostGIS geometry, and docs
Previous commits were messy due to some rebase gone wrong, moved them to
a single commit
Daniele Varrazzo [Tue, 21 Sep 2021 16:03:52 +0000 (17:03 +0100)]
Use class instead of type() to create the specific hstore dumper
The name is not variable so it's not useful to use the less common
constructor.
Daniele Varrazzo [Tue, 21 Sep 2021 15:55:52 +0000 (16:55 +0100)]
Raise a friendly exception if None is passed to register_*()
The most likely cause is fetching info and the object is not found.
Suggest that that's what happened instead of throwing an AttributeError
or anything else random.
Daniele Varrazzo [Tue, 21 Sep 2021 14:53:08 +0000 (15:53 +0100)]
Fix missing assert in test
Add acopy() helper to write async tests more similar to sync ones
Daniele Varrazzo [Fri, 3 Sep 2021 16:39:09 +0000 (18:39 +0200)]
Do not use the extended protocol in COPY
Error recovery is reported to be problematic (see #78).
Close #82.
Daniele Varrazzo [Wed, 15 Sep 2021 18:19:26 +0000 (19:19 +0100)]
Drop rename of PyFormat import in tests
It was to minimise a diff when it got renamed, but it's confusing using
old tests as template for new ones.
Artur Dryomov [Tue, 14 Sep 2021 09:37:55 +0000 (12:37 +0300)]
Change macOS name in installation documentation
Daniele Varrazzo [Mon, 13 Sep 2021 21:07:03 +0000 (23:07 +0200)]
Fix docs case typo
Daniele Varrazzo [Mon, 13 Sep 2021 15:56:50 +0000 (17:56 +0200)]
Small adjustments suggested by pyupgrade
Daniele Varrazzo [Sun, 12 Sep 2021 22:25:57 +0000 (00:25 +0200)]
Don't pass "utf8" to str.encode() and bytes.decode()
"utf8" is the default: not passing it is marginally faster.
Daniele Varrazzo [Sun, 12 Sep 2021 00:31:44 +0000 (02:31 +0200)]
Run DNS-related tests in CI
Daniele Varrazzo [Sun, 12 Sep 2021 00:26:02 +0000 (02:26 +0200)]
Make sure tests can run without installing psycopg_pool
Daniele Varrazzo [Wed, 8 Sep 2021 21:22:29 +0000 (23:22 +0200)]
Improve the docs index page
Daniele Varrazzo [Wed, 8 Sep 2021 21:19:20 +0000 (23:19 +0200)]
docs: wordsmith
Daniele Varrazzo [Wed, 8 Sep 2021 20:33:50 +0000 (22:33 +0200)]
Bump furo version for docs building
Provides fix for https://github.com/pradyunsg/furo/discussions/240
Daniele Varrazzo [Wed, 8 Sep 2021 20:33:36 +0000 (22:33 +0200)]
Improve migration docs
Daniele Varrazzo [Fri, 3 Sep 2021 22:24:39 +0000 (00:24 +0200)]
Merge branch 'build-src-wheels'
Daniele Varrazzo [Fri, 3 Sep 2021 22:04:17 +0000 (00:04 +0200)]
Unify sdist and wheel packages building
Daniele Varrazzo [Fri, 3 Sep 2021 21:57:48 +0000 (23:57 +0200)]
Drop building C wheel package
It cannot be distributed on PyPI, and it makes sense that it's built on
the client, so just distribute the .tar.gz.
Daniele Varrazzo [Fri, 3 Sep 2021 16:49:00 +0000 (18:49 +0200)]
Build pacakges wheels
Not doing so, packages will be built by the clients on install. Not
nice.
Daniele Varrazzo [Fri, 3 Sep 2021 16:48:31 +0000 (18:48 +0200)]
Add vim folds to package workflow
Daniele Varrazzo [Fri, 3 Sep 2021 12:55:02 +0000 (14:55 +0200)]
Fixed @Intevation url in the backers file
Daniele Varrazzo [Fri, 3 Sep 2021 00:38:32 +0000 (02:38 +0200)]
Fix requirement for furo
Daniele Varrazzo [Tue, 31 Aug 2021 21:28:49 +0000 (23:28 +0200)]
Fix xml dumper example
Bad query, use type name instead of oid.
Daniele Varrazzo [Tue, 31 Aug 2021 18:24:21 +0000 (20:24 +0200)]
Upgrade Furo docs theme to stable version
The previous version produced white flash changing page in dark theme.
https://github.com/pradyunsg/furo/discussions/230
(at least on my laptop - the problem might be compound with some
extension, because others couldn't reproduce the issue, and Furo author
says it only happened on long pages for them).
Daniele Varrazzo [Tue, 31 Aug 2021 14:42:07 +0000 (16:42 +0200)]
Fix tests retry if the failure leaves the connection in bad state
Daniele Varrazzo [Mon, 30 Aug 2021 13:41:38 +0000 (15:41 +0200)]
Docs typo: several way -> ways
Daniele Varrazzo [Mon, 30 Aug 2021 05:51:30 +0000 (07:51 +0200)]
Fix async SRV resolution
Also use separate fixtures to mock sync and async DNS resolution.
Daniele Varrazzo [Mon, 30 Aug 2021 04:35:34 +0000 (06:35 +0200)]
Bump to next beta release
Daniele Varrazzo [Mon, 30 Aug 2021 04:34:40 +0000 (06:34 +0200)]
Instructions for PyPI installation in the readme
Daniele Varrazzo [Mon, 30 Aug 2021 04:32:20 +0000 (06:32 +0200)]
Update classifiers to beta state
Daniele Varrazzo [Mon, 30 Aug 2021 04:32:05 +0000 (06:32 +0200)]
Update install docs to point at PyPI
Daniele Varrazzo [Mon, 30 Aug 2021 03:24:13 +0000 (05:24 +0200)]
Bump version to beta 1
Daniele Varrazzo [Mon, 30 Aug 2021 03:21:53 +0000 (05:21 +0200)]
Add function to perform SRV DNS resolution
Daniele Varrazzo [Sun, 29 Aug 2021 22:01:15 +0000 (00:01 +0200)]
Allow to intermix local addresses with DNS async resolution
Daniele Varrazzo [Mon, 30 Aug 2021 03:31:32 +0000 (05:31 +0200)]
Point out in async connection about blocking DNS and solution
Daniele Varrazzo [Sun, 29 Aug 2021 21:41:54 +0000 (23:41 +0200)]
Rename _dns docs page to dns as non compatible with GitHub pages
Daniele Varrazzo [Sun, 29 Aug 2021 21:33:26 +0000 (23:33 +0200)]
Merge branch 'async-dns-dnspython'
Daniele Varrazzo [Sun, 29 Aug 2021 16:31:40 +0000 (18:31 +0200)]
Add _dns module docs
Daniele Varrazzo [Sun, 29 Aug 2021 16:11:20 +0000 (18:11 +0200)]
Keep env vars into account in async DNS resolutions
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