“python_requires” should be set with “>=3.6”, as horizon 21.0.0 is not compatible with all Python versions.

Bug #1960887 reported by pyvcechecker
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Akihiro Motoki

Bug Description

Currently, the keyword argument "python_requires" of "setup()" is not set, and thus it is assumed that this distribution is compatible with all Python versions.
However, I found it is not compatible with "Python <3.6". My local Python version is 3.5, and I encounter the following error when executing "pip install horizon"

------
Collecting horizon
  Downloading horizon-21.0.0-py3-none-any.whl (5.1 MB)
     |████████████████████████████████| 5.1 MB 465 kB/s
Collecting python-keystoneclient>=3.22.0
  Downloading python_keystoneclient-3.22.0-py2.py3-none-any.whl (397 kB)
     |████████████████████████████████| 397 kB 444 kB/s
Collecting oslo.upgradecheck>=0.1.1
  Downloading oslo.upgradecheck-0.4.0-py2.py3-none-any.whl (11 kB)
ERROR: Could not find a version that satisfies the requirement oslo.i18n>=5.0.1 (from horizon) (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.15.0, 3.15.1, 3.15.2, 3.15.3, 3.16.0, 3.17.0, 3.17.1, 3.17.2, 3.18.0, 3.19.0, 3.20.0, 3.21.0, 3.22.0, 3.22.1, 3.23.0, 3.23.1, 3.24.0, 3.25.0, 3.25.1)
ERROR: No matching distribution found for oslo.i18n>=5.0.1 (from horizon)
------

I found that horizon 21.0.0 depends on oslo.i18n>=5.0.1, but oslo.i18n>=5.0.1 requires Python>=3.6, which results in installation failure of horizon in Python 3.5.

Way to fix:
modify setup() in setup.py, add "python_requires" keyword argument:

---
setup(…
     python_requires=">=3.6"
     …)
---
Thanks for your attention.
Best regrads,
PyVCEchecker

Akihiro Motoki (amotoki)
Changed in horizon:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/829629

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/829629
Committed: https://opendev.org/openstack/horizon/commit/ee807825049a75e1dd99f8e7609390800cd4c263
Submitter: "Zuul (22348)"
Branch: master

commit ee807825049a75e1dd99f8e7609390800cd4c263
Author: Akihiro Motoki <email address hidden>
Date: Thu Feb 17 14:33:49 2022 +0900

    Drop py36 and py37 support

    Python runtimes for Zed are 3.8, 3.9 and optionally 3.10 [1][2],
    so tox envs in tox.ini are updated accordingly.

    Declare python_requires >=3.8 in setup.cfg
    python_requires are declared in many projects during dropping
    python 2.7 support. It is good to follow the convention and
    it also clarifies our python interpreter requirement.

    This commit also cleans up python2.7 related stuffs in setup.py.
    Both are related to the supported versions of python,
    so I made both changes in a single commit.

    [1] https://governance.openstack.org/tc/reference/runtimes/zed.html
    [2] https://opendev.org/openstack/openstack-zuul-jobs/src/commit/b740b42fb199d4d695391aaaddf46ca55eab79ac/zuul.d/project-templates.yaml#L542

    Change-Id: I4161816fd1fec19a3834cc7d994b3f761e1ab2ce
    Closes-Bug: #1960887

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 23.0.0

This issue was fixed in the openstack/horizon 23.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.