Commit Graph

12472 Commits

Author SHA1 Message Date
Carlton Gibson f476c8847a Refs #33173, Refs #33755 -- Fixed ResourceWarning from unclosed files in ASGI tests. 2022-08-04 10:00:36 +02:00
Claude Paroz 0638b4e23d Fixed #33888 -- Fixed get_select2_language() crash with no language activated.
Regression in 3079133c73.
2022-08-03 19:51:25 +02:00
Alberto Planas 4e13b40a76
Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting() on final tags.
Regression in 7c318a8bdd.
2022-08-03 16:36:04 +02:00
Mariusz Felisiak cb791a2540
Fixed #33872 -- Deprecated django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField. 2022-08-03 11:42:51 +02:00
Carlton Gibson bd062445cf Fixed CVE-2022-36359 -- Escaped filename in Content-Disposition header.
Thanks to Motoyasu Saburi for the report.
2022-08-03 08:46:31 +02:00
Mariusz Felisiak 919e65b21e Updated translations from Transifex.
This also fixes related i18n tests.

Forwardport of a3bab93324 from stable/4.1.x.

Co-authored-by: Claude Paroz <claude@2xlibre.net>
2022-08-03 08:04:34 +02:00
Mariusz Felisiak ab1955a05e
Fixed #33881 -- Added support for database collations to ArrayField(Char/TextFields). 2022-08-02 11:44:26 +02:00
Carlton Gibson 89e695a69b Fixed #33876, Refs #32229 -- Made management forms render with div.html template.
Thanks to Claude Paroz for the report.
2022-08-02 10:30:09 +02:00
Claude Paroz 44c24bf028 Refs #25706 -- Removed inline CSS in the openlayers widget template. 2022-08-01 20:29:49 +02:00
Mariusz Felisiak c18861804f Fixed warnings per flake8 5.0.0. 2022-07-31 08:16:19 +02:00
Marcelo Galigniana 564437f767 Fixed #33726 -- Added skip-link to admin for keyboard navigation. 2022-07-28 11:52:48 +02:00
Nick Pope 9dff316be4 Refs #32948, Refs #32946 -- Used Q.create() internally for dynamic Q() objects.
Node.create() which has a compatible signature with Node.__init__()
takes in a single `children` argument rather than relying in unpacking
*args in Q.__init__() which calls Node.__init__().

In addition, we were often needing to unpack iterables into *args and
can instead pass a list direct to Node.create().
2022-07-27 10:06:24 +02:00
Nick Pope ddf0002bb7 Refs #32948 -- Renamed Node._new_instance() to Node.create().
Node._new_instance() was added in
6dd2b5468f to work around Q.__init__()
having an incompatible signature with Node.__init__().

It was intended as a hook that could be overridden if subclasses needed
to change the behaviour of instantiation of their specialised form of
Node. In practice this doesn't ever seem to have been used for this
purpose and there are very few calls to Node._new_instance() with other
code, e.g. Node.__deepcopy__() calling Node and overriding __class__ as
required.

Rename this to Node.create() to make it a more "official" piece of
private API that we can use to simplify a lot of other areas internally.

