ImportError: cannot import name 'Feature'

Bug #1866961 reported by Marcin Juszkiewicz
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Unassigned
devstack
Invalid
Critical
Unassigned
kolla
Fix Released
Critical
Unassigned
Train
Fix Committed
Critical
Unassigned
Ussuri
Fix Released
Critical
Unassigned

Bug Description

One of Horizon's requirements is pyscss package. Which had last release over 4 years ago...

Two days ago setuptools v46 got released. One of changes was drop of Features feature.

Now Kolla builds fail:

INFO:kolla.common.utils.horizon:Collecting pyScss===1.3.4
INFO:kolla.common.utils.horizon: Downloading http://mirror.ord.rax.opendev.org:8080/pypifiles/packages/1d/4a/221ae7561c8f51c4f28b2b172366ccd0820b14bb947350df82428dfce381/pyScss-1.3.4.tar.gz (120 kB)
INFO:kolla.common.utils.horizon: ERROR: Command errored out with exit status 1:
INFO:kolla.common.utils.horizon: command: /var/lib/kolla/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rr0db3qs/pyScss/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rr0db3qs/pyScss/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-rr0db3qs/pyScss/pip-egg-info
INFO:kolla.common.utils.horizon: cwd: /tmp/pip-install-rr0db3qs/pyScss/
INFO:kolla.common.utils.horizon: Complete output (5 lines):
INFO:kolla.common.utils.horizon: Traceback (most recent call last):
INFO:kolla.common.utils.horizon: File "<string>", line 1, in <module>
INFO:kolla.common.utils.horizon: File "/tmp/pip-install-rr0db3qs/pyScss/setup.py", line 9, in <module>
INFO:kolla.common.utils.horizon: from setuptools import setup, Extension, Feature
INFO:kolla.common.utils.horizon: ImportError: cannot import name 'Feature'

Devstack also has the same problem.

Are there any plans to fix it?

pyscss project got issue: https://github.com/Kronuz/pyScss/issues/385

What are plans of Horizon team?

Changed in horizon:
status: New → Confirmed
Marcin Juszkiewicz (hrw)
Changed in kolla:
status: New → Confirmed
Changed in devstack:
status: New → Triaged
Changed in kolla:
status: Confirmed → Triaged
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

https://review.opendev.org/711930 workarounds the problem by blocking setuptools 46.0.0 from being installed.

Will hurt anyway on any newer setuptools version so it needs to be fixed in horizon.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

devstack master is safe because of gr removal of bad setuptools here: https://review.opendev.org/711930

other py3-enabled branches are still affected (as commented on change)

Changed in devstack:
importance: Undecided → Critical
Changed in kolla:
importance: Undecided → Critical
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Problem still present in Kolla as setuptools 46 is installed by virtualenv.

Will look at options.

Changed in kolla:
milestone: none → 10.0.0
Revision history for this message
lina He (linahe) wrote :

Hi,

I failed to install a stable/stein horizon on ubuntu because of this bug. I saw some patchsets merged to ussuri and train to solve this issue. I would like to know whether there is a plan to fix this issue for stein and other versions.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Ussuri got it fixed with PyScss 1.3.6 release (and later update to 1.3.7).

Train, Stein are in progress.

Revision history for this message
lina He (linahe) wrote :

Thanks for your quick reply.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

AFAICT this doesn't affect devstack directly, please add steps to reproduce if the issue still exists.

Changed in devstack:
status: Triaged → Invalid
Revision history for this message
Akihiro Motoki (amotoki) wrote :

horizon has fixed the issue but unfortunately the fixes are not linked with it. I am summarizing the fixes.
Multiple fixes are involved in the master branch (i.e. ussuri), so fixes in the stable/train branch would be better for the summary.

The related fixes in stable/train are as follows:
- 9813577f7d0137da0e29c7630cffc3e1e1b329f5 (Update pyScss to 1.3.7)
- f26c88721614d1c25bcd26740b8fb20a7a97bd05 (Implement 'selector-append' sass function) which fixes an problem in the material design with pyScss 1.3.5 or later.

They were backported to stable/stein too.

Regarding stable/rocky or older branches, we don't backport them from the following reasons:
- The CI jobs are not broken as they use setuptools<46.
- It is better to avoid requirements change as much as possible.
- stable/rocky and older branches are in the extended maintenance phase so the upstream development team does not focus on them much.

Changed in horizon:
importance: Undecided → Critical
status: Confirmed → Fix Released
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.