Bug 1247973

Summary: httpie: ImportError: cannot import name is_windows
Product: [Fedora] Fedora EPEL Reporter: Pavel Alexeev <pahan>
Component: httpieAssignee: Rick Elrod <relrod>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: rbean, relrod, ville
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: httpie-0.9.3-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-17 01:56:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Alexeev 2015-07-29 11:13:21 UTC
Description of problem:
# rpm -ql httpie | grep /bin/
/usr/bin/http

# http
Traceback (most recent call last):
  File "/usr/bin/http", line 9, in <module>
    load_entry_point('httpie==0.8.0', 'console_scripts', 'http')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.7/site-packages/httpie/__main__.py", line 5, in <module>
    from .core import main
  File "/usr/lib/python2.7/site-packages/httpie/core.py", line 21, in <module>
    from .compat import str, is_py3
  File "/usr/lib/python2.7/site-packages/httpie/compat.py", line 6, in <module>
    from requests.compat import (
ImportError: cannot import name is_windows

Version-Release number of selected component (if applicable):
# rpm -q httpie
httpie-0.8.0-1.el7.noarch

How reproducible:
Always

Comment 1 Pavel Alexeev 2015-08-10 16:46:43 UTC
I think it is fixed upstream: https://github.com/jkbrzt/httpie/issues/314. Please update.

Comment 2 Pavel Alexeev 2015-08-10 16:55:14 UTC
0.9.2 works fine.

Comment 3 Rick Elrod 2015-08-10 18:21:38 UTC
0.9.2 depends on a fairly new version of python-requests that RHEL7 doesn't ship. However, httpie 0.8 (what I currently ship in EPEL7) depends on requests >= 2.0 but seems to work fine with 1.1, and I currently do this in the spec file: sed -i 's/requests>=2.0.0/requests>=1.1.0/' setup.py


So -- I wonder if we can do the same thing and fake the dependency for 0.9.2. I'll do a scratch build for now and see what happens. Would you be willing to test it out?

Comment 4 Rick Elrod 2015-08-11 01:47:12 UTC
Here's a scratch build, if you're able to test it out. http://koji.fedoraproject.org/koji/taskinfo?taskID=10663702

Comment 5 Rick Elrod 2015-08-11 01:50:09 UTC
Hm - looking closer, I am wrong. RHEL 7 ships a newer python-requests than I thought. Sorry! I'll submit this to epel 7 testing.

Comment 6 Pavel Alexeev 2015-09-08 12:15:17 UTC
Sorry fore the delay.

Unfortunately scratch built rpms soes not accessible anymore.

Comment 7 Pavel Alexeev 2015-12-07 20:30:30 UTC
Ricky do you plan post update?

Comment 8 Pavel Alexeev 2016-01-06 13:18:01 UTC
Ricky, do you have any problem with it? Could I help? I may update and build that package if you wishes.

I long time serve it from my repository http://rpm.hubbitus.info/epel7/httpie/ and do not found any problems on several servers.

Comment 9 Fedora Update System 2016-02-05 00:16:28 UTC
httpie-0.9.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-f8401c3784

Comment 10 Fedora Update System 2016-02-06 03:20:57 UTC
httpie-0.9.3-1.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-2016-f8401c3784

Comment 11 Fedora Update System 2016-02-17 01:56:27 UTC
httpie-0.9.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.