Daniele Varrazzo
fab31e9441
Fetch 'arraysize' records per roundtrip in named cursors iteration
...
Closes ticket #33 .
2011-02-05 15:24:00 +01:00
Daniele Varrazzo
b358c54f02
More efficient cursor.iter: fetch many records at time.
2011-02-04 12:22:07 +00:00
Daniele Varrazzo
8a1de1ec4e
Added test to verify named cursor efficiency.
...
Iter shouldn't fetch one record at time.
2011-02-01 03:01:47 +00:00
Daniele Varrazzo
9433a6879f
Merge remote branch 'origin/python2' into python2
...
Conflicts:
NEWS-2.3
2011-02-01 02:24:33 +00:00
Daniele Varrazzo
a2dcf504b5
Hopefully really fixed crash in datetime adapter.
...
Verified with gcc 4.3. Notice that on gcc 4.4 the bug was not present.
2011-02-01 02:00:47 +00:00
Daniele Varrazzo
153c30f24b
Skip composite type tests if the server doesn't support them
2011-01-18 02:09:49 +00:00
Daniele Varrazzo
ca3d9da83b
Skip GC bug test if uuid is not available
2011-01-18 02:09:49 +00:00
Daniele Varrazzo
06059a216f
Fixed hstore test in PG 9.x with standard_conforming_strings off
2011-01-18 00:58:33 +00:00
Daniele Varrazzo
8e1257d7d0
Fixed check for pg_sleep availability in tests
...
The function is available since PG 8.2.
2011-01-18 00:57:27 +00:00
Daniele Varrazzo
d0e36d194c
Added icon removed from Zope 2.12.9 to the ZPsycopgDA package
...
Closes ticket #30 . Bug report and patch by Pumukel.
2011-01-14 16:31:57 +01:00
Daniele Varrazzo
48588e5f69
Invalidate large objects after a two-phase commit operation
2011-01-10 00:20:55 +00:00
Daniele Varrazzo
935c25730a
Fixed segfault in large object close.
...
Check that the connection is not closed/faulty before attempting lo_close.
2011-01-10 00:11:14 +00:00
Daniele Varrazzo
38641b93ea
Test decorator moved into the test utilities module
2011-01-09 23:44:58 +00:00
Daniele Varrazzo
15a09da96d
Added license to unit tests
...
As the test suite is now part of the source distribution.
2011-01-09 23:44:35 +00:00
Daniele Varrazzo
7c1b03bd45
All tests made executable.
2011-01-07 00:58:29 +00:00
Daniele Varrazzo
627df15995
Merge branch 'noleak' into python2
2011-01-03 21:39:35 +01:00
Daniele Varrazzo
8d44d0f1c7
Mention refcount fixes in NEWS files
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
abd7991968
Fixed refcount bug with connection destroyed in a 2PC transaction
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
5f6e773575
Broken circular reference in async execution
...
If a connection is destroyed before an async operation is completed, the
`async_cursor` member creates a reference loop, leaving the connection and
the cursor alive. `async_cursor` is now a weak reference.
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
19ff51ae75
The cursor is weakly referenceable
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
04cf90cc21
The connection is weakly referenceable
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
5888b03608
Fixed "historical" reference leak in TimestampFromTicks
...
Added an internal function with C signature to avoid the creation of a
tuple to be later unpacked. When the tuple was decref'd, Python 2.4 64
bits regularly segfaulted; Python 2.5 less regularly; don't know about
other versions.
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
8b0af283f6
Don't register the unicode typecaster globally during tests
...
It can invalidate the results in further runs in the same process.
2011-01-03 21:34:49 +01:00
Daniele Varrazzo
131c6a25e9
Unregister test adapters to keep a more precise references count
2011-01-03 21:34:46 +01:00
Daniele Varrazzo
a44441f5e5
Added script to look for refcounting bugs
2011-01-03 21:34:46 +01:00
Daniele Varrazzo
68305a0eb6
Fixed TYPE adaptation to basic tuples
...
Tuples and namedtuples have different constructors.
2011-01-03 19:27:26 +01:00
Daniele Varrazzo
3cc8719998
Added missing test to the test suite.
2011-01-02 03:00:44 +01:00
Daniele Varrazzo
17f69ba735
Fixed Makefile dependencies of the test suite.
2011-01-02 03:00:32 +01:00
Daniele Varrazzo
afb87bb10a
Fixed "building" of purelib files with make.
...
Using build instead of build_py forced build_ext to run too, which may
fail to run as the option PG_CONFIG is not passed (or, worse, we may end
up building against the wrong pg_config).
Also touching the target file as make seems considering the source file
newer than the destination when the timestamp is the same (as it is
because the file is usually just copied).
2011-01-02 02:44:56 +01:00
Daniele Varrazzo
d08bfcbee5
Refuse to build if pg_config is not found.
...
I think half of the problems in OS X setup are due to setup going ahead
even when the pg_config is not found. We are now only building with PG
version that make the tool available.
2011-01-02 02:01:53 +01:00
Daniele Varrazzo
45c6dfb69d
Merge branch 'adapt-type' into python2
2011-01-02 00:35:59 +01:00
Daniele Varrazzo
7ac0bdd661
Added PostgreSQL composite types typecaster to Python tuples.
2011-01-02 00:34:13 +01:00
Daniele Varrazzo
159cda3688
Added cursor.cast() method
...
The method exposes the typecasters lookup algorithm. Useful to create
recursive typecasters.
2011-01-01 22:55:10 +01:00
Daniele Varrazzo
f9be48d89e
Merge branch 'none-in-composite' into python2
2011-01-01 17:09:37 +01:00
Daniele Varrazzo
fdfa2de1a1
Fixed adaptation of None in composite types (ticket #26 ).
...
Added an adapter for None: it is usually not invoked as adaptation to
NULL is a fast path in mogrify, but can be invoked by composite types.
Notice that composite types still have the option to fast-path None
(e.g. list adapter does).
2011-01-01 17:07:54 +01:00
Daniele Varrazzo
506ce93a5b
Bump to the next dev version.
2011-01-01 12:55:41 +01:00
Daniele Varrazzo
30921b58a8
Dropped conversion from None to NULL in adapter.
...
It was an error as the string is not conform to the protocol. The error
is masked by the None fast path in _mogrify, but surfaces when adapting
a tuple contains a None.
2010-12-31 18:55:33 +01:00
Daniele Varrazzo
b5a8facb9c
Added test to show failed adaptation of None in records.
2010-12-31 18:54:50 +01:00
Federico Di Gregorio
69c66a3a3f
Preparing release 2.3.2
2010-12-20 13:33:21 +01:00
Daniele Varrazzo
ddd2de0410
Updated ChangeLog/NEWS after ticket #24 patch commit.
2010-12-18 15:38:56 +00:00
Marti Raudsepp
a08419406c
Don't segfault when PQparameterStatus(DateStyle) returns NULL
...
pgbouncer for example does not pass on DateStyle.
2010-12-18 15:27:15 +00:00
Daniele Varrazzo
5a0cfad95f
Bump to next dev version.
2010-12-18 15:25:53 +00:00
Daniele Varrazzo
cf243ccf37
Shorter "never ending query" to test query canceling.
...
If the cancel signal misses the race, this query will stay in the
backend until the sleep expires.
2010-12-04 23:21:16 +00:00
Daniele Varrazzo
13c2f5a78b
Added target to package the docs for PyPI documentation.
2010-12-04 23:14:03 +00:00
Daniele Varrazzo
9e9933faed
Update classifier URLs for PyPI.
2010-12-04 23:14:03 +00:00
Federico Di Gregorio
ee5015a30b
Preparing release 2.3.1
2010-12-04 21:24:02 +01:00
Daniele Varrazzo
557e28d744
Dropped interface for two private functions.
...
Note: the functions are private because typecast.c imports the .c's of
typecast_[mx]datetime, not the .h's.
Work around the warning for 'skip_until_space' not used with an #ifdef.
Furthermore, those functions are now static.
2010-12-04 13:51:21 +00:00
Daniele Varrazzo
288f9ee809
Work around CentOS 5.5 x86_64 buld problem.
...
Closes ticket #23
2010-12-04 13:51:21 +00:00
Daniele Varrazzo
ebd73c14a8
Going to dev version for 2.3.1.
2010-12-04 13:43:28 +00:00
Daniele Varrazzo
9c71a9c6e5
Added link to psycogreen.
2010-12-02 17:13:13 +00:00