Commit Graph

31799 Commits

Author SHA1 Message Date
Simon Charette e0f8104a96 Refs #34553 -- Split constraint escaping test in subtests.
This ensures that constraint violations are tested in isolation from
each other as an IntegrityError only ensures a least one constraint is
violated.

For example, the assertion added in 42e8cf4 break both the
name_constraint_rhs and the rebate_constraint constraints and thus
doesn't constitute a proper regression test. Refs #32369.
2023-05-10 17:25:57 +02:00
Mariusz Felisiak 6e32d1fa1d
Fixed #34554 -- Fixed Reverse(Value(…)) crash on Oracle. 2023-05-10 17:22:45 +02:00
Lily Foote c494c6974d Removed obsolete docstring from Field.db_returning.
It's also supported on SQLite 3.35+ and MariaDB 10.5+.
2023-05-10 08:26:25 +02:00
Akash Kumar Sen 92f0017133 Refs #34534 -- Reduced Add/RemoveConstraint and Add/RenameIndex operations when optimizing migrations. 2023-05-09 12:45:09 +02:00
Mariusz Felisiak 59262c294d
Moved SQLite DatabaseSchemaEditor.add_field()'s comment to the correct line. 2023-05-09 11:39:49 +02:00
Mariusz Felisiak 1586a09b79
Fixed #34544 -- Avoided DBMS_LOB.SUBSTR() wrapping with IS NULL condition on Oracle.
Regression in 09ffc5c121.

Thanks Michael Smith for the report.

This also reverts commit 1e4da43955.
2023-05-08 19:34:30 +02:00
Akash Kumar Sen aaf8c76c56
Fixed #34545 -- Corrected the number of months in installation FAQ. 2023-05-08 08:34:23 +02:00
Pan Dango 12ec80726f
Corrected code-block directive in docs/ref/templates/builtins.txt. 2023-05-07 14:51:27 +02:00
Mariusz Felisiak ca5d3c99ef
Refs #27236 -- Made more cosmetic edits to Meta.index_together deprecation. 2023-05-05 09:26:51 +02:00
Jannis Vajen 024954aad4 Corrected code-block directives in docs. 2023-05-04 14:10:11 +02:00
Sarah Boyce 60ac77f32e
Removed unnecessary workarounds for Sphinx < 4.3.0.
Unnecessary since ebf25555bb.
2023-05-04 13:55:06 +02:00
Mariusz Felisiak fcfbf08abe
Fixed MultipleFileFieldTest.test_file_multiple_validation() test if Pillow isn't installed.
Follow up to fb4c55d9ec.
2023-05-04 08:09:02 +02:00
Jan Pieter Waagmeester f5b39b77e3 Fixed #34535 -- Fixed SQLite dbshell crash on pathlib.Path when handling CommandError.
Regression in 5b884d45ac.
2023-05-04 06:07:12 +02:00
Mariusz Felisiak 49830025c9 Added CVE-2023-31047 to security archive. 2023-05-03 15:20:31 +02:00
Mariusz Felisiak b0d3a5de95 Added stub release notes for 4.2.2. 2023-05-03 15:13:07 +02:00
Mariusz Felisiak fb4c55d9ec Fixed CVE-2023-31047, Fixed #31710 -- Prevented potential bypass of validation when uploading multiple files using one form field.
Thanks Moataz Al-Sharida and nawaik for reports.

Co-authored-by: Shai Berger <shai@platonix.com>
Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
2023-05-03 13:42:00 +02:00
Mariusz Felisiak 8e2460d599
Fixed #34529, Refs #34525 -- Reduced index operations with Meta.indexes/index_together when optimizing migrations.
This makes squashing migrations an available path for changing
Meta.index_together, which is deprecated, to Meta.indexes.

Follow up to f810325721.
2023-05-03 13:06:19 +02:00
Mariusz Felisiak 83339d2103
Fixed #34523 -- Fixed TransactionManagementError in QuerySet.update_or_create() with MyISAM storage engine.
QuerySet.update_or_create() uses nested atomic to handle possible
integrity errors taking savepoints as way to mark back the connection
as usable. Savepoints are not returned when
uses_savepoints/can_release_savepoints feature flags are set to False.
As a consequence, QuerySet.update_or_create() assumed the outer atomic
block is tainted and raised TransactionManagementError.

This commit partly reverts 331a460f8f.

Thanks gatello-s for the report.
2023-05-03 07:58:42 +02:00
Orhan Hirsch ea53e7c09f Fixed #34517 -- Avoided connection post_init signal to ImageField without width/height fields. 2023-05-03 06:35:19 +02:00
Paul Brown 3b62d8c83e
Refs #31369 -- Improved hint message in NullBooleanField's deprecation warning. 2023-05-02 15:42:11 -03:00
Ran Benita 506f93f0c3
Fixed #34530 -- Improved docs when customizing storage for FileField. 2023-05-02 15:32:24 -03:00
Bakdolot c61219a7ae
Fixed #34513 -- Added system check for relational fields in ModelAdmin.list_display. 2023-05-02 06:46:22 +02:00
Mariusz Felisiak 0e444e84f8 Fixed #34515 -- Made LocaleMiddleware prefer language from paths when i18n patterns are used.
Regression in 94e7f471c4.

