| Age | Commit message (Collapse) | Author |
|
|
|
The original problem was that queryset cloning was really expensive
when filtering with F() clauses. The __deepcopy__ went too deep copying
_meta attributes of the models used. To fix this the use of
__deepcopy__ in qs cloning was removed.
This commit results in some speed improvements across the djangobench
benchmark suite. Most query_* tests are 20-30% faster, save() is 50%
faster and finally complex filtering situations can see 2x to order
of magnitude improvments.
Thanks to Suor, Alex and lrekucki for valuable feedback.
|
|
Refs #19441.
|
|
The guarantee that no queries will be made when accessing results is
done by new EmptyWhere class which is used for query.where and having.
Thanks to Simon Charette for reviewing and valuable suggestions.
|
|
Thanks Simon Charette for the initial patch, and Jan Bednařík for
his work on the ticket.
|
|
Thanks Sebastian Noack for the report and the initial patch.
|
|
Thanks Sebastian Noack for the report and the initial patch.
|
|
|
|
* Used override_settings consistently -- changes to DEBUG could leak.
* Took advantage of assertRaisesRegexp.
* Fixed indentation -- some code was indented at 2 spaces.
|
|
This was caused by PIL raising a zlib truncated stream error since we fed
the parser with chunks instead of the whole image.
|
|
|
|
obfuscated in the @sensitive_variables decorator's frame, in case the variables associated with those arguments were meant to be obfuscated from the decorated function's frame.
Thanks to vzima for the report.
|
|
|
|
Thanks dibrovsd@gmail.com for the report.
|
|
Refs #19505.
|
|
|
|
Also added stacklevel argument, fixed #18127.
|
|
|
|
|
|
|
|
|
|
Each localflavor lives on as a separate app.
|
|
|
|
Also unit-tested django.utils.log.RequireDebugTrue for consistency.
|
|
An index on TextField results in a warning message when running tests
on MySQL or SQLite, and the test using the TextField was PostgreSQL
only in any case.
|
|
Thanks qcwxezdas for the report. Refs #13839.
|
|
To make sure changes in 35d1cd0 don't break anything. Refs #19505.
|
|
The test introduced in 4b278131 accidentally passed because of a
limitation of Python < 3.3.
Refs #17758, #7581.
|
|
redirect urls.
Work by Julien Phalip.
Refs #8001, #18310, #19505. See also 0b908b92a2ca4fb74a103e96bb75c53c05d0a428.
|
|
Refs #17758.
|
|
|
|
|
|
|
|
|
|
|
|
Thanks aliva for the report and claudep for the feedback.
|
|
The added promotion logic is based on promoting any joins used in only
some of the childs of an OR clause unless the join existed before the
OR clause addition.
|
|
The ORM didn't reuse joins for direct foreign key traversals when using
chained filters. For example:
qs.filter(fk__somefield=1).filter(fk__somefield=2))
produced two joins.
As a bonus, reverse onetoone filters can now reuse joins correctly
The regression was caused by the join() method refactor in commit
68847135bc9acb2c51c2d36797d0a85395f0cd35
Thanks for Simon Charette for spotting some issues with the first draft
of the patch.
|
|
This is necessary because get_model() checks are case insensitive, and if the swapable check isn't, the
swappable logic gets tied up in knots with models that are partially swapped out.
Thanks to chris@cogdon.org for the report and extensive analysis, and Preston for his work on the draft patch.
|
|
Thanks Dylan Verheul for the report and Anssi Kääriäinen for the
review.
|
|
|
|
Thanks Valentin Lorentz for the report and the suggested fix.
|
|
This is a rather large refactoring. The "lookup traversal" code was
splitted out from the setup_joins. There is now names_to_path() method
which does the lookup traveling, the actual work of setup_joins() is
calling names_to_path() and then adding the joins found into the query.
As a side effect it was possible to remove the "process_extra"
functionality used by genric relations. This never worked for left
joins. Now the extra restriction is appended directly to the join
condition instead of the where clause.
To generate the extra condition we need to have the join field
available in the compiler. This has the side-effect that we need more
ugly code in Query.__getstate__ and __setstate__ as Field objects
aren't pickleable.
The join trimming code got a big change - now we trim all direct joins
and never trim reverse joins. This also fixes the problem in #10790
which was join trimming in null filter cases.
|
|
Refs #19368, and the fix introduced in 27f8129d64292868f6a328f7bf9a1bed67967ff3.
|
|
Commit was 088d3bc2f84b6b68fee7e5de053b58049bd110e7
|
|
If there are more than one values to compare against and the qs isn't
ordered then assertQuerysetEqual will raise a ValueError.
|
|
|
|
|
|
Full disclosure and new release forthcoming.
|
|
|