Commit Graph

14265 Commits

Author SHA1 Message Date
Mariusz Felisiak
6cff020787 Applied Black's 2026 stable style.
https://github.com/psf/black/releases/tag/26.1.0
2026-01-18 21:26:56 +01:00
David Smith
0d31ca9883 Refs #36382 -- Updated GDAL tests for Memory driver deprecation in GDAL 3.11.
Follow up to fb0d463b1f

Since GDAL 3.11 the Memory driver is deprecated with its functionality
merged into the MEM dataset driver.

https://gdal.org/en/stable/drivers/vector/memory.html
2026-01-16 12:38:21 -05:00
JaeHyuck Sa
0239e86f38 Fixed #36352 -- Improved error message for fields excluded by prior values()/values_list() calls.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
2026-01-16 10:28:14 -05:00
JaeHyuck Sa
211b631427 Fixed #36822 -- Added parameter limit for PostgreSQL with server-side binding. 2026-01-16 09:15:53 -05:00
JaeHyuck Sa
b98075dc62 Refs #36822 -- Hoisted bulk_batch_size() implementations to base backend. 2026-01-16 09:15:53 -05:00
Jacob Walls
a876ada18b Bumped linter versions in requirements files and tox.ini.
Follow-up to 64ac4385c7.
2026-01-14 15:07:10 -05:00
JaeHyuck Sa
4ce4ed72a4 Fixed #36821 -- Treated empty strings as NULL for iexact lookups on Oracle.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
2026-01-14 13:31:15 -05:00
Jacob Walls
6a596373d4 Fixed #35402 -- Fixed crash in DatabaseFeatures.django_test_skips when running a subset of tests.
Thanks Tim Graham for the report and the review.
2026-01-14 08:25:37 -05:00
Samriddha9619
040bb3eba7 Fixed #35442 -- Prevented N+1 queries in RelatedManager with only().
Co-authored-by: Simon Charette <charette.s@gmail.com>
2026-01-13 13:18:14 -05:00
Jacob Walls
73c5e94521 Refs #36769 -- Raised SuspiciousOperation for unexpected nested tags in XML Deserializer.
Thanks Shai Berger and Natalia Bidart for reviews.
2026-01-12 16:38:32 -05:00
Jacob Walls
a25158f5cc Refs #36769 -- Avoided visiting grandchild nodes in XML Deserializer.
The only use case for visiting grandchild nodes turned out to be to
support an unintentionally invalid fixture in the test suite.

The invalid fixture added in #36969 was modeled on fixture9.xml in
dae08cf55b, so that is corrected as well
in this commit, where the test will still pass.
2026-01-12 16:38:32 -05:00
Jacob Walls
1a70889d58 Refs #36769 -- Corrected invalid XML fixtures.
fixture9.xml was likely wrong since its introduction in
35cc439228.

The relevant part of the Visa model is:

class Visa(models.Model):
    person = models.ForeignKey(Person, models.CASCADE)

The Visa.person <field>s needed to be declared as relations, and
the Person <field>s didn't need their values wrapped in `<natural>`,
since they weren't relations.
2026-01-12 16:38:32 -05:00
Rudraksha Dwivedi
21ceaf2fd7 Fixed #36708 -- Initialized formset to None in ChangeList.__init__().
Thanks Antoliny for the review.
2026-01-12 13:34:14 -05:00
Parth Paradkar
eeea8d2cba Fixed #36804 -- Fixed admin system check crash for missing models. 2026-01-12 08:46:22 -05:00
Haki Benita
d61838761f Fixed #36827 -- Added support for exclusion constraints using Hash indexes on PostgreSQL. 2026-01-10 08:12:05 +01:00
mbcodes
8a0315fab7 Refs #35875 -- Added dark mode support in additional views.
Thanks Thibaud Colas for the review.
2026-01-09 15:55:46 -05:00
Haki Benita
459a3d17b9 Fixed #36852 -- Ignored index_type case in ExclusionConstraint equality check. 2026-01-08 11:33:52 -05:00
VIZZARD-X
c68e4adea0 Fixed #29257 -- Caught DatabaseError when attempting to close a possibly already-closed cursor. 2026-01-06 15:15:56 -05:00
Jacob Walls
030c63d329 Fixed #36843, #36793 -- Reverted "Fixed #27489 -- Renamed permissions upon model renaming in migrations."
This reverts commits f02b49d2f3 and 6e89271a85.
2026-01-05 15:45:27 -05:00
Tim Graham
3201a895cb Added DatabaseCreation.destroy_test_db_connection_close_method hook. 2026-01-03 19:42:02 +01:00
Simon Charette
d6ae2ed868 Refs #33647 -- Fixed silent data truncation in bulk_create on Postgres.
Regression in a16eedcf9c.

