Closed Bug 1311967 Opened 8 years ago Closed 7 years ago

Update to Django 1.10

Categories

(Tree Management :: Treeherder, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file, 1 obsolete file)

Chatting through the taskcluster auth bug with Cameron yesterday, it became apparent that we might need to update to Django 1.10 to get the longer username field.

We'll need to first update to Django 1.9 (bug 1266065) and pick up recent package updates (bug 1302689) since many of them include Django 1.10 compatibility fixes.

After that we'll need to go through the Django 1.10 release notes and check for any straggling packages that don't have Django 1.10 support.
Blocks: 1270157
Depends on: 1324707
Blocks: 1326089
Blocks: 1326205
Blocks: 1326207
After rebasing on top of bug 1326045 + bug 1324707:

vagrant ~/treeherder $ python -Wonce manage.py check --deploy

/home/vagrant/venv/local/lib/python2.7/site-packages/django/conf/__init__.py:129: RemovedInDjango110Warning: Session verification will become mandatory in Django 1.10. Please add 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' to your MIDDLEWARE_CLASSES setting when you are ready to opt-in after reading the upgrade considerations in the 1.8 release notes.
  RemovedInDjango110Warning
...
/home/vagrant/venv/local/lib/python2.7/site-packages/django/template/utils.py:37: RemovedInDjango110Warning: You haven't defined a TEMPLATES setting. You must do so before upgrading to Django 1.10. Otherwise Django will be unable to load templates.
  "unable to load templates.", RemovedInDjango110Warning)
...


(Also checked `python -Wonce manage.py runserver` and `python -Wonce manage.py migrate` but nothing extra there)
$ PYTHONWARNINGS=once py.test tests --capture=no |& egrep 'RemovedInDjango110Warning|DeprecationWarning'
...
/home/vagrant/venv/local/lib/python2.7/site-packages/django/conf/__init__.py:129: RemovedInDjango110Warning: Session verification will become mandatory in Django 1.10. Please add 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' to your MIDDLEWARE_CLASSES setting when you are ready to opt-in after reading the upgrade considerations in the 1.8 release notes.
  RemovedInDjango110Warning
...
tests/e2e/test_jobs_loaded.py ../home/vagrant/venv/local/lib/python2.7/site-packages/django/template/utils.py:37: RemovedInDjango110Warning: You haven't defined a TEMPLATES setting. You must do so before upgrading to Django 1.10. Otherwise Django will be unable to load templates.
  "unable to load templates.", RemovedInDjango110Warning)
/home/vagrant/treeherder/tests/model/test_cycle_data.py:44: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
/home/vagrant/treeherder/tests/model/test_cycle_data.py:112: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
/home/vagrant/treeherder/tests/model/test_cycle_data.py:169: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
/home/vagrant/treeherder/tests/model/test_cycle_data.py:201: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
/home/vagrant/treeherder/tests/model/test_cycle_data.py:237: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
tests/model/commands/test_init_datasource.py /home/vagrant/treeherder/tests/model/commands/test_init_datasource.py:27: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
./home/vagrant/treeherder/tests/model/commands/test_init_datasource.py:35: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
./home/vagrant/treeherder/tests/model/derived/test_jobs_model.py:298: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
/home/vagrant/treeherder/tests/model/derived/test_jobs_model.py:312: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
/home/vagrant/treeherder/treeherder/webapp/api/auth.py:63: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
/home/vagrant/venv/local/lib/python2.7/site-packages/rest_framework/filters.py:67: PendingDeprecationWarning: The built in 'rest_framework.filters.DjangoFilterBackend' is pending deprecation. You should use 'django_filters.rest_framework.DjangoFilterBackend' instead.
/home/vagrant/venv/local/lib/python2.7/site-packages/rest_framework/filters.py:48: PendingDeprecationWarning: The built in 'rest_framework.filters.FilterSet' is pending deprecation. You should use 'django_filters.rest_framework.FilterSet' instead.
Blocks: 1328173
Blocks: 1320136
Depends on: 1328270
Depends on: 1328277
Depends on: 1328294
Blocks: 1328297
Assignee: nobody → emorley
Comment on attachment 8823145 [details] [review]
[treeherder] mozilla:django1.10 > mozilla:master

Now that the deps have landed, the tests are passing :-)
Attachment #8823145 - Flags: review?(cdawson)
Comment on attachment 8823145 [details] [review]
[treeherder] mozilla:django1.10 > mozilla:master

Thanks for doing this!  Now I can fix the [:30] thing in my PR.  :)
Attachment #8823145 - Flags: review?(cdawson) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Hawkrest wasn't running its own tests against Django 1.10 yet, so I've fixed this with:
https://github.com/kumar303/hawkrest/pull/31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: