From Fedora Project Wiki

< Changes

Revision as of 14:04, 12 December 2017 by Churchyard (talk | contribs) (No python3-django1.11)


Django 2.0

Summary

This change is about upgrading Package-x-generic-16.pngpython-django to version 2.0. The latest Django release drops support for Python 2, but a few Django apps packaged in Fedora do not yet support Python 3. A compatibility package will be provided for those.

Owner

Current status

  • Targeted release: Fedora 28
  • Last updated: 2017-12-12
  • Tracker bug: <will be assigned by the Wrangler>

Detailed Description

The latest Django release 2.0 finally drops support for Python 2.7. Not all dependent applications in Fedora can keep up with Djangos pace. This change describes a way how to enable both, keeping 2.7 compatibility and also leveraging the latest version.

The Package-x-generic-16.pngpython-django package will be updated to 2.0, Python 2 subpackage(s) will be removed. A new compatibility Package-x-generic-16.pngpython2-django1.11 package will be created with Python 2 version of Django 1.11. The Django 1.11.x series is the last to support Python 2.7, it also has Long Term Support (supported until April 2020 by upstream). See the Django 2.0 release notes for details about Django compatibility with various Python versions.

The new Package-x-generic-16.pngpython2-django1.11 package will obsolete python2-django < 2 and python-django < 2, but it will deliberately not provide either of those. This will render packages depending on python(2)-django FTBFS (or broken runtime dependencies if tehy don't require Django at buildtime). This is intentional. If we don't do that, all Django packages in Fedora will just keep dragging the Legacy Python dependency chain forever. Package owners of Django applications requiring Python 2 will need to manually adjust their dependencies to use Package-x-generic-16.pngpython2-django1.11 or move to Python 3 only (this is preferred but not always possible). Package owners of Django libraries will need to coordinate this with package owners of the applications. The rule of thumb is: If the library is not required by an application (packaged in Fedora) that uses Legacy Python, remove the Python 2 subpackage (or retire the package, if it cannot support Python 3).

Most of the Django packages in Fedora are already Python 3 compatible.

Benefit to Fedora

Fedora will be able to provide both: latest and current release of Django and also a fallback for applications, which do not support Python 3 yet.

This will also remove some Legacy packages nobody is actively taking care of.


Scope

  • Django libraries owners: Either drop Python 2 subpackages (eventually retire the package if no subpackages are left) or use Package-x-generic-16.pngpython2-django1.11 as a dependency for the python 2 subpackages iff those are needed by apps. When removing subpackages, add proper Obosletes tags to their Python 3 counterparts. When orphaning entire packages, add Obosletes to the Package-x-generic-16.pngpython3-django package.
  • Policies and guidelines:
    • Python packaging guidelines
    • Documentation should be provided
  • Trademark approval: N/A (not needed for this Change)


List of packages requiring Package-x-generic-16.pngpython2-django/ Package-x-generic-16.pngpython-django without having django in their name:

Upgrade/compatibility impact

The obsoletes added to Package-x-generic-16.pngpython2-django1.11 and others should make the upgrade work seamlessly.

How To Test

You should be able to install two web-apps, one requiring Package-x-generic-16.pngpython2-django1.11 and one requiring Package-x-generic-16.pngpython3-django. (TODO: provide actual package names)

  1. dnf install (package 1)
  2. see python2-django1.11 is installed as dependency
  3. run that package
  4. dnf install (package 2)
  5. verify python3-django is installed as dependency
  6. package 1 still works
  7. package 2 works as well
  8. dnf remove package 1
  9. package 2 still works

User Experience

Users using RPM installed Django to develop Django apps might be affected by this change. We shall recommend either using venvs or using Python 3. See The developer portal, we are already recommending both.

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) Add python2-django and python-django virtual provides to Package-x-generic-16.pngpython2-django1.11.
  • Contingency deadline: beta freeze
  • Blocks release? No
  • Blocks product? No

Documentation

TBD

Release Notes

TBD