[python-sybase] Sybase module 0.37pre1 released

Dave Cole djc at object-craft.com.au
Sun, 20 Mar 2005 15:09:18 +1100


Skip Montanaro wrote:
>     Dave> This release contains a number of small bugfixes and patches
>     Dave> received from users.
> 
>     ...
> 
> I don't see this change:
> 
> *** /Users/skip/src/sybase-0.36/Sybase.py       Sun Apr 27 05:54:35 2003
> --- /Users/skip/tmp/Sybase.py   Sat Mar 19 16:46:17 2005
> ***************
> *** 436,441 ****
> --- 471,477 ----
>   
>       def start(self, arraysize):
>           self._arraysize = arraysize
> +         self._set_state(_LAZY_FETCHING)
>           status = self._cmd.ct_send()
>           if status != CS_SUCCEED:
>               self._raise_error(Error, 'ct_send')
> 
> You created that in response to some problems one of my users was having.

Ooops.  I will put together a pre2 release with that fix and the 
__stdcall patch from Vadim.

I think I should change my strategy for releasing.  Previously I had 
been posting small patches then waiting for feedback.  That seems not to 
work.  A better technique might be to release as soon as a patch is 
received and wait for feedback from that.

> I also don't see anything related to Python's builtin datetime module.  I
> can whip up a patch based upon my local changes if you like.  mx.DateTime is
> nice, but overkill for most things and represents yet another thing that
> needs to be installed.
> 
> Finally, way back when I first started using the Sybase module I added a
> converters arg to the Connection class.  I realize that's not necessarily
> everybody's idea of the best way to implement type converters, but it allows
> me to pretty transparently use whatever date/time module I have available.
> (Some users at work have old code that expects times to be floats in epoch
> seconds as returned by time.time().  This allows them to easily use that
> with minimal changes to their code.)

I like the idea of doing the conversion via a configuration set of 
converters.

Rather than have the set of converters replace the standard set, maybe 
the converters passed to the connection should be merged with the 
standard set for that connection.

- Dave

-- 
http://www.object-craft.com.au