summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2023-02-20[4.2.x] Fixed #34349 -- Fixed FormSet.empty_form crash when deleting extra ↵Laurens Verhoeven
forms is disabled. Backport of 6cbc403b8ee7014bd6dae4892d404eedb1d4a50d from main
2023-02-20[4.2.x] Fixed #34346 -- Ordered selected expressions by position.Simon Charette
Used the same approach as for #34176 by using selected expressions position to prevent ambiguous aliases in collisions. Thanks henribru for the report. Regression in 04518e310d4552ff7595a34f5a7f93487d78a406. Backport of 278881e37619278789942513916acafaa88d26f3 from main
2023-02-18[4.2.x] Refs #33308 -- Added tests for queryset ordered by annotation with ↵Simon Charette
nulls_first/nulls_last. Backport of a6511bc23329f1d3939571ad01d3176f8f6cb786 from main
2023-02-17[4.2.x] Fixed #34302 -- Fixed SpatialReference.srid for objects without ↵Stefan Brand
top-level authority. Backport of eacf6b73d8eace004f840bd9b80c8c671caab9da from main
2023-02-17[4.2.x] Refs #34302 -- Fixed SpatialReference.auth_name()/auth_code() when ↵Stefan Brand
target is None. force_bytes() turns None into the byte string b"None". Since ctypes.c_char_p() also accepts None, we can bypass force_bytes() if target is None. Backport of d77762de038d1ab46cdcda2b7202d36c80956e25 from main
2023-02-17[4.2.x] Fixed #34342, Refs #33735 -- Fixed test client handling of async ↵Alexandre Spaeth
streaming responses. Bug in 0bd2c0c9015b53c41394a1c0989afbfd94dc2830. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Backport of 52b054824e899db40ba48f908a9a00dadc56cb89 from main
2023-02-17[4.2.x] Refs #34342 -- Added tests for handling sync streaming responses by ↵Alexandre Spaeth
test client. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es> Backport of bfb8fda3e69cc6f5c6695ba70117faff51cc25a9 from main
2023-02-15[4.2.x] Fixed #34320 -- Make sure constraints names are obtained from ↵nabil-rady
truncated columns names. Backport of 6bdc3c58b65eb32fd63cd41849f00a17a36b4473 from main
2023-02-14[4.2.x] Fixed #34250 -- Fixed renaming model with m2m relation to a model ↵DevilsAutumn
with the same name. Backport of ff3a2834224f527ca574b5cd0d578c8c26d51a6c from main
2023-02-14[4.2.x] Fixed CVE-2023-24580 -- Prevented DoS with too many uploaded files.Markus Holtermann
Thanks to Jakob Ackermann for the report.
2023-02-13[4.2.x] Fixed #34316 -- Fixed layout of admin password change forms and help ↵sarahboyce
texts. Regression in 96a598356a9ea8c2c05b22cadc12e256a3b295fd. Backport of e67804668115fd388e7554c6a809bd409f70adfe from main
2023-02-10[4.2.x] Fixed #32813 -- Made runserver display port after binding.Dhanush
Thanks Florian Apolloner for the review. Backport of a18d20ca97e6799152c1e0b6f007fde943053dcb from main
2023-02-08[4.2.x] Fixed #34319 -- Fixed Model.validate_constraints() crash on ↵Mariusz Felisiak
ValidationError with no code. Thanks Mateusz Kurowski for the report. Regression in 667105877e6723c6985399803a364848891513cc. Backport of 2fd755b361d3da2cd0440fc9839feb2bb69b027b from main
2023-02-08[4.2.x] Fixed #34315 -- Preserved admin changelist filters on "Close" button.Bakdolot
Backport of 325c44ac6c070465ef2b3b7b8ed06cbcb88a3f10 from main
2023-02-07[4.2.x] Fixed #34285 -- Fixed index/slice lookups on filtered aggregates ↵Nils VAN ZUIJLEN
with ArrayField. Thanks Simon Charette for the review. Backport of ae1fe72e9b1f5fe3b05e5b670bd0c205cd305e71 from main
2023-02-07[4.2.x] Fixed #33638 -- Fixed GIS lookups crash with geography fields on ↵Jacob Walls
PostGIS. Backport of 4403432b759124aa613249373e0d2ede64ae8765 from main
2023-02-07[4.2.x] Fixed #34301 -- Made admin's submit_row check add permission for ↵Frederic Mheir
"Save as new" button. Backport of 2878938626aed211d03db33a9a135c9b1d933069 from main
2023-02-04[4.2.x] Increased the default PBKDF2 iterations for Django 4.2.Mariusz Felisiak
See https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2. Thanks Markus Holtermann for the report.
2023-02-03[4.2.x] Fixed #34259 -- Passed called_from_command_line to command subparsers.Adam Johnson
Backport of 017fa23d3b0aee9142f531c2a0002fc86c82a54c from main
2023-02-02[4.2.x] Fixed #34286 -- Fixed admindocs markups for case-sensitive ↵skidipap
template/view names. Backport of 1250483ebf73f7a82ff820b94092c63ce4238264 from main
2023-02-01[4.2.x] Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main
2023-02-01[4.2.x] Fixed CVE-2023-23969 -- Prevented DoS with pathological values for ↵Nick Pope
Accept-Language. The parsed values of Accept-Language headers are cached in order to avoid repetitive parsing. This leads to a potential denial-of-service vector via excessive memory usage if the raw value of Accept-Language headers is very large. Accept-Language headers are now limited to a maximum length in order to avoid this issue.
2023-01-31[4.2.x] Fixed #34304 -- Made MySQL's SchemaEditor.remove_constraint() don't ↵sag᠎e
create foreign key index when unique constraint is ignored. Regression in b731e8841558ee4caaba766c83f34ea9c7004f8b. Backport of 110b3b83567da22f19ec04210db134d0fe83d662 from main
2023-01-30[4.2.x] Fixed #34283 -- Escaped title in admin's changelist filters.Stanislav Volyk
Regression in 27aa7035f57f0db30b6632e4274e18b430906799. Backport of 20a0850099340fb4cb8df0e4441e5019b2cbd1ea from main
2023-01-27[4.2.x] Fixed #28054 -- Made runserver not return response body for HEAD ↵Sarah Boyce
requests. Co-authored-by: jannschu <jannik.schuerg@posteo.de> Backport of 8acc433e415cd771f69dfe84e57878a83641e78b from main
2023-01-26[4.2.x] Fixed #34254 -- Fixed return value of Exists() with empty queryset.Raj Desai
Thanks Simon Charette for reviews. Backport of 246eb4836a6fb967880f838aa0d22ecfdca8b6f1 from main
2023-01-26[4.2.x] Fixed #34291 -- Fixed Meta.constraints validation crash on ↵Mariusz Felisiak
UniqueConstraint with ordered expressions. Thanks Dan F for the report. Bug in 667105877e6723c6985399803a364848891513cc. Backport of 2b1242abb3989f5d74e787b09132d01bcbee5b55 from main
2023-01-24[4.2.x] Fixed #34227 -- Fixed QuerySet.select_related() with multi-level ↵朱穆穆
FilteredRelation. Backport of d3c93cdc597e0efc2815111c04dd5a427432ed37 from main
2023-01-23[4.2.x] Fixed #34192 -- Preserved callable storage when it returns ↵Matt Westcott
default_storage. Backport of ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96 from main
2023-01-20[4.2.x] Fixed #34267 -- Fixed sliced QuerySet.union() crash.Francesco Panico
Regression in 3d734c09ff0138441dfe0a59010435871d17950f. Thanks Raphaël Stefanini for the report. Backport of cc8aa6bf9c127a493e6dd005012b9e6397b3f319 from main
2023-01-19[4.2.x] Fixed #34272 -- Fixed floatformat crash on zero with trailing zeros ↵David Wobrock
to zero decimal places. Regression in 08c5a787262c1ae57f6517d4574b54a5fcaad124. Thanks Andrii Lahuta for the report. Backport of 4b066bde692078b194709d517b27e55defae787c from main
2023-01-17Fixed #34255 -- Made PostgreSQL backend use client-side parameters binding ↵Mariusz Felisiak
with psycopg version 3. Thanks Guillaume Andreu Sabater for the report. Co-authored-by: Florian Apolloner <apollo13@users.noreply.github.com>
2023-01-17Refs #34255 -- Bumped required psycopg version to 3.1.8.Mariusz Felisiak
2023-01-16Refs #30129 -- Added test for create() with F() expression in Subquery.sarahboyce
Fixed in 35431298226165986ad07e91f9d3aca721ff38ec.
2023-01-13Fixed #34234 -- Dropped support for PROJ 4.Leo
2023-01-13Fixed #34240 -- Preserved headers of requests made with django.test.Client ↵Mariusz Felisiak
in assertRedirects(). Bug in 67da22f08e05018ea968fcacbac9ac37ea925d85.
2023-01-12Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings.Jarosław Wygoda
2023-01-12Fixed #26029 -- Allowed configuring custom file storage backends.Jarosław Wygoda
2023-01-12Fixed thread termination in servers.tests.LiveServerPort on Python 3.10.9+, ↵Mariusz Felisiak
3.11.1+, and 3.12+. Class cleanups registered in TestCase subclasses are no longer called as TestCase.doClassCleanups() only cleans up the particular class, see https://github.com/python/cpython/commit/c2102136be569e6fc8ed90181f229b46d07142f8
2023-01-11Refs #31546, Refs #34118 -- Corrected ↵Mariusz Felisiak
CommandTests.test_requires_system_checks_specific(). System checks are never called without skip_checks=False. Moreover, called_once_with() is not a proper assertion and raise AttributeError on Python 3.12.
2023-01-10Refs #31014 -- Added FromWKB and FromWKT GIS database functions.Mariusz Felisiak
Co-authored-by: Ondřej Böhm <ondrej.bohm@firma.seznam.cz> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2023-01-10Fixed #34110 -- Added in-memory file storage.Francesco Panico
Thanks Paolo Melchiorre, Carlton Gibson, and Mariusz Felisiak for reviews.
2023-01-09Fixed #34176 -- Fixed grouping by ambiguous aliases.Simon Charette
Regression in b7b28c7c189615543218e81319473888bc46d831. Refs #31377. Thanks Shai Berger for the report and reviews. test_aggregation_subquery_annotation_values_collision() has been updated as queries that are explicitly grouped by a subquery should always be grouped by it and not its outer columns even if its alias collides with referenced table columns. This was not possible to accomplish at the time 10866a10 landed because we didn't have compiler level handling of colliding aliases.
2023-01-07Renamed 'requests' test package.Tim Graham
This avoids a collision when third-party database backends depend on the Requests HTTP library.
2023-01-05Fixed #33865 -- Optimized LimitedStream wrapper.Nick Pope
The current implementation of LimitedStream is slow because .read() performs an extra copy into a buffer and .readline() performs two extra copies. The stream being wrapped is already typically a BytesIO object so this is unnecessary. This implementation has largely been untouched for 12 years and, inspired by a simpler implementation in werkzeug, it was possible to achieve the following performance improvement: LimitedStream.read() (single line): Mean +- std dev: [bench_limitedstream-main] 286 ns +- 6 ns -> [bench_limitedstream-patch] 227 ns +- 6 ns: 1.26x faster LimitedStream.readline() (single line): Mean +- std dev: [bench_limitedstream-main] 507 ns +- 11 ns -> [bench_limitedstream-patch] 232 ns +- 8 ns: 2.18x faster LimitedStream.read(8192) (single line): Mean +- std dev: [bench_limitedstream-main] 360 ns +- 8 ns -> [bench_limitedstream-patch] 297 ns +- 6 ns: 1.21x faster LimitedStream.readline(8192) (single line): Mean +- std dev: [bench_limitedstream-main] 602 ns +- 10 ns -> [bench_limitedstream-patch] 305 ns +- 10 ns: 1.98x faster LimitedStream.read() (multiple lines): Mean +- std dev: [bench_limitedstream-main] 290 ns +- 5 ns -> [bench_limitedstream-patch] 236 ns +- 6 ns: 1.23x faster LimitedStream.readline() (multiple lines): Mean +- std dev: [bench_limitedstream-main] 517 ns +- 19 ns -> [bench_limitedstream-patch] 239 ns +- 7 ns: 2.16x faster LimitedStream.read(8192) (multiple lines): Mean +- std dev: [bench_limitedstream-main] 363 ns +- 8 ns -> [bench_limitedstream-patch] 311 ns +- 11 ns: 1.17x faster LimitedStream.readline(8192) (multiple lines): Mean +- std dev: [bench_limitedstream-main] 601 ns +- 12 ns -> [bench_limitedstream-patch] 308 ns +- 7 ns: 1.95x faster Geometric mean: 1.59x faster
2023-01-05Refs #33865 -- Improved implementation of FakePayload.Nick Pope
FakePayload is a wrapper around io.BytesIO and is expected to masquerade as though it is a file-like object. For that reason it makes sense that it should inherit the correct signatures from io.BytesIO methods. Crucially an implementation of .readline() is added which will be necessary for this to behave more like the expected file-like objects as LimitedStream will be changed to defer to the wrapped stream object rather than rolling its own implementation for improved performance. It should be safe to adjust these signatures because FakePayload is only used internally within test client helpers, is undocumented, and thus private.
2023-01-05Refs #33865 -- Corrected signature of ExplodingBytesIO.read().Nick Pope
These subclasses of io.BytesIO should inherit the correct signature.
2023-01-05Refs #33865 -- Made RequestsTests.test_set_encoding_clears_GET use FakePayload.Nick Pope
The input stream, wsgi.input, must be a file-like object. The existing implementation of LimitedStream was lax and allowed an empty string to be passed incorrectly. See https://wsgi.readthedocs.io/en/latest/definitions.html#envvar-wsgi.input
2023-01-05Refs #32355 -- Bumped minimum supported versions of 3rd-party packages.Mariusz Felisiak
This bumps minimum supported versions of 3rd-party packages to the first releases to support Python 3.8.
2023-01-05Fixed #34243 -- Fixed timesince() crash with timezone-aware dates and ↵sag᠎e
interval longer than 1 month. Regression in 8d67e16493c903adc9d049141028bc0fff43f8c8.