1
0
mirror of https://github.com/django/django.git synced 2025-04-07 23:16:46 +00:00

11007 Commits

Author SHA1 Message Date
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 e74b3d724e5ddfef96d1d66bd1c58e7aae26fc85 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 e4ab44a4b2ef70be09c35c9197a19fd2e993b4d6 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 77caeaea888d1744416b213036ff29699758de76 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 3a9f192b131f7a9b0fe5783c684b23015fa67cc8 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 8a6df55f2dd5131282084a4edfd48f63fbf8c69a.
Backport of eaf9764d3bb25970da89de5799d8d308715628ba 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 0ddb4ebf7bfcc4730c80a772dd146a49ef6895f6.

Thanks Julien Dutriaux for the report.
Backport of e11d05e0b488a3ff2b3c9d8f2e1e50f471750d6e 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 6a881197e92a03a8bb7c91440d0a702b6dfd6736 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 2d42e23b6d8fd76f93a96b2310b2c9dfd441d009 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 179d9dc0c2265176f9f7062a1d98dc44d896f91f 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 7acef095d73 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 f6405c0b8ef7aff513b105c1da68407a881a3671 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 0be51d2226fce030ac9ca840535a524f41e9832c 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 825ce75faec63ce81601e31152c757a9c28fed13 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 1251772cb83aa4106f526fe00738e51c0eb59122 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 547a07fa7ec4364ea9ecd2aabfdd16ee4c63003c 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 4ed534758cb6a11df9f49baddecca5a6cdda9311.

Backport of bb8f66934d93faf80cd1a2dda65aaedce21a6fc5 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 20799cc0a6d98816b9ef0577e24691bd26b80d7d.

Backport of 04e87e79a0bd2b1b9fdc30f884a637a3268733f0 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 d4fff711d4c97356bd6ba1273d2a5e349326eb5f.
Backport of 4376c2c7f8cd9c7604a7d053b3c4022dd5ac2795 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 bfb746f983aa741afa3709794e70f1e0ab6040b5.

Backport of 94ea79be137f3cb30949bf82198e96e094f2650d 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 4ed534758cb6a11df9f49baddecca5a6cdda9311.

Backport of 20799cc0a6d98816b9ef0577e24691bd26b80d7d 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 60626162f76f26d32a38d18151700cb041201fb3 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 0aeb802cf054cb369646c871b53c93a83c1fa58a 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 99abfe8f4d3caebcd73548f5bf9e4755bdfed318 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 d907371ef99a1e4ca6bc1660f57d81f265750984 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 1d6fdca557e674b9a789b51caadca8985e588492.
Backport of 7c929fcf7c8913d0bd78a8400eafe866ceed9aa6 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 71c4fb7beb8e3293243140e4bd74e53989196440.

Backport of 1d6fdca557e674b9a789b51caadca8985e588492 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 184a6eebb0ef56d5f1b1315a8e666830e37f3f81 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 2d8dcba03aae200aaa103ec1e69f0a0038ec2f85 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 ba691933cee375195c9c50f333dd4b2a3abbb726 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 02447fb133b53ec7d0ff068cc08f06fdf8817ef7 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 fd53db842c35c994dbd54196dd38a908f3676b1a 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 c071c408d72330b422c124a6bdd85a68acae9566 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 3cd3bebe8921e14b911b36b2a1cbceef8fb6294e.
Backport of ff55adbd0da6618abaf265d16196bf54f81aa77a 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 730711e8282893723f993f55d3e3b0c823cfdb9a 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 96a3ea39ef0790dbc413dde0a3e19f6a769356a2 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
Mariusz Felisiak
3ca8cc0df1 [3.1.x] Fixed #31790 -- Fixed setting SameSite and Secure cookies flags in HttpResponse.delete_cookie().
Cookies with the "SameSite" flag set to None and without the "secure"
flag will be soon rejected by latest browser versions.

This affects sessions and messages cookies.
Backport of 240cbb63bf9965c63d7a3cc9032f91410f414d46 from master
2020-07-16 08:17:45 +02:00
Mariusz Felisiak
e6285cac83 [3.1.x] Fixed #31773 -- Fixed preserving output_field in ExpressionWrapper for combined expressions.
Thanks Thodoris Sotiropoulos for the report and Simon Charette for the
implementation idea.

