toluaina / pgsync

Postgres to Elasticsearch/OpenSearch sync
https://pgsync.com
MIT License
1.11k stars 174 forks source link

Fix call to `sorted()` on dicts #381

Closed loren closed 1 year ago

loren commented 1 year ago

Running —analyze errors in python 3.11 when indices exist

File "/Users/lorensiebert/workspace/pgsync/pgsync/base.py", line 252, in indices
    self.__indices[(table, schema)] = sorted(
                                      ^^^^^^^
TypeError: '<' not supported between instances of 'dict' and 'dict'
toluaina commented 1 year ago

Running —analyze errors in python 3.11 when indices exist

File "/Users/lorensiebert/workspace/pgsync/pgsync/base.py", line 252, in indices
    self.__indices[(table, schema)] = sorted(
                                      ^^^^^^^
TypeError: '<' not supported between instances of 'dict' and 'dict'

Perfect thanks for spotting and fixing this.