]> git.ipfire.org Git - thirdparty/psycopg.git/log
thirdparty/psycopg.git
3 years agoRaise PoolClosed on wait() on a closed pool
Daniele Varrazzo [Wed, 5 Jan 2022 02:24:52 +0000 (03:24 +0100)] 
Raise PoolClosed on wait() on a closed pool

Previously it might have raised an assert, if, for instance, wait would
have failed and retried.

3 years agoRaise ValueError if the pool min_size is <= 0
Daniele Varrazzo [Mon, 3 Jan 2022 18:52:44 +0000 (19:52 +0100)] 
Raise ValueError if the pool min_size is <= 0

Before it would have created a broken pool, blocking forever on getconn.

3 years agoMove some common checks to the pool base class
Daniele Varrazzo [Mon, 3 Jan 2022 18:40:11 +0000 (19:40 +0100)] 
Move some common checks to the pool base class

3 years agoUse caplog.set_level instead of manual filtering in tests
Daniele Varrazzo [Wed, 5 Jan 2022 19:23:25 +0000 (20:23 +0100)] 
Use caplog.set_level instead of manual filtering in tests

3 years agoSkip tests using the deaf_port fixture on macOS and Windows
Daniele Varrazzo [Wed, 5 Jan 2022 20:52:55 +0000 (21:52 +0100)] 
Skip tests using the deaf_port fixture on macOS and Windows

They fail some 50% of the time, looks like the port is not really
listening, the fact that the function is called listen() is just a
practical joke.

https://github.com/psycopg/psycopg/runs/4719288041?check_suite_focus=true

3 years agoAdd deaf_port fixture and base timeout tests on it
Daniele Varrazzo [Wed, 5 Jan 2022 00:53:07 +0000 (01:53 +0100)] 
Add deaf_port fixture and base timeout tests on it

3 years agoMerge branch 'pool-open'
Daniele Varrazzo [Mon, 3 Jan 2022 18:47:38 +0000 (19:47 +0100)] 
Merge branch 'pool-open'

3 years agoUse the present tense in PoolClosed error messages 196/head
Daniele Varrazzo [Mon, 3 Jan 2022 15:59:29 +0000 (16:59 +0100)] 
Use the present tense in PoolClosed error messages

Thank you John Aldis! https://twitter.com/johnaldis/status/1478016200634425348

3 years agoReport if the pool was closed, or never opened, in getconn() error message
Daniele Varrazzo [Mon, 3 Jan 2022 14:37:54 +0000 (15:37 +0100)] 
Report if the pool was closed, or never opened, in getconn() error message

3 years agoAdd API docs for pool open method/param.
Daniele Varrazzo [Mon, 3 Jan 2022 14:10:54 +0000 (15:10 +0100)] 
Add API docs for pool open method/param.

3 years agoAsyncConnectionPool.open() made async.
Daniele Varrazzo [Mon, 3 Jan 2022 15:03:48 +0000 (16:03 +0100)] 
AsyncConnectionPool.open() made async.

This makes it symmetrical with close(). However it doesn't really do any
async work as it's awkward to call it from init. Something we might do,
if that will be needed, could be to start the scheduler only and use it
to schedule immediately a call to an async _open().

In the future, an anyio-based pool might instead disallow open=True on
init.

See https://github.com/psycopg/psycopg/pull/151 for some discussion
about the topic.

3 years agoAdd open param to pool init
Daniele Varrazzo [Mon, 3 Jan 2022 12:09:38 +0000 (13:09 +0100)] 
Add open param to pool init

3 years agoDisallow pool re-opening
Denis Laxalde [Tue, 16 Nov 2021 09:55:26 +0000 (10:55 +0100)] 
Disallow pool re-opening

There seems to be no use case for re-opening a closed pool, so disable
this now (until we find a real use-case).

3 years agoFactor out a _stop_workers() method on connection pool classes
Denis Laxalde [Mon, 15 Nov 2021 08:43:04 +0000 (09:43 +0100)] 
Factor out a _stop_workers() method on connection pool classes

