- Fix for newer dependencies.
- Switch to the
whenever
package for date/time types, instead of Arrow. See https://dev.arie.bovenberg.net/blog/python-datetime-pitfalls/ for more information as to why. pg-purepy
now passes Pyright strict mode.- :class:`.Converter` is now a generic type.
- Switch to the
structlog
package for logging.
Make :meth:`.AsyncPostgresConnection.fetch_one` raise an error in the event of an empty row, instead of returning an optional.
This results in a more ergonomic API (as you don't need to check for None constantly) with the side effect of requiring potentially more error handling. This is the same approach used in the sqlx library, for one example.
- Add support for the JSON and JSONB types to the default converters.
- Fix type hints and add a
py.typed
marker. - Fix a mishap with
ExceptionGroup
in the pool handler.
- Bump dependency versions.
- Make the connection pool open all connections sequentially. This makes error reporting better, as errors such as invalid passwords are raised immediately, and without turning into an exception group.
- Make rollbacks reliable during cancellation.
- Add cancellation support to the connection pool.
- Add
TRACE
log level, used for protocol messages.
- Add
hstore
support.
- Add :meth:`.DataRow.to_dict` to turn a data row into a dictionary of values.
- Less log spam.
- Add :attr:`.AsyncPostgresConnection.dead` for if a connection error occurs or the underlying state machine becomes corrupted.
- Implement :ref:`highlevel`.
- Add a
max_row
parameter to the mid-level query APIs. This allows specifying a maximum number of rows for a query at the protocol level, at the cost of always using the extended query syntax. - Rework converters.
- Add date/time converters.
- Add converters for :class:`enum.Enum` instances.
- Add array conversion support.
- :class:`.DataRow` now supports
__getitem__
syntax. - Add an API that allows getting type OIDs from type names on the high-level API.
- Export :attr:`.SansIOClient.timezone` and :attr:`.AsyncPostgresConnection.server_timezone`.
- Protect certain server parameters from being set. The datetime converters need these to function properly.
- Initial release.