dvarrazzo/psycopg — comment on commit d2b67364fd2b0b192342281d24a7e3d0a4909980
File: lib/__init__.py line 145
By dvarrazzo:

Yeah, I see. Unfortunately the original function didn't really do a good job at testing arguments. For instance if dsn and keywords are both used, the library just ignores the keywords, and now is probably too late to either raise an exception or to merge the arguments... The correct check to reproduce the previous semantics seems `if port is not None and int(port) > 0`.