The method is symmetrical with open().
In particular, we take advantage of this method in
ConnectionPool.__del__() to remove some duplication.

3 years agoReset workers state in *ConnectionPool.close()
Denis Laxalde [Mon, 15 Nov 2021 08:28:36 +0000 (09:28 +0100)] 
Reset workers state in *ConnectionPool.close()

This way, the pools may be re-opened after a close, even if we'll
disallow this later on.

3 years agoAdd an open() method to connection pool classes
Denis Laxalde [Mon, 15 Nov 2021 08:13:04 +0000 (09:13 +0100)] 
Add an open() method to connection pool classes

This method is responsible for setting the '_closed' attribute, which
hence now defaults to True in the base class, along with the
_sched_runner attribute, which is reset to None in close().

3 years agoRemove occurrences of "thread" term in pool_async
Denis Laxalde [Thu, 11 Nov 2021 17:41:27 +0000 (18:41 +0100)] 
Remove occurrences of "thread" term in pool_async

There is no threading involved here, only async tasks. Adjust comments
and docstrings to avoid confusion.

3 years agoSeparate pool packages building into a different workflow
Daniele Varrazzo [Mon, 3 Jan 2022 15:37:37 +0000 (16:37 +0100)] 
Separate pool packages building into a different workflow

Psycopg and pool releases are separate.

3 years agoBump pool minor version to start adding features
Daniele Varrazzo [Mon, 3 Jan 2022 12:35:04 +0000 (13:35 +0100)] 
Bump pool minor version to start adding features

3 years agoHopefully more robust test to identify a closed connection
Daniele Varrazzo [Sun, 2 Jan 2022 21:19:15 +0000 (22:19 +0100)] 
Hopefully more robust test to identify a closed connection

3 years agoMerge branch 'executemany-returning'
Daniele Varrazzo [Sun, 2 Jan 2022 21:15:24 +0000 (22:15 +0100)] 
Merge branch 'executemany-returning'

3 years agoAdd returning parameter on executemany() 181/head
Daniele Varrazzo [Sun, 2 Jan 2022 19:37:14 +0000 (20:37 +0100)] 
Add returning parameter on executemany()

3 years agoKeep results from all queries run through executemany()
Denis Laxalde [Wed, 15 Dec 2021 12:57:31 +0000 (13:57 +0100)] 
Keep results from all queries run through executemany()

Instead of overwriting cursor's results at each execution in
executemany() we now accumulate the results of all queries on cursor
state by turning _set_results() into _extend_results(). This way, each
result remains accessible and one can use nextset() to move from one
result to another.

3 years agoDrop unneeded method signatures in docs
Daniele Varrazzo [Sun, 2 Jan 2022 20:02:26 +0000 (21:02 +0100)] 
Drop unneeded method signatures in docs

3 years agoRename a couple of internal cursor methods for clarity
Daniele Varrazzo [Sun, 2 Jan 2022 18:47:37 +0000 (19:47 +0100)] 
Rename a couple of internal cursor methods for clarity

3 years agoRefactor cur._raise_from_results() into _raise_for_result()
Daniele Varrazzo [Sun, 2 Jan 2022 18:46:32 +0000 (19:46 +0100)] 
Refactor cur._raise_from_results() into _raise_for_result()

The case of raising with different statuses doesn't practically happen.

3 years agoDrop Cursor._set_results()
Daniele Varrazzo [Sun, 2 Jan 2022 18:22:34 +0000 (19:22 +0100)] 
Drop Cursor._set_results()

Split it into a _check_results() and leave the caller manage the cursor state.

3 years agoShorten traceback on executemany
Daniele Varrazzo [Sun, 2 Jan 2022 19:06:45 +0000 (20:06 +0100)] 
Shorten traceback on executemany

3 years agoFix typo in comment
Daniele Varrazzo [Sun, 2 Jan 2022 18:59:02 +0000 (19:59 +0100)] 
Fix typo in comment

3 years agoFix test suite to run on database in locales different from English
Daniele Varrazzo [Sun, 2 Jan 2022 17:58:17 +0000 (18:58 +0100)] 
Fix test suite to run on database in locales different from English

3 years agoNote in news file that 3.0.8 is still unreleased
Daniele Varrazzo [Sun, 2 Jan 2022 17:03:08 +0000 (18:03 +0100)] 
Note in news file that 3.0.8 is still unreleased

3 years agoFix spurious warning about variable referenced before assignment
Daniele Varrazzo [Sun, 2 Jan 2022 16:54:36 +0000 (17:54 +0100)] 
Fix spurious warning about variable referenced before assignment

3 years agoAdd flake8 configuration in other package dirs
Daniele Varrazzo [Sun, 2 Jan 2022 15:57:47 +0000 (16:57 +0100)] 
Add flake8 configuration in other package dirs

Vim ALE is confused otherwise. I don't really get how is that it picks
the package directory as the starting one (maybe it finds the setup.py)?

3 years agoChange type of `wait` in `pool_async.py` 195/head
Nikita Sobolev [Sun, 2 Jan 2022 11:51:11 +0000 (14:51 +0300)] 
Change type of `wait` in `pool_async.py`

Will become an incompatible type in assignment with the release of
https://github.com/python/typeshed/pull/6783

3 years agoFix py_codecs data type
Daniele Varrazzo [Sun, 2 Jan 2022 15:37:09 +0000 (16:37 +0100)] 
Fix py_codecs data type

It doesn't contain str anymore since 3.0.4.

A stricter definition revealed a couple of wrong usages of the mapping.
Use more consistently the higher level `conninfo_encoding()` function
instead of directly the mapping.

3 years agoUse conninfo encoding to encode errors on connection
Daniele Varrazzo [Sun, 2 Jan 2022 14:37:54 +0000 (15:37 +0100)] 
Use conninfo encoding to encode errors on connection

PostgreSQL returns connection errors in the encoding specified in
lc_messages (e.g. EUC-JP for a server with `lc_messages=ja_JP.EUC-JP`).
However, because we don't have a connection, the message was decoded in
the fallback utf-8.

If the client has specified a client_encoding, use it to decode the
error message. Be more lenient than usual to look up the encoding
(because it is not normalised by the server and we don't care about
performance as this only happens on error handling). As for any other
error messages, still use an error=replace policy to avoid exploding
reporting an error in the wrong encoding.

Close #194.

3 years agoFix typo: a raw data -> raw data
Daniele Varrazzo [Wed, 29 Dec 2021 21:42:58 +0000 (22:42 +0100)] 
Fix typo: a raw data -> raw data

3 years agoFix doc link to transactions management
Daniele Varrazzo [Wed, 29 Dec 2021 21:32:41 +0000 (22:32 +0100)] 
Fix doc link to transactions management

Also, "transactions", not "transaction".

3 years agoAdd note about installing libpq via psql
Daniele Varrazzo [Fri, 24 Dec 2021 07:59:31 +0000 (08:59 +0100)] 
Add note about installing libpq via psql

3 years agoMerge branch 'dependencies-bounds'
Daniele Varrazzo [Thu, 23 Dec 2021 17:26:29 +0000 (18:26 +0100)] 
Merge branch 'dependencies-bounds'

3 years agoAdd constraint file to test dependencies minimum version
Daniele Varrazzo [Thu, 23 Dec 2021 15:34:49 +0000 (16:34 +0100)] 
Add constraint file to test dependencies minimum version

3 years agoSpecify test/dev dependencies only at minor level
Daniele Varrazzo [Thu, 23 Dec 2021 15:33:42 +0000 (16:33 +0100)] 
Specify test/dev dependencies only at minor level

Where possible. pytest 6.2.5 is required by Python 3.10.

3 years agoSpecify lower bound for required backport packages
Daniele Varrazzo [Thu, 23 Dec 2021 15:32:41 +0000 (16:32 +0100)] 
Specify lower bound for required backport packages

3 years agoRemove upper bound from dependencies
Daniele Varrazzo [Thu, 23 Dec 2021 01:54:05 +0000 (02:54 +0100)] 
Remove upper bound from dependencies

Giving upper bounds to libraries creates problems if there are
transitive dependencies.

Our dependencies are only on dev/test time, but I'd rather get the
habit.

3 years agoSchedule a daily test run and a weekly package run
Daniele Varrazzo [Thu, 23 Dec 2021 01:36:43 +0000 (02:36 +0100)] 
Schedule a daily test run and a weekly package run

This should help detecting breakages due to new depending packages. In
the future we may extend the tests to run on Python/Postgres master
branch too.

The intention is to remove the top bound from dependency packages,
because the practice is widely documented to be problematic. Thankfully
we have only dev/test dependencies, but I'd rather get the habit for
good.

This commit will be merged on master as it is because otherwise Github
won't pick the change.

3 years agoFix typos and grammar in documentation.
Walter Doerwald [Wed, 22 Dec 2021 20:39:34 +0000 (21:39 +0100)] 
Fix typos and grammar in documentation.

3 years agoAvoid mypy version 0.930
Daniele Varrazzo [Wed, 22 Dec 2021 19:46:51 +0000 (20:46 +0100)] 
Avoid mypy version 0.930

The release is affected by the issues:

- https://github.com/python/mypy/issues/11820
- https://github.com/python/typeshed/issues/6661

already acknowledged as bugs.

3 years agoUse mypy 0.920
Denis Laxalde [Tue, 21 Dec 2021 08:24:34 +0000 (09:24 +0100)] 
Use mypy 0.920

One 'type: ignore' is no longer needed, it seems.

3 years agoReuse fixture across test module
Daniele Varrazzo [Wed, 15 Dec 2021 00:24:28 +0000 (01:24 +0100)] 
Reuse fixture across test module

The fixture is duplicated. Funnily enough, the dupe in async is less
efficient than the one in the sync test module, but it allowed to spot
the bug at the previous commit, after using it more than the prepared
threshold.

Ungratefully dropping it.

3 years agoFix prepared statements clearing
Daniele Varrazzo [Tue, 14 Dec 2021 23:57:11 +0000 (00:57 +0100)] 
Fix prepared statements clearing

In the conditions illustrated by the test, i.e. with some statements
already prepared and a multiple statements query containing a DROP, the
check for multiple statements wouldn't have been triggered, and the
query would have eventually been asked for preparation, failing because
containing multiple statements.

3 years agoBump version to release 3.0.7
Daniele Varrazzo [Tue, 14 Dec 2021 21:59:28 +0000 (22:59 +0100)] 
Bump version to release 3.0.7

3 years agoFix Cursor.rowcount after an executemany hitting no result
Daniele Varrazzo [Tue, 14 Dec 2021 21:45:22 +0000 (22:45 +0100)] 
Fix Cursor.rowcount after an executemany hitting no result

Close #178

3 years agoFix executemany crash with empty input sequence
Daniele Varrazzo [Tue, 14 Dec 2021 21:42:18 +0000 (22:42 +0100)] 
Fix executemany crash with empty input sequence

Close #179.

3 years agoReduce the work done on the cursor by executemany
Daniele Varrazzo [Mon, 29 Nov 2021 01:13:23 +0000 (02:13 +0100)] 
Reduce the work done on the cursor by executemany

Certain functions were executed once per query (e.g. _make_row_maker(),
_tx.set_pgresult()) but we can run them only once.

3 years agoFinalise version 3.0.6 for release
Daniele Varrazzo [Mon, 13 Dec 2021 12:34:20 +0000 (13:34 +0100)] 
Finalise version 3.0.6 for release

3 years agoDon't run Mypy tests on Windows/macOS
Daniele Varrazzo [Thu, 9 Dec 2021 19:17:05 +0000 (20:17 +0100)] 
Don't run Mypy tests on Windows/macOS

These tests are kinda slow and these platforms are the slowest to run.
Testing Mypy on Linux covers other platforms too.

A sample GitHub tests run (with no other concurrent job) went down from
22m to 18m.

3 years agoMerge branch 'fix-177'
Daniele Varrazzo [Thu, 9 Dec 2021 16:14:58 +0000 (17:14 +0100)] 
Merge branch 'fix-177'

Detect out-of-order transactions exit when they have the same name too.

3 years agoDetect out-of-order transactions exit when they have the same name too
Daniele Varrazzo [Thu, 9 Dec 2021 14:24:57 +0000 (15:24 +0100)] 
Detect out-of-order transactions exit when they have the same name too

Close #177

3 years agoDon't try to execute transaction finalization with the connection closed
Daniele Varrazzo [Thu, 9 Dec 2021 13:56:53 +0000 (14:56 +0100)] 
Don't try to execute transaction finalization with the connection closed

3 years agoRefactor Transaction queries generation into internal methods
Daniele Varrazzo [Thu, 9 Dec 2021 13:55:28 +0000 (14:55 +0100)] 
Refactor Transaction queries generation into internal methods

3 years agoRefactor Transaction adding an internal push method
Daniele Varrazzo [Thu, 9 Dec 2021 13:30:33 +0000 (14:30 +0100)] 
Refactor Transaction adding an internal push method

Nice and symmetric w.r.t. the pop method recently introduced.

3 years agoAdd tests to verify out-of-order detections without threads
Daniele Varrazzo [Thu, 9 Dec 2021 13:27:33 +0000 (14:27 +0100)] 
Add tests to verify out-of-order detections without threads

3 years agoMerge branch 'transaction-concurrency'
Daniele Varrazzo [Thu, 9 Dec 2021 00:03:26 +0000 (01:03 +0100)] 
Merge branch 'transaction-concurrency'

3 years agoRaise ProgrammingError on out-of-order exit from transactions
Daniele Varrazzo [Wed, 8 Dec 2021 23:28:44 +0000 (00:28 +0100)] 
Raise ProgrammingError on out-of-order exit from transactions

Previously it would have failed an assert.

Further back in time, the condition was checked and reported as
ProgrammingError already. The check was dropped when
`conn.transaction()` started to return an entered transaction, so the
possibility of calling enter/exit manually was taken out of the public
API. However, we didn't consider the possibility of concurrent
threads operating on transaction independently.

Also fix the Transaction representation, which wouldn't have reported
`(terminated)` exiting on rollback, but only on commit.

Close #176.

3 years agoMake the test to detect out-of-order transaction exiting reliable
Daniele Varrazzo [Wed, 8 Dec 2021 19:54:34 +0000 (20:54 +0100)] 
Make the test to detect out-of-order transaction exiting reliable

3 years agoTest transactions with concurrence [skip ci]
Denis Laxalde [Wed, 8 Dec 2021 15:53:05 +0000 (16:53 +0100)] 
Test transactions with concurrence [skip ci]

3 years agoFix docs typo
Daniele Varrazzo [Wed, 8 Dec 2021 14:39:07 +0000 (15:39 +0100)] 
Fix docs typo

3 years agoImprove Dumper, Loader documentation
Daniele Varrazzo [Wed, 8 Dec 2021 14:28:13 +0000 (15:28 +0100)] 
Improve Dumper, Loader documentation

3 years agoReword the types package description with more links to relevant docs
Daniele Varrazzo [Wed, 8 Dec 2021 12:46:26 +0000 (13:46 +0100)] 
Reword the types package description with more links to relevant docs

3 years agoFix duplicate docs for Cursor.description
Daniele Varrazzo [Wed, 8 Dec 2021 03:39:09 +0000 (04:39 +0100)] 
Fix duplicate docs for Cursor.description

3 years agoAdd ConnStatus.CHECK_STANDBY enum value
Daniele Varrazzo [Wed, 8 Dec 2021 03:11:41 +0000 (04:11 +0100)] 
Add ConnStatus.CHECK_STANDBY enum value

Added in PostgreSQL 14, only visible during connection, if at all.

3 years agoReword PyFormat docs
Daniele Varrazzo [Wed, 8 Dec 2021 03:22:12 +0000 (04:22 +0100)] 
Reword PyFormat docs

3 years agoFix a couple of typos in pool docs
Daniele Varrazzo [Wed, 8 Dec 2021 02:51:48 +0000 (03:51 +0100)] 
Fix a couple of typos in pool docs

3 years agoMerge pull request #167 from dlax/trace
Daniele Varrazzo [Tue, 7 Dec 2021 22:01:15 +0000 (23:01 +0100)] 
Merge pull request #167 from dlax/trace

Add bindings for PQ tracing functions

3 years agoMention addition of trace function in news file 167/head
Daniele Varrazzo [Tue, 7 Dec 2021 20:53:06 +0000 (21:53 +0100)] 
Mention addition of trace function in news file

3 years agoReport that trace is *currently* only supported on linux in errors
Daniele Varrazzo [Tue, 7 Dec 2021 21:02:59 +0000 (22:02 +0100)] 
Report that trace is *currently* only supported on linux in errors

We will add support for other platforms, if others care.

3 years agoAdd a --pq-tracefile pytest option
Denis Laxalde [Mon, 6 Dec 2021 07:44:02 +0000 (08:44 +0100)] 
Add a --pq-tracefile pytest option

When specified, we'd enable tracing of the client/server communication
to a file. The file is opened for the whole test session and we set a
title section before each test run.

3 years agoAdd bindings for PQ tracing functions
Denis Laxalde [Fri, 3 Dec 2021 07:05:16 +0000 (08:05 +0100)] 
Add bindings for PQ tracing functions

Since we cannot pass a file descriptor as a FILE value, as expected by
PQtrace(), PGconn.trace() method accepts a 'fileno: int' value. This is
then used to build an stdio's FILE value through fdopen(). The latter
also needs a binding in ctypes. This only works on Linux platform.

In _pq_ctypes.pyi, fdopen() and PQtrace() are not autogenerated because
of the needed '# type: ignore' (similar to existing ones).

PQsetTraceFlags() is new from libpq 14, so we declare it conditionally.

3 years agoFlag the bugfix version unreleased in the docs news
Daniele Varrazzo [Tue, 7 Dec 2021 21:30:12 +0000 (22:30 +0100)] 
Flag the bugfix version unreleased in the docs news

3 years agoDon't raise an exception using cur.description with closed connection
Daniele Varrazzo [Tue, 7 Dec 2021 20:31:07 +0000 (21:31 +0100)] 
Don't raise an exception using cur.description with closed connection

Close #172.

3 years agoRaise OperationalError on Connection.cursor() if closed
Daniele Varrazzo [Tue, 7 Dec 2021 20:01:13 +0000 (21:01 +0100)] 
Raise OperationalError on Connection.cursor() if closed

3 years agoDrop unneeded sort() in test
Daniele Varrazzo [Tue, 7 Dec 2021 19:49:15 +0000 (20:49 +0100)] 
Drop unneeded sort() in test

3 years agoFix whitespace excess
Daniele Varrazzo [Tue, 7 Dec 2021 19:40:51 +0000 (20:40 +0100)] 
Fix whitespace excess

Reported as error by new black version.

3 years agoDon't raise exceptions on ServerError.close() if the connection is closed
Daniele Varrazzo [Tue, 7 Dec 2021 19:31:00 +0000 (20:31 +0100)] 
Don't raise exceptions on ServerError.close() if the connection is closed

Close #173.

3 years agoDrop a few unused imports in pgconn.pyx
Denis Laxalde [Fri, 3 Dec 2021 11:15:45 +0000 (12:15 +0100)] 
Drop a few unused imports in pgconn.pyx

3 years agoAdd _PQencryptPasswordConn() in _pq_ctypes.pyi
Denis Laxalde [Fri, 3 Dec 2021 08:23:25 +0000 (09:23 +0100)] 
Add _PQencryptPasswordConn() in _pq_ctypes.pyi

Running the generation script produces this diff.

3 years agotest: run tests against PostgreSQL 14 on macOS
Daniele Varrazzo [Fri, 3 Dec 2021 09:23:33 +0000 (10:23 +0100)] 
test: run tests against PostgreSQL 14 on macOS

brew gives an error installing v. 13.

3 years agoMerge branch 'preparing-refactor'
Daniele Varrazzo [Mon, 29 Nov 2021 11:01:51 +0000 (12:01 +0100)] 
Merge branch 'preparing-refactor'

3 years agoRemove prepared statement maintenance command out of the normal loop
Daniele Varrazzo [Wed, 17 Nov 2021 14:26:43 +0000 (15:26 +0100)] 
Remove prepared statement maintenance command out of the normal loop

Accumulate the maintenance commands in the state of the prepared
processor manager and decide when to process them.

3 years agoSplit the internal state of prepared statements into names and counts
Daniele Varrazzo [Wed, 17 Nov 2021 13:15:20 +0000 (14:15 +0100)] 
Split the internal state of prepared statements into names and counts

3 years agoRefactor away internal prepared statements manager function
Daniele Varrazzo [Wed, 17 Nov 2021 13:27:35 +0000 (14:27 +0100)] 
Refactor away internal prepared statements manager function

3 years agoDrop PrepareManger.maintain()
Daniele Varrazzo [Tue, 16 Nov 2021 14:19:40 +0000 (15:19 +0100)] 
Drop PrepareManger.maintain()

3 years agoreimplement PrepareManager.maintain() calling other public methods
Daniele Varrazzo [Tue, 16 Nov 2021 14:13:49 +0000 (15:13 +0100)] 
reimplement PrepareManager.maintain() calling other public methods

This makes clearer that, in pipeline mode, we call them in two different
moments, whereas in non-pipeline we call them in a single place.

3 years agoRename prepare manager methods
Daniele Varrazzo [Tue, 16 Nov 2021 13:58:08 +0000 (14:58 +0100)] 
Rename prepare manager methods

Underscore the methods that are only called internally.

Change some of the public names. However this is just temporary, to
reason about who calls what.

3 years agoUse the clear() method in PrepareManager.maintain()
Daniele Varrazzo [Tue, 16 Nov 2021 13:16:57 +0000 (14:16 +0100)] 
Use the clear() method in PrepareManager.maintain()

3 years agoAdd handle() and validate() methods to PrepareManager
Denis Laxalde [Mon, 18 Oct 2021 09:42:11 +0000 (11:42 +0200)] 
Add handle() and validate() methods to PrepareManager

These essentially perform the same steps as maintain() but with only
query information first, and then once results become available.

3 years agoAdd a rotate() method to PrepareManager
Denis Laxalde [Mon, 18 Oct 2021 09:31:33 +0000 (11:31 +0200)] 
Add a rotate() method to PrepareManager

3 years agoAdd a check_results() method to PrepareManager
Denis Laxalde [Mon, 18 Oct 2021 09:31:33 +0000 (11:31 +0200)] 
Add a check_results() method to PrepareManager

3 years agoAdd a setdefault() method to PrepareManager
Denis Laxalde [Mon, 18 Oct 2021 09:28:03 +0000 (11:28 +0200)] 
Add a setdefault() method to PrepareManager

3 years agoAdd a should_discard() method to PrepareManager
Denis Laxalde [Mon, 18 Oct 2021 09:18:12 +0000 (11:18 +0200)] 
Add a should_discard() method to PrepareManager