The UNNEST strategy is affected by the same problem bulk_update has wrt/
to silent data truncation due to its usage of db_type which always returns
a parametrized subtype.
2025-12-31 10:41:55 -05:00
Johannes Maron
79ab0993d0 Fixed #36829 -- Reverted value of ClearableFileInput.use_fieldset to True.
There was unresolved discussion regarding whether to set
ClearableFileInput.use_fieldset to True or False when use_fieldset was
introduced in Django 4.1, since the clear checkbox appears only
sometimes. Although using <fieldset> is likely desirable, since the
primary motivation in #35892 was just to improve markup in the admin,
and a deprecation path was not provided for general form usage, future
work is deferred to #36828.

Regression in 4187da258f.

Thanks Tim Graham, Antoliny, and David Smith for triage.
2025-12-31 10:14:00 -05:00
Tim Graham
c496a7df64 Refs #21961 -- Added supports_on_delete_db_cascade skips in schema tests. 2025-12-30 22:21:57 +01:00
Arfey
cc0f6c4f74 Fixed #36714 -- Fixed context sharing among async signal handlers. 2025-12-29 09:48:11 -05:00
Mariusz Felisiak
1c34b8716a Refs #24920 -- Made DecimalField system checks database dependent.
Thanks Tim Graham for the suggestion.
2025-12-28 19:21:49 +01:00
Tim Graham
4afe463950 Added some skips to GIS tests.
Also replaced some DatabaseFeatures.supports_<foo>_lookup attributes
with @skipUnlessGISLookup.
2025-12-28 14:07:11 +01:00
VIZZARD-X
da19b3897d Fixed #36112 -- Added fallback in last_executed_query() on Oracle and PostgreSQL. 2025-12-26 21:59:10 +01:00
Natalia
6c2780ffe1 Refs #30515 -- Added tests for resolve_url() with view callables and arguments. 2025-12-26 12:29:06 -03:00
kundan223
7bf3ac3ee2 Fixed #36796 -- Handled lazy routes correctly in RoutePattern.match().
Coerce lazy route values to `str` at match time to support prefix and
endpoint matching when using `gettext_lazy()` route paths.

Regression in f920937c8a.

Thanks to Andrea Angelini for the report, and to Jake Howard and Jacob
Walls for reviews.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-12-26 09:24:58 -03:00
Sean
8e4b531111 Fixed #36810 -- Avoided infinite recursion in SimpleLazyObject.__repr__().
Detect when `SimpleLazyObject._setupfunc` is a bound method of the same
instance to use a safe representation and avoid infinite recursion.
2025-12-24 14:46:41 -03:00
Sean Reed
165c359996 Refs #36810 -- Avoided infinite recursion in LazyNonce.__repr__().
Moved nonce generation in ``django.utils.csp.LazyNonce`` to a function
to avoid infinite recursion in ``SimpleLazyObject.__repr__`` for
unevaluated instances.

Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-12-24 14:46:41 -03:00
Mariusz Felisiak
3923ebac28 Refs #36787 -- Fixed lookup test crash on Oracle. 2025-12-24 08:25:14 +01:00
Jacob Walls
1eac2659a1 Fixed #36807 -- Fixed form field alignment under <fieldset> in the admin.
It isn't safe to set display: flex on <fieldset>, because on Safari this
interferes with display: block on child divs.

Thanks Paulo Coutinho for the report and Antoliny for the review.

Regression in 4187da258f.
2025-12-22 21:04:01 -05:00
Nilesh Kumar Pahari
968f3f9637 Refs #36806 -- Removed unnecessary null=True from GeneratedField in test models.
Test coverage is preserved because the tests only verify that generated
fields can produce NULL values when the source field is nullable.

This addresses system check warnings in the test suite after
6025eab3c5.
2025-12-22 20:38:55 -05:00
guro-Ishiguro
84bae9c22a Fixed #36818 -- Ensured SQLite connection before accessing max_query_params.
Regression in 358fd21c47.
2025-12-22 20:33:13 -05:00
JaeHyuck Sa
163d92c1d6 Fixed #36787 -- Fixed crash in In lookups with mixed expressions and strings.
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
2025-12-22 14:25:45 -05:00
Youngkwang Yang
95394443bf Fixed #36786 -- Fixed XML serialization of None values in natural keys.
None values in natural keys were incorrectly serialized as the string
"None", causing deserialization to fail for fields like UUIDField.
2025-12-22 14:21:01 -05:00
Clifford Gama
6ee8e9d56c Fixed #36508 -- Interpreted __iexact=None on KeyTransforms as __exact=None.
Thanks Jacob Walls for the report.
2025-12-22 14:20:07 -05:00
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
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
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
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
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