summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Added docs about the usability of sql objects with copy_expert()sql-copyDaniele Varrazzo2017-03-163-6/+15
| | | | See issue #529.
* Added test to verify sql objects work with copy_expert()Daniele Varrazzo2017-03-162-2/+26
| | | | | | 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.
* Merge branch 'fix-443'Daniele Varrazzo2017-03-144-27/+89
|\
| * Reported bug #443 fixed *again*fix-443Daniele Varrazzo2017-03-141-1/+10
| | | | | | | | Also see ticket #527.
| * Bunch of test tweaks to make the test grid greenDaniele Varrazzo2017-03-142-12/+14
| |
| * Connection state fixed noted in the newsDaniele Varrazzo2017-03-141-0/+2
| |
| * Always raise OperationalError when connection was closed externally.Greg Ward2017-03-142-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Ward2017-03-142-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 complaintsDaniele Varrazzo2017-03-141-12/+8
|/
* Improved notes to release psycopg packagesDaniele Varrazzo2017-03-131-15/+45
|
* Less stuff in the readme, more in the docsDaniele Varrazzo2017-03-132-13/+18
|
* Bump to next dev releaseDaniele Varrazzo2017-03-131-1/+1
|
* Bump to version 2.7.12_7_1Daniele Varrazzo2017-03-111-1/+1
|
* Report ticket 518 fixedDaniele Varrazzo2017-03-112-8/+13
| | | | | The fix is actually implemented in the openssl1 branch of https://github.com/psycopg/psycopg2-wheels
* correct minor grammatical issue with deprecation warningJon Nelson2017-03-031-1/+1
|
* Dropped "what's new in 2.7.1" from docs indexDaniele Varrazzo2017-03-031-1/+1
|
* Added install section to specify how to skip wheelsDaniele Varrazzo2017-03-031-7/+39
|
* Merge branch 'fix-520'Daniele Varrazzo2017-03-023-2/+3
|\
| * Skip the tests according to the earliest of libpq built/linked.Daniele Varrazzo2017-03-021-1/+1
| |
| * Don't use PG_INT64_TYPEDaniele Varrazzo2017-03-022-1/+2
|/ | | | | | | Only defined in Postgres 9.3 Should close #520, but let's wait for the CI response (build on Windows etc.)
* Merge branch 'no-unittest2'Daniele Varrazzo2017-03-021-8/+1
|\ | | | | | | Close #516
| * Don't try to use unittest2no-unittest2Daniele Varrazzo2017-03-011-8/+1
| | | | | | | | | | Modules importing unittest directly would miss the monkeypatch: see ticket #516.
* | Merge branch 'fix-517'Daniele Varrazzo2017-03-023-0/+14
|\ \ | |/ |/|
| * Ignore None arguments passed to make_dsn()fix-517Daniele Varrazzo2017-03-013-0/+14
|/ | | | Close #517.
* Added docs about making a releaseDaniele Varrazzo2017-03-012-54/+74
| | | | | | Drop previous script which didn't include the CI-generated packages. [skip ci]
* Bump away from 2.7Daniele Varrazzo2017-03-011-1/+1
| | | | [skip ci]
* Merge branch 'fix-512'2_7Daniele Varrazzo2017-03-011-0/+1
|\
| * Skip test on PG version with bad interval roundingfix-512Daniele Varrazzo2017-03-011-0/+1
| | | | | | | | | | | | | | | | | | On these ancient versions: =# select '999999:00:00.1'::interval; interval -------------------------------- 41666 days 15:00:00.0999999046
* | Bump to version 2.7Daniele Varrazzo2017-02-281-2/+2
| | | | | | | | | | | | Refer to pep 440 for version numbering, which superseded pep 386. We are not changing numbering scheme: the version numbers we have used (when we have been consistent) would have been valid in both schemes.
* | Fixed doc typoDaniele Varrazzo2017-02-281-1/+1
| | | | | | | | Close #515
* | Dropped reference to "isolation level autocommit" in docsDaniele Varrazzo2017-02-241-2/+2
| |
* | Dropped compiler warning on WindowsDaniele Varrazzo2017-02-241-1/+1
| |
* | Merge branch 'fix-512'Daniele Varrazzo2017-02-244-34/+108
|\ \ | |/
| * Handle overflow in interval parsingDaniele Varrazzo2017-02-242-2/+32
| |
| * Make sure to use 64 bits in interval parsing accumulatorsDaniele Varrazzo2017-02-241-12/+10
| |
| * Parse interval only using integersDaniele Varrazzo2017-02-242-35/+57
| | | | | | | | | | | | | | | | | | (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.
| * Display Appveyor build status of master branchDaniele Varrazzo2017-02-241-1/+1
| |
| * Try to fix the same problem in windowsDaniele Varrazzo2017-02-242-5/+24
| | | | | | | | | | Previous commit doesn't pass on Windows: it looks like window's floor() has an integer overflow.
| * Fixed integer overflow in interval typecasterDaniele Varrazzo2017-02-243-4/+9
|/ | | | Close #512.
* Fixed link to attribute in newsDaniele Varrazzo2017-02-161-1/+1
|
* Bump version numberDaniele Varrazzo2017-02-161-1/+1
|
* Url to download VC fix file moved to this repos2_7_BETA_2Daniele Varrazzo2017-02-161-1/+1
|
* Bumping to 2.7 beta 2Daniele Varrazzo2017-02-161-1/+1
|
* Merge branch 'test-windows'Daniele Varrazzo2017-02-164-2/+380
|\
| * Download external packages in .zip instead of .tar.gzDaniele Varrazzo2017-02-161-8/+8
| | | | | | | | | | 7z barfs every now and then with tar files (https://ci.appveyor.com/project/psycopg/psycopg2/build/job/oh1ux3ih7baia0uu)
| * Download postgres from github instead of ftp.postgresql.orgtest-windowsDaniele Varrazzo2017-02-161-2/+2
| | | | | | | | | | There may be some misconfigured mirror, download fails randomly, e.g. https://ci.appveyor.com/project/psycopg/psycopg2/build/job/9j792s03tghrb7sr
| * Windows testing tweaks, badge on READMEDaniele Varrazzo2017-02-162-41/+42
| |
| * Added AppVeyor configuration to test building on WindowsDaniele Varrazzo2017-02-163-0/+377
| |
* | Document installation from wheel packagesDaniele Varrazzo2017-02-162-148/+87
|/
* Merge branch 'session-attributes'Daniele Varrazzo2017-02-169-188/+569
|\