On Tue, Sep 9, 2008 at 10:35 AM, Dwayne Bailey <[EMAIL PROTECTED]> wrote: > On Tue, 2008-09-09 at 01:23 +0200, Israel Saeta Pérez wrote: >> btw, this could help: >> http://www.sqlalchemy.org/trac/wiki/05Migration > > Seen that thanks, it was quite helpful for downgrading :) > >> >> On Mon, Sep 8, 2008 at 6:39 PM, Israel Saeta Pérez <[EMAIL PROTECTED]> wrote: >> > Hello guys, I don't understand a few things so I hope you can explain >> > them to me - I apologize for my ignorance. >> > >> > 1) Why do you want to downgrade SQLAlchemy to 0.4? Because it's a beta >> > version? Is it known to be really unstable? > > My concern is that 0.5 will not be widely available on the platforms > that people use to run Pootle e.g. Debian. If we need 0.5 and Debian is > still 0.4 then it becomes hard to deploy.
Why don't we like "easy_install SQLAlchemy"? > But all this debate might be moot as a) Mozootle still needs merging to > trunk/ b) 0.5 might be released, c) Distro's might have packages > availables > >> > 2) What's the .query stuff you're talking about? Could you point me to >> > the guilty code lines? > > Sure. Just about all files in mozootle/ have them. See here for some > examples: > > http://translate.svn.sourceforge.net/viewvc/translate/src/branches/mozootle/indexpage.py?revision=8119&view=markup > > lines 127-129 are problem ones. They're rather advanced to me, but I have some ideas: According to the join syntax described in http://www.sqlalchemy.org/docs/04/sqlalchemy_orm_query.html#docstrings_sqlalchemy.orm.query_Query, we shouldn't use a class as the first element of the tuple of the first argument of the join function, but a string property or a class mapped attribute. SQLAlchemy-0.4 does support scalar selects: http://www.sqlalchemy.org/docs/04/sqlexpression.html#sql_everythingelse_scalar Try this: topreview = asession.query(User.name, func.count(Suggestion.id)).join(User.suggestionsReviewed).group_by(User.name).order_by(func.count(Suggestion.id).desc())[:5] -- Israel Saeta Pérez http://dukebody.com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Translate-pootle mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/translate-pootle
