]> git.ipfire.org Git - thirdparty/psycopg.git/log
thirdparty/psycopg.git
4 years agoDropped support for loader functions
Daniele Varrazzo [Thu, 6 Aug 2020 18:52:44 +0000 (19:52 +0100)] 
Dropped support for loader functions

4 years agoAll loader functions converted to classes
Daniele Varrazzo [Thu, 6 Aug 2020 18:41:34 +0000 (19:41 +0100)] 
All loader functions converted to classes

4 years agoDropped Transform.dump_sequence(), Transform.types_sequence()
Daniele Varrazzo [Thu, 6 Aug 2020 02:51:12 +0000 (03:51 +0100)] 
Dropped Transform.dump_sequence(), Transform.types_sequence()

4 years agoDropped Transformer.dump()
Daniele Varrazzo [Thu, 6 Aug 2020 02:29:08 +0000 (03:29 +0100)] 
Dropped Transformer.dump()

4 years agoDropped MaybeOid type and optional second return value from Dumper.dump()
Daniele Varrazzo [Thu, 6 Aug 2020 02:18:53 +0000 (03:18 +0100)] 
Dropped MaybeOid type and optional second return value from Dumper.dump()

4 years agoDropped oids from Transform.dump_sequence() return value
Daniele Varrazzo [Thu, 6 Aug 2020 01:15:52 +0000 (02:15 +0100)] 
Dropped oids from Transform.dump_sequence() return value

4 years agoAdded Transformer.types_sequence
Daniele Varrazzo [Thu, 6 Aug 2020 01:09:35 +0000 (02:09 +0100)] 
Added Transformer.types_sequence

Not entirely sure yet if it will be needed, but this allows to free
dump_sequence() from returning the oids as second argument.

Dropped Transformer.get_dump_function() too.

4 years agoAdded oid property on Dumper object
Daniele Varrazzo [Thu, 6 Aug 2020 00:08:59 +0000 (01:08 +0100)] 
Added oid property on Dumper object

4 years agoDropped use of plain functions to define dumpers
Daniele Varrazzo [Wed, 5 Aug 2020 22:25:56 +0000 (23:25 +0100)] 
Dropped use of plain functions to define dumpers

4 years agoFlake8 configured to deal with the psycopg3 dir
Daniele Varrazzo [Sun, 23 Aug 2020 18:22:29 +0000 (19:22 +0100)] 
Flake8 configured to deal with the psycopg3 dir

4 years agoTest and dev dependencies expressed as extras
Daniele Varrazzo [Sun, 23 Aug 2020 15:41:19 +0000 (16:41 +0100)] 
Test and dev dependencies expressed as extras

4 years agoTest fixed to not assume PID < 65535
Daniele Varrazzo [Sun, 23 Aug 2020 14:50:57 +0000 (15:50 +0100)] 
Test fixed to not assume PID < 65535

5 years agoTests: Create svcconn with autocommit on
Daniel Fortunov [Sun, 26 Jul 2020 01:37:02 +0000 (02:37 +0100)] 
Tests: Create svcconn with autocommit on

So that you don't deadlock the test run if you forget to call commit()

e.g. If you use svcconn to create a test table for use by tests, and
forget to call svcconn.commit(), the first test to (try to) touch the
table will block forever waiting on the svcconn transaction to commit.

5 years agoMore complete string escaping test
Daniele Varrazzo [Sat, 8 Aug 2020 19:55:39 +0000 (20:55 +0100)] 
More complete string escaping test

5 years agoAdded Escaping.escape_string
Daniele Varrazzo [Sat, 8 Aug 2020 19:42:00 +0000 (20:42 +0100)] 
Added Escaping.escape_string

5 years agoAdded Escaping.escape_identifier
Daniele Varrazzo [Sat, 8 Aug 2020 18:31:43 +0000 (19:31 +0100)] 
Added Escaping.escape_identifier

5 years agoAdded Escaping.escape_literal
Daniele Varrazzo [Sat, 8 Aug 2020 18:07:52 +0000 (19:07 +0100)] 
Added Escaping.escape_literal

5 years agoIgnore html files generated by Cython
Daniele Varrazzo [Sat, 8 Aug 2020 18:05:32 +0000 (19:05 +0100)] 
Ignore html files generated by Cython

5 years agoDon't be so eager to execute 'begin'
Daniel Fortunov [Thu, 6 Aug 2020 23:48:25 +0000 (00:48 +0100)] 
Don't be so eager to execute 'begin'

