Changes between Version 2 and Version 3 of DjangoOnWindows
- Timestamp:
- Jun 29, 2008, 8:20:35 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DjangoOnWindows
v2 v3 9 9 As of r7787 the test suite is failing in two places when run on Windows + Python 2.5.2: 10 10 11 * If setuptools is installed, on a test from {{{tests/regressiontests/templates/loaders.py}}} related to trying to load a template from an egg (from a report on #django-dev, it seems this is a test that is also failingon OS X).12 * On a test query from ({{{tests/regressiontests/queries/models.py}}})when using the sqlite3 Django DB backend11 * If setuptools is installed, on a test from {{{tests/regressiontests/templates/loaders.py}}} related to trying to load a template from an egg (from a report on #django-dev, it seems this test also fails on OS X). 12 * On a test from {{{tests/regressiontests/queries/models.py}}} when using the sqlite3 Django DB backend 13 13 14 14 === tests/regressiontests/templates/loaders.py === 15 15 16 TBD 16 When setuptools is installed (tested with version 0.6c8), the unittest contained in this file fails. Error is: 17 18 {{{ 19 ====================================================================== 20 ERROR: A template can be loaded from an egg 21 ---------------------------------------------------------------------- 22 Traceback (most recent call last): 23 File "C:\ramiro\django-trunk\tests\regressiontests\templates\loaders.py", line 82, in test_existing 24 contents, template_name = lts_egg("y.html") 25 File "C:\ramiro\django-trunk\django\template\loaders\eggs.py", line 24, in load_template_source 26 raise TemplateDoesNotExist, template_name 27 TemplateDoesNotExist: y.html 28 }}} 29 30 TO BE DONE: Investigate this further. 31 32 ==== Workaround ==== 33 34 Uninstall setuptools. On [7751], Adrian modified the test suite machinery to skip the test(s) that depend on setuptools when it isn't installed. 17 35 18 36 === tests/regressiontests/queries/models.py === 19 37 20 This test f rom {{{tests/regressiontests/queries/models.py}}} fails when running test suite:38 This test fails: 21 39 22 40 {{{ … … 68 86 }}} 69 87 70 This is aminimal models.py that shows the problem (extracted from the above regression test):88 A minimal models.py that shows the problem (extracted from the above regression test): 71 89 72 90 {{{ … … 114 132 }}} 115 133 116 Problem sseems to be related to some bug in the version of pysqlite2 or sqlite3 (main suspect) included with the official Python 2.5.2 win32 installer (2.3.2 and 3.3.4 respectively):134 Problem seems to be related to some bug in the version of pysqlite2 or sqlite3 (main suspect) included with the official Python 2.5.2 win32 installer (2.3.2 and 3.3.4 respectively): 117 135 118 136 {{{ … … 150 168 ==== How does this affect Django ==== 151 169 152 The problem doesn't lie with Django, but leads to ask if the order being used to try loading the sqlite-related DB-API2 modules by the sqlite3 backed ({{{django/db/backends/sqlite3/base.py}}}) shouldn't be inverted: Try loading pysqlite2 first and if itfails then try loading sqlite3:170 The problem doesn't lie within Django itself, but leads to ask oneself if the order being used by the sqlite3 backed to try loading the sqlite DB-API2 modules ({{{django/db/backends/sqlite3/base.py}}}) shouldn't be inverted: Try loading pysqlite2 first and if this fails then try loading sqlite3: 153 171 154 172 {{{ … … 178 196 }}} 179 197 180 Reasoning behind this is that this would allow the user to take advantage of newer pysqlite2/sqlite3 versions he/she may have installed even if using Python 2.5. This might be true regardless of theplatform.198 Reasoning behind this is that this would allow the user to take advantage of newer pysqlite2/sqlite3 versions he/she may have installed even if using Python 2.5.x. This might be true and desirable regardless of platform. 181 199 182 200 == See also ==