1
0
mirror of https://github.com/django/django.git synced 2024-12-27 11:35:53 +00:00
Commit Graph

31390 Commits

Author SHA1 Message Date
fschwebel
5159e05e40 [4.2.x] Fixed typo in docs/topics/auth/passwords.txt.
Wrapped hashing is only possible if the inner wrapped function is the
same as the previous hasher.
Backport of 0265b1b49b from main
2023-01-30 08:32:13 +01:00
Sarah Boyce
4bf3d6dec2 [4.2.x] Fixed #28054 -- Made runserver not return response body for HEAD requests.
Co-authored-by: jannschu <jannik.schuerg@posteo.de>
Backport of 8acc433e41 from main
2023-01-27 21:50:40 +01:00
Mariusz Felisiak
d42e47f572 [4.2.x] Refs #34255 -- Skipped test_group_by_nested_expression_with_params test on PostgreSQL when server-side binding cursors are used.
Thanks Tim Graham for the review.
Backport of 82dad11bfe from main
2023-01-27 21:29:47 +01:00
Raj Desai
f210ad1b98 [4.2.x] Fixed #34254 -- Fixed return value of Exists() with empty queryset.
Thanks Simon Charette for reviews.

Backport of 246eb4836a from main
2023-01-26 20:25:18 +01:00
Simon Sawicki
9eae81724d [4.2.x] Fixed #34294 -- Protected django.core.files.locks against argtypes redefinition on Windows.
Backport of 7eb5391b71 from main
2023-01-26 19:40:57 +01:00
Mariusz Felisiak
719a14badc [4.2.x] Fixed #34291 -- Fixed Meta.constraints validation crash on UniqueConstraint with ordered expressions.
Thanks Dan F for the report.

Bug in 667105877e.
Backport of 2b1242abb3 from main
2023-01-26 09:32:14 +01:00
Carlton Gibson
d43fbdf6f1 [4.2.x] Adjusted release notes for 4.1.6, 4.0.9, and 3.2.17.
Backport of d8e1442ce2 from main
2023-01-25 12:26:40 +01:00
Carlton Gibson
50432e3fd5 [4.2.x] Set date and added stub release notes for 4.1.6, 4.0.9, and 3.2.17.
Backport of 1df963ad24 from main
2023-01-25 11:58:35 +01:00
Stephen
d9d9534466 [4.2.x] Corrected passenv value for tox 4.0.6+.
Backport of 34b3288149 from main
2023-01-25 06:10:35 +01:00
朱穆穆
f23a85337a [4.2.x] Fixed #34227 -- Fixed QuerySet.select_related() with multi-level FilteredRelation.
Backport of d3c93cdc59 from main
2023-01-24 10:52:01 +01:00
Matt Westcott
b332a96cd7 [4.2.x] Fixed #34192 -- Preserved callable storage when it returns default_storage.
Backport of ef85b6bf0b from main
2023-01-23 11:14:57 +01:00
Claude Paroz
0fd5d16c22 [4.2.x] Fixed #34278 -- Made translatable string plural-aware in SelectFilter2.js.
Bug in be63c78760.

Backport of e3a4cee081 from main
2023-01-23 06:38:49 +01:00
noFFENSE
fa52bb7774 [4.2.x] Fixed #34242 -- Doc'd that primary key is set to None when deleting objects.
Backport of 5cd1385356 from main
2023-01-20 10:57:30 +01:00
Francesco Panico
84927e110e [4.2.x] Fixed #34267 -- Fixed sliced QuerySet.union() crash.
Regression in 3d734c09ff.

Thanks Raphaël Stefanini for the report.

Backport of cc8aa6bf9c from main
2023-01-20 09:25:26 +01:00
David Wobrock
3b6f307344 [4.2.x] Fixed #34272 -- Fixed floatformat crash on zero with trailing zeros to zero decimal places.
Regression in 08c5a78726.

Thanks Andrii Lahuta for the report.

Backport of 4b066bde69 from main
2023-01-19 10:47:52 +01:00
John Whitlock
a3771c8229 [4.2.x] Fixed typo in docs/releases/4.2.txt.
Backport of d547171183 from main
2023-01-17 19:28:19 +01:00
Mariusz Felisiak
1452e7cb7f [4.2.x] Doc'd that 4.2 is LTS.
Backport of 2785e121c7 from main
2023-01-17 19:25:44 +01:00
Mariusz Felisiak
2cbb3c9135 [4.2.x] Removed remaining empty sections from 4.2 release notes.
Follow up to 772cd2b15b.
Backport of a209f66259 from main
2023-01-17 14:05:51 +01:00
Sébastien Corbin
57680658f3 [4.2.x] Fixed #34264 -- Moved release note about session cookies into error reporting section.
Backport of e2964fed17 from main
2023-01-17 13:09:47 +01:00
Mariusz Felisiak
1a504d9ce7 [4.2.x] Bumped version for 4.2 alpha 1 release. 2023-01-17 10:20:09 +01:00
Mariusz Felisiak
6fef789e45
[4.2.x] Updated source translation catalogs. 2023-01-17 10:09:42 +01:00
Mariusz Felisiak
81818cc555 [4.2.x] Bumped django_next_version in docs config. 2023-01-17 08:54:30 +01:00
Mariusz Felisiak
9409312eef Updated man page for Django 4.2 alpha. 2023-01-17 08:51:17 +01:00
Mariusz Felisiak
e734cccea0 Made cosmetic edits to docs/releases/4.2.txt. 2023-01-17 08:51:17 +01:00
Mariusz Felisiak
772cd2b15b Removed empty sections from 4.2 release notes. 2023-01-17 08:51:17 +01:00
Mariusz Felisiak
0e2649fdf4 Fixed #34255 -- Made PostgreSQL backend use client-side parameters binding with psycopg version 3.
Thanks Guillaume Andreu Sabater for the report.

