Commit Graph

2331 Commits

Author SHA1 Message Date
Federico Di Gregorio
e8ef973ddf Fixed lobject test failures 2009-04-01 20:49:00 +02:00
Federico Di Gregorio
850423d8fc Fixed setup script to handle PostgreSQL devel version strings 2009-03-21 12:54:44 +01:00
Federico Di Gregorio
825a60eec5 Removed spurious print 2009-03-16 22:15:20 +01:00
Federico Di Gregorio
0b0639dae5 Fixed error when adapt()ing None 2009-03-09 21:45:49 +01:00
Federico Di Gregorio
a574321fcd NEWS for 2.0.10 2009-03-02 11:07:36 +01:00
Federico Di Gregorio
1daf300ca3 Support for seconds in time zone offsets 2009-03-02 11:07:17 +01:00
Federico Di Gregorio
5b04203c9f Fixed error in register_type() 2009-03-02 10:59:52 +01:00
Federico Di Gregorio
a3ce636be0 Fixed error in register_type() 2009-03-02 10:56:53 +01:00
Federico Di Gregorio
4077711050 More cross-platform build fixes 2009-03-02 09:19:23 +01:00
Federico Di Gregorio
5c0cfa86bf isinf() for Solaris 2009-02-27 11:02:45 +01:00
Federico Di Gregorio
71c7825b9c Release 2.0.9 2009-02-23 21:39:47 +01:00
Federico Di Gregorio
9b259bba86 Removed some spurious tabs 2009-02-23 21:39:25 +01:00
Federico Di Gregorio
49bdaf92f6 Merge from trunk 2009-02-22 23:39:13 +01:00
Federico Di Gregorio
a6dff6c82a Preparing release 2.0.9 2009-02-22 23:37:34 +01:00
James Henstridge
9067bde803 * psycopg/utils.c (psycopg_escape_string): same here.
* psycopg/adapter_binary.c (binary_escape): simplify PostgreSQL
	version check.

	* setup.py (psycopg_build_ext.finalize_options): use a single
	define of the PostgreSQL version in a form that can easily be used
	by #ifdefs.
2009-02-17 16:00:52 +09:00
James Henstridge
2a94dfae47 * tests/test_dates.py (DatetimeTests, mxDateTimeTests): full test
coverage for datetime and time strings with and without time zone
	information.

	* psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): adjust
	to handle the changes in typecast_parse_time.
	(typecast_PYTIME_cast): add support for time zone aware time
	values.

	* psycopg/typecast_mxdatetime.c (typecast_MXDATE_cast): make sure
	that values with time zones are correctly processed (even though
	that means ignoring the time zone value).
	(typecast_MXTIME_cast): same here.

	* psycopg/typecast.c (typecast_parse_time): Update method to parse
	second resolution timezone offsets.
2009-02-17 15:03:33 +09:00
James Henstridge
ba8be438bb * psycopg/typecast.c (typecast_parse_time): Fix up handling of
negative timezone offsets with a non-zero minutes field.

	* tests/test_dates.py (DatetimeTests): Add tests for time zone
	parsing.  The test for HH:MM:SS time zones is disabled because we
	don't currently support it.
2009-02-17 12:58:45 +09:00
James Henstridge
3466b3b72d Add tests for time zone parsing, for "HH", "HH:MM" and "HH:MM:SS" forms.
Currently the second fails for negative offsets due to bugs in the 
parser, and the third fails because it doesn't even try to parse second 
offset values (as Python doesn't either).
2009-02-17 12:39:57 +09:00
Federico Di Gregorio
41dd7a1095 Compile again on modern FreeBSD 2009-02-16 10:00:34 +01:00
Federico Di Gregorio
f9fa711f03 Modified executemany() to return modified rows count 2009-02-07 18:02:14 +01:00
Federico Di Gregorio
eb25f9f154 Added adapter to handle float('inf') and float('nan') 2009-01-23 00:09:20 +01:00
Federico Di Gregorio
e22451736a register_type() now works on connection and cursor subclasses 2009-01-22 11:02:38 +01:00
Federico Di Gregorio
78c0765367 Merge from public trunk 2009-01-10 18:51:45 +01:00
Federico Di Gregorio
f5ec676566 Added isready() error test to sandbox 2009-01-10 18:48:31 +01:00
Federico Di Gregorio
aeb5080208 Fixed isready() not throwing exception on error 2009-01-10 18:48:08 +01:00
James Henstridge
83b03e5e36 If we are depending on Python 2.4, we don't need to make decimal module
support conditional.
2008-12-27 00:03:11 +09:00
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