~psycopg/psycopg/2.0.x

« back to all changes in this revision

Viewing changes to ChangeLog

  • Committer: Federico Di Gregorio
  • Date: 2009-04-20 22:38:09 UTC
  • Revision ID: fog@erin-20090420223809-y59bb142mo3vadnw
Better detection of PostgreSQL version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
2009-04-21  Federico Di Gregorio  <fog@initd.org>
 
2
 
 
3
        * setup.py: applied patch from Elvis Pranskevichus to make
 
4
        PostgreSQL version detection more robust.
 
5
 
 
6
2009-04-20  Federico Di Gregorio  <fog@initd.org>
 
7
 
 
8
        * Release 2.0.10.
 
9
 
 
10
        * psycopg/cursor_type.c: patch from Gangadharan to avoid double
 
11
        free of the cursor when the connection that creates it is closed
 
12
        implicitly by dealloc.
 
13
 
 
14
2009-04-19  Federico Di Gregorio  <fog@initd.org>
 
15
 
 
16
        * psycopg/connection_type.c: patch from Gangadharan to avoid double
 
17
        free of the connection object when calling close() implicitly.
 
18
 
 
19
        * psycopg/connection_type.c: patch from Marko Kreen to implement
 
20
        get_parameter_status().
 
21
 
 
22
        * psycopg/connection.*: exposed protocol_version and
 
23
        server_version attributes on the connection object.
 
24
 
 
25
        * lib/extras.py: patch from Marko Kreen to implement missing dict
 
26
        methods in DictRow.
 
27
 
 
28
2009-04-04  Federico Di Gregorio  <fog@initd.org>
 
29
 
 
30
        * connection_int.c(conn_notice_callback): removed all Python
 
31
        calls because conn_notice_callback() can be called without a lock
 
32
        on the GIL. Moved processing and cleanup of notices into their
 
33
        own functions that are called while holding the GIL.
 
34
 
 
35
2009-04-01  Federico Di Gregorio  <fog@initd.org>
 
36
 
 
37
        * Applied patch from Menno Smits to fix failures in test_dates
 
38
        when executed in older version of Python.
 
39
 
 
40
        * Applied patch from Menno Smits to fix lobject test failures.
 
41
 
 
42
2009-03-08  Federico Di Gregorio  <fog@initd.org>
 
43
 
 
44
        * microprotocols.c: None is always adapted to NULL to avoid
 
45
        errors when calling adapt on nested types without first checking
 
46
        for None.
 
47
 
 
48
2009-03-02  Federico Di Gregorio  <fog@initd.org>
 
49
 
 
50
        * Applied modified patch from Karsten Hilbert to provide a
 
51
        type-caster able to parse times with seconds in the time zone.
 
52
 
 
53
        * Applied patch from Menno Smits to avoid problems with DictCursor
 
54
        when the query is executed by a named cursor. Also added Menno's
 
55
        tests and uniformed other DictCursor tests.
 
56
 
 
57
        * psycopg/psycopgmodule.c: fixed unwanted exception when passing an
 
58
        explicit None to register_type().
 
59
 
 
60
        * psycopg/config.h: applied patch from Jason Erickson to build
 
61
        with MSVC. Solaris version of isinf() is now a macro.
 
62
 
 
63
2009-02-27  Federico Di Gregorio  <fog@initd.org>
 
64
 
 
65
        * psycopg/config.h: added check to provide compatible isinf()
 
66
        for Solaris (thanks to Jeremy Mason.)
 
67
 
 
68
2009-02-23  Federico Di Gregorio  <fog@initd.org>
 
69
 
 
70
        * Release 2.0.9.
 
71
 
 
72
2009-02-17  James Henstridge  <james@jamesh.id.au>
 
73
 
 
74
        * psycopg/utils.c (psycopg_escape_string): same here.
 
75
 
 
76
        * psycopg/adapter_binary.c (binary_escape): simplify PostgreSQL
 
77
        version check.
 
78
 
 
79
        * setup.py (psycopg_build_ext.finalize_options): use a single
 
80
        define of the PostgreSQL version in a form that can easily be used
 
81
        by #ifdefs.
 
82
 
 
83
        * tests/test_dates.py (DatetimeTests, mxDateTimeTests): full test
 
84
        coverage for datetime and time strings with and without time zone
 
85
        information.
 
86
 
 
87
        * psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): adjust
 
88
        to handle the changes in typecast_parse_time.
 
89
        (typecast_PYTIME_cast): add support for time zone aware time
 
90
        values.
 
91
 
 
92
        * psycopg/typecast_mxdatetime.c (typecast_MXDATE_cast): make sure
 
93
        that values with time zones are correctly processed (even though
 
94
        that means ignoring the time zone value).
 
95
        (typecast_MXTIME_cast): same here.
 
96
 
 
97
        * psycopg/typecast.c (typecast_parse_time): Update method to parse
 
98
        second resolution timezone offsets.
 
99
 
 
100
        * psycopg/typecast.c (typecast_parse_time): Fix up handling of
 
101
        negative timezone offsets with a non-zero minutes field.
 
102
 
 
103
        * tests/test_dates.py (DatetimeTests): Add tests for time zone
 
104
        parsing.  The test for HH:MM:SS time zones is disabled because we
 
105
        don't currently support it.
 
106
 
 
107
2009-02-16  Federico Di Gregorio  <fog@initd.org>
 
108
 
 
109
        * FreeBSD now has round(). Modified config.h as suggested by
 
110
        Jeroen Ruigrok van der Werven.
 
111
 
 
112
2009-02-06  Federico Di Gregorio  <fog@initd.org>
 
113
 
 
114
        * Applied patch by Markus Demleitner to make executemany() return
 
115
        the sum of modified rows by executed statements or -1 if any one
 
116
        statement returns it. This is still DBAPI-2.0 compliant.
 
117
 
 
118
2009-01-23  Federico Di Gregorio  <fog@initd.org>
 
119
 
 
120
        * Fixed problem mailed by Markus Demleitner about Python to
 
121
        PostgreSQL conversions of "nan" and "inf" floats resulting in
 
122
        backend errors. Added the new psycopg2.extensions.Float adapter
 
123
        that correctly handle both values and unit tests. (The opposite
 
124
        conversion was already working.)
 
125
 
 
126
2009-01-20  Federico Di Gregorio  <fog@initd.org>
 
127
 
 
128
        * Fixed problem reported by Lawrence Oluyede where
 
129
        register_type() didn't work on connection and cursors
 
130
        suclasses.
 
131
 
 
132
2009-01-10  Federico Di Gregorio  <fog@initd.org>
 
133
 
 
134
        * psycopg/cursor_type.c: cursor.isready() now raise an exception
 
135
        when the libpq PQconsumeInput() call fails.
 
136
 
 
137
2008-12-04  Federico Di Gregorio  <fog@initd.org>
 
138
 
 
139
        * psycopg/lobject_type.c: fixed memory leak. The patch was kindly
 
140
        sent from a psycopg user but I wrongly deleted the email so no
 
141
        kudos (and I had to fix the problem by myself!)
 
142
 
 
143
2008-11-25  Federico Di Gregorio  <fog@initd.org>
 
144
 
 
145
        * psycopg/cursor_type.c: integrated patch from Alejandro Dubrovsky.
 
146
        Note that the statically allocated buffer should probably go away
 
147
        in favor of always allocating the buffer dinamically.
 
148
 
 
149
        * psycopg/utils.c: modified patch from Alejandro Dubrovsky to
 
150
        support quoted separators in COPY queries: now all the string
 
151
        quoting code is in utils.c and the same function is used by
 
152
        qstrings and everything else (like the COPY code.)
 
153
 
 
154
2008-09-24  Federico Di Gregorio <fog@initd.org>
 
155
 
 
156
        * lib/extras.py: added inet support and related tests.
 
157
 
 
158
2008-09-23  James Henstridge  <james@jamesh.id.au>
 
159
 
 
160
        * psycopg/psycopg.h (NotSupportedError_doc): clean up
 
161
        spelling/grammar a bit, using exception description from the PEP.
 
162
 
 
163
2008-09-23  Federico Di Gregorio <fog@initd.org>
 
164
 
 
165
        * Applied patch from Brian Sutherland that fixes NULL
 
166
        valus in UUID support.
 
167
 
 
168
2008-09-19  Federico Di Gregorio <fog@initd.org>
 
169
 
 
170
        * lib/extras.py: added UUID support, modeled after the code
 
171
        sent by Brian Sutherland.
 
172
 
 
173
2008-09-16  Federico Di Gregorio <fog@initd.org>
 
174
 
 
175
        * Release 2.0.8.
 
176
 
 
177
2008-07-26  Federico Di Gregorio <fog@initd.org>
 
178
 
 
179
        * psycopg/connection_type.c: merged get_backend_pid() method
 
180
        by Casey Duncan.
 
181
 
 
182
2008-07-23  James Henstridge  <james@jamesh.id.au>
 
183
 
 
184
        * psycopg/lobject_type.c (lobject_setup): use
 
185
        FORMAT_CODE_PY_SSIZE_T in Dprintf() call for 64-bit compatibility
 
186
        when using Python 2.5 or later.
 
187
        (lobject_dealloc): same here.
 
188
 
 
189
2008-07-18  James Henstridge  <james@jamesh.id.au>
 
190
 
 
191
        * psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC
 
192
        traversal for quoted string adapters.
 
193
 
 
194
        * psycopg/adapter_pboolean.c (pboolean_traverse): add cyclic GC
 
195
        traversal for boolean adapters.
 
196
 
 
197
        * psycopg/adapter_mxdatetime.c (mxdatetime_traverse): add cyclic
 
198
        GC traversal for mxdatetime adapters.
 
199
 
 
200
        * psycopg/adapter_datetime.c (pydatetime_traverse): add cyclic GC
 
201
        traversal for datetime adapters.
 
202
 
 
203
2008-07-01  James Henstridge  <james@jamesh.id.au>
 
204
 
 
205
        * psycopg/adapter_binary.c (binary_traverse): add cyclic GC
 
206
        traversal for binary adapters.
 
