#105 ✓ resolved
Corry Haines

Connection factories override cursor_factories

Reported by Corry Haines | March 26th, 2012 @ 04:14 AM

The cursor subclasses appear to have been coded to override the cursor_factory kwarg that can be passed to them.

If this was the intended behavior, then I guess this is not a bug, but it seems to be a very odd behavior. Because of this behavior, adding a connection factory to an existing app caused most of the cursors to break when their request for specific cursors was ignored.

So, I have patched the subclasses to allow the cursor_factory kwarg to override the connection_factory. It allows connection factories to be dropped into place without stomping all over existing code.

I have uploaded the patch to my github clone of psycopg: https://github.com/tabletcorry/psycopg2/commit/eb46f4f80794e37a16e0...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins

Pages