-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature/kak/use python 3#922 #1135
Merged
flibbertigibbet
merged 12 commits into
azavea:django2
from
flibbertigibbet:feature/kak/use-python-3#922
Aug 27, 2019
Merged
Feature/kak/use python 3#922 #1135
flibbertigibbet
merged 12 commits into
azavea:django2
from
flibbertigibbet:feature/kak/use-python-3#922
Aug 27, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Switch to using python3 on app VM.
Database needs python 2 for PostgreSQL library support, which still defaults to 2, and OTP uses a transit feed validator not upgraded for python 3 support.
Run python 2to3 library to upgrade for python 3 support. Fix migrations for python 3 support.
When calling Django to get static files during JS build, use python3.
Replace string representations for Django python 3 upgrade.
No longer using phantomjs, so bzip2 unneeded.
Also remove python/pip install, as they are no longer needed. Use system python 3 to run ansible.
KlaasH
approved these changes
Aug 27, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good!
Co-Authored-By: Klaas Hoekema <khoekema@azavea.com>
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Use python 3 for the
app
VM, both when runningansible
and to run the Django app.Upgrades the Django app code for python 3, mostly by running the
2to3
conversion tool. The migration changes and__str__
method changes where manual.Upgrades all VMs from Ubuntu 16.04 to 18.04 (the latest LTS) to have python 3.6 available as a system package (the latest is 3.7; Ubuntu 16.04 is on 3.5.)
Notes
This PR is against a new branch
django2
just created fromdevelop
as a long-running feature branch for the changes necessary to upgrade to Django 2.x.The database VM cannot be upgraded to use python 3 because the postgresql-support role still depends on python 2.
The OTP VM makes little use of python, but cannot be upgraded to python 3 because the transit feed validator library doesn't yet support it: google/transitfeed#412.After removing the currently unused feed validator from the OTP VM, it no longer needs pip/python, and provisions with ansible using the system python 3.6.Testing Instructions
app
Django server should be running on python 3.6Closes #922