David Smith
80aae83439
[4.2.x] Refs #33476 -- Applied Black's 2023 stable style.
...
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 097e3a70c1
from main
2023-02-01 11:37:29 +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
Mike Crute
0b78ac3fc7
Fixed #34200 -- Made the session role configurable on PostgreSQL.
2023-01-03 09:30:53 +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
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
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
95a101a690
Fixed #34201 -- Bumped minimum supported SQLite to 3.21.0.
2022-12-08 05:53:18 +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
Florian Apolloner
3cafb783f3
Refs #33308 -- Used psycopg's errors instead of errorcodes.
2022-12-01 09:17:33 +01:00
David Sanders
64b3c413da
Fixed #34103 -- Fixed logging SQL queries with duplicate parameters on Oracle.
2022-11-25 09:42:25 +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
cb791a2540
Fixed #33872 -- Deprecated django.contrib.postgres.fields.CIText/CICharField/CIEmailField/CITextField.
2022-08-03 11:42:51 +02:00
Mariusz Felisiak
eb3699ea77
Fixed #33718 -- Dropped support for MySQL 5.7.
2022-07-08 13:30:12 +02:00
Simon Charette
877c800f25
Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.
...
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2022-07-06 07:40:07 +02:00
Mariusz Felisiak
249ecc437f
Fixed #33815 -- Fixed last_executed_query() on Oracle when parameter names overlap.
2022-07-05 05:53:49 +02:00
Mariusz Felisiak
981c23c0cc
Fixed #33717 -- Dropped support for PostgreSQL 11.
2022-05-19 09:26:48 +02:00
Mariusz Felisiak
19297de2fe
Fixed #33713 -- Dropped support for MariaDB 10.3.
2022-05-18 08:38:08 +02:00
Mariusz Felisiak
2cec020f5b
Refs #33379 -- Fixed minimum supported version of MariaDB.
2022-05-17 14:59:28 +02:00
Mariusz Felisiak
37470bbd90
Fixed #33675 -- Dropped support for PostgreSQL 10 and PostGIS 2.4.
2022-05-04 06:28:51 +02:00
Mariusz Felisiak
8e89dfe1c2
Fixed various tests on MySQL with MyISAM storage engine.
2022-04-18 07:05:52 +02:00
Mariusz Felisiak
331a460f8f
Fixed DatabaseFeatures.uses_savepoints/can_release_savepoints and related tests with MyISAM storage engine.
2022-04-18 07:05:52 +02:00
Florian Apolloner
2eea361eff
Fixed #30511 -- Used identity columns instead of serials on PostgreSQL.
2022-04-13 21:51:51 +02:00
Gagaro
7325d29152
Refs #30581 -- Fixed DatabaseFeatures.bare_select_suffix on MySQL < 8 and MariaDB < 10.4.
2022-03-22 09:45:59 +01:00
Mariusz Felisiak
ed6db53542
Fixed isolation of FeaturesTests.test_supports_json_field_operational_error().
2022-03-18 20:57:08 +01:00
David Smith
3b3f38b3b0
Fixed #31169 -- Adapted the parallel test runner to use spawn.
...
Co-authored-by: Valz <ahmadahussein0@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-03-15 16:23:55 +01:00
Nick Pope
847f46e9bf
Removed redundant QuerySet.all() calls in docs and tests.
...
Most QuerySet methods are mapped onto the Manager and, in general,
it isn't necessary to call .all() on the manager.
2022-02-22 10:29:38 +01:00
Hasan Ramezani
9ac3ef59f9
Fixed #33379 -- Added minimum database version checks.
...
Thanks Tim Graham for the review.
2022-02-18 13:37:49 +01:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Mariusz Felisiak
826701232c
Removed obsolete Oracle's test_client_encoding() test.
...
encoding and nencoding parameters were deprecated in cx_Oracle 8.2.
Moreover, encoding is handled internally between cx_Oracle and Oracle
Database and there is no need to test it.
2021-12-30 12:42:37 +01:00
Jacob Walls
92412aa94c
Fixed #23273 -- Avoided creation of django_migrations table when there are no migrations to apply.
2021-12-30 06:36:55 +01:00
Adam Johnson
deec15a9a6
Refs #33355 -- Made trunc functions raise ValueError on invalid lookups on SQLite.
...
Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
2021-12-23 11:47:13 +01:00
Mariusz Felisiak
ca04659b4b
Refs #32355 -- Bumped required psycopg2 version to 2.8.4.
...
psycopg2 2.8.4 is the first release to support Python 3.8.
2021-12-22 20:32:55 +01:00
Przemysław Suliga
4ce59f602e
Fixed #30398 -- Added CONN_HEALTH_CHECKS database setting.
...
The CONN_HEALTH_CHECKS setting can be used to enable database
connection health checks for Django's persistent DB connections.
Thanks Florian Apolloner for reviews.
2021-12-01 07:44:48 +01:00
SwastikTripathi
a7e7043c87
Fixed #33229 -- Fixed BaseDatabaseOperations.adapt_datetimefield_value()/adapt_timefield_value() crash with expressions.
2021-11-19 09:47:57 +01:00
Jonny Park
6fa2930573
Refs #24121 -- Added __repr__() to BaseDatabaseWrapper, JoinPromoter, and SQLCompiler.
2021-11-19 07:57:02 +01:00
Can Sarigol
661316b066
Fixed #33279 -- Fixed handling time zones with "-" sign in names.
...
Thanks yakimka for the report.
Regression in fde9b7d35e
.
2021-11-12 07:30:02 +01:00
Mariusz Felisiak
0b95a96ee1
Removed DatabaseIntrospection.get_key_columns().
...
Thanks Simon Charette for the report.
2021-11-10 16:38:43 +01:00
Anv3sh
69af4d09ba
Fixed #32672 -- Fixed introspection of primary key constraints on SQLite.
...
Thanks Simon Charette for the implementation idea.
2021-10-26 09:50:23 +02:00
Manaia Junior
551c997fea
Fixed #33214 -- Added BaseDatabaseOperations.format_for_duration_arithmetic() stub method.
2021-10-22 08:19:02 +02:00
Hannes Ljungberg
86971c4090
Fixed #33194 -- Fixed migrations when altering a field with functional indexes/unique constraints on SQLite.
...
This adjusts Expressions.rename_table_references() to only update alias
when needed.
Regression in 83fcfc9ec8
.
Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2021-10-18 08:25:23 +02:00
Daniel Hahler
98c8bf1cee
Fixed #33160 -- Avoided suppressing query errors in _nodb_cursor() on PostgreSQL.
2021-10-01 07:23:57 +02:00
Matjaz Gregoric
518ce7a51f
Fixed #33017 -- Fixed storage engine introspection on MySQL.
...
This also improves performance on MySQL instances with a large number
of databases, since querying the information_schema table can be very
slow
2021-08-20 11:05:21 +02:00
Mads Jensen
c51bf80d56
Used more specific unittest assertions in tests.
2021-07-07 10:51:38 +02:00
Mateo Radman
2231429991
Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using "assert".
2021-07-05 13:31:03 +02:00
Nick Pope
fa35c8bdbc
Fixed #30934 -- Included database alias in django.db.backends log messages.
...
This is useful when working with database routing as you want to know
where each query is being executed.
Co-authored-by: David Winterbottom <david.winterbottom@gmail.com>
2021-07-02 15:36:53 +02:00
Mariusz Felisiak
1f643c28b5
Fixed #32653 -- Made quoting names in the Oracle backend consistent with db_table.
2021-04-30 12:59:07 +02:00
Konstantin Alekseev
6e742dabc9
Fixed #32687 -- Restored passing process’ environment to underlying tool in dbshell on PostgreSQL.
...
Regression in bbe6fbb876
.
2021-04-27 10:43:35 +02:00
Mariusz Felisiak
f6018c1e63
Fixed #32595 -- Fixed SchemaEditor.quote_value() crash with bytes.
2021-03-30 11:42:15 +02:00