1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
Commit Graph

12673 Commits

Author SHA1 Message Date
Adrian Torres
7eee1dca42 Fixed #14094 -- Added support for unlimited CharField on PostgreSQL.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-28 12:31:04 +01:00
kimsoungryoul
78f163a4fb Fixed #18468 -- Added support for comments on columns and tables.
Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz
Felisiak for reviews.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-12-28 06:28:07 +01:00
DevilsAutumn
68ef274bc5 Fixed #34217 -- Fixed migration crash when removing check constraints on MySQL < 8.0.16. 2022-12-27 07:11:13 +01:00
朱穆穆
bbeeb45161 Fixed #34226 -- Fixed QuerySet.select_related() with multiple FilteredRelations to the OneToOneField. 2022-12-27 06:39:38 +01:00
David Wobrock
5aaad5f39c Fixed #34165 -- Made permissions creation respect the "using" parameter. 2022-12-24 11:58:33 +01:00
Carlton Gibson
0bd2c0c901 Fixed #33735 -- Added async support to StreamingHttpResponse.
Thanks to Florian Vazelle for initial exploratory work, and to Nick
Pope and Mariusz Felisiak for review.
2022-12-22 10:41:12 +01:00
Mariusz Felisiak
ae0899be0d
Fixed #34219 -- Preserved Char/TextField.db_collation when altering column type.
This moves setting a database collation to the column type alteration
as both must be set at the same time.

This should also avoid another layer of the column type alteration when
adding database comments support (#18468).
2022-12-22 07:12:17 +01:00
Mariusz Felisiak
3b24a3fa33
Removed unnecessary commas in tests. 2022-12-21 11:41:29 +01:00
Carlton Gibson
32d70b2f55
Refs #34118 -- Adopted asgiref coroutine detection shims.
Thanks to Mariusz Felisiak for review.
2022-12-20 11:10:48 +01:00
Roxane
289e9a75af Fixed #33662 -- Allowed Sitemap to customize languages for each item. 2022-12-19 12:51:52 +01:00
Andreas Pelme
ab7a85ac29 Fixed #34170 -- Implemented Heal The Breach (HTB) in GzipMiddleware. 2022-12-17 08:46:37 +01:00
Leo
a1bcdc94da Fixed #34212 -- Made RedisCacheClient.incr() use write connection.
Co-authored-by: Sin-Woo Bang <sinwoobang@gmail.com>
2022-12-16 19:13:03 +01:00
Mariusz Felisiak
1e4da43955
Fixed lookup.tests.LookupTests.test_exact_none_transform() test on Oracle.
NulledTransform doesn't return TextField anymore so it cannot be
wrapped with DBMS_LOB.SUBSTR().

Test regression in 09ffc5c121.
2022-12-16 12:24:49 +01:00
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
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
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 88fc9e2826 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
9da2210f12
Avoided direct mocking of psycopg2.__version__ in test_correct_extraction_psycopg2_version(). 2022-12-08 14:31:35 +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
d8c8761901 Used homogeneous weights list in SearchRank tests.
A homogenous array is required on PostgreSQL.
2022-12-06 12:52:56 +01:00
Daniele Varrazzo
c14e5c64c9 Fixed typo in tests/postgres_tests/test_signals.py comment. 2022-12-06 12:52:56 +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
Mariusz Felisiak
29b6a177d8
Fixed AdminViewDeletedObjectsTest.test_cyclic failure when using --keepdb.
This changes to hardcoded pks when hardcoded fks are used.
2022-12-06 11:14:32 +01:00
Pablo
e673c87b56 Fixed #29084 -- Skipped some postgres_tests.test_search tests when pg_catalog isn't English. 2022-12-06 08:26:43 +01:00
Alex Vandiver
cbce427c17 Fixed #34194 -- Added django.utils.http.content_disposition_header(). 2022-12-05 13:08:00 +01:00
Pablo
48531f53ae Improved test coverage for django.db.transaction. 2022-12-05 10:46:33 +01:00
Simon Charette
eccda63a49 Improved isolation of TestGeneralAggregate.test_default_argument(). 2022-12-02 13:58:46 +01:00
Florian Apolloner
3e3b7f691b Refs #33308 -- Avoided passing None to RawSQL's params.
Passing None to params causes errors in determining the data type on
psycopg3.
2022-12-02 10:56:09 +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
149b55fefa Refs #33308 -- Ensured type handlers are registered for all PostgreSQL specific tests.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-12-01 09:39:46 +01:00
Florian Apolloner
3cafb783f3 Refs #33308 -- Used psycopg's errors instead of errorcodes. 2022-12-01 09:17:33 +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
60a7bd8986
Refs #34119 -- Skipped test_callable_default_hidden_widget_value_not_overridden when JSONField is not supported. 2022-11-28 09:47:52 +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
Mariusz Felisiak
a411b90967
Refs #33050 -- Added test for QuerySet.count() on combined queries with select_related().
Thanks Simon Charette for noticing this.

Fixed in 70499b25c7.
2022-11-23 09:35:48 +01:00
DevilsAutumn
4035bab56f Fixed #34171 -- Fixed QuerySet.bulk_create() on fields with db_column in unique_fields/update_fields.
Bug in 0f6946495a.

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 0f6946495a.
2022-11-22 14:26:23 +01:00