there's little or no DBAPIs available. There won't be widespread use
before that happens in any case. If current DBAPIs don't provide for
Py3K and new contenders step in, then that complicates things even
further as our dialects are somewhat specific to their current DBAPI.
While we do have a branch which will resolve this, its still in
progress and is associated with the 0.6 SQLA series.
Also I'm pretty sure 2to3 is not going to be nearly enough. I'm
hoping we'll be able to automate the 2to3 process entirely on our side
but it will take some engineering beyond what 2to3 provides.
>
> there's little or no DBAPIs available. There won't be widespread use
> before that happens in any case. If current DBAPIs don't provide for
> Py3K and new contenders step in, then that complicates things even
> further as our dialects are somewhat specific to their current DBAPI.
for example:
http://mail.python.org/pipermail/python-list/2008-September/508112.html
"months to years".
>
> * wait until 2.6.1 is released. 2to3 in 2.6.0 is broken and breaks on
> SA 0.5rc2
rc4 runs on the current 2.6 release, I've been experimenting today.
> * get SA working on 2.6.1 with the -3 warning options w/o triggering
> a warning
I've got most of the tests running with the -3 flag as well, and have
gotten rid of the warnings which are to the effect of "method XXX will
not be available" as well as other patterns which are explicitly
forbidden. There are a lot of warnings which don't necessarily seem
to be things we have to change, like instrumenting __setslice__ on a
collection - it just won't be called in Py3.
> * run 2to3 and pray ;)
waiting for 2to3, however the main thing to work on is this
__hash__(), __eq__() business. I've added a branch which dramatically
changes how we use dicts and sets throughout the library. We
actually rely very heavily on elements being hashed strictly on their
__hash__() value, with the assumption that __eq__() is never called as
long as __hash__() is distinct. This is the behavior in all the
cPythons between 2.3-2.5, if you try out http://paste.pocoo.org/show/91414/
for example.
The language regarding __hash__() seems a lot more strict in py3k so
the branch is just to see how hard it would be to not rely upon this
behavior if we had to, so the branch abstracts away all dict/set usage
to special versions which hash on a __sa_hash_key__(). It works but
introduces a fair amount of overhead.