Commit Graph

555 Commits

Author SHA1 Message Date
James Henstridge
345a254ca0 Remove conditionals on support for booleans and datetimes, since they
are guaranteed to be available in Python 2.4.
2008-12-26 23:46:35 +09:00
James Henstridge
e7b8d6505e Remove backward compatibility support for Python versions older than
2.4, since we don't really support them any way.
2008-12-26 09:37:44 +09:00
Federico Di Gregorio
5480cf5332 Fixed memory leak in lobject 2008-12-04 16:58:05 +01:00
Federico Di Gregorio
4eb295a8ca Patch from Jason Erickson to build on MSVC 2008-11-26 09:51:53 +01:00
Federico Di Gregorio
5c982d90f0 Unified string quoting 2008-11-25 19:18:17 +01:00
Federico Di Gregorio
4810789194 Removed non-existing files from project 2008-11-25 17:53:48 +01:00
Federico Di Gregorio
4e359f6f05 Applied COPY patch from Alejandro Dubrovsky (missing files and project) 2008-11-25 17:46:15 +01:00
Federico Di Gregorio
c1d6073531 Applied COPY patch from Alejandro Dubrovsky 2008-11-25 17:45:22 +01:00
Federico Di Gregorio
b9157c8ba1 Merged changed by JH from head 2008-09-24 01:29:20 +02:00
Federico Di Gregorio
4c8e80038e Added inet support 2008-09-24 01:27:52 +02:00
James Henstridge
cc2aa0a9ca * psycopg/psycopg.h (NotSupportedError_doc): clean up
spelling/grammar a bit, using exception description from the PEP.
2008-09-23 17:22:37 +08:00
Federico Di Gregorio
56f6001d6d Support for NULLs in UUID 2008-09-23 09:11:11 +02:00
Federico Di Gregorio
b92601306e Added suppport for UUID and related test. 2008-09-19 21:25:16 +02:00
Federico Di Gregorio
758eaf23d1 Preparing release 2.0.8 2008-09-16 09:58:44 +02:00
James Henstridge
bc662db1cc Fill in a few more items in the NEWS file for 2.0.8. 2008-08-26 14:47:47 +08:00
Federico Di Gregorio
f6a25ccdf0 Build fix from Jorgen Austvik 2008-08-02 10:30:36 +02:00
Federico Di Gregorio
ceee4c816f Merge from jh 2008-07-26 15:10:02 +02:00
Federico Di Gregorio
e95a4d9d2e get_backend_pid() patch and fixes 2008-07-26 15:09:20 +02:00
James Henstridge
a2f3e4a3ac * psycopg/lobject_type.c (lobject_setup): use
FORMAT_CODE_PY_SSIZE_T in Dprintf() call for 64-bit compatibility
when using Python 2.5 or later.
(lobject_dealloc): same here.
2008-07-23 16:57:10 +08:00
James Henstridge
0aec2840d8 Merge support for cyclic GC in relevant types that psycopg defines. 2008-07-23 16:50:24 +08:00
James Henstridge
2273b79be9 Use Py_CLEAR() in a few more places, and do INCREF's before setting
struct members rather than afterwards.
2008-07-21 13:41:54 +08:00
James Henstridge
e0287c0db4 * psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC
traversal for quoted string adapters.

	* psycopg/adapter_pboolean.c (pboolean_traverse): add cyclic GC
	traversal for boolean adapters.

	* psycopg/adapter_mxdatetime.c (mxdatetime_traverse): add cyclic
	GC traversal for mxdatetime adapters.

	* psycopg/adapter_datetime.c (pydatetime_traverse): add cyclic GC
	traversal for datetime adapters.
2008-07-18 17:42:31 +08:00
James Henstridge
590542e973 * psycopg/adapter_binary.c (binary_traverse): add cyclic GC
traversal for binary adapters.
2008-07-01 11:59:25 +08:00
James Henstridge
47d2414e32 * psycopg/adapter_asis.c (asis_traverse): add cyclic GC traversal
for AsIs adapters.
2008-07-01 09:57:16 +08:00
James Henstridge
fd538a8b17 * psycopg/adapter_list.c (list_traverse): add cyclic GC traversal
for list adapters.
2008-07-01 09:34:51 +08:00
Federico Di Gregorio
a5e01ef0df Fixed spaces in pg_config path 2008-06-28 18:34:57 +02:00
Federico Di Gregorio
e664abb248 Added XXXARRAY imports to psycopg2.extenions 2008-05-30 00:39:50 +02:00
James Henstridge
26693621ef * psycopg/cursor_type.c (cursor_setup): incref before setting
attributes, to make things GC-safe.

	* psycopg/cursor_int.c (curs_reset): make clearing of description
	and casts attributes GC-safe.