Only execute an automatic 'begin' statement if the TransactionStatus is
IDLE, so that a failure to execute 'begin' doesn't overshadow a failure
to execute a user query.

5 years agoUpdate pytest to v6
Daniele Varrazzo [Wed, 5 Aug 2020 01:30:47 +0000 (02:30 +0100)] 
Update pytest to v6

5 years agoCreate two different python distributions in the project
Daniele Varrazzo [Sat, 25 Jul 2020 23:54:32 +0000 (00:54 +0100)] 
Create two different python distributions in the project

The psycopg3 package is pure Python and doesn't depend on Cython, the
psycopg3_c package is entirely optional and depends on the former.

Tox had to be split, because it gets confused by the presence of the
top-level pyproject.toml, which is there only to configure black.

5 years agoDropped unused function
Daniele Varrazzo [Fri, 3 Jul 2020 09:12:37 +0000 (21:12 +1200)] 
Dropped unused function

5 years agoAdded row-by-row copy in
Daniele Varrazzo [Tue, 30 Jun 2020 18:41:50 +0000 (06:41 +1200)] 
Added row-by-row copy in

5 years agoHandle a bad command passed to copy
Daniele Varrazzo [Tue, 30 Jun 2020 17:58:08 +0000 (05:58 +1200)] 
Handle a bad command passed to copy

5 years agoSome mypy cleanup
Daniele Varrazzo [Wed, 24 Jun 2020 14:17:20 +0000 (02:17 +1200)] 
Some mypy cleanup

5 years agoUse a standard mypy config file
Daniele Varrazzo [Wed, 24 Jun 2020 11:12:17 +0000 (23:12 +1200)] 
Use a standard mypy config file

It integrates better with the editor (trying ALE on Vim).
Newer mypy version allows to hide the file.

5 years agoDropped attempt of read support
Daniele Varrazzo [Wed, 24 Jun 2020 08:44:32 +0000 (20:44 +1200)] 
Dropped attempt of read support

It doesn't add anything to selecting, except that it cannot work as type
info is not available on copy. Furthermore it was based on the broken
assumption that copy sends generic buffers, whereas it sends entire
rows, so it was uselessly complicated.

5 years agoAllow passing a str buffer to copy
Daniele Varrazzo [Wed, 24 Jun 2020 08:35:58 +0000 (20:35 +1200)] 
Allow passing a str buffer to copy

5 years agoRaise error messages in the connection encoding
Daniele Varrazzo [Tue, 23 Jun 2020 11:17:10 +0000 (23:17 +1200)] 
Raise error messages in the connection encoding

5 years agoAdded reading from copy
Daniele Varrazzo [Tue, 23 Jun 2020 10:31:40 +0000 (22:31 +1200)] 
Added reading from copy

5 years agoAdded wrapper for libpq function PQgetCopyData
Daniele Varrazzo [Tue, 23 Jun 2020 08:28:27 +0000 (20:28 +1200)] 
Added wrapper for libpq function PQgetCopyData

5 years agoAdded context manager interface to copy objects
Daniele Varrazzo [Mon, 22 Jun 2020 09:41:58 +0000 (21:41 +1200)] 
Added context manager interface to copy objects

5 years agoAdded basic copy to server in blocks
Daniele Varrazzo [Mon, 22 Jun 2020 07:32:34 +0000 (19:32 +1200)] 
Added basic copy to server in blocks

5 years agoImplemented rows and fields splitting on text copy
Daniele Varrazzo [Sun, 21 Jun 2020 10:15:15 +0000 (22:15 +1200)] 
Implemented rows and fields splitting on text copy

5 years agoAdded pq.PGresult.set_attributes() method
Daniele Varrazzo [Sun, 21 Jun 2020 07:01:32 +0000 (19:01 +1200)] 
Added pq.PGresult.set_attributes() method

5 years agoSketching an interface for a copy object
Daniele Varrazzo [Sun, 21 Jun 2020 05:51:11 +0000 (17:51 +1200)] 
Sketching an interface for a copy object

5 years agobinary attribute replaced by format
Daniele Varrazzo [Sun, 21 Jun 2020 04:38:50 +0000 (16:38 +1200)] 
binary attribute replaced by format

5 years agoAdded mapping from sqlstate to error classes
Daniele Varrazzo [Sat, 30 May 2020 21:14:50 +0000 (09:14 +1200)] 
Added mapping from sqlstate to error classes

5 years agoAdded query canceling
Daniele Varrazzo [Sat, 30 May 2020 18:00:27 +0000 (06:00 +1200)] 
Added query canceling

