Python 3 - Assessments Upgrade (and Full Platform Upgrade)

TL;DR: Tuesday we released a major update to the environment instructors use for assessments that run Python code. The change required 634 course teams across 75 edX partners to update and test their code to work with Python 3  and updated versions of various libraries. This year long project with multiple stages and hurdles of partner adoption released with little to no fanfare. This assessments upgrade also concludes a multi-project shift to support Python 3, the core programming language for over half the platform.

TL;UseEmoji:

Engineering Lead: @Feanil Patel
Content & Partner Success Lead: @Corey Miller (Deactivated)
Partner Support Lead: @Jennifer A. Akana
Product Lead: Marco Morales

What is it?

  • Across the platform we depend heavily on the Python programming language: 55% of edx-platform is Python! We just completed the last milestone in an upgrade from Python 2 to Python 3, a major and not-backwards compatible breaking release of the Python programming language.

  • edX Codejail, the service that powers our sandboxed execution of instructor Python code was the last remaining part of the platform still running Python 2. After many months of tracking, and working with partners to provide resources and support for them to more easily upgrade and test their Python assessment code, we were able to upgrade our Codejail servers successfully.

  • In addition to the Python 3 upgrade, many other libraries used by Codejail had not been updated in 5 years, so we’ve also improved the platform health of this platform area as part of this effort.


Key talking points for customers:

Why work on this area of the platform?
A constant part of keeping our platform healthy involves major upgrades like this Python 3 upgrade. Our current efforts at this are proactive and seek to spread out these upgrades over time.

Who will notice the change, and where?
The upgrade is behind the scenes, and no learner or educator should notice the changes. Errors would be visible to learners and educators if the instructor’s python code wasn’t Python 3 compliant.

What impact will it have on course development teams?
Moving forward all additional python code assessed problems must be written to be Python 3 executable.

Results
The release went live with few issues, all of which were quickly identified and fixed within 30 minutes of release #FeanilFixesAll.

Credits / A Group Effort!

Thanks to @Feanil Patel, @Corey Miller (Deactivated) , and @Jennifer A. Akana for all their efforts on this front!

Thanks additionally to Partner Support + CPS team members who worked with our 75 partners to help coordinate these upgrades across the many courses that needed attention. Months of defining, driving, (and yes delaying) deadlines for this upgrade helped make this major upgrade a smooth one!