1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
Commit Graph

70 Commits

Author SHA1 Message Date
Claude Paroz
3c5d1edb39 Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapper
Thanks Daniel Hahler for the report and Tim Graham for the review.
2014-12-29 19:06:28 +01:00
Claude Paroz
30cbd5d360 Replaced DatabaseCreation sql methods by schema editor equivalents
Also used schema editor in migrate to sync unmigrated apps (sync_apps).
Refs #22340. Thanks Tim Graham for the review.
2014-12-23 19:35:01 +01:00
Michael Hall
895dc880eb Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range 2014-12-13 12:45:58 -05:00
Josh Smeaton
267a1dcd9b Fixed #23941 -- Removed implicit decimal formatting from expressions. 2014-12-12 10:17:48 -05:00
Thomas Chaumeny
da9fe5c717 Fixed #20392 -- Added TestCase.setUpTestData()
Each TestCase is also now wrapped in a class-wide transaction.
2014-12-03 10:37:04 -05:00
Andriy Sokolovskiy
1739ae9edc Fixed #23807 -- Ignored non-digits in psycopg2 version 2014-12-01 18:42:08 -05:00
Veres Lajos
a71a2ea756 Fixed typos using https://github.com/vlajos/misspell_fixer 2014-11-03 20:59:30 -05:00
Berker Peksag
f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Claude Paroz
abc11b0a33 Fixed #23514 -- Prevented queries in PostGISOperations init
Thanks Mattia Procopio for the report.
2014-09-18 20:00:35 +02:00
Marc Tamlyn
e9103402c0 Fixed #18757, #14462, #21565 -- Reworked database-python type conversions
Complete rework of translating data values from database

Deprecation of SubfieldBase, removal of resolve_columns and
convert_values in favour of a more general converter based approach and
public API Field.from_db_value(). Now works seamlessly with aggregation,
.values() and raw queries.

Thanks to akaariai in particular for extensive advice and inspiration,
also to shaib, manfre and timograham for their reviews.
2014-09-03 20:36:03 +01:00
Tim Graham
d28396f526 Fixed #23144 -- Dropped support for MySQL 5.0, 5.1. 2014-08-02 10:28:40 -04:00
Tim Graham
a9bdce7e55 Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.
Thanks Claude Paroz for the review.
2014-08-01 10:26:00 -04:00
Anubhav Joshi
91f1b6dcdc Fixed #13711 -- Model check added to ensure that auto-generated column name is within limits of the database.
Thanks russellm for report and Tim Graham for review.
2014-06-17 16:16:02 -04:00
Tim Graham
a2cd0e12c9 Silenced deprecation warnings for refs #22811 and fixed build. 2014-06-12 09:28:36 -04:00
Tim Graham
1c58cabad7 Fixed #22811 -- Allowed setting both the old and new TEST database settings.
An ImproperlyConfigured exception will be raised they mismatch.
2014-06-12 08:17:49 -04:00
Tim Graham
6c27ff957a Fixed flake8 error. 2014-06-07 20:35:28 -04:00
Aymeric Augustin
fc31319752 Fixed test again. Refs #12581. 2014-06-07 17:16:49 +02:00
Aymeric Augustin
d98cc41a84 Made a test compatible with Python 2 and 3. 2014-06-07 15:04:06 +02:00
Aymeric Augustin
cfcca7ccce Fixed #3711, #6734, #12581 -- Bounded connection.queries.
Prevented unlimited memory consumption when running background tasks
with DEBUG=True.

Thanks Rob, Alex, Baptiste, and others.
2014-06-07 14:37:43 +02:00
Aymeric Augustin
237c229b91 Avoided using BinaryField unecessarily in tests.
Several database backends struggle with binary data. This change
minimizes the risk of unrelated tests failures when binary fields
trigger errors.

Forward-port of 2e4bcb9b from stable/1.7.x.
2014-06-05 17:11:10 +02:00
Aymeric Augustin
c70a61eb49 Replaced vendor checks by three feature flags. 2014-05-08 22:11:15 +02:00
Aymeric Augustin
d667263169 Reorganized backends tests.
This reduces the number of explicit vendor checks.
2014-05-08 21:50:21 +02:00
Aymeric Augustin
8176150850 Fixed #21202 -- Maintained atomicity when the server disconnects.
Thanks intgr for the report.

This commit doesn't include a test because I don't know how to emulate a
database disconnection in a cross-database compatible way.

