Wow, that was quick! Wish I'd come to the mailing list before I spent my whole day baffled over this! Thanks a lot guys, will have to look into getting the fix. Although I've never used mercurial or ant before.
On Thu, Nov 17, 2011 at 5:59 PM, Philip Jenvey <pjen...@underboss.org>wrote: > > On Nov 16, 2011, at 10:27 PM, Michael Bayer wrote: > > > > > On Nov 17, 2011, at 1:04 AM, CamJackson wrote: > > > >> (First time poster here, sorry if I break any rules. I tried to find > >> info on formatting code etc, but failed.) > >> > >> > >> However if I try to run the above code on Jython, with the only > >> modification being to change the string passed to create_engine() to > >> "postgresql+zxjdbc://jacksonc:abc123@localhost:5432/testdb", it > >> doesn't work. I get the following output when the User class is > >> declared: > >> raise AttributeError( > >> AttributeError: Module sqlalchemy.orm.mapperlib has no attribute > >> 'Mapper' > > > > This is a known bug in the current version of Jython - not an easy one > to come across but nevertheless one that breaks with SQLA's current import > scheme. I've given a test case to Philip Jenvey who's been looking into > it. I'm not really sure what the workaround is at the moment, its > possible that importing things in a certain order might be the trick to > make it work. I've CC'ed him on this in case there's some more > detail. > > The import bug ( http://bugs.jython.org/issue1811 ) is already fixed for > the upcoming Jython 2.5.3 release (coming soon). In the meantime you'll > have to build your own Jython from the 2.5 maintenance branch to workaround > this. > > Basically: > > hg clone http://hg.python.org/jython#2.5 jython-2.5 > cd jython-2.5 > ant > > -- > Philip Jenvey > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalchemy@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.