Daniele Varrazzo
1d7e6afcf0
Ticket #100 closed
...
Note that rownumber is still broken for named cursors: it is reset to zero
when each itersize block is fetched.
2012-02-23 23:04:54 +00:00
Daniele Varrazzo
b8597dc1d3
Fixed NamedTupleCursor rownumber during iteration.
...
The correction is similar to the other one for the other subclasses.
Also added tests for rowcount and rownumber during different fetch styles.
Just in case.
2012-02-23 22:58:58 +00:00
Daniele Varrazzo
ebec522a07
Fixed rownumber for cursor subclasses during iterations
...
Regression introduced to fix ticket #80 . Don't use fetchmany to get the
chunks of values. I did it that way because I was ending up into infinite
recursion calling __iter__ from __iter__: the solution has been the
"while 1: yield next()" idiom.
2012-02-23 22:55:13 +00:00
Daniele Varrazzo
7221ea9ec5
Added test to check rowcount behaves fine during named cursor iteration
...
Actually *it doesn't*: once we iterate the first itersize records, rowcount
is reset to zero. If we want to fix it we need an extra member in the
cursor.
2012-02-23 22:04:22 +00:00
Daniele Varrazzo
71d1690870
Test methods reordered to improve readability
2012-02-23 21:27:45 +00:00
Daniele Varrazzo
3b36100ec1
Dropped hardcoded list of exceptions in init functions
...
Use the already available exctable array.
This stops the gcc-python-plugin complaining about access to potentially
uninitialized memory.
2012-02-23 20:09:28 +00:00
Daniele Varrazzo
09be4dc5d1
Fixed potential failures while setting exceptions attributes
2012-02-23 19:48:46 +00:00
Daniele Varrazzo
7d67ecbed3
Fixed potential NULL incref
2012-02-23 19:47:36 +00:00
Daniele Varrazzo
1b27820389
Fixed refcount of exceptions dicts
2012-02-23 19:36:30 +00:00
Daniele Varrazzo
08fbd86495
Check errors in module typecasters init
2012-02-23 19:20:51 +00:00
Daniele Varrazzo
ff61cf25b6
Fixed refcount of None if namedtuples are not available
2012-02-23 18:50:06 +00:00
Daniele Varrazzo
026899e0c1
Check errors when populating encodings map
2012-02-23 18:50:06 +00:00
Daniele Varrazzo
dca6cffd6e
Dropped custom array parsing for UUID[]
...
Use the C generic array parsing exposed by new_array_type().
2012-02-23 14:41:55 +00:00
Daniele Varrazzo
f782470d71
Parens don't need escaping in regexp char classes
2012-02-23 14:41:51 +00:00
Daniele Varrazzo
1332d4a0d8
Fixed never raised exception in composite parsing
2012-02-23 14:41:46 +00:00
Daniele Varrazzo
4e1d96082a
Typos fixed in copy methods
2012-02-23 14:41:41 +00:00
Nate Eagleson
1bc73896dc
Clean up comments in setup.cfg
2012-02-22 11:59:48 +00:00
Nate Eagleson
f3f3dbbca9
Fix typos in the INSTALL document
...
Also remove a bit of extraneous whitespace.
2012-02-22 11:59:48 +00:00
Daniele Varrazzo
91388d2c51
Cite Menno's TZ improvements into news file
2012-01-30 13:32:58 +00:00
Menno Smits
bca7200b3f
Cache FixedOffsetTimezone instances
...
Avoid creating new a new FixedOffsetTimezone instance if one with the
same offset and name has been created before. This will save memory
when returning many rows containing "timestamp with timezone" columns,
and also improves comparability.
2012-01-30 13:27:40 +00:00
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
Giovanni Mascellani
8ec9b0f3d9
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 11:12:06 +01: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
0bc49147d1
Merge branch 'devel'
2011-12-19 11:30:20 +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