Closed Bahus closed 2 weeks ago
Duplicate
How many people are using this with Postgres ?!
I could not find any indication that it can not be used with Postgres. Moreover - why not? It has a generic interface and can be easily extended. I use it like this:
class PostgresReconnectMixin(ReconnectMixin):
"""Mixin that allows to reconnect if connection in pool is stale."""
reconnect_errors = (
(peewee.InterfaceError, 'connection already closed'),
)
So it was a surprise when a minor peewee release broke our CI/CD for a while.
Moreover there is code example how to use it with postgres:
So I would consider this issue as a backward incompatible change.
The more relevant lines are in the docstring:
Given the warning, I think it falls under caveat emptor.
Hello! You have added
named_cursor
argument toexecute_sql
method in latest releasehttps://github.com/coleifer/peewee/compare/3.17.5...3.17.6#diff-05c9e68bc3e35107ad643797f22b363e574bc5c3f0a8b13377eeb17d92e07325R503
Unfortunately this change brakes
shortcuts.ReconnectMixin
since no such argument accepted inhttps://github.com/coleifer/peewee/blob/6d59dd6c438c2e86ad10e0203e1734e71dfd4e2e/playhouse/shortcuts.py#L253
Therefore the following error appears:
Is this the right time to add a Database interface (abstract class)?