Re: PATCH: add some new exceptions

"James Henstridge" <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On 16/01/2008, Harald Armin Massa <[email protected]> wrote:
> James,
>
> I just looked at one sentence:
>
> > I extended the test suite to verify that the new exceptions are being
> > raised correctly.  While working on this, I also made some changes to
> > the way the Connection.*Error attributes are handled, which should be
> > a bit simpler and fixes a reference leak.
>
> Do I understand correctly that there is a reference leak SOMEWHERE in
> Connection Error Handling in actual psycopg2 ?

The reference leak causes the reference count on each of the exception
classes to be incremented once for each connection created.  As these
objects would be sticking round for the life of the interpreter, it
won't exhibit as a memory leak.


> because I have a VERY spurios ntdll.dll exception (i.e. Windows crying
> out, uncatchable), which only sometimes appears;
> The usual point of crash is after testing the connection and putting
> the connection object into garbage.
>
> That you found and fixed that leak be fabulous news and would entitle
> you to beer by me @ EuroPython.

I don't know if I found your leak.  If you can reliably reproduce the
exception, please file a bug though (and try out the latest
development version from SVN if it isn't too much trouble).

James.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.