Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Python 3.7 with Django 1.11?

We have an existing Django application which uses Django 1.11 and Python 3.6. For some security reasons I have been asked to use Python 3.7. I need to make the minimum changes possible. Do I need to upgrade Django as well? If so , is there any code changes required?

Thanks,

like image 624
Navid Avatar asked Sep 18 '18 17:09

Navid


People also ask

What version of Python can I use with Django?

Python compatibilityDjango 4.0 supports Python 3.8, 3.9, and 3.10. We highly recommend and only officially support the latest release of each series. The Django 3.2. x series is the last to support Python 3.6 and 3.7.

Does Django use Python 2 or 3?

Django uses the Python 2/3 Compatible Source strategy. Of course, you're free to chose another strategy for your own code, especially if you don't need to stay compatible with Python 2.

Is Django based on Python?

Django is a high-level Python web framework that enables rapid development of secure and maintainable websites. Built by experienced developers, Django takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel.


2 Answers

Python 3.7 compatibility was retrospectively added into the classifiers for Django v2.0 in this commit, even though v2.1 was already out. 1.11 was not included.

Discussion on Django tracker is here: https://code.djangoproject.com/ticket/28814

However, 1.11.x is LTS release series, so maybe if you're lucky that will still be added in a micro version upgrade at some later date.


Edit: Python 3.7 support was added in the micro version upgrade for Django 1.11.17 (2018-12-03, about 3 months after this question was originally asked)

like image 73
wim Avatar answered Oct 17 '22 14:10

wim


According to this page on the Django docs, support for Python 3.7 was added in Django 1.11.17.

https://docs.djangoproject.com/en/1.11/faq/install/#what-python-version-can-i-use-with-django

like image 41
Ben Murden Avatar answered Oct 17 '22 14:10

Ben Murden