Skip to content

Upgrade Django to 1.11 [One Step at a time] - #135

Merged
aktech merged 5 commits into
sympy:masterfrom
aktech:upgrade-django
Apr 12, 2020
Merged

Upgrade Django to 1.11 [One Step at a time]#135
aktech merged 5 commits into
sympy:masterfrom
aktech:upgrade-django

Conversation

@aktech

@aktech aktech commented Apr 10, 2020

Copy link
Copy Markdown
Member

Upgrading everything to latest version in one go is not a great idea and will be hard to review as well, I am planning to upgrading things slowly and one by one so that the diff is not a lot.

  • This PR upgrades Django (1.3 -> 1.11)
  • Minor pep8 changes
  • Update copyright to 2020 (making it automatic is one for later)
  • Tests Pass

@asmeurer @certik @lidavidm

Comment thread templates/base.html Outdated
@asmeurer

Copy link
Copy Markdown
Member

@prshnt19 has done some work with Django for SymPy Live sympy/sympy-live#144. Perhaps you can review each other's work.

I can also give you access to push up to the App Engine if you need it.

@aktech aktech changed the title Upgrade Django to 1.11 [One Step at a time] [WIP] Upgrade Django to 1.11 [One Step at a time] Apr 10, 2020
Co-Authored-By: Aaron Meurer <asmeurer@gmail.com>
@aktech

aktech commented Apr 10, 2020

Copy link
Copy Markdown
Member Author

@asmeurer Sure, sounds great!

@aktech aktech changed the title [WIP] Upgrade Django to 1.11 [One Step at a time] Upgrade Django to 1.11 [One Step at a time] Apr 10, 2020
@aktech

aktech commented Apr 11, 2020

Copy link
Copy Markdown
Member Author

@prshnt19 Can you please have a look at this PR?

Comment thread app/views.py
return HttpResponse(json.dumps({
'error': 'Computation timed out.'
}), mimetype="application/json")
}), content_type="application/json")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its better to use JsonResponse.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the scope, See this

Comment thread app/views.py
}

return HttpResponse(json.dumps(response), mimetype='application/json')
return HttpResponse(json.dumps(response), content_type='application/json')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return HttpResponse(json.dumps(response), content_type='application/json')
return JsonResponse(response)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the scope, See this

Comment thread settings.py Outdated
}]


ALLOWED_HOSTS = ['127.0.0.1', 'localhost']

@prshnt19 prshnt19 Apr 12, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowed hosts should contain the domain 'https://sympygamma.com' for production.

Comment thread app.yaml.template
version: "1.3"
version: "1.11"
- name: numpy
version: "1.6.1"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version: "1.6.1"
version: "1.18.1"

I think numpy should be updated to latest.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beyond the scope, See this

@prshnt19 prshnt19 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aktech I think instead of Python2 we should use Python3. Python2 support is already dropped for SymPy.

@aktech

aktech commented Apr 12, 2020

Copy link
Copy Markdown
Member Author

@aktech I think instead of Python2 we should use Python3. Python2 support is already dropped for SymPy.

@prshnt19 Thanks for the review. This is beyond the scope of this PR. The plan is to do incremental working updates. See this comment. This PR only contains minimum amount of changes required to support Django 1.11, following PR could contain upgrading further versions incrementally.

@prshnt19

Copy link
Copy Markdown

Well, I only have doubts for python2. Other than that changes look fine to me

@aktech

aktech commented Apr 12, 2020

Copy link
Copy Markdown
Member Author

Well, I only have doubts for python2. Other than that changes look fine to me

This is an attempt to prepare for Python3 upgrade. It will happen incrementally.

@asmeurer

Copy link
Copy Markdown
Member

SymPy Gamma is also hosted at gamma.sympy.org

@aktech

aktech commented Apr 12, 2020

Copy link
Copy Markdown
Member Author

SymPy Gamma is also hosted at gamma.sympy.org

Updated ALLOWED_HOSTS and deployed here:
https://sympy-gamma-aktech.uc.r.appspot.com/input/?i=x

@aktech
aktech merged commit 200679c into sympy:master Apr 12, 2020
@aktech aktech added the GAE-Python3 Everything related to upgrading to Google App engine's Python3 runtime label Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GAE-Python3 Everything related to upgrading to Google App engine's Python3 runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants