Django 2.2 Upgrade
edX Services
Service Name | Owner | Django Version | Python Version | Dependencies Updated | Current Blocker |
---|---|---|---|---|---|
edx-platform | arch-bom | 2.2 | 3.5 | 92/98 | |
ecommerce | engagement-revenue | 2.2 | 3.5 | 34/42 | |
discovery | engagement-always-available | 2.2 | 3.5 | 41/50 | |
programs-masters | 2.2 | 3.5 | 24/31 | ||
programs-masters | 2.2 | 3.6 | 24/26 | ||
xqueue | platform-tnl | 2.2 | 3.5 | 3/3 | |
enterprise-catalog | enterprise-titans | 2.2 | 3.5 | 23/27 | |
portal-designer | enterprise-titans | 2.2 | 3.5 | 20/24 | |
devops? | 2.2 | 3.5 | 10/14 | https://openedx.atlassian.net/servicedesk/customer/portal/15/DOS-731 | |
insights | platform-data-de | 2.2 | 3.5 | 17/23 | |
analytics-api | platform-data-de | 2.2 | 3.5 | 16/19 | |
openedxstats | platform-tnl | 2.2 | 3.5 | 9/10 | |
license-manager | enterprise-titans? | 2.2 | 3.6 | ||
people | enterprise-aperture? | 1.11 | 3.6 |
Explanation
- Dependencies Updated - How many of the service's dependencies which use Django have been upgraded to versions specifically tested against Django 2.2? Some packages which haven't been tested will just work, but others may not.
- Current Blocker - Which ticket (if any) is most important to resolve in order to make further progress on upgrading this service to Django 2.2?
Already done for all services
- "make upgrade" Works - A repository should comply with OEP-18, be able to run "make upgrade" without errors, and have done so to update dependencies in the past week before we start trying to upgrade specific outdated packages.
- Uses pytest - pytest does a much better job of capturing and summarizing Django-produced deprecation warnings than nose or other test runners. We need it in order to be confident we've identified all the deprecation warnings that need to be addressed before upgrading.
- Uses tox - We use tox to test with newer versions of Django before changing the version used in production. We should use tox in all of our Python repositories to facilitate upgrades of Python, Django, Django REST Framework, Celery, etc.
- Code Mods Applied - We currently have 3 scripts to automate fixes of deprecated Django code usage, have they been run in this repository yet?
- Uses MIDDLEWARE Setting - Support for the legacy MIDDLEWARE_CLASSES setting was dropped in Django 2.0, we need to use the new MIDDLEWARE setting and code updated to work with it instead.
- Deprecation Warnings Fixed - Have all Django deprecation warnings for features removed by Django 2.2 been resolved? Check the warnings produced when testing against 1.11, 2.0, and 2.1.
Backwards Incompatibilites and Deprecations
- Backwards incompatible changes in 2.0
- Removed support for bytestrings in some places
- Database backend API
- Dropped support for Oracle 11.2
- Default MySQL isolation level is read committed
AbstractUser.last_name
max_length
increased to 150QuerySet.reverse()
andlast()
are prohibited after slicing- Form fields no longer accept optional arguments as positional arguments
call_command()
validates the options it receives- Indexes no longer accept positional arguments
- Foreign key constraints are now enabled on SQLite
- Miscellaneous
- Features removed in 2.0
- Backwards incompatible changes in 2.1
- Features removed in 2.1