| Age | Commit message (Collapse) | Author |
|
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main.
|
|
aupdate_or_create() methods for related managers.
Bug in 58b27e0dbb3d31ca1438790870b2b51ecdb10500.
Backport of 7b94847e384b1a8c05a7d4c8778958c0290bdf9a from main
|
|
managers."
This reverts 4f8c7fd9d91b35e2c2922de4bb50c8c8066cbbc6 and adds
two regression tests:
- test_related_manager_refresh(), and
- test_create_copy_with_m2m().
Thanks joeli for the report.
Backport of 5e0aa362d91d000984995ce374c2d7547d8d107f from main
|
|
unsaved instances.
Thanks Claude Paroz for the report.
Regression in 7ba6ebe9149ae38257d70100e8bfbfd0da189862.
Backport of 806e9e2d0dcf8f58e376fb7e2a8b9771e2a9ce16 from main
|
|
|
|
|
|
|
|
|
|
This also allows customizing attributes of fields that don't affect
a column definition.
|
|
Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
|
|
MariaDB, MySQL, Oracle, and SQLite.
|
|
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
|
|
relations for unsaved instances.
|
|
lowercased swappable setting.
Thanks Chris Lee for the report.
Regression in 43289707809c814a70f0db38ca4f82f35f43dbfd.
Refs #23916.
|
|
This speeds up field creation and reduces memory usage.
|
|
|
|
|
|
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],
)
|
|
Regression in 502e75f9ed5476ffe8229109acf0c23999d4b533.
|
|
When prefetching a set of child objects related to a set of parent
objects, we usually want to populate the relationship back from the
child to the parent to avoid a query when accessing that relationship
attribute. However, there's an edge case where the child queryset
itself specifies a prefetch back to the parent. In that case, we want
to use the prefetched relationship rather than populating the reverse
relationship from the parent.
|
|
Value.output_field for strings.
This brings the behaviour in line with Field subclasses which append to
the validators within __init__(), like BinaryField, and prevents the
creation of a validator which incorrectly throws a TypeError, if it
were used.
|
|
|
|
Field.db_check() should return None or a SQL string.
Returning [] happened to work because it’s falsey.
|
|
Having it happen at the lookup creation time ensures entry points
called before the compilation phase (e.g. get_group_by_cols) don't have
to duplicate the logic in charge of altering Query instances used as
rhs.
It also has the nice effect of reducing the amount of time the
alteration logic to once as opposed to multiple times if the queryset
is compiled more than once.
|
|
|
|
PathInfo values are ostensibly static over the lifetime of the object
for which they're requested, so the data can be memoized, quickly
amortising the cost over the process' duration.
|
|
|
|
|
|
Follow up to bf5abf1bdcedb15e949db419c61eeec7c88414ea.
This also caches the __getitem__ access.
|
|
Regression in d992f4e3c29a81c956d3d616f0bc19701431b26e.
|
|
limit_choices_to.
|
|
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.
|
|
django.db.models.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
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>
|
|
Field.contribute_to_class().
Co-authored-by: Jarek Glowacki <jarekwg@gmail.com>
|
|
when not passed during initialization.
Thanks Simon Charette for the implementation idea.
|
|
- Validate filename returned by FileField.upload_to() not a filename
passed to the FileField.generate_filename() (upload_to() may
completely ignored passed filename).
- Allow relative paths (without dot segments) in the generated filename.
Thanks to Jakub Kleň for the report and review.
Thanks to all folks for checking this patch on existing projects.
Thanks Florian Apolloner and Markus Holtermann for the discussion and
implementation idea.
Regression in 0b79eb36915d178aef5c6a7bbce71b1e76d376d3.
|
|
|
|
|
|
|
|
transforms with booleans on SQLite.
Thanks Matthew Cornell for the report.
|
|
|