Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | | Raise TypeError instead of InterfaceError on bad params on connect() | Daniele Varrazzo | 2012-09-26 | 1 | -6/+6 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeError is the standard Python error raised in this case: $ python -c "(lambda a: None)(b=10)" TypeError: <lambda>() got an unexpected keyword argument 'b' We only used to raise InterfaceError when connect was used without any parameter at all, so it's hard to think a program depending on that design. Furthermore the function has always raised (and still does) OperationalError too, if the bad argument is detected by the libpq, and that cannot be changed because we can't tell the difference from a normal connection error. | |||||
* | | | Dropped quirks in connection arguments handling | Daniele Varrazzo | 2012-09-25 | 1 | -0/+8 | |
|/ / | | | | | | | | | | | | | Now connect() raises an exception instead of swallowing keyword arguments when a connection string is specified as well Closes ticket #131. | |||||
* | | Merge branch 'fix-array-parsing' into devel | Daniele Varrazzo | 2012-09-20 | 1 | -0/+7 | |
|\ \ | |/ |/| | ||||||
| * | Fixed infinite loop when parsing '{' as array | Daniele Varrazzo | 2012-09-20 | 1 | -1/+1 | |
| | | ||||||
| * | Fixed return value after malformed arrays | Daniele Varrazzo | 2012-09-20 | 1 | -0/+7 | |
| | | ||||||
* | | Fixed tests to run with PG 8.3 | Daniele Varrazzo | 2012-09-04 | 1 | -4/+4 | |
|/ | ||||||
* | Added support with cursors without scroll clause | Daniele Varrazzo | 2012-08-15 | 1 | -1/+27 | |
| | | | | | Using nothing is different from NO SCROLL, see DECLARE notes in PG docs. | |||||
* | Added test for scrollable cursor | Daniele Varrazzo | 2012-08-15 | 1 | -0/+39 | |
| | ||||||
* | Fixed tpc_recover() with RealDictStuff | Daniele Varrazzo | 2012-08-14 | 1 | -2/+16 | |
| | | | | Same problem and correction of ticket #114. | |||||
* | Fixed register_hstore and register_composite with non-dbapi objects | Daniele Varrazzo | 2012-08-14 | 1 | -0/+48 | |
| | | | | Closed ticket #114. | |||||
* | Added tests to verify cursor() arguments propagation | Daniele Varrazzo | 2012-04-11 | 1 | -0/+16 | |
| | ||||||
* | Name can be passed as None to cursor() | Daniele Varrazzo | 2012-04-11 | 1 | -0/+4 | |
| | | | | | | | | Makes invocation from subclasses and generic code easier. Code simplified by using default values for keyword arguments and avoiding needless conversions back and forth between Python and C strings. Also added connection type check to cursor's init. | |||||
* | Merge branch 'close-idempotent' into devel | Daniele Varrazzo | 2012-03-05 | 3 | -1/+15 | |
|\ | ||||||
| * | close() methods don't raise errors if called on closed objects | Daniele Varrazzo | 2012-03-04 | 2 | -0/+12 | |
| | | ||||||
| * | Dropped test about close() on closed connection raising an exception | Daniele Varrazzo | 2012-03-04 | 1 | -1/+3 | |
| | | | | | | | | | | | | This seems unnecessary and has caused problems to a few. The DB-SIG seems agreeing on the change: http://mail.python.org/pipermail/db-sig/2011-October/005811.html | |||||
* | | Update all links to PostgreSQL docs to the current version. | Marti Raudsepp | 2012-02-28 | 1 | -2/+2 | |
|/ | | | | I also checked all links and anchors to make sure they're still valid. | |||||
* | Check/set connection status at commit inside the critical section | Daniele Varrazzo | 2012-02-24 | 1 | -0/+29 | |
| | | | | | | Failing to do so was causing the issue reported in ticket #103. The issue as reported was fixed when SET ISOLATION LEVEL was dropped, but the real problem wasn't fixed. | |||||
* | Added support for inet array | Daniele Varrazzo | 2012-02-23 | 1 | -0/+9 | |
| | ||||||
* | Fixed inet test that wasn't testing anything | Daniele Varrazzo | 2012-02-23 | 1 | -2/+2 | |
| | ||||||
* | Fixed exception testing on Python 3 | Daniele Varrazzo | 2012-02-23 | 1 | -4/+6 | |
| | | | | | ...and so caught exceptions are local to the except suite in Py3. (Lo sapevate? Sapevatelo!) | |||||
* | Fixed NamedTupleCursor rownumber during iteration. | Daniele Varrazzo | 2012-02-23 | 1 | -1/+30 | |
| | | | | | | | 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. | |||||
* | Fixed rownumber for cursor subclasses during iterations | Daniele Varrazzo | 2012-02-23 | 1 | -0/+28 | |
| | | | | | | | 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. | |||||
* | Added test to check rowcount behaves fine during named cursor iteration | Daniele Varrazzo | 2012-02-23 | 1 | -0/+11 | |
| | | | | | | 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. | |||||
* | Test methods reordered to improve readability | Daniele Varrazzo | 2012-02-23 | 1 | -27/+29 | |
| | ||||||
* | Cache FixedOffsetTimezone instances | Menno Smits | 2012-01-30 | 1 | -0/+7 | |
| | | | | | | | 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. | |||||
* | Fixed repr for FixedOffsetTimezone for offsets west of UTC (negative) | Menno Smits | 2012-01-30 | 1 | -1/+20 | |
| | | | | | | | | 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. | |||||
* | Renamed shadowed test method | Menno Smits | 2012-01-29 | 1 | -1/+1 | |
| | ||||||
* | Make Error and subclasses picklable | Daniele Varrazzo | 2012-01-14 | 1 | -1/+34 | |
| | | | | | Useful for multiprocessing interaction. Closes ticket #90. | |||||
* | Dropped duplicate import | Daniele Varrazzo | 2012-01-14 | 1 | -2/+1 | |
| | ||||||
* | Added tests to verify ticket #84 | Daniele Varrazzo | 2012-01-10 | 1 | -0/+24 | |
| | | | | fetchmany() with no arg is broken in cursor subclasses. | |||||
* | Force GC during weakref tests | Daniele Varrazzo | 2011-12-26 | 2 | -0/+4 | |
| | | | | | Required to run the tests under PyPy with no refcount. See https://github.com/mvantellingen/psycopg2-ctypes/pull/15#issuecomment-3274618 | |||||
* | Added tests for cursor scroll | Daniele Varrazzo | 2011-12-26 | 1 | -0/+49 | |
| | ||||||
* | 'register_composite()' also works with tables | Daniele Varrazzo | 2011-12-15 | 1 | -0/+45 | |
| | | | | Skip dropped and hidden columns when inspecting the schema. | |||||
* | Fixed error in schema mismatch in composite caster | Daniele Varrazzo | 2011-12-15 | 1 | -0/+10 | |
| | ||||||
* | Put back a distinct ISOLATION_LEVEL_READ_UNCOMMITTED value | Daniele Varrazzo | 2011-12-15 | 1 | -4/+9 | |
| | ||||||
* | Reverted isolation level values to backward compatible values | Federico Di Gregorio | 2011-12-15 | 1 | -9/+4 | |
| | | | | | | | | 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 | |||||
* | Named DictCursor/RealDictCursor honour itersize | Daniele Varrazzo | 2011-12-11 | 1 | -0/+25 | |
| | | | | Closes ticket #80. | |||||
* | Fixed reference leak with arguments referenced more than once in queries | Daniele Varrazzo | 2011-12-11 | 1 | -0/+12 | |
| | | | | | | Plus, some more care in objects life cycle, mostly in exceptions handling. Closes ticket #81. | |||||
* | Tests in order | Daniele Varrazzo | 2011-11-18 | 1 | -23/+22 | |
| | | | | Just to know where to put the next one | |||||
* | Added test to check connect() with no parameters | Daniele Varrazzo | 2011-11-17 | 1 | -0/+7 | |
| | ||||||
* | Escape parameters to the connection strings as required by PQconnectdb | Daniele Varrazzo | 2011-11-17 | 1 | -0/+20 | |
| | ||||||
* | Added test module to verify the dsn manipulation | Daniele Varrazzo | 2011-11-17 | 2 | -0/+109 | |
| | ||||||
* | Check for connection closed before getting the isolation level | Daniele Varrazzo | 2011-11-16 | 1 | -0/+29 | |
| | | | | | | | Closes ticket #74 Also added test to check regressions in isolation_level, set_isolation_level, set_session, autocommit. | |||||
* | Work around mxDateTime 3.2.0 segfault in tests | Daniele Varrazzo | 2011-11-01 | 1 | -6/+6 | |
| | ||||||
* | Unregister the composite array caster after the test | Daniele Varrazzo | 2011-10-19 | 1 | -1/+6 | |
| | | | | Otherwise the refcount script will report a leak. | |||||
* | Test suite fixed to make it compatible with the ctypes implementation | Daniele Varrazzo | 2011-10-19 | 1 | -6/+9 | |
| | ||||||
* | All unit test modules have a test_ prefix | Daniele Varrazzo | 2011-10-19 | 6 | -10/+10 | |
| | | | | Both for consistency and for test discovery. | |||||
* | Test and document the named cursor stealing technique | Daniele Varrazzo | 2011-10-14 | 1 | -0/+14 | |
| | ||||||
* | Skip test on array of records on PG 8.3 | Daniele Varrazzo | 2011-10-05 | 1 | -1/+1 | |
| | ||||||
* | Fixed tests to run with antebellum Postgres versions | Daniele Varrazzo | 2011-10-05 | 2 | -7/+16 | |
| |