Bug #56945

python: upgrade to 3.8 and/or 3.9

Added by Ernesto Puerta 4 months ago. Updated 4 months ago.

Target version:
% Done:


2 - major
Affected Versions:
Pull request ID:
Crash signature (v1):
Crash signature (v2):


Python release lifecycle usually spans for 5 years. Python 3.6 was launched in Dec 2016 and was deprecated by Dec 2021. However 2 active Ceph releases are still based on that Python version (Pacific and Quincy). Ideally the Python interpreter version should be picked to couple with the Ceph release, meaning that:
  • Pacific (2021 March-2023 Jun) should have been released with Python 3.8 (2019 Oct-2024 Oct) or Python 3.9 (2020 Oct-2025 Oct)
  • Quincy (2022 Apr-2024 Jun) should have been released with Python 3.10 (2021 Oct-2026 Oct)
Impediments to the above approach:
  • Ceph commits to support distros that don't follow the above cadence (e.g.: default CentOS 8 default Python is 3.6). However, in many cases these same distro provide newer versions via extra/non-official sources (EPEL, PPAs etc).
  • While many supported distros support newer Python versions via extra packages, RPM-based distros (Fedora, CentOS, OpenSUSE, SEL) also require specific packages for each Python version (e.g.: python3-cherrypy in CentOS EPEL is for 3.6, so another python38-cherrypy package will be required for 3.8). Debian-like distros can share Python-only packages across multiple Python versions
Distro Release Lifecycle Python 3.6 Python 3.7 Python 3.8 Python 3.9 Python 3.10
CentOS Stream 8 x (default) x x
CentOS Stream 9 x (default)
Ubuntu 20.04 x (default) x x
Ubuntu 22.04 x (default)
OpenSUSE Leap 15.2 EoL (2021-12) x (default)
OpenSUSE Leap 15.3 2022-12 x (default) x
OpenSUSE Leap 15.4 2023-12 x (default) x x
Debian 10 x (default)
Debian 11 x (default)
With the above table in main, if we move to Python 3.9:
  • For Reef (main), we could still support:
    • CentOS Stream 9,
    • Ubuntu 20.04 (Surprisingly, Ubuntu 22.04 doesn't support Py3.9),
    • OpenSUSE Leap 15.4
    • Debian 11
  • For Quincy, if we increase Python version to 3.9, we could maintain the currently supported distros:
    • CentOS Stream 8,
    • Ubuntu 20.04,
    • OpenSUSE Leap 15.3,
    • Debian 11
  • For Pacific: let's not make any changes (support for Debian 10 and OpenSUSE Leap 15.2 makes it complicate to upgrade).

And additional proposal would be to get rid of external (distro-packaged) deps and:
  • Embed Python code in the repo (via git submodules or subtrees),
  • Install at build time via pip (this is the way that Dashboard works for Front-end packages)

This would also require modifying the method PyModule::load in the file src/mgr/ to look for packages into the local directory (via sys.path): <mgr_module_path>/site-packages/ (or similar).

Related issues

Duplicated by Ceph - Cleanup #51319: deps: upgrade to Python 3.8 Duplicate


#1 Updated by Ernesto Puerta 4 months ago

  • Description updated (diff)

#2 Updated by Ernesto Puerta 4 months ago

  • Description updated (diff)

#3 Updated by Ernesto Puerta 4 months ago

  • Subject changed from python: upgrade to 3.8 and 3.10 to python: upgrade to 3.8 and/or 3.9
  • Description updated (diff)
  • Priority changed from Normal to High
  • Severity changed from 3 - minor to 2 - major

#4 Updated by Ernesto Puerta 4 months ago

#5 Updated by Ernesto Puerta 4 months ago

  • Pull request ID set to 41979

Also available in: Atom PDF