Daniele Varrazzo
f6229a3d52
Dropped GPL license from source
...
It doesn't apply: leaving the LGPL only.
2014-05-20 18:23:17 +01:00
Jason Erickson
6933b3bece
Skip test_cleanup_on_badconn_close on Windows
...
The Windows server version of PostgreSQL uses a function called pgkill in the
file kill.c in place of the UNIX kill function. This pgkill function
simulates some of the SIGHUP like commands by passing signals through a named
pipe. Because it is passing the signal through a pipe, the server doesn't get
the kill signal immediately and therefore fails the test on
test_connection.ConnectionTests.test_cleanup_on_badconn_close.
Ideally, the test should check to see if the server is running on Windows, not
the psycopg.
2014-05-18 20:58:50 -06:00
Jason Erickson
9bee072085
Added select.select timeout on AsyncTests.wait
...
On Windows, the select.select() hangs/waits forever on the
test_async_connection_error_message() test. Adding a 10 second timeout
allows the tests to continue.
2014-05-18 20:58:23 -06:00
Daniele Varrazzo
40c1eea15d
Bump up version for release 2.5.3
2014-05-13 16:20:39 +01:00
Daniele Varrazzo
12d114c731
Python 3.4 declared supported
2014-05-13 14:36:41 +01:00
Daniele Varrazzo
3b7f57b6d8
Parse the rowcount as long
2014-05-13 14:18:46 +01:00
Daniele Varrazzo
06f64fbe70
Skip rowcount on copy test on postgres < 8.2
...
It looks like the server doesn't send the message.
2014-05-13 14:18:40 +01:00
Daniele Varrazzo
e9335b08f8
Copy operations correctly set the cursor.rowcount attribute
...
Fixes ticket #180 .
2014-05-05 23:52:41 +01:00
Daniele Varrazzo
26e7f1d71d
set_session() params documented in a more Python-friendly way
2014-05-05 23:06:32 +01:00
Daniele Varrazzo
5a660b80f5
Fixed explicit connection.cursor(cursor_factory=None)
...
Fixes issue #210 .
2014-04-30 17:56:09 +01:00
Daniele Varrazzo
e3ecae75a0
Merge branch 'connection-closed' into maint_2_5
...
NEWS for released 2.5.3 reordered.
2014-04-05 16:10:32 +01:00
Daniele Varrazzo
75b98b561b
Don't specify 0 or 1 in closed docs
...
There's also 2 which means broken. But I prefer to leave that as
implementation detail.
2014-04-05 15:54:31 +01:00
Daniele Varrazzo
12c2fafa86
Close the connection if discovered bad on poll()
2014-04-05 15:52:41 +01:00
Daniele Varrazzo
e5ab0b3987
Check the connection is really bad on exception before closing it
...
We end up here without a pgres sometimes (e.g. from lobject errors)
2014-04-05 15:51:39 +01:00
Daniele Varrazzo
f0c38f0b37
Fixed attempt of closing an already closed lobject on dealloc
...
This results in a "null without exception set" in the corrent state, which
is caused by the connection being unexpectedly closed anyway.
2014-04-05 15:51:33 +01:00
Daniele Varrazzo
221d0d66de
Don't set an exception witout GIL closing lobjects with a bad conn
...
We ended up in this branch only for an excessively aggressive closing
of the transaction that now I'm going to fix.
2014-04-05 15:51:25 +01:00
Daniele Varrazzo
a201307185
Avoid printing the typecast name in debug statement
...
The way we were doing it is unsafe and causes assertion failures on Py3.
Fixes ticket #188
2014-04-04 19:26:35 +01:00
Daniele Varrazzo
cefef286a6
Fixed use of Python object with refcount 0 in cursor_init
...
Caused segfault running test_cursor.CursorTests.test_invalid_name under
Python 3.4 built in debug mode.
2014-04-04 19:26:34 +01:00
Daniele Varrazzo
df7018a5d4
Work around pip issue #1630 breaking 'pip -e git+url'
...
https://github.com/pypa/pip/issues/1630
Fixes ticket #18 (opened in 2010!)
2014-04-04 17:57:35 +01:00
Daniele Varrazzo
ba71c05860
Clarify in the docs that mogrify() and query always return bytes
2014-04-03 02:46:13 +01:00
Daniele Varrazzo
25ae646dcf
Fixed bug number typo in NEWS file
2014-04-03 02:45:22 +01:00
Daniele Varrazzo
2245b56dc1
Fixed overflow opening a lobject with an oid not fitting in a signed int
...
Fixes 🎫 `203`.
2014-04-03 02:35:46 +01:00
Daniele Varrazzo
a516517a23
Dropped unneeded pass in test
2014-04-03 02:31:55 +01:00
Daniele Varrazzo
1d786d0380
Explicit the fact that closed connections have undefined status
2014-04-03 02:07:57 +01:00
Daniele Varrazzo
65fbe9159a
Fixed dsn and closed attributes in failing connection subclasses.
...
From ticket #192 discussion.
2014-04-03 01:41:19 +01:00
Erwin de Keijzer
e2bb7ff8da
Fixed DNS typo in examples
2014-03-25 14:29:36 +00:00
Daniele Varrazzo
d1e1243ba8
Close a connection if PQexec returned NULL
...
This happens for Socket connections, not for TCP ones, where a result
containing an error is returned and correctly handled by pq_raise()
Closes ticket #196 but not #192 : poll() still doesn't change the
connection closed.
2014-03-06 18:17:32 +00:00
Daniele Varrazzo
f597c36f42
Allow get_transaction_status on closed connections
...
It's a local operation and the libpq functions has a NULL guard.
2014-03-06 18:02:08 +00:00
Daniele Varrazzo
d6da4ed09f
Don't segfault on uninitialized cursor
...
It can happen with bad cursor subclasses not calling super's init. Raise
an exception instead of segfaulting.
Closes #195
2014-02-26 19:42:29 +00:00
Daniele Varrazzo
69b2fa282c
Use the do-while 0 idiom for cursor guards macro
2014-02-26 19:42:28 +00:00
Daniele Varrazzo
a13c72cf32
Merge branch 'ticket-194' into maint_2_5
2014-02-24 15:19:02 +00:00
Daniele Varrazzo
e840e00278
Bug #194 confirmed fixed: newsfile updated.
2014-02-24 15:15:54 +00:00
Daniele Varrazzo
98ea06d8b4
Set the connection async before polling for connection
...
It should fix ticket #194
2014-02-24 12:12:16 +00:00
Daniele Varrazzo
a8ef13620a
Set the connection async earlier in green mode
...
The moment it is called shouldn't have really changed, but it's more
explicit when it happens. Previously it was sort of obfuscated behind a
roundtrip through the green callback and poll.
2014-02-24 11:59:07 +00:00
Daniele Varrazzo
211e949741
Merge branch 'range_sort' into maint_2_5
2014-02-22 23:08:39 +00:00
Daniele Varrazzo
0e86fc164f
Mention Range order in the news file
2014-02-22 23:06:03 +00:00
Daniele Varrazzo
d43e23ddc6
Docs wordsmithing about Range order
2014-02-22 23:06:03 +00:00
Daniele Varrazzo
6c27cdd20e
Hardcode the list of attributes to be used in comparison
...
Comparing Range subclasses may lead to surprises.
2014-02-22 23:06:02 +00:00
Daniele Varrazzo
c10c1186a5
Added implementation for Range gt and ge operators
...
Using a common implementation for all the operators. Note that lt is the
one used by sort so it's nice it's the fastest.
2014-02-22 23:06:02 +00:00
Chris Withers
5624ad4ec5
documentation changes now that Range objects can be ordered
2014-02-22 23:06:02 +00:00
Chris Withers
1487800b6d
New implementation of Range sorting that works for Python 2.5 to 3.3, at least.
2014-02-22 23:06:02 +00:00
Chris Withers
ca1845477d
Coding style changes.
2014-02-22 23:06:02 +00:00
Chris Withers
f739576f0a
Provide a stable and consistent sort order for Range objects.
...
This matches postgres server-side behaviour and helps client applications that need to sort based on the primary key of tables where the primary key is or contains a range.
2014-02-22 23:06:02 +00:00
Daniele Varrazzo
434fbb02b1
Fixed error message on range parsing failed
2014-02-19 01:03:01 +00:00
Daniele Varrazzo
9ac01d060d
Fixed debug build on Windows
...
Patches on master by James Emerton, from github pull request #8 .
2014-01-14 21:56:36 +00:00
Daniele Varrazzo
9e8923b884
Added doc notes about how to avoid JSON parsing
...
Added FAQ too as it has bitten more than one user
(see tickets #172 , #190 ).
2014-01-14 18:30:41 +00:00
Daniele Varrazzo
3f6497d587
Bump to next dev release
2014-01-14 18:27:46 +00:00
Daniele Varrazzo
4f1e4a03d1
Bump version for release 2.5.2
2014-01-07 12:00:28 +00:00
Daniele Varrazzo
8aaa4eabca
Fixed dealloc of lobject->smode
...
I put it by mistake into the in the self->conn checked block in the
previous commit.
2013-11-27 12:59:14 +00:00
Daniele Varrazzo
7e9e11ee27
Check connection type in lobject init
...
Fixes ticket #187 .
2013-11-27 12:42:57 +00:00