django-nonrel / django

Django fork with support for NoSQL databases
http://www.django-nonrel.org/
BSD 3-Clause "New" or "Revised" License
216 stars 83 forks source link

Django 1.7 #15

Open westurner opened 10 years ago

westurner commented 10 years ago
Alir3z4 commented 9 years ago

any update on django 1.7 ?

aburgel commented 9 years ago

@Alir3z4 not yet, but i'm happy to take pull requests. its a good way to learn about django and django-nonrel :smile:

Alir3z4 commented 9 years ago

@aburgel Great, I haven't tried to merge/upgrade django changes to django-norel yet.

Basically these are my main questions, which it's a lot, but if I get them answered I can be really active on upgrading django changes into django-nonrel since I have good amount of free time to contribute.

I'm using django-nonrel on a active project with MongoDB and having it upgraded to the latest is my highest priority.

Thanks

aburgel commented 9 years ago

@Alir3z4 I created a nonrel-1.7 branch to get you started. Its just the official 1.7.1 release, with no nonrel changes. You should fork the repo and then branch off of it.

To start your work, you should take a look at what I've merged into 1.6. (All except the merge commits).

https://github.com/django-nonrel/django/commits/nonrel-1.6?author=aburgel

You can cherry-picking those changes over into your new branch. Most of them should work without much difficulty. You will also probably need to change djangotoolbox, and probably mongodb-engine as well. For 1.6 most of the changes were pretty minimal, mostly updating method signatures.

Once you've got something working, however minimal, open up a pull request and I'll help out with some comments, and if I have time, some code as well.

I would also read through the 1.7 release notes as a guide to what you might want to test as you're making changes.

Alir3z4 commented 9 years ago

@aburgel Thanks for detailed explanation. It's great.

I already forked the project and ran the test suite of django 1.7 with all its dependencies, the result of running test suite is :

(djangoEnv)[alireza@arch django]$ PYTHONPATH=..:$PYTHONPATH tests/runtests.py
Testing against Django installed in '/home/alireza/dev/pycharm/django/django'
Creating test database for alias 'default'...
Creating test database for alias 'other'...
............................................................................................................................................................................................................................................................................................................................................................................x.................................................................................................................................................................................................................................................................................................................................ss.......................................................................................................................................................................................................................ssssssssssssssssssssssssssssssssssssssssssss..............................................................................s.........................................................................................................................................................ss...............................x....s.............x......................................................................................................................................................................................................................................................................................................................................................................................................................sssssssssssssssssssssssss..sss.................s....ss......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................s..........................................................................................................s...............................................................................................................................s..........................................................................................................sss.........................................................................................................................................................................................................................................................................s...........s.......................................................................................................................ss...ss..s.............................ss.sssssss...................................................................................s...........................s..........................................s...................................................xx.....................................................s..........................................x............................................................................................s.........................sssssss....s..............s......s...........................................................................................................................................................s...............................sss......s..................................s.......................................................................................................................................................................................................................s....................................................................................................................................................................................................................................................................................................................................................................................................................x.................s.......................x......................................................sss..................................s................................................................................................................................sssssssss.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................s...............ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss................................................................................................................................................................................................................................................................................................................................................................................................sss.....................................sssssssssss....................sss.....s.s.s.....sss.....s...s....................................................s....................................s.ss.ssssss........ssss......ss....s.ssssssssssssssssssss.......................s....................ssssssssssssssssssss...s.......s...........................sss...................s...ss.....................................sssssssssssssss..s..sss.........................................................................................................................................................s..............ssssssssssssssssssss..........................................................................................................................................................................................................................................................................................................................................................................................................................ssssss............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ssss........................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...................ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss..
----------------------------------------------------------------------
Ran 7272 tests in 240.280s

OK (skipped=525, expected failures=8)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

I'm gonna keep that result to check for after applying nonrel changes, also I just applied 34276624ee8fdadc9a89ead41720ab7f3478dd9d and I got some conflicts which seems to be pretty easy to solve.

I'll keep you this thread updated about the progress.

Thanks again for the help.

aburgel commented 9 years ago

cool. a bunch of those failures are probably expected since django nonrel doesn't support a lot of the queries that are used in the tests.

namlehong commented 9 years ago

@Alir3z4 Do you have any stable version of 1.7 atm?

Alir3z4 commented 9 years ago

@namlehong I tried to get django-norel working with 1.7 but I get into lots of errors and issues that I couldn't get it working easily. Where my working nosql database is MongoDB and I would get many issues there too.

I haven't tried to work on the upgrade.

As now Django latest release is 1.8. Unfortunately I see no news about nosql support on Django upstream even in their 1.9 notes.

I'm afraid by keeping a fork such as django-nonrel, django upstream is loosing interest in matter of any work on NoSQL on their part.

Although I can see recently they work on making database part more modular but after having migrations things got more frustrating. Where most of django core might bring the migrations part into consideration. each release django is bringing more extra feature in database part that they're unique to RDBMS and it's hard to assume they will bring anything up soon about nosql.

@aburgel while working on upgrading to latest django would you consider some getting some activities and talk with django upstream about getting nosql into core ? I know this has been done couple of years ago seriously but well django core has changed a lot since.

Today I was looking at https://code.djangoproject.com/ticket/19009 and notices the ticket was closing about 2-3 years ago. I think if we do some updates on the ticket and similar ticket won't hurt anybody, at least nonrel users such as me would know about the feature of nosql and django core.

I'm trying to prepare a update on that ticket that I highly appreciate your( @aburgel ) and others who can add or correct the below ticket response before its submission.

I see django-nonrel on github is using django version 1.6 at they're trying to work with latest too.

Each time django-nonrel tries to upgrade to latest Django they just import latest changes and do some tiny changes to the core and fix some related issues with their NoSQL database backends to reflect the latest changes and that's it.

In the beginning of their work, keeping up with each Django new version required some hacks into original django code, but since django 1.5 the amount of hack into django core gets less and less. Specially since pluginable django auth User model.

Now by using django-nonrel fork I don't loose another django apps, I just easily add them to django.settings.INSTALLED_APPS and the project is ready to go.

Most of NoSQL database such as MongoDB requires no database migrations at all, this is big advantage for getting a MongoDB support into core, since no work is required on migrations part.

Some time ago people would argue that NoSQL database have some extra Database Field where they won't work with other django built-in database engine backend, but fortunately now we're seeing django PostgreSQL database engine comes with some new unique to PostgreSQL databaseField as well. MongoDB and other NoSQL databases also come with some extra database fields as well where it will be possible to have them in django core the same way as PostgreSQL extra database fields.

Please let me know how I can make a better ticket response, I'm asking since I don't want to make a wrong statement.

aburgel commented 9 years ago

@Alir3z4 my advice would be to not try to get mongo support into django official, but to try to get in whatever minimal set of changes needed to support the nosql databases using djangotoolbox.

the changes are pretty minimal for most nosql databases. mongo is a bit unusual because it uses a non-integer object key, and most of django assumes that primary keys are integers. so that will take some extra work.