[okfn-help] moving vdm.sqlalchemy to vdm: an unforeseen problem

Rufus Pollock rufus.pollock at okfn.org
Mon Oct 18 20:20:51 UTC 2010


Not a problem to require only python 2.5 IMO.

Rufus

On 18 October 2010 18:28, Martijn Faassen <faassen at startifact.com> wrote:
> Hi there,
>
> I just ran into an unforeseen problem with moving vdm.sqlalchemy to
> vdm (so that you can simply import from vdm, as agreed earlier).
>
> I wanted to keep vdm.sqlalchemy around with backwards compatibility
> imports so that the old imports would continue to work (but be
> deprecated).
>
> Unfortunately, vdm.sqlalchemy is called "sqlalchemy". This means that
> any imports that vdm code tries to do from sqlalchemy proper will
> actually do a relative import
> to the sub-package 'sqlalchemy' and that's not the real sqlalchemy. :)
>
> The Python developers have fixed this problem in Python 2.5 and
> onwards, making import always absolute. This feature can be enabled
> using
>
> from __future__ import absolute_import
>
> I've used this and this fixes the issue.
>
> But this means that vdm would not be compatible with Python 2.4
> anymore. I don't think this is a problem, as Python 2.4 isn't
> maintained anymore, but I thought I'd check.
>
> So, is it okay to require python 2.5 and later?
>
> Regards,
>
> Martijn
>
> _______________________________________________
> okfn-help mailing list
> okfn-help at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/okfn-help
>



-- 
Open Knowledge Foundation
Promoting Open Knowledge in a Digital Age
http://www.okfn.org/ - http://blog.okfn.org/




More information about the okfn-help mailing list