summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2025-12-17Fixed #27380 -- Added "raw" argument to m2m_changed signals.Mariusz Felisiak
2025-12-17Fixed #36747 -- Parsed weeks from ISO 8601 format in parse_duration().varunkasyap
2025-12-16Fixed #36800 -- Restored ManyToManyField renaming in ↵Clifford Gama
BaseDatabaseSchemaEditor.alter_field(). Regression in f9a44cc0fac653f8e0c2ab1cdfb12b2cc5c63fc2. Now that ManyToManyField is no longer concrete the decision of whether or not it should be altered, which is also relied on by field renaming, should take into consideration name changes even if it doesn't have a column associated with it, as auto-created many-to-many relationship table names are a base of it. Note that there is room for optimization here where a rename can be entirely avoided if ManyToManyField.db_table remains stable between .name changes, just like we do with Field.db_column remaining stable, but since this is a regression and meant to be backported the current patch focuses on correctness over further improvements. Thanks Josik for the report. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-12-16Fixed #36594 -- Improved UniqueConstraint's nulls_distinct system check message.Mridul Dhall
Clarified that the nulls_distinct argument is not supported, as opposed to certain values for the argument. Thanks Russell Owen for the report.
2025-12-15Fixed #36783 -- Ensured proper handling of multi-value QueryDicts in ↵Marc Gibbons
querystring template tag. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-12-15Refs #36652 -- Avoided missing imports in a temporary file generated in a ↵Jacob Walls
migration test.
2025-12-15Fixed #26434 -- Removed faulty clearing of ordering field when missing from ↵Michal Mládek
explicit grouping. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-12-13Fixed #36765 -- Added support for stored GeneratedFields on Oracle 23ai/26ai ↵Mariusz Felisiak
(23.7+). Thanks Jacob Walls for the review.
2025-12-12Refs #36735 -- Supported shift parameter for UUID7 on PostgreSQL.Lily Acorn
2025-12-12Fixed #36735 -- Added UUID4 and UUID7 database functions.Lily Acorn
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-12-11Fixed #36769 -- Avoided visiting deeply nested nodes in XML deserializer.Pravin Kamble
Only children at one level of depth need to be visited. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2025-12-11Refs #27890 -- Avoided overwriting TMPDIR in runtests.py under forkserver mode.Jacob Walls
This variable should only be set once. Under forkserver, this module was getting executed multiple times, causing nested temporary dirs that didn't clean up properly, raising FileNotFoundError. This similar to #27890 although a slightly different cause.
2025-12-11Refs #36499 -- Adjusted test_strip_tags following Python behavior change for ↵Jacob Walls
incomplete entities.
2025-12-10Refs #36025 -- Made get_prep_lookup() pass output_field when wrapping direct ↵Clifford Gama
values in Value. Previously, only strings were supplied with an output_field when wrapping direct value iterable elements in Value expressions for ExpressionList. This caused problems for __in lookups on JSONField when using expressions alongside direct values, as JSONField values can have different types which need to be adapted by the field's get_db_prep_value(). Refs #36689. Thanks Jacob Walls for the review.
2025-12-10Refs #36689 -- Serialized JSONIn rhs parameters wrapped in Value expressions.Clifford Gama
2025-12-10Fixed #36689 -- Fixed top-level JSONField __in lookup failures on MySQL and ↵Clifford Gama
Oracle. Added a JSONIn lookup to handle correct serialization and extraction for JSONField top-level __in queries on backends without native JSON support. KeyTransformIn now subclasses JSONIn. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Thanks Jacob Walls for the report and review.
2025-12-09Added tests for MultiPointField, MultiLineStringField, and ↵Tim Graham
GeometryCollectionField.
2025-12-05Fixed #36728 -- Validated template tag arguments at definition time.Jake Howard
Before, `context` and `content` were validated at compile time.
2025-12-05Fixed #36722 -- Moved AutoFieldMixin validate_autopk_value() check to ↵Clifford Gama
get_db_prep_save. The validation in validate_autopk_value is specific to saving. Having it in get_db_prep_value caused Value(0, AutoField()) to fail unexpectedly when used in a filter on MySQL. Thanks Jacob Walls for the review.
2025-12-05Fixed #36367 -- Added a label to the date_hierarchy in admin changelist.Chaitanya
Thanks Sarah Boyce for the implementation idea.
2025-12-04Added DatabaseFeatures.prohibits_dollar_signs_in_column_aliases.Tim Graham
This is also applicable on CockroachDB.
2025-12-03Closed pool when parallel test runner encounters unpicklable exceptions.Jacob Walls
2025-12-03Fixed #35729 -- Enabled natural key serialization opt-out for subclasses.rimi0108
Refactored serialization logic to allow models inheriting a natural_key() method (e.g. AbstractBaseUser) to explicitly opt out of natural key serialization by returning an empty tuple from the method. Thanks Jonas Dittrich for the report. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2025-12-03Fixed #36280 -- Replaced exception checks with assertRaisesMessage().Skyiesac
2025-12-02Fixed CVE-2025-64460 -- Corrected quadratic inner text accumulation in XML ↵Shai Berger
serializer. Previously, `getInnerText()` recursively used `list.extend()` on strings, which added each character from child nodes as a separate list element. On deeply nested XML content, this caused the overall deserialization work to grow quadratically with input size, potentially allowing disproportionate CPU consumption for crafted XML. The fix separates collection of inner texts from joining them, so that each subtree is joined only once, reducing the complexity to linear in the size of the input. These changes also include a mitigation for a xml.dom.minidom performance issue. Thanks Seokchan Yoon (https://ch4n3.kr/) for report. Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-12-02Fixed CVE-2025-13372 -- Protected FilteredRelation against SQL injection in ↵Jacob Walls
column aliases on PostgreSQL. Follow-up to CVE-2025-57833. Thanks Stackered for the report, and Simon Charette and Mariusz Felisiak for the reviews.
2025-12-02Refs #35444 -- Fixed typo in PostgreSQL StringAgg deprecation warning.Νικόλαος-Διγενής Καραγιάννης
2025-12-01Fixed #36712 -- Evaluated type annotations lazily in template tag registration.Jacob Walls
Ideally, this will be reverted when an upstream solution is available for https://github.com/python/cpython/issues/141560. Thanks Patrick Rauscher for the report and Augusto Pontes for the first iteration and test.
2025-12-01Refs #35535 -- Used intended decorator in test_simple_block_tag_parens().Jacob Walls
2025-11-26Fixed #36743 -- Increased URL max length enforced in HttpResponseRedirectBase.varunkasyap
Refs CVE-2025-64458. The previous limit of 2048 characters reused the URLValidator constant and proved too restrictive for legitimate redirects to some third-party services. This change introduces a separate `MAX_URL_REDIRECT_LENGTH` constant (defaulting to 16384) and uses it in HttpResponseRedirectBase. Thanks Jacob Walls for report and review.
2025-11-26Closed temporary files in ↵Jacob Walls
OverwritingStorageTests.test_save_overwrite_behavior_temp_file().
2025-11-25Fixed #35783 -- Added NumDimensions GIS database function and ↵David Smith
__num_dimensions lookup.
2025-11-25Refs #21961 -- Added required_db_features to delete's RelatedDbOptionParent.Tim Graham
2025-11-24Corrected assertions for True/False results in ↵Jake Howard
tests/auth_tests/test_handlers.py.
2025-11-24Fixed #36751 -- Fixed empty filtered aggregation crash over annotated queryset.Simon Charette
Regression in b8e5a8a9a2a767f584cbe89a878a42363706f939. Refs #36404. The replace_expressions method was innapropriately dealing with falsey but not None source expressions causing them to also be potentially evaluated when __bool__ was invoked (e.g. QuerySet.__bool__ evaluates the queryset). The changes introduced in b8e5a8a9a2, which were to deal with a similar issue, surfaced the problem as aggregation over an annotated queryset requires an inlining (or pushdown) of aggregate references which is achieved through replace_expressions. In cases where an empty Q object was provided as an aggregate filter, such as when the admin facetting feature was used as reported, it would wrongly be turned into None, instead of an empty WhereNode, causing a crash at aggregate filter compilation. Note that the crash signature differed depending on whether or not the backend natively supports aggregate filtering (supports_aggregate_filter_clause) as the fallback, which makes use Case / When expressions, would result in a TypeError instead of a NoneType AttributeError. Thanks Rafael Urben for the report, Antoliny and Youngkwang Yang for the triage.
2025-11-23Refs #21961 -- Added DatabaseFeatures.supports_on_delete_db_(cascade/null) ↵Tim Graham
feature flags. Needed on MongoDB. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-11-22Fixed #35774 -- Dropped support for GEOS 3.8.David Smith
GEOS 3.8 (released Oct-2019) will be more than 5 years old when Django 6.1 is released (Aug-2026).
2025-11-21Refs #36705 -- Added coverage for multiple types of enclosing punctuation in ↵Jacob Walls
urlize(). This case was inadvertently fixed in ad94446fcc5b50401dd0c48718502d5d1b92df58.
2025-11-21Refs #36031 -- Added tests of DecimalRangeField __contains lookup with ↵Mariusz Felisiak
unbounded decimal ranges. Co-authored-by: Aman Sharma <210100011@iitb.ac.in>
2025-11-20Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.Chris Wesseling
2025-11-20Fixed #36321 -- Defaulted suggest_on_error=True in management commands.kihuni
Python 3.15 defaults suggest_on_error=True, but the feature is available from 3.14, so this change opts in earlier. This change can be reverted when Python 3.15 is the minimum supported version.
2025-11-20Fixed #36737 -- Escaped further control characters in escapejs.farthestmage
2025-11-19Fixed #26609 -- Extended fields.E004 system check for unordered iterables.Mariusz Felisiak
Co-authored-by: Karl Wooster <karl.wooster@alleima.com>
2025-11-18Fixed #36733 -- Escaped attributes in Stylesheet.__str__().varunkasyap
Thanks Mustafa Barakat for the report, Baptiste Mispelon for the triage, and Jake Howard for the review.
2025-11-18Fixed #36141 -- Checked for applied replaced migrations recursively.Georgi Yanchev
Regression in 64b1ac7292c72d3551b2ad70b2a78c8fe4af3249.
2025-11-17Fixed #24920 -- Added support for DecimalField with no precision.Mariusz Felisiak
Thanks Lily for the review.
2025-11-14Refs #24928 -- Added introspection support for PostgreSQL HStoreField.Mariusz Felisiak
2025-11-13Fixed #36724 -- Removed invalid "for" attribute on <legend> tags.Kasyap Pentamaraju
2025-11-13Fixed #36663 -- Defaulted to running checks against all databases.Simon Charette
Regression in 0b83c8cc4db95812f1e15ca19d78614e94cf38dd which added support for running checks only against databases but also defaulted to running against no databases if not specified. Note that this continues to *not* default to runing database tagged checks for all management commands except the migrate one as whether or not we should change this must be discussed further. Thanks Tim Graham for surfacing how this was a problematic default.
2025-11-13Refs #31055 -- Adjusted passing of Field.check kwargs to ArrayField.base_field.Simon Charette
This was missed when Field.check(databases) was introduced.