Re: psycopg2 and Python 2.6a1
"James Henstridge" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On 04/03/2008, Patrick Hartling <[email protected]> wrote: > I am evaluating the use of Python 2.6 as the foundation for our > software, and I am running into a crash with psycopg2 on Windows. For > some reason, I have been unable to get Visual Studio to show me any > debugging details in the stack trace for the code in _psycopg2.pyd, > and I was hoping that someone here might have some tips. > > In my efforts to track this down, I have tried several things. At the > moment, I am running a release build of the Python interpreter that I > built myself so that I could get the vc90.pdb file for the > interpreter. I have no problems tracing through code in the Pyhton > interpreter, but I have not been able to get _psycopg2.pyd to build in > such a way that the debugger can extract any information from it. I > have built psycopg2 source from the 2_0_x SVN branch as a release > binary with modifications to C:\Python26\Lib\distutils > \msvc9compiler.py so that /Z7 and /Od are used when building extension > modules linked against the MSVC release runtime. This is what I would > prefer to do since, IIUC, the debugging symbols are built into the > binary. Normally, this approach works for me without problems, though > this is the first time that I have tried to debug a Python extension > module on Windows that I did not write myself. I also tried building > psycopg2 using /Zi and /Od to make a specific PDB file for > _psycopg2.pyd, but the debugger never finds it no matter where I put it. > > In case it helps, I have attached the stack trace that I do get. Any > guidance would be greatly appreciated. Thank you for testing out the 2_0_x branch. I can't really help you with debugging on Windows. I do notice that the backtrace you attached includes frames from PyQt as well. It'd be helpful to try and isolate the problem to see if it occurs with just Python 2.6 and psycopg. The easiest way to do so might be to run the test suite. Try the following: 1. create a postgres database and set the PSYCOPG2_TESTDB environment variable to its name. 2. build the extension with "python2.6 setup.py build 3. run the test suite with "python2.6 runtests.py --verbose" If that crashes too, it would be interesting to know what the stack trace is and what test it was on at the time. James.