Commit Graph

1789 Commits

Author SHA1 Message Date
Udi Oron
cf83470891 Suggest installing psycopg2 in windows using pip
pip is becoming the standard method for installing python packages, and now binary wheels are a better and easier option for users:
https://github.com/psycopg/psycopg2/issues/368
2015-11-10 00:35:02 +02:00
Oleksandr Shulgin
fe4cb0d493 Fix stale Dprintfs in pqpath.c referring to 'status' 2015-10-26 17:40:39 +01:00
Daniele Varrazzo
6763578cc0 Merge branch 'extensions-quote-ident' 2015-10-15 11:08:34 +01:00
Daniele Varrazzo
109409bc95 Mention quote_ident() in NEWS file 2015-10-15 11:06:44 +01:00
Oleksandr Shulgin
89bb6b0711 Proper unicode handling in quote_ident. 2015-10-15 11:52:18 +02:00
Oleksandr Shulgin
9295bce154 Add psycopg2.extensions.quote_ident. 2015-10-14 17:00:25 +02:00
Daniele Varrazzo
c73c1c5771 Decref the ssl module after importing 2015-10-01 17:04:29 +01:00
Daniele Varrazzo
f635547ec6 The wait_select callback can cancel a query using Ctrl-C
Fixes #333.
2015-10-01 15:26:13 +01:00
Daniele Varrazzo
9e6c3322d8 Fixed PersistentConnectionPool on Python 3
Fixes ticket #348.
2015-10-01 14:44:14 +01:00
ClodoaldoPinto
98f2aad4ba Typo correction 2015-10-01 14:31:31 +01:00
Daniele Varrazzo
ade7dba27c MSVC 2015 compiler support added to news file 2015-10-01 14:30:17 +01:00
Daniele Varrazzo
7e94ce1f14 Drop spurious notices in test
Getting some "rehashing catalog" debug messages in PG 9.4
2015-10-01 13:31:13 +01:00
Daniele Varrazzo
14246a5689 Merge branch 'parse-dsn' 2015-10-01 13:29:10 +01:00
Daniele Varrazzo
58918801d6 Added parse_dsn() to news file 2015-10-01 13:26:11 +01:00
Daniele Varrazzo
5afeee3613 Added unicode support to parse_dsn
Also added support for the argument as a keyword.
2015-10-01 13:20:11 +01:00
Daniele Varrazzo
71d96293ab Fixed parse_dsn tests on Python 3
On Python 3 there is no Exception.message attribute.
2015-10-01 12:03:00 +01:00
Daniele Varrazzo
d3bbd19ccb Separate parse_dsn test in a test case of their own 2015-10-01 11:52:42 +01:00
Daniele Varrazzo
d1af12187c Merge branch 'master' into parse-dsn 2015-10-01 11:39:51 +01:00
Daniele Varrazzo
6803341f21 Report NotSupportedError for PGRES_COPY_BOTH and PGRES_SINGLE_TUPLE
Fixes #352.
2015-09-30 12:28:07 +01:00
Daniele Varrazzo
0e3f5214c5 Report the server response status on errors with no message
Suggested by Craig Ringer in pull request #353, should also give more
information for other cases we were reported on flaky servers (AWS,
digital ocean...), see bug #281.
2015-09-30 12:28:07 +01:00
Federico Di Gregorio
4e92322d74 Merge pull request #350 from Photonios/master
Fixes for MSVC 2015 (Python 3.5)
2015-09-23 11:50:25 +02:00
Photonios
71925fcc00 Fix for MSVC 2015: round has been added to this version 2015-09-22 18:26:14 +02:00
Photonios
ac25ba0a3f Fix for MSVC 2015: isnan is supported in this version 2015-09-22 18:25:53 +02:00
Daniele Varrazzo
925fdf5731 Fixed doc about libpq version availability 2015-06-02 17:11:09 +01:00
btubbs
06b4b1de94 Notify example should pop the oldest message in conn.notifies, not the newest. 2015-06-02 17:07:10 +01:00
Daniele Varrazzo
6002c524d6 Merge branch 'notice-lists-replaceable' 2015-06-02 17:04:25 +01:00
Daniele Varrazzo
1f330e9cac Allow connection.notices and notifies to be replaced.
Close #326
2015-06-02 17:02:04 +01:00
Daniele Varrazzo
2ad82b973b Pending notice list converted into a forward list
This allows inserting the elements in order without using list.insert().
2015-06-02 14:25:46 +01:00
Daniele Varrazzo
b326a27774 Dropped unneeded constness on the notice message
That's a strdup result, we 0wn it.
2015-06-02 14:24:48 +01:00
Daniele Varrazzo
0a7261268b Dropped unused notice_filter connection member 2015-06-02 13:11:46 +01:00
Oleksandr Shulgin
d6041271bc Separate parse_dsn test on URI, for libpq >= 9.2 2015-06-02 14:02:29 +02:00
Pete Hollobon
5712f30169 Change "non desiderable" to "undesirable" in docs
"desiderable" is considered obsolete
2015-06-02 13:00:25 +01:00
Daniele Varrazzo
7e5715617e Merge branch 'adapt-list-of-none' 2015-06-02 12:49:15 +01:00
Daniele Varrazzo
b0058c0cc8 Fixed adaptation of lists of None
Note: lists of lists of None are not supported yet.
2015-06-02 12:48:24 +01:00
Oleksandr Shulgin
cc08e14162 Merge branch 'master' into feature/parse-dsn
Conflicts:
	lib/extensions.py
