Commit Graph

6 Commits

Author SHA1 Message Date
Federico Di Gregorio
1a3e231e51 License change for psycopg2da
LGPL3+ZPL is fine for me, thanks.

Fabio
2010-02-14 01:23:57 +01:00
Federico Di Gregorio
e664abb248 Added XXXARRAY imports to psycopg2.extenions 2008-05-30 00:39:50 +02:00
James Henstridge
f64cbeda46 * tests/test_transaction.py (DeadlockSerializationTestCase): port
over some tests for serialisation and deadlock errors,
	demonstrating that TransactionRollbackError is generated.
	(QueryCancelationTests): add a test to show that
	QueryCanceledError is raised on statement timeouts.

	* psycopg2da/adapter.py (_handle_psycopg_exception): rather than
	checking exception messages, check for TransactionRollbackError.

	* psycopg/pqpath.c (exception_from_sqlstate): return
	TransactionRollbackError for 40xxx errors, and QueryCanceledError
	for 57014 errors.
	(pq_raise): If we are using an old server, use
	TransactionRollbackError if the error message contains "could not
	serialize" or "deadlock detected".

	* psycopg/psycopgmodule.c (_psyco_connect_fill_exc): remove
	function, since we no longer need to store pointers to the
	exceptions in the connection.  This also fixes a reference leak.
	(psyco_connect): remove _psyco_connect_fill_exc() function call.

	* psycopg/connection.h (connectionObject): remove exception
	members from struct.

	* psycopg/connection_type.c (connectionObject_getsets): modify the
	exception attributes on the connection object from members to
	getsets.  This reduces the size of the struct.

	* lib/extensions.py: import the two new extensions.

	* psycopg/psycopgmodule.c (exctable): add new QueryCanceledError
	and TransactionRollbackError exceptions.
2008-01-16 05:14:24 +00:00
Fabio Tranchitella
fadd1a6938 psycopg2da: better pattern matching for Retry exceptions; it is now compatible with postgresql 8.0, 8.1 and 8.2 exception messages. 2007-03-25 03:39:23 +00:00
Fabio Tranchitella
401af084ab Renamed psycopgda-configure.zcml as psycopg2da-configure.zcml. 2006-11-06 00:37:45 +00:00
Fabio Tranchitella
146f64e71d Added psycopg2da, the zope3 database adapter for psycopg2. 2006-09-19 03:50:35 +00:00