Description of problem:
pyramid expects webob.cookies to have CookieProfile, but it doesn't.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. $ python -c "from pyramid.authentication import AuthTktAuthenticationPolicy"
$ python -c "from pyramid.authentication import AuthTktAuthenticationPolicy"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/pyramid/authentication.py", line 13, in <module>
from webob.cookies import CookieProfile
ImportError: cannot import name CookieProfile
Pyramid should not traceback when any of its modules are imported.
This is blocking Bodhi 2.4.0 from building in EL 7.
It seems that EPEL 7 has python-webob-1.2, and python-webob1.4-1.4.1. The former seems to be what is getting imported by python-pyramid, and is too old. python-pyramid-1.5.6 requires webob >= 1.3.1.
I see that there's a commit on python-pyramid to coerce it to use a newer WebOb, but it seems to me that it might not be working properly.
I am not familiar with this technique used in pyramid's setup.py, but I was able to add that same code to pyramid's main __init__.py to get it to work. I think that might be a viable solution to this problem.
Yeah, that `__requires__ = [\"WebOb>=1.3.1\"]; import pkg_resources` trick is the ugly, but recommended way to employ forward-compat packages on EPEL7.
Historically, we usually put that line in our wsgi file: the first thing to run during app start up.
I stole your code and made an update to the spec file to do the same thing for the __init__.py:
When I try my import example at the beginning of this bug report, this seems to do the trick! I think this will get Bodhi building again. I noticed that Bodhi also has this trick employed in a few places (like the wsgi you mentioned, and in a few scripts).
python-pyramid-1.5.6-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-8be4fca016
python-pyramid-1.5.6-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-8be4fca016
python-pyramid-1.5.6-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.