Daniele Varrazzo
dc4c3d3143
Guard from failed keys creation during adaptation
2012-03-04 04:40:44 +00:00
Daniele Varrazzo
08fbd86495
Check errors in module typecasters init
2012-02-23 19:20:51 +00:00
Daniele Varrazzo
3e94375cf7
Merge branch 'python2' into python3
...
Conflicts:
ChangeLog
NEWS-2.3
lib/extensions.py
psycopg/microprotocols.c
setup.py
2011-01-01 17:14:54 +01:00
Daniele Varrazzo
30921b58a8
Dropped conversion from None to NULL in adapter.
...
It was an error as the string is not conform to the protocol. The error
is masked by the None fast path in _mogrify, but surfaces when adapting
a tuple contains a None.
2010-12-31 18:55:33 +01:00
Daniele Varrazzo
3214c23f51
Fixed adaptation in several adapters.
...
The getquoted methods always return bytes. The str() convert this
representation to string on the fly.
2010-12-31 03:18:27 +01:00
Daniele Varrazzo
56e4c2bd55
Redefining the microprotocol on Py3 as returning bytes.
2010-12-31 03:18:26 +01:00
Daniele Varrazzo
cb6b52945b
The library can be compiled with Python 3.
...
Just compiled! No test run yet and many points to review, marked in the
code.
The patch is largely Martin von Löwis work, simplified after refactoring
in the previous commits and adapted to the new code (as the patch was
originally for Psycopg 2.0.9)
2010-12-21 04:24:36 +00:00
Daniele Varrazzo
4635c2aa4f
Import structmember/stringobject headers from python.h.
...
stringobject is not to be imported with Python 3.
2010-12-21 04:02:13 +00:00
Daniele Varrazzo
8dfa9915eb
Using Py_TYPE and Py_REFCNT macros.
2010-12-21 04:02:13 +00:00
Daniele Varrazzo
6d7916cfe1
Internal imports simplified.
...
.c files only need to import psycopg.h: it will in turn import
dependencies from Python and libpq and configure.h. psycopg.h should be
the first to be imported, so the basic imports are not required in
the .h's
As a guideline I'm trying to import from the most specific to the most
generic to detect missing imports in the .h's.
2010-12-12 13:39:32 +00:00
Daniele Varrazzo
a39e98f9e5
Check the presence of a mro.
...
The mere presence of the Py_TPFLAGS_HAVE_CLASS doesn't ensure it is
there.
2010-11-09 14:28:00 +00:00
Daniele Varrazzo
2dc28ee7d8
Less lookups and more efficient calls in microprotocols_adapt().
...
Also more explicit handling of the exception indicator.
2010-11-09 02:41:43 +00:00
Daniele Varrazzo
753b580d72
Less lookups and more efficient calls in microprotocols_getquoted().
2010-11-09 02:21:21 +00:00
Daniele Varrazzo
62d3a1533b
Use the adapter of an object superclass if available.
2010-11-08 01:35:06 +00:00
Daniele Varrazzo
225b276de5
Use faster function to build tuples in adaptation.
...
Fixed a refcount bug too.
2010-11-08 01:28:01 +00:00
Federico Di Gregorio
611606d532
Changes license to LGPL3 + OpenSSL exception on all source files
2010-02-12 23:34:53 +01:00
Federico Di Gregorio
bcc836c661
Now adapt() errors include the type name
2009-11-25 11:51:54 +01:00
Federico Di Gregorio
0b0639dae5
Fixed error when adapt()ing None
2009-03-09 21:45:49 +01:00
Federico Di Gregorio
e5829292cd
Fixed both Python 2.5 and 64 bit problems.
2007-04-10 06:36:18 +00:00
Federico Di Gregorio
96ff591d79
Extra attributes for ProgrammingError exception.
2006-01-05 08:13:03 +00:00
Federico Di Gregorio
e1e0b34343
Fixed wrong refcnt on None.
2005-05-15 10:29:59 +00:00
Federico Di Gregorio
48d8bd39a1
Array support completed ( closes : #1 ).
2005-04-10 05:38:34 +00:00
Federico Di Gregorio
cd672525e1
Adaptation fixes (a lot.)
2005-02-28 15:50:55 +00:00
Federico Di Gregorio
c904d97f69
Initial psycopg 2 import after SVN crash.
2004-10-19 03:17:12 +00:00