~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to ChangeLog

  • Committer: Federico Di Gregorio
  • Date: 2004-10-29 16:08:31 UTC
  • Revision ID: fog-3d8587a243fa1d89012217ea99d2486813eb1955
SVN repo up to date (1.1.16pre1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2004-10-14  Federico Di Gregorio  <fog@debian.org>
2
 
 
3
 
        * psycopg/cursor_type.c (_psyco_curs_buildrow_fill): now we use
4
 
        PySequence_SetItem to avoid problems with containers created from
5
 
        cursor's .tuple_factory attribute.
6
 
 
7
 
        * lib/extras.py (DictCursor.execute): fixed stupid bug with cursor
8
 
        setting self.tuplefactory instead of self.tuple_factory.
9
 
 
10
 
2004-10-02  Federico Di Gregorio  <fog@debian.org>
11
 
 
12
 
        * Release 1.99.10.
13
 
        
14
 
        * psycopg/cursor_type.c (_psyco_curs_buildrow_*): unified normal
15
 
        and factory code into the _psyco_curs_buildrow_fill function; no
16
 
        more memory leaks here. 
17
 
 
18
 
        * psycopg/config.h (round): added check for __FreeBSD__ (that
19
 
        should be defined when compiling with gcc, I hope.)
20
 
 
21
 
        * setup.py: removed a lot of code now in setup.cfg.
22
 
 
23
 
2004-09-24  Federico Di Gregorio  <fog@debian.org>
24
 
 
25
 
        * psycopg/cursor_type.c (cursor_dealloc): fixed small memory leak
26
 
        due to missing disposal of self->pgres.
27
 
 
28
 
2004-9-14  Federico Di Gregorio  <fog@initd.org>
29
 
 
30
 
        *  examples/dialtone.py: Added adapt() example by Valentino
31
 
        Volonghi.
32
 
 
33
 
2004-09-14  Federico Di Gregorio  <fog@debian.org>
34
 
 
35
 
        * psycopg/microprotocols.c (microprotocols_adapt): lots of changes
36
 
        to the microprotocols layer (it is not micro anymore);
37
 
        implementing almost all the PEP 246. The adapter registry is now
38
 
        indexed by (type, protocol) and not by type alone.
39
 
 
40
 
2004-09-13  Federico Di Gregorio  <fog@debian.org>
41
 
 
42
 
        * psycopg/cursor_type.c (_mogrify): and qattr is gone.
43
 
 
44
 
2004-09-05  Federico Di Gregorio  <fog@debian.org>
45
 
 
46
 
        * Release 1.99.9 (or, the "twisting by the pool" release).
47
 
 
48
 
        * psycopg/pqpath.c (_pq_fetch_tuples): changed to "static void"
49
 
        instead of "static int", no ways for this function to fail.
 
1
2004-10-29  Federico Di Gregorio  <fog@debian.org>
 
2
 
 
3
        * cursor.c (_mogrify): fixed problem with %% not being transformed
 
4
        into % when calling .execute() with a zero-length tuple or dict.
 
5
 
 
6
2004-9-27  Federico Di Gregorio  <fog@lana.initd.org>
 
7
 
 
8
        * cursor.c (_psyco_curs_execute): atoi->atol as suggested by Sylvain
 
9
        Falardeau.
 
10
 
 
11
2004-09-17  Federico Di Gregorio  <fog@debian.org>
 
12
 
 
13
        * ZPsycopgDA/DA.py (cast_DateTime): implemented suggestion by
 
14
        Andreas Jung to speed-up cast_Date and cast_dateTime. cast_Time
 
15
        will need some more work.
 
16
 
 
17
2004-09-11  Federico Di Gregorio  <fog@debian.org>
 
18
 
 
19
        * connection.c (_psyco_conn_close): applied "trivial patch" by
 
20
        Marco Bizzarri.
50
21
 
51
22
2004-09-04  Federico Di Gregorio  <fog@debian.org>
52
23
 
53
 
        * psycopg/pqpath.c (_pq_fetch_tuples): ported rowcount fix from
54
 
        1.1.15.
55
 
 
56
 
        * ZPsycopgDA/*: ZPsycopgDA back in action, using the new pooling
57
 
        code.
58
 
 
59
 
2004-08-29  Federico Di Gregorio  <fog@debian.org>
60
 
 
61
 
        * psycopg/typecast_basic.c (typecast_DECIMAL_cast): added DECIMAL
62
 
        typecaster; it even works :).
63
 
 
64
 
        * scripts/buildtypes.py (basic_types): added DECIMAL typecaster
65
 
        for the NUMERIC oid.
66
 
 
67
 
        * examples/threads.py: updated threads example to use pooling code. 
68
 
 
69
 
        * lib/pool.py: added very simple and thread-safe connection
70
 
        pooling class.
71
 
 
72
 
        * psycopg/cursor_type.c (psyco_curs_fetchmany): fixed problem with
73
 
        .fetchall() and .fetchmany() returning None instead of [] on empty
74
 
        result sets.
75
 
 
76
 
        * Release 1.99.8.
77
 
 
78
 
2004-08-28  Federico Di Gregorio  <fog@debian.org>
79
 
 
80
 
        * psycopg/cursor_type.c (psyco_curs_execute): added processing of
81
 
        unicode queries.
82
 
 
83
 
        * examples/encoding.py: much better encoding example, also using
84
 
        the new UNICODE typecaster.
85
 
 
86
 
        * psycopg/typecast_basic.c (typecast_UNICODE_cast): added UNICODE
87
 
        typecaster.
88
 
 
89
 
        * lib/extensions.py: the encodings dictionary is not available by
90
 
        default but can be accessed from the psycopg.extensions module.
91
 
 
92
 
        * psycopg/adapter_qstring.h: remove encoding information from
93
 
        qstring adapter and moved it into psycopg module.
94
 
 
95
 
2004-08-26  Federico Di Gregorio  <fog@debian.org>
96
 
 
97
 
        * psycopg/cursor_type.c (_psyco_curs_prefetch): added check for
98
 
        asynchronous fetch by wrong cursor.
99
 
 
100
 
        * psycopg/pqpath.c (pq_fetch): fixed backend status message (bug
101
 
        reported by Daniele Varrazzo.)
 
24
        * cursor.c (_psyco_curs_execute): fixed rowcount by using
 
25
        PQcmdTuples as suggested by Vsevolod Lobko.
102
26
 
103
27
2004-07-29  Federico Di Gregorio  <fog@debian.org>
104
28
 
105
 
        * psycopg/typecast_basic.c (typecast_BINARY_cast): reverted to
106
 
        using strings instead of buffers when converting postgresql binary
107
 
        objects (should *temporarily* fix corruption bug reported on
108
 
        win32.)
109
 
 
110
 
2004-07-21  Federico Di Gregorio  <fog@debian.org>
111
 
 
112
 
        * psycopg/cursor_type.c: removed __iter__ and next methods from
113
 
        object methods and moved them where they do belong (tp_iter and
114
 
        tp_iternext.) Bug reported by Daniele Varrazzo (again!)
115
 
 
116
 
2004-07-19  Federico Di Gregorio  <fog@debian.org>
117
 
 
118
 
        * psycopg/typecast_datetime.c (typecast_PYINTERVAL_cast): replaced
119
 
        round() with micro() when rounding seconds (fixes bugs reported by
120
 
        Daniele Varrazzo.)
121
 
 
122
 
2004-07-16  Federico Di Gregorio  <fog@debian.org>
123
 
 
124
 
        * psycopg/pqpath.c (pq_set_critical): allow for a custom message
125
 
        insted of the one from PQerrorMessage.
126
 
        (pq_resolve_critical): added argument to specify if connection is
127
 
        to be closed (used to not close it during COPY FROM/TO criticals.)
128
 
 
129
 
        * psycopg/cursor_type.c (psyco_curs_fileno, psyco_curs_isready):
130
 
        added extension methods related to async queries. 
 
29
        * Release 1.1.15.
 
30
 
 
31
        * cursor.c (_psyco_curs_execute): reverted change to rowcount
131
32
 
132
33
2004-07-15  Federico Di Gregorio  <fog@debian.org>
133
34
 
134
 
        * Release 1.99.7.
135
 
 
136
 
        * examples/tz.py: added example about time zones.
137
 
 
138
 
        * psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): create
139
 
        FixedOffsetTimezone for postgresql "timestamp with time zone"
140
 
        types.
141
 
 
142
 
        * lib/tz.py: added (even more than) needed tzinfo classes.
143
 
 
144
 
        * psycopg/typecast.c (typecast_call): changed typecast call code
145
 
        to take the additional cursor parameter, needed for
146
 
        cursor-dependent type casting (tzinfo & friends.)
147
 
 
148
 
        * psycopg/cursor_type.c (_psyco_curs_buildrow_with_factory): added
149
 
        use of tuple factories to fetcXXX methods.
150
 
 
151
 
        * lib/extras.py: little extra goodies for psycopg.
152
 
 
153
 
2004-07-14  Federico Di Gregorio  <fog@debian.org>
154
 
 
155
 
        * Release 1.99.6. 
156
 
        
157
 
        * psycopg/connection_type.c: added .dsn attribute to connection
158
 
        objects.
159
 
 
160
 
        * psycopg/cursor_type.c (psyco_curs_mogrify): added .mogrify()
161
 
        method.
162
 
 
163
 
        * psycopg/adapter_qstring.c: copy the connection encoding only if
164
 
        wrapped object is unicode and added table of encodings.
 
35
        * typemod.c (psyco_Binary): fixed two memory leaks in QuotedString
 
36
        and Binary; many thanks to Stefan Schwarzer and valgrind.
165
37
 
166
38
2004-07-13  Federico Di Gregorio  <fog@debian.org>
167
39
 
168
 
        * psycopg/cursor_type.c (_mogrify): moved Dprintf statement to
169
 
        avoid dereferencing empty pointer (from 1.1.x)
170
 
        (psyco_curs_execute): now we save the query in self->query instead
171
 
        of freeing the memory ASAP.
172
 
        (cursorObject_members): and we finally export the saved query
173
 
        through the cursor members interface. that's all folks.
174
 
 
175
 
        * lib/extensions.py: added extensions module to clearly separate
176
 
        psycopg own extensions from DBAPI-2.0
 
40
        * cursor.c (_mogrify): move Dprintf some lines below to avoid
 
41
        dereferencing zero pointer. Thanks to Manuele Rampazzo for
 
42
        reporting it and Jason Erickson for the fix.
177
43
 
178
44
2004-07-10  Federico Di Gregorio  <fog@debian.org>
179
45
 
180
 
        * psycopg/typecast_datetime.c: ported interval fix from 1.1.x.
 
46
        * typeobj.c (psyco_INTERVAL_cast): argh, fixed typo in interval
 
47
        conversion.
 
48
 
 
49
2004-07-09  Federico Di Gregorio  <fog@debian.org>
 
50
 
 
51
        * Release 1.1.14.
 
52
 
 
53
2004-07-04  Federico Di Gregorio  <fog@debian.org>
 
54
 
 
55
        * Release 1.1.14pre2.
 
56
 
 
57
        * cursor.c (pgconn_notice_callback): if the message is an error,
 
58
        set the right Python exception. (_psyco_curs_execute): if the
 
59
        notice callback set an error during a COPY, now exit with NULL to
 
60
        raise the exception. 
 
61
 
 
62
2004-07-01  Federico Di Gregorio  <fog@debian.org>
 
63
 
 
64
        * Release 1.1.14pre1.
 
65
 
 
66
        * ZPsycopgDA/DA.py: added support for backend encodings.
 
67
 
 
68
        * ZPsycopgDA/db.py (DB.query): added query_data to pass
 
69
        arguments to the execute method; also added query string encoding.
 
70
 
 
71
        * cursor.c: fixed DBAPI-2.0 compliance:
 
72
          - psyco_curs_executemany: rowcount set to -1 because number of
 
73
             affected columns can't be determined
 
74
          - psyco_curs_setoutputsize: parse aguments
 
75
          - _psyco_curs_execute: set rowcount to -1 for PGRES_COMMAND_OK
 
76
            (INSERT or UPDATE executed) 
 
77
 
 
78
        * typeobj.c (psyco_INTERVAL_cast): fixed sign problem in interval
 
79
        by directly checking last sign encountered instead of hours's.
 
80
 
 
81
        * doc/examples/interval.py: added script to check for problem
 
82
        reported by Marcin Engelmann.
 
83
 
 
84
2004-06-21  Federico Di Gregorio  <fog@debian.org>
 
85
 
 
86
        * configure.in: applied patch from Anthony Baxter to build on
 
87
        Fedora core 2.
 
88
 
 
89
2004-05-21  Federico Di Gregorio  <fog@debian.org>
 
90
 
 
91
        * Release 1.1.13.
 
92
 
 
93
        * ZPsycopgDA/DA.py (manage_addZPsycopgConnection): fixed bug
 
94
        reported by Hiroyuki SHINDO (check and tilevel parameter inverted
 
95
        in Connection call.)
181
96
 
182
97
2004-05-16  Federico Di Gregorio  <fog@debian.org>
183
98
 
184
 
        * psycopg/typecast_datetime.c (typecast_*_cast): fixed Value error
185
 
        when seconds > 59 by setting minutes += 1 and seconds -= 60
186
 
        (reported by Marcel Gsteiger.) 
 
99
        * Release 1.1.12.
187
100
 
188
101
2004-04-24  Federico Di Gregorio  <fog@debian.org>
189
102
 
190
 
        * ported time interval patch by Ross Cohen from 1.1.12.
191
 
 
192
 
2004-04-19  Federico Di Gregorio  <fog@debian.org>
193
 
 
194
 
        * psycopg/typecast_datetime.c (typecast_PYDATE_cast): applied
195
 
        patch from Jason Erickson: min and max taken from datetime.Date
196
 
        type.
197
 
        
198
 
2004-04-18  Federico Di Gregorio  <fog@debian.org>
199
 
 
200
 
        * Applied changes from Jason Erickson to build on win32; see his
201
 
        (slightly edited) entry below. (Still builds on Linux :)
202
 
 
203
 
        * psycopg/*.c: removed inclusion of pthread.h from all files
204
 
        except psycopg/config.h to build on win32 without faking the file.
205
 
 
206
 
2004-04-15  Jason Erickson <jerickso@stickpeople.com>
207
 
 
208
 
        * setup.py: Various changes. The critical ones: 
209
 
          - Make an empty pthread.h file so all the code doing an 
210
 
            #include <pthread.h> will find something.
211
 
          - Appended the winsock2 library and the PostgreSQL library to 
212
 
            the library path.
213
 
          - Setup the include path.
214
 
          - Have the PSYCOPG_VERSION macro be included with quotes.
215
 
 
216
 
        * config.h: Added/Cleaned up Win32 includes, defines, stub functions.
217
 
 
218
 
        * typecast.h: Removed ';' after PyObject_HEAD in the
219
 
        typecastObject structure since Microsoft Visual Studio does not
220
 
        like it.
221
 
 
222
 
2004-04-15  Federico Di Gregorio  <fog@debian.org>
223
 
 
224
 
        * Release 1.99.5 (bug-fixing and reorganization)
225
 
 
226
 
        * setup.py et al.: moved psycopg to psycopg._psycopg to make
227
 
        easier to provide high level python-only utilities (like the
228
 
        promised pooling code). psycopg/__init__.py imports _psycopg and
229
 
        make all the default DBAPI-2.0 stuff available. 
 
103
        * typeobj.c (psyco_INTERVAL_cast): applied patch from Ross Cohen
 
104
        to fix time intervals in range (00:00, -01:00).
230
105
 
231
106
2004-04-14  Federico Di Gregorio  <fog@debian.org>
232
107
 
233
 
        * psycopg/psycopgmodule.c (initpsycopg): wrapped initialization of
234
 
        date/time adapters in #ifdefs to have psycopg compile without mx
235
 
        or builtin datetime.
236
 
 
237
 
2004-04-10  Federico Di Gregorio  <fog@debian.org>
238
 
 
239
 
        * Release 1.99.4.
240
 
 
241
 
2004-04-09  Federico Di Gregorio  <fog@debian.org>
242
 
 
243
 
        * psycopg/typecast_builtins.c: changed DATE to not include
244
 
        DATETIME types anymore.
245
 
 
246
 
        * psycopg/adapter_datetime.c (pydatetime_str): switched from
247
 
        strftime to isoformat to preserve fractional seconds.
248
 
 
249
 
2004-04-08  Federico Di Gregorio  <fog@debian.org>
250
 
 
251
 
        * psycopg/psycopgmodule.c (psyco_connect): ported sslmode
252
 
        parameter from 1.1 branch.
253
 
 
254
 
        * psycopg/adapter_datetime.*: added python built-in datetime
255
 
        adapters. also added the datetime typecasters (still using mx as
256
 
        default).
257
 
 
258
 
        * psycopg/typecast.h: removed aliases, they now live in the right
259
 
        typecast_xxx.c file.
260
 
 
261
 
2004-03-08  Federico Di Gregorio  <fog@debian.org>
262
 
 
263
 
        * Release 1.99.3 (alpha 4).
264
 
 
265
 
        * examples/lastrowid.py: and the .lastrowid example is in. 
266
 
 
267
 
        * psycopg/cursor_type.c (_mogrify): added call to .prepare()
268
 
        method in both dict and sequence path.
269
 
 
270
 
        * psycopg/connection_int.c (conn_set_client_encoding): added
271
 
        encoding-change code.
272
 
 
273
 
        * psycopg/adapter_qstring.c (qstring_quote): added hard-coded
274
 
        support for utf8 and latin1 encodings.
275
 
 
276
 
2004-03-01  Federico Di Gregorio  <fog@debian.org>
277
 
 
278
 
        * psycopg/connection_int.c (conn_close): does not use libpq
279
 
        functions on NULL pgconn (this can happen when conn_close is
280
 
        called after a failed PQconnect.)
281
 
 
282
 
2004-02-29  Federico Di Gregorio  <fog@debian.org> 
283
 
 
284
 
        * Release 1.99.2 (alpha 3).
285
 
        
286
 
        * psycopg/cursor_type.c: added .rownumber and .connection
287
 
        attributes. Also added .scroll(), .next() and .__iter__() methods
288
 
        (see DBAPI2-.0 extensions on PEP.)
289
 
 
290
 
        * psycopg/connection_type.c (psyco_conn_set_isolation_level):
291
 
        added connection method .set_isolation_level(). Also added all
292
 
        error objects to the connection (see DBAPI2-.0 extensions on PEP.)
293
 
 
294
 
        * psycopg/connection_int.c (conn_switch_isolation_level): added
295
 
        isolation level switching code.
296
 
 
297
 
        * setup.py: removed all references to PSYCOPG_NEWSTYLE: support
298
 
        for python < 2.2 has been dropped.
299
 
 
300
 
        * typecast_basic.c (typecast_BINARY_cast): now binary objects are
301
 
        returned as true buffers.
302
 
 
303
 
        * adapter_binary.*: added adapter for buffers and binary (bytea)
304
 
        objects.
305
 
 
306
 
        * Release 1.99.1 (alpha 2).
307
 
 
308
 
        * adapter_mxdatetime.*: added adapters for all mx.DateTime types.
309
 
 
310
 
2004-02-28  Federico Di Gregorio  <fog@debian.org>
311
 
 
312
 
        * cursor_type.c (_mogrify): complete rework of the mogrification
313
 
        code to use the microprotocols_adapt function.
314
 
 
315
 
        * typecast_basic.c (typecast_BOOLEAN_cast): we now return real
316
 
        Py_True and Py_False values.
317
 
 
318
 
        * microprotocols.h: added very simple microprotocols
319
 
        implementation to allow for python->postgresql types registry.
320
 
 
321
 
2004-01-05  Federico Di Gregorio  <fog@debian.org>
322
 
 
323
 
        * connection_int.c (conn_commit/conn_rollback): added code to
324
 
        commit/rollback and connection methods. 
325
 
 
326
 
2004-01-04  Federico Di Gregorio  <fog@debian.org>
327
 
 
328
 
        * cursor_type.c (psyco_curs_fetchone): added fetchone method.
329
 
 
330
 
2004-01-03  Federico Di Gregorio  <fog@debian.org>
331
 
 
332
 
        * added (empty) INSTALL file.
333
 
 
334
 
        * cursor_type.c (cursor_dealloc): added qattr for custom object
335
 
        quoting using a callable attribute.
336
 
        (_mogrify): ported new, fixed mogrification code from 1.1.12.
 
108
        * cursor.c (psyco_curs_destroy): added slightly modified patch
 
109
        from Ricardo Caesar Lenzi to reduce the number of opened
 
110
        connections when cursors are closed.
 
111
 
 
112
2004-02-29  Federico Di Gregorio  <fog@debian.org>
 
113
 
 
114
        * cursor.c (alloc_keeper): PQprotocolVersion used in debug
 
115
        statement only if available (postgresql version >= 7.4).
 
116
 
 
117
2004-02-23  Federico Di Gregorio  <fog@debian.org>
 
118
 
 
119
        * ZPsycopgDA/DA.py: small changes to make transaction level patch
 
120
        compatible with old connection objects without the need to
 
121
        recreate them.
 
122
 
 
123
2004-02-18  Federico Di Gregorio  <fog@debian.org>
 
124
 
 
125
        * connection.c (_curs_doall): removed some redundant code by
 
126
        passing the right function pointer to _curs_doall (patch from
 
127
        David Gould.)
 
128
 
 
129
2004-02-17  Federico Di Gregorio  <fog@debian.org>
 
130
 
 
131
        * connection.c (_psyco_conn_set_isolation_level): bounds check on
 
132
        the isolation level added (as suggested by David Gould.)
 
133
 
 
134
2004-02-12  Federico Di Gregorio  <fog@debian.org>
 
135
 
 
136
        * ZPsycopgDA: applied patch from Yury Don to added transaction
 
137
        isolation level to ZPsycopgDA. 
 
138
 
 
139
2004-01-17  Federico Di Gregorio  <fog@debian.org>
 
140
 
 
141
        * typeobj.c (psyco_TIME_cast): now we correctly use a
 
142
        DateTimeDelta for postgresql times (as suggested by Daniele
 
143
        Varrazzo.)
 
144
 
 
145
        * cursor.c (curs_switch_isolation_level): removed ALLOW_THREADS
 
146
        macros to avoid deadlock while calling cursor() on the same
 
147
        connection. Remember to redo the whole locking thing in psycopg 2.
 
148
 
 
149
2004-01-10  Federico Di Gregorio  <fog@debian.org>
 
150
 
 
151
        * module.c (psyco_connect): added "sslmode" parameter.
 
152
 
 
153
2004-01-08  Federico Di Gregorio  <fog@debian.org>
 
154
 
 
155
        * cursor.c (_mogrify): now raise the correct excetion instead of a
 
156
        generic TypeError (bug reported by Mark McClain).
 
157
 
 
158
        * psycopg.spec: added updated RPM spec file from Simon Willison.
 
159
 
 
160
        * cursor.c (_mogrify): applied patch from Menno Smits to fix
 
161
        mogrification of strings containing %%.
 
162
 
 
163
2003-12-21  Federico Di Gregorio  <fog@debian.org>
 
164
 
 
165
        * connection.c (_psyco_conn_set_isolation_level): applied patch
 
166
        discussed with Sebastien Bigaret to avoid other threads to modify
 
167
        the cursor list while switching isolation level. This should fix
 
168
        the segfault reported some time ago.
 
169
 
 
170
2003-12-18  Federico Di Gregorio  <fog@debian.org>
 
171
 
 
172
        * Release 1.1.11.
 
173
 
 
174
        * cursor.c (_psyco_curs_execute): removed some cruft in COPY_IN,
 
175
        "psyco_curs_reset(self, 0);" some 20 lines before already cleans
 
176
        the cursor.
 
177
 
 
178
        * cursor.c (COPY FROM implementation): plugged possible memory
 
179
          leak reported by Paul Reznicek:
 
180
          - in _psyco_curs_copy_from "o" was not DECREFfed when exiting
 
181
            cycle via break
 
182
          - in psyco_curs_copy_from PyObject_GetAttrString return a new
 
183
            reference, substitued with PyObject_HasAttrString
 
184
        
 
185
2003-12-15  Federico Di Gregorio,,,  <fog@localhost.localdomain>
 
186
 
 
187
        * connection.c: moved some declaration before code to avoid
 
188
        non-standard compilers to complain.
 
189
 
 
190
2003-12-12  Federico Di Gregorio  <fog@debian.org>
 
191
 
 
192
        * connection.c: applied patch from Sebastien Bigaret to make
 
193
        commit and rollback methods raise an exception on database errors.
 
194
 
 
195
        * ZPsycopgDA/db.py (DB.query): as per Geoff Davis suggestion,
 
196
        changed string compare (note: we need a better way, maybe return
 
197
        new numeric error code from protocol 3.0 in psycopg exception?)
 
198
 
 
199
2003-11-21  Federico Di Gregorio  <fog@debian.org>
 
200
 
 
201
        * cursor.c (_psyco_curs_execute): now use PQresultErrorField when
 
202
        protocol 3.0 in use.
 
203
 
 
204
        * VERSION: removed, it is now generated when running autoconf.
 
205
 
 
206
        * module.h & co.: moved around a lot of #includes trying to get
 
207
        rid of re-definition warnings. *this need testing* on all
 
208
        platforms.
 
209
 
 
210
2003-11-08  Federico Di Gregorio  <fog@debian.org>
 
211
 
 
212
        * Ehi, this is 1.1.10.
 
213
 
 
214
        * cursor.c (_mogrify): removed memory leak by adding some DECREFs
 
215
        (see also mail+patch from Chris Douty on psycopg mailing list.)
 
216
 
 
217
        * ZPsycopgDA/DA.py: shortened list of compatible versions: nobody
 
218
        should be using <1.1.7 anyway.)
 
219
        
 
220
2003-09-10  Federico Di Gregorio  <fog@debian.org>
 
221
 
 
222
        * Release 1.1.9.
 
223
 
 
224
        * Makefile.pre.in (dist): we now include the GeoTypes package in
 
225
        psycopg distribution.
 
226
 
 
227
2003-09-08  Federico Di Gregorio  <fog@debian.org>
 
228
 
 
229
        * Makefile.pre.in: added PYTHONFRAMEWORK to fix MacOS X
 
230
          builds.
 
231
 
 
232
2003-09-06  Federico Di Gregorio  <fog@debian.org>
 
233
 
 
234
        * cursor.c (_mogrify): sequences were mogrified wrong because of
 
235
        index being initialized to -1. it is now initialized to 0 (thanks
 
236
        to Vsevolod Lobko.)
 
237
 
 
238
2003-09-03  Federico Di Gregorio  <fog@debian.org>
 
239
 
 
240
        * cursor.c (_mogrify): no more problems when passing an empty
 
241
        (without markers) format string.
 
242
 
 
243
2003-08-31  Federico Di Gregorio  <fog@debian.org>
 
244
 
 
245
        * cursor.c (_mogrify): fixed the sequence/dict problem by
 
246
        completely rewriting the mogrification code.
 
247
 
 
248
2003-08-22  Federico Di Gregorio  <fog@debian.org>
 
249
 
 
250
        * Release 1.1.9pre1.
 
251
 
 
252
2003-08-19  Federico Di Gregorio  <fog@debian.org>
 
253
 
 
254
        * configure.in: added check for PQfreeNotify.
 
255
 
 
256
        * cursor.c (psyco_curs_execute): added check on python version to
 
257
        fix problem with python 2.3 PyMapping_Check() returning true while
 
258
        checking list or sequences.
337
259
 
338
260
2003-08-01  Federico Di Gregorio  <fog@debian.org>
339
261
 
340
 
        * cursor_type.c (_mogrify_sequence): added sequence mogrification,
341
 
        can be done better, on the dict model.
342
 
 
343
 
2003-07-28  Federico Di Gregorio  <fog@debian.org>
344
 
 
345
 
        * typeobj_qstring.c: added quoted strings (can use both own code,
346
 
        like psycopg 1.x or PQescapeString from lipq.)
347
 
 
348
 
2003-07-21  Federico Di Gregorio  <fog@debian.org>
349
 
 
350
 
        * connection_type.c (psyco_conn_close): added .close()
351
 
        method. wow.
352
 
 
353
 
        * cursor_*.c: added basic cursor interface (new-style.)
 
262
        * Release 1.1.8.
 
263
 
 
264
        * configure.in: patch from Vsevolod Lobko to find postgresql
 
265
        headers under BSD ports.
 
266
 
 
267
        * cursor.c (alloc_keeper): PQconnectdb is not thread safe, removed
 
268
        Py_*_THREADS wrapper to fix problem reported by Vsevolod Lobko.
 
269
 
 
270
2003-07-31  Federico Di Gregorio  <fog@debian.org>
 
271
 
 
272
        * cursor.c (psyco_curs_execute): in python 2.3 *every* object
 
273
        supports the mapping protocol breaking sequence mogrification:
 
274
        problem fixed by checking first for sequences, then for
 
275
        mappings. (psycopg really needs a regression tests suite!)
 
276
 
 
277
2003-07-26  Federico Di Gregorio  <fog@debian.org>
 
278
 
 
279
        * Release 1.1.7.
 
280
 
 
281
        * ZPsycopgDA/db.py: added _cursor method that checks for self.db
 
282
        before returning a new cursor. Should fix problem reported with
 
283
        Zope 2.7.  
 
284
 
 
285
2003-07-23  Federico Di Gregorio  <fog@debian.org>
 
286
 
 
287
        * cursor.c: applied notify and fileno patch from Vsevolod Lobko.
354
288
 
355
289
2003-07-20  Federico Di Gregorio  <fog@debian.org>
356
290
 
357
 
        * psycopg/*: beginning of new source layout. if you think this
358
 
        changelog is somewhat empty, you're right. look at
359
 
        doc/ChangeLog-1.x for psycopg 1.x changelog just before the
360
 
        branch.
361
 
 
 
291
        * cursor.c (_mogrify_dict): applied (slightly modofied) patch from
 
292
        Tobias Sargeant: now .execute() accept not only dictionaries but
 
293
        every type that has a __getitem__ method.
 
294
 
 
295
2003-07-13  Federico Di Gregorio  <fog@debian.org>
 
296
 
 
297
        * Release 1.1.6.
 
298
 
 
299
        * cursor.c (psyco_curs_scroll): added scroll method, patch from
 
300
        Jason D.Hildebrand.
 
301
 
 
302
        * typemod.c (new_psyco_quotedstringobject): discard NUL characters
 
303
        (\0) in quoted strings (fix problem reported by Richard Taylor.)
 
304
 
 
305
2003-07-10  Federico Di Gregorio  <fog@debian.org>
 
306
 
 
307
        * Added python-taylor.txt in doc directory: very nice introduction
 
308
        to DBAPI programming by Richard Taylor.
 
309
 
 
310
2003-07-09  Federico Di Gregorio  <fog@debian.org>
 
311
 
 
312
        * cursor.c (_psyco_curs_execute): another MT problem exposed and
 
313
        fixed by Sebastien Bigaret (self->keeper->status still LOCKED
 
314
        after a fatal error during PQexec call.)
 
315
 
 
316
2003-06-23  Federico Di Gregorio  <fog@debian.org>
 
317
 
 
318
        * Release 1.1.5.1.
 
319
 
 
320
        * ZPsycopgDA/db.py (DB.query): stupid error making ZPsycopgDA
 
321
        unusable fixed (else->except).
 
322
 
 
323
2003-06-22  Federico Di Gregorio  <fog@debian.org>
 
324
 
 
325
        * Release 1.1.5 candidate.
 
326
 
 
327
        * cursor.c (psyco_curs_copy_to): now any object with the write
 
328
        method can be used as a copy_to target.  
 
329
 
 
330
2003-06-20  Federico Di Gregorio  <fog@debian.org>
 
331
 
 
332
        * cursor.c (psyco_curs_copy_from): applied patch to allow copy_to
 
333
        from any object having a "readline" attribute (patch from Lex
 
334
        Berezhny.) (psyco_curs_copy_from): another patch from Lex to make
 
335
        psycopg raise an error on COPY FROM errors. 
 
336
 
 
337
        * ZPsycopgDA/db.py (DB.query): if a query raise an exception,
 
338
        first self._abort() is called to rollback current
 
339
        "sub-transaction".  this is a backward-compatible change for
 
340
        people that think continuing to work in the same zope transaction
 
341
        after an exception is a Good Thing (TM).
 
342
 
 
343
        * finally updated check_types.expected. checked by hand the
 
344
        conversions work the right way.
 
345
 
 
346
        * doc/examples/work.py: fixed example. note that it is a long time
 
347
        (at least two releases) that psycopg does not END a transaction
 
348
        initiated explicitly by the user while in autocommit mode.
 
349
 
 
350
2003-06-19  Federico Di Gregorio  <fog@debian.org>
 
351
 
 
352
        * cursor.c (_mogrify_dict): fixed dictionary mogrification (patch
 
353
        by Vsevolod Lobko.) (_psyco_curs_execute): fixed keeper status
 
354
        trashing problem by letting only one thread at time play with
 
355
        keeper->status (as suggested by Sebastien Bigaret.)
 
356
 
 
357
2003-05-07  Federico Di Gregorio  <fog@debian.org>
 
358
 
 
359
        * Release 1.1.4.
 
360
 
 
361
        * cursor.c: Added "statusmessage" attribute that holds the backend
 
362
        message (modified lots of functions, look for self->status).
 
363
 
 
364
2003-05-06  Federico Di Gregorio  <fog@debian.org>
 
365
 
 
366
        * typemod.c (new_psyco_datetimeobject): moved Py_INCREF into
 
367
        XXX_FromMx functions, to fix memory leak reported by Jim Crumpler.
 
368
 
 
369
2003-04-11  Federico Di Gregorio  <fog@debian.org>
 
370
 
 
371
        * module.h (PyObject_TypeCheck): fixed leak in python 2.1
 
372
        (Guido van Rossum).
 
373
 
 
374
2003-04-08  Federico Di Gregorio  <fog@debian.org>
 
375
 
 
376
        * buildtypes.py (basic_types): removed LXTEXT (never user, does
 
377
        not exists anymore.)
 
378
 
 
379
2003-04-07  Federico Di Gregorio  <fog@debian.org>
 
380
 
 
381
        * setup.py: added very lame setup.py script.
 
382
 
 
383
2003-04-02  Federico Di Gregorio  <fog@debian.org>
 
384
 
 
385
        * Release 1.3. 
 
386
 
 
387
        * psycopg.spec: Added (but modified) spec file by William
 
388
        K. Volkman (again, this change was lost somewhere in time...)
 
389
 
 
390
2003-04-01  Federico Di Gregorio  <fog@debian.org>
 
391
 
 
392
        * cursor.c (_psyco_curs_execute): psycopg was reporting everything
 
393
        as IntegrityError; reported and fix suggested by Amin Abdulghani.
 
394
 
 
395
2003-03-21  Federico Di Gregorio  <fog@debian.org>
 
396
 
 
397
        * cursor.c (psyco_curs_fetchone): debug statements sometimes made
 
398
        psycopg segfault: fixed by a patch by Ken Simpson.
 
399
 
 
400
2003-03-18  Federico Di Gregorio  <fog@debian.org>
 
401
 
 
402
        * cursor.c (alloc_keeper): patch from Dieter Maurer to unlock GIL
 
403
        whaile calling PQconnectdb().
 
404
 
 
405
2003-03-05  Federico Di Gregorio  <fog@debian.org>
 
406
 
 
407
        * Release 1.1.2.
 
408
 
 
409
        * Applied cygwin patch from Hajime Nakagami.
 
410
 
 
411
2003-02-25  Federico Di Gregorio  <fog@debian.org>
 
412
 
 
413
        * Release 1.1.2pre1.
 
414
        
 
415
        * cursor.c: added .lastrowid attribute to cursors (lastoid is
 
416
        deprecated and will be removed sometime in the future.)
 
417
 
 
418
        * cursor.c (begin_pgconn): implemented various isolation levels
 
419
        (also, in abort_pgconn, commit_pgconn.)
 
420
 
 
421
        * Added keyword parameters to psycopg.connect(): all take strings
 
422
        (even port): database, host, port, user, password.
 
423
        
 
424
        * configure.in: fixed test for postgres version > 7.2.
 
425
 
 
426
        * cursor.c (_psyco_curs_execute): removed if on pgerr in default
 
427
        case (if we enter default pgerr can't be one of the cased ones.)
 
428
        Also applied slightly modified patch from  William K. Volkman.
 
429
 
 
430
2003-02-24  Federico Di Gregorio  <fog@debian.org>
 
431
 
 
432
        * Merged in changes from 1.0.15.1 (see below for merged
 
433
        ChangeLog.)
 
434
 
 
435
2003-02-14  Federico Di Gregorio  <fog@debian.org>
 
436
 
 
437
        * Release 1.0.15.1.
 
438
 
 
439
        * cursor.c (_mogrify_fmt): in some cases we where removing one
 
440
        character too much from the format string, resulting in BIG BAD
 
441
        BUG. <g> Fixed.
 
442
 
 
443
2003-02-13  Federico Di Gregorio  <fog@debian.org>
 
444
 
 
445
        * Release 1.0.15. <g>
 
446
        
 
447
        * connection.c (_psyco_conn_close): now call dispose_pgconn on all
 
448
        cursors, to make sure all phisical connections to the db are
 
449
        closed (problem first reported by Amin Abdulghani.)
 
450
 
 
451
        * DBAPI-2.0 fixed mainly due to Stuart Bishop:
 
452
          - cursor.c (psyco_curs_setinputsizes): removed PARSEARGS, as
 
453
            this method does nothing.
 
454
          - cursor.c (psyco_curs_setoutputsize): .setoutputsize was
 
455
            spelled .setoutputsizes! fixed. Also removed PARSEARGS, as this
 
456
            method does nothing.
 
457
 
 
458
2003-02-12  Federico Di Gregorio  <fog@debian.org>
 
459
 
 
460
        * module.h (Dprintf): check on __APPLE__ to avoid variadic macros
 
461
        on macos x (as reported by Stuart Bishop, btw, why gcc seems to
 
462
        not support them on macos?)
 
463
 
 
464
        * cursor.c (_mogrify_fmt): non-alphabetic characters are dropped
 
465
        after the closing ")" until a real alphabetic, formatting one is
 
466
        found. (Fix bug reported by Randall Randall.)
 
467
 
 
468
2003-02-05  Federico Di Gregorio  <fog@debian.org>
 
469
 
 
470
        * typeobj.c (psyco_INTERVAL_cast): patched again to take into
 
471
        account leading zeroes.
 
472
 
 
473
2003-02-02  Federico Di Gregorio  <fog@debian.org>
 
474
 
 
475
        * Makefile.pre.in: applied patch from Albert Chin-A-Young to
 
476
        define BLDSHARED.
 
477
 
 
478
        * README: added explicit permission to link with OpenSSL.
 
479
 
 
480
2003-01-30  Federico Di Gregorio  <fog@debian.org>
 
481
 
 
482
        * config.h.in: applied patch from Albert Chin-A-Young to fix
 
483
        asprintf prototype.
 
484
 
 
485
2003-01-29  Federico Di Gregorio  <fog@debian.org>
 
486
 
 
487
        * cursor.c (_mogrify_seq): fixed little refcount leak, as
 
488
        suggested by Yves Bastide.
 
489
 
 
490
2003-01-24  Federico Di Gregorio  <fog@debian.org>
 
491
 
 
492
        * Merged-in changes from 1.0.14.2 (emacs diff mode is great..)
 
493
 
 
494
        * Release 1.0.14.2.
 
495
 
 
496
        * ZPsycopgDA/db.py (DB.query): back to allowing up to 1000 db
 
497
        errors before trying to reopen the connection by ourselves.
 
498
        
 
499
        * ZPsycopgDA/db.py: a false (None preferred, 0 allowed) max_rows
 
500
        value now means "fetch all results".
 
501
 
 
502
2003-01-22  Federico Di Gregorio  <fog@debian.org>
 
503
 
 
504
        * cursor.c (psyco_curs_fetchone): fixed little memory leak
 
505
        reported by Dieter Maurer.
 
506
 
 
507
2003-01-20  Federico Di Gregorio  <fog@debian.org>
 
508
 
 
509
        * ZPsycopgDA/db.py (DB.tables/columns): added registration with
 
510
        Zope's transaction machinery.
 
511
 
 
512
        * Release 1.0.14.1.
 
513
 
 
514
        * ZPsycopgDA/db.py: applied some fixes and cleanups by Dieter
 
515
        Maurer (serialization problem were no more correctly detected!)
 
516
 
 
517
        * Release 1.0.14.
 
518
        
 
519
        * Merged in 1.0.14.
 
520
 
 
521
        * Import of 1.1.1 done.
 
522
        
 
523
        * Moved everything to cvs HEAD.
 
524
 
 
525
2003-01-20  Federico Di Gregorio  <fog@debian.org>
 
526
 
 
527
        * ZPsycopgDA/connectionAdd.dtml: fixed typo (thanks to Andrew
 
528
        Veitch.)
 
529
 
 
530
        * typeobj.c (psyco_INTERVAL_cast): applied patch from Karl Putland
 
531
        to fix problems with fractional seconds.
 
532
 
 
533
2002-12-03  Federico Di Gregorio  <fog@debian.org>
 
534
 
 
535
        * Release 1.0.14-pre2.
 
536
 
 
537
        * module.h: added macro for PyObject_TypeCheck if python version <2.2.
 
538
 
 
539
        * typeobj.c (psyco_DBAPITypeObject_coerce): added error message to
 
540
        coercion errors.
 
541
 
 
542
2002-12-02  Federico Di Gregorio  <fog@debian.org>
 
543
 
 
544
        * Release 1.0.14-pre1.
 
545
 
 
546
        * ZPsycopgDA/db.py (DB.sortKey): added sortKey().
 
547
        
 
548
        * ZPsycopgDA/DA.py: applied a patch that was lost on hard disk
 
549
        (sic), if you sent me a patch names psycopg-1.0.13.diff modifying
 
550
        DA.py imports and want your name here, send me an email. :)
 
551
        [btw, the patch fix the ImageFile import, getting it from Globals
 
552
        as it is right.]
 
553
 
 
554
        * typeobj.c (psyco_DBAPITypeObject_coerce): Fixed coerce segfault
 
555
        by checking explicitly for all the allowed types.
 
556
 
 
557
2002-11-25  Federico Di Gregorio  <fog@debian.org>
 
558
 
 
559
        * doc/examples/*.py: added .rollback() to all exceptions before
 
560
        deleteing the old table. 
 
561
 
 
562
        * cursor.c: Apllied patch from John Goerzen (fix memory leak in
 
563
        executemany).
 
564
 
 
565
2002-10-25  Federico Di Gregorio  <fog@debian.org>
 
566
 
 
567
        * Release 1.0.13.
 
568
 
 
569
        * connection.c (_psyco_conn_close): remove cursors from the list
 
570
        starting from last and moving backward (as suggested by Jeremy
 
571
        Hylton; this is not such a big gain because python lists are
 
572
        *linked* lists, but not removing the element 0 makes the code a
 
573
        little bit clear.)
 
574
 
 
575
        * cursor.c (_psyco_curs_execute): now IntegrityError is raised
 
576
        instead of ProgrammingError when adding NULL values to a non-NULL
 
577
        column (suggested by Edmund Lian) and on referential integrity
 
578
        violation (as per debian bug #165791.)
 
579
 
 
580
        * typeobj.c (psyco_DATE_cast): now we use 999999 instead of
 
581
        5867440 for very large (both signs) dates. This allow to re-insert
 
582
        the DateTime object into postgresql (suggested by Zahid Malik.) 
 
583
 
 
584
2002-09-13  Federico Di Gregorio  <fog@debian.org>
 
585
 
 
586
        * Release 1.0.12.
 
587
 
 
588
        * Removed code to support COPY FROM/TO, will be added to new 1.1
 
589
        branch to be released next week.
 
590
 
 
591
        * cursor.c (_mogrify_seq): Fixed memory leak reported by Menno
 
592
        Smits (values obtained by calling PySequence_GetItem are *new*
 
593
        references!)
 
594
 
 
595
2002-09-07  Federico Di Gregorio  <fog@debian.org>
 
596
 
 
597
        * cursor.c (_psyco_curs_execute): Added skeleton to support COPY
 
598
        FROM/TO.
 
599
 
 
600
2002-09-06  Federico Di Gregorio  <fog@debian.org>
 
601
 
 
602
        * configure.in: if libcrypt can't be found we probably are on
 
603
        MacOS X: check for libcrypto, as suggested by Aparajita Fishman.
 
604
 
 
605
2002-09-03  Federico Di Gregorio  <fog@debian.org>
 
606
 
 
607
        * ZPsycopgDA/db.py (DB.columns): Applied patch from Dieter Maurer
 
608
        to allow the DA-browser to work with mixed case table names.
 
609
 
 
610
2002-08-30  Federico Di Gregorio  <fog@debian.org>
 
611
 
 
612
        * ZPsycopgDA/DA.py (cast_DateTime): Applied patch from Yury to fix
 
613
        timestamps (before they were returned with time always set to 0.)
 
614
 
 
615
2002-08-26  Federico Di Gregorio  <fog@debian.org>
 
616
 
 
617
        * Release 1.0.11.1 (to fix a %&�$"! bug in ZPsycopgDA not
 
618
        accepting psycopg 1.0.11 as a valid version.
 
619
 
 
620
        * Release 1.0.11.
 
621
 
 
622
2002-08-22  Federico Di Gregorio  <fog@debian.org>
 
623
 
 
624
        * Release 1.0.11pre2.
 
625
 
 
626
        * cursor.c (_psyco_curs_execute): fixed IntegrityError as reported
 
627
        by Andy Dustman. (psyco_curs_execute): converting TypeError to
 
628
        ProgrammingError on wrong number of % and/or aeguments. 
 
629
 
 
630
        * doc/examples/integrity.py: added example and check for
 
631
        IntegrityError.
 
632
 
 
633
2002-08-08  Federico Di Gregorio  <fog@debian.org>
 
634
 
 
635
        * Release 1.0.11pre1.
 
636
 
 
637
2002-08-06  Federico Di Gregorio  <fog@debian.org>
 
638
 
 
639
        * ZPsycopgDA/DA.py (cast_DateTime): patched as suggested by Tom
 
640
        Jenkins; now it shouldwork with time zones too.
 
641
 
 
642
2002-08-01  Federico Di Gregorio  <fog@debian.org>
 
643
 
 
644
        * ZPsycopgDA/DA.py (cast_DateTime): fixed problem with missing
 
645
        AM/PM, as reported by Tom Jenkins.
 
646
 
 
647
2002-07-23  Federico Di Gregorio  <fog@debian.org>
 
648
 
 
649
        * Fixed buglets reported by Mike Coleman.
 
650
 
 
651
2002-07-22  Federico Di Gregorio  <fog@debian.org>
 
652
 
 
653
        * Release 1.0.10.
 
654
 
 
655
2002-07-14  Federico Di Gregorio  <fog@debian.org>
 
656
 
 
657
        * Release 1.0.10pre2.
 
658
        
 
659
        * typeobj.c (psyco_LONGINTEGER_cast): fixed bad segfault by
 
660
        INCREFfing Py_None when it is the result of a NULL conversion.
 
661
 
 
662
2002-07-04  Federico Di Gregorio  <fog@debian.org>
 
663
 
 
664
        * Release 1.0.10pre1.
 
665
        
 
666
        * buildtypes.py (basic_types): added TIMESTAMPTZ to the types
 
667
        converted by the DATE builtin.
 
668
        
 
669
        * ZPsycopgDA/DA.py (Connection.connect): Added version check.
 
670
 
 
671
2002-07-03  Federico Di Gregorio  <fog@debian.org>
 
672
 
 
673
        * typeobj.c (psyco_XXX_cast): fixed bug reported by multiple users
 
674
        by appliying Matt patch. 
 
675
 
 
676
2002-06-30  Federico Di Gregorio  <fog@debian.org>
 
677
 
 
678
        * ZPsycopgDA/DA.py (Connection.set_type_casts): applied patch from
 
679
        Tom Jenkins to parse dates with TZ.
 
680
 
 
681
2002-06-20  Federico Di Gregorio  <fog@debian.org>
 
682
 
 
683
        * Preparing for release 1.0.9.
 
684
 
 
685
        * Makefile.pre.in (dist): now we really include psycopg.spec.
 
686
 
 
687
2002-06-17  Federico Di Gregorio  <fog@debian.org>
 
688
 
 
689
        * ZPsycopgDA/db.py (_finish, _abort): fixed problem with
 
690
        connection left in invalid state by applying Tom Jenkins patch.
 
691
 
 
692
2002-06-06  Federico Di Gregorio  <fog@debian.org>
 
693
 
 
694
        * ZPsycopgDA/db.py (DB._abort): fixed exception raising after an
 
695
        error in execute triggerer deletion of self.db.
 
696
 
 
697
2002-05-16  Federico Di Gregorio  <fog@debian.org>
 
698
 
 
699
        * cursor.c (psyco_curs_fetchone): None values passed to the
 
700
        internal typecasters. 
 
701
 
 
702
        * typeobj.c: added management of None to all the builtin
 
703
        typecasters. 
 
704
 
 
705
2002-04-29  Federico Di Gregorio  <fog@debian.org>
 
706
 
 
707
        * ZPsycopgDA/DA.py (cast_Time): applied 'seconds as a float' patch
 
708
        from Jelle.
 
709
 
 
710
2002-04-23  Federico Di Gregorio  <fog@debian.org>
 
711
 
 
712
        * Release 1.0.8.
 
713
 
 
714
        * Makefile.pre.in: we now include win32 related files in the
 
715
        distribution. 
 
716
        
 
717
        * connection.c (psyco_conn_destroy): fixed segfault reported by
 
718
        Scott Leerssen (we were double calling _psyco_conn_close().)
 
719
 
 
720
        * typemod.c (new_psyco_quotedstringobject): fixed memory stomping
 
721
        catched by assert(); thanks to Matt Hoskins for reporting this
 
722
        one.
 
723
 
 
724
2002-04-22  Federico Di Gregorio  <fog@debian.org>
 
725
 
 
726
        * configure.in: grmpf. we need a VERSION file for windows, we'll
 
727
        use it for configue and debian/rules too. 
 
728
 
 
729
        * Integrated win32 changes from Jason Erickson. Moved his
 
730
        Readme.txt to README.win32, removed VERSION and DATE, patched
 
731
        source where required. Renamed HISTORY to ChangeLog.win32, hoping
 
732
        Jason will start adding changes to the real ChangeLog file.
 
733
 
 
734
2002-04-07  Federico Di Gregorio  <fog@debian.org>
 
735
 
 
736
        * Release 1.0.7.1.
 
737
        
 
738
        * configure.in: fixed little bug as reported by ron.
 
739
 
 
740
2002-04-05  Federico Di Gregorio  <fog@debian.org>
 
741
 
 
742
        * Release 1.0.7?
 
743
        
 
744
        * typemod.c (new_psyco_bufferobject): fixed encoding problem (0xff
 
745
        now encoded as \377 and not \777.) Also encoding *all* chars as
 
746
        quoted octal values to prevent "Invalid UNICODE character sequence
 
747
        found" errors.
 
748
 
 
749
        * Release 1.0.7. (Real this time.) (Ok, it was a joke....)
 
750
 
 
751
2002-04-03  Federico Di Gregorio  <fog@debian.org>
 
752
 
 
753
        * configure.in: fixed problem with postgres versions in the format
 
754
        7.2.x (sic.)
 
755
 
 
756
        * connection.c (psyco_conn_destroy): moved most of the destroy
 
757
        stuff into its own function (_psyco_conn_close) and added a call
 
758
        to it from psyco_conn_close. This should fix the "psycopg does not
 
759
        release postgres connections on .close()" problem.
 
760
 
 
761
2002-03-29  Federico Di Gregorio  <fog@debian.org>
 
762
 
 
763
        * Release 1.0.7. Delayed.
 
764
        
 
765
        * buildtypes.py (basic_types): added TIMESTAMPTZ postgres type to
 
766
        the list of valid DATETIME types (incredible luck, no changes to
 
767
        the parse are needed!)
 
768
 
 
769
        * typeobj.c (psyco_DATE_cast): fixed wrong managment of sign in
 
770
        infinity.
 
771
 
 
772
2002-03-27  Federico Di Gregorio  <fog@debian.org>
 
773
        
 
774
        * configure.in (INSTALLOPTS): added AC_PROG_CPP test, now uses
 
775
        AC_TRY_CPP to test for _all_ required mx includes.
 
776
 
 
777
2002-03-19  Federico Di Gregorio  <fog@debian.org>
 
778
 
 
779
        * configure.in: added check for both pg_config.h and config.h to
 
780
        detect postgres version.
 
781
 
 
782
        * cursor.c: now None values are correctly handled when the format
 
783
        string is not %s but %d, etc.
 
784
 
 
785
2002-03-08  Federico Di Gregorio  <fog@debian.org>
 
786
 
 
787
        * ZPsycopgDA/DA.py: added MessageDialog import suggested by
 
788
        Guido.
 
789
 
 
790
2002-03-07  Federico Di Gregorio  <fog@debian.org>
 
791
 
 
792
        * psycopg.spec: added RPM specs by William K. Volkman.
 
793
 
 
794
        * Release 1.0.6.
 
795
        
 
796
        * configure.in: imported changes to allow postgres 7.2 builds from
 
797
        unstable branch.
 
798
 
 
799
2002-03-04  Federico Di Gregorio  <fog@debian.org>
 
800
 
 
801
        * Release 1.0.5.
 
802
 
 
803
        * applied table browser patch from Andy Dustman. 
 
804
 
 
805
2002-02-26  Federico Di Gregorio  <fog@debian.org>
 
806
 
 
807
        * typeobj.c (psyco_DATE_cast): added management of infinity
 
808
        values, this can be done in a better way, by accessing the
 
809
        MaxDateTime and MinDateTime constants of the mx.DateTime module.
 
810
 
 
811
2002-02-20  Federico Di Gregorio  <fog@debian.org>
 
812
 
 
813
        * configure.in: Release 1.0.4.
 
814
 
 
815
2002-02-12  Federico Di Gregorio  <fog@debian.org>
 
816
 
 
817
        * ZPsycopgDA/db.py (DB.columns): fixed select to reenable column
 
818
        expansion in table browsing.
 
819
 
 
820
        * ZPsycopgDA/__init__.py: removed code that made psycopg think
 
821
        double.  
 
822
 
 
823
2002-02-11  Federico Di Gregorio  <fog@debian.org>
 
824
 
 
825
        * cursor.c (_mogrify_dict): removed Py_DECREF of Py_None,
 
826
        references returned by PyDict_Next() are borrowed (thanks to
 
827
        Michael Lausch for this one.)
 
828
 
 
829
2002-02-08  Federico Di Gregorio  <fog@debian.org>
 
830
 
 
831
        * A little bug slipped in ZPsycopgDA, releasing 1.0.3 immediately.
 
832
 
 
833
        * Release 1.0.2.
 
834
        
 
835
        * tests/check_types.py (TYPES): added check for hundredths of a
 
836
        second. 
 
837
 
 
838
2002-02-07  Federico Di Gregorio  <fog@debian.org>
 
839
 
 
840
        * typeobj.c (psyco_INTERVAL_cast): patched to correct wrong
 
841
        interpretation of hundredths of a second (patch from
 
842
        A. R. Beresford, kudos!)
 
843
 
 
844
2002-01-31  Federico Di Gregorio  <fog@debian.org>
 
845
 
 
846
        * FAQ: added.
 
847
 
 
848
2002-01-16  Federico Di Gregorio  <fog@debian.org>
 
849
 
 
850
        * Preparing for release 1.0.1.
 
851
        
 
852
        * cursor.c (alloc_keeper): removed ALLOW_THREADS wrapper around
 
853
        PQconnectdb: libpq calls crypt() that is *not* reentrant.
 
854
 
 
855
2001-12-19  Federico Di Gregorio  <fog@debian.org>
 
856
 
 
857
        * typeobj.c (psyco_DBAPITypeObject_cmp): added check to simply
 
858
        return false when two type objects are compared (type objects are
 
859
        meaned to be compared to integers!)
 
860
 
 
861
        * typeobj.c: fixed the memory leak reported by the guys at
 
862
        racemi, for real this time. (added about 5 DECREFS and 2 INCREFS,
 
863
        ouch!)
 
864
        
 
865
2001-12-17  Federico Di Gregorio  <fog@debian.org>
 
866
 
 
867
        * typeobj.c (psyco_DBAPITypeObject_cmp): fixed memory leak by
 
868
        using PyTuple_GET_ITEM (we are sure the tuple has at least one
 
869
        element, we built it, after all...) (many thanks to Scott Leerssen
 
870
        for reporting the *exact line* for this one.)
 
871
 
 
872
2001-12-13  Federico Di Gregorio  <fog@debian.org>
 
873
 
 
874
        * cursor.c: fixed memory leak due to extra strdup (thanks
 
875
        to Leonardo Rochael Almeida.)
 
876
 
 
877
2001-11-14  Federico Di Gregorio  <fog@debian.org>
 
878
 
 
879
        * Release 1.0. 
 
880
 
 
881
        * doc/README: added explanation about guide work in progess but
 
882
        examples working.
 
883
 
 
884
        * debian/*: lots of changes to release 1.0 in debian too.
 
885
 
 
886
2001-11-12  Federico Di Gregorio  <fog@debian.org>
 
887
 
 
888
        * RELEASE-1.0: added release file, to celebrate 1.0.
 
889
 
 
890
        * tests/zope/typecheck.zexp: regression test on types for zope.
 
891
 
 
892
2001-11-11  Federico Di Gregorio  <fog@debian.org>
 
893
 
 
894
        * ZPsycopgDA/DA.py (cast_Interval): removed typecast of interval
 
895
        into zope DateTime. intervals are reported as strings when using
 
896
        zope DateTime and as DateTimeDeltas when using mx.
 
897
 
 
898
2001-11-09  Federico Di Gregorio  <fog@debian.org>
 
899
 
 
900
        * typeobj.c (psyco_INTERVAL_cast): complete rewrite of the
 
901
        interval parsing code. now we don't use sscanf anymore and all is
 
902
        done with custom code in a very tight and fast loop. 
 
903
 
 
904
2001-11-08  Federico Di Gregorio  <fog@debian.org>
 
905
 
 
906
        * ZPsycopgDA/DA.py (Connection.set_type_casts): added mx INTERVAL
 
907
        type restore.
 
908
 
 
909
        * ZPsycopgDA/db.py (DB.query): now we return column names even if
 
910
        there are no rows in the result set. also, cleaned up a little bit
 
911
        the code.
 
912
 
 
913
2001-11-7  Federico Di Gregorio,  <fog@debian.org>
 
914
 
 
915
        * Makefile.pre.in: fixed small problem with zcat on True64 
 
916
        (thank you stefan.)
 
917
 
 
918
2001-11-06  Federico Di Gregorio  <fog@debian.org>
 
919
 
 
920
        * ZPsycopgDA/db.py (DB.query): added fix for concurrent update
 
921
        from Chris Kratz.
 
922
 
 
923
2001-11-05  Federico Di Gregorio  <fog@debian.org>
 
924
 
 
925
        * cursor.c: now we include postgres.h if InvalidOid is still
 
926
        undefined after all other #includes.
 
927
 
 
928
        * README: clarified use of configure args related to python
 
929
        versions.
 
930
 
 
931
        * aclocal.m4: patched to work with symlinks installations (thanks
 
932
        to Stuart Bishop.)
 
933
 
 
934
        * cursor.c (_psyco_curs_execute): now reset the keeper's status to
 
935
        the old value and not to BEGIN (solve problem with autocommit not
 
936
        switching back.)
 
937
 
 
938
2001-11-01  Federico Di Gregorio  <fog@debian.org>
 
939
 
 
940
        * doc/examples/dt.py: added example on how to use the date and
 
941
        time constructors. 
 
942
 
 
943
        * Makefile.pre.in (dist-zope): removed dependencies on GNU install
 
944
        and tar commands. Also a little general cleanup on various targets.
 
945
 
 
946
        * ZPsycopgDA/DA.py: fixed mx.DateTime importing. 
 
947
 
 
948
2001-10-31  Federico Di Gregorio  <fog@debian.org>
 
949
 
 
950
        * typemod.c (psyco_xxxFromMx): fixed bug in argument parsing (we
 
951
        weren't usigng the right type object.) 
 
952
 
 
953
        * aclocal.m4: now builds OPT and LDFLAGS on the values of the env
 
954
        variables instead of overwriting them.
 
955
 
 
956
        * Makefile.pre.in (CFLAGS): removed -Wall, you can add it back at
 
957
        compile time with OPT="-Wall" ./configure ...
 
958
 
 
959
        * Setup.in (OPT): removed -Wall.
 
960
 
 
961
2001-10-30  Michele Comitini <mcm@initd.net>
 
962
 
 
963
        * module.h: ANSI C compatibility patch from Daniel Plagge.
 
964
        
 
965
2001-10-30  Federico Di Gregorio  <fog@debian.org>
 
966
 
 
967
        * README: added common building problems and solutions.
 
968
 
 
969
        * configure.in: removed check for install command, already done by
 
970
        james's aclocal.m4 for python. removed install-sh. removed -s from
 
971
        INSTALLOPTS.
 
972
 
 
973
2001-10-29  Federico Di Gregorio  <fog@debian.org>
 
974
 
 
975
        * Makefile.pre.in (dist): removed examples/ directory from
 
976
        distribution. 
 
977
 
 
978
        * merge with cvs head. preparing to fork again on PSYCOPG-1-0 (i
 
979
        admit BRANCH_1_0 was quite a silly name.)
 
980
 
 
981
        * doc/examples/usercast.py: now works. 
 
982
 
 
983
        * connection.c (curs_rollbackall): fixed little bug (exposed by
 
984
        the deadlock below) by changing KEEPER_READY to KEEPER_READY.
 
985
 
 
986
        * doc/examples/commit.py: deadlock problem solved, was the
 
987
        example script, _not_ psycopg. pew... :)
 
988
 
 
989
        * examples/*: removed the examples moved to doc/examples/.
 
990
        
 
991
        * doc/examples/commit.py,dictfetch.py: moved from examples/ and
 
992
        changed to work for 1.0. unfortunately commit.py locks psycopg!!!
 
993
 
 
994
2001-10-24  Federico Di Gregorio  <fog@debian.org>
 
995
 
 
996
        * modified all files neede for the 1.0 release.
 
997
 
 
998
        * configure.in (MXFLAGS): removed electric fence support.
 
999
 
 
1000
        * Makefile.pre.in (dist): now we remove CVS working files before
 
1001
        packing the tarball.
 
1002
 
 
1003
        * tests: files in this directory are not coding examples, but
 
1004
        regression tests. we need a sufficient number of tests to follow
 
1005
        every single code path in psycopg at least once. first test is
 
1006
        about datatypes.
 
1007
        
 
1008
        * doc/examples: moved new example code to examples directory, old
 
1009
        tests and code samples will stay in examples/ until the manual will
 
1010
        be finished.
 
1011
 
 
1012
2001-10-16  Federico Di Gregorio  <fog@debian.org>
 
1013
 
 
1014
        * typeobj.c (psyco_INTERVAL_cast): completely revised interval
 
1015
        casting code. (psyco_TIME_cast): we use the unix epoch when the
 
1016
        date is undefined. 
 
1017
 
 
1018
        * cursor.c (psyco_curs_executemany): modified sanity check to
 
1019
        accept sequences of tuples too and not just dictionaries.
 
1020
 
 
1021
2001-10-15  Federico Di Gregorio  <fog@debian.org>
 
1022
 
 
1023
        * typeobj.c (psyco_INTERVAL_cast): fixed bug caused by wrong
 
1024
        parsing on '1 day' (no hours, minutes and seconds.)
 
1025
 
 
1026
2001-10-15  Michele Comitini  <mcm@initd.net>
 
1027
 
 
1028
        * cursor.c (_execute): use the correct cast functions even on
 
1029
        retrival of binary cursors.
 
1030
 
 
1031
2001-10-12  Federico Di Gregorio  <fog@debian.org>
 
1032
 
 
1033
        * typemod.c (new_psyco_bufferobject): space not quoted anymore,
 
1034
        smarter formula to calculate realloc size.
 
1035
 
 
1036
        * cursor.c (psyco_curs_fetchone): removed static tuple (using
 
1037
        static variable in multithreaded code is *crazy*, why did i do it? 
 
1038
        who knows...)
 
1039
 
 
1040
        * typeobj.c (psyco_init_types): exports the binary converter (will
 
1041
        be used in cursor.c:_execute.)
 
1042
 
 
1043
        * typeobj.h: added export of psyco_binary_cast object.
 
1044
 
 
1045
2001-10-05  Federico Di Gregorio  <fog@debian.org>
 
1046
 
 
1047
        * cursor.c (_psyco_curs_execute): added missing Py_XDECREF on
 
1048
        casts list.
 
1049
 
 
1050
        * Makefile.pre.in (dist): added install-sh file to the
 
1051
        distribution. 
 
1052
 
 
1053
        * replaced PyMem_DEL with PyObject_Del where necessary.
 
1054
        
 
1055
        * connection.c (psyco_conn_destroy): added missing
 
1056
        pthread_mutex_destroy on keeper lock.
 
1057
 
 
1058
2001-10-01  Michele Comitini  <mcm@initd.net>
 
1059
 
 
1060
        * typemod.c(new_psyco_bufferobject()): using unsigned char for
 
1061
        binary objects to avoid too many chars escaped.  A quick and
 
1062
        simple formula to avoid memory wasting and too much reallocating
 
1063
        for the converted object.  Needs _testing_, but it is faster.
 
1064
 
 
1065
        * cursor.c: #include <postgres.h>
 
1066
 
 
1067
        * module.h: now debugging should be active only when asked by
 
1068
        ./configure --enable-devel
 
1069
        
 
1070
2001-09-29  Federico Di Gregorio  <fog@debian.org>
 
1071
 
 
1072
        * cursor.c (new_psyco_cursobject): added locking of connection,
 
1073
        still unsure if necessary.
 
1074
 
 
1075
2001-09-26  Federico Di Gregorio  <fog@debian.org>
 
1076
 
 
1077
        * configure.in: changed DEBUG into PSYCOTIC_DEBUG, to allow other
 
1078
        includes (postgres.h) to use the former. better compiler checks:
 
1079
        inline, ansi, gcc specific extensions. removed MXMODULE: we don't
 
1080
        need it anymore.
 
1081
 
 
1082
        * general #include cleanup, should compile on MacOS X too.
 
1083
 
 
1084
        * typeobj.c (psyco_DATE_cast): uses sscanf. should be faster too. 
 
1085
        (psyco_TIME_cast): dixit.
 
1086
 
 
1087
        * applied patch from Daniel Plagge (SUN cc changes.)
 
1088
        
 
1089
2001-09-22  Federico Di Gregorio  <fog@debian.org>
 
1090
 
 
1091
        * ZPsycopgDA/db.py (DB._finish, DB._begin): fix for the 
 
1092
        self.db == None problem.
 
1093
 
 
1094
2001-09-19  Michele Comitini  <mcm@initd.net>
 
1095
 
 
1096
        * typemod.c (new_psyco_bufferobject): better memory managment
 
1097
        (now it allocates only needed space dinamically).
 
1098
 
 
1099
        * typeobj.c (psyco_BINARY_cast): ripped a useless check, now
 
1100
        it assumes that binary streams come out from the db correctly
 
1101
        escaped.  Should be a lot faster.
 
1102
 
 
1103
2001-09-18  Federico Di Gregorio  <fog@debian.org>
 
1104
 
 
1105
        * typeobj.c (psyco_INTERVAL_cast): fixed interval conversion
 
1106
        (hours were incorrectly converted into seconds.)
 
1107
 
 
1108
2001-09-17  Federico Di Gregorio  <fog@debian.org>
 
1109
 
 
1110
        * cursor.c (_mogrify_seq, _mogrify_dict): added check for None
 
1111
        value and conversion of None -> NULL (fixes bug reported by Hamish
 
1112
        Lawson.)
 
1113
 
 
1114
2001-09-12  Federico Di Gregorio  <fog@debian.org>
 
1115
 
 
1116
        * module.c: added handles to new date and time conversion
 
1117
        functions (see below.)
 
1118
 
 
1119
        * typemod.c (psyco_XXXFromMx): added conversion functions that
 
1120
        simply wrap the mxDateTime objects instead of creating
 
1121
        them. DBAPI-2.0 extension, off-curse. 
 
1122
 
 
1123
2001-09-10  Federico Di Gregorio  <fog@debian.org>
 
1124
 
 
1125
        * buildtypes.py: solved hidden bug by changing from dictionary to
 
1126
        list, to maintain ordering of types. sometimes (and just
 
1127
        sometimes) the type definitions were printed unsorted, resulting
 
1128
        is psycopg initializing the type system using the type objects in
 
1129
        the wrong order. you were getting float values from an int4
 
1130
        column? be happy, this is now fixed... 
 
1131
 
 
1132
        * cursor.c (psyco_curs_lastoid): added method to get oid of the
 
1133
        last inserted row (it was sooo easy, it even works...) 
 
1134
 
 
1135
2001-09-08  Federico Di Gregorio  <fog@debian.org>
 
1136
 
 
1137
        * typeobj.c (psyco_INTERVAL_cast): added casting function for the
 
1138
        postgres INTERVAL and TINTERVAL types (create a DateTimeDelta
 
1139
        object.)  
 
1140
 
 
1141
2001-09-05  Federico Di Gregorio  <fog@debian.org>
 
1142
 
 
1143
        * cursor.c: moved all calls to begin_pgconn to a single call in
 
1144
        _psyco_curs_execute, to leave the connection in a not-idle status
 
1145
        after a commit or a rollback. this should free a lot of resources
 
1146
        on the backend side. kudos to the webware-discuss mailing list
 
1147
        members and to Clark C. Evans who suggested a nice solution.
 
1148
        
 
1149
        * connection.c (curs_rollbackall, curs_commitall): removed calls
 
1150
        to begin_pgconn, see above. 
 
1151
 
 
1152
        * module.c (initpsycopg): cleaned up mxDateTime importing; we now
 
1153
        use the right function from mxDateTime.h. Is not necessary anymore
 
1154
        to include our own mx headers. This makes psycopg to depend on
 
1155
        mxDateTime >= 2.0.0.
 
1156
 
 
1157
2001-09-04  Federico Di Gregorio  <fog@debian.org>
 
1158
 
 
1159
        * doc/*.tex: added documentation directory and skeleton of the
 
1160
        psycopg guide. 
 
1161
 
 
1162
2001-09-03  Federico Di Gregorio  <fog@debian.org>
 
1163
 
 
1164
        * merged in changes from HEAD (mostly mcm fixes to binary
 
1165
        objects.)
 
1166
 
 
1167
        * preparing for release 0.99.6.
 
1168
 
 
1169
2001-09-03  Michele Comitini  <mcm@initd.net>
 
1170
 
 
1171
        * typemod.c: much faster Binary encoding routine.
 
1172
        
 
1173
        * typeobj.c: much faster Binary decoding routine.       
 
1174
 
 
1175
2001-08-28  Michele Comitini  <mcm@initd.net>
 
1176
 
 
1177
        * typemod.c: Working binary object to feed data to bytea type
 
1178
        fields.
 
1179
 
 
1180
        * typeobj.c: Added BINARY typecast to extract data from
 
1181
        bytea type fields.
 
1182
 
 
1183
        * cursor.c: Added handling for SQL binary  cursors.
 
1184
 
 
1185
2001-08-3  Michele Comitini <mcm@initd.net>
 
1186
 
 
1187
        * cursor.c: fixed DATESTYLE problem thanx to Steve Drees.
 
1188
 
 
1189
2001-07-26  Federico Di Gregorio  <fog@debian.org>
 
1190
 
 
1191
        * Makefile.pre.in: applied change suggested by Stefan H. Holek to
 
1192
        clobber and distclean targets.
 
1193
 
 
1194
2001-07-23  Federico Di Gregorio  <fog@debian.org>
 
1195
 
 
1196
        * ZPsycopgDA/db.py: fixed little bugs exposed by multiple select
 
1197
        changes, not we correctly import ListType and we don't override
 
1198
        the type() function with a variable. 
 
1199
 
 
1200
2001-07-17  Federico Di Gregorio  <fog@debian.org>
 
1201
 
 
1202
        * configure.in: Release 0.99.5.
 
1203
 
 
1204
2001-07-12  Federico Di Gregorio  <fog@debian.org>
 
1205
 
 
1206
        * debian/* fixed some little packaging problems.
 
1207
 
 
1208
2001-07-11  Federico Di Gregorio  <fog@debian.org>
 
1209
 
 
1210
        * cursor.c, typeobj.c: removed some Py_INCREF on PyDict_SetItem
 
1211
        keys and values to avoid memory leaks.
 
1212
 
 
1213
2001-07-03  Federico Di Gregorio  <fog@debian.org>
 
1214
 
 
1215
        * cursor.c (_mogrify_dict): added dictionary mogrification: all
 
1216
        Strings in the dictionary are translated into QuotedStrings. it
 
1217
        even works... (_mogrify_seq): added sequence mogrification and
 
1218
        code to automagically mogrify all strings passed to .execute(). 
 
1219
 
 
1220
2001-07-02  Federico Di Gregorio  <fog@debian.org>
 
1221
 
 
1222
        * Release 0.99.4.
 
1223
 
 
1224
        * typemod.c: added QuotedString class and methods.
 
1225
 
 
1226
        * module.c: added QuotedString method to module psycopg.
 
1227
 
 
1228
        * typemod.c: changed Binary objects into something usefull. now
 
1229
        the buffer object quotes the input by translatin every char into
 
1230
        its octal representation. this consumes 4x memory but guarantees
 
1231
        that even binary data containing '\0' can go into the Binary
 
1232
        object. 
 
1233
 
 
1234
        * typemod.h: added definition of QuotedString object.
 
1235
        
 
1236
2001-06-28  Federico Di Gregorio  <fog@debian.org>
 
1237
 
 
1238
        * ZPsycopgDA/db.py, ZPsycopgDA/DABase.py: applied patch sent by
 
1239
        yury to fix little buglet. 
 
1240
 
 
1241
2001-06-22  Federico Di Gregorio  <fog@debian.org>
 
1242
 
 
1243
        * Release 0.99.3.
 
1244
        
 
1245
        * connection.c (new_psyco_connobject): now we strdup dsn, as a fix
 
1246
        for the problem reported by Jack Moffitt.
 
1247
 
 
1248
        * Ok, this will be the stable branch from now on...
 
1249
 
 
1250
        * Merged in stuff from 0.99.3. About to re-branch with a better
 
1251
        name (BRANCH_1_0)
 
1252
 
 
1253
2001-06-20  Federico Di Gregorio  <fog@debian.org>
 
1254
 
 
1255
        * Release 0.99.3. Showstoppers for 1.0 are:
 
1256
            - documentation
 
1257
            - mxDateTime module loading
 
1258
            - bug reported by Yury.
 
1259
        
 
1260
        * Integrated patches from Michele:
 
1261
            - searching for libcrypt in configure now works
 
1262
            - removed memory leak in asprintf.c
 
1263
 
 
1264
2001-06-15  Federico Di Gregorio  <fog@debian.org>
 
1265
 
 
1266
        * ZPsycopgDA/__init__.py (initialize): applied patch from Jelle to
 
1267
        resolve problem with Zope 2.4.0a1.
 
1268
 
 
1269
2001-06-14  Federico Di Gregorio  <fog@debian.org>
 
1270
 
 
1271
        * configure.in: added code to check for missing functions (only
 
1272
        asprintf at now.)
 
1273
 
 
1274
        * asprintf.c: added compatibility code for oses that does not have
 
1275
        the asprintf() function.
 
1276
 
 
1277
2001-06-10  Federico Di Gregorio  <fog@debian.org>
 
1278
 
 
1279
        * Branched PSYCOPG_0_99_3. Development will continue on the cvs
 
1280
        HEAD, final adjustements and bugfixing should go to this newly
 
1281
        created branch.
 
1282
 
 
1283
2001-06-08  Michele Comitini  <mcm@initd.net>
 
1284
 
 
1285
        * ZPsycopgDA/DA.py: DateTime casts simplified and corrected
 
1286
        as suggested by Yury.
 
1287
 
 
1288
2001-06-05  Federico Di Gregorio  <fog@debian.org>
 
1289
 
 
1290
        * Release 0.99.2.
 
1291
 
 
1292
        * Makefile.pre.in (dist): added typemod.h and typemod.c to
 
1293
        distribution.
 
1294
        
 
1295
        * cursor.c (commit_pgconn, abort_pgconn, begin_pgconn): resolved
 
1296
        segfault reported by Andre by changing PyErr_SetString invokations
 
1297
        into pgconn_set_critical. the problem was that the python
 
1298
        interpreter simply segfaults when we touch its internal data (like
 
1299
        exception message) inside an ALLOW_THREADS wrapper.
 
1300
 
 
1301
        * now that we are 100% DBAPI-2.0 compliant is time for the
 
1302
        one-dot-o release (at last!) Para-pa-pa! This one is tagged
 
1303
        PSYCOPG_0_99_1 but you can call it 1.0pre1, if you better like. 
 
1304
        (A very long text just to say 'Release 0.99.1')
 
1305
 
 
1306
        * typemod.[ch]: to reach complete DBAPI-2.0 compliance we
 
1307
        introduce some new objects returned by the constructors Date(),
 
1308
        Time(), Binary(), etc. Those objects are module-to-database only,
 
1309
        the type system still takes care of the database-to-python
 
1310
        conversion.
 
1311
 
 
1312
2001-06-01  Federico Di Gregorio  <fog@debian.org>
 
1313
 
 
1314
        * Release 0.5.5.
 
1315
 
 
1316
        * module.h: better error message when trying to commit on a
 
1317
        cursor derived from serialized connection.
 
1318
        
 
1319
        * ZPsycopgDA/db.py (DB.close): now self.cursor is set to None when
 
1320
        the connection is closed.
 
1321
 
 
1322
        * module.c (initpsycopg): added missing (sic) DBAPI module
 
1323
        parameters (paramstyle, apilevel, threadsafety, etc...)
 
1324
 
 
1325
2001-05-24  Michele Comitini  <mcm@initd.net>
 
1326
 
 
1327
        * ZPsycopgDA: Support for Zope's internal DateTime, option
 
1328
        to leave mxDateTime is available on the management interface so
 
1329
        to switch with little effort :).
 
1330
 
 
1331
        * cursor.c: more aggressive cleanup of postgres results
 
1332
        to avoid the risk of memory leaking.
 
1333
 
 
1334
        * typeobj.c, connection.c: deleted some Py_INCREF which
 
1335
        wasted memory.
 
1336
 
 
1337
2001-05-18  Federico Di Gregorio  <fog@debian.org>
 
1338
 
 
1339
        * Release 0.5.4.
 
1340
 
 
1341
2001-05-17  Michele Comitini  <mcm@initd.net>
 
1342
 
 
1343
        * ZPsycopgDA/db.py: The connection closed by the management
 
1344
        interface of zope now raises error instead of reopening itself.
 
1345
 
 
1346
        * cursor.c (psyco_curs_close):  does not try to free the cursor
 
1347
        list, as it caused a segfault on subsequent operations on the same
 
1348
        cursor.
 
1349
 
 
1350
2001-05-07  Federico Di Gregorio  <fog@debian.org>
 
1351
 
 
1352
        * Release 0.5.3.
 
1353
        
 
1354
        * Merged in changes from me and mcm.
 
1355
 
 
1356
2001-05-06  Michele Comitini  <mcm@initd.net>
 
1357
 
 
1358
        * ZPsycopgDA/db.py (DB.close): Fixes a bug report by Andre
 
1359
        Shubert, which was still open since there was a tiny typo in
 
1360
        method definition.
 
1361
 
 
1362
        * ZPsycopgDA/DA.py (Connection.sql_quote__): overriding standard
 
1363
        sql_quote__ method to provide correct quoting (thank to Philip
 
1364
        Mayers and Casey Duncan for this bug report).
 
1365
 
 
1366
2001-05-04  Federico Di Gregorio  <fog@debian.org>
 
1367
 
 
1368
        * ZPsycopgDA/db.py: added .close() method (as suffested by Andre
 
1369
        Schubert.)
 
1370
 
 
1371
2001-05-04  Michele Comitini  <mcm@initd.net>
 
1372
 
 
1373
        * module.h: working on a closed object now raises an
 
1374
        InterfaceError.
 
1375
 
 
1376
        * ZPsycopgDA/db.py: fixed problems with dead connections detection.
 
1377
 
 
1378
        * ZPsycopgDA/__init__.py: corrected SOFTWARE_HOME bug for zope
 
1379
        icon.
 
1380
 
 
1381
2001-05-04  Federico Di Gregorio  <fog@debian.org>
 
1382
 
 
1383
        * examples/thread_test.py: now that the serialization bug is
 
1384
        fixed, it is clear that thread_test.py is bugged! added a commit()
 
1385
        after the creation of the first table to avoid loosing it on the
 
1386
        exception raised by the CREATE of an existing table_b.
 
1387
 
 
1388
2001-05-03  Federico Di Gregorio  <fog@debian.org>
 
1389
 
 
1390
        * connection.c (psyco_conn_cursor): reverted to old locking
 
1391
        policy, the new caused a nasty deadlock. apparently the multiple
 
1392
        connection problem has been solved as a side-effect of the other
 
1393
        fixes... (?!)
 
1394
 
 
1395
        * module.h: removes stdkeeper field from connobject, we don't need
 
1396
        it anymore.
 
1397
 
 
1398
        * cursor.c (dispose_pgconn): now sets self->keeper to NULL to
 
1399
        avoid decrementing the keeper refcnt two times when the cursor is
 
1400
        first closed and then destroyed.
 
1401
 
 
1402
        * connection.c (psyco_conn_cursor): fixed little bug in cursor
 
1403
        creation: now the connection is locked for the entire duration of
 
1404
        the cursor creation, to avoid a new cursor to be created with a
 
1405
        new keeper due to a delay in assigning the stdmanager cursor.
 
1406
 
 
1407
        * cursor.c: added calls to pgconn_set_critical() and to
 
1408
        EXC_IFCRITICAL() where we expect problems. Still segfaults but at
 
1409
        least raise an exception...
 
1410
        
 
1411
        * cursor.c (psyco_curs_autocommit): added exception if the
 
1412
        cursor's keeper is shared between more than 1 cursor.
 
1413
 
 
1414
        * module.h (EXC_IFCRITICAL): added this macro that call
 
1415
        pgconn_resolve_critical) on critical errors.
 
1416
 
 
1417
        * cursor.c (alloc_keeper): added check for pgres == NULL. 
 
1418
 
 
1419
        * cursor.c (psyco_curs_destroy): merged psyco_curs_destroy() and
 
1420
        psyco_curs_close(): now both call _psyco_curs_close() and destroy
 
1421
        does only some extra cleanup.
 
1422
 
 
1423
2001-05-03  Michele Comitini  <mcm@initd.net>
 
1424
 
 
1425
        * ZPsycopgDA/db.py: Some cleanup to bring the zope product up to
 
1426
        date with the python module.  Some bugs found thanks to Andre
 
1427
        Schubert.  Now the ZDA should rely on the new serialized version
 
1428
        of psycopg.
 
1429
 
 
1430
        * cursor.c: while looking for problems in the ZDA some come out
 
1431
        here, with the inability to handle dropping connection correctly.
 
1432
        This leads to segfaults and is not fixed yet for lack of time.
 
1433
        Some problems found in cursors not willing to share the same
 
1434
        connection even if they should.  Hopefully it should be fixed
 
1435
        soon.
 
1436
 
 
1437
2001-04-26  Federico Di Gregorio  <fog@debian.org>
 
1438
 
 
1439
        * fixed bug reported by Andre Schubert by adding a new cast
 
1440
        function for long integers (int8 postgresql type.) at now they are
 
1441
        converted to python LongIntegers: not sure f simply convert to
 
1442
        floats.
 
1443
 
 
1444
        * michele applied patch from Ivo van der Wijk to make zpsycopgda
 
1445
        behave better when INSTANCE_HOME != SOFTWARE_HOME.
 
1446
 
 
1447
        * cursor.c (_psyco_curs_execute): also fill the 'columns' field.
 
1448
 
 
1449
        * module.h: added a 'columns' field to cursobject, to better
 
1450
        support the new dictionary fetch functions (dictfetchone(),
 
1451
        dictfetchmany(), dictfetchall().)
 
1452
 
 
1453
        * cursor.c: added the afore-mentioned functions (function names
 
1454
        are not definitive, they will follow decisions on the DBAPI SIG.)
 
1455
 
 
1456
2001-04-03  Federico Di Gregorio  <fog@debian.org>
 
1457
 
 
1458
        * Release 0.5.1.
 
1459
 
 
1460
        * mcm fixed a nasty bug by correcting a typo in module.h.
 
1461
 
 
1462
2001-03-30  Federico Di Gregorio  <fog@debian.org>
 
1463
 
 
1464
        * module.c (psyco_connect): added `serialized' named argument to
 
1465
        the .connect() method (takes 1 or 0 and initialize the connection
 
1466
        to the right serialization state.)
 
1467
 
 
1468
        * Makefile.pre.in (dist): fixed little bug, a missing -f argument
 
1469
        to rm.
 
1470
 
 
1471
        * examples/thread_test.py: removed all extension cruft.
 
1472
 
 
1473
        * examples/thread_test_x.py: this one uses extensions like the
 
1474
        per-cursor commit, autocommit, etc.
 
1475
 
 
1476
        * README (psycopg): added explanation on how .serialize() works. 
 
1477
 
 
1478
        * connection.c (psyco_conn_serialize): added cursor serialization
 
1479
        and .serialize() method on the connection object. now we are
 
1480
        definitely DBAPI-2.0 compliant.
 
1481
 
 
1482
2001-03-20  Federico Di Gregorio  <fog@debian.org>
 
1483
 
 
1484
        * cursor.c (_psyco_curs_execute): replaced some fields in
 
1485
        description with None, as suggested on the DB-SIG ML.
 
1486
 
 
1487
        * something like one hundred of little changes to allow cursors
 
1488
        share the same postgres connection. added connkeeper object and
 
1489
        pthread mutexes (both in connobject and connkeeper.) apparently it
 
1490
        works. this one will be 0.5.0, i think.
 
1491
 
 
1492
2001-03-19  Michele Comitini  <mcm@initd.net>
 
1493
 
 
1494
        * cursor.c: added mutexes, they do not interact well with python
 
1495
        threads :(.
 
1496
 
 
1497
2001-03-16  Michele Comitini  <mcm@initd.net>
 
1498
 
 
1499
        * ZPsycopgDA/db.py (ZDA): some fixes in table browsing.
 
1500
 
 
1501
2001-03-16  Federico Di Gregorio  <fog@debian.org>
 
1502
 
 
1503
        * suite/tables.postgresql (TABLE_DESCRIPTIONS): fixed some typos
 
1504
        introduced by copying by hand the type values from pg_type.h.
 
1505
 
 
1506
        * suite/*: added some (badly) structured code to test for
 
1507
        DBAPI-2.0 compliance.
 
1508
       
 
1509
        * cursor.c (pgconn_notice_callback): now the NOTICE processor only
 
1510
        prints NOTICEs when psycopg has been compiled with the
 
1511
        --enable-devel switch. 
 
1512
 
 
1513
        * connection.c: removed 'autocommit' attribute, now is a method as
 
1514
        specified in the DBAPI-2.0 document.
 
1515
 
 
1516
2001-03-15  Federico Di Gregorio  <fog@debian.org>
 
1517
 
 
1518
        * connection.c (curs_commitall): splitted for cycle in two to
 
1519
        avoid the "bad snapshot" problem.
 
1520
 
 
1521
2001-03-14  Federico Di Gregorio  <fog@debian.org>
 
1522
 
 
1523
        * Release 0.4.6.
 
1524
        
 
1525
        * cursor.c (_psyco_curs_execute): fixed nasty bug, there was an
 
1526
        free(query) left from before the execute/callproc split.
 
1527
 
 
1528
        * Preparing for 0.4.6.
 
1529
 
 
1530
2001-03-13  Federico Di Gregorio  <fog@debian.org>
 
1531
 
 
1532
        * cursor.c (psyco_curs_execute): fixed some memory leaks in
 
1533
        argument parsing (the query string was not free()ed.)
 
1534
        (psyco_curs_callproc): implemented callproc() method on cursors.
 
1535
        (_psyco_curs_execute): this is the function that does the real
 
1536
        stuff for callproc() and execute().
 
1537
        (pgconn_notice_*): added translation of notices into python
 
1538
        exceptions (do we really want that?) 
 
1539
 
 
1540
        * configure.in: removed some cruft (old comments and strncasecmp()
 
1541
        check)
 
1542
 
 
1543
2001-03-12  Federico Di Gregorio  <fog@debian.org>
 
1544
 
 
1545
        * examples/thread_test.py: added moronic argument parsing: now you
 
1546
        can give the dsn string on the command line... :(
 
1547
 
 
1548
        * Release 0.4.5.
 
1549
 
 
1550
2001-03-10  Federico Di Gregorio  <fog@debian.org>
 
1551
 
 
1552
        * cursor.c (request_pgconn): added code to set datestyle to ISO on
 
1553
        new connections (many thanks to Yury <yura@vpcit.ru> for the code,
 
1554
        i changed it just a little bit to raise an exception on error.)
 
1555
 
 
1556
2001-03-09  Federico Di Gregorio  <fog@debian.org>
 
1557
 
 
1558
        * Release 0.4.4.
 
1559
 
 
1560
        * ZPsycopgDA/db.py: michele fixed a nasty bug here. 
 
1561
 
 
1562
2001-03-08  Federico Di Gregorio  <fog@debian.org>
 
1563
 
 
1564
        * Release 0.4.3.
 
1565
 
 
1566
2001-03-07  Federico Di Gregorio  <fog@debian.org>
 
1567
 
 
1568
        * Makefile.pre.in (dist): typeobj_builtins.c included for people
 
1569
        without pg_type.h. if you encounter type-casting problems like
 
1570
        results cast to the wrong type, simply "rm typeobj_builtins.c" and
 
1571
        rebuild.
 
1572
 
 
1573
        * typeobj.c (psyco_*_cast): removed RETURNIFNULL() macro from all
 
1574
        the builtin casting functions. (psyco_STRING_cast) does not create
 
1575
        a new string anymore, simply Py_INCREF its argument and return it.
 
1576
 
 
1577
        * cursor.c (psyco_curs_fetchone): removed strdup() call. added
 
1578
        PQgetisnull() test to differentiate between real NULLs and empty
 
1579
        strings.
 
1580
 
 
1581
        * Removed cursor.py (mcm, put tests in examples) and fixed some
 
1582
        typos in the dtml code.
 
1583
 
 
1584
2001-03-04  Michele Comitini  <mcm@initd.net>
 
1585
 
 
1586
        * examples/commit_test.py: Modifications to test argument passing
 
1587
        and string substitution to cursor functions, nothing more.
 
1588
 
 
1589
        * ZPsycopgDA/db.py: now it exploits some of the good features of
 
1590
        the psycopg driver, such as connection reusage and type
 
1591
        comparison.  Code is smaller although it handles (and
 
1592
        reports) errors much better.
 
1593
 
 
1594
        * cursor.c: corrected a bug that left a closed cursor in the
 
1595
        cursor list of the connection.  Now cursors are removed from the
 
1596
        lists either when they are close or when they are destroyed.
 
1597
        Better connection (TCP) error reporting and handling.
 
1598
 
 
1599
 
 
1600
2001-03-02  Federico Di Gregorio  <fog@debian.org>
 
1601
 
 
1602
        * examples commit_test.py: added code to test autocommit.
 
1603
        
 
1604
        * examples/thread_test.py (ab_select): modified select thread to
 
1605
        test autocommit mode.
 
1606
 
 
1607
        * Release 0.4.1.
 
1608
        
 
1609
        * module.h, connection.c, cursor.c: added autocommit support.
 
1610
 
 
1611
2001-02-28  Federico Di Gregorio  <fog@debian.org>
 
1612
 
 
1613
        * Release 0.4.
 
1614
 
 
1615
2001-02-27  Michele Comitini  <mcm@initd.net>
 
1616
 
 
1617
        * cursor.py: cut some unuseful code in psyco_curs_fetchmany() and
 
1618
        psyco_curs_fetchall() inserted an assert in case someting goes
 
1619
        wrong.
 
1620
 
 
1621
2001-02-27  Federico Di Gregorio  <fog@debian.org>
 
1622
 
 
1623
        * debian/*: various changes to build both the python module and
 
1624
        the zope db adapter in different packages (respectively
 
1625
        python-psycopg and zope-psycopgda.)  
 
1626
 
 
1627
        * examples/type_test.py: better and more modular tests. 
 
1628
 
 
1629
        * typeobj.c: added DATE, TIME, DATETIME, BOOLEAN, BINARY and ROWID
 
1630
        types. (RETURNIFNULL) added NULL-test to builtin conversion
 
1631
        functions (using the RETURNIFNULL macro.)
 
1632
 
 
1633
2001-02-26  Federico Di Gregorio  <fog@debian.org>
 
1634
 
 
1635
        * releasing 0.3 (added NEWS file.)
 
1636
 
 
1637
2001-02-26  Michele Comitini  <mcm@initd.net>
 
1638
 
 
1639
        * cursor.c: fetchmany() some cleanup done.
 
1640
 
 
1641
        * ZPsycopgDA/db.py, ZPsycopgDA/__init__.py, : fixes to make the
 
1642
        ZDA work some way.  WARNING WARNING WARNING the zda is still
 
1643
        alpha code, but we need some feed back on it so please give it
 
1644
        a try.
 
1645
        
 
1646
2001-02-26  Federico Di Gregorio  <fog@debian.org>
 
1647
 
 
1648
        * typeobj.c (psyco_STRING_cast): fixed bad bad bad bug. we
 
1649
        returned the string without coping it and the type-system was more
 
1650
        than happy to Py_DECREF() it and trash the whole system. fixed at
 
1651
        last!
 
1652
 
 
1653
        * module.h (Dprintf): added pid to every Dprintf() call, to
 
1654
        facilitate multi-threaded debug.
 
1655
 
 
1656
2001-02-26  Michele Comitini  <mcm@initd.net>
 
1657
 
 
1658
        * module.c: added code so that DateTime package need not to be
 
1659
        loaded to have mxDateTime.  This should avoid clashing with
 
1660
        DateTime from the zope distribution.
 
1661
 
 
1662
        * cursor.c: setting error message in fetchmany when no more tuples
 
1663
        are left. This has to be fixed in fetch and fetchall to.
 
1664
 
 
1665
2001-02-26  Federico Di Gregorio  <fog@debian.org>
 
1666
 
 
1667
        * configure.in: stepped up version to 0.3, ready to release
 
1668
        tomorrow morning. added check for path to DateTime module. 
 
1669
 
 
1670
        * examples/usercast_test.py: generate some random boxes and
 
1671
        points, select the boxes with at least one point inside and print
 
1672
        them converting the PostgeSQL output using a user-specified cast
 
1673
        object. nice. 
 
1674
 
 
1675
2001-02-24  Federico Di Gregorio  <fog@debian.org>
 
1676
 
 
1677
        * cursor.c (psyco_curs_fetchone): now an error in the python
 
1678
        callback when typecasting results raise the correct exception.
 
1679
 
 
1680
        * typeobj.c (psyco_DBAPITypeObject_call): removed extra Py_INCREF().
 
1681
 
 
1682
2001-02-23  Federico Di Gregorio  <fog@debian.org>
 
1683
 
 
1684
        * replaced every single instance of the string 'pgpy' with 'psyco'
 
1685
        (this was part of the general cleanup.)
 
1686
        
 
1687
        * type_test.py: added this little test program to the distribution
 
1688
        (use the new_type() method to create new instances of the type
 
1689
        objects.)  
 
1690
 
 
1691
        * typeobj.c: general cleanup. fixed some bugs related to
 
1692
        refcounting (again!)
 
1693
 
 
1694
        * cursor.c: general cleanup. (request_pgconn) simplified by adding
 
1695
        a support function (_extract_pgconn.)
 
1696
 
 
1697
        * connection.c: general cleanup. replaced some ifs with asserts()
 
1698
        in utility functions when errors depend on programming errors and
 
1699
        not on runtime exceptions. (pgpy_conn_destroy) fixed little bug
 
1700
        when deleting available connections from the list.
 
1701
 
 
1702
        * module.h: general cleanup.
 
1703
 
 
1704
        * typeobj.h: general cleanup, better comments, made some function
 
1705
        declarations extern. 
 
1706
 
 
1707
        * module.c: general cleanup, double-checked every function for
 
1708
        memory leaks. (pgpy_connect) removed unused variable 'connection'.
 
1709
 
 
1710
2001-02-22  Federico Di Gregorio  <fog@debian.org>
 
1711
 
 
1712
        * typeobj.c: fixed lots of bugs, added NUMBER type object. now the
 
1713
        basic tests in type_test.py work pretty well.
 
1714
 
 
1715
        * cursor.c (pgpy_curs_fetchmany): fixed little bug, fetchmany()
 
1716
        reported one less row than available.
 
1717
 
 
1718
        * fixed lots of bugs in typeobj.c, typeobj.h, cursor.c. apparently
 
1719
        now the type system works. it is time to clean up things a little
 
1720
        bit.
 
1721
 
 
1722
2001-02-21  Federico Di Gregorio  <fog@debian.org>
 
1723
 
 
1724
        * typeobj.c: separated type objects stuff from module.c
 
1725
        
 
1726
        * typeobj.h: separated type objects stuff from module.h 
 
1727
 
 
1728
2001-02-19  Federico Di Gregorio  <fog@debian.org>
 
1729
 
 
1730
        * cursor.c (pgpy_curs_fetchmany): now check size and adjust it to
 
1731
        be lesser or equal than the nuber of available rows.
 
1732
 
 
1733
2001-02-18  Michele Comitini  <mcm@initd.net>
 
1734
 
 
1735
        * module.c, module.h: added optional args maxconn and minconn to
 
1736
        connection functions
 
1737
 
 
1738
        * cursor.c: better error checking in request_pgconn.
 
1739
 
 
1740
        * connection.c: changed new_connect_obj to take as optional args
 
1741
        maxconn and minconn. Added the corresponding ro attributes to
 
1742
        connection objects.
 
1743
 
 
1744
        * cursor.py: added some code to stress test cursor reusage.
 
1745
 
 
1746
        * cursor.c: some fixes on closed cursors.
 
1747
 
 
1748
        * connection.c: corrections on some assert calls.
 
1749
 
 
1750
2001-02-16  Federico Di Gregorio  <fog@debian.org>
 
1751
 
 
1752
        * configure.in: added --enable-priofile sqitch. changed VERSION to
 
1753
        0.2: preparing for a new release.
 
1754
 
 
1755
        * cursor.c: added a couple of asserts.
 
1756
 
 
1757
2001-02-16  Michele Comitini  <mcm@initd.net>
 
1758
 
 
1759
        * cursor.c, connection.c: fixed the assert problem: assert must
 
1760
        take just the value to be tested! no assignemente must be done in
 
1761
        the argument of assert() otherwise is wiped when NDEBUG is set.
 
1762
 
 
1763
        * module.h: some syntax error fixed.  Error in allocating a tuple
 
1764
        corrected in macro DBAPITypeObject_NEW().
 
1765
        
 
1766
        * module.c: pgpy_DBAPITypeObject_init() is not declared static anymore.
 
1767
 
 
1768
        * cursor.c: executemany() now does not create and destroy tuples
 
1769
        for each list item, so it is much faster.
 
1770
 
 
1771
2001-02-14  Michele Comitini  <mcm@initd.net>
 
1772
 
 
1773
        * cursor.c:  added again Py_DECREF on the cpcon after disposing
 
1774
        it.  assert() with -DNDEBUG makes the driver segfault while it
 
1775
        should not.
 
1776
        
 
1777
 
 
1778
2001-02-13  Federico Di Gregorio  <fog@debian.org>
 
1779
 
 
1780
        * some of the memory leak were memprof errors, bleah. resumed some
 
1781
        old code, fixed segfault, fixed other bugs, improved speed. almost
 
1782
        ready for a new release.
 
1783
        
 
1784
        * connection.c (pgpy_conn_destroy): replaced some impossible ifs
 
1785
        with aseert()s.
 
1786
 
 
1787
        * cursor.c (pgpy_curs_close): added Py_DECREF() to
 
1788
        self->descritpion to prevent a memory leak after an execute().
 
1789
 
 
1790
        * connection.c (pgpy_conn_destroy): always access first element of
 
1791
        lists inside for cycles because removing items from the list makes
 
1792
        higher indices invalid.
 
1793
 
 
1794
        * cursor.c (dispose_pgconn): fixed memory leak, there was a
 
1795
        missing Py_DECREF() after the addition of the C object wrapping
 
1796
        the postgresql connection to the list of available connections.
 
1797
 
 
1798
        * cursor.c (dispose_pgconn): fixed another memory leak: an
 
1799
        orphaned cursor should call PQfinish() on its postgresql
 
1800
        connection because it has no python connection to give the
 
1801
        postgresql ine back.
 
1802
 
 
1803
        * cursor.c (pgpy_curs_execute): added Py_DECREF() of description
 
1804
        tuple after adding it to self->description. this one fixes the
 
1805
        execute() memory leak.
 
1806
        
 
1807
        * cursor.c (pgpy_curs_fetchall): added missing Py_DECREF() on row
 
1808
        data (obtained from fetchone().) this fixes the last memory leak.
 
1809
        (thread_test.py now runs without leaking memory!)
 
1810
 
 
1811
2001-02-12  Federico Di Gregorio  <fog@debian.org>
 
1812
 
 
1813
        * INSTALL: removed wok cruft from head of this file.
 
1814
 
 
1815
        * debian/rules: debianized the sources. python-psycopg is about to
 
1816
        enter debian. mxDateTime header locally included until the
 
1817
        maintainer of python-mxdatetime includes them in his package
 
1818
        (where they do belong.)
 
1819
 
 
1820
        * autogen.sh: added option --dont-run-configure. 
 
1821
 
 
1822
2001-02-09  Federico Di Gregorio  <fog@debian.org>
 
1823
 
 
1824
        * module.c (initpsycopg): changed name of init function to match
 
1825
        new module name (also changed all the exception definitions.)
 
1826
 
 
1827
        * README: updated psycopg description (we have a new name!)
 
1828
 
 
1829
        * Ready for 0.1 release.
 
1830
 
 
1831
2001-02-07  Michele Comitini  <mcm@initd.net>
 
1832
 
 
1833
        * cursor.c: now executemany takes sequences and not just
 
1834
        tuples 
 
1835
 
 
1836
2001-02-07  Federico Di Gregorio  <fog@debian.org>
 
1837
 
 
1838
        * Makefile.pre.in: now dist target includes test programs
 
1839
        (thread_test.py) and README and INSTALL files. 
 
1840
 
 
1841
        * configure.in: changed --with-devel to --enable-devel. little
 
1842
        cosmetical fixes to the option management.
 
1843
        
 
1844
        * connection.c, module.c, cursor.c, module.h: removed 'postgres/'
 
1845
        from #include directive. it is ./configure task to find the right
 
1846
        directory.
 
1847
 
 
1848
        * thread_test.py: added thread testing program.
 
1849
 
 
1850
2001-02-07  Michele Comitini  <mcm@initd.net>
 
1851
 
 
1852
        * cursor.c: added code to allow threads during PQexec() calls.
 
1853
        
 
1854
        * cursor.c: added begin_pgconn to rollback() and commit()
 
1855
        so that the cursror is not in autocommit mode.
 
1856
 
 
1857
        * cursor.c: added rollback() and commit() methods to cursor
 
1858
        objects.
 
1859
 
 
1860
 
 
1861
2001-02-07  Federico Di Gregorio  <fog@debian.org>
 
1862
 
 
1863
        * connection.c (pgpy_conn_destroy): always delete item at index
 
1864
        0 and not i (because items shift in the list while deleting and
 
1865
        accessing items at len(list)/2 segfaults.)
 
1866
 
 
1867
2001-02-07  Michele Comitini  <mcm@initd.net>
 
1868
 
 
1869
        * connection.c: added some more checking to avoid
 
1870
        clearing of already cleared pgresults.  Calling curs_closall()
 
1871
        in conn_destroy() since cursors have to live even without
 
1872
        their parent connection, otherwise explicit deletion of
 
1873
        object referencing to those cursors can cause arbitrary code
 
1874
        to be executed.
 
1875
 
 
1876
        * cursor.c: some more checking to avoid trying to close
 
1877
        already close pgconnections.
 
1878
 
 
1879
2001-02-06  Federico Di Gregorio  <fog@debian.org> 
 
1880
 
 
1881
        * Makefile.pre.in (CFLAGS): added -Wall to catch bad programming
 
1882
        habits. 
 
1883
 
 
1884
        * cursor.c, connection.c: lots of fixes to the destroy stuff. now
 
1885
        all the cursor are destroyed *before* the connection goes away.
 
1886
 
 
1887
        * cursor.c (request_pgconn): another idiot error done by not
 
1888
        replacing dsn with owner_conn->dsn. fixed.
 
1889
        (dispose_pgconn): commented if to guarantee that the connection is
 
1890
        returned to the pool of available connections.
 
1891
 
 
1892
        * merged changes done by mcm.
 
1893
 
 
1894
        * cursor.c: general cleanup and better debugging/error
 
1895
        messages. changed xxx_conn into xxx_pgconn where still
 
1896
        missing. some pretty big changes to the way pgconn_request()
 
1897
        allocates new connections.
 
1898
 
 
1899
        * connection.c: removed all 'register' integers. obsolete, gcc
 
1900
        does a much better job optimizing cycles than a programmer
 
1901
        specifying how to use registers. 
 
1902
 
 
1903
        * module.h: some general cleanup and better definition of DPrintf
 
1904
        macro. now the DEBUG variable can be specified at configure time by
 
1905
        the --with-devel switch to ./configure.
 
1906
 
 
1907
2001-02-02  Michele Comitini  <mcm@initd.net>
 
1908
 
 
1909
        * cursor.c (Repository): Added functions for managing a connection
 
1910
        pool. Segfaults.
 
1911
 
 
1912
        * configure.in (Repository): removed check for mxdatetime headers.
 
1913
 
 
1914
2001-01-24  Federico Di Gregorio  <fog@debian.org>
 
1915
 
 
1916
        * first checkout from shinning new init.d cvs.
 
1917
 
 
1918
        * autotoolized build system. note that the mx headers are missing
 
1919
        from the cvs, you should get them someplace else (this is the
 
1920
        right way to do it, just require the headers in the configure
 
1921
        script.)
 
1922
 
 
1923
2001-01-21  Michele Comitini  <mcm@initd.net>
 
1924
 
 
1925
        * cursor.c (Repository): commit, abort, begin functions now check
 
1926
        the right exit status of the command.
 
1927
 
 
1928
        * connection.c (Repository): working commit() and rollback()
 
1929
        methods.
 
1930
 
 
1931
2001-01-20  Michele Comitini  <mcm@initd.net>
 
1932
 
 
1933
        * module.h (Repository): added member to cursor struct to handle
 
1934
        queries without output tuples.
 
1935
 
 
1936
        * cursor.c (Repository): new working methods: executemany,
 
1937
        fetchone, fetchmany, fetchall.
 
1938
 
 
1939
2001-01-18  Michele Comitini  <mcm@initd.net>
 
1940
 
 
1941
        * cursor.c (Repository): close working. destroy calling close.
 
1942
        close frees pg structures correctly.
 
1943
 
 
1944
        * connection.c (Repository): close method working.  destroy seems
 
1945
        working.
 
1946
 
 
1947
2001-01-17  Michele Comitini  <mcm@initd.net>
 
1948
 
 
1949
        * cursor.c (Repository): now each python cursor has its own
 
1950
        connection.  Each cursor works in a transaction block.
 
1951
 
 
1952
        * connection.c (Repository): added cursor list to connection
 
1953
        object
 
1954
 
 
1955
2001-01-14  Michele Comitini  <mcm@initd.net>
 
1956
 
 
1957
        * cursor.c (Repository): Beginning of code to implement cursor
 
1958
        functionalities as specified in DBA API 2.0, through the use of
 
1959
        transactions not cursors.
 
1960
 
 
1961
        * connection.c (Repository): Added some error checking code for pg
 
1962
        connection (will be moved to cursor?).
 
1963
 
 
1964
2001-01-13  Michele Comitini  <mcm@initd.net>
 
1965
 
 
1966
        * connection.c (Repository): Added error checking in connection
 
1967
        code to fail if connection to the db could not be opened.
 
1968
 
 
1969
        * module.h (Repository): New macro to help creating
 
1970
        DBAPITypeObjects.
 
1971
 
 
1972
        * module.c (Repository): DBAPITypeObject __cmp__ function is now
 
1973
        very simplified using recursion.
 
1974
 
 
1975
        * module.h (Repository): "DBAPIObject" changed to
 
1976
        "DBAPITypeObject".
 
1977
 
 
1978
        * module.c (Repository): Fixes for coerce function of DBAPIObjects
 
1979
        by Federico Di Gregorio <fog@initd.net>.
 
1980
        (Repository): Clean up and better naming for DBAPITypeObjects.
 
1981
 
 
1982
2001-01-08  Michele Comitini  <mcm@initd.net>
 
1983
 
 
1984
        * module.c (Repository): Corrected the exception hierarcy
 
1985
 
 
1986
        * connection.c (Repository): Begun to use the connection objects
 
1987
        of libpq
 
1988
 
 
1989
2001-01-07  Michele Comitini  <mcm@initd.net>
 
1990
 
 
1991
        * module.c (Repository): Added the Date/Time functions.
 
1992
 
 
1993
2001-01-06  Michele Comitini  <mcm@initd.net>
 
1994
 
 
1995
        * cursor.c (Repository): Skeleton of cursor interface.  All
 
1996
        methods and attributes of cursor objects are now available
 
1997
        in python.  They do nothing now.
 
1998
 
 
1999
2001-01-05  Michele Comitini  <mcm@initd.net>
 
2000
 
 
2001
        * module.c (Repository): Test version; module loaded with 
 
2002
        exception defined.
 
2003
        
 
2004
2001-01-05  Michele Comitini  <mcm@initd.net>
 
2005
 
 
2006
        * Setup.in (Repository): Setup file.
 
2007
 
 
2008
        * Makefile.pre.in (Repository): from the python source.
 
2009
 
 
2010
2001-01-05  Michele Comitini  <mcm@initd.net>
 
2011
 
 
2012
        * module.c: Written some code for defining exceptions.
 
2013
        
 
2014
        * module.h: Static variable for exceptions.
 
2015
        
 
2016
2001-01-04  Michele Comitini  <mcm@initd.net>
 
2017
 
 
2018
        * Changelog: pre-release just a few prototypes to get started.
 
2019
        
362
2020