Commit Graph

11020 Commits

Author SHA1 Message Date
Max Smolens e707a1bd9a [3.1.x] Fixed #31850 -- Fixed BasicExtractorTests.test_extraction_warning with xgettext 0.21+.
"format string with unnamed arguments cannot be properly localized"
warning is not raised in xgettext 0.21+.

This patch uses a message that causes an xgettext warning regardless of
the version.

Backport of 07a30f5616 from master
2020-11-02 10:29:14 +01:00
Christian Klus ab951d242e [3.1.x] Fixed #32152 -- Fixed grouping by subquery aliases.
Regression in 42c08ee465.

Thanks Simon Charette for the review.

Backport of 4ac2d4fa42 from master
2020-10-29 11:30:53 +01:00
Mariusz Felisiak 767e06b5a8 [3.1.x] Fixed #32130 -- Fixed pre-Django 3.1 password reset tokens validation.
Thanks Gordon Wrigley for the report and implementation idea.

Regression in 226ebb1729.
Backport of 3418092238 from master
2020-10-22 13:22:00 +02:00
Hasan Ramezani 2212927c1b [3.1.x] Fixed #32107 -- Fixed ProtectedError.protected_objects and RestrictedError.restricted_objects.
Regression in 4ca5c565f4 and
ab3cbd8b9a.

Thanks Vitaliy Yelnik for the report.

Backport of 3b1746d519 from master
2020-10-19 13:10:13 +02:00
Claude Paroz 8caf524a1d [3.1.x] Fixed #32110 -- Doc'd and tested enumerations for ChoiceField.choices.
Backport of 7f85498eef from master
2020-10-17 21:01:54 +02:00
Mariusz Felisiak 536213278c [3.1.x] Refs #32096 -- Fixed ExclusionConstraint crash with JSONField key transforms in expressions.
Regression in 6789ded0a6.

Backport of ee0abac169 from master.
2020-10-14 22:10:09 +02:00
Mariusz Felisiak ae6b24093c [3.1.x] Refs #32096 -- Fixed ExpressionWrapper crash with JSONField key transforms.
Regression in 6789ded0a6.

Thanks Simon Charette and Igor Jerosimić for the report.

Backport of bbd55e5863 from master
2020-10-14 21:03:40 +02:00
Mariusz Felisiak 59fe0b8541 [3.1.x] Refs #32096 -- Fixed __in lookup crash against key transforms for JSONField.
Regression in 6789ded0a6 and
1251772cb8.

Thanks Simon Charette and Igor Jerosimić for the report.

Backport of 7e1e198494 from master
2020-10-14 21:03:15 +02:00
Mariusz Felisiak d94e777b66 [3.1.x] Refs #32096 -- Fixed crash of ArrayAgg/StringAgg/JSONBAgg with ordering over JSONField key transforms.
Regression in 6789ded0a6.

Thanks Igor Jerosimić for the report.

Backport of 1f31027bb3 from master
2020-10-14 21:02:29 +02:00
Mariusz Felisiak 735c88fdd7 [3.1.x] Refs #32096 -- Added test for ArrayAgg over JSONField key transforms.
Backport of 1d650ad019 from master
2020-10-14 20:57:03 +02:00
Tim Schilling 4047c1602c [3.1.x] Fixed #32091 -- Fixed admin search bar width on filtered admin page.
Backport of b7da588e88 from master
2020-10-09 12:11:15 +02:00
Qi Zhao 8c403b17f9 [3.1.x] Fixed #32080 -- Fixed displaying Unicode chars in forms.JSONField and read-only JSONField values in admin.
Backport of de81676b51 from master
2020-10-09 08:44:32 +02:00
Mariusz Felisiak 322f0f7012 [3.1.x] Skipped GetImageDimensionsTests.test_webp when WEBP is not installed.
Backport of fce389af7c from master
2020-10-06 11:26:30 +02:00
David Smith 12ba61ed17 [3.1.x] Bumped minimum isort version to 5.1.0.
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.

