Description of problem: pyramid expects webob.cookies to have CookieProfile, but it doesn't. Version-Release number of selected component (if applicable): python-pyramid-1.5.6-2.el7.noarch How reproducible: Every time. Steps to Reproduce: 1. $ python -c "from pyramid.authentication import AuthTktAuthenticationPolicy" Actual results: $ 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 Expected results: Pyramid should not traceback when any of its modules are imported. Additional info: 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[0]. 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[1]. [0] https://github.com/Pylons/pyramid/blob/1.5.6/setup.py#L42 [1] http://pkgs.fedoraproject.org/cgit/rpms/python-pyramid.git/commit/?h=epel7&id=029cdd580308f99be27c6717a3b3e2e63b27ab5d
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.
Hey Ralph! I stole your code and made an update to the spec file to do the same thing for the __init__.py: http://pkgs.fedoraproject.org/cgit/rpms/python-pyramid.git/commit/?h=epel7&id=ad85d2f0be1a584c6cd772fd011a268d9b960564 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.