Upgrade Django to 2.2 LTS
The things we'd need to do here are:
- [ ] Resolve the deprecation warnings.
- [ ] Upgrade to Django 1.11, and bump all dependencies. #664
- [ ] Upgrade to Django 2.2, and bump dependencies. #687
Hey @zerothabhishek, Is this a legit issue? Should Junction be upgraded to latest version of django?
I could take this up and migrate Django to 3 altogether.
It would be a good starting point for me to have a better understanding about each component of this project.
This is basically a critical task.
The things we'd need to do here are:
- Resolve the deprecation warnings.
- Upgrade to Django 1.11, and bump all dependencies.
- This will be the tricky step, because our current dependency graph isn't a known good set
- Upgrade to Django 2.2, and bump dependencies.
Thanks to an utter lack of tests, we'd need to do manual A/B tests for differences between the versions.
After https://github.com/pythonindia/junction/pull/653, I started working on fixing third party deprecation warnings and upgrading to Django 1.11.+. And one of the first issues I encountered is:
We are using django-uuidfield at devices models.
The problem is django-uuidfield uses SubfieldBase from django.db.models which has been removed:
File "/Users/sks/sks444/junction/junction/devices/models.py", line 7, in <module>
from uuidfield import UUIDField
File "/Users/sks/.virtualenvs/junction/lib/python3.7/site-packages/uuidfield/__init__.py", line 8, in <module>
from .fields import UUIDField
File "/Users/sks/.virtualenvs/junction/lib/python3.7/site-packages/uuidfield/fields.py", line 4, in <module>
from django.db.models import Field, SubfieldBase
ImportError: cannot import name 'SubfieldBase' from 'django.db.models' (/Users/sks/.virtualenvs/junction/lib/python3.7/site-packages/django/db/models/__init__.py)
And now the package is not maintained. There is a pr fixing this issue, also I found this fork which I think is a merge of this pr.
So what should we do in this case, should we deploy this to our own pypi, fixing the issue? Suggestions @pradyunsg, @palnabarun, @ananyo2012 ?
I have 0 interest in maintaining a fork.
Doesn't Django have a UUIDField built in? https://stackoverflow.com/questions/32528224/#32528292
Yep @pradyunsg is right. Django has uuid field for models - https://docs.djangoproject.com/en/1.11/ref/models/fields/#uuidfield
I'll let someone else handle writing the migration for this lol.
Okay, so we'll move to Django's UUIDField and figure out a way to migrate old data to this.