2015-06-02 12:42:03 +02:00
Daniele Varrazzo
8d4ac25b56 Merge branch 'libpq-version' 2015-06-02 11:20:28 +01:00
Daniele Varrazzo
c2955fb8fc Version function/constant docs improved 2015-06-02 11:20:02 +01:00
Daniele Varrazzo
5a21da43ee Mention libpq version inspection in news file 2015-06-02 11:19:55 +01:00
Daniele Varrazzo
73d17e3c5e Dropped PG_VERSION_HEX constant
At PostgreSQL 10.0 it would have become awkward.
2015-06-02 10:54:08 +01:00
Oleksandr Shulgin
ffd98a82c0 Add test for libpq_version 2015-06-02 11:12:16 +02:00
Oleksandr Shulgin
4bb6f9cef2 Add libpq version discovery 2015-06-01 18:05:11 +02:00
Oleksandr Shulgin
3200cd77bf One more parse_dsn test for unquoted space 2015-06-01 15:18:03 +02:00
Oleksandr Shulgin
6a2f21aa14 Move parse_dsn to extensions, add tests 2015-06-01 15:11:12 +02:00
Oleksandr Shulgin
6c57e4a648 Add parse_dsn module function
Calls PQconninfoParse to parse the dsn into a list of keyword and value
structs, then constructs a dictionary from that.  Can be useful when one
needs to alter some part of the the connection string reliably, but
doesn't want to get into all the details of parsing a dsn string:
quoting, URL format, etc.
2015-06-01 10:16:07 +02:00
Daniele Varrazzo
d66165232e OpenSSL deadlock fix noted in NEWSfile 2015-05-03 12:27:37 +01:00
Jan Urbański
a59704cf93 Make sure libcrypto threadsafety callbacks are properly set up
Multithreaded programs using libcrypto (part of OpenSSL) need to set up
callbacks to ensure safe execution. Both Python and libpq set up those
callbacks, which might lead to a conflict.

To avoid leaving dangling function pointers when being unloaded, libpq sets up
and removes the callbacks every time a SSL connection it opened and closed. If
another Python thread is performing unrelated SSL operations (like connecting
to a HTTPS server), this might lead to deadlocks, as described in
http://www.postgresql.org/message-id/871tlzrlkq.fsf@wulczer.org

Even if the problem will be remediated in libpq, it's still useful to have it
fixed in psycopg2. The solution is to use Python's own libcrypto callbacks and
completely disable handling them in libpq.
2015-05-03 12:27:36 +01:00
Daniele Varrazzo
1b7e3c6da4 Improve docs about connection's with only closing the transaction 2015-05-03 12:01:06 +01:00
Daniele Varrazzo
ad3e91a56f Unlock the connection after PQflush error
Apparently this has never happened... anyway the code path was wrong.

Fixes #294.
2015-05-03 12:01:05 +01:00
Daniele Varrazzo
4078b89521 Added makefile target to upload docs 2015-05-03 10:30:33 +01:00
Daniele Varrazzo
1d006ccbe9 Added note about table names to be escaped in copy_*() methods. 2015-05-03 10:30:28 +01:00