Thanks Chris Lee for the report.
Regression in 43289707809c814a70f0db38ca4f82f35f43dbfd.
Refs #23916.
Backport of 1e2e1be02bdf0fe4add0d0279dbca1d74ae28ad7 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.
This prevents duplicated operations when altering type of primary key
with MTI and foreign key. Previously, a foreign key to the base model
was added twice, once directly and once by the inheritance model.
Thanks bcail for the report.
Regression in 325d7710ce9f6155bb55610ad6b4580d31263557.
Backport of e972620ada4f9ed7bc57f28e133e85c85b0a7b20 from main
The migration framework uniquely identifies models by case insensitive
labels composed of their app label and model names and so does the app
registry in most of its methods (e.g. AppConfig.get_model) but it
wasn't the case for get_swappable_settings_name() until this change.
This likely slipped under the radar for so long and only regressed in
b9df2b74b98b4d63933e8061d3cfc1f6f39eb747 because prior to the changes
related to the usage of model states instead of rendered models in the
auto-detector the exact value settings value was never going through a
case folding hoop.
Thanks Andrew Chen Wang for the report and Keryn Knight for the
investigation.
Backport of 43289707809c814a70f0db38ca4f82f35f43dbfd from main
Regression in aa4acc164d1247c0de515c959f7b09648b57dc42.
Thanks Kevin Marsh for the report.
Backport of dab48b7482295956973879d15bfd4d3bb0718772 from main
This adjusts Expressions.rename_table_references() to only update alias
when needed.
Regression in 83fcfc9ec8610540948815e127101f1206562ead.
Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
Backport of 86971c40909430a798e4e55b140004c4b1fb02ff from main
This also removes unnecessary comments with the previous spelling.
AP Stylebook has a short entry to advise the preferred spelling for
"en-us". "Afterwards" is preferred in British English.
Migrations assumed that an import of the models.Model class must
already be included when it's serialized, but for models with only
custom fields this was not necessarily the case.
Thanks Jaap Joris Vens for the report.
- Replaced datetime.utcnow() with datetime.now().
- Replaced datetime.utcfromtimestamp() with datetime.fromtimestamp().
- Replaced datetime.utctimetuple() with datetime.timetuple().
- Replaced calendar.timegm() and datetime.utctimetuple() with datetime.timestamp().
This disables optimization of RenameField operation when an old field
name is referenced in subsequent operations.
Co-authored-by: InvalidInterrupt <InvalidInterrupt@users.noreply.github.com>