5 years agoAdded notification handling in connections
Daniele Varrazzo [Mon, 25 May 2020 06:13:44 +0000 (18:13 +1200)] 
Added notification handling in connections

Added both a callback systen and an explicit generator. I'll share the
design on the ML and ask for comments.

5 years agoAdded PQnotifies libpq wrapper
Daniele Varrazzo [Sun, 24 May 2020 05:43:27 +0000 (17:43 +1200)] 
Added PQnotifies libpq wrapper

5 years agoAdded further tests about dsn parsing
Daniele Varrazzo [Sat, 23 May 2020 05:18:58 +0000 (17:18 +1200)] 
Added further tests about dsn parsing

5 years agoClose the connection on GC only if created in the same process
Daniele Varrazzo [Sat, 23 May 2020 04:50:41 +0000 (16:50 +1200)] 
Close the connection on GC only if created in the same process

Fix the same issue reported in psycopg/psycopg2#829.

5 years agoMoving concurrency tests in their own files
Daniele Varrazzo [Sat, 23 May 2020 04:15:08 +0000 (16:15 +1200)] 
Moving concurrency tests in their own files

These tests are verbose, slow, and don't test the interface, rather the
behaviour, in peculiar cases.

Some test modules names moved to keep related tested objects together.

5 years agoDropped pq fixture
Daniele Varrazzo [Sat, 23 May 2020 03:36:15 +0000 (15:36 +1200)] 
Dropped pq fixture

Just use the module as a normal program would to.

5 years agoAdded public pgconn_ptr, pgresult_ptr attributes
Daniele Varrazzo [Sat, 23 May 2020 03:08:34 +0000 (15:08 +1200)] 
Added public pgconn_ptr, pgresult_ptr attributes

5 years agoSmaller init function using a partial instead of a closure
Daniele Varrazzo [Sat, 23 May 2020 03:07:43 +0000 (15:07 +1200)] 
Smaller init function using a partial instead of a closure

5 years agoAcept string subtypes as connection string
Daniele Varrazzo [Sat, 23 May 2020 01:29:15 +0000 (13:29 +1200)] 
Acept string subtypes as connection string

5 years agoAdded a few concurrency tests
Daniele Varrazzo [Fri, 22 May 2020 09:03:58 +0000 (21:03 +1200)] 
Added a few concurrency tests

5 years agoUsing pytest-asyncio instead of our thing to run async tests
Daniele Varrazzo [Fri, 22 May 2020 17:44:46 +0000 (05:44 +1200)] 
Using pytest-asyncio instead of our thing to run async tests

5 years agoUse severity instead on severity_nonlocalized in tests
Daniele Varrazzo [Fri, 22 May 2020 17:14:54 +0000 (05:14 +1200)] 
Use severity instead on severity_nonlocalized in tests

The attr is not available on PG 9.5

5 years agoMake sure connections and cursors can be gc'd correctly
Daniele Varrazzo [Fri, 22 May 2020 06:32:03 +0000 (18:32 +1200)] 
Make sure connections and cursors can be gc'd correctly

5 years agoAdded a few tests around connection encoding
Daniele Varrazzo [Fri, 22 May 2020 06:16:03 +0000 (18:16 +1200)] 
Added a few tests around connection encoding

5 years agoMake sure notices are enabled in test db
Daniele Varrazzo [Fri, 22 May 2020 16:52:38 +0000 (04:52 +1200)] 
Make sure notices are enabled in test db

5 years agoNotice handler renamed to notice callback
Daniele Varrazzo [Fri, 22 May 2020 05:40:46 +0000 (17:40 +1200)] 
Notice handler renamed to notice callback

5 years agoAdded Diagnostic object
Daniele Varrazzo [Fri, 22 May 2020 04:51:59 +0000 (16:51 +1200)] 
Added Diagnostic object

Use Diagnostic as exception .diag attribute and pgresult wrapper in
notices.

5 years agoAdded notification handlers on connection objects
Daniele Varrazzo [Thu, 21 May 2020 17:56:16 +0000 (05:56 +1200)] 
Added notification handlers on connection objects

5 years agoAdded notice handler to pq.PGconn
Daniele Varrazzo [Thu, 21 May 2020 16:54:40 +0000 (04:54 +1200)] 
Added notice handler to pq.PGconn

5 years agoTest what happens if a connection is broken
Daniele Varrazzo [Thu, 21 May 2020 06:03:36 +0000 (18:03 +1200)] 
Test what happens if a connection is broken

