Commit Graph

1395 Commits

Author SHA1 Message Date
Daniele Varrazzo
7faedd0a90 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.

Conflicts:

	NEWS
2014-04-07 17:57:46 +01:00
Daniele Varrazzo
26349bf8d3 Work around pip issue #1630 breaking 'pip -e git+url'
https://github.com/pypa/pip/issues/1630

Fixes ticket #18 (opened in 2010!)

Conflicts:

	NEWS
2014-04-07 17:57:07 +01:00
Daniele Varrazzo
df148f733d Clarify in the docs that mogrify() and query always return bytes 2014-04-07 17:55:34 +01:00
Daniele Varrazzo
06b1db942f Fixed overflow opening a lobject with an oid not fitting in a signed int
Fixes 🎫`203`.

Conflicts:

	NEWS
2014-04-07 17:55:26 +01:00
Daniele Varrazzo
0f6122242c Dropped unneeded pass in test 2014-04-07 17:53:52 +01:00
Daniele Varrazzo
863a89228c Explicit the fact that closed connections have undefined status 2014-04-07 17:53:47 +01:00
Daniele Varrazzo
eddb0e3d90 Fixed dsn and closed attributes in failing connection subclasses.
From ticket #192 discussion.

Conflicts:

	NEWS
	tests/test_connection.py
2014-04-07 17:53:38 +01:00
Erwin de Keijzer
36a7deed52 Fixed DNS typo in examples 2014-04-07 17:52:02 +01:00
Daniele Varrazzo
6b43b0088e 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

Conflicts:

	NEWS
2014-04-07 17:51:53 +01:00
Daniele Varrazzo
d777b73301 Use the do-while 0 idiom for cursor guards macro 2014-04-07 17:49:34 +01:00
Daniele Varrazzo
27949b7d45 Merge branch 'ticket-194' into maint_2_4 2014-04-07 17:49:13 +01:00
Daniele Varrazzo
956560325e Bug #194 confirmed fixed: newsfile updated.
Conflicts:

	NEWS
2014-04-07 17:48:59 +01:00
Daniele Varrazzo
33db3ecfc3 Set the connection async before polling for connection
It should fix ticket #194
2014-04-07 17:48:10 +01:00
Daniele Varrazzo
3a8dec76a0 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-04-07 17:48:05 +01:00
Daniele Varrazzo
731dc2a3ef Fixed debug build on Windows
Patches on master by James Emerton, from github pull request #8.

Conflicts:

	NEWS
2014-04-07 17:46:58 +01:00
Daniele Varrazzo
dbdd0c822f Fixed dealloc of lobject->smode
I put it by mistake into the in the self->conn checked block in the
previous commit.
2014-04-07 17:43:44 +01:00
Daniele Varrazzo
ff341077e0 Check connection type in lobject init
Fixes ticket #187.

Conflicts:

	NEWS
2014-04-07 17:43:37 +01:00
Daniele Varrazzo
2840643924 Typo fixes and improvements to new_array_type() docs 2014-04-07 17:41:52 +01:00
Daniele Varrazzo
5a55339e11 Really test named cursors in test_scroll_named() 2014-04-07 17:40:32 +01:00
Daniele Varrazzo
970bb1d1b1 Document that named cursors don't raise an exception going out-of-bound
See issue #174 for the details.

Conflicts:

	doc/src/cursor.rst
2014-04-07 17:40:17 +01:00
Daniele Varrazzo
b95bb2c641 Document that using %, (, ) in the placeholder name is not supported 2014-04-07 17:38:26 +01:00
Daniele Varrazzo
fb5e14c701 Meaningful connection errors report a meaningful message
Fixes issue #173.

Conflicts:

	NEWS
2014-04-07 17:38:17 +01:00
Daniele Varrazzo
00c1d867c2 Added regression test for infinity parsing in dates
...and a couple of typos.
2014-04-07 17:30:58 +01:00
Daniele Varrazzo
0914323328 Added test to verify copysize handling in copy_expert
Not an original psycopg2 bug but present in pure python implementation,
e.g. ctypes issue #25 and cffi issue #5.

https://github.com/mvantellingen/psycopg2-ctypes/issues/25
https://github.com/chtd/psycopg2cffi/pull/5
2014-04-07 17:29:50 +01:00
Daniele Varrazzo
d0f49f9887 Skip tests on python implementations without getrefcount()
PyPy is one of these.

Conflicts:

	tests/test_cursor.py
	tests/test_module.py
