Claude Paroz
f1cc2be0c5
Fixed #18575 -- Empty DATABASES should default to dummy backend
...
Thanks delormemarco@gmail.com for the report.
2012-10-28 23:44:03 +01:00
Anssi Kääriäinen
2249bd275c
Fixed Oracle failure for "%" in table name
2012-10-27 05:26:42 +03:00
Ramiro Morales
35e8dc5169
Removed ad-hoc support for usage of short names of built-in DB backends.
...
This non-standard naming was deprecated in Django 1.2.
2012-10-06 23:27:08 -03:00
Claude Paroz
859aa2a6c4
Fixed #18790 -- Encoded database password on Python 2
...
Thanks thcourbon@gmail.com for the report.
2012-09-12 10:16:49 +02:00
Alex Gaynor
292322f977
[py3k] Silence many warnings while running the tests.
2012-09-07 13:17:34 -04:00
Aymeric Augustin
c03cf0b096
Cleaned up a test slightly.
...
We should catch all exceptions in the thread to ensure it doesn't die
with an unhandled exception. The type of the exception is already
checked further in the test.
2012-08-18 11:02:28 +02:00
Aymeric Augustin
d4a0b27838
[py3] Refactored __unicode__ to __str__.
...
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
test it under Python 2
2012-08-12 14:44:40 +02:00
Aymeric Augustin
a84d79f572
[py3] Added Python 3 compatibility for xrange.
2012-07-22 09:29:56 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Josh Smeaton
fa182e8ae8
Fixed #18465 -- Set date formats correctly on Oracle
...
Correctly configure NLS_SESSION_PARAMETERS to format Date and DateTime
on Oracle backend.
Thanks to Josh Smeaton for report & patch.
2012-06-26 19:39:14 +03:00
Claude Paroz
a2022dae7f
Removed escaping test of query content
...
As the content of last_executed_query() is not under Django's control
for most backends, it is useless to test too specific aspects of it.
2012-06-13 13:37:22 +02:00
Anssi Kääriäinen
86c20e39eb
Fixed connection.queries encoding handling on Oracle
...
In addition, removed a possibly problematic .filter() call from
backends.test_query_encoding test. It is possible the .filter could
cause collation problems on MySQL, and as it wasn't absolutely needed
for the test it seemed better to get rid of the call.
Refs #18461 .
2012-06-13 14:16:34 +03:00
Claude Paroz
e9ef9776d1
Fixed #18461 -- Ensured that last_executed_query returns Unicode
...
Thanks Anssi Kääriäinen for the review.
2012-06-13 12:04:46 +02:00
Claude Paroz
aa423575e7
Fixed #17760 -- Implemented callable database features as cached properties
...
This does remove the requirement to call features.confirm() method
before checking the properties.
Thanks cdestiger and Ramiro Morales for their work on the patch.
2012-06-09 15:59:52 +02:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Michael Newman
4423757c0c
Fixed #18135 -- Close connection used for db version checking
...
On MySQL when checking the server version, a new connection could be
created but never closed. This could result in open connections on
server startup.
2012-05-27 18:45:08 +03:00
Claude Paroz
7549de841c
Fixed #18334 -- Fixed detection of supports_stddev backend feature.
...
Thanks to Michael Manfre for the report and Anssi Kääriäinen for the
review.
2012-05-18 12:12:45 +02:00
Claude Paroz
b52672d778
Replaced deprecated TestCase methods. Refs #17049 .
2012-05-03 16:39:16 +02:00
Claude Paroz
3904b74a3f
Fixed #18013 -- Use the new 'as' syntax for exceptions.
...
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Anssi Kääriäinen
c4e62eff90
Fixed #17653 -- Changed MySQL backend to raise a ValueError if zero is used as an AutoField value.
...
Thanks to Sylvain Lebon for the report, krzysiumed for the patch and charettes and claudep for reviews.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 18:03:14 +00:00
Anssi Kääriäinen
612247b3a0
Fixed #16961 -- Skipped resetting AUTO_INCREMENT fields for MySQL if the server version is greater than 5.0.12. This allows for much faster testing.
...
Thanks to aigarius for the report and claudep and ramiro for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-24 16:47:31 +00:00
Claude Paroz
9383a2761c
Removed with_statement imports, useless in Python >= 2.6. Refs #17965 . Thanks jonash for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Aymeric Augustin
7beb0db79b
Fixed #10320 -- Made it possible to use executemany with iterators. Thanks MockSoul for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-22 16:41:20 +00:00
Aymeric Augustin
ca187fea88
Fixed #17513 -- Prevented the MySQL backend from leaking MySQLdb-specific exceptions. Thanks Claude Paroz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-07 19:53:20 +00:00
Jannis Leidel
db2b1458b1
Fixed #17047 -- Improved django.db.utils.load_backend to raise a better exception when using a unqualified database backend name. Thanks, Jonas Obrist.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-25 13:24:39 +00:00
Julien Phalip
a1d2f1f7b7
Ensured that thread-shareability gets validated when closing a PostgreSQL or SQLite connection. Refs #17258 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 17:02:41 +00:00
Julien Phalip
34e248efec
Fixed #17258 -- Moved `threading.local` from `DatabaseWrapper` to the `django.db.connections` dictionary. This allows connections to be explicitly shared between multiple threads and is particularly useful for enabling the sharing of in-memory SQLite connections. Many thanks to Anssi Kääriäinen for the excellent suggestions and feedback, and to Alex Gaynor for the reviews. Refs #2879 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 13:40:19 +00:00
Aymeric Augustin
78a2719def
Tweaked the skipping condition for the test introduced in r17128 so that it works on non-PostgreSQL backends.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 20:43:59 +00:00
Aymeric Augustin
74b836abf5
Fixed #17062 -- Ensured that the effect of SET TIME ZONE isn't lost when the first transation is rolled back under PostgreSQL. Thanks Anssi for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17128 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-11-20 16:12:33 +00:00
Alex Gaynor
d362c1546f
Convert much of the regression tests to use absolute imports. There's still work to be done though.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 18:51:33 +00:00
Karen Tracey
be87f0b0ec
Fixed #3615 : Added support for loading fixtures with forward references on database backends (such as MySQL/InnoDB) that do not support deferred constraint checking. Many thanks to jsdalton for coming up with a clever solution to this long-standing issue, and to jacob, ramiro, graham_king, and russellm for review/testing. (Apologies if I missed anyone else who helped here.)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-07 00:43:26 +00:00
Ramiro Morales
f2dca72afd
Fixed #11065 , #11285 -- Streamlined PostgreSQL version detection, fixing incompatibility with multi-db. Thanks findepi for the report.
...
Changed our internal representation of the PostgreSQL version from tuples to
integers as used by libpq and psycopg2. This simplifies version comparison
operations.
Also, using the associated libpq/psycopg2 API allows to remove the need for
manually issuing in-band ``SELECT version()`` SQL queries to obtain the server
version (or at least reduce its number if version of psycopg2 in use is older
than 2.0.12). Refs #10509 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-19 18:00:09 +00:00
Luke Plant
724c84fe90
Fixed #13648 - '%s' escaping support for sqlite3 regression.
...
Thanks to master for the report and initial patch, and salgado and others
for work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-10 12:20:47 +00:00
Jacob Kaplan-Moss
5b0e4e49d4
Fixed #14091 - be more correct about logging queries in connection.queries.
...
Thanks to Aymeric Augustin for figuring out how to make this work across
multiple databases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16081 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:14:54 +00:00
Ramiro Morales
30b3d51599
Fixed #13630 -- Made __init__ methods of all DB backends' DatabaseOperations classes take a `connection` argument. Thanks calexium for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05 00:19:17 +00:00
Russell Keith-Magee
4c468800ee
Updates to the test suite to allow for newly deprecated and removed features
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:44:47 +00:00
Ian Kelly
5475da1c32
Added a regression test for r14781. Also fixed a bug where connection.vendor was effectively always 'unknown', causing all vendor-specific tests to be skipped.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03 18:15:54 +00:00
Ramiro Morales
cfdad9ed86
Fixed #14223 -- Extended unification of exception raised in presence of integrity constraint violations.
...
The unification had been introduced in r12352 and native backend exceptions still
slipped through in cases that end in connection.commit() call. Thanks Alex,
Jacob and Carl for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 00:01:22 +00:00
Russell Keith-Magee
121d2e3678
Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Russell Keith-Magee
2d3b47183a
Migrated custom_columns_regress doctests. Thanks to Sebastian Hillig.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:13:17 +00:00
Russell Keith-Magee
cd9aed5b2d
Migrated backends doctests. Thanks to Sebastian Hillig.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:12:48 +00:00
Russell Keith-Magee
6909c22663
Fixed #13798 -- Added connection argument to the connection_created signal. Thanks to liangent for the report, and Alex Gaynor for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13672 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-30 13:21:18 +00:00
Russell Keith-Magee
de81c5513c
Added a related_name to a test model to avoid a name clash in the full test suite.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-30 03:49:58 +00:00
Russell Keith-Magee
398415fc23
Fixed #13821 -- Added a double-quoting to the PostgreSQL sequence reset code. Thanks to PaulM for the report, and to PaulM and Simon Meers for their work on the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-30 02:43:01 +00:00
Russell Keith-Magee
bab9aab9a2
Fixed #13941 -- Corrected the way sequence names are reset under Postgres, especially when generic foreign keys are involved. Thanks to Ales Zoulek for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-07-30 02:42:36 +00:00
Russell Keith-Magee
6ab3fea113
Fixed #8901 -- Reapplied r13328 (with extra docs) now that we have a 1.3 development branch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-21 11:48:45 +00:00
Russell Keith-Magee
2597f31ed4
Refs #8901 -- Reverted r13328 because the patch imposes a minimum version requirement of Postgres 8.0; we can't impose that on Django 1.2, so we need to wait until the 1.3 is branched before we can apply this change.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-10 11:45:29 +00:00
Russell Keith-Magee
21a690fcfe
Fixed #8901 -- Corrected the PostgreSQL sequence reset code when field identifiers exceed the maximum identifier length. Thanks to adam@zuerchertech.com for the report, and Matt Hoskins for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-06-07 15:47:19 +00:00
Ian Kelly
6a1cf9369f
Fixed a bug preventing cursor variables from being passed as bind parameters in the oracle backend.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-28 17:08:06 +00:00
Russell Keith-Magee
37861cf7eb
Fixed #13082 -- Slight modification to an Oracle test to avoid a problem cause by teardown behavior. Thanks to stvsmth for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12913 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-04 17:06:13 +00:00