Attention is currently required from: daniel, dexter, laforge.
fixeria has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41508?usp=email )
Change subject: card_key_provider: add PostgreSQL support ......................................................................
Patch Set 5:
(3 comments)
File contrib/csv-to-pgsql.py:
https://gerrit.osmocom.org/c/pysim/+/41508/comment/2a3b526c_05475850?usp=ema... : PS5, Line 38: table_name Maybe do the `self.table = lower(table_name)` here to avoid doing this in each query?
https://gerrit.osmocom.org/c/pysim/+/41508/comment/f78ee9bd_3c7e041e?usp=ema... : PS5, Line 132: %s;", (self.table.lower(),)) Why not using `SQL("...").format(...)` here like you do above?
File setup.py:
https://gerrit.osmocom.org/c/pysim/+/41508/comment/3e9c6337_a820596a?usp=ema... : PS4, Line 37: psycopg2-binary
What if we leave it out and mention it in the manual that it is needed
when someone wants to use the CardKeyProviderPgsql? Would that be an option?
This is indeed an option. Also, we do have `extras_require` below - this is where you can specify optional dependencies. You would also need to take care of importing the `psycopg2` not globally, but in a specific place (e.g. during the class instance instantiation).