rpm-software-management / spec-cleaner

spec-cleaner
BSD 3-Clause "New" or "Revised" License
28 stars 34 forks source link

Cannot install 1.1.0 #237

Closed prometheanfire closed 6 years ago

prometheanfire commented 6 years ago

https://github.com/openSUSE/spec-cleaner/blob/d7e49579e7c523340ef4944d84dcd0890b4e8e6f/spec_cleaner/rpmpreamble.py#L5

It's called during setup via the following.

2018-07-03 04:24:37.456998 | primary | Collecting spec-cleaner!=0.9.3,>=0.8.2 (from -r /opt/stack/new/requirements/global-requirements.txt (line 413))
2018-07-03 04:24:38.017423 | primary |   Downloading http://mirror.mtl01.inap.openstack.org/pypi/packages/81/95/129d8eaed80d2ae6892a3d9b1e6f2abc833c0a7f9cc5be89882aed7ffc29/spec_cleaner-1.1.0.tar.gz (495kB)
2018-07-03 04:24:38.361448 | primary |     Complete output from command python setup.py egg_info:
2018-07-03 04:24:38.361967 | primary |     Traceback (most recent call last):
2018-07-03 04:24:38.362087 | primary |       File "<string>", line 1, in <module>
2018-07-03 04:24:38.362255 | primary |       File "/tmp/pip-install-L5Km70/spec-cleaner/setup.py", line 7, in <module>
2018-07-03 04:24:38.362436 | primary |         from spec_cleaner import __version__
2018-07-03 04:24:38.362557 | primary |       File "spec_cleaner/__init__.py", line 13, in <module>
2018-07-03 04:24:38.362650 | primary |         from .rpmcleaner import RpmSpecCleaner
2018-07-03 04:24:38.362764 | primary |       File "spec_cleaner/rpmcleaner.py", line 16, in <module>
2018-07-03 04:24:38.362853 | primary |         from .rpmpreamble import RpmPreamble
2018-07-03 04:24:38.362967 | primary |       File "spec_cleaner/rpmpreamble.py", line 5, in <module>
2018-07-03 04:24:38.363061 | primary |         from urllib import parse
2018-07-03 04:24:38.363152 | primary |     ImportError: cannot import name parse
scarabeusiv commented 6 years ago

I dropped py2 support for easier unicode support at: https://github.com/openSUSE/spec-cleaner/commit/1252176826d2fda4365b881149a45425a4b420aa

I guess you are installing it in python2 right?

prometheanfire commented 6 years ago

ya, looks like it

prometheanfire commented 6 years ago

so, looks like devstack (openstack) is installing spec-cleaner unconstrained in python2, which is wrong. we could change the requirement to the following though.

-spec-cleaner>=0.8.2,!=0.9.3  # BSD
+spec-cleaner>=0.8.2,!=0.9.3,<1.0.9;python_version<'3.0'  # BSD
+spec-cleaner>=0.8.2,!=0.9.3;python_version>='3.0'  # BSD
scarabeusiv commented 6 years ago

If you guys can do that, it would be lovely, alternatively I would have to revert the py2 drop...

prometheanfire commented 6 years ago

I think it's within policy because of the type of breakage it is.

https://docs.openstack.org/project-team-guide/dependency-management.html#global-requirements

https://review.openstack.org/579936

prometheanfire commented 6 years ago

we simply backported the removal of the requirement. closing this, thanks for the quick response