207
 
 
208
        * psycopg/adapter_asis.c (asis_traverse): add cyclic GC traversal
 
209
        for AsIs adapters.
 
210
 
 
211
        * psycopg/adapter_list.c (list_traverse): add cyclic GC traversal
 
212
        for list adapters.
 
213
 
 
214
2008-05-28  James Henstridge  <james@jamesh.id.au>
 
215
 
 
216
        * psycopg/cursor_type.c (cursor_setup): incref before setting
 
217
        attributes, to make things GC-safe.
 
218
 
 
219
        * psycopg/cursor_int.c (curs_reset): make clearing of description
 
220
        and casts attributes GC-safe.
 
221
 
 
222
        * psycopg/typecast.c (typecast_traverse): implement cyclic GC
 
223
        traversal for typecasters.
 
224
 
 
225
        * psycopg/connection_type.c:
 
226
        * psycopg/cursor_type.c: add support for cyclic GC traversal (no
 
227
        support for clearing).
 
228
 
 
229
        * psycopg/python.h: add definitions for Py_CLEAR() and Py_VISIT()
 
230
        for compatibility with old versions of Python.
 
231
 
 
232
2008-06-28  Federico Di Gregorio <fog@initd.org>
 
233
 
 
234
        * setup.py: fixed problem with spaces in pg_config path.
 
235
 
 
236
2008-05-27  Federico Di Gregorio <fog@initd.org>
 
237
 
 
238
        * psycopg/pqpath.c: better error checks in _pq_copy_in_v3 to
 
239
        avoid calling blocking libpq functions when the connection to
 
240
        the server has been broken
 
241
 
 
242
2008-05-19  Federico Di Gregorio <fog@initd.org>
 
243
 
 
244
        * psycopg/cursor_type.c: fixed memory leak in .executemany(); on
 
245
        error "iter" was not dec'reffed.
 
246
 
 
247
2008-05-06  James Henstridge  <james@jamesh.id.au>
 
248
 
 
249
        * psycopg/lobject.h (lobjectObject): remove "mode" struct member,
 
250
        since it was unused.
 
251
 
 
252
        * psycopg/lobject_*.c: replace uses of the closed struct member,
 
253
        and change the Python level attribute to a getset.
 
254
 
 
255
        * psycopg/lobject.h (lobjectObject): remove the closed member,
 
256
        since "fd < 0" gives us the same information.  Reorder the struct
 
257
        members for better packing.
 
258
 
 
259
        * psycopg/lobject*: const'ify the code.
 
260
 
 
261
        * tests/test_lobject.py (LargeObjectTests): add more tests,
 
262
        including behaviour on closed lobjects and stale lobjects.
 
263
 
 
264
        * psycopg/lobject_type.c (psyco_lobj_close): don't mark the
 
265
        connection closed here because it is done by
 
266
        lobject_close_locked().
 
267
 
 
268
        * psycopg/lobject_int.c (lobject_open): mark objects as not closed
 
269
        if we successfully open them.
 
270
        (lobject_close_locked): mark the lobject closed here.
 
271
        (lobject_export): ensure we are in a transaction, since
 
272
        lo_export() issues multiple queries.
 
273
 
 
274
        * psycopg/lobject_type.c (lobject_setup): make lobjects start closed.
 
275
 
 
276
2008-05-05  James Henstridge  <james@jamesh.id.au>
 
277
 
 
278
        * psycopg/lobject.h: don't export the lobjectType symbol.
 
279
 
 
280
2008-05-05  Federico Di Gregorio  <fog@initd.org>
 
281
 
 
282
        * Fixed sun build problem by adding "sun" to config.h checks.
 
283
 
 
284
2008-05-05  James Henstridge  <james@jamesh.id.au>
 
285
 
 
286
        * psycopg/pqpath.c (pq_complete_error): get rid of double free
 
287
        error in case when pgres is NULL.
 
288
 
 
289
        * tests/test_lobject.py: add some basic tests for large object
 
290
        code.
 
291
 
 
292
        * psycopg/lobject*.[ch]: port the large object code to work with
 
293
        current psycopg code.
 
294
 
 
295
2006-09-01  Federico Di Gregorio  <fog@initd.org>
 
296
 
 
297
        * psycopg/connection_type.c: merged in double mutex destroy patch
 
298
        from Joerg Sonnenberger.
 
299
 
 
300
        * Implemented large objects support.
 
301
 
 
302
        * psycopg/connection_int.c: removed increment of self->mark,
 
303
        now it is done directly in pqpath.c to make sure even the
 
304
        large object support gets it.
 
305
 
 
306
        * Starting 2.1 development.
 
307
 
 
308
2008-04-21  James Henstridge  <james@jamesh.id.au>
 
309
 
 
310
        * tests/test_quote.py (QuotingTestCase.test_unicode): If the
 
311
        server encoding is not UTF8, skip the unicode test and emit a
 
312
        warning.
 
313
 
 
314
2008-04-21  Jorgen Austvik <Jorgen.Austvik@sun.com>
 