5 years agoFixed testing instruction in readme
Daniele Varrazzo [Thu, 21 May 2020 06:03:04 +0000 (18:03 +1200)] 
Fixed testing instruction in readme

5 years agoDropped connection's encode/decode methods
Daniele Varrazzo [Thu, 21 May 2020 05:47:11 +0000 (17:47 +1200)] 
Dropped connection's encode/decode methods

5 years agoAdded hacking info to readme
Daniele Varrazzo [Thu, 21 May 2020 04:49:07 +0000 (16:49 +1200)] 
Added hacking info to readme

tox definitions and tools configurations tweaked to work out of the box.

Close #3

5 years agoAdded connection autocommit
Daniele Varrazzo [Wed, 20 May 2020 07:04:13 +0000 (19:04 +1200)] 
Added connection autocommit

5 years agoAdded automatic transaction start
Daniele Varrazzo [Wed, 20 May 2020 05:22:56 +0000 (17:22 +1200)] 
Added automatic transaction start

5 years agoReduce loaders selection time a bit
Daniele Varrazzo [Mon, 18 May 2020 10:31:39 +0000 (22:31 +1200)] 
Reduce loaders selection time a bit

5 years agoFixed loaders bookkeeping
Daniele Varrazzo [Mon, 18 May 2020 10:01:19 +0000 (22:01 +1200)] 
Fixed loaders bookkeeping

5 years agoTweaking to fethcmany/all in Python code
Daniele Varrazzo [Mon, 18 May 2020 07:42:00 +0000 (19:42 +1200)] 
Tweaking to fethcmany/all in Python code

5 years agoCache the result of the query mangling
Daniele Varrazzo [Sat, 16 May 2020 14:39:39 +0000 (02:39 +1200)] 
Cache the result of the query mangling

Code refactored so that only the PostgresQuery object is exposed
and mangling doesn't use the variables as input so it can be cached.

5 years agoFixed linter errors found by new flake8 version
Daniele Varrazzo [Sat, 16 May 2020 14:26:25 +0000 (02:26 +1200)] 
Fixed linter errors found by new flake8 version

5 years agoFixed isBusy/getResult loop
Daniele Varrazzo [Sat, 16 May 2020 13:51:12 +0000 (01:51 +1200)] 
Fixed isBusy/getResult loop

Missing a continuation which would have likely lead to block.

5 years agoAdded generators implementation in cython
Daniele Varrazzo [Sat, 16 May 2020 13:50:31 +0000 (01:50 +1200)] 
Added generators implementation in cython

5 years agoGenerators types moved to proto module
Daniele Varrazzo [Fri, 15 May 2020 08:07:43 +0000 (20:07 +1200)] 
Generators types moved to proto module

5 years agoNo need to store a generic c encoder
Daniele Varrazzo [Thu, 14 May 2020 19:51:32 +0000 (07:51 +1200)] 
No need to store a generic c encoder

The only one we care about is utf-8, the only other available is ascii,
but in case of ascii we don't decode and return the bytes.

5 years agoUtf8 decoding optimized
Daniele Varrazzo [Thu, 14 May 2020 19:47:49 +0000 (07:47 +1200)] 
Utf8 decoding optimized

5 years agoIgnore profile files
Daniele Varrazzo [Thu, 14 May 2020 18:03:27 +0000 (06:03 +1200)] 
Ignore profile files

5 years agoAdded a few module headers
Daniele Varrazzo [Thu, 14 May 2020 18:02:46 +0000 (06:02 +1200)] 
Added a few module headers

5 years agoRowLoader moved from adapt to transform module
Daniele Varrazzo [Thu, 14 May 2020 17:57:02 +0000 (05:57 +1200)] 
RowLoader moved from adapt to transform module

It's only used by the Transformer and it doesn't need to be exposed.

5 years agoOptimized dumpers registration moved to own modules
Daniele Varrazzo [Thu, 14 May 2020 07:49:40 +0000 (19:49 +1200)] 
Optimized dumpers registration moved to own modules

Dropped some of the function signatures from the .pyd files as they are
not used cross-module.

5 years agoTest both the c and the python implementation on tox
Daniele Varrazzo [Mon, 11 May 2020 06:35:58 +0000 (18:35 +1200)] 
Test both the c and the python implementation on tox

5 years agoSkip hostaddr test with libpq < 12 too for the moment
Daniele Varrazzo [Mon, 11 May 2020 06:54:24 +0000 (18:54 +1200)] 
Skip hostaddr test with libpq < 12 too for the moment