This reverts commit 94e7f471c4
(refs #34069) and
partly reverts commit 3b4728310a.

Thanks Anthony Baillard for the report.

Co-Authored-By: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2023-05-02 06:04:18 +02:00
Mariusz Felisiak 191f6a9a45
Fixed #34528 -- Reduced Add/RemoveIndex operations when optimizing migrations. 2023-05-01 18:57:24 +02:00
4the4ryushin 0b0998dc15 Fixed #33759 -- Avoided unnecessary subquery in QuerySet.delete() with self-referential subqueries if supported. 2023-05-01 10:20:20 +02:00
Mariusz Felisiak 5a6d4d3bfd
Refs #34118, Refs #34504 -- Added backward incompatibility note about EmailBackend.ssl_context.
Follow up to 2848e5d0ce.
2023-04-28 13:04:08 +02:00
Coen van der Kamp 7bbbadc693 Fixed #34380 -- Allowed specifying a default URL scheme in forms.URLField.
This also deprecates "http" as the default scheme.
2023-04-28 06:58:10 +02:00
Marc Gibbons 070cbac0db
Restored multiprocessing concurrency on coverage.py settings
* Revert "Reverted "Fixed #33213 -- Doc'd testing code coverage in parallel and used it.""

This reverts commit 78da5ca0c1.

* Restored coverage multiprocess concurrency with threads

Investigating https://github.com/nedbat/coveragepy/issues/1585 revealed
that thread tracing gets disabled when passing
`concurrency = multiprocessing`. Adding `thread` restores it, and
ensures that the `auser()` is reported as covered since the test suite
uses `AsyncToSync` to execute this middleware (which spawns threads).
2023-04-27 17:02:55 -03:00
Andrei Shabanski 5c456a8793
Refs #33662 -- Corrected Sitemap.get_languages_for_item() signature in docs. 2023-04-27 19:53:26 +02:00
Mariusz Felisiak 720abed343
Avoided creating default form fields in fields_for_model() when declared on form. 2023-04-27 15:26:23 +02:00
Tom Forbes 23d24f82a7
Doc'd that Count("*") is equivalent to COUNT(*) SQL. 2023-04-27 11:52:54 +02:00
David Sanders 7d0e566208
Fixed #34518 -- Fixed crash of random() template filter with an empty list. 2023-04-26 14:17:57 +02:00
Mariusz Felisiak 18a7f2c711 Added stub release notes and release date for 4.2.1, 4.1.9, and 3.2.19. 2023-04-26 08:47:44 +02:00
Mariusz Felisiak 9440f6ba41
Fixed #34512 -- Restored breadcrumbs on admin app index view.
Thanks Adam (ataylor32) for the report.

Regression in 872b61193b.
2023-04-26 08:36:56 +02:00
Claude Paroz 453cfa2815 Replaced docutils link by PyPI reference. 2023-04-25 12:41:06 +02:00
Ben Lomax 4dfc6ff8a8 Refs #31949 -- Made @never_cache and @cache_control() decorators to work with async functions.
Thanks Carlton Gibson and Mariusz Felisiak for reviews.
2023-04-25 10:08:03 +02:00
Ben Lomax a14ddc8cfc Added more tests for @cache_control decorator. 2023-04-25 10:04:49 +02:00
Andreas Dickow c24cd6575f Updated admin's XRegExp to 5.1.1. 2023-04-25 09:30:52 +02:00
Bakdolot c813fb327c
Fixed #34481 -- Added system check for reverse related fields in ModelAdmin.list_display. 2023-04-24 08:14:35 -03:00
Simon Charette 83c9765f45 Refs #33766 -- Removed sql.Query.build_filtered_relation_q().
It was a copy of sql.Query._add_q that avoided JOIN updates.
2023-04-24 08:32:49 +02:00
Simon Charette 1a13161eab Refs #33766 -- Removed unused Join.equals().
It's unused now that the specialized FilteredRelation.as_sql logic is
no more.
2023-04-24 08:32:49 +02:00
Simon Charette d660cee5bc Fixed #33766 -- Resolved FilteredRelation.condition at referencing time.
The previous implementation resolved condition at Join compilation time
which required introducing a specialized expression resolving mode to
alter the join reuse logic solely during that phase.

FilteredRelation.condition is now resolved when the relation is first
referenced which maintains the existing behavior while allowing the
removal of the specialized resolving mode and address an issue where
conditions couldn't spawn new joins.
2023-04-24 08:32:44 +02:00
Claude Paroz 3fe0c609cf
Updated Django Transifex links.
Subdomain was changed on April 3rd and redirects will stop on July 2023.
2023-04-22 16:18:21 +02:00
nessita 851b687956
Refs #34462 -- Fixed queryset antipattern when processing object deletion. 2023-04-22 12:23:22 +02:00
Mariusz Felisiak 92537e83c1
Fixed #34506 -- Fixed margin of ClearableFileInput in admin CSS.
Regression in 96a598356a.
2023-04-21 19:49:59 +02:00
Mariusz Felisiak c487634c10
Added meaningful titles to ..admonition:: directives. 2023-04-21 12:03:59 +02:00
Petter Friberg 8ed25d65ea Fixed #34505 -- Skipped varchar_pattern_ops/text_pattern_ops index creation when db_collation is set in related field. 2023-04-21 10:31:22 +02:00
Mariusz Felisiak 765b96734c Added SchemaTests._add_ci_collation() hook. 2023-04-21 10:00:09 +02:00
Marcelo Galigniana 8a6c0203c4 Fixed #34488 -- Made ClearableFileInput preserve "Clear" checked attribute when form is invalid. 2023-04-21 07:48:27 +02:00
Hielke Walinga fb535e0a90 Fixed #34496 -- Fixed handling source maps with data URI in ManifestStaticFilesStorage.
Regression in 781b44240a.
2023-04-21 05:42:06 +02:00