315
 
 
316
        * tests/*.py: use the DSN constructed in tests/__init__.py.
 
317
 
 
318
        * tests/__init__.py: allow setting the host, port and user for the
 
319
        DSN used by the tests through the environment.
 
320
 
 
321
2008-03-17  Federico Di Gregorio <fog@initd.org>
 
322
 
 
323
        * Release 2.0.7.
 
324
 
 
325
2008-03-31  James Henstridge  <james@jamesh.id.au>
 
326
 
 
327
        * psycopg/connection_type.c (connection_dealloc): free
 
328
        connection->encoding with free() instead of PyMem_Free().
 
329
 
 
330
        * psycopg/connection_int.c (conn_connect): use malloc() to
 
331
        allocate connection->encoding instead of PyMem_Malloc(), since it
 
332
        is freed in other places with free() and assigned to with
 
333
        strdup().
 
334
 
 
335
2008-03-26  James Henstridge  <james@jamesh.id.au>
 
336
 
 
337
        * psycopg/typecast.c (typecast_from_c): fix up some reference
 
338
        leaks.  This leak affected a bounded set of objects, so doesn't
 
339
        account for any gradual leaks.
 
340
 
 
341
2008-03-19  James Henstridge  <james@jamesh.id.au>
 
342
 
 
343
        * psycopg/connection_int.c (conn_notice_callback): don't leak
 
344
        notice messages.
 
345
 
 
346
2008-03-17  Federico Di Gregorio <fog@initd.org>
 
347
 
 
348
        * psycopg/adapter_datetime.c: fixed double decref when using 
 
349
        a PyObject as a parameter in a nested call (line 415).
 
350
 
 
351
2008-03-17  James Henstridge  <james@jamesh.id.au>
 
352
 
 
353
        * psycopg/typecast.c (typecast_parse_time): give the correct
 
354
        return value for partially parsed time values.
 
355
 
 
356
        * psycopg/typecast_mxdatetime.c (typecast_MXDATE_cast): return
 
357
        NULL after setting DataError.  Also, don't treat it as an error if
 
358
        typecast_parse_time() returns 0 (as might happen if the remainder
 
359
        of the string is " BC").
 
360
 
 
361
        * psycopg/typecast_datetime.c (typecast_PYDATE_cast): return NULL
 
362
        after setting DataError.
 
363
        (typecast_PYDATETIME_cast): same here.
 
364
        (typecast_PYTIME_cast): same here.
 
365
 
 
366
        * tests/test_dates.py
 
367
        (CommonDatetimeTestsMixin.test_parse_incomplete_date): test that
 
368
        parsing incomplete date values results in DataError.
 
369
        (CommonDatetimeTestsMixin.test_parse_incomplete_time): same for
 
370
        times.
 
371
        (CommonDatetimeTestsMixin.test_parse_incomplete_time): same for
 
372
        datetimes.
 
373
 
 
374
2008-03-07  Jason Erickson  <jerickso@stickpeople.com>
 
375
 
 
376
        * psycopg/pqpath.c (pq_raise): if PSYCOPG_EXTENSIONS is not
 
377
        defined, raise OperationalError rather than
 
378
        TransactionRollbackError for deadlock or serialisation errors for
 
379
        protocol versions less than 3.
 
380
 
 
381
        * psycopg/psycopgmodule.c (psyco_connect): fix off by one error in
 
382
        calculating the length of the DSN.
 
383
 
 
384
2008-03-07  James Henstridge  <james@jamesh.id.au>
 
385
 
 
386
        * psycopg/pqpath.c (_pq_fetch_tuples): Don't call Python APIs
 
387
        without holding the GIL.
 
388
 
 
389
2008-02-27  James Henstridge  <james@jamesh.id.au>
 
390
 
 
391
        * NEWS: add some draft NEWS items for a 2.0.7 release.
 
392
 
 
393
        * runtests.py: add a harness to run all the psycopg tests against
 
394
        the version built by distutils.
 
395
 
 
396
2008-01-22  James Henstridge  <james@jamesh.id.au>
 
397
 
 
398
        * psycopg/typecast.c (typecast_pydatetime): make array static.
 
399
        (typecast_mxdatetime): same here.
 
400
 
 
401
        * psycopg/typecast_builtins.c (typecast_builtins): make array
 
402
        static.
 
403
 
 
404
        * psycopg/psycopgmodule.c: add hidden visibility to a bunch of
 
405
        global variables here.
 
406
 
 
407
        * psycopg/psycopg.h: add set QueryCanceledError and
 
408
        TransactionRollbackError to hidden visibility.
 
409
 
 
410
        * psycopg/*.[ch]: add const qualifier to various string arguments
 
411
        to functions (typecast functions and conn_switch_isolation_level).
 
412
 
 
413
2008-01-21  James Henstridge  <james@jamesh.id.au>
 
414
 
 
415
        * setup.cfg (define): remove PSYCOPG_DISPLAY_SIZE from default
 
416
        list of defines, as discussed on mailing list.  It slows down
 
417
        queries with very little benefit.
 
418
 
 
419
        * psycypg/*.h: apply HIDDEN to all global variables and functions
 
420
        that should not be exported from the module.  This results in a 5%
 
421
        reduction in code size and shortens the dynamic symbol table.
 
422
 
 
423
        * psycopg/config.h: If GCC >= 4.0 is installed, define the HIDDEN
 
424
        symbol to apply the "hidden" visibility attribute.
 
425
 
 
426
2008-01-19  James Henstridge  <james@jamesh.id.au>
 
427
 
 
428
        * tests/test_connection.py (ConnectionTests): add simple tests for
 
429
        the Connection and Cursor "closed" attributes.
 
430
 
 
431
        * psycopg/cursor_type.c (psyco_curs_get_closed): add a "closed"
 
432
        attribute to cursors.  It will be True if either the cursor or its
 
433
        associated connection are closed.  This fixes bug #164.
 
434
 
 
435
        * psycopg/pqpath.c (pq_raise): remove unused arguments to
 
436
        function, and simplify.
 
437
        (pq_resolve_critical): make function static, since it isn't being
 
438
        used outside of pqpath.c any more.
 
439
 
 
440
2008-01-17  James Henstridge  <james@jamesh.id.au>
 
441
 
 
442
        * ZPsycopgDA/DA.py (Connection.__init__): Default the encoding to
 
443
        UTF-8, fixing bug #190.
 
444
        (App.ImageFile): simplify ImageFile import using patch from
 
445
        chrism, fixing bug #198.
 
446
 
 
447
2008-01-16  James Henstridge  <james@jamesh.id.au>
 
448
 
 
449
        * tests/test_transaction.py (DeadlockSerializationTestCase): port
 
450
        over some tests for serialisation and deadlock errors,
 
451
        demonstrating that TransactionRollbackError is generated.
 
452
        (QueryCancelationTests): add a test to show that
 
453
        QueryCanceledError is raised on statement timeouts.
 
454
 
 
455
        * psycopg2da/adapter.py (_handle_psycopg_exception): rather than
 
456
        checking exception messages, check for TransactionRollbackError.
 
457
 
 
458
        * psycopg/pqpath.c (exception_from_sqlstate): return
 
459
        TransactionRollbackError for 40xxx errors, and QueryCanceledError
 
460
        for 57014 errors.
 
461
        (pq_raise): If we are using an old server, use
 
462
        TransactionRollbackError if the error message contains "could not
 
463
        serialize" or "deadlock detected".
 
464
 
 
465
        * psycopg/psycopgmodule.c (_psyco_connect_fill_exc): remove
 
466
        function, since we no longer need to store pointers to the
 
467
        exceptions in the connection.  This also fixes a reference leak.
 
468
        (psyco_connect): remove _psyco_connect_fill_exc() function call.
 
469
 
 
470
        * psycopg/connection.h (connectionObject): remove exception
 
471
        members from struct.
 
472
 
 
473
        * psycopg/connection_type.c (connectionObject_getsets): modify the
 
474
        exception attributes on the connection object from members to
 
475
        getsets.  This reduces the size of the struct.
 
476
 
 
477
        * lib/extensions.py: import the two new extensions.
 
478
 
 
479
        * psycopg/psycopgmodule.c (exctable): add new QueryCanceledError
 
480
        and TransactionRollbackError exceptions.
 
481
 
 
482
2008-01-16  James Henstridge  <james@jamesh.id.au>
 
483
 
 
484
        * tests/__init__.py (test_suite): add date tests to test suite.
 
485
 
 
486
        * tests/test_dates.py: add tests for date/time typecasting and
 
487
        adaption.
 
488
 
 
489
        * psycopg/adapter_mxdatetime.c (mxdatetime_str): add support for
 
490
        outputting BC dates (which involves switching them to one-based
 
491
        dates).  Also remove broken handling of microseconds.
 
492
 
 
493
        * psycopg/typecast.c (typecast_parse_date): if the string ends
 
494
        with "BC" adjust the year value to be a zero-based BC value as
 
495
        used by mx.DateTime (datetime doesn't support BC dates).
 
496
        (typecast_parse_time): ignore ' ', 'B' and 'C' in time strings
 
497
        rather than treating them as part of the seconds part of the time.
 
498
 
 
499
2008-01-14  James Henstridge  <james@jamesh.id.au>
 
500
 
 
501
        * psycopg/typecast_array.c (typecast_array_scan): set an initial
 
502
        value for quotes to keep gcc happy.
 
503
 
 
504
        * psycopg/*.c: add missing static modifier on many functions.
 
505
 
 
506
2008-01-12  James Henstridge  <james@jamesh.id.au>
 
507
 
 
508
        * tests/test_transaction.py
 
509
        (TransactionTestCase.test_failed_commit): Expect IntegrityError
 
510
        instead of OperationalError.
 
511
 
 
512
        * psycopg/pqpath.c (exception_from_sqlstate): new function that
 
513
        converts an SQLSTATE error code to the corresponding exception
 
514
        class.
 
515
        (pq_raise): use exception_from_sqlstate() to pick which exception
 
516
        to use when working with protocol version 3.
 
517
        (pq_complete_error): Let pq_raise() pick an appropriate exception
 
518
        rather than forcing OperationalError.
 
519
 
 
520
2008-01-11  James Henstridge  <james@jamesh.id.au>
 
521
 
 
522
        * psycopg/adapter_binary.c (binary_quote): apply Brandon Rhodes'
 
523
        patch from ticket #209 to check return value from
 
524
        PyObject_AsCharBuffer().  This fixes the segfault.
 
525
        (binary_quote): switch from PyObject_AsCharBuffer() to
 
526
        PyObject_AsReadBuffer() to support buffer objects that don't
 
527
        implement the bf_getcharbuf protocol.
 
528
 
 
529
        * tests/types_basic.py (TypesBasicTests.testBinary): Test round
 
530
        tripping of bytea buffers.  Currently segfaults.
 
531
 
 
532
        * psycopg/connection_int.c (conn_close): fix for new
 
533
        pq_abort_locked() prototype.
 
534
        (conn_switch_isolation_level): fix for new pq_abort_locked()
 
535
        prototype, and use pq_complete_error() to show error message.
 
536
        (conn_set_client_encoding): same here.
 
537
 
 
538
        * psycopg/pqpath.c (pq_execute_command_locked): remove static
 
539
        modifier.
 
540
        (pq_complete_error): same here.
 
541
        (pq_abort_locked): add pgres and error arguments.
 
542
        (pq_abort): call pq_abort_locked() to reduce code duplication.
 
543
 
 
544
2007-12-23  James Henstridge  <james@jamesh.id.au>
 
545
 
 
546
        * psycopg/pqpath.c (pq_execute_command_locked): add an error
 
547
        argument to hold an error when no PGresult is returned by PQexec,
 
548
        rather than using pq_set_critical().
 
549
        (pq_complete_error): new function that converts the error returned
 
550
        by pq_execute_command_locked() to a Python exception.
 
551
        (pq_begin_locked): add error argument.
 
552
        (pq_commit): use pq_complete_error().
 
553
        (pq_abort): use pq_complete_error().
 
554
        (pq_abort_locked): always call pq_set_critical() on error, and
 
555
        clear the error message from pq_execute_command_locked().
 
556
        (pq_execute): use pq_complete_error() to handle the error from
 
557
        pq_begin_locked().
 
558
 
 
559
        * psycopg/pqpath.c (pq_begin): remove unused function.
 
560
 
 
561
        * psycopg/connection_type.c (psyco_conn_commit): if conn_commit()
 
562
        raises an error, just return NULL, since it is now setting an
 
563
        exception itself.
 
564
        (psyco_conn_rollback): same here.
 
565
 
 
566
        * psycopg/connection_int.c (conn_commit): don't drop GIL and lock
 
567
        connection before calling pq_commit().
 
568
        (conn_rollback): same here.
 
569
        (conn_close): use pq_abort_locked().
 
570
        (conn_switch_isolation_level): same here.
 
571
        (conn_set_client_encoding): same here.
 
572
 
 
573
        * psycopg/pqpath.h: add prototype for pq_abort_locked().
 
574
 
 
575
        * psycopg/pqpath.c (pq_commit): convert function to run with GIL
 
576
        held, and handle errors appropriately.
 
577
        (pq_abort): same here.
 
578
        (pq_abort_locked): new function to abort a locked connection.
 
579
 
 
580
2007-12-22  James Henstridge  <james@jamesh.id.au>
 
581
 
 
582
        * psycopg/pqpath.c (pq_raise): add a "pgres" argument so we can
 
583
        generate nice errors not related to a particular cursor.
 
584
        (pq_execute): use pq_begin_locked() rather than pq_begin().  Use
 
585
        pq_raise() to handle any errors from it.
 
586
 
 
587
        * psycopg/pqpath.c (pq_execute_command_locked): helper function
 
588
        used to execute a command-style query on a locked connection.
 
589
        (pq_begin_locked): a variant of pq_begin() that uses
 
590
        pq_execute_command_locked().
 
591
        (pq_begin): rewrite to use pq_begin_locked().
 
592
 
 
593
2007-12-22  James Henstridge  <james@jamesh.id.au>
 
594
 
 
595
        * psycopg/config.h: only print debug messages if
 
596
        psycopg_debug_enabled is true.
 
597
 
 
598
        * psycopg/psycopgmodule.c (init_psycopg): set
 
599
        psycopg_debug_enabled to true if the $PSYCOPG_DEBUG environment
 
600
        variable is set.
 
601
 
 
602
2007-12-21  Federico Di Gregorio <fog@initd.org>
 
603
 
 
604
        * Applied win32 patch from Jason Erickson.
 
605
 
 
606
        * Applied patch from Thomas Lotze to use correct version
 
607
        for new Zopes.
 
608
 
 
609
2007-12-20  James Henstridge  <james@jamesh.id.au>
 
610
 
 
611
        * psycopg/pqpath.c (pq_execute): uncomment the "curs->pgres ==
 
612
        NULL" error handler after the PQexec() call.  This is needed to
 
613
        catch database disconnects (and probably other errors).  According
 
614
        to Federico, it was commented out to avoid a spurious error, so we
 
615
        should watch for problems.
 
616
 
 
617
2007-12-20  James Henstridge  <james@jamesh.id.au>
 
618
 
 
619
        * psycopg/pqpath.c (pq_raise): only remove the first 8 characters
 
620
        of the exception message if it actually gives the severity.
 
621
 
 
622
        * psycopg/pqpath.h (pq_resolve_critical): add prototype, since
 
623
        this function is being used from connection_int.c.
 
624
 
 
625
        * psycopg/psycopg.h: update psyco_set_error() prototype.
 
626
 
 
627
        * psycopg/psycopgmodule.c (psyco_errors_init): set pgerror, pgcode
 
628
        and cursor class attributes to None on psycopg2.Error so that the
 
629
        attributes will always be available (simplifies error handling).
 
630
        (psyco_set_error): add const qualifiers to msg, pgerror and pgcode
 
631
        arguments.
 
632
        Don't bother setting pgerror, pgcode or cursor to None if they are
 
633
        not provided -- the class defaults take care of this.
 
634
 
 
635
2007-11-11  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 
636
 
 
637
        * Use escape string syntax for string escape if connected to a
 
638
          server requiring it.
 
639
 
 
640
2007-11-09  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 
641
 
 
642
        * Use escape string syntax for binary escape if connected to a
 
643
          server requiring it.
 
644
 
 
645
        * Put a limit on the number of notices stored in the connection.
 
646
 
 
647
2007-10-21  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 
648
 
 
649
        * Fixed bug #192 (Decimal support not safe for use with multiple sub
 
650
          interpreters) as proposed by Graham Dumpleton.
 
651
 
 
652
2007-09-08  Federico Di Gregorio  <fog@initd.org>
 
653
 
 
654
        * Added MonoDevelop project, yahi!
 
655
 
 
656
2007-09-06  Federico Di Gregorio  <fog@initd.org>
 
657
 
 
658
        * Fixed bug #194.
 
659
 
 
660
2007-09-01  Federico Di Gregorio  <fog@initd.org>
 
661
 
 
662
        * Added "name" parameter to all .cursor() calls in extras.py.
 
663
 
 
664
2007-05-29  Federico Di Gregorio  <fog@initd.org>
 
665
 
 
666
        * Release 2.0.6.
 
667
 
 
668
        * ZPsycopgDA/DA.py: removed call to now obsolete .set_type_casts().
 
669
 
 
670
        * Applied patch from mkz (ticket #187) to add error handling when
 
671
        calling conn_commit() and conn_rollback(). Fixes #187.
 
672
 
 
673
        * cursor.copy_expert() implementation by David Rushby (copy_expert
 
674
        set 5/5.)
 
675
 
 
676
        * SQL validation refactor patch from David Rushby (copy_expert
 
677
        set 4/5.)
 
678
 
 
679
        * Reference count leak fix from David Rushby (copy_expert set 3/5.)
 
680
 
 
681
        * 64 bit fix patch from David Rushby (copy_expert set 2/5.)
 
682
 
 
683
        * Applied whitespace normalization patch from David Rushby (copy_expert
 
684
        set 1/5.)
 
685
 
 
686
2007-04-25  Federico Di Gregorio  <fog@initd.org>
 
687
 
 
688
        * psycopg/connection_type.c: added support for a new method
 
689
        .get_transaction_status() that returns the backend transaction
 
690
        status as libpq knows. Also added some symbolic constants to
 
691
        psycopg.extensions module (TRANSACTION_STATUS_XXX).
 
692
 
 
693
2007-04-14  Federico Di Gregorio  <fog@initd.org>
 
694
 
 
695
        * psycopg/psycopg.h: fixed probable typo in definition of
 
696
        CONV_CODE_PY_SSIZE_T: d -> i for Python < 2.5.
 
697
 
 
698
        * Fixed some of the examples.
 
699
 
 
700
2007-04-13  Federico Di Gregorio  <fog@initd.org>
 
701
 
 
702
        * Applied slighly modified patch from daniel (#176). Made
 
703
        buffer size a compile-time parameter.
 
704
 
 
705
        * Applied patch from David Rushby: typecast_binary.c cleanup.
 
706
 
 
707
        * Applied patch from David Rushby for int->size_t transition.
 
708
 
 
709
2007-04-12  Federico Di Gregorio  <fog@initd.org>
 
710
 
 
711
        * Applied patch from Jason Erickson to fix win32 build glitches.
 
712
 
 
713
2007-04-11  Federico Di Gregorio  <fog@initd.org>
 
714
 
 
715
        * Release 2.0.6b2.
 
716
 
 
717
        * psycopg/cursor_type.c: added check to raise an error when
 
718
        some crazy programmer tries to use different argument formats
 
719
        in the same query string. Fixes #162.
 
720
 
 
721
        * Applied patch from David Rushby to fix win32 builds.
 
722
 
 
723
2007-04-10  Federico Di Gregorio  <fog@initd.org>
 
724
 
 
725
        * Applied patch from David Rushby to fix mem and ref leaks in
 
726
          psycopg2.connect().
 
727
 
 
728
        * Applied super-patch from David Rushby to fix Python 2.5 and 64
 
729
        bit problems (all of them, kudos!)
 
730
 
 
731
2007-02-22  Federico Di Gregorio  <fog@initd.org>
 
732
 
 
733
        * Added support for per-connection and per-cursor typecasters.
 
734
 
 
735
2007-02-11  Federico Di Gregorio  <fog@initd.org>
 
736
 
 
737
        * psycopg/pqpath.c: ported psycopg1 patch from #135.
 
738
 
 
739
        * psycopg/connection_type.c: now the password is obfuscated after we try
 
740
        to connect to the backend. This really fixes #147.
 
741
 
 
742
2007-01-20  Federico Di Gregorio  <fog@initd.org>
 
743
 
 
744
        * Release 2.0.6b1.
 
745
 
 
746
        * Added encodings patch from Karsten Hilbert.
 
747
 
 
748
2007-01-19  Federico Di Gregorio  <fog@initd.org>
 
749
 
 
750
        * psycopg/adapt_list.c: added support for None. And this closes
 
751
        the other half.
 
752
 
 
753
        * psycopg/typecast_array.c: added support for detecting the NULL
 
754
        special string and converting it as a real NULL if not enclosed in
 
755
        quotes. This closes half of #154.
 
756
 
 
757
2007-01-16  Federico Di Gregorio  <fog@initd.org>
 
758
 
 
759
        * psycopg/connection_type.c: .set_client_encoding() now converts the
 
760
        argument to upper case to make sure it has the same case of the entries
 
761
        in the PostgreSQL -> Python encoding conversion table.
 
762
 
 
763
        * lib/extras.py: merged DictCursor from #143 and renamed it 
 
764
        RealDictCursor because allows access by cursor keys _only_.
 
765
        Also cleaned up a little bit the implementation of both DictCursor
 
766
        and RealDictCursor by introducing DictCursorBase.
 
767
 
 
768
        * psycopg/pqpath.cs: new checks for NULL values (meaning an
 
769
          exception was raised) in all method calls (fixes #134).
 
770
 
 
771
        * psycopg/psycopgmodule.c: applied LATIN patch from #148.
 
772
 
 
773
        * psycopg/connection_type.c: obfuscate password after using it.
 
774
 
 
775
        * lib/extras.py: moved SQL_IN to extensions.py; we're now officially
 
776
        adapting tuples.
 
777
 
 
778
        * psycopg/adapt_mxdatetime.c: fixed #137 by accessing the 'date' and
 
779
        'time' attributes of the mx.DateTime instance: they are always in ISO
 
780
        format.
 
781
 
 
782
        * psycopg/typecast_datetime.c: fixed problem with year > 9999.
 
783
 
 
784
2006-10-29  Federico Di Gregorio  <fog@initd.org>
 
785
 
 
786
        * Applied patch from Jason Erickson to make psycopg build
 
787
        again on win32 (closes: #132).
 
788
 
 
789
2006-09-30  Federico Di Gregorio  <fog@initd.org>
 
790
 
 
791
        * ZpsycopgDA/DA.py: applied the infinity patch from 1.1 (fixes #122).
 
792
 
 
793
        * psycopg/adapter_datetime.py: fixed conversion problem with seconds
 
794
        in the (59,60) range (fixes #131).
 
795
 
 
796
        * ZpsycopgDA/DA.py: we now split on GMT+, GMT-, + or -. This should
 
797
        fix bug #129.
 
798
 
 
799
        * psycopg/adapter_datetime.py: now TimeFromTicks and
 
800
        TimestampFromTicks both accept fractionary seconds (fixes #130).
 
801
 
 
802
2006-09-23  Federico Di Gregorio  <fog@initd.org>
 
803
 
 
804
        * lib/errorcodes.py: added list of all PostgreSQL error codes
 
805
        compiled by Johan Dahlin.
 
806
 
 
807
        * psycopg/psycopg.h: applied compatibility macros from PEP 353.
 
808
 
 
809
        * Applied patch 1/3 from Piet Delport; from his email:
 
810
           
 
811
           psycopg2-Py_ssize_t-input.diff adjusts variables used for parameters
 
812
           and return values.  These changes only prevent overflowing on values
 
813
           greater than 32-bits, so they're not as critical as the other two
 
814
           patches.  I tried to leave places unchanged where the input size is
 
815
           already constrained to sizeof(int), but i might have missed a few
 
816
           either way, not being too familiar with the codebase.
 
817
 
 
818
        * Applied patch 2/3 from Piet Delport; from his email:
 
819
           
 
820
           psycopg2-Py_ssize_t-output.diff adjusts variables used as outputs
 
821
           from CPython API calls:  without it the calls try to write 64 bits
 
822
           to 32 bit locations, trampling over adjacent values/pointers,
 
823
           and segfaulting later.
 
824
 
 
825
        * Applied patch 1/3 from Piet Delport; from his email:
 
826
        
 
827
           psycopg2-PyObject_HEAD.diff adds missing underscores to several
 
828
           "PyObject_HEAD" declarations.  As far as i can tell from gdb, the 
 
829
           "PyObject HEAD" versions end up accidentally meaning almost exactly
 
830
           the same, but get aligned differently on AMD64, resulting in wrong
 
831
           size calculation and memory corruption later.
 
832
 
 
833
2006-09-11  Federico Di Gregorio  <fog@initd.org>
 
834
 
 
835
        * Fixed syntax error in lib/extras.py (see #123)
 
836
 
 
837
2006-09-02  Federico Di Gregorio  <fog@initd.org>
 
838
 
 
839
        * psycopg/adapter_mxdatetime.c, psycopg/psycopgmodule.c: fixed last
 
840
        problem with non-constant initializers.
 
841
 
 
842
        * psycopg/connection_type.c: applied patch from Joerg Sonnenberger
 
843
        to fix a double mutex destroy.
 
844
 
 
845
        * Release 2.0.5.1.
 
846
 
 
847
        * psycopg/cursor_type.c: applied patch from Jason Erickson to
 
848
        build on MSVC and older gcc.
 
849
 
 
850
2006-09-01  Federico Di Gregorio  <fog@initd.org>
 
851
 
 
852
        * Release 2.0.5.
 
853
 
 
854
        * Fixed patch from #119, see tracker for details.
 
855
 
 
856
        * Preparing release 2.0.5.
 
857
 
 
858
        * psycopg/psycopgmodule.c: fixed filling of connection errors
 
859
        to include OperationalError.
 
860
 
 
861
        * setup.py: removed pydatetime option from initialize_options
 
862
        to make sure that the value in setup.cfg is used.
 
863
 
 
864
        * psycopg/psycopgmodule.c: applied patch from jdahlin (#120)
 
865
        to have .connect() accept either a string or int as the port
 
866
        parameter.
 
867
 
 
868
        * psycopg/adapter_binary.c: applied patch from jdahlin (#119)
 
869
        to fix the segfault on empty binary buffers.
 
870
 
 
871
        * psycopg/connection_type.c: added .status attribute to expose
 
872
        the internal status.
 
873
 
 
874
        * psycopg/pqpath.c: applied patch from intgr (#117) to fix
 
875
        segfault on null queries.
 
876
 
 
877
        * psycopg/cursor_type.c: applied patch from intgr (#116) to
 
878
        fix bad keyword naming and segfault in .executemany().
 
879
 
 
880
        * ZPsycopgDA/DA.py: applied ImageFile patch from Charlie
 
881
        Clark.
 
882
 
 
883
        * lib/pool.py: applied logging patch from Charlie Clark.
 
884
        It will probably get a makeup and be moved to the top-level
 
885
        module later.
 
886
 
 
887
2006-08-02  Federico Di Gregorio  <fog@initd.org>
 
888
 
 
889
        * Release 2.0.4.
 
890
 
 
891
        * Fixed bug in float conversion (check for NULL string was
 
892
        erroneously removed in 2.0.3!)
 
893
 
 
894
2006-07-31  Federico Di Gregorio  <fog@initd.org>
 
895
 
 
896
        * Release 2.0.3.
 
897
 
 
898
        * psycopg/cursor_type.c: applied patch from jbellis (#113) to
 
899
        allow column selection in .copy_from().
 
900
 
 
901
        * psycopg/psycopgmodule.c: fixed memory leak in custom exceptions
 
902
        (applied patch from #114).
 
903
 
 
904
2006-07-26  Federico Di Gregorio  <fog@initd.org>
 
905
 
 
906
        * psycopg/adapter_datetime.c (pydatetime_str): fixed error
 
907
        in conversion of microseconds for intervals and better algo
 
908
        (thanks to Mario Frasca.)
 
909
 
 
910
2006-06-18  Federico Di Gregorio  <fog@initd.org>
 
911
 
 
912
        * psycopg/adapter_binary.c: same as below.
 
913
 
 
914
        * psycopg/adapter_qstring.c: does not segfault anymore if 
 
915
        .getquoted() is called without preparing the qstring with 
 
916
        the connection.
 
917
 
 
918
2006-06-15  Federico Di Gregorio  <fog@initd.org>
 
919
 
 
920
        * psycopg/typecast_basic.c: fixed problem with bogus
 
921
        conversion when importing gtk (that was crazy, I didn't
 
922
        understand why it happened but the new code just fixes it.)
 
923
 
 
924
        * ZPsycopgDA/db.py: better type analisys, using an hash
 
925
        instead of a series of if (variation on patch from Charlie
 
926
        Clark.)
 
927
 
 
928
2006-06-11  Federico Di Gregorio  <fog@initd.org>
 
929
 
 
930
        * Release 2.0.2.
 
931
 
 
932
        * psycopg/typecast_array.c (typecast_array_cleanup): fixed a
 
933
        problem with typecast_array_cleanup always returning the new
 
934
        string length shorter by 1 (Closes: #93).
 
935
 
 
936
        * psycopg/adapter_binary.c: as below.
 
937
 
 
938
        * psycopg/adapter_qstring.c: wrapped #warning in #ifdef __GCC__
 
939
        because other compilers don't have it and it will just break
 
940
        compilation (patch from jason, our great win32 builder).
 
941
 
 
942
        * psycopg/adapter_list.c: applied patch to adapt an empty list
 
943
        into an empty array and not to NULL (from iGGy, closes: #108).
 
944
 
 
945
        * psycopg/cursor_type.c: applied patch from wkv to avoid
 
946
        under-allocating query space when the parameters are not of the
 
947
        right type (Closes: #110).
 
948
 
 
949
        * psycopg/connection_int.c: applied patch from wkv to avoid off 
 
950
        by one allocation of connection encoding string (Closes: #109).
 
951
 
 
952
2006-06-09  Federico Di Gregorio  <fog@initd.org>
 
953
 
 
954
        * Release 2.0.1.
 
955
 
 
956
        * Fixed some buglets in ZPsycopgDA (was unable to load due
 
957
        to shorter version number in psycopg module.)
 
958
 
 
959
2006-06-08  Federico Di Gregorio  <fog@initd.org>
 
960
        
 
961
        * Release 2.0.
 
962
 
 
963
        * ZPsycopgDA/DA.py: removed Browse table for 2.0 release; we'll
 
964
        add it back later.
 
965
 
 
966
2006-05-26  Federico Di Gregorio  <fog@initd.org>
 
967
 
 
968
        * Applied better PostgreSQL patch from AA.
 
969
 
 
970
2006-05-24  Federico Di Gregorio  <fog@initd.org>
 
971
 
 
972
        * Enabled 8.1.4 security fix only when the version is >= 8.1.4, fall
 
973
        back to old code otherwise.
 
974
        
 
975
        * psycopg/adapter_qstring.c: now quote using PQescapeStringConn if
 
976
        available. 
 
977
 
 
978
        * psycopg/adapter_binary.c: now quote using PQescapeByteaConn if
 
979
        available. 
 
980
 
 
981
2006-04-38  Federico Di Gregorio  <fog@initd.org>
 
982
 
 
983
        * setup.py: fixed little problem with mx_include_dir as suggested
 
984
        by kvc (this closes #102).
 
985
 
 
986
2006-04-24  Federico Di Gregorio  <fog@initd.org>
 
987
 
 
988
        * psycopg/adapter_pboolean.c: added the possibility to format boolean
 
989
        values as "true" and "false" instead of "'t'" and "'f'".
 
990
 
 
991
2006-03-08  Federico Di Gregorio  <fog@initd.org>
 
992
 
 
993
        * lib/extras.py: added .next() to DictCursot to support iteration.
 
994
 
 
995
2006-03-02  Federico Di Gregorio  <fog@initd.org>
 
996
 
 
997
        * psycopg/typecast_array.c (typecast_array_tokenize): removed cast
 
998
        to build without warnings on 64 bit arches.
 
999
 
 
1000
2006-02-11  Federico Di Gregorio  <fog@initd.org>
 
1001
 
 
1002
        * Release 2.0 beta 8.
 
1003
 
 
1004
        * psycopg/config.h: applied patch from Jason to fix handle leak on
 
1005
        win32, as documented in #92.
 
1006
 
 
1007
2006-02-11  Federico Di Gregorio  <fog@initd.org>
 
1008
 
 
1009
        * Release 2.0 beta 7.
 
1010
 
 
1011
        * psycopg/psycopgmodule.c: applied fix for memory overflow in
 
1012
        connect() (reported by solt, #91.)
 
1013
 
 
1014
        * setup.py: applied patch from lbruno.
 
1015
 
 
1016
2006-01-11  Federico Di Gregorio  <fog@initd.org>
 
1017
 
 
1018
        * setup.py: does not report an error in pg_config unless the pg_config
 
1019
        was explicitly set (allows for building with old options.) 
 
1020
 
 
1021
2006-01-06  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 
1022
 
 
1023
        * setup.py: libpq.dll not used anymore. win32 setup uses pg_config too.
 
1024
 
 
1025
2006-01-05  Federico Di Gregorio  <fog@initd.org>
 
1026
 
 
1027
        * psycopg/psycopgmodule.c (psyco_set_error): added function to set extra
 
1028
        parameters on ProgrammingError instances. Also modified all occurances of
 
1029
        PyErr_SetString(ProgrammingError,...) to psycopg_set_error(). 
 
1030
 
 
1031
        * setup.{cfg,py}: we now use pg_config to locate PostgreSQL libraries
 
1032
        and headers (modified patch from lbruno, see #70.)
 
1033
 
 
1034
2006-01-01  Federico Di Gregorio  <fog@initd.org>
 
1035
 
 
1036
        * Preparing release 2 beta 7.
 
1037
 
 
1038
        * MANIFEST.in: we now distrbute pre-built documentation (still need
 
1039
        to add to setup.py the code necessary to build docs as part of the
 
1040
        build process.)
 
1041
 
 
1042
        * psycopg/connection_int.c: PostgreSQL encoding names are now force
 
1043
        uppercase (after all PostgreSQL documentation reports them this way.)
 
1044
 
 
1045
2005-12-11 Federico Di Gregorio <fog@initd.org>
 
1046
 
 
1047
        * psycopg/typecast_array.c (typecast_array_cleanup): added functio
 
1048
        to cleanup the "[...]=" part of an array result. This probably will
 
1049
        need some more work for nested arrays but it fixed every test I was
 
1050
        able to write. (Closes: #80)
 
1051
 
 
1052
2005-12-11  Federico Di Gregorio  <fog@initd.org>
 
1053
 
 
1054
        * setup.py: half-applied patch from Tavis to specify mx_include_dir
 
1055
        in setup.cfg.
 
1056
 
 
1057
        * psycopg/typecast.c (typecast_parse_time): cz limit in the while
 
1058
        loop is 6, not 5. This solve the problem with "fractionary" time zones
 
1059
        and fixes #78. 
 
1060
 
 
1061
2005-12-06  Federico Di Gregorio  <fog@initd.org>
 
1062
 
 
1063
        * lib/extras.py: added .callproc() to DictCursor as suggested
 
1064
        by Philip Semanchuk.
 
1065
 
 
1066
2005-11-29  Federico Di Gregorio  <fog@initd.org>
 
1067
 
 
1068
        * MANIFEST.in: added docs/async.txt. (Closes: #75)
 
1069
 
 
1070
2005-11-26  Daniele Varrazzo  <daniele.varrazzo@gmail.com>
 
1071
 
 
1072
        * psycopg/psycopgmodule.c: fixed exceptions refcount.
 
1073
 
 
1074
        * Fixed lots of doctrings and added Epydoc-generated docs support.
 
1075
 
 
1076
2005-11-24  Federico Di Gregorio  <fog@initd.org>
 
1077
 
 
1078
        * sandbox: added all the test and creash-me files to the repository.
 
1079
 
 
1080
        * psycopg/typecast.c (typecast_dealloc): now directly calls
 
1081
        PyObject_Del to avoid to segfault.
 
1082
 
 
1083
2005-11-20  Federico Di Gregorio  <fog@initd.org>
 
1084
 
 
1085
        * psycopg/typecast.c: fixed problem with microseconds conversion by
 
1086
        applying slightly modified patch from Ronnie Mackay.
 
1087
 
 
1088
2005-11-19  Federico Di Gregorio  <fog@initd.org>
 
1089
 
 
1090
        * lib/extensions.py: COMMITED -> COMMITTED. (Closes: #73)
 
1091
 
 
1092
        * doc/extensions.rst: included Daniele's work after minor cosmetic changes
 
1093
        like using the new constants instead of numbers for transaction isolation
 
1094
        levels.
 
1095
 
 
1096
2005-11-17  Federico Di Gregorio  <fog@initd.org>
 
1097
 
 
1098
        * ZPsycopgDA/pool.py: fixed connections leak by using the new name
 
1099
        (PersistentConnectionPool) for the old connection pool class.
 
1100
 
 
1101
2005-11-16  Federico Di Gregorio  <fog@initd.org>
 
1102
 
 
1103
        * Preparing release 2.0 beta 6.
 
1104
        
 
1105
        * psycopg/adapter_mxdatetime.c: fixed all problems with mx conversions.
 
1106
        
 
1107
        * psycopg/typecast.c: now the timezone is set correctly even if there
 
1108
        are no microseconds and/or the offset is 0;
 
1109
 
 
1110
        * examples/encoding.py: fixed example by using python utf8 encoding for
 
1111
        the whole file.
 
1112
 
 
1113
        * lib/__init__.py: very nice hack from Harald Armin Massa to allow
 
1114
        py2exe and similar tools to do their work without problems.
 
1115
 
 
1116
2005-11-15  Federico Di Gregorio  <fog@initd.org>
 
1117
 
 
1118
        * psycopg/psycopgmodule.c: now bails out with correct exception when one
 
1119
        of the needed modules can't be imported (should fix #32.)
 
1120
 
 
1121
2005-11-14  Federico Di Gregorio  <fog@initd.org>
 
1122
 
 
1123
        * psycopg/typecast.c: added typecast_parse_date and typecast_parse_time
 
1124
        functions to do locale-safe date/time parsing. This would probably also
 
1125
        speed-up psycopg a little bit.
 
1126
 
 
1127
2005-11-07  Federico Di Gregorio  <fog@initd.org>
 
1128
 
 
1129
        * psycopg/pqpath.c: fixed problem with uninitialized value (all this was
 
1130
        started by replacing calloc() calls with PyMem_Malloc().)
 
1131
 
 
1132
2005-11-04  Federico Di Gregorio  <fog@initd.org>
 
1133
 
 
1134
        * psycopg/typecast.c: a lot of changes:
 
1135
          - made typecast a new-style type
 
1136
          - removed coerce code and implemented the richcompare protocol that
 
1137
            allows to compare objects of different types
 
1138
          - much better __cmp__ method that allows to compare two typecast
 
1139
            objects and returns True if any two of the mapped oids match
 
1140
          - any object that can be used as an int works as right-hand operand
 
1141
            in __cmp__ operations 
 
1142
 
 
1143
        * psycopg/typecast_datetime.c: now typecast_PYINTERVAL_cast limit the
 
1144
        scan to 'len' characters in the string (should fix #65.)
 
1145
 
 
1146
2005-11-03  Federico Di Gregorio  <fog@initd.org>
 
1147
 
 
1148
        * Applied patch from Daniele Varazzo to enable Decimal on Python
 
1149
        2.3 when the module is available (run-time check, nice.)
 
1150
        
 
1151
2005-10-26  Federico Di Gregorio  <fog@initd.org>
 
1152
 
 
1153
        * setup.cfg: added include_dirs line for SUSE 9.3.
 
1154
 
 
1155
2005-10-22  Federico Di Gregorio  <fog@initd.org>
 
1156
 
 
1157
        * psycopg/cursor_type.c: added support for named cursors:
 
1158
          - .fetchXXX() methods now execute a FETCH if the cursor is named
 
1159
          - .execute() executes a DECLARE if the cursor is named
 
1160
          - .execute() fails if a named cursor is used in autocommit
 
1161
          - .executemany() can't be called on named cursors
 
1162
          - .scroll() executes a MOVE if the cursor is named
 
1163
          - .close() executes a CLOSE if the cursor is named
 
1164
          Also, a "transaction mark" was added to both the connection and the
 
1165
          cursor and an exception is raised when using a named cursor unless the
 
1166
          two marks correspond.
 
1167
 
 
1168
        * psycopg/connection_int.c: snprintf->PyOS_snprintf.
 
1169
 
 
1170
        * psycopg/psycopgmodule.c: snprintf->PyOS_snprintf.
 
1171
 
 
1172
        * psycopg/cursor_type.c: changed self->query type from C string to
 
1173
        PyObject* to better manage queries in named cursors.
 
1174
 
 
1175
        * psycopg/psycopgmodule.c: cleaned up exception names (now the errors
 
1176
        is printed as psycopg2.Error and not as the confusing
 
1177
        psycopg2._psycopg.Error.)
 
1178
 
 
1179
2005-10-20  Federico Di Gregorio  <fog@initd.org>
 
1180
 
 
1181
        * lib/pool.py: renamed ThreadedConnectionPool to PersistentConnectionPool
 
1182
        and added a connection pool that allows multiple connections per thread
 
1183
        as ThreadedConnectionPool (courtesy of Daniele Varrazzo.)
 
1184
 
 
1185
2005-10-19  Federico Di Gregorio  <fog@initd.org>
 
1186
 
 
1187
        * Releasing 2.0 beta 5.
 
1188
        
 
1189
        * psycopg/adapter_mxdatetime.c: reverted to old strftime method to format
 
1190
        mx.DateTime objects; the new method didn't worked in some corner-cases.
 
1191
        This makes impossible to have more than 2 decimal places for seconds but
 
1192
        at least we get the time right every time.
 
1193
 
 
1194
2005-10-18  Federico Di Gregorio  <fog@initd.org>
 
1195
 
 
1196
        * NOTIFY is back end working.
 
1197
 
 
1198
        * psycopg/connection_type.c: fixed problem with initialization of
 
1199
        notifies list (also fixed small memory leak in connection dealloc.)
 
1200
 
 
1201
        * examples/notify.py: added NOTIFY example.
 
1202
 
 
1203
        * psycopg/cursor_type.c: added per-cursor type-casters dictionaries.
 
1204
 
 
1205
2005-10-18  Federico Di Gregorio  <fog@initd.org>
 
1206
 
 
1207
        * psycopg/typecast.c: temporary fix to typecasting objects to return
 
1208
        False for any comparaison except an integer in self.values (i.e., we
 
1209
        don't raise an exception anymore on a coerce error.) Epydoc is now
 
1210
        happy.
 
1211
 
 
1212
        * psycopg/config.h: ZETA config.h patch from Charlie Clark.
 
1213
 
 
1214
        * examples/threads.py: fixed small typo: psycopg -> psycopg2.
 
1215
 
 
1216
        * Big cleanup of unsigned chars to tame gcc 4.
 
1217
 
 
1218
        * Big cleanup of module names (i.e., psycopg2._psycopg everywhere.)
 
1219
        
 
1220
        * psycopg/config.h: added fake localtime_r for platforms missing it
 
1221
 
 
1222
        * psycopg/cursor_type.c: cursors now have a FixedOffsetTimezone
 
1223
        tzinfo_factory by default.
 
1224
 
 
1225
        * psycopg/adapter_datetime.c: added tzinfo argument to psycopg2.Time and
 
1226
        psycopg2.Timestamp. Also now TimestampFromTicks sets the tzinfo object
 
1227
        to psycopg2.tz.LOCAL.
 
1228
 
 
1229
2005-10-17  Federico Di Gregorio  <fog@initd.org>
 
1230
 
 
1231
        * psycopg/adapter_datetime.c: we now use localtime() instead of gmtime()
 
1232
        to accound for the local time-zone in timestamps.
 
1233
 
 
1234
        * psycopg/connection_type.c: fixed docstring for .cursor().
 
1235
 
 
1236
        * psycopg/psycopgmodule.c: added useful docstring for .connect().
 
1237
 
 
1238
2005-10-08  Federico Di Gregorio  <fog@initd.org>
 
1239
 
 
1240
        * psycopg/connection_type.c: isolation level upper bound set to 2.
 
1241
 
 
1242
        * lib/psycopg1.py: explicitly set isolation level to 2 on .connect()
 
1243
        to mimic psycopg 1 behaviour.
 
1244
 
 
1245
        * psycopg/connection_int.c: now set isolation level from
 
1246
        default_transaction_isolation backend environment value.
 
1247
 
 
1248
        * psycopg/pqpath.c: removed serialization level 3: now everybody
 
1249
        (except me) has to use the mnemonics defined in psycopg2.extensions.
 
1250
 
 
1251
        * lib/extensions.py: Added mnemonics for serialization levels.
 
1252
 
 
1253
2005-10-02  Federico Di Gregorio  <fog@debian.org>
 
1254
 
 
1255
        * psycopg/cursor_type.c (psyco_curs_callproc): applied callproc
 
1256
        patch from Matt Goodall (added a check on _psyco_curs_execute
 
1257
        return value and substituted malloc/free with PyMem versions.) 
 
1258
 
 
1259
2005-10-01  Federico Di Gregorio  <fog@debian.org>
 
1260
 
 
1261
        * psycopg/connection_int.c: fixed segfault by moving PyErr_Format
 
1262
        after GIL acquisition (closes: #50).
 
1263
 
 
1264
        * psycopg/connection_type.c: applied patch from Matt Goodall to
 
1265
        fix some doc strings.
 
1266
 
 
1267
2005-09-23  Federico Di Gregorio  <fog@debian.org>
 
1268
 
 
1269
        * lib/pool.py: applied patch from piro to avoid the scan of the
 
1270
        whole connection array on getconn().
 
1271
 
 
1272
2005-09-12  Federico Di Gregorio  <fog@initd.org>
 
1273
 
 
1274
        * lib/pool.py: Applied psycopg->psycopg2 patch to from bug #35.
 
1275
 
 
1276
        * ZpsycopgDA/db.py: fixed problem with OperationalError that
 
1277
        resulted in cryptic message to Zope users ("'OperationalError' is
 
1278
        not defined".)
 
1279
        
 
1280
2005-08-23  Federico Di Gregorio  <fog@debian.org>
 
1281
 
 
1282
        * setup.py: applied patch from Daniele Varrazzo to avoid segfaults
 
1283
        when compiling with migw for Python 2.4.x.
 
1284
 
 
1285
        * psycopg/adapter_mxdatetime.c (mxdatetime_str): ported code from 1.1.x
 
1286
        to convert mxDateTime object preserving the precision of fractional
 
1287
        seconds.
 
1288
 
 
1289
2005-08-22  Federico Di Gregorio  <fog@debian.org>
 
1290
 
 
1291
        * ZPsycopgDA/*.py: psycopg -> psycopg2. 
 
1292
 
 
1293
        * setup.py: modified to install the module components under
 
1294
        psycopg2 on windows too (thanks to Daniele Varrazzo.)
 
1295
 
 
1296
2005-08-07  Federico Di Gregorio  <fog@debian.org>
 
1297
 
 
1298
        * psycopg/config.h: added __sun__ to the symbols checked for round()
 
1299
 
 
1300
2005-07-21  Federico Di Gregorio  <fog@debian.org>
 
1301
 
 
1302
        * psycopg/adapter_datetime.c (psyco_XXXFromTicks): fixed the 1900
 
1303
        years offset reported by Jeroen van Dongen (see ticket #33). 
 
1304
 
 
1305
2005-07-17  Federico Di Gregorio  <fog@debian.org>
 
1306
 
 
1307
        * Release 2.0 beta 4.
 
1308
 
 
1309
        * lib/extras.py (DictConnection.cursor): added DictConnection to
 
1310
        make easier to retrieve data in DictRows.
 
1311
 
 
1312
2005-06-24  Federico Di Gregorio  <fog@initd.org>
 
1313
 
 
1314
        * psycopg/typecast_datetime.c (typecast_PYINTERVAL_cast): applied patch
 
1315
        from Geert Jansen to fix interval bug due to overflow.
 
1316
 
 
1317
2005-06-18  Federico Di Gregorio  <fog@initd.org>
 
1318
 
 
1319
        * setup.cfg: some clarifications and include_dirs example for Mandrake.
 
1320
        
 
1321
        * ZPsycopgDA/DA.py: DTMLFile -> HTMLFile everywhere to fix zope
 
1322
        cut&paste problems.
 
1323
        
 
1324
        * MANIFEST.in: added missing files to do bdist_rpm.
 
1325
        
 
1326
        * lib/psycopg1.py: fixed .dictfetchrow() to return None if fetchone()
 
1327
        returns None instead of raising an exception.
 
1328
        
 
1329
        * ZPsycopgDA/icons: replaced corrupted icons with good ones. 
 
1330
 
 
1331
2005-06-13  Federico Di Gregorio  <fog@initd.org>
 
1332
 
 
1333
        * psycopg/psycopgmodule.c (psyco_connect): changed the port keyword
 
1334
        parameter type to int (instead of string); this should fix #23.
 
1335
        
 
1336
        * psycopg/cursor_type.c (_psyco_curs_execute): now checks for
 
1337
        empty queries and raise a ProgrammingError if appropriate (closes:
 
1338
        #24).
 
1339
        
 
1340
        * setup.py: psycopg module renamed to psycopg2.
 
1341
 
 
1342
2005-06-02  Federico Di Gregorio  <fog@debian.org>
 
1343
 
 
1344
        * psycopg/cursor_type.c (_psyco_curs_execute): fixed segfault when
 
1345
        not passing string or unicode to .execute().
 
1346
 
 
1347
2005-06-01  Federico Di Gregorio  <fog@debian.org>
 
1348
 
 
1349
        * examples/fetch.py: added example about using DECLARE CURSOR.
 
1350
 
 
1351
        * psycopg/adapter_datetime.c (psyco_TimestampFromTicks): "Hmmm,
 
1352
        looks like someone forgot that C expects months to start counting
 
1353
        from 0, but the Python date routines start counting from 1." That
 
1354
        was me: fixed.
 
1355
 
 
1356
2005-05-31  Federico Di Gregorio  <fog@debian.org>
 
1357
 
 
1358
        * psycopg/cursor_type.c (_psyco_curs_execute): if a
 
1359
        UnicodeEncodeError is raised during the converion of a unicode
 
1360
        query we let it propagate insead of segfaulting.
 
1361
        
 
1362
2005-5-27  Federico Di Gregorio,  <fog@lana.initd.org>
 
1363
 
 
1364
        * tests/types_basic.py: fixed float and binary tests.
 
1365
 
 
1366
2005-05-26  Federico Di Gregorio  <fog@debian.org>
 
1367
 
 
1368
        * Release 2.0b3.
 
1369
 
 
1370
        * ZPsycopgDA/db.py (DB.convert_description): isolated description
 
1371
        conversion (and fixed the conversion as per #18).
 
1372
 
 
1373
        * ZPsycopgDA/DA.py: fixed again; this time Zope should work for
 
1374
        real. :/  Also fixed the type-casters (psycopg 2 added the extra
 
1375
        cursor parameter) as reported in #18.
 
1376
 
 
1377
        * psycopg/psycopgmodule.c (init_psycopg): fixed Python 2.2 build. 
 
1378
 
 
1379
2005-05-19  Federico Di Gregorio  <fog@debian.org>
 
1380
 
 
1381
        * Release 2.0b2.
 
1382
        
 
1383
        * lib/extras.py (DictRow): Some extra methods for DictRow.
 
1384
 
 
1385
        * psycopg/cursor_type.c (_psyco_curs_execute): added explict check
 
1386
        to avoid using None as bound variables (very importand for cursor
 
1387
        subclasses calling cursor.execute(self, query, None).
 
1388
 
 
1389
2005-05-18  Federico Di Gregorio  <fog@debian.org>
 
1390
 
 
1391
        * ZPsycopgDA/DA.py (ALLOWED_PSYCOPG_VERSIONS): updated to work
 
1392
        with 2.0b2 only (will support only the exact version untill final
 
1393
        2.0 release.)
 
1394
 
 
1395
        * setup.py: Applied combined patch from Daniele Varrazzo and Jason
 
1396
        Erickson to build on win32 using MSVC or mingw.
 
1397
 
 
1398
2005-05-15  Federico Di Gregorio  <fog@debian.org>
 
1399
 
 
1400
        * psycopg/microprotocols.c (microprotocols_adapt): fixed memory
 
1401
        leak on None as suggested by gh (closes: #16).
 
1402
 
 
1403
2005-05-10  Federico Di Gregorio  <fog@debian.org>
 
1404
 
 
1405
        * lib/extras.py (DictRow): we now save a reference to the index
 
1406
        itself and not to the cursor to avoid problems while accessing
 
1407
        DictRow objects after reusing the cursor for a different query
 
1408
        (using  Kevin Jacobs db_row would be much better but DictRow is
 
1409
        just an example, right?)
 
1410
 
 
1411
2005-05-09  Federico Di Gregorio  <fog@debian.org>
 
1412
 
 
1413
        * Release 2.0 beta 1.
 
1414
 
 
1415
        * psycopg/typecast_datetime.c (typecast_PYDATETIME_cast): fixed a
 
1416
        typo (pyDateTimeModuleP->pyDateTimeTypeP) that was causing errors
 
1417
        with infinite datetime values.
 
1418
 
 
1419
        * psycopg/adapter_binary.c (binary_str): Py_XINCREF on the buffer
 
1420
        that can be NULL on error.
 
1421
 
 
1422
        * psycopg/typecast_binary.*: applied slightly modified
 
1423
        chunk/buffer object patch to allow round-trip of buffer objects
 
1424
        (BYTEA columns.) 
 
1425
 
 
1426
        * psycopg/cursor_type.c (psyco_curs_executemany): applied slightly
 
1427
        fixed patch from wrobell to allow iterators in .executemany().
 
1428
 
 
1429
2005-04-18  Federico Di Gregorio  <fog@debian.org>
 
1430
 
 
1431
        * MANIFEST.in: included debian directory.
 
1432
 
 
1433
2005-04-10  Federico Di Gregorio  <fog@debian.org>
 
1434
 
 
1435
        * psycopg/adapter_list.*: added list adapter. 
 
1436
 
 
1437
        * psycopg/microprotocols.c (microprotocol_getquoted): moved
 
1438
        _mogrify_getquoted into utility function in the microprotocols
 
1439
        library.
 
1440
 
 
1441
        * setup.py: Added extensive error message on missing datetime
 
1442
        headers.
 
1443
 
 
1444
        * Applied mingw patch from Daniele Varazzo. 
 
1445
 
 
1446
2005-04-03  Federico Di Gregorio  <fog@debian.org>
 
1447
 
 
1448
        * lib/psycopg1.py (connection.autocommit): added compatibility
 
1449
        .autocommit() method.
 
1450
 
 
1451
        * psycopg/psycopgmodule.c (psyco_connect): factory ->
 
1452
        connection_factory.
 
1453
 
 
1454
        * lib/psycopg1.py: added psycopg 1.1.x compatibility module.
 
1455
 
 
1456
2005-03-29  Federico Di Gregorio  <fog@debian.org>
 
1457
 
 
1458
        * Applied patch to fix tuple count.
 
1459
        
 
1460
        * psycopg/pqpath.c (pq_is_busy): Staring from bug report from
 
1461
        Jason Erickson fixed segfaults due to calling Python function
 
1462
        without holding the GIL.
 
1463
 
 
1464
2005-03-24  Federico Di Gregorio  <fog@debian.org>
 
1465
 
 
1466
        * psycopg/adapter_binary.c (binary_escape): propagated Andrea's
 
1467
        fix to binary adapter.
 
1468
 
 
1469
        * psycopg/adapter_qstring.c (qstring_quote): applied patch from
 
1470
        Andrea Arcangeli to fix allocation failures (>4Gb) on 64 bit
 
1471
        arches.
 
1472
 
 
1473
        * psycopg/typecast_array.c (typecast_array_tokenize): much better
 
1474
        tokenization code.
 
1475
 
 
1476
2005-03-23  Federico Di Gregorio  <fog@debian.org>
 
1477
 
 
1478
        * psycopg/typecast_basic.c: all the basic casters now respect the
 
1479
        passed string length.
 
1480
 
 
1481
        * psycopg/typecast.c (typecast_cast): set curs->caster to self
 
1482
        during the type-casting.
 
1483
 
 
1484
        * psycopg/cursor_type.c: added "typecaster" attribute to the
 
1485
        cursor (this is safe, cursors can't be shared among threads and
 
1486
        the attribute is RO.)
 
1487
 
 
1488
2005-03-22  Federico Di Gregorio  <fog@debian.org>
 
1489
 
 
1490
        * psycopg/typecast_array.c: added some more structure to implement
 
1491
        array typecasting.
 
1492
 
 
1493
        * scripts/buildtypes.py: new version to include array data.
 
1494
 
 
1495
2005-03-15  Federico Di Gregorio  <fog@debian.org>
 
1496
 
 
1497
        * lib/extensions.py: Added AsIs import.
 
1498
 
 
1499
2005-03-12  Federico Di Gregorio  <fog@debian.org>
 
1500
 
 
1501
        * psycopg/cursor.h: removed "qattr", not used anymore and added
 
1502
        "cast", holding the typecaster currently in use.
 
1503
 
 
1504
        * Release 1.99.13.
 
1505
 
 
1506
        * psycopg/cursor_type.c (psyco_curs_executemany): implemented as a
 
1507
        wrapper to extract python arguments and then call
 
1508
        _psyco_curs_execute().
 
1509
 
 
1510
        * psycopg/cursor_type.c (_psyco_curs_execute): splitted away
 
1511
        python argument parsing from the real execute code, to later allow
 
1512
        for .executemany().
 
1513
 
 
1514
        * psycopg/cursor_type.c (_psyco_curs_buildrow_fill): modified to
 
1515
        call typecast_cast().
 
1516
        
 
1517
        * psycopg/typecast.c (typecast_call/typecast_cast): modified
 
1518
        typecast_call to use the new typecast_cast that avoids one string
 
1519
        conversion on every cast.
 
1520
 
 
1521
2005-03-04  Federico Di Gregorio  <fog@initd.org>
 
1522
 
 
1523
        * Release 1.99.12.1.
 
1524
 
 
1525
        * psycopg/adapter_asis.c (asis_str): changed call to PyObject_Repr
 
1526
        to PyObject_Str to avoid problems with long integers.
 
1527
 
 
1528
2005-03-03  Federico Di Gregorio  <fog@debian.org>
 
1529
 
 
1530
        * psycopg/typecast.h: added array casting functions.
 
1531
 
 
1532
        * scripts/maketypes.sh: does not generate pgversion.h anymore. 
 
1533
 
 
1534
        * Updated all examples for the release.
 
1535
 
 
1536
2005-03-02  Federico Di Gregorio  <fog@debian.org>
 
1537
 
 
1538
        * Release 1.99.12.
 
1539
        
 
1540
        * psycopg/adapter_*.c: added __conform__ to all adapters.
 
1541
        
 
1542
        * psycopg/adapter_qstring.c (qstring_quote): we now use
 
1543
        PyString_AsStringAndSize() instead of strlen() that would stop at
 
1544
        the first embedded \0 (but note that libpq quoting function will
 
1545
        truncate the string anyway!)
 
1546
        
 
1547
        * COPY TO implemented using both old and new (v3) protocol.
 
1548
 
 
1549
        * psycopg/pqpath.c (_pq_copy_out_v3): implemented and working.
 
1550
 
 
1551
        * psycopg/cursor_type.c (psyco_curs_copy_to): added cursor object
 
1552
        interface for copy_to.
 
1553
 
 
1554
        * COPY FROM implemented using both old and new (v3) protocol.
 
1555
 
 
1556
        * psycopg/config.h (Dprintf): declaration for asprintf is gone.
 
1557
 
 
1558
        * psycopg/pqpath.c (_pq_copy_in_v3): implemented.
 
1559
 
 
1560
2005-03-01  Federico Di Gregorio  <fog@debian.org>
 
1561
 
 
1562
        * setup.py: now we generate a slighly more verbose version string
 
1563
        that embeds some of the compile options, to facilitate users' bug
 
1564
        reports.
 
1565
 
 
1566
        * psycopg/cursor_type.c (psyco_curs_copy_from): we now use
 
1567
        PyOS_snprintf instead of asprintf. On some platforms this can be
 
1568
        bad (win32).. if that's your case, get a better platform. :/
 
1569
 
 
1570
        * psycopg/microprotocols.c (microprotocols_adapt): fixed small
 
1571
        typo that made adaptation using __conform__ impossible.
 
1572
 
 
1573
2005-02-28  Federico Di Gregorio  <fog@debian.org>
 
1574
 
 
1575
        * lib/extras.py: removed AsIs adapter (now a built-in); also
 
1576
        removed prepare() method from the adapters that don't use it to
 
1577
        avoid an extra method call at mogrification time.
 
1578
 
 
1579
        * psycopg/psycopgmodule.c (psyco_adapters_init): added
 
1580
        initialization of the AsIs adapter (adapts int, long, float and
 
1581
        *wonder* None!)
 
1582
 
 
1583
        * psycopg/cursor_type.c (_mogrify_getquoted): reorganized the code
 
1584
        to adapt and then call .getquoted() to obtain the quoted data into
 
1585
        this new function.
 
1586
 
 
1587
2005-2-27  Federico Di Gregorio  <fog@initd.org>
 
1588
 
 
1589
        * examples/myfirstrecipe.py: fixed adapter registration. 
 
1590
 
 
1591
2005-2-7  Federico Di Gregorio  <fog@initd.org>
 
1592
 
 
1593
        * setup.py: added patch by Valentino Volonghi to build on MacOS X.
 
1594
 
 
1595
2005-01-29  Federico Di Gregorio  <fog@debian.org>
 
1596
 
 
1597
        * psycopg/pqpath.c (_pq_fetch_tuples): fixed scale-related
 
1598
        segfault (*fourth* mail from Andrea. Another couple like this and
 
1599
        psycopg 2 will exit alpha at warp speed.)
 
1600
        
 
1601
        * psycopg/pqpath.c (pq_fetch): _pq_copy_out_3 -> _pq_copy_out_v3
 
1602
        (second and third mail from Andrea. :/)
 
1603
 
 
1604
        * psycopg/cursor_type.c (_psyco_curs_has_write_check): added check
 
1605
        on .write() attribute, fixed compilation problems (first mail from
 
1606
        Andrea Arcangeli.)
 
1607
 
 
1608
2005-01-20  Federico Di Gregorio  <fog@debian.org>
 
1609
 
 
1610
        * lib/extensions.py (register_adapter): added register_adapter
 
1611
        function, exported ISQLQuote in psycopg.extensions.
 
1612
 
 
1613
2005-01-18  Federico Di Gregorio  <fog@debian.org>
 
1614
 
 
1615
        * psycopg/pqpath.c (_pq_fetch_tuples): ported scale/precision fix
 
1616
        from psycopg 1.1.
 
1617
 
 
1618
        * LICENSE: detailed licensing information. Re-licensed some parts
 
1619
        under BSD-like to allow integration is pysqlite.
 
1620
 
 
1621
2005-01-13  Federico Di Gregorio  <fog@debian.org>
 
1622
 
 
1623
        * ZPsycopgDA/db.py (DB.query
 
1624
        ): ported ZPsycopgDA connection fix
 
1625
        from psycopg 1.1.
 
1626
 
 
1627
        * lib/*.py: added pydoc-friendly messages.
 
1628
 
 
1629
2005-01-12  Federico Di Gregorio  <fog@debian.org>
 
1630
 
 
1631
        * Added debian directory (thanks to W. Borgert who sent initial
 
1632
        patch based on cdbs.)
 
1633
 
1
1634
2004-12-20  Federico Di Gregorio  <fog@debian.org>
2
1635
 
3
1636
        * psycopg/pqpath.c (pq_execute): removed multiple calls to