Commit Graph

1234 Commits

Author SHA1 Message Date
Menno Smits
1469a56512 Fixed repr for FixedOffsetTimezone for offsets west of UTC (negative)
The offset displayed was always positive and somewhat confusing. The
offset displayed now is the offset that the instance was created
with.

Also added some tests for initialisation.
2012-01-30 13:27:01 +00:00
Menno Smits
35ff2def34 Renamed shadowed test method 2012-01-29 19:35:38 +00:00
Daniele Varrazzo
78895e6943 Added doc for Error.cursor 2012-01-19 01:30:46 +00:00
Daniele Varrazzo
db987250c8 Avoid installing Error.__reduce_ex__ on Python 2.4
It is not used by the pickle protocol, and if called manually fails in an
unsettling way, probably because the exceptions were old-style classes.
2012-01-14 18:01:15 +00:00
Daniele Varrazzo
43daba38e7 Make Error and subclasses picklable
Useful for multiprocessing interaction.
Closes ticket #90.
2012-01-14 17:34:09 +00:00
Daniele Varrazzo
28f1013c2a Dropped duplicate import 2012-01-14 17:28:37 +00:00
Daniele Varrazzo
6f21111a92 Docs/cleanup for the lo_creat patch 2012-01-10 21:51:34 +00:00
Giovanni Mascellani
e1700fe28b Use lo_creat() instead of lo_create() when creating large objects without new_oid.
This enhances the compatibility with the pgpool-II replication middleware,
that doesn't support lo_create() calls.
2012-01-10 20:49:58 +00:00
Daniele Varrazzo
dcc60131a9 fetchmany accepts None as size, meaning the default arraysize
without this care, extending fetchmany in subclasses becomes tricky.

Closes ticket #84.
2012-01-10 01:32:45 +00:00
Daniele Varrazzo
09a8e7bf1f Fixed cursor.fetchmany docstring 2012-01-10 01:28:14 +00:00
Daniele Varrazzo
05fb0e2fbf Added tests to verify ticket #84
fetchmany() with no arg is broken in cursor subclasses.
2012-01-10 01:27:43 +00:00
Daniele Varrazzo
702ae0a904 Force GC during weakref tests
Required to run the tests under PyPy with no refcount. See
https://github.com/mvantellingen/psycopg2-ctypes/pull/15#issuecomment-3274618
2011-12-26 22:35:33 +01:00
Daniele Varrazzo
ede0e145dd Added tests for cursor scroll 2011-12-26 22:00:25 +01:00
Daniele Varrazzo
7990425801 Bump to next dev version 2011-12-26 20:06:10 +01:00
Federico Di Gregorio
c22e8ef808 Preparing release 2.4.4 2011-12-19 10:57:38 +01:00
Federico Di Gregorio
56482d3300 Merge remote-tracking branch 'piro/devel' into devel
Conflicts:
	NEWS
