Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Changed behavior of QueryResult #369
This change broke my website:
-class QueryResult(list): +class QueryResult(object):
If this is a bug, please fix this.
If this is a feature, please update the documentation and the changelog.
But now it is possible to base a new query on a previous query:
when query is used as a source of a new generator, Python immediately takes
The solution that we use in 0.7.4 is to make query result iterator lazy, and actually execute the query only when
That is to say, the result of
And with this changes it is more clear not to base potentially lazy
To fix the problem that you described we need to add
For compatibility we can add
Now QueryResult is not based on list, but expressions like
 + select(p for p in Person if p.age > 20)[:]
should work again.
Also, I added
For more complex mutations of QueryResult you need to convert it to list first, either with