Commit Graph

34256 Commits

Author SHA1 Message Date
Clifford Gama
9cc5c87ffb Replaced per-object create() calls with bulk_create in tests/model_fields/test_jsonfield.py 2025-12-22 14:20:07 -05:00
Skyiesac
d0d85cd165 Fixed #36376 -- Fixed --no-color for command help in Python 3.14+.
https://github.com/python/cpython/pull/136809 made `color` default to
True in ArgumentParser.
2025-12-22 14:02:21 -05:00
Nilesh Kumar Pahari
6025eab3c5 Fixed #36806 -- Added system check for null kwarg in GeneratedField.
The null argument has no effect on GeneratedField since the nullability
of the column depends on the database and expression used.
2025-12-22 09:41:41 -05:00
사재혁
afaa527c43 Fixed typo in django/db/backends/base/schema.py comment.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
2025-12-22 12:05:25 +01:00
Nilesh Kumar Pahari
e49e14fd90 Fixed #36618 -- Corrected error message in BaseForm.add_error().
The error message now correctly states that the error argument
is a dictionary.
2025-12-19 15:10:12 -05:00
Jacob Walls
5a851bdbfc Refs #27380 -- Added release note for raw argument to m2m_changed signal. 2025-12-19 14:02:28 -05:00
Johanan Oppong Amoateng
33a0a6f033 Fixed #36791 -- Made MigrationAutodetector recreate through table when m2m target model changes.
Co-Authored-By: Jacob Walls <38668450+jacobtylerwalls@users.noreply.github.com>
Co-Authored-By: Clifford Gama <cliffygamy@gmail.com>
2025-12-19 14:01:37 -05:00
eevelweezel
948f1bf5a1 Fixed #36590 -- Made async cache methods use specialized sync versions if available.
Thanks Simon Charette, Sarah Boyce, and Jacob Walls for reviews.
2025-12-19 13:02:22 -05:00
Krishnaprasad MG
7a2f35b1b7 Fixed #36487 -- Fixed logger error message with partial callbacks. 2025-12-19 12:58:29 -05:00
JaeHyuck Sa
60fecd1d44 Fixed #36781 -- Added Granian to deployment documentation.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
2025-12-19 10:09:30 -05:00
Jonathan Biemond
b172cbdf33 Fixed #36808 -- Required name argument in UniqueConstraint signature.
By trading ValueError for TypeError for omitted name arguments,
we gain a little clarity.
2025-12-19 09:48:15 -05:00
Samriddha9619
73c987eb3b Fixed #36701 -- Fixed memory leak in ModelState. 2025-12-18 17:53:24 -05:00
Mariusz Felisiak
4702b36120 Fixed #27380 -- Added "raw" argument to m2m_changed signals. 2025-12-17 18:37:18 +01:00
Mariusz Felisiak
12d574407c Refs #27380 -- Added ManyRelatedManager.set_base() hook. 2025-12-17 18:37:18 +01:00
Mariusz Felisiak
6fc2406fc5 Refs #27380 -- Made ManyRelatedManager.set() use *_base() hooks. 2025-12-17 18:37:18 +01:00
Mariusz Felisiak
c3b6c29691 Refs #27380 -- Made ManyRelatedManager.add()/clear()/remove() implementation more consistent.
This also adds _add_base(), _clear_base(), and _remove_base() internal
hooks.
2025-12-17 18:37:18 +01:00
Pravin Kamble
4774adfaa1 Fixed #32568 -- Replaced mark_safe() with SafeString for literal values.
Replaced instances of mark_safe('some string literal') with
SafeString to avoid the overhead of managing lazy objects.

