sqlbag
sqlbag copied to clipboard
SSL connect_args breaks with `S`
This line breaks: https://github.com/djrobstep/sqlbag/blob/master/sqlbag/sqla.py#L160
Because connect_args is a dict
Yes this needs fixing.
There are a couple of workarounds:
1 is to pass parameters via a connection url instead
2 is to pass in a hashable dict, this implementation for instance will suffice:
class hashabledict(dict):
def __hash__(self):
return hash(tuple(sorted(self.items())))
This is definitely a workaround so make sure you're aware of the consequences of overriding __hash__ (as long as you don't change the dictionary after creation, things should probably be fine tho).