psycopg-pool 3.1 released
От | Daniele Varrazzo |
---|---|
Тема | psycopg-pool 3.1 released |
Дата | |
Msg-id | CA+mi_8Yj8quHbKKfRGXyMqGCaq1pWNGK3MENnzXrEEieUArdjw@mail.gmail.com обсуждение исходный текст |
Список | psycopg |
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
В списке psycopg по дате отправления: