Daniele Varrazzo
09ffc5c121
Fixed #33308 -- Added support for psycopg version 3.
...
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews.
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-15 06:17:57 +01:00
Marti Raudsepp
32268456d6
Fixed #34209 -- Prevented FileBasedCache.has_key() crash caused by a race condition.
2022-12-13 19:29:15 +01:00
Nimra Aftab
1d0fa848e0
Fixed #34038 -- Improved color contrast for links in admin.
2022-12-13 08:40:14 +01:00
Jarek Pacocha
4cc900bcbf
Made urls.py docstring consistent with other files in project template.
2022-12-13 05:28:55 +01:00
Florian Apolloner
db7bb3b64e
Refs #33308 -- Added DatabaseOperations.compose_sql() on PostgreSQL.
2022-12-12 10:36:45 +01:00
Florian Apolloner
1d90c9b113
Refs #33308 -- Added psycopg_any.IsolationLevel.
2022-12-12 10:36:42 +01:00
Florian Apolloner
2f38f7b8f9
Refs #33308 -- Added psycopg_any.sql.quote() hook.
2022-12-12 10:35:38 +01:00
Florian Apolloner
2ebfbd894e
Refs #33308 -- Moved psycopg2 imports to the psycopg_any module.
2022-12-12 08:36:17 +01:00
James Gillard
c5ed884eab
Fixed #34205 -- Fixed Meta.constraints validation crash with ArrayField and __len lookup.
...
Regression in 88fc9e2826044110b7b22577a227f122fe9c1fb5 that began
manifesting in Django 4.1.
2022-12-10 17:46:13 +01:00
SirAbhi13
b8738aea14
Fixed #33199 -- Deprecated passing positional arguments to Signer/TimestampSigner.
...
Thanks Jacob Walls for the implementation idea.
2022-12-09 12:44:48 +01:00
Mariusz Felisiak
cbc0fb3705
Made inspectdb used Cursor.description.display_size for CharFields' max_length.
...
internal_size is size for fixed-size types not for char types.
2022-12-08 09:00:35 +01:00
Mariusz Felisiak
95a101a690
Fixed #34201 -- Bumped minimum supported SQLite to 3.21.0.
2022-12-08 05:53:18 +01:00
James Bligh
e44d348c99
Fixed #32319 -- Added ES module support to ManifestStaticFilesStorage.
...
Co-authored-by: James Bligh <james.bligh@silvercloudhealth.com>
2022-12-07 10:56:00 +01:00
Florian Apolloner
6a21658163
Refs #33308 -- Modernized database wrapper in the PostgreSQL backend.
...
- Used connection.info instead of connection.get_parameter_status() and
connection.server_info which don't exist in psycopg 3.
- Set encoding using the client_encoding connection parameter instead
of connection.set_client_encoding() that doesn't exist in psycopg 3.
- Used the dbname connection parameter instead of deprecated
alias - database.
2022-12-06 12:48:16 +01:00
Alex Vandiver
cbce427c17
Fixed #34194 -- Added django.utils.http.content_disposition_header().
2022-12-05 13:08:00 +01:00
Mariusz Felisiak
3d3e955efa
Removed redundant definition of DatabaseFeatures.can_release_savepoints on MySQL.
2022-12-05 12:08:21 +01:00
Florian Apolloner
2fecf99ade
Refs #33308 -- Made PostGISAdapter do not use psycopg2's Binary().
2022-12-02 09:46:57 +01:00
Simon Charette
0ff46591ac
Refs #33308 -- Deprecated support for passing encoded JSON string literals to JSONField & co.
...
JSON should be provided as literal Python objects an not in their
encoded string literal forms.
2022-12-01 19:14:00 +01:00
Daniele Varrazzo
d3e746ace5
Refs #33308 -- Added get_type_oids() hook and simplified registering type handlers on PostgreSQL.
2022-12-01 11:05:57 +01:00
Florian Apolloner
3cafb783f3
Refs #33308 -- Used psycopg's errors instead of errorcodes.
2022-12-01 09:17:33 +01:00
SwastikTripathi
e20fd899be
Refs #34095 -- Changed more properties to use rem units in admin CSS.
2022-11-30 13:41:35 +01:00
Simon Charette
0db8bf3d60
Refs #10929 -- Fixed aggregates crash when passing strings as defaults.
...
Previously strings were interpreted as F() expressions and default
crashed with AttributeError:
'F' object has no attribute 'empty_result_set_value'
2022-11-29 13:08:05 +01:00
Giebisch
85b52d22fd
Fixed #33701 -- Added fine-grained error locations to the technical 500 debug page.
2022-11-29 08:40:11 +01:00
sdolemelipone
9d726c7902
Fixed #34187 -- Made UserCreationForm save many-to-many fields.
2022-11-29 05:56:53 +01:00
Mariusz Felisiak
20d575b101
Refs #31169 -- Skipped test_get_test_db_clone_settings_not_supported on not in-memory SQLite database.
...
multiprocessing's start method is checked only for in-memory SQLite
databases.
2022-11-28 09:30:22 +01:00
David Sanders
64b3c413da
Fixed #34103 -- Fixed logging SQL queries with duplicate parameters on Oracle.
2022-11-25 09:42:25 +01:00
Giebisch
80c66e40f7
Fixed #33747 -- Added exception notes to the technical 500 debug page.
2022-11-25 08:16:10 +01:00
Christophe Baldy
70c945d6b3
Used DatabaseFeatures.django_test_skips to skip AssertNumQueriesUponConnectionTests tests.
2022-11-24 19:41:08 +01:00
SirAbhi13
17472c3304
Fixed #34173 -- Skipped saving sessions on 5xx responses.
2022-11-24 15:46:41 +01:00
baldychristophe
855f5a36e7
Fixed #29062 -- Prevented possibility of database lock when using LiveServerTestCase with in-memory SQLite database.
...
Thanks Chris Jerdonek for the implementation idea.
2022-11-24 10:52:48 +01:00
Simon Charette
1297c0d0d7
Fixed #31679 -- Delayed annotating aggregations.
...
By avoiding to annotate aggregations meant to be possibly pushed to an
outer query until their references are resolved it is possible to
aggregate over a query with the same alias.
Even if #34176 is a convoluted case to support, this refactor seems
worth it given the reduction in complexity it brings with regards to
annotation removal when performing a subquery pushdown.
2022-11-23 17:46:07 +01:00
DevilsAutumn
4035bab56f
Fixed #34171 -- Fixed QuerySet.bulk_create() on fields with db_column in unique_fields/update_fields.
...
Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796.
Thanks Joshua Brooks for the report.
2022-11-22 14:47:21 +01:00
Mariusz Felisiak
7d5329852f
Fixed #34177 -- Fixed QuerySet.bulk_create() crash on "pk" in unique_fields.
...
Bug in 0f6946495a8ec955b471ca1baaf408ceb53d4796.
2022-11-22 14:26:23 +01:00
Tom Carrick
96a598356a
Used CSS flex for form rows.
2022-11-22 08:30:23 +01:00
Ilya Bass
798e38c2b9
Fixed #31090 -- Logged transaction management queries.
...
Thanks to Petter Strandmark for the original idea and Mariusz Felisiak
for advice during the DjangoConUS 2022 Sprint!
2022-11-21 09:10:14 +01:00
Mariusz Felisiak
c0a93d3941
Removed unnecessary ForeignKey.get_reverse_path_info().
...
get_reverse_path_info() is already inherited from ForeignObject.
2022-11-18 14:47:29 +01:00
David Sanders
25904db915
Fixed #34119 -- Prevented callable default hidden widget value from being overridden.
...
Thanks to Benjamin Rigaud for the report.
2022-11-18 13:12:15 +01:00
roman_p
04b15022e8
Fixed #26261 -- Fixed queryset crash when excluding reverse GenericRelation.
...
Thanks Amir Hadi for the report.
2022-11-18 10:13:31 +01:00
Francesco Panico
51faf4bd17
Fixed #34148 -- Reverted "Fixed #32901 -- Optimized BaseForm.__getitem__()."
...
This reverts commit edde2a069929c93e37835dc3f7c9a229040058e2.
Thanks Jan Pieter Waagmeester for the report.
2022-11-18 08:06:13 +01:00
Ben Cail
fbde929b19
Fixed #26056 -- Added QuerySet.values()/values_list() support for ArrayField's __overlap lookup.
...
Thanks Mads Jensen and kosz85 and the initial patch.
2022-11-18 05:53:37 +01:00
DevilsAutumn
81b1c167bf
Fixed #28987 -- Fixed altering ManyToManyField when changing to self-referential.
2022-11-17 12:36:52 +01:00
Mariusz Felisiak
2848e5d0ce
Refs #34118 -- Used smtplib's context parameter instead of keyfile and certfile.
...
keyfile and certfile parameters were removed in Python 3.12, see
ef0e72b31d
2022-11-16 11:30:59 +01:00
Simon Charette
5c23d9f0c3
Refs #33308 -- Used get_db_prep_value() to adapt JSONFields.
2022-11-15 13:02:36 +01:00
Simon Charette
d87a7b9f4b
Refs #33308 -- Stopped inheriting from FieldGetDbPrepValueMixin by PostgresOperatorLookup.
2022-11-15 13:02:36 +01:00
Simon Charette
70499b25c7
Fixed #34123 -- Fixed combinator order by alias when using select_related().
...
Regression in c58a8acd413ccc992dd30afd98ed900897e1f719.
Thanks to Shai Berger for the report and tests.
Co-Authored-By: David Sanders <shang.xiao.sanders@gmail.com>
2022-11-15 10:48:19 +01:00
Simon Charette
7adb0c8b60
Avoided unnecessary usage of RawSQL.
...
This ensures proper alias quoting.
2022-11-15 10:48:14 +01:00
David Wobrock
67da22f08e
Fixed #34074 -- Added headers argument to RequestFactory and Client classes.
2022-11-14 10:21:51 +01:00
Simon Charette
b181cae2e3
Refs #25307 -- Replaced SQLQuery.rewrite_cols() by replace_expressions().
...
The latter offers a more generic interface that doesn't require
specialized expression types handling.
2022-11-14 09:05:32 +01:00
Simon Charette
1771998c09
Reduced nesting inside Query.get_aggregation().
2022-11-14 09:01:21 +01:00
Simon Charette
10037130c1
Refs #28477 -- Fixed handling aliased annotations on aggregation.
...
Just like when using .annotate(), the .alias() method will generate the
necessary JOINs to resolve the alias even if not selected.
Since these JOINs could be multi-valued non-selected aggregates must be
considered to require subquery wrapping as a GROUP BY is required to
combine duplicated tuples from the base table.
Regression in 59bea9efd2768102fc9d3aedda469502c218e9b7.
2022-11-14 05:45:33 +01:00