Backport of e74b3d724e from master
2020-09-30 09:51:31 +02:00
Mariusz Felisiak b7df7de44f [3.1.x] Fixed #32038 -- Fixed EmptyFieldListFilter crash with GenericRelation.
Thanks Javier Matos Odut for the report.

Backport of e4ab44a4b2 from master
2020-09-25 10:10:26 +02:00
Mariusz Felisiak fbb7881956 [3.1.x] Fixed #32012 -- Made test database creation sync apps models when migrations are disabled.
Thanks Jaap Roes for the report.
Backport of 77caeaea88 from master
2020-09-23 10:54:50 +02:00
Mariusz Felisiak 5a03e14deb [3.1.x] Refs #32007 -- Skipped test_q_expression_annotation_with_aggregation on Oracle.
Backport of 3a9f192b13 from master
2020-09-16 11:47:48 +02:00
Mariusz Felisiak 1afc9b31bb [3.1.x] Fixed #32007 -- Fixed queryset crash with Q() annotation and aggregation.
Thanks Gordon Wrigley for the report.

Regression in 8a6df55f2d.
Backport of eaf9764d3b from master
2020-09-15 11:41:42 +02:00
Mariusz Felisiak a3bb80dc31 [3.1.x] Fixed #31990 -- Fixed QuerySet.ordered for GROUP BY queries on models with Meta.ordering.
Regression in 0ddb4ebf7b.

Thanks Julien Dutriaux for the report.
Backport of e11d05e0b4 from master
2020-09-14 20:08:18 +02:00
Mariusz Felisiak 17d5b16dbf [3.1.x] Refs #31901 -- Fixed SeleniumTests.test_list_editable_popups with headless mode.
Backport of 6a881197e9 from master
2020-09-02 15:18:15 +02:00
Brian Helba c69c6886de [3.1.x] Fixed #31941 -- Corrected FileField.deconstruct() with a callable storage.
Backport of 2d42e23b6d from master
2020-09-02 11:07:43 +02:00
Mariusz Felisiak 2b099caa59 [3.1.x] Fixed CVE-2020-24584 -- Fixed permission escalation in intermediate-level directories of the file system cache on Python 3.7+.
Backport of f56b57976133129b0b351a38bba4ac882badabf0 from master.
2020-09-01 09:35:05 +02:00
Mariusz Felisiak 934430d22a [3.1.x] Fixed CVE-2020-24583, #31921 -- Fixed permissions on intermediate-level static and storage directories on Python 3.7+.
Thanks WhiteSage for the report.

Backport of ea0febbba531a3ecc8c77b570efbfb68ca7155db from master.
2020-09-01 09:35:05 +02:00
Federico Jaramillo Martínez c4e5384e73 [3.1.x] Fixed #31952 -- Fixed EmptyFieldListFilter crash with reverse relationships.
Thanks dacotagh for the report.

Backport of 179d9dc0c2 from master
2020-08-31 10:40:21 +02:00
Simon Charette 2986ec031d [3.1.x] Fixed #31965 -- Adjusted multi-table fast-deletion on MySQL/MariaDB.
The optimization introduced in 7acef095d7 did not properly handle
deletion involving filters against aggregate annotations.

It initially was surfaced by a MariaDB test failure but misattributed
to an undocumented change in behavior that resulted in the systemic
generation of poorly performing database queries in 5b83bae031.

Thanks Anton Plotkin for the report.

Refs #23576.

Backport of f6405c0b8e from master
2020-08-31 09:22:59 +02:00
Mariusz Felisiak 655e1ce6b1 [3.1.x] Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder on PostgreSQL.
Thanks Marc Debureaux for the report.
Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.

