google-code-export / django-pyodbc

Automatically exported from code.google.com/p/django-pyodbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Broken on Django 1.4 alpha #120

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Update to Django 1.4 alpha
2. Install latest django-pyodbc
3. Attempt to use it

What is the expected output? What do you see instead?

Normal usage would be nice. Instead two separate problems are introduced. One 
is that django.conf.settings no longer exports DATABASE_OPTIONS by default, but 
it's assumed to exist in base.py. The other problem is that 
BaseDatabaseOperations now requires the connection object when it's being 
created. To address this I assign the django version as an attribute on the 
base.DatabaseWrapper, and then check for the django version in the constructor 
of operations.DatabaseOperations and call the superclass constructor 
accordingly.

Attached is a patch generated from my git clone of the project that should work 
against the svn sources with `patch -p0 < django-1.4-support.diff`

Original issue reported on code.google.com by alex.vidal on 2 Feb 2012 at 8:39

Attachments:

GoogleCodeExporter commented 9 years ago
The previously applied patch was missing a specific, but critical change. 
Whoops.

Original comment by alex.vidal on 2 Feb 2012 at 8:47

Attachments:

GoogleCodeExporter commented 9 years ago
Apparently the issues with Django 1.4 alpha reach much further. Investigation 
is forthcoming!

Original comment by alex.vidal on 3 Feb 2012 at 5:44

GoogleCodeExporter commented 9 years ago
Alright. The other issues are related to the new `bulk_insert` code added to 
Django in version 1.4. I forked this project onto github and created a new 
branch which includes my previously attached changes as well as the rest of the 
changes to add 1.4 support without breaking backwards compatibility.

See https://github.com/avidal/django-pyodbc/compare/master...django-1.4 for the 
changes, and 
https://github.com/avidal/django-pyodbc/compare/master...django-1.4.diff for a 
diff.

Original comment by alex.vidal on 3 Feb 2012 at 9:50

GoogleCodeExporter commented 9 years ago
This is happening on Django-1.4 (non alpha).

Original comment by mel.bo...@gmail.com on 13 May 2012 at 11:53

GoogleCodeExporter commented 9 years ago
Right. I stopped updating the ticket because I wasn't getting a response.
However, we've been running my github fork against 1.4 for months now in
production.

Original comment by alex.vidal on 14 May 2012 at 1:37

GoogleCodeExporter commented 9 years ago
Thanks, Alex. I gave your fork a go, but had no luck - I'll try again and give 
it proper attention.

Original comment by mel.bo...@gmail.com on 14 May 2012 at 1:56

GoogleCodeExporter commented 9 years ago
Yeah, that works a treat - thanks.

Original comment by mel.bo...@gmail.com on 14 May 2012 at 3:18

GoogleCodeExporter commented 9 years ago
Alex's fork works well for me on Django 1.4.1.

Original comment by djfis...@gmail.com on 2 Oct 2012 at 5:51