2014-04-07 17:29:36 +01:00
Daniele Varrazzo
50b68aa987 Merge branch 'solaris-round' into maint_2_4 2014-04-07 17:23:33 +01:00
Daniele Varrazzo
75947a6fef Mention Solaris round fix in NEWS file 2014-04-07 17:19:47 +01:00
Daniele Varrazzo
0973d02b4b Long ifdef reformatted for readibility 2014-04-07 17:16:52 +01:00
Daniel Enman
5eefec4f5e Remove extra || 2014-04-07 17:16:34 +01:00
Daniel Enman
eafcc650c8 Solaris 10+, and illumos distros have round() 2014-04-07 17:16:29 +01:00
Daniele Varrazzo
6ab195d957 The UUID adapter returns bytes instead of str in Python 3
Also added __conform__ method to the adapter.
2014-04-07 17:15:47 +01:00
Daniele Varrazzo
cdbcd8a2e5 Script to test ticket #58 moved into sandbox
We don't need it distributed in the sdist
2014-04-07 17:15:23 +01:00
Piotr Kasprzyk
5a74117118 Fix multiple misspellings
Conflicts:

	NEWS
	doc/src/usage.rst
	psycopg/pqpath.c
	setup.cfg
2013-04-26 10:17:17 +01:00
Daniele Varrazzo
802381358a Fixed broken test decorator preventing 3 tests to run 2013-03-20 17:33:42 +00:00
Daniele Varrazzo
0f8de70e59 Fixed leak of cancel key on connection.reset()
Moving the final free into the destructor is not necessary but looks
appropriate.
2013-03-20 16:49:52 +00:00
Daniele Varrazzo
1cb78f1cc4 Fixed bad interaction of setup.py with other dependencies
The problem is in Distribute dependencies on Python 3. Create a new command
class instead of changing inplace the one other projects may use.

Close ticket #153.
2013-03-20 12:21:36 +00:00
Daniele Varrazzo
c111ef5dff Properly cleanup memory of broken connections
Fixed ticket #148.
2013-03-20 11:45:17 +00:00
Daniele Varrazzo
4f85b50cd2 Bump to next maintenance release 2013-03-20 11:43:29 +00:00
Daniele Varrazzo
4e65ca1d8d Version bumped to 2.4.6 2012-12-11 01:40:02 +00:00
Daniele Varrazzo
67445dfbea Fixed pickling of DictRow objects too 2012-12-11 01:40:02 +00:00
Daniele Varrazzo
5bee4d3379 Fixed pickling of RealDictRow objects 2012-12-11 01:40:02 +00:00
Daniele Varrazzo
a64fd31fd1 Fixed connections re-init across ZSQL methods
Fixes issue #142, probably #123 and #125 too.
2012-12-03 16:49:55 +00:00
Daniele Varrazzo
0653861bc4 Fixed empty strings handling in composite caster
Closes ticket #141.
2012-12-03 14:20:08 +00:00
Daniele Varrazzo
bf45539585 Added specific pool implementation for ZPsycopgDA
The implementation is based on psycopg 2.4, which should be less broken
(zope-wise) of the current one.

Instantiating psycopg2.pool.PersistentConnectionPool now raises a warning.

This should fix ticket #123, #125. The issue of the reset on
set_client_encoding() is still present but that's always been there and I'm no
good at fixing it.
2012-12-03 00:37:02 +00:00
Daniele Varrazzo
fb24777200 Use set_session instead of set_isolation_level where available
Avoid spurious queries as reported in psycopg2 ticket #125.
2012-12-02 23:51:26 +00:00
Daniele Varrazzo
f9bcbc213e Show all the available isolation levels in ZPsycopgDA menu 2012-12-02 23:27:21 +00:00
Daniele Varrazzo
6fb0b001b2 Added 2.4.6 to the allowed versions for ZPsycopgDA
Dropped beta versions and the versions with the messed up isolation level
constants.
2012-12-02 22:46:55 +00:00
Daniele Varrazzo
f6054c28d8 Release the GIL around PQgetResult calls after COPY
It should fix ticket #140.
2012-11-24 22:51:23 +00:00
Daniele Varrazzo
0837fc958e Merge branch 'fix-135' into maint_2_4 2012-10-21 22:02:39 +01:00
Daniele Varrazzo
5e6eabd9f8 Fixed pickling of FixedOffsetTimezone objects
I have also verified that the fixed class can unpickle instance pickled with
the buggy one and viceversa.

Fixes ticket #135.
2012-10-21 21:47:32 +01:00