Backport of 0be51d2226 from master
2020-08-28 19:12:02 +02:00
Kevin Michel 3a42c0447b [3.1.x] Fixed #31928 -- Fixed detecting an async get_response in various middlewares.
SecurityMiddleware and the three cache middlewares were not calling
super().__init__() during their initialization or calling the required
MiddlewareMixin._async_check() method.

This made the middlewares not properly present as coroutine and
confused the middleware chain when used in a fully async context.

Thanks Kordian Kowalski for the report.

Backport of 825ce75fae from master
2020-08-28 12:35:53 +02:00
Mariusz Felisiak 9075d1f662 [3.1.x] Fixed #31936 -- Fixed __in lookup on key transforms for JSONField.
This resolves an issue on databases without a native JSONField
(MariaDB, MySQL, SQLite, Oracle), where values must be wrapped.

Thanks Sébastien Pattyn for the report.
Backport of 1251772cb8 from master
2020-08-26 22:14:46 +02:00
Michael Galler b6d2419120 [3.1.x] Fixed #31905 -- Made MiddlewareMixin call process_request()/process_response() with thread sensitive.
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>

Backport of 547a07fa7e from master
2020-08-26 07:54:55 +02:00
Mariusz Felisiak e81aa7a94a [3.1.x] Fixed #31877 -- Reverted "Fixed #19878 -- Deprecated TemplateView passing URL kwargs into context."
This reverts commit 4ed534758c.

Backport of bb8f66934d from master
2020-08-24 11:39:05 +02:00
Mariusz Felisiak f247c66bb5 [3.1.x] Refs #31877 -- Reverted "Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning."
This reverts commit 20799cc0a6.

Backport of 04e87e79a0 from master
2020-08-24 11:38:57 +02:00
Mariusz Felisiak 7eaa2776e1 [3.1.x] Fixed #31895 -- Fixed crash when decoding invalid session data.
Thanks Matt Hegarty for the report.
Regression in d4fff711d4.
Backport of 4376c2c7f8 from master
2020-08-19 12:06:55 +02:00
Gert Burger 85c47b9a73 [3.1.x] Fixed #31863 -- Prevented mutating model state by copies of model instances.
Regression in bfb746f983.

Backport of 94ea79be13 from master
2020-08-13 15:27:18 +02:00
Adam Johnson 9ae40d8137 [3.1.x] Fixes #31877 -- Used lazy() for TemplateView kwarg deprecation warning.
SimpleLazyObjects cause a crash when filtering.

Thanks Tim L. White for the report.
Regression in 4ed534758c.

Backport of 20799cc0a6 from master
2020-08-13 13:13:25 +02:00
Daniel Hillier f139372491 [3.1.x] Fixed #31866 -- Fixed locking proxy models in QuerySet.select_for_update(of=()).
Backport of 60626162f7 from master
2020-08-11 12:30:31 +02:00
Carlton Gibson 02b474f2a4 [3.1.x] Fixed #31865 -- Adjusted admin nav sidebar template to reduce debug logging.
Thanks to Mariusz Felisiak for review.

Backport of 0aeb802cf0 from master
2020-08-11 11:43:22 +02:00
Mariusz Felisiak c21bbe0883 [3.1.x] Fixed #31864 -- Fixed encoding session data during transition to Django 3.1.
Thanks אורי for the report.
Backport of 99abfe8f4d from master
2020-08-07 21:43:46 +02:00
Mariusz Felisiak 9857352655 [3.1.x] Fixed #31842 -- Added DEFAULT_HASHING_ALGORITHM transitional setting.
It's a transitional setting helpful in migrating multiple instance of
the same project to Django 3.1+.

Thanks Markus Holtermann for the report and review, Florian
Apolloner for the implementation idea and review, and Carlton Gibson
for the review.

