Re: [translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
On Sun, 2008-09-14 at 23:11 +0200, Israel Saeta Pérez wrote: Sorry Dwayne, you were completely right, SQLAlchemy 4.x doesn't support arbitrary select statements in the Query objects but only full rows, as stated in the 05Migration document referenced earlier. But I guess we could translate the Query statement to a SQLAlchemy sql expression following http://www.sqlalchemy.org/docs/04/sqlexpression.html#sql_everythingelse_scalar Anyways, since SQLAlchemy is 0.5rc1 now and it can be easily (IMHO) installed using easy_install, I think that banging our heads with this problem isn't worth it. What do you think? I agree. If we really do need to investigate this then we can. And frankly putting hardcoded SQL statements extracted from the 0.5 query objects would be my work around :) -- Dwayne Bailey Associate +27 12 460 1095 (w) Translate.org.za +27 83 443 7114 (c) Recent blog posts: * The birth of the GNU generation http://www.translate.org.za/blogs/dwayne/en/content/birth-gnu-generation * Firefox users experience discrimination * RPM packages for py lib 0.9.2 - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle
Re: [translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
Sorry Dwayne, you were completely right, SQLAlchemy 4.x doesn't support arbitrary select statements in the Query objects but only full rows, as stated in the 05Migration document referenced earlier. But I guess we could translate the Query statement to a SQLAlchemy sql expression following http://www.sqlalchemy.org/docs/04/sqlexpression.html#sql_everythingelse_scalar Anyways, since SQLAlchemy is 0.5rc1 now and it can be easily (IMHO) installed using easy_install, I think that banging our heads with this problem isn't worth it. What do you think? -- Israel - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle
Re: [translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
On Tue, 2008-09-09 at 11:23 +0200, Israel Saeta Pérez wrote: 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? Consider this... Debian has Pootle packages: almost all live Pootle servers run on Debian Fedora has none: nobody runs Pootle on Fedora So although you can use easy_install nobody every really does like deploying software that isn't packaged for their distro. So packaging is important for ease of deployment. 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=8119view=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] I won't be able to look at this again for a while I'm afraid :( But thanks for finding those reference it might help. Don't be shy of trying to hack it yourself. I have patches (I hope) that get us mostly in shape for 0.4 if you have the energy. -- Dwayne Bailey Associate +27 12 460 1095 (w) Translate.org.za +27 83 443 7114 (c) Recent blog posts: * Looking ahead for Pootle and all of our tools http://www.translate.org.za/blogs/dwayne/en/content/looking-ahead-pootle-and-all-our-tools * GSoC wrapup * Delivering FOSS on Windows - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle
Re: [translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
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. 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=8119view=markup lines 127-129 are problem ones. -- Dwayne Bailey Associate +27 12 460 1095 (w) Translate.org.za +27 83 443 7114 (c) Recent blog posts: * Looking ahead for Pootle and all of our tools http://www.translate.org.za/blogs/dwayne/en/content/looking-ahead-pootle-and-all-our-tools * GSoC wrapup * Delivering FOSS on Windows - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle
[translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
I've been doing some basic testing on the Mozootle branch, mostly to see the skinning changes that Wil has committed. Wil: you're probably the best qualified to answer any questions that arise, if any... Summary as I go: Database setup: * A simple .prefs change to let us use sqlite instead of mysql, easy - We'll probably want to default to sqlite in trunk though SQLalchemy: * Quite a few patches to downgrade from 0.5 to 0.4 ** import .exc - import .exception ** server_default= - PassiveDefault('') ** .add() - .save_or_update() - I'm sure we can make some sort of wrappers to abstract these. LDAP: * Still requires LDAP to be installed - I added a try except clause Language in URL: * Get a recursion that creates a URL like this: http://localhost:8080/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en - This one got me stumped. That's where I got to for now. So no pictures or other testing I'm afraid -- Dwayne Bailey Associate +27 12 460 1095 (w) Translate.org.za +27 83 443 7114 (c) Recent blog posts: * Looking ahead for Pootle and all of our tools http://www.translate.org.za/blogs/dwayne/en/content/looking-ahead-pootle-and-all-our-tools * GSoC wrapup * Delivering FOSS on Windows - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle
Re: [translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
I've made various commits that ensure Mozootle can run on sqlite. On Fri, 2008-09-05 at 10:37 +0200, Dwayne Bailey wrote: I've been doing some basic testing on the Mozootle branch, mostly to see the skinning changes that Wil has committed. Wil: you're probably the best qualified to answer any questions that arise, if any... Summary as I go: Database setup: * A simple .prefs change to let us use sqlite instead of mysql, easy - We'll probably want to default to sqlite in trunk though SQLalchemy: * Quite a few patches to downgrade from 0.5 to 0.4 ** import .exc - import .exception ** server_default= - PassiveDefault('') ** .add() - .save_or_update() - I'm sure we can make some sort of wrappers to abstract these. Gave up on this and rather spun a Fedora SQLalchemy 0.5 rpm LDAP: * Still requires LDAP to be installed - I added a try except clause Committed Language in URL: * Get a recursion that creates a URL like this: http://localhost:8080/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en - This one got me stumped. Seems that once I fixed initdb.py and sorted out the various sqlite bugs this just worked. That's where I got to for now. So no pictures or other testing I'm afraid It looks pretty cool. -- Dwayne Bailey Associate +27 12 460 1095 (w) Translate.org.za +27 83 443 7114 (c) Recent blog posts: * Looking ahead for Pootle and all of our tools http://www.translate.org.za/blogs/dwayne/en/content/looking-ahead-pootle-and-all-our-tools * GSoC wrapup * Delivering FOSS on Windows - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle
Re: [translate-pootle] Mozootle testing: sqlalchemy, ldap and friends
Thanks for the commits - I'll check them out today. The theming is almost done; only fileindex.html remains. I'm pretty excited about finishing it up. Aside from the visual refresh, it also cleans up the HTML and CSS, makes the HTML and file includes more consistent, and speeds up the page loading (front end optimization). Regarding SQLAlchemy, I'm actually having to use their latest beta to get it running, 0.5.0beta3. :-/ Wil On Fri, Sep 5, 2008 at 8:19 AM, Dwayne Bailey [EMAIL PROTECTED] wrote: I've made various commits that ensure Mozootle can run on sqlite. On Fri, 2008-09-05 at 10:37 +0200, Dwayne Bailey wrote: I've been doing some basic testing on the Mozootle branch, mostly to see the skinning changes that Wil has committed. Wil: you're probably the best qualified to answer any questions that arise, if any... Summary as I go: Database setup: * A simple .prefs change to let us use sqlite instead of mysql, easy - We'll probably want to default to sqlite in trunk though SQLalchemy: * Quite a few patches to downgrade from 0.5 to 0.4 ** import .exc - import .exception ** server_default= - PassiveDefault('') ** .add() - .save_or_update() - I'm sure we can make some sort of wrappers to abstract these. Gave up on this and rather spun a Fedora SQLalchemy 0.5 rpm LDAP: * Still requires LDAP to be installed - I added a try except clause Committed Language in URL: * Get a recursion that creates a URL like this: http://localhost:8080/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en - This one got me stumped. Seems that once I fixed initdb.py and sorted out the various sqlite bugs this just worked. That's where I got to for now. So no pictures or other testing I'm afraid It looks pretty cool. -- Dwayne Bailey Associate +27 12 460 1095 (w) Translate.org.za +27 83 443 7114 (c) Recent blog posts: * Looking ahead for Pootle and all of our tools http://www.translate.org.za/blogs/dwayne/en/content/looking-ahead-pootle-and-all-our-tools * GSoC wrapup * Delivering FOSS on Windows - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle - 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=100url=/ ___ Translate-pootle mailing list Translate-pootle@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/translate-pootle