The docstring and nearby comment have been reworded to read more
clearly.
2022-07-27 10:06:24 +02:00
Nick Pope cc52e02c96 Refs #32948 -- Added more tests for django.utils.tree.Node.
The tests for creating new instances or copying instances of Node and
its subclasses didn't fully capture the behaviour of the implementation,
particularly around whether the `children` list or is contents were the
same as the source.
2022-07-27 07:58:29 +02:00
Nick Pope 769d7cce4a Used AND, OR, XOR constants instead of hard-coded values. 2022-07-27 07:55:09 +02:00
Mariusz Felisiak a1e9e9abc5 Refs #27236 -- Reverted "Refs #27236 -- Added generic mechanism to handle the deprecation of migration operations."
This reverts commit 41019e48bb.
2022-07-26 11:41:19 +02:00
Mariusz Felisiak c773d5794e Refs #27236 -- Reverted AlterIndexTogether deprecation.
This partly reverts a6385b382e.
2022-07-26 11:41:19 +02:00
Claude Paroz 7bdb682215
Fixed BasicExtractorTests.test_makemessages_find_files() test. 2022-07-26 07:23:45 +02:00
Claude Paroz 2d23a07817 Fixed #33866 -- Added pathlib.Path support to GDALRaster constructor. 2022-07-25 20:48:33 +02:00
Claude Paroz f2dd652245 Fixed #33863 -- Fixed JavaScriptCatalog with more than 1 level of fallback translations.
Co-authored-by: Carlos Mermingas <cmermingas@gmail.com>
2022-07-25 08:45:46 +02:00
Claude Paroz 3b79dab19a Refs #33691 -- Deprecated insecure password hashers.
SHA1PasswordHasher, UnsaltedSHA1PasswordHasher, and UnsaltedMD5PasswordHasher
are now deprecated.
2022-07-23 21:29:31 +02:00
Claude Paroz 0afb65e635
Removed unneeded test suite creation for GIS measure tests. 2022-07-23 15:57:05 +02:00
Nick Pope 4d4bf55e0e Fixed #33864 -- Deprecated length_is template filter. 2022-07-23 12:36:21 +02:00
Mariusz Felisiak f810325721
Refs #27236 -- Made cosmetic edits to Meta.index_together deprecation.
This should make it more straightforward to move forward when
deprecation ends.
2022-07-21 07:05:50 +02:00
Mariusz Felisiak 24effbceb8
Fixed #33855 -- Removed unnecessary system check calls from test worker initialization.
Regression in 3b3f38b3b0.
2022-07-19 09:45:11 +02:00
Jarrett Keifer 3e3e814166
Fixed #33854 -- Corrected the order of parameters in dbshell on PostgreSQL. 2022-07-18 06:30:20 +02:00
cheng d4c5d2b52c Fixed #33631 -- Marked {% blocktranslate asvar %} result as HTML safe. 2022-07-14 11:09:19 +02:00
David Wobrock a6385b382e
Fixed #27236 -- Deprecated Meta.index_together in favor of Meta.indexes.
This also deprecates AlterIndexTogether migration operation.
2022-07-12 09:04:31 +02:00
David Wobrock 4f284115a9 Refs #27236 -- Split RenameField() tests with unique/index_together. 2022-07-12 06:38:03 +02:00
David Wobrock f8f16b3cd8 Refs #27236 -- Removed usage of Meta.index_together from indexes/introspection test models. 2022-07-11 08:30:19 +02:00
Ikko Ashimine 77330a089c
Fixed typo in tests/sitemaps_tests/test_http.py. 2022-07-11 08:25:04 +02:00
Mariusz Felisiak eb3699ea77
Fixed #33718 -- Dropped support for MySQL 5.7. 2022-07-08 13:30:12 +02:00
Stéphane "Twidi" Angel ccbf714ebe Fixed #33829 -- Made BaseConstraint.deconstruct() and equality handle violation_error_message.
Regression in 667105877e.
2022-07-08 08:17:42 +02:00
David Wobrock 41019e48bb Refs #27236 -- Added generic mechanism to handle the deprecation of migration operations. 2022-07-08 07:05:55 +02:00
Christos Kopanos 608ab043f7 Fixed #33826 -- Fixed RedisCache.set_many()/delete_many() crash with an empty list. 2022-07-06 10:45:52 +02:00
Vladimir Kochetkov 3926e35aa8 Fixed #33823 -- Made inspectdb generate unique related_name when reverse accessor clashes. 2022-07-06 09:35:50 +02:00
Simon Charette 877c800f25 Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-07-06 07:40:07 +02:00
Mariusz Felisiak 73766c1187
Fixed RelatedGeoModelTest.test08_defer_only() on MySQL 8+ with MyISAM storage engine. 2022-07-05 19:05:03 +02:00
Shawn Dong 18c5ba07cc Fixed #33822 -- Fixed save() crash on model formsets when not created by modelformset_factory().
Thanks Claude Paroz for the report.

Regression in e87f57fdb8.
2022-07-05 07:19:18 +02:00
Mariusz Felisiak 249ecc437f
Fixed #33815 -- Fixed last_executed_query() on Oracle when parameter names overlap. 2022-07-05 05:53:49 +02:00
Mariusz Felisiak 54eb8a374d Fixed CVE-2022-34265 -- Protected Trunc(kind)/Extract(lookup_name) against SQL injection.
Thanks Takuto Yoshikai (Aeye Security Lab) for the report.
2022-07-04 08:13:41 +02:00
Ipakeev 425718726b
Fixed #33816 -- Fixed QuerySet.only() after select_related() crash on proxy models. 2022-07-04 06:37:36 +02:00
Mariusz Felisiak 863aa7541d
Fixed GEOSTest.test_emptyCollections() on GEOS 3.8.0.
It's a regression in GEOS 3.8.0 fixed in GEOS 3.8.1.
2022-07-01 19:05:27 +02:00
Michael Manfre 03eec9ff6c Updated vendored _urlsplit() to strip newline and tabs.
Refs Python CVE-2022-0391. Django is not affected, but others who
incorrectly use internal function url_has_allowed_host_and_scheme()
with unsanitized input could be at risk.
2022-07-01 08:48:38 +02:00
Hrushikesh Vaidya 72e41a0df6 Fixed #33779 -- Allowed customizing encoder class in django.utils.html.json_script(). 2022-06-28 10:54:38 +02:00
Mehrdad d4d5427571 Refs #33697 -- Used django.utils.http.parse_header_parameters() for parsing boundary streams.
This also removes unused parse_header() and _parse_header_params()
helpers in django.http.multipartparser.
2022-06-28 09:42:47 +02:00
Ankur eb7b8f3699 Fixed #33805 -- Made admin's many-to-many widgets do not display help text for selecting values when allow_multiple_selected is False. 2022-06-28 06:04:42 +02:00
Mariusz Felisiak 44ffd8d06f Fixed #33796 -- Fixed ordered combined queryset crash when used in subquery on PostgreSQL and MySQL.
Thanks Shai Berger for the report.

Regression in 30a0144134.
2022-06-27 06:21:31 +02:00
Mariusz Felisiak 083bfca6b6
Fixed #33800 -- Fixed system check for the same template tag module in installed apps and template tag libraries.
Thanks Claude Paroz for the report.

Regression in 004b4620f6.
2022-06-23 20:22:59 +02:00
DhruvaPatil98 c627226d05 Fixed #33799, Refs #31685 -- Added parameters for updating conflicts to QuerySeta.abulk_create(). 2022-06-23 11:12:35 +02:00