Please sign in to comment.
Don't import of psycopg2.tz into the C extension
This makes possible to import _psycopg directly, after adding the package directory to the pythonpath. This enables hacks such as: sys.path.insert(0, '/path/to/psycopg2') import _psycopg sys.modules['psycopg2._psycopg'] = _psycopg sys.path.pop(0) which can work around e.g. the problem of psycopg#201, freeze that cannot freeze psycopg2. Well, freeze cannot freeze it because it's just not designed to deal with C extensions. At least now the frozen application can hack the pythonpath and work around the limitation by importing _psycopg as above and then doing the rest of the import normally. Keeping long-lived references to python objects is bad anyway: the tz module couldn't be reloaded before.
- Loading branch information...
Showing with 28 additions and 33 deletions.