Commit Graph

10455 Commits

Author SHA1 Message Date
Simon Charette 7b065c41e4 [3.0.x] Fixed #31109 -- Disabled grouping by aliases on QuerySet.exists().
Clearing the SELECT clause in Query.has_results was orphaning GROUP BY
references to it.

Thanks Thierry Bastian for the report and Baptiste Mispelon for the
bisect.

Regression in fb3f034f1c.

Backport of 720de4d044 from master
2019-12-23 09:24:37 +01:00
Simon Charette fd9050589f [3.0.x] Fixed #31094 -- Included columns referenced by subqueries in GROUP BY on aggregations.
Thanks Johannes Hoppe for the report.

Regression in fb3f034f1c.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>

Backport of 5a4d7285bd from master
2019-12-19 11:10:33 +01:00
Simon Charette 302a4ff1e8 [3.0.x] Fixed CVE-2019-19844 -- Used verified user email for password reset requests.
Backport of 5b1fbcef7a from master.

Co-Authored-By: Florian Apolloner <florian@apolloner.eu>
2019-12-18 09:14:44 +01:00
Peter Andersen 74e1454113 [3.0.x] Fixed #31073 -- Prevented CheckboxInput.get_context() from mutating attrs.
Backport of 02eff7ef60 from master
2019-12-11 09:37:34 +01:00
Alex Aktsipetrov 8af07712df [3.0.x] Fixed #31060 -- Reallowed window expressions to be used in conditions outside of queryset filters.
Regression in 4edad1ddf6.

Thanks utapyngo for the report.

Backport of bf12273db4 from master.
2019-12-06 15:28:23 +01:00
Mariusz Felisiak e986e49e66 [3.0.x] Fixed #31061 -- Ignored positional args in django.urls.resolve() when all optional named parameters are missing.
Regression in 76b993a117.

Thanks Claude Paroz for the report and Carlton Gibson for reviews.
Backport of 82a88d2f48 from master
2019-12-06 09:33:45 +01:00
Andrew Godwin 9243435b5e [3.0.x] Fixed #31056 -- Allowed disabling async-unsafe check with an environment variable.
Backport of c90ab30fa1 from master
2019-12-03 17:50:24 +01:00
Carlton Gibson 092cd66cf3 Fixed CVE-2019-19118 -- Required edit permissions on parent model for editable inlines in admin.
Thank you to Shen Ying for reporting this issue.
2019-12-02 08:57:44 +01:00
Mariusz Felisiak f4ed6800bd [3.0.x] Fixed #30953 -- Made select_for_update() lock queryset's model when using "self" with multi-table inheritance.
Thanks Abhijeet Viswa for the report and initial patch.
Backport of 0107e3d105 from master
2019-12-02 07:58:04 +01:00
Mariusz Felisiak ca9144a4a8 [3.0.x] Fixed #31021 -- Fixed proxy model permissions data migration crash with a multiple databases setup.
Regression in 98296f86b3.

Backport of e8fcdaad5c from master
2019-11-29 11:10:36 +01:00
Baptiste Mispelon 3ed55606c4 [3.0.x] Fixed #31031 -- Fixed data loss in admin changelist view when formset's prefix contains regex special chars.
Regression in b18650a263.

Backport of 52936eface from master
2019-11-26 09:19:19 +01:00
John Bowen b6cbc88f26 [3.0.x] Fixed #27914 -- Fixed serialization of nested classes in migrations.
Backport of 29d8198841 from master
2019-11-25 11:27:15 +01:00
John Bowen ba5760965e [3.0.x] Refs #23950 --- Moved test DeconstructibleInstances class to a module level.
DeconstructibleInstances was not importable from the asserted path.

Backport of 8008795a38 from master
2019-11-25 11:27:09 +01:00
Carlton Gibson 947f8e3485 [3.0.x] Fixed #31012 -- Reverted "Fixed #29056 -- Fixed HTML5 validation of required SelectDateWidget."
This reverts commit f038214d91.

The initial issue was incorrect. Django 2.2, and before, did not
generate invalid HTML as reported. With f03821 in place invalid HTML
was generated.

Thanks to Kevin Brown for follow-up report and investigation.
Backport of ee4a19053a from master
2019-11-21 21:06:07 +01:00
Carlton Gibson 0e58745716 [3.0.x] Pinned asgiref to 3.2 series.
Backport of 36453526d3 from master
2019-11-20 15:13:28 +01:00
Mariusz Felisiak b6be0699b9 [3.0.x] Fixed #30986 -- Fixed queryset crash when filtering against boolean RawSQL expressions on Oracle.
Backport of 8685e764ef from master
2019-11-18 09:16:21 +01:00
George Marshall fa6076daf4 [3.0.x] Fixed #30971 -- Prevented Query.resolve_lookup_value() from coercing list values to tuples.
Regression in 8a281aa7fe.

