Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Merge branch 'fix-558' | Daniele Varrazzo | 2017-06-16 | 1 | -0/+21 | |
|\ | ||||||
| * | Consider redshift interval supported after further tests | Daniele Varrazzo | 2017-06-16 | 1 | -1/+3 | |
| | | ||||||
| * | Parse a number as microseconds when casting intervalbug-558 | Daniele Varrazzo | 2017-06-16 | 1 | -0/+19 | |
| | | | | | | | | | | | | Should close #558, but I'm curious to know if a number is returned for interval < 1 day too (which wouldn't trigger the overflow, but will finish parsing with part=0). | |||||
* | | Added Json.prepare()fix-562 | Daniele Varrazzo | 2017-06-16 | 1 | -0/+18 | |
|/ | | | | Close #562 | |||||
* | Don't force a valid return code for the test | Daniele Varrazzo | 2017-06-15 | 1 | -1/+1 | |
| | | | | Windows returns 22, Linux returns 1 | |||||
* | Added test to reproduce bug #551 | Daniele Varrazzo | 2017-06-15 | 1 | -1/+57 | |
| | ||||||
* | Merge branch 'fix-547' | Daniele Varrazzo | 2017-04-19 | 1 | -0/+23 | |
|\ | ||||||
| * | Fixed args parsing in ReplicationCursor.consume_stream() | Daniele Varrazzo | 2017-04-19 | 1 | -0/+23 | |
| | | | | | | | | Close #547. | |||||
* | | Merge remote-tracking branch 'fix_lobject_factory' | Daniele Varrazzo | 2017-04-19 | 1 | -0/+7 | |
|\ \ | ||||||
| * | | Python < 3.2 doesn’t have assertIsInstance | Frazer McLean | 2017-04-16 | 1 | -1/+1 | |
| | | | ||||||
| * | | Fix name of lobject keyword argument | Frazer McLean | 2017-04-16 | 1 | -0/+7 | |
| |/ | ||||||
* | | Handle lobject mode=None correctly | Frazer McLean | 2017-04-16 | 1 | -0/+7 | |
|/ | ||||||
* | Added test to verify callback errors in named cursors | Daniele Varrazzo | 2017-04-05 | 1 | -0/+17 | |
| | | | | They work fine. | |||||
* | Added test to verify #410 | Daniele Varrazzo | 2017-04-05 | 1 | -0/+68 | |
| | | | | The 'unknown error' happens on query. | |||||
* | Return objects with timezone parsing infinity timestamptz | Daniele Varrazzo | 2017-03-22 | 1 | -0/+19 | |
| | | | | Close #536. | |||||
* | Merge branch 'fix-528' | Daniele Varrazzo | 2017-03-16 | 1 | -0/+37 | |
|\ | ||||||
| * | Obscure the password on url dsn too | Daniele Varrazzo | 2017-03-16 | 1 | -7/+4 | |
| | | | | | | | | | | | | Note that we don't leak anymore the password length. Fix #528 | |||||
| * | Added tests to verify the password is obscured | Daniele Varrazzo | 2017-03-15 | 1 | -0/+40 | |
| | | | | | | | | The url test fails: see issue #528 | |||||
* | | Added test to verify sql objects work with copy_expert() | Daniele Varrazzo | 2017-03-16 | 1 | -1/+25 | |
|/ | | | | | | I'll be honest: I lucked out, I didn't think about this combination. But maybe sheer luck, maybe using common code paths, it just works. Let's make it stays so. | |||||
* | Bunch of test tweaks to make the test grid green | Daniele Varrazzo | 2017-03-14 | 2 | -12/+14 | |
| | ||||||
* | Always raise OperationalError when connection was closed externally. | Greg Ward | 2017-03-14 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | From the DB-API (https://www.python.org/dev/peps/pep-0249/): OperationalError Exception raised for errors that are related to the database's operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, [...] Additionally, psycopg2 was inconsistent, at least in the async case: depending on how the "connection closed" error was reported from the kernel to libpq, it would sometimes raise OperationalError and sometimes DatabaseError. Now it always raises OperationalError. | |||||
* | Always detect when a connection is closed behind psycopg2's back. | Greg Ward | 2017-03-14 | 1 | -0/+45 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a race condition that only seems to happen over Unix-domain sockets. Sometimes, the closed socket is reported by the kernel to libpq like this (captured with strace): sendto(3, "Q\0\0\0\34select pg_backend_pid()\0", 29, MSG_NOSIGNAL, NULL, 0) = 29 recvfrom(3, "E\0\0\0mSFATAL\0C57P01\0Mterminating "..., 16384, 0, NULL, NULL) = 110 recvfrom(3, 0x12d0330, 16384, 0, 0, 0) = -1 ECONNRESET (Connection reset by peer) That is, psycopg2/libpq sees no error when sending the first query after the connection is closed, but gets an error reading the result. In that case, everything worked fine. But sometimes, the error manifests like this: sendto(3, "Q\0\0\0\34select pg_backend_pid()\0", 29, MSG_NOSIGNAL, NULL, 0) = -1 EPIPE (Broken pipe) recvfrom(3, "E\0\0\0mSFATAL\0C57P01\0Mterminating "..., 16384, 0, NULL, NULL) = 110 recvfrom(3, "", 16274, 0, NULL, NULL) = 0 recvfrom(3, "", 16274, 0, NULL, NULL) = 0 i.e. libpq received an error when sending the query. This manifests as a slightly different exception from a slightly different place. More importantly, in this case connection.closed is left at 0 rather than being set to 2, and that is the bug I'm fixing here. Note that we see almost identical behaviour for sync and async connections, and the fixes are the same. So I added extremely similar test cases. Finally, there is still a bug here: for async connections, we sometimes raise DatabaseError (incorrect) and sometimes raise OperationalError (correct). Will fix that next. | |||||
* | Flake8 complaints | Daniele Varrazzo | 2017-03-14 | 1 | -12/+8 | |
| | ||||||
* | Skip the tests according to the earliest of libpq built/linked. | Daniele Varrazzo | 2017-03-02 | 1 | -1/+1 | |
| | ||||||
* | Merge branch 'no-unittest2' | Daniele Varrazzo | 2017-03-02 | 1 | -8/+1 | |
|\ | | | | | | | Close #516 | |||||
| * | Don't try to use unittest2no-unittest2 | Daniele Varrazzo | 2017-03-01 | 1 | -8/+1 | |
| | | | | | | | | | | Modules importing unittest directly would miss the monkeypatch: see ticket #516. | |||||
* | | Ignore None arguments passed to make_dsn()fix-517 | Daniele Varrazzo | 2017-03-01 | 1 | -0/+4 | |
|/ | | | | Close #517. | |||||
* | Skip test on PG version with bad interval roundingfix-512 | Daniele Varrazzo | 2017-03-01 | 1 | -0/+1 | |
| | | | | | | | | | On these ancient versions: =# select '999999:00:00.1'::interval; interval -------------------------------- 41666 days 15:00:00.0999999046 | |||||
* | Handle overflow in interval parsing | Daniele Varrazzo | 2017-02-24 | 1 | -0/+18 | |
| | ||||||
* | Parse interval only using integers | Daniele Varrazzo | 2017-02-24 | 1 | -4/+21 | |
| | | | | | | | | | (almost... except for micros rounding) While this is probably an improvement on the previous implementation, I am largely waving a dead chicken at windows, which keeps failing to pass the seconds overflow test. If it doesn't pass now either I'll start blaming Python's timedelta. | |||||
* | Try to fix the same problem in windows | Daniele Varrazzo | 2017-02-24 | 1 | -1/+20 | |
| | | | | | Previous commit doesn't pass on Windows: it looks like window's floor() has an integer overflow. | |||||
* | Fixed integer overflow in interval typecaster | Daniele Varrazzo | 2017-02-24 | 1 | -0/+4 | |
| | | | | Close #512. | |||||
* | Added readonly and deferrable attributes | Daniele Varrazzo | 2017-02-16 | 3 | -25/+123 | |
| | ||||||
* | Revert pre-2.7b1 behaviour of silent rollback on conn.set_isolation_level() | Daniele Varrazzo | 2017-02-16 | 1 | -6/+26 | |
| | | | | Legacy method is legacy. | |||||
* | connection.isolation_level is now writable | Daniele Varrazzo | 2017-02-16 | 1 | -78/+179 | |
| | ||||||
* | Don't convert '{}'::unknown into an empty list | Daniele Varrazzo | 2017-02-08 | 1 | -4/+6 | |
| | | | | Close #506. | |||||
* | Use pydll to poke into extension library | Daniele Varrazzo | 2017-02-07 | 1 | -1/+1 | |
| | | | | | | Causes an error in Py 3.6 in debug mode. Close #505 | |||||
* | Merge branch 'no-set-default-session' | Daniele Varrazzo | 2017-02-07 | 1 | -53/+54 | |
|\ | ||||||
| * | Set default_transaction_* GUC if session state is changed in autocomit | Daniele Varrazzo | 2017-02-04 | 1 | -24/+25 | |
| | | ||||||
| * | Exposing ISOLATION_LEVEL_DEFAULT to Python | Daniele Varrazzo | 2017-02-04 | 1 | -1/+1 | |
| | | | | | | | | | | This is now the state that is returned to Python if nothing has been explicitly set. | |||||
| * | Test looking the transactions characteristics instead of the default | Daniele Varrazzo | 2017-02-04 | 1 | -28/+28 | |
| | | | | | | | | | | | | So we test the effect, not the implementation. Tests pass on master too this way, three tests fail in this branch, related to autocommit (sort-of-obviously). | |||||
* | | Skipped a couple of tests failing on old dbstest-dinosaurs | Daniele Varrazzo | 2017-02-06 | 2 | -0/+2 | |
| | | | | | | | | I don't even know why - worth investigating. | |||||
* | | Skip tests with server not supporting NULL in array | Daniele Varrazzo | 2017-02-06 | 1 | -3/+6 | |
| | | ||||||
* | | Don't test with server not implementing INSERT with VALUES list | Daniele Varrazzo | 2017-02-06 | 1 | -4/+8 | |
| | | ||||||
* | | Deal consistently with E'' quotes in tests | Daniele Varrazzo | 2017-02-06 | 5 | -41/+41 | |
| | | ||||||
* | | Work around a race condition in async cancel test | Daniele Varrazzo | 2017-02-06 | 2 | -3/+10 | |
| | | ||||||
* | | assertDsnEqual moved as TestSuite method | Daniele Varrazzo | 2017-02-06 | 4 | -22/+25 | |
| | | ||||||
* | | Merge branch 'conform-subclass-adapter' | Daniele Varrazzo | 2017-02-05 | 1 | -0/+13 | |
|\ \ | ||||||
| * | | Give precedence to '__conform__()' over superclasses choosing adapter | Daniele Varrazzo | 2017-02-05 | 1 | -0/+13 | |
| |/ | | | | | | | Close #456 | |||||
* | | Slower timeout for a test that sometimes fail | Daniele Varrazzo | 2017-02-05 | 1 | -1/+1 | |
|/ | | | | | At least it should fail with an error after 2 seconds, not waiting for Travis timeout of 10 minutes. |