summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2025-04-09Refs #35581 -- Updated mail tests to include trailing newlines.Mike Edmunds
Python's modern email API will force a trailing newline onto all text/* bodies and attachments. Updated mail tests to include (and check for) the newline while still using the legacy email API. See https://github.com/python/cpython/issues/121515 which reasons that, apart from artificial test cases, most text content already ends in a newline. If it doesn't, adding one won't change the meaning.
2025-04-07Fixed #36301 -- Fixed select_for_update(of) crash when using ↵Simon Charette
values()/values_list(). Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a which allowed for annotations to be SELECT'ed before model field references through values()/values_list() and broke assumptions the select_for_update(of) table infererence logic had about model fields always being first. Refs #28900. Thanks OutOfFocus4 for the report and Sarah for the test.
2025-04-07Fixed #36298 -- Truncated the overwritten file content in file_move_safe().Sarah Boyce
Regression in 58cd4902a71a3695dd6c21dc957f59c333db364c. Thanks Baptiste Mispelon for the report.
2025-04-06Added supports_expression_defaults check in DefaultTests.test_full_clean() test.Mariusz Felisiak
2025-04-05Fixed #36299 -- Prevented field selection on QuerySet.alias() after values().Simon Charette
Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a. Refs #28900. Thanks Jeff Iadarola for the report and tests. Co-Authored-By: OutOfFocus4 <jeff.iadarola@gmail.com>
2025-04-05Fixed #36156 -- Added supports_json_field check in ↵Kelvin Adigwu
test_db_default_output_field_resolving test.
2025-04-05Refs #36088, Refs #36260 - Added supports_expression_defaults checks in ↵Tim Graham
bulk_create() tests.
2025-04-04Fixed #36289 -- Fixed bulk_create() crash with nullable geometry fields on ↵Simon Charette
PostGIS. Swapped to an allow list instead of a deny list for field types to determine if the UNNEST optimization can be enabled to avoid further surprises with other types that would require further specialization to adapt. Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491. Thanks Joshua Goodwin for the report and Sarah Boyce for the test.
2025-04-04Fixed #36255 -- Renamed the admin action button for improved accessibility.koffi
2025-04-03Fixed #36290 -- Made TupleIn() lookup discard tuples containing None.Simon Charette
Just like the In() lookup discards of None members TupleIn() should discard tuples containing any None as NULL != NULL in SQL and the framework expects such queries to be elided under some circumstances. Refs #31667, #36116. Thanks Basptise Mispelon for bisecting the regression to 626d77e.
2025-04-03Fixed #36292 -- Fixed crash when aggregating over a group mixing transforms ↵Simon Charette
and references. Regression in 65ad4ade74dc9208b9d686a451cd6045df0c9c3a. Refs #28900 Thanks Patrick Altman for the report.
2025-04-02Fixed CVE-2025-27556 -- Mitigated potential DoS in ↵Sarah Boyce
url_has_allowed_host_and_scheme() on Windows. Thank you sw0rd1ight for the report.
2025-04-02Fixed #36267 -- Fixed contenttypes shortcut() view crash with an invalid ↵Ahmed Nassar
object_id for a UUIDField pk.
2025-04-01Fixed #36184 -- Allowed migrating forward to squashed migrations.Jacob Walls
2025-03-31Fixed #22977 -- Added system check for clashing managers and reverse related ↵Anthony Joseph
fields. With thanks to Konrad Świat, Loïc Bistuer, Russell Keith-Magee, and Mariusz Felisiak. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-03-31Fixed #36265 -- Added support for serialization of ZoneInfo instances in ↵Song Junho
migrations.
2025-03-30Fixed warnings per flake8 7.2.0.Mariusz Felisiak
https://github.com/PyCQA/flake8/releases/tag/7.2.0
2025-03-28Fixed #36239 -- Fixed a crash in ManyToManyField.through_fields check when ↵saJaeHyukc
to model is invalid. Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
2025-03-27Fixed #34917 -- Underlined links in the main content area of the admin.antoliny0919
2025-03-27Fixed #35440 -- Simplified parse_header_parameters by leveraging stdlid's ↵Khudyakov Artem
Message. The `parse_header_parameters` function historically used Python's `cgi` module (now deprecated). In 34e2148fc725e7200050f74130d7523e3cd8507a, the logic was inlined to work around this deprecation ( #33173). Later, in d4d5427571b4bf3a21c902276c2a00215c2a37cc, the header parsing logic was further cleaned up to align with `multipartparser.py` (#33697). This change takes it a step further by replacing the copied `cgi` logic with Python's `email.message.Message` API for a more robust and maintainable header parsing implementation. Thanks to Raphael Gaschignard for testing, and to Adam Johnson and Shai Berger for reviews. Co-authored-by: Ben Cail <bcail@crossway.org> Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-03-26Fixed #34819 -- Made GenericForeignKey prefetching use matching pk ↵Clifford Gama
representations. Ensured that rel_obj_attr and instance_attr return matching (pk, cls) tuples in GenericForeignKey.get_prefetch_queryset(), preventing mismatches when prefetching related objects where pk and get_prep_value() differ. Using value_to_string() also makes this code compatible with composite primary keys.
2025-03-26Fixed #36260 -- Made bulk_create() work with DB-generated primary keys.Dmitry Shachnev
Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-03-25Fixed #35529 -- Added support for positional arguments in querystring ↵Giannis Terzopoulos
template tag. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-03-25Fixed #36262 -- Made GeneratedField.db_persist a required key-word argument.Jason Cameron
2025-03-25Fixed #35452 -- Deprecated orphans being more than or equal to page_size in ↵wookkl
pagination.
2025-03-25Fixed #36276 -- Omitted size=None from ArrayField.deconstruct().Tim Graham
2025-03-24Fixed #36271 -- Raised TemplateSyntaxError when using a relative template ↵YogyaChugh
path with an unknown origin.
2025-03-24Fixed #36268 -- Added leading `?` in every querystring template tag result.Natalia
Thanks Sarah Boyce for the report.
2025-03-24Ensured consistency in naming in ↵Natalia
template_tests/syntax_tests/test_querystring.py.
2025-03-21Fixed #36266 -- Renamed HIDE_PRODUCTION_WARNING environment variable to ↵Johanan Oppong Amoateng
DJANGO_RUNSERVER_HIDE_WARNING.
2025-03-21Fixed #36138 -- Changed ADMINS and MANAGERS settings to lists of strings.Mike Edmunds
Previously, the ADMINS and MANAGERS settings were lists of (name, address) tuples (where the name had been unused). Deprecated use of tuples. Updated settings value sanity checks, and changed from ValueError to ImproperlyConfigured.
2025-03-19Fixed #36000 -- Deprecated HTTP as the default protocol in urlize and ↵Ahmed Nassar
urlizetrunc.
2025-03-18Made selenium tests less flaky by waiting until popups are closed and page ↵Sarah Boyce
is loaded.
2025-03-18Refs #36138 -- Improved tests for mail_admins() and mail_managers().Mike Edmunds
- Separated MailTests.test_connection_arg test cases. - Expanded test cases for incorrect values of ADMINS/MANAGERS settings. - Added test case verifying correct values of ADMINS/MANAGERS settings.
2025-03-17Fixed #34865 -- Released memory earlier than garbage collection on database ↵fowczrek
wrapping layers. Thank you Florian Apolloner, Jake Howard and Patryk Zawadzki for the clarifying comments and reviews.
2025-03-17Fixed #36252 -- Handled duplicate automatic imports in the shell command.hesham942
2025-03-17Fixed #33537 -- Made test database cloning on MySQL reraise unexpected errors.Mariusz Felisiak
Thanks Faakhir Zahid and Stephen Finucane for the initial patch. Thanks Simon Charette for the review.
2025-03-13Refs #35945 -- Fixed ↵Mariusz Felisiak
test_paginating_unordered_queryset_raises_warning_async() test on byte-compiled Django.
2025-03-12Fixed #36234 -- Restored single_object argument to ↵Adam Johnson
LogEntry.objects.log_actions(). Thank you Adam Johnson for the report and fix. Thank you Sarah Boyce for your spot on analysis. Regression in c09bceef68e5abb79accedd12dade16aa6577a09, which is partially reverted in this branch. Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2025-03-12Fixed #35945 -- Added async interface to Paginator.wookkl
2025-03-12Fixed #35676 -- Made BaseModelForm validate constraints that reference an ↵Clifford Gama
InlineForeignKeyField. Co-authored-by: Simon Charette <charette.s@gmail.com>
2025-03-11Fixed #35816 -- Handled parsing of scientific notation in DTL. (#19213)haileyajohnson
* Refs #35816 -- Improved test coverage of FilterExpression. * Fixed #35816 -- Made FilterExpression parse scientific numbers. --------- Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2025-03-11Fixed #36177 -- Added a trailing newline to JSON serializer. (#19232)Tom Carrick
2025-03-10Fixed #33579 -- Specialized exception raised on forced update failures.Simon Charette
Raising DatabaseError directly made it harder than it should to differentiate between IntegrityError when a forced update resulted in no affected rows. Introducing a specialized exception allows for callers to more easily silence, log, or turn them update failures into user facing exceptions (e.g. 404s). Thanks Mariusz for the review.
2025-03-10Fixed #36222 -- Fixed ExclusionConstraint validation crash on excluded ↵saJaeHyukc
fields in condition. Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
2025-03-10Fixed #36201 -- Caught ValidationError in ↵saJaeHyukc
ModelChoiceField/ModelMultipleChoiceField.clean(). Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
2025-03-09Fixed #35487 -- Removed CASCADE from RemoveField() on PostgreSQL.petr.prikryl
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
2025-03-07Fixed #36224 -- Fixed shell imports when settings not configured.Sarah Boyce
Thank you Raffaella for the report. Thank you Tim Schilling and Natalia Bidart for the reviews.
2025-03-07Corrected test case in ExclusionConstraintTests.test_invalid_expressions().Sarah Boyce
2025-03-06Fixed CVE-2025-26699 -- Mitigated potential DoS in wordwrap template filter.Sarah Boyce
Thanks sw0rd1ight for the report.