2011-12-19 10:55:55 +01:00
Daniele Varrazzo
2af563227a make_errorcodes updated to the current page style 2011-12-16 14:49:49 +00:00
Daniele Varrazzo
3094371621 Fixed doc for supported PG versions in errorcodes table 2011-12-16 12:37:38 +00:00
Daniele Varrazzo
d6e0b284e7 Map error classes 20 and HV to more specific exceptions 2011-12-16 12:26:27 +00:00
Daniele Varrazzo
08fa6550ab Docs typo fixed 2011-12-16 11:09:20 +00:00
Federico Di Gregorio
71a4c2bac9 Fixed rollback on error on Zope (ticket #73) 2011-12-16 10:37:01 +01:00
Daniele Varrazzo
b721421633 A bunch of typos fixed in the examples by Josh Kupershmidt 2011-12-15 23:58:22 +00:00
Daniele Varrazzo
c3914b8aa2 Improvements to the docs homepage after Bucko's proofreading 2011-12-15 22:13:20 +00:00
Daniele Varrazzo
9e8fc349b9 Docs homepage refreshed with new bragging and links 2011-12-15 21:42:08 +00:00
Daniele Varrazzo
5f098de7e8 A bunch of changes registered in the NEWS file 2011-12-15 20:17:36 +00:00
Daniele Varrazzo
2cf35b69de 'register_composite()' also works with tables
Skip dropped and hidden columns when inspecting the schema.
2011-12-15 20:11:17 +00:00
Daniele Varrazzo
a4485022b5 Use 'autocommit' to check if to rollback after extra types registration
isolation_level currently requires an extra query, autocommit doesn't.
2011-12-15 19:56:52 +00:00
Daniele Varrazzo
bb8e1e9455 Fixed error in schema mismatch in composite caster 2011-12-15 19:56:52 +00:00
Daniele Varrazzo
ba7a0a3008 Raise DatabaseError instead of error with bad exception informations
We can actually raise these exceptions in weird situations,
e.g. see ticket #82.
2011-12-15 17:50:31 +00:00
Daniele Varrazzo
424bc310a6 Use isolation level symbolic constants in examples 2011-12-15 13:10:36 +00:00
Daniele Varrazzo
5a6a303d43 A couple of fixes to psycopg1
_psycopg.connect is no more. Also use symbolic consts instead of values
for the isolation level.
2011-12-15 13:06:32 +00:00
Daniele Varrazzo
b5de04d2ff Put back a distinct ISOLATION_LEVEL_READ_UNCOMMITTED value 2011-12-15 12:53:48 +00:00
Federico Di Gregorio
d2d94e203f Reverted isolation level values to backward compatible values
This basically removes the READ UNCOMMITED level (that internally
PostgreSQL maps to READ COMMITED anyway) to keep the numeric values
compattible with old psycopg versions. For full details and discussion
see this thread:
http://archives.postgresql.org/psycopg/2011-12/msg00008.php
2011-12-15 12:25:19 +01:00
Daniele Varrazzo
8473209d24 Named DictCursor/RealDictCursor honour itersize
Closes ticket #80.
2011-12-11 22:06:15 +00:00
Daniele Varrazzo
8606d83507 Bump to next development version 2011-12-11 22:06:15 +00:00
Federico Di Gregorio
2efe3efdfa Preparing release 2.4.3 2011-12-11 22:17:54 +01:00
Daniele Varrazzo
088978e7b1 Typo fixed writeable -> writable
Closes ticket #79.
2011-12-11 02:55:29 +00:00
Daniele Varrazzo
ad3a198919 Fixed reference leak with arguments referenced more than once in queries
Plus, some more care in objects life cycle, mostly in exceptions handling.

Closes ticket #81.
2011-12-11 02:52:06 +00:00
Daniele Varrazzo
cdb19a2329 Prepare for Linux 3 2011-11-26 19:08:20 +00:00
Daniele Varrazzo
0fccc10777 Tests in order
Just to know where to put the next one
2011-11-18 00:10:53 +00:00
Daniele Varrazzo
2cf44fdddd Merge branch 'connect-keywords' into devel 2011-11-18 00:05:44 +00:00
Daniele Varrazzo
a6aea38540 Added keywords on connect to news file 2011-11-17 21:51:24 +00:00
Daniele Varrazzo
417203f68e Added test to check connect() with no parameters 2011-11-17 21:51:24 +00:00
Daniele Varrazzo
e18d27c475 Reproducing/documenting odd behaviours of connect() 2011-11-17 21:51:24 +00:00
Daniele Varrazzo
625cc1b402 Escape parameters to the connection strings as required by PQconnectdb 2011-11-17 21:51:24 +00:00
Daniele Varrazzo
99ac79511c Added test module to verify the dsn manipulation 2011-11-17 21:51:24 +00:00
Daniele Varrazzo
d2b67364fd connect() supports generic keyword arguments passed to the dsn 2011-11-17 01:51:25 +00:00
Daniele Varrazzo
4254fb8566 Documentation for the isolation level constants updated
REPEATABLE READ and SERIALIZABLE are no more synonyms since PostgreSQL 9.1,
and in Psycopg values are different since 2.4.2.
2011-11-17 00:41:44 +00:00
Daniele Varrazzo
dc94a3cb2d Check for connection closed before getting the isolation level
Closes ticket #74

Also added test to check regressions in isolation_level,
set_isolation_level, set_session, autocommit.
2011-11-16 23:51:05 +00:00
Daniele Varrazzo
a76d0525d1 Dropped unused variable 2011-11-01 07:42:22 +00:00