Thanks Tim McCurrach for the idea and David Smith and Jacob Walls
for reviews.
2025-12-17 12:15:18 -05:00
varunkasyap
0d8548e583 Fixed #36747 -- Parsed weeks from ISO 8601 format in parse_duration(). 2025-12-17 10:19:05 -05:00
Clifford Gama
6cc1231285 Fixed #36800 -- Restored ManyToManyField renaming in BaseDatabaseSchemaEditor.alter_field().
Regression in f9a44cc0fa.

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-16 17:45:34 -05:00
Mridul Dhall
d1a4979fa5 Fixed #36594 -- Improved UniqueConstraint's nulls_distinct system check message.
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-16 15:06:10 -05:00
Marc Gibbons
922c4cf972 Fixed #36783 -- Ensured proper handling of multi-value QueryDicts in querystring template tag.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-12-15 18:58:41 -03:00
Jacob Walls
0071cb1efd Refs #36652 -- Avoided missing imports in a temporary file generated in a migration test. 2025-12-15 15:24:57 -05:00
Michal Mládek
2ce5cb0f7a Fixed #26434 -- Removed faulty clearing of ordering field when missing from explicit grouping.
Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-12-15 15:23:51 -05:00
Mariusz Felisiak
0174a85770 Fixed #36765 -- Added support for stored GeneratedFields on Oracle 23ai/26ai (23.7+).
Thanks Jacob Walls for the review.
2025-12-13 16:38:04 +01:00
Lily Acorn
e95468ed97 Refs #36735 -- Supported shift parameter for UUID7 on PostgreSQL. 2025-12-12 11:50:36 -05:00
Lily Acorn
accceec949 Fixed #36735 -- Added UUID4 and UUID7 database functions.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-12-12 11:17:08 -05:00
David Sanders
8932a67725 Refs #35444 -- Clarified StringAgg deprecation notice in docs/ref/contrib/postgres/aggregates.txt. 2025-12-11 12:59:09 -05:00
Jake Howard
1651140a80 Included ASGI servers when noting what the server does. 2025-12-11 12:42:17 -05:00
Pravin Kamble
dae08cf55b Fixed #36769 -- Avoided visiting deeply nested nodes in XML deserializer.
Only children at one level of depth need to be visited.

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
2025-12-11 12:38:04 -05:00
Carlton Gibson
37eb890969 Noted testing uses for ContentTypeManager.clear_cache() method.
It is often necessary to reset the cache between tests, or after
preparing test state, when using content types. Django's test suite
already does this when needed, but users will need to do similar in
their own tests.
2025-12-11 12:34:43 -05:00
Jacob Walls
cd6278c4c0 Refs #27890 -- Avoided overwriting TMPDIR in runtests.py under forkserver mode.
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-11 12:10:52 -05:00
Pravin Kamble
2d5a780eb5 Fixed #36789 -- Added missing PDF file for docs/internals/_images/contribution_process.svg.
The PDF is needed to build the PDF version of the whole docs.
2025-12-11 13:38:49 -03:00
Jacob Walls
7b80b21863 Refs #36499 -- Adjusted test_strip_tags following Python behavior change for incomplete entities. 2025-12-11 11:28:49 -05:00
Clifford Gama
7b54ddd5e6 Refs #36025 -- Made get_prep_lookup() pass output_field when wrapping direct 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-10 17:45:51 -05:00
Clifford Gama
9b8e4c6d7d Refs #36689 -- Serialized JSONIn rhs parameters wrapped in Value expressions. 2025-12-10 17:45:51 -05:00
Clifford Gama
66fed37ecb Fixed #36689 -- Fixed top-level JSONField __in lookup failures on MySQL and 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-10 17:45:51 -05:00
Tim Graham
bbabbac936 Added tests for MultiPointField, MultiLineStringField, and GeometryCollectionField. 2025-12-09 20:07:20 -05:00
varunkasyap
3ccef1d669 Fixed #36768 -- Optimized string concatenation in File.__iter__(). 2025-12-09 16:45:13 -05:00
Jacob Walls
334308efae Fixed #36778 -- Extended advice to sanitize input before using in query expressions.
Thanks Clifford Gama and Simon Charette for reviews.
2025-12-08 10:25:24 -05:00
Adam Johnson
af60ae48d9 Refs #35581 -- Fixed email image inline attachment example.
1. Added imports and setup for clarity.
2. Removed adding `<` and `>` to Content-ID, as `make_msgid()` already
   includes them.
3. Removed `$` from reference in HTML, and instead stripped `<>` there, as
   required by HTML `cid:` references.
2025-12-08 09:44:19 -05:00
saurabh
e726254a38 Refs #36620 -- Added contributor documentation for code coverage reports.
This was included in the original reverted patch:
a89183e638
Follow-up to 26b0e2bb92.
2025-12-07 09:06:32 -05:00
saurabh
fd4c5fa3ed Refs #36620 -- Fixed PR number extraction in coverage_comment workflow.
Passing the PR number as an artifact is more reliable in cross-fork workflows.
2025-12-06 09:50:06 -05:00
Clifford Gama
020e5799ad Refs #27834 -- Restored "expression" in StrIndex's docs signature.
Documentation regression in 20dbf19fc5.
2025-12-05 10:28:38 -05:00
saurabh
1dfd5aa2b5 Refs #36620 -- Removed PR number null check from coverage_comment workflow. 2025-12-05 10:11:00 -05:00
Jake Howard
0ac548635e Fixed #36728 -- Validated template tag arguments at definition time.
Before, `context` and `content` were validated at compile time.
2025-12-05 10:06:48 -05:00
Clifford Gama
55888655a2 Fixed #36722 -- Moved AutoFieldMixin validate_autopk_value() check to 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-05 09:35:15 -05:00
Chaitanya
16252e6907 Fixed #36367 -- Added a label to the date_hierarchy in admin changelist.
Thanks Sarah Boyce for the implementation idea.
2025-12-05 09:33:42 -05:00
Tim Graham
17d644c8e2 Added DatabaseFeatures.prohibits_dollar_signs_in_column_aliases.
This is also applicable on CockroachDB.
2025-12-04 11:37:22 -05:00
saurabh
26b0e2bb92 Fixed #36620 -- Fixed workflow to summarize coverage in PRs.
Follow-up to a89183e638, which was
reverted in e4c4a178aa because a change
to the workflow trigger resulted in the PR branch not being checked out.

We used this opportunity to reimplement the coverage tracing and coverage
commenting in a two-workflow pattern with more granular permissions.

To reduce duplicative workflows, we removed the existing python test workflow
on PRs, at least until we run more distinct configurations on GitHub actions. The
run with coverage tracing enabled is sufficient for now. The existing workflow still
runs on pushes to main. We can revisit when adding more test configurations.
2025-12-04 10:25:21 -05:00
Dmitry Chestnykh
0ca3a06611 Fixed #36744 -- Improved scrypt password hasher docs.
- Corrected work_factor description and its requirements.
- Added block_size description.
- Changed parallelism description to mention computations, rather than
  threads (currently it's not multithreaded.)
- For all of the above, added standard scrypt terminology (N, r, p).
- Mentioned that in multithreaded implementations, parallelism also
  influences the memory requirements.
2025-12-04 08:52:00 +01:00