| Age | Commit message (Collapse) | Author |
|
NOT FOUND.
Migrated `WSGIRequestHandler.log_message()` to use a more robust
`log_message()` helper, which was based of `log_response()` via factoring out
the common bits.
Refs CVE-2025-48432.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Backport of 9bb83925d6c231e964f8b54efbc982fb1333da27 from main.
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
|
|
https://github.com/psf/black/releases/tag/24.1.0
|
|
for HEAD requests.
|
|
- backends.sqlite.tests.ThreadSharing.test_database_sharing_in_threads
- backends.tests.ThreadTests.test_default_connection_thread_local:
on SQLite, close() doesn't explicitly close in-memory connections.
- servers.tests.LiveServerInMemoryDatabaseLockTest
- test_runner.tests.SQLiteInMemoryTestDbs.test_transaction_support
Check out https://github.com/python/cpython/pull/108015.
|
|
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
|
|
Co-authored-by: jannschu <jannik.schuerg@posteo.de>
|
|
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
|
|
LiveServerTestCase with in-memory SQLite database.
Thanks Chris Jerdonek for the implementation idea.
|
|
assertQuerySetEqual().
Co-Authored-By: Michael Howitz <mh@gocept.com>
|
|
It accounts for differences seen on MySQL with MyISAM storage engine.
|
|
Following d9a266d657f66b8c4fa068408002a4e3709ee669.
|
|
Most QuerySet methods are mapped onto the Manager and, in general,
it isn't necessary to call .all() on the manager.
|
|
Follow up to 0bc5cd628042bf0a44df60a93085a4f991a84dfb.
|
|
|
|
LiveServerTestCase tests.
|
|
|
|
|
|
ThreadedWSGIServer is used by LiveServerTestCase.
|
|
non-in-memory database on SQLite.
|
|
setUpClass() failure.
|
|
|
|
docs where appropriate.
|
|
|
|
ConnectionAbortedError/ConnectionResetError errors.
See https://bugs.python.org/issue27682 and
https://github.com/python/cpython/pull/9713
|
|
|
|
failures.
Co-authored-by: Tim Graham <timograham@gmail.com>
|
|
|
|
Browsers often use multiple connections with Connection: keep-alive.
If --nothreading is specified, the WSGI server cannot accept new
connections until the old connection is closed, causing hangs.
Force Connection: close when --nothreading option is used.
|
|
Made DatabaseWrapper thread sharing logic reentrant. Used a reference
counting like scheme to allow nested uses.
The error appeared after 8c775391b78b2a4a2b57c5e89ed4888f36aada4b.
|
|
|
|
Used more specific errors (e.g. FileExistsError) as appropriate.
|
|
favor of databases.
|
|
|
|
connections.
|
|
|
|
Ticket #25619 changed the default protocol to HTTP/1.1 but did not
properly implement keep-alive. As a "fix" keep-alive was disabled in
ticket #28440 to prevent clients from hanging (they expect the server to
send more data if the connection is not closed and there is no content
length set).
The combination of those two fixes resulted in yet another problem:
HTTP/1.1 by default allows a client to assume that keep-alive is
supported unless the server disables it via 'Connection: close' -- see
RFC2616 8.1.2.1 for details on persistent connection negotiation. Now if
the client receives a response from Django without 'Connection: close'
and immediately sends a new request (on the same tcp connection) before
our server closes the tcp connection, it will error out at some point
because the connection does get closed a few milli seconds later.
This patch fixes the mentioned issues by always sending 'Connection:
close' if we cannot determine a content length. The code is inefficient
in the sense that it does not allow for persistent connections when
chunked responses are used, but that should not really cause any
problems (Django does not generate those) and it only affects the
development server anyways.
Refs #25619, #28440.
|
|
|
|
Thanks Tim Graham for the review.
|
|
|
|
|
|
Disabled keep-alive to fix the regression in
e6065c7b8363202c5eb13ba10c97a8c24d014b45.
|
|
e.g. ResourceWarning: unclosed <socket.socket [closed] fd=6, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6>
|
|
Forwardport of 877d7b71ae952b3bc946e5187d6c23039a71614d from stable/1.11.x
|
|
iter(dict) is equivalent to iter(dict.keys()).
|
|
|
|
Thanks Tim Graham for the review.
|
|
|
|
|