2008-05-28 17:45:37 +08:00
James Henstridge
bbd101bb7e * psycopg/typecast.c (typecast_traverse): implement cyclic GC
traversal for typecasters.
2008-05-28 17:22:40 +08:00
James Henstridge
a39fb19eb9 * psycopg/connection_type.c:
* psycopg/cursor_type.c: add support for cyclic GC.

	* psycopg/python.h: add definitions for Py_CLEAR() and Py_VISIT()
	for compatibility with old versions of Python.
2008-05-28 09:00:36 +08:00
Federico Di Gregorio
5a428642f8 COPY problem tests and partial fix 2008-05-27 17:40:19 +02:00
Federico Di Gregorio
6073193314 Fixed memory leak in executemany 2008-05-19 10:14:17 +02:00
Fabio Tranchitella
f1fab54b97 Update debian packaging files. 2008-05-12 15:33:10 +08:00
James Henstridge
ee235478bd * psycopg/lobject.h (lobjectObject): remove "mode" struct member,
since it was unused.
2008-05-06 18:12:50 +08:00
James Henstridge
9d20f5c09c * psycopg/lobject_*.c: replace uses of the closed struct member,
and change the Python level attribute to a getset.

	* psycopg/lobject.h (lobjectObject): remove the closed member,
	since "fd < 0" gives us the same information.  Reorder the struct
	members for better packing.
2008-05-06 18:07:54 +08:00
James Henstridge
2046ae34fb * psycopg/lobject*: const'ify the code. 2008-05-06 17:09:43 +08:00
James Henstridge
7d66c20edb * tests/test_lobject.py (LargeObjectTests): add more tests,
including behaviour on closed lobjects and stale lobjects.

	* psycopg/lobject_type.c (psyco_lobj_close): don't mark the
	connection closed here because it is done by
	lobject_close_locked().

	* psycopg/lobject_int.c (lobject_open): mark objects as not closed
	if we successfully open them.
	(lobject_close_locked): mark the lobject closed here.
	(lobject_export): ensure we are in a transaction, since
	lo_export() issues multiple queries.

	* psycopg/lobject_type.c (lobject_setup): make lobjects start closed.
2008-05-06 17:04:26 +08:00
James Henstridge
e627948a6b * psycopg/lobject.h: don't export the lobjectType symbol. 2008-05-05 22:51:15 +08:00
Federico Di Gregorio
0319bc8cc4 Fixed build error on SUN 2008-05-05 15:55:51 +02:00
James Henstridge
975d2286e8 Merge lobject work from trunk, plus fixes to make it work with current
psycopg2.
2008-05-05 19:23:33 +08:00
James Henstridge
9a48c261be Add basic tests for large object code. Fix lobject.seek() to actually
work.
2008-05-05 15:33:44 +08:00
James Henstridge
e192c603fa Fix up structmember definitions to match real types. T_LONG is not the
same as T_INT/T_UINT on AMD64 ...
2008-05-05 15:00:50 +08:00
James Henstridge
82557e65a2 Fix up pq_complete_error() calls. 2008-05-05 15:00:34 +08:00
James Henstridge
5beef38bfc Fix double free in case where PGresult is NULL. 2008-05-05 14:16:57 +08:00
James Henstridge
ec20fa8912 Some changes to the lobject code to match changes in pqpath.[ch]. 2008-05-05 12:07:24 +08:00
James Henstridge
3cfe438b74 Add an #endif I accidentally removed 2008-05-05 10:43:38 +08:00
James Henstridge
e01da0a540 add ignores 2008-05-05 10:39:13 +08:00
James Henstridge
938c456cee Merge changes from psycopg2/trunk via psycopg2.r243. 2008-05-05 10:37:24 +08:00
James Henstridge
31ef9355c2 Merge psycopg2/trunk into psycopg2/branches/2_0_x r243 (which is the
last revision merged into trunk).  Where file ID conflicts exist, but 
the content was equivalent, I've picked the 2_0_x version.
2008-05-05 10:22:22 +08:00
Fabio Tranchitella
fedfd53d54 Added encoding. 2008-04-09 09:49:55 +00:00