Debian Codegraph @

debian/patches/add-psycopg3-support.patch

raw
1 From: David Burke <[email protected]>
2 Date: Thu, 23 Mar 2023 15:47:53 -0400
3 Subject: [PATCH 1/5] Add psycopg3 support
4
5 --- a/bitfield/types.py
6 +++ b/bitfield/types.py
7 @@ -260,5 +260,6 @@ def get_label(self, flag):
8 from django.db.backends.postgresql.base import Database
9 Database.extensions.register_adapter(Bit, lambda x: Database.extensions.AsIs(int(x)))
10 Database.extensions.register_adapter(BitHandler, lambda x: Database.extensions.AsIs(int(x)))
11 -except ImproperlyConfigured:
12 +# Ignore in psycopg3 where there is no Database.extensions nor any need to adapt types
13 +except (ImproperlyConfigured, AttributeError):
14 pass
15