diff --git a/CHANGELOG.md b/CHANGELOG.md index 2af0b596ecdf09233d7913aa42f52dc9bd25e533..972a8fe1c52c74e3f643a6f39fd76a87d1613413 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ -# v2.20.4 +# v2.21.1 * removed the decorator syntax for transaction, it''s confusing and contrary to Zen of Python -* fixed some random bug-4444444- \ No newline at end of file +* fixed some random bug +* fixed docs for CPManager diff --git a/satella/coding/resources/cp_manager.py b/satella/coding/resources/cp_manager.py index 24b75e249139605d13ca486e9d0ba1ccddc39601..6dd0daca564f9712ce79905f2516e37e851aaa47 100644 --- a/satella/coding/resources/cp_manager.py +++ b/satella/coding/resources/cp_manager.py @@ -26,6 +26,12 @@ class CPManager(Monitor, Closeable, tp.Generic[T], metaclass=abc.ABCMeta): Note that you have to overload :meth:`~satella.coding.resources.CPManager.teardown_connection` and :meth:`~satella.coding.resources.CPManager.create_connection`. + You obtain a connection by using :meth:`~satella.coding.resources.CPManager.acquire_connection`. + If it fails you should mark it as such using + :meth:`~satella.coding.resources.CPManager.fail_connection`. + In all cases you have to return it using + :meth:`~satella.coding.resources.CPManager.release_connection`. + :param max_number: maximum number of connections :param max_cycle_no: maximum number of get/put connection cycles.