public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniele Varrazzo <[email protected]>
To: Psycopg <[email protected]>
Subject: psycopg-pool 3.1 released
Date: Mon, 7 Feb 2022 13:11:59 +0100
Message-ID: <CA+mi_8Yj8quHbKKfRGXyMqGCaq1pWNGK3MENnzXrEEieUArdjw@mail.gmail.com> (raw)

Hello,

we have released the version 3.1 of the psycopg-pool package. The main
new feature is the introduction of the NullConnectionPool: a pool
subclass exposing the same interface of the superclass but actually
not storing connections in its state. This is useful to make the
pool/no-pool decision a configuration choice, rather than a code
choice, and allows to write applications that may or may not use the
pool (e.g. because in certain setups they can be deployed behind
PgBouncer).

More details about the feature are available in the documentation at:
https://www.psycopg.org/psycopg3/docs/advanced/pool.html#null-connection-pools

Another addition is the 'open()' method and the related 'open'
parameter in the constructor, which now allow to instantiate a closed
pool and to open it later, when more convenient. This is especially
useful in order to perform blocking async code at open time, which is
not a problem at the moment (the constructor only starts background
tasks, it doesn't perform blocking operations itself) but it might
become in future evolutions or integrations. Thank you very much to
Denis Laxade for the conversation, design, implementation of the
feature and for helping to prepare the code for async frameworks other
than asyncio (Anyio, Trio...)

Please note that the pool package is released separately, and with
independent version numbering, from the main psycopg 3 package (to
phrase in nicely, "psycopg is a mechanism, the pool is a policy"): the
pool 3.1 is compatible with the currently released psycopg 3.0.x
package and should be maintained compatible with the versions to come.

Thank you very much

-- Daniele





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: psycopg-pool 3.1 released
  In-Reply-To: <CA+mi_8Yj8quHbKKfRGXyMqGCaq1pWNGK3MENnzXrEEieUArdjw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox