[DB-SIG] ANN: mxODBC v0.7 and mxDateTime v0.8
Sat, 04 Apr 1998 17:19:04 +0200
After a few weeks of silence there are new versions of my two
extension packages. mxODBC is a nearly 100% DB-API compliant interface
to the ODBC 2.0 API. mxDateTime fixes the problems you face when dealing
with date and time values (e.g. ones before 1.1.1970). The ODBC
package uses the DateTime package for its default date/time
handling (other formats supported are: Unix ticks, string
representations and tuple style, e.g. (year,month,day)).
For further information have a look at the documentation (which
also provides the links to the archives):
The DateTime package is now stabilizing. Version 1.0 will hopefully
be the "final" release. Please try it and report any bugs you find,
so that I can fix them until 1.0 comes out.
Here is the list of changes:
Changes from 0.6 to 0.7:
Synchronized the module with my mxDateTime extension
Updated the dbi.py abstraction module. It is still not 100%
compatible with what the API 1.0 specs say (the module does
not return instances of dbiRaw and dbiDate), but I'm reluctant
Added a cleanup function that get's called when the interpreter
finalizes. It deallocates the ODBC environment.
Added __members__ attribute to cursors. This returns a list of
known attributes (e.g. dir() looks for it and displays them).
Added optional fourth parameter clear_auto_commit to the
Date, time and timestamp can now also be processed via Python
strings. The conversion is left to the ODBC driver/manager.
Fixed a bug in the allocation routines of both the connection
the cursor type that sometimes caused a segfault due to an
ODBC error occurring while connecting.
Added a new API DriverConnect and renamed the old API
Connect. The old one is still aliased to ODBC for DB API
compliance and backward compatibility.
Fixed a refcount bug that prevented connection objects from
begin garbage collected after a cursor was used on them (the
cursor didn't dereference the connection object).
Things that changed from 0.7 to 0.8:
Important change: Conversions from and to Unix time values
(ticks) are now done assuming the broken down values
represent local time, not UTC as in previous versions. now()
returns local time instead of UTC -- this was confusing to some
users. The change had to be done since I didn't want to carry
the timemodule.c stuff all along the way... the method I used
convert from mktime() output to UTC was flaky anyway.
Important for programmers wanting to use the C interface: I
dropped the direct access macros in the mxDateTime header file.
If you want to access the broken down representation of the
instances from C, use the new DateTime[Delta]_BrokenDown()
APIs. I did this, because I may decide to put the two types on
diet in a next version (i.e. dropping the cached broken down
Added an alias 'Format' for the method DateTime.strftime. This
makes the DateTime type compatible with the existing PythonWin
DateTime.strftime() defaults to '%c' as format string if no
parameters are given.
Dropped the plan to add keywords handling: it would produce a
noticable performance hit due to the way keyword handling works
in the interpreter.
Dropped the module specific ConversionError in favour of the
standard OverflowError. Conversion to ticks will raise an
OverflowError in case the converted value doesn't fit into the
machines time value format.
Moved some constructors and objects from mxDateTime to
DateTime. You won't notice any difference if you are using the
DateTime interface (which you should), except the fact that
functions are now coded in Python rather than C.
The TimeDelta() constructor now accepts keywords. This is a
side-effect from moving it out of the C module into the Python
package module. You can now write twoMinutes =
Added an experimental ODMG submodule that uses date/time
classes built on top of the two basic types. The main
that they support timezone offsets.
Added support for storing COM dates as-is.
DateTimeFromCOMDate(x).COMDate() will always return x
| Python Pages: http://starship.skyport.net/~lemburg/ |