Commit Graph

1033 Commits

Author SHA1 Message Date
Jan Urbański
751bfa1ea6 Support query cancellation.
Add a cancel() method do the connection object that will interrupt
the current query using the libpq PQcancel() function.
2010-11-28 11:50:02 +00:00
Daniele Varrazzo
9f78141532 Don't consider the kernel not blocking us on write as an error. 2010-11-25 03:13:49 +00:00
Daniele Varrazzo
5a025825cc Skip test if uuid not available on Python. 2010-11-24 11:04:18 +00:00
Daniele Varrazzo
bb44bcd5b5 Skipped inf test on the platform not supporting it (win32). 2010-11-24 10:50:28 +00:00
Daniele Varrazzo
1fd6b84068 Added test suite to the distributed package. 2010-11-24 03:36:57 +00:00
Daniele Varrazzo
fdf1ba1aac Dropped notices hack to get COPY errors from V2 protocol. 2010-11-22 00:49:07 +00:00
Daniele Varrazzo
7fe7b669aa Added instructions about running tests and building docs. 2010-11-20 01:14:41 +00:00
Daniele Varrazzo
6f51eefac3 Dropped references to psycopg 1 from readme and install.
Nowaday not many remember it: I think it's useless to make comparisons.
2010-11-20 01:14:05 +00:00
Daniele Varrazzo
ed3b2188fe Fixed import of test functions from Python 2.7 unittest. 2010-11-19 18:01:29 +00:00
Daniele Varrazzo
bbe28ba75f Add a small delay to receive notification when testing on busy network. 2010-11-19 14:44:47 +00:00
Daniele Varrazzo
f2c5d04f39 Fixed docs: the execute argument must be a sequence, not a tuple. 2010-11-19 13:13:14 +00:00
Daniele Varrazzo
21dfc2c592 Float test skipped where the server doesn't support inf. 2010-11-19 10:44:39 +00:00
Daniele Varrazzo
a55e50b991 hstore test passes against non-utf8 databases. 2010-11-19 10:29:07 +00:00
Daniele Varrazzo
19ead4a5cb Test cleanup.
Tests pass or fail gracefully on older PostgreSQL versions.