Backport of d907371ef9 from master.
2020-08-04 09:39:29 +02:00
Mariusz Felisiak c67314ff95 [3.1.x] Refs #27468 -- Fixed TestSigner.test_dumps_loads_legacy_signature.
Added in 1d6fdca557.
Backport of 7c929fcf7c from master
2020-08-01 20:43:34 +02:00
Mariusz Felisiak b84b1921da [3.1.x] Refs #27468 -- Added tests and release notes for signing.dumps()/loads() changes.
Follow up to 71c4fb7beb.

Backport of 1d6fdca557 from master
2020-07-31 22:07:34 +02:00
Tim Graham 32cb1fe1c6 [3.1.x] Refs #31829 -- Added DatabaseFeatures.json_key_contains_list_matching_requires_list.
CockroachDB's behavior matches PostgreSQL.
Backport of 184a6eebb0 from master
2020-07-30 06:40:32 +02:00
sage 23ce3d8491 [3.1.x] Fixed #31829 -- Used JSONField __contains lookup on key transforms.
Backport of 2d8dcba03a from master
2020-07-28 20:53:11 +02:00
Mariusz Felisiak 247bcef6b4 [3.1.x] Fixed #31836 -- Dropped support for JSONField __contains and __contained_by lookups on SQLite.
The current implementation works only for basic examples without
supporting nested structures and doesn't follow "the general principle
that the contained object must match the containing object as to
structure and data contents, possibly after discarding some
non-matching array elements or object key/value pairs from the
containing object".

Backport of ba691933ce from master.
2020-07-28 13:08:19 +02:00
Mariusz Felisiak 028a5f86f2 [3.1.x] Fixed #31835 -- Dropped support for JSONField __contains lookup on Oracle.
The current implementation works only for basic examples without
supporting nested structures and doesn't follow "the general principle
that the contained object must match the containing object as to
structure and data contents, possibly after discarding some
non-matching array elements or object key/value pairs from the
containing object".
Backport of 02447fb133 from master
2020-07-28 11:54:35 +02:00
Mariusz Felisiak 2ff2084cfd [3.1.x] Fixed #31805 -- Fixed SchemaTests.tearDown() when table names are case-insensitive.
Backport of fd53db842c from master
2020-07-22 12:51:03 +02:00
Mariusz Felisiak 7a3fa3af68 [3.1.x] Fixed #31797 -- Skipped schema tests on specific MariaDB versions.
test_alter_not_unique_field_to_primary_key() test is affected by
https://jira.mariadb.org/browse/MDEV-19598 on MariaDB 10.4.4 to 10.5.1.

test_alter_pk_with_self_referential_field() test is affected by
https://jira.mariadb.org/browse/MDEV-22775 on MariaDB 10.4 series
from 10.4.13.
Backport of c071c408d7 from master
2020-07-22 10:58:14 +02:00
Tim Graham d004bcee0c [3.1.x] Reverted "Fixed #30300 -- Allowed migrations to be loaded from directories without __init__.py file."
This reverts commit 3cd3bebe89.
Backport of ff55adbd0d from master
2020-07-22 07:04:52 +02:00
Tom Forbes b830cc02ed [3.1.x] Used temporary directory in RestartWithReloaderTests.test_manage_py().
Using the current directory can cause a PermissionError.

Backport of 730711e828 from master
2020-07-20 09:41:28 +02:00
Florian Apolloner bfe404deb9 [3.1.x] Fixed #31784 -- Fixed crash when sending emails on Python 3.6.11+, 3.7.8+, and 3.8.4+.
Fixed sending emails crash on email addresses with display names longer
then 75 chars on Python 3.6.11+, 3.7.8+, and 3.8.4+.

Wrapped display names were passed to email.headerregistry.Address()
what caused raising an exception because address parts cannot contain
CR or LF.

See https://bugs.python.org/issue39073

Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>

Backport of 96a3ea39ef from master
2020-07-20 07:15:04 +02:00
Mariusz Felisiak 474f65406f [3.1.x] Pinned asgiref to 3.2 series with minimum version to 3.2.10. 2020-07-17 11:08:39 +02:00