Also simplified a 'backends' test that was constrained by this problem.
2014-04-10 21:22:47 +02:00
Aymeric Augustin
5f2f47fdfc Fixed #21553 -- Ensured unusable database connections get closed. 2014-04-09 22:41:33 +02:00
Aymeric Augustin
2791fbf59d Used more specific test assertions. 2014-04-09 22:20:22 +02:00
Claude Paroz
d902fd625d Added test to confirm #12583 resolution 2014-03-31 18:24:01 +02:00
Aymeric Augustin
0f9560855e Removed legacy transaction management per the deprecation timeline. 2014-03-21 21:06:50 +01:00
Rodolfo Carvalho
0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Vajrasky Kok
d3cf6cfacf Fixed #17713 -- Renamed BaseDatabaseFeatures.allows_primary_key_0 to allows_auto_pk_0.
MySQL does allow primary key with value 0. It only forbids autoincrement
primary key with value 0.

Thanks Claude Paroz for the report.
2014-02-06 05:16:40 -05:00
Aymeric Augustin
ab922c5cd8 Fixed typo in 3ffeb931. 2014-02-02 23:40:16 +01:00
Michael Manfre
3ffeb93186 Ensure cursors are closed when no longer needed.
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
2014-02-02 12:47:21 -05:00
Michael Manfre
0837eacc4e Made SQLCompiler.execute_sql(result_type) more explicit.
Updated SQLUpdateCompiler.execute_sql to match the behavior described in
the docstring; the 'first non-empty query' will now include all queries,
not just the main and first related update.

Added CURSOR and NO_RESULTS result_type constants to make the usages more
self documenting and allow execute_sql to explicitly close the cursor when
it is no longer needed.
2014-02-02 12:47:06 -05:00
Simon Charette
10e3faf191 Fixed #19774 -- Deprecated the contenttypes.generic module.
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368.

Thanks to Ramiro, Carl and Loïc for the review.
2014-01-26 14:42:30 -05:00
Aymeric Augustin
225a6ed2cf Fixed a test that was failing with PostGIS.
Fixed #21452 again.

Forward-port of 18d75e07 from stable/1.6.x.
2014-01-12 21:40:22 +01:00
Aymeric Augustin
720c6d3a44 Restored a test broken by overzealous PEP8 cleanup 2014-01-12 21:13:32 +01:00
Simon Charette
c726598c3d Fixed flake8 issues. 2014-01-12 13:40:37 -05:00
Aymeric Augustin
1afe748832 Fixed #21452 -- Non-autocommit connections to PostgreSQL.
When settings.DATABASES['default']['AUTOCOMMIT'] = False, the connection
wasn't in autocommit mode but Django pretended it was.

Thanks Anssi for analysing this issue.

Refs #17062.
2014-01-12 18:28:51 +01:00
Aymeric Augustin
1c24096f1e Fixed a test isolation issue. Refs #17062.
This test could change settings.DATABASES['default']['TIME_ZONE'] and
didn't restore the previous value.
2014-01-12 18:28:51 +01:00
Aymeric Augustin
e32095616c Imported override_settings from its new location. 2013-12-23 21:37:56 +01:00
Jason Myers
7a61c68c50 PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00
Tim Graham
ae48d77ef8 Fixed E225 pep8 warnings. 2013-10-23 06:09:29 -04:00
Anssi Kääriäinen
47e79bfcfb Fixed #21187 -- Import CursorWrapper from django.db.backend.utils
The import was done from util instead of utils leading to
PendingDeprecationWarning.
2013-09-28 14:18:37 +03:00
Michael Manfre
99c87f1410 Fixed #17671 - Cursors are now context managers. 2013-09-25 21:47:26 +03:00
Tim Graham
18ffdb1772 Fixed #17627 -- Renamed util.py files to utils.py
Thanks PaulM for the suggestion and Luke Granger-Brown and
Wiktor Kołodziej for the initial patch.
2013-09-16 12:52:05 -04:00
Alex Gaynor
97a626d898 Fixed this syntax error on py32 2013-09-06 21:56:57 -07:00
Eric Boersma
ded40142a9 Fixed #20007 -- Configured psycopg2 to return UnicodeArrays
Thanks hogbait for the report.
2013-09-06 20:43:58 -04:00
Chris Wilson
eade315da1 Fixed #10164 -- Made AutoField increase monotonically on SQLite
Thanks malte for the report.
2013-09-06 12:31:17 -04:00
Eric Boersma
4d13cc56de Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
2013-09-05 20:14:58 -04:00
Simon Charette
11cd7388f7 Fixed #20989 -- Removed useless explicit list comprehensions. 2013-08-30 10:57:51 -04:00
Tim Graham
aa830009de Fixed #17519 -- Fixed missing SQL constraints to proxy models.
Thanks thibaultj for the report, jenh for the patch,
and charettes for the tests.
2013-08-02 07:41:56 -04:00