Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Django to 2.2 LTS #611

Closed
3 tasks
dishantsethi opened this issue Jul 27, 2019 · 8 comments · Fixed by #757
Closed
3 tasks

Upgrade Django to 2.2 LTS #611

dishantsethi opened this issue Jul 27, 2019 · 8 comments · Fixed by #757

Comments

@dishantsethi
Copy link

dishantsethi commented Jul 27, 2019

The things we'd need to do here are:

@dishantsethi

This comment has been minimized.

@sks444
Copy link
Contributor

sks444 commented Mar 20, 2020

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.

@pradyunsg pradyunsg changed the title Upgrade to Django 2.2.3 Upgrade Django to a supported version Mar 23, 2020
@pradyunsg
Copy link
Contributor

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.

@sks444
Copy link
Contributor

sks444 commented Apr 4, 2020

After #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 ?

@pradyunsg
Copy link
Contributor

I have 0 interest in maintaining a fork.

Doesn't Django have a UUIDField built in? https://stackoverflow.com/questions/32528224/#32528292

@ananyo2012
Copy link
Contributor

Yep @pradyunsg is right. Django has uuid field for models - https://docs.djangoproject.com/en/1.11/ref/models/fields/#uuidfield

@pradyunsg
Copy link
Contributor

I'll let someone else handle writing the migration for this lol.

@sks444
Copy link
Contributor

sks444 commented Apr 5, 2020

Okay, so we'll move to Django's UUIDField and figure out a way to migrate old data to this.

@ananyo2012 ananyo2012 changed the title Upgrade Django to a supported version Upgrade Django to 2.2 LTS Jun 7, 2020
@ananyo2012 ananyo2012 mentioned this issue Jun 7, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants