Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-09 Thread Michael Bayer
On Jan 8, 2014, at 8:55 PM, limodou limo...@gmail.com wrote: Yes, I saw the code about 0.8.X and 0.9.1, the None convertion are the same. But difference between them is in AND process. So this inconsistent that you mean it's a bug in 0.8? it’s a bug in 0.8, yes. I think raise

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Michael Bayer
On Jan 8, 2014, at 2:39 AM, limodou limo...@gmail.com wrote: On Wed, Jan 8, 2014 at 3:31 PM, Wichert Akkerman wich...@wiggy.net wrote: On 08 Jan 2014, at 01:26, limodou limo...@gmail.com wrote: But I don't know why make this decision. Because where NULL will get nothing. And in

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread limodou
“WHERE NULL” is not valid, that’s true; hence neither is select.where(None) anymore, which is what would happen above if “conditions” were empty (and if conditions is guaranteed not empty, you could say “cond = conditions[0]; for c in conditions[1:]:…” ) The change includes that it’s safe

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Michael Bayer
sorry, this should read: Therefore, your script cannot work in either 0.8 or 0.9, unless you fix it as follows, in which case it works the same in both versions: def my_select(conditions): cond = None for c in conditions: cond = c cond stmt = select([column(‘x’)]) if

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Michael Bayer
On Jan 8, 2014, at 7:54 AM, limodou limo...@gmail.com wrote: I think there are two things here: 1. Should None be converted to NULL when deal with condition None or and_(condition, None) 2. How to combine multiple condition into one condition with and_ And I think the second question

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Michael Bayer
geez..its 10 degrees here, sorry, just scratch that first case, it has to be like this to be fully compatible both ways: def my_select(conditions): stmt = select([column('x')]) if conditions: stmt = stmt.where(and_(*conditions)) return stmt “cond None” was never any kind

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Michael Bayer
a new section has been added as the first “Core Behavioral Change”: http://sqlalchemy.readthedocs.org/en/rel_0_9/changelog/migration_09.html#none-can-no-longer-be-used-as-a-partial-and-constructor On Jan 8, 2014, at 11:27 AM, Michael Bayer mike...@zzzcomputing.com wrote: geez..its 10

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Claudio Freire
Typo: when condition is non-empty should be when conditionS is non-empty On Wed, Jan 8, 2014 at 1:53 PM, Michael Bayer mike...@zzzcomputing.com wrote: a new section has been added as the first “Core Behavioral Change”:

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread Michael Bayer
yeah…plus there’s no need for a “None” check when true() is used. I’m supposed to be napping right now, this is the problem On Jan 8, 2014, at 12:01 PM, Claudio Freire klaussfre...@gmail.com wrote: Typo: when condition is non-empty should be when conditionS is non-empty On

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-08 Thread limodou
On Thu, Jan 9, 2014 at 12:20 AM, Michael Bayer mike...@zzzcomputing.comwrote: On Jan 8, 2014, at 7:54 AM, limodou limo...@gmail.com wrote: I think there are two things here: 1. Should None be converted to NULL when deal with condition None or and_(condition, None) 2. How to combine

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-07 Thread Michael Bayer
that’s this: http://docs.sqlalchemy.org/en/rel_0_9/changelog/migration_09.html#improved-rendering-of-boolean-constants-null-constants-conjunctions On Jan 7, 2014, at 4:13 AM, limodou limo...@gmail.com wrote: I found a problem in 0.9.1 version: in 0.8.x : print (Blog.c.id==5) None

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-07 Thread limodou
But I don't know why make this decision. Because where NULL will get nothing. And in 0.8.X version, I need to combine multiple condition according user input to one condition, so my code just like: cond = None for c in conditions: cond = c cond So in 0.9.X, the result will be something

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-07 Thread Wichert Akkerman
On 08 Jan 2014, at 01:26, limodou limo...@gmail.com wrote: But I don't know why make this decision. Because where NULL will get nothing. And in 0.8.X version, I need to combine multiple condition according user input to one condition, so my code just like: cond = None for c in

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-07 Thread limodou
On Wed, Jan 8, 2014 at 3:31 PM, Wichert Akkerman wich...@wiggy.net wrote: On 08 Jan 2014, at 01:26, limodou limo...@gmail.com wrote: But I don't know why make this decision. Because where NULL will get nothing. And in 0.8.X version, I need to combine multiple condition according user input

Re: [sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-06 Thread Michael Bayer
Just an update, read the docs has been having problems building, the current changelog for 0.9.1 can be viewed at: http://docs.sqlalchemy.org/en/latest/changelog/changelog_09.html#change-0.9.1 On Jan 5, 2014, at 7:54 PM, Michael Bayer mike...@zzzcomputing.com wrote: Hello again list!

[sqlalchemy] SQLAlchemy 0.9.1 released

2014-01-05 Thread Michael Bayer
Hello again list! SQLAlchemy release 0.9.1 is now available. This release is primarily a quick-hit regression release; as we moved fast through 0.9 betas only releasing a single beta, a couple of small regressions popped up since then; this release fixes those. The release does however