Backport of 8be79984dc from master
2019-11-13 09:20:50 +01:00
Hannes Ljungberg 8d3f43f7a9 [3.0.x] Fixed #30967 -- Fixed TrigramTest failures on PostgreSQL 12+.
Backport of 6e2f05b2e3 from master
2019-11-11 13:30:14 +01:00
Stephen Rauch 76d293f3e6 [3.0.x] Refs #30183 -- Doc'd dropping support for sqlparse < 0.2.2.
Support for sqlparse < 0.2.2 was broken in
782d85b6df because is_whitespace property
was added in sqlparse 0.2.2.

Backport of 4b6db766ba from master
2019-11-06 09:01:48 +01:00
Carlton Gibson dd2ca8b0ea [3.0.x] Fixed #30931 -- Restored ability to override Model.get_FIELD_display().
Thanks Sergey Fedoseev for the implementation idea.

Regression in a68ea23101.

Backport of 2d38eb0ab9 from master
2019-11-04 08:15:03 +01:00
Carlton Gibson 8740ff334a [3.0.x] Fixed #30902 -- Added __str__() for model choice enums.
Allows expected behavior when cast to str, also matching behaviour of
created instances with those fetched from the DB.

Thanks to Simon Charette, Nick Pope, and Shai Berger for reviews.

Backport of dbcd7b064e from master
2019-10-25 09:38:41 +02:00
Carlton Gibson 06e3c6db86 [3.0.x] Fixed #30900 -- Skipped async-related tests on Windows using Python 3.8.0.
Refs https://bugs.python.org/issue38563.
Backport of e83c300a33 from master
2019-10-24 10:43:37 +02:00
Hannes Ljungberg 318d186d7e [3.0.x] Fixed #30903 -- Fixed migrations crash on PostgreSQL when adding Index with opclasses and ordering.
Backport of fa5f3291e7 from master
2019-10-24 09:51:33 +02:00
Mariusz Felisiak 517d31516a [3.0.x] Refs #29926 -- Bumped minimum tblib version to 1.5.0 in test requirements.
Backport of 25903e41fb from master
2019-10-23 15:26:54 +02:00
Mariusz Felisiak 753a34b42a [3.0.x] Refs #29926 -- Skipped RemoteTestResultTest.test_add_failing_subtests() on Python 3.8+ and tblib <= 1.4.0.
Backport of 2847d2c760 from master
2019-10-22 15:34:44 +02:00
Mariusz Felisiak 74c5ddc657 [3.0.x] Refs #27910 -- Added __init__.py file for model_enums tests.
Backport of 1877ec1875 from master
2019-10-15 21:28:17 +02:00
Mariusz Felisiak 4a756cbc38 [3.0.x] Fixed #30870 -- Fixed showing that RunPython operations are irreversible by migrate --plan.
Thanks Hasan Ramezani for the initial patch and Kyle Dickerson for the
report.

Backport of 06d34aab7c from master
2019-10-14 11:43:15 +02:00
Mariusz Felisiak 4a263af64e [3.0.x] Isolated migrations.test_commands.MigrateTests.test_migrate_plan.
Backport of 05186c03a3 from master
2019-10-14 11:43:06 +02:00
Simon Charette bab3ad54ff [3.0.x] Fixed #30868 -- Prevented unnecessary AlterField when renaming a referenced pk.
Regression introduced by dcdd219ee1, refs #25817.

Thanks Carlos E. C. Leite for the report and Mariusz for the bisect.

Backport of 2839659b42 from master
2019-10-14 08:27:36 +02:00
Etienne Chové 651299e1ef [3.0.x] Fixed #30014 -- Fixed ModelChoiceField validation when initial value is a model instance.
Thanks Carlton Gibson for reviews.

Backport of e7cdb0cd7e from master
2019-10-11 14:33:32 +02:00
Etienne Chové 82ba905db3 [3.0.x] Added ModelChoiceField test for validation with to_field_name.
Backport of a12f9cd95a from master
2019-10-11 14:33:16 +02:00
Louise Grandjonc cf7ef5d258 [3.0.x] Fixed #30826 -- Fixed crash of many JSONField lookups when one hand side is key transform.
Regression in 6c3dfba892.

Backport of 7d1bf29977 from master
2019-10-11 11:51:14 +02:00
Hasan Ramezani c1cfec6b50 [3.0.x] Fixed #30854 -- Fixed QuerySet.select_related() with multiple FilteredRelations.
Backport of 6a75cea76a from master.
2019-10-11 09:18:23 +02:00
Hasan Ramezani 7c70aa8f63 [3.0.x] Fixed #30839 -- Fixed Field.__deepcopy__() so forms don't share error messages.
Backport of a28d1b38e5 from master
2019-10-08 10:28:30 +02:00
Hasan Ramezani 30271a47da [3.0.x] Refs #27914 -- Fixed serialization of nested enum.Enum classes in migrations.
Backport of 6452112640 from master
2019-10-03 11:17:10 +02:00
Hasan Ramezani 1a4db2cc28 [3.0.x] Refs #27914 -- Moved test enum.Enum subclasses outside of WriterTests.test_serialize_enums().
Backport of d3030deaaa from master
2019-10-03 11:17:04 +02:00
Ahmet Kucuk 9dc13f41b5 [3.0.x] Fixed #30510 -- Fixed crash of QuerySet.bulk_create() with mixed-length texts on Oracle.
Text with more than 4000 characters must be set to as a CLOB on Oracle
what caused a mixed datatype error (ORA-01790) when shorter text
appeared in the same operation.

Backport of dc890bef5a from master
2019-10-01 13:11:19 +02:00
Ad Timmering 556d0c08bd [3.0.x] Fixed #28690 -- Fixed handling of two-digit years in parse_http_date().
Due to RFC7231 ayear that appears to be more than 50 years in the
future are interpreted as representing the past.

Backport of 7b5f8acb9e from master
2019-09-30 15:39:36 +02:00
Ad Timmering f38655ed1c [3.0.x] Refs #28690 -- Added more tests for parse_http_date().
Backport of 7cbd25a06e from master
2019-09-30 15:39:28 +02:00
Hasan Ramezani df0c2ac358 [3.0.x] Fixed #30774 -- Made serialization in migrations use members names for Enums.
Backport of f0adf3b9b7 from master
2019-09-30 10:52:30 +02:00
pablo 5d63bf0bc3 [3.0.x] Fixed #30802 -- Prevented manifest creation when running collectstatic in dry run mode.
Backport of fa8fe09e4e from master
2019-09-27 23:06:55 +02:00
Hasan Ramezani 0dc39ca867 [3.0.x] Fixed #30798 -- Fixed Meta.ordering validation for pk of related fields.
Regression in 440505cb2c.

Backport of 95a11578ce from master
2019-09-27 14:52:08 +02:00
Hasan Ramezani da8f85aa82 [3.0.x] Refs #30798 -- Prevented chaining fields from the same related model multiple times in model Meta.ordering.
Backport of c7944628a1 from master
2019-09-27 14:52:02 +02:00
Pablo García 49dcb5d3ba [3.0.x] Fixed #30810 -- Fixed WatchmanReloaderTests.test_setting_timeout_from_environment_variable test.
client_timeout is an instance attribute.

Backport of 2fd610eb30 from master
2019-09-27 08:35:55 +02:00
Mariusz Felisiak 1adf85d168 [3.0.x] Fixed #30800 -- Fixed migrations crash when altering a field with custom db_type().
Regression in 1378d665a1.
Backport of 580e644f24 from master
2019-09-25 12:32:57 +02:00
Simon Charette 6b7bd079a6 [3.0.x] Fixed #30796 -- Prevented select_related() from mutating a queryset on chaining.
Thanks Darren Maki for the report.

Backport of 37f8f29377 from master
2019-09-24 09:47:21 +02:00
Hasan Ramezani 2362f27265 [3.0.x] Fixed #13296 -- Fixed ordering by Options.order_with_respect_to after deleting objects.
Thanks Simon Meers for the original patch.

Backport of f97bbad908 from master
2019-09-23 11:45:33 +02:00
Mariusz Felisiak 1611906094
[3.0.x] Refs #30771 -- Fixed RemovedInDjango31Warning in test_exact_query_rhs_with_selected_columns. 2019-09-20 22:01:28 +02:00
James Timmins 3697ddbf75 [3.0.x] Fixed #30771 -- Fixed exact lookup against queries with selected columns.
Use pre-existing select fields (and thereby GROUP BY fields) from
subquery if they were specified, instead of always defaulting to pk.

Thanks Aur Saraf for the report and Simon Charette for guidance.

Backport of 0719edcd5f from master
2019-09-20 11:14:39 +02:00
Sam Reynolds e74ca0226a [3.0.x] Fixed #30776 -- Restored max length validation on AuthenticationForm.UsernameField.
Regression in 5ceaf14686.

Thanks gopackgo90 for the report and Mariusz Felisiak for tests.

Backport of 6c9778a58e from master
2019-09-18 12:04:47 +02:00