Regression in df32fd42b84cc6dbba173201f244491b0d154a63.
Backport of 8a6df55f2dd5131282084a4edfd48f63fbf8c69a from master
2020-07-09 11:55:45 +02:00
Carlton Gibson
84640f5ae3 [3.1.x] Fixed #31752 -- Fixed intermittent test_order_by_relational_field_through_model failure.
Set explicit datetime for M2M ordering test.

Thanks to Mariusz Felisiak for the suggestion.
Backport of b5371539a9d871758d639a85d1f2fd648c1f633d from master
2020-06-30 13:08:58 +02:00
Ad Timmering
c944df827f [3.1.x] Fixed #30807 -- Fixed TestArchive.test_extract_file_permissions() when umask is 0o000.
Fixed test that checks permissions on files extracted from archives
with no permissions set, to not assume a default umask of 0o002.

Test regression in c95d063e776e849cf1a0bf616c654165cb89c706.
Backport of ec5aa2161d8015a3fe57dcbbfe14200cd18f0a16 from master
2020-06-29 07:52:23 +02:00
Mariusz Felisiak
5263480d7f [3.1.x] Fixed #31742 -- Fixed makemigrations crash on ForeignKey to an app with mixed case label.
Regression in 9e1b6b8a66af4c2197e5b1b41eb9dbb36e4f6502.

Thanks Ignacio Santolin for the report.
Backport of 62d85a283500e9abb0e1c9ec53c59be468f056a0 from master
2020-06-26 23:20:21 +02:00
Simon Charette
b8cb14e8a0 [3.1.x] Fixed #31735 -- Fixed migrations crash on namespaced inline FK addition on PostgreSQL.
The namespace of the constraint must be included when making the
constraint immediate.

Regression in 22ce5d0031bd795ade081394043833e82046016c.

Thanks Rodrigo Estevao for the report.

Backport of 2e8941b6f90e65ffad3f07083b8de59e8ed29767 from master
2020-06-24 08:59:43 +02:00
Ahmad A. Hussein
ac0ff7d700 [3.1.x] Fixed #31736 -- Fixed InspectDBTransactionalTests.test_foreign_data_wrapper crash on Windows.
Backport of 798835112d81b852efaae0e067af389c733cd1b3 from master
2020-06-23 21:00:09 +02:00
Guillermo Bonvehí
b2e2489d80 [3.1.x] Fixed #31728 -- Fixed cache culling when no key is found for deletion.
DatabaseCache._cull implementation could fail if no key was found to
perform a deletion in the table. This prevented the new cache key/value
from being correctly added.

Backport of f386454d1302b66d0eb331ed0ae9e4811e2f3a15 from master
2020-06-22 07:10:16 +02:00
Tom Forbes
ac7f7eab0f [3.1.x] Fixed #31716 -- Fixed detection of console scripts in autoreloader on Windows.
Backport of 8a902b7ee622ada258d15fb122092c1f02b82698 from master
2020-06-18 13:04:44 +02:00
David Smith
9b95c3bc09 [3.1.x] Refs #31670 -- Removed whitelist/blacklist terminology in docs and comments.
Backport of 10df5b71775d8ee98201acb1367266521b17cc00 from master
2020-06-17 13:16:17 +02:00
Mariusz Felisiak
42f5f2d76b [3.1.x] Fixed #31659 -- Made ExpressionWrapper preserve output_field for combined expressions.
Regression in df32fd42b84cc6dbba173201f244491b0d154a63.

Thanks Simon Charette for the review.

Backport of aeb8996a6706cad3e96d8221760c1cb408ee7ed9 from master
2020-06-12 07:21:19 +02:00
Michael Brown
45ec013116 [3.1.x] Fixed #28132 -- Made MultiPartParser ignore filenames with trailing slash.
Backport of 36db4dd937ae11c5b687c5d2e5fa3c27e4140001 from master
2020-06-11 09:12:14 +02:00
Hasan Ramezani
4385ef0119 [3.1.x] Fixed #31657 -- Fixed ordering by attnames of self-referential ForeignKeys.
Backport of 037a624120b676858be4b93c4d0adda45916fd2a from master
2020-06-10 12:05:31 +02:00