This project is archived and is in readonly mode.
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...
Comments and changes to this ticket
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
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.