If unittest2 is available, skip tests instead of printing warnings.
2010-11-19 03:55:37 +00:00
Daniele Varrazzo
94348bfb78 hstore registration doesn't fail if typarray column not available. 2010-11-19 03:51:53 +00:00
Daniele Varrazzo
163cf5bfb4 mx.DateTime module initialized as it is supposed to be.
No need to pass the api pointer around. Dropped compiler warnings.
2010-11-19 00:28:49 +00:00
Daniele Varrazzo
3e3aa676a9 datetime module initialized as it is supposed to be.
Dropped compiler warnings. It wouldn't blow up if any api was called.
No need to pass type pointers around.
2010-11-19 00:28:39 +00:00
Daniele Varrazzo
576b01f6a3 Functions exported to drop warnings. 2010-11-19 00:20:49 +00:00
Daniele Varrazzo
67793ed989 Compiler warning dropped. 2010-11-18 23:13:16 +00:00
Daniele Varrazzo
bcacdc8461 Added enum with possilbe isolation level states.
Also, general isolation levels cleanup and tests added.
2010-11-18 00:31:51 +00:00
Daniele Varrazzo
4074635629 Moved links to PG docs from 8.4 to 9.0. 2010-11-17 23:05:10 +00:00
Daniele Varrazzo
454c6b8915 Moved links to PG docs from 8.4 to 9.0. 2010-11-17 02:59:03 +00:00
Daniele Varrazzo
c3c54aab38 Don't clobber exception if conn_switch_isolation_level fails.
Which shouldn't.
2010-11-17 01:43:50 +00:00
Daniele Varrazzo
9849083628 Added tests to check the effective isolation level. 2010-11-17 01:04:34 +00:00
Daniele Varrazzo
e1a04bec0e Don't inconditionately run a query at connection to set datestyle to ISO.
Run it only if PQparameterStatus() reports the datestyle is set to
something different.
2010-11-16 18:15:00 +00:00
Daniele Varrazzo
15bba2966f Don't run a query at connection to detect client encoding.
Use PQparameterStatus() instead. This is only guaranteed in protocol 3.
2010-11-16 10:16:52 +00:00
Daniele Varrazzo
a88d7ab424 Dropped support for protocol 2.
Dropped both the setup constant allowing conditional compiling and the
code specific to V2 protocol (mostly COPY and error handling).
2010-11-16 01:08:50 +00:00
Daniele Varrazzo
73265e7ece Refuse connection with server with protocol version 2.
This cuts off server whose version is older than 7.4. But enables us to
remove large portions of code rarely used and tested (e.g. p2 copy) and
will allow us to drop the query we do at each connection to establish
the client encoding and the datestyle.
2010-11-16 01:01:32 +00:00
Daniele Varrazzo
58079c6c91 Fixed dependencies of the sdist target 2010-11-15 09:35:28 +00:00
Daniele Varrazzo
0a2856477c The Makefile can receive the pg_config location. 2010-11-14 18:23:09 +00:00
Daniele Varrazzo
b25af6311c Makefile included in sdist. 2010-11-14 02:18:57 +00:00
Daniele Varrazzo
78dfbfb94a Fixed dependencies to build the docs. 2010-11-13 20:31:53 +00:00
Daniele Varrazzo
d07791cfe9 Fixed setuptools installation from scratch. 2010-11-13 20:01:48 +00:00
Daniele Varrazzo
988861a2d8 runtests.py script dropped.
It was broken as the distutils changed the name of the build dir
somewhere along the way. Use ``make runtests`` instead.
2010-11-13 19:50:25 +00:00
Daniele Varrazzo
9ffcb90038 Added flesh to the Makefile.
Now it can be used to build, make the docs (including installing
dependencies), run the tests, build the sdist.
2010-11-13 19:45:45 +00:00
Jean-Baptiste Quenot
b8ce51d9c2 Mention connection object in debug logs 2010-11-13 03:56:23 +00:00
Daniele Varrazzo
cd19f9115d Fixed notices order (ticket #9). 2010-11-11 11:54:43 +00:00
Daniele Varrazzo
3cae0f3f5d NamedTupleCursor doesn't change exception when fetching with no result. 2010-11-11 10:39:42 +00:00
Daniele Varrazzo
ef7a5ee8a9 Build the namedtuple only once per execution, not once per fetch. 2010-11-11 10:39:42 +00:00
Daniele Varrazzo
11c021cb21 Fixed tests to run on Windows. 2010-11-11 10:39:35 +00:00
Daniele Varrazzo
92ee893f0f Functions unused outside the module marked static. 2010-11-10 15:50:05 +00:00
Federico Di Gregorio
cf07af5ff5 Version bump to 2.3.0-beta2 2010-11-09 18:51:46 +01:00
Daniele Varrazzo
a39e98f9e5 Check the presence of a mro.
The mere presence of the Py_TPFLAGS_HAVE_CLASS doesn't ensure it is
there.
2010-11-09 14:28:00 +00:00
Daniele Varrazzo
f0773d5682 Avoid pointless string manipulation in NamedTupleCursor.
Closes ticket #10. Reported by Marko Kreen.
2010-11-09 11:17:02 +00:00
Daniele Varrazzo
ed6a4c8b1a Dropped PyArg_ParseTuple() calls in functions taking no arguments. 2010-11-09 03:18:54 +00:00
Daniele Varrazzo
2dc28ee7d8 Less lookups and more efficient calls in microprotocols_adapt().
Also more explicit handling of the exception indicator.
2010-11-09 02:41:43 +00:00
Daniele Varrazzo
753b580d72 Less lookups and more efficient calls in microprotocols_getquoted(). 2010-11-09 02:21:21 +00:00
Daniele Varrazzo
422fede38e Replaced PyObject_CallFunction() with *ObjArgs() where more efficient. 2010-11-09 01:49:22 +00:00
Daniele Varrazzo
9fe0511711 Silencing other 2 tests failures due to 2pc disabled in the server. 2010-11-09 01:44:42 +00:00
Jason Erickson
c79d20855a Win32 *time_r fix
Fixed the thread safetyness of the Windows *time_r functions.
2010-11-09 00:20:58 +00:00