Co-authored-by: Florian Apolloner <apollo13@users.noreply.github.com>
2023-01-17 08:24:08 +01:00
Mariusz Felisiak
c8a76059ff Refs #34255 -- Bumped required psycopg version to 3.1.8. 2023-01-17 08:24:08 +01:00
sarahboyce
0fbdb9784d Fixed #23718 -- Doc'd that test mirrors require TransactionTestCase.
Co-authored-by: Christian Bundy <me@christianbundy.com>
2023-01-16 09:31:34 +01:00
sarahboyce
05bcd5baaf Refs #30129 -- Added test for create() with F() expression in Subquery.
Fixed in 3543129822.
2023-01-16 08:26:34 +01:00
Steven
4b7016866a Fixed "nulls characters" typo in docs. 2023-01-16 07:54:00 +01:00
Leo
5da5f3773e Fixed #34234 -- Dropped support for PROJ 4. 2023-01-13 12:31:41 +01:00
Mariusz Felisiak
c2118d72d6
Fixed #34240 -- Preserved headers of requests made with django.test.Client in assertRedirects().
Bug in 67da22f08e.
2023-01-13 11:30:27 +01:00
Mariusz Felisiak
648005dee6
Refs #18468 -- Used obj_description() with a catalog name on PostgreSQL.
obj_description(object oid) without a catalog name is deprecated since
there is no guarantee that OIDs are unique across different system
catalogs.

Thanks Tim Graham for the report.
2023-01-12 13:23:47 +01:00
Jarosław Wygoda
32940d390a Refs #26029 -- Deprecated DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings. 2023-01-12 09:58:36 +01:00
Jarosław Wygoda
1ec3f0961f Fixed #26029 -- Allowed configuring custom file storage backends. 2023-01-12 06:20:57 +01:00
Mariusz Felisiak
d02a9f0cee
Fixed thread termination in servers.tests.LiveServerPort on Python 3.10.9+, 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

c2102136be
2023-01-12 06:04:10 +01:00
Mariusz Felisiak
4593bc5da1
Refs #33879 -- Fixed plural value deprecation warnings.
Plural value must be an integer.

Regression in 8d67e16493.
2023-01-11 12:49:12 +01:00
Jarosław Wygoda
d16079dd90 Refs #26029 -- Added LazySettings._show_deprecation_warning() hook. 2023-01-11 09:02:01 +01:00
Mariusz Felisiak
829f4d1448
Refs #31546, Refs #34118 -- Corrected 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-11 05:36:40 +01:00
Mariusz Felisiak
d4b4c1cae4
Corrected used JS libraries in GIS widget docs.
Follow up to 1833eb3f3e.
2023-01-10 14:25:44 +01:00
Mariusz Felisiak
552384fa97
Refs #31014 -- Added FromWKB and FromWKT GIS database functions.
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-10 11:51:09 +01:00
Francesco Panico
72efd840a8 Fixed #34110 -- Added in-memory file storage.
Thanks Paolo Melchiorre, Carlton Gibson, and Mariusz Felisiak for
reviews.
2023-01-10 10:56:59 +01:00
Marti Raudsepp
04fdf71933
Refs #30240 -- Fixed argument name for MySQLSHA2Mixin.as_mysql() and PostgreSQLSHAMixin.as_postgresql() methods. 2023-01-09 13:23:08 +01:00
Simon Charette
dd68af62b2 Fixed #34176 -- Fixed grouping by ambiguous aliases.
Regression in b7b28c7c18.

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-09 10:52:51 +01:00
Tim Graham
016bead6a2
Renamed 'requests' test package.
This avoids a collision when third-party database backends depend on the
Requests HTTP library.
2023-01-07 11:41:40 +01:00
rajdesai24
d5f892d873
Fixed #34220 -- Moved csrf_input_lazy, csrf_token_lazy imports to the toplevel.
This prevents random errors with partially initialized modules.
2023-01-06 14:18:29 +01:00
Nick Pope
b47f2f5b90 Fixed #33865 -- Optimized LimitedStream wrapper.
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-05 19:26:56 +01:00
Nick Pope
57f5669d23 Refs #33865 -- Improved implementation of FakePayload.
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-05 19:25:25 +01:00
Nick Pope
95182a8593 Refs #33865 -- Corrected signature of ExplodingBytesIO.read().
These subclasses of io.BytesIO should inherit the correct signature.
2023-01-05 19:17:56 +01:00
Nick Pope
7a1543d9f6 Refs #33865 -- Made RequestsTests.test_set_encoding_clears_GET use FakePayload.
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-05 19:16:49 +01:00