5 years agomypy test on setup.py dropped
Daniele Varrazzo [Mon, 11 May 2020 06:23:48 +0000 (18:23 +1200)] 
mypy test on setup.py dropped

Types info for distutils are utterly broken.

5 years agoInclude cython in the sdist package
Daniele Varrazzo [Mon, 11 May 2020 05:34:22 +0000 (17:34 +1200)] 
Include cython in the sdist package

Also fixed everything else that should be needed to test the C
implementation on travis.

5 years agoDropped utils.typing in favour of proto package
Daniele Varrazzo [Mon, 11 May 2020 04:50:45 +0000 (16:50 +1200)] 
Dropped utils.typing in favour of proto package

5 years agoAdded protocol for different implementations of Transform
Daniele Varrazzo [Mon, 11 May 2020 04:33:29 +0000 (16:33 +1200)] 
Added protocol for different implementations of Transform

mypy passes all the ckecks.

5 years agoDropped unknown loader, using text/bytea ones
Daniele Varrazzo [Sun, 10 May 2020 16:23:55 +0000 (04:23 +1200)] 
Dropped unknown loader, using text/bytea ones

5 years agoAdded c bytea loaders
Daniele Varrazzo [Sun, 10 May 2020 15:44:41 +0000 (03:44 +1200)] 
Added c bytea loaders

5 years agoAdded proper binary integer decoding in cython
Daniele Varrazzo [Sun, 10 May 2020 10:30:36 +0000 (22:30 +1200)] 
Added proper binary integer decoding in cython

5 years agoAdded mapping from python Loader to C and context extraction
Daniele Varrazzo [Sun, 10 May 2020 09:05:54 +0000 (21:05 +1200)] 
Added mapping from python Loader to C and context extraction

5 years agoRowLoader definition shared into adapt
Daniele Varrazzo [Fri, 8 May 2020 12:43:39 +0000 (00:43 +1200)] 
RowLoader definition shared into adapt

5 years agoBaby steps registering c optimised adapters
Daniele Varrazzo [Mon, 4 May 2020 18:26:26 +0000 (06:26 +1200)] 
Baby steps registering c optimised adapters

Just registered some so far, not using the map yet

5 years agoKeep pq_cython as an extension separate from the rest
Daniele Varrazzo [Mon, 4 May 2020 16:44:45 +0000 (04:44 +1200)] 
Keep pq_cython as an extension separate from the rest

5 years agoMore consistent names for numeric adaptation functions
Daniele Varrazzo [Mon, 4 May 2020 16:09:26 +0000 (04:09 +1200)] 
More consistent names for numeric adaptation functions

5 years agoSkip flake check of the .eggs dir
Daniele Varrazzo [Thu, 23 Apr 2020 05:02:41 +0000 (17:02 +1200)] 
Skip flake check of the .eggs dir

5 years agoDon't import Python API function from the main cpython package
Daniele Varrazzo [Thu, 23 Apr 2020 04:29:35 +0000 (16:29 +1200)] 
Don't import Python API function from the main cpython package

Importing from there seems deprecated.

[skip ci]

5 years agoFixed import of optimized Transformer
Daniele Varrazzo [Thu, 23 Apr 2020 04:28:32 +0000 (16:28 +1200)] 
Fixed import of optimized Transformer

Import it if the C module is used, not just if it's available.

5 years agoAvoid creating an intermadiate tuple
Daniele Varrazzo [Wed, 22 Apr 2020 16:55:11 +0000 (04:55 +1200)] 
Avoid creating an intermadiate tuple

We are now around 18x the basic Python performance

[skip ci] Certain type conversion are stubbed out, so tests won't pass.

5 years agoAn ounce faster by using an array of loaders instead of a list
Daniele Varrazzo [Wed, 22 Apr 2020 16:36:37 +0000 (04:36 +1200)] 
An ounce faster by using an array of loaders instead of a list

5 years agoAdded some C decoders stubs
Daniele Varrazzo [Wed, 22 Apr 2020 15:50:22 +0000 (03:50 +1200)] 
Added some C decoders stubs

The speedup compared to the pure Python implementation is now 16x.

5 years agoPlaying around using a static definition for PQresult.
Daniele Varrazzo [Sun, 19 Apr 2020 10:02:42 +0000 (22:02 +1200)] 
Playing around using a static definition for PQresult.

5 years agoAdded basic cython implementation of the Transform object
Daniele Varrazzo [Sun, 19 Apr 2020 08:28:59 +0000 (20:28 +1200)] 
Added basic cython implementation of the Transform object

Just an about straight conversion from Python