| Age | Commit message (Collapse) | Author |
|
ManyToManyField to lowercased swappable setting.
Thanks Chris Lee for the report.
Regression in 43289707809c814a70f0db38ca4f82f35f43dbfd.
Refs #23916.
Backport of 1e2e1be02bdf0fe4add0d0279dbca1d74ae28ad7 from main
|
|
length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
|
|
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
|
|
In these cases Black produces unexpected results, e.g.
def make_random_password(
self,
length=10,
allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789',
):
or
cursor.execute("""
SELECT ...
""",
[table name],
)
Backport of c5cd8783825b5f6384417dac5f3889b4210b7d08 from main.
|
|
aggregates with default.
Thanks Adam Johnson for the report.
Backport of 71e7c8e73712419626f1c2b6ec036e8559a2d667 from main
|
|
constraints.
Regression in 3aa545281e0c0f9fac93753e3769df9e0334dbaa.
Thanks Hervé Le Roy for the report.
Backport of 1eaf38fa87384fe26d1abf6e389d6df1600d4d8c from main
|
|
on PostgreSQL.
This makes models.BinaryField pickleable on PostgreSQL.
Regression in 3cf80d3fcf7446afdde16a2be515c423f720e54d.
Thanks Adam Zimmerman for the report.
Backport of 2c7846d992ca512d36a73f518205015c88ed088c from main.
|
|
to create a shallow copy of children."
This reverts commit e441847ecae99dd1ccd0d9ce76dbcff51afa863c.
A shallow copy is not enough because querysets can be reused and
evaluated in nested nodes, which shouldn't mutate JOIN aliases.
Thanks Michal Čihař for the report.
Backport of 903aaa35e5ceaa33bfc9b19b7f6da65ce5a91dd4 from main
|
|
Thanks Simon Charette for the review and implementation idea.
Backport of dd1fa3a31b4680c0d3712e6ae122b878138580c7 from main
|
|
empty_result_set_value.
Backport of ad36a198a12df4dff65992191b3eb0a474e2daac from main
|
|
Backport of b7fd668b37341fc92d67c4854c4f244e10895c9b from main
|
|
migrations.
Regression in d992f4e3c29a81c956d3d616f0bc19701431b26e.
Backport of 3b9fe906bf28d2e748ce4d9a1af5fbcd5df48946 from main
|
|
This avoids constructing a generator expression and a new tuple if the
Query has no combined queries.
|
|
|
|
|
|
This removes unnecessary "if ... is None" branches, which are already
shallow-copied in the __dict__.copy() call.
|
|
Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick
Pope, and Paul Ganssle for reviews.
|
|
limit_choices_to.
|
|
queryset annotation.
|
|
Query.build_lookup() when not necessary.
Of the built-in backends, only Oracle treats empty strings and nulls as
equal, so avoid testing the default connection backend for
interprets_empty_strings_as_nulls if it can be established from the
lookup that it wouldn't affect the lookup instance returned. This
improves performance a small amount for most lookups being built,
because accessing the connections requires touching the thread critical
`Local` which is an expensive operation.
|
|
Unnecessary since its introduction in 1df89a60c5b7a28d7fda4c9ba7c07f02fd7de0fa.
|
|
The functionality of updating the __dict__ was only present to allow
for pickling a Prefetch object, which is a comparably rare operation.
Forcing the __getstate__() implementation to handle it allows the
chaining operation to be slightly faster, which is much more common.
|
|
M2M fields.
Since ManyToManyFields defined with `symmetrical=True` do not add a
related field to the target model, including a `related_name` argument
will never do what the coder likely expects. This makes including
a related_name with a symmetrical model raise a system check warning.
ticket-32983
|
|
|
|
|
|
DateTimeCheckMixin classes.
|
|
default when USE_TZ = True.
|
|
use non-kwargs initialization.
This prefers non-kwargs construction of dynamically generated Q()
objects to create a single Q() object instead of many and then
combining them, where possible.
|
|
|
|
through_fields is a list.
Regression in c32d8f33d8e988a376e44997b8f3606d821f305e.
|
|
Unused since 3caf957ed5eaa831a485abcb89f27266dbf3e82b.
|
|
after only().
|
|
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
Thanks to Simon Charette and Adam Johnson for the reviews.
|
|
cursor_iter() helper calls cursor.close() in a finally block.
|
|
django.db.models.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
The Python's Steering Council decided to revert changes in the Enum
module (see https://bugs.python.org/issue44559) and moved them to
Python 3.11.
Follow up to 5d9b065d3f93de056588dfee6f1776294dd8bab2.
Thanks Nick Pope for the review.
|
|
QuerySet.filter().
Thanks Hannes Ljungberg and Simon Charette for reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
get_col() used "self" as "output_field" when it was not given, and
unnecessarily compared "self" to "self".
Co-authored-by: Chris Jerdonek <chris.jerdonek@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
The introduction of the Expression.empty_aggregate_value interface
allows the compilation stage to enable the EmptyResultSet optimization
if all the aggregates expressions implement it.
This also removes unnecessary RegrCount/Count.convert_value() methods.
Disabling the empty result set aggregation optimization when it wasn't
appropriate prevented None returned for a Count aggregation value.
Thanks Nick Pope for the review.
|
|
Disable the EmptyResultSet optimization when performing aggregation as
it might interfere with coalescence.
|
|
Co-Authored-By: Simon Charette <charette.s@gmail.com>
|
|
|
|
updated.
Co-authored-by: Diego Lima <diego.lima@lais.huol.ufrn.br>
|
|
primary keys on models with invalid app_label.
Regression in b5e12d490af3debca8c55ab3c1698189fdedbbdb.
Thanks Iuri de Silvio for the report.
|
|
PostgreSQL.
This partly reverts commit fdfbc66331292def201c9344e3cd29fbcbcd076a
unnecessary since b69b0c3fe871167a0ca01bb439508e335143801f.
|
|
Field.contribute_to_class().
Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
|
|
QuerySet.values_list().
Regression in 981a072dd4dec586f8fc606712ed9a2ef116eeee.
Thanks pirelle for the report.
|
|
when not passed during initialization.
Thanks Simon Charette for the implementation idea.
|