FS#68472 - [httpie] Missing runtime dependencies for 2.3.0: python-requests-toolbelt, python-pysocks

Attached to Project: Community Packages
Opened by gamezelda (gamezelda) - Friday, 30 October 2020, 02:39 GMT
Last edited by Morten Linderud (Foxboron) - Monday, 16 November 2020, 17:45 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

It appears that since the 2.3.0 update, httpie requires both the python-requests-toolbelt and the python-pysocks packages. If they are not installed, an error appears when running 'http', even with no arguments.

Additional info:
* package version(s): 2.3.0-1
* config and/or log files etc.: none
* link to upstream bug report, if any: Not an upstream bug, but you can check that those dependencies were newly introduced in httpie 2.3.0 here: https://github.com/httpie/httpie/blame/dc3687f7ac9a2b066fb53a64da2bbfaa47dd4c77/setup.py#L40

Steps to reproduce:

Install httpie in a machine without python-requests-toolbelt and/or python-pysocks and try to run 'http' without arguments. Log included below:

[root@tarch ~]# http
Traceback (most recent call last):
File "/usr/bin/http", line 33, in <module>
sys.exit(load_entry_point('httpie==2.3.0', 'console_scripts', 'http')())
File "/usr/lib/python3.8/site-packages/httpie/__main__.py", line 10, in main
from .core import main
File "/usr/lib/python3.8/site-packages/httpie/core.py", line 16, in <module>
from httpie.client import collect_messages
File "/usr/lib/python3.8/site-packages/httpie/client.py", line 15, in <module>
from httpie.plugins.registry import plugin_manager
File "/usr/lib/python3.8/site-packages/httpie/plugins/registry.py", line 1, in <module>
from httpie.plugins.manager import PluginManager
File "/usr/lib/python3.8/site-packages/httpie/plugins/manager.py", line 5, in <module>
from pkg_resources import iter_entry_points
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3239, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 567, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 884, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 770, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests-toolbelt>=0.9.1' distribution was not found and is required by httpie
[root@tarch ~]# pacman -S python-requests-toolbelt
resolving dependencies...
looking for conflicting packages...

Packages (1) python-requests-toolbelt-0.9.1-3

Total Installed Size: 0.38 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [#####################################################################################################] 100%
(1/1) checking package integrity [#####################################################################################################] 100%
(1/1) loading package files [#####################################################################################################] 100%
(1/1) checking for file conflicts [#####################################################################################################] 100%
(1/1) checking available disk space [#####################################################################################################] 100%
:: Processing package changes...
(1/1) installing python-requests-toolbelt [#####################################################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@tarch ~]# http
Traceback (most recent call last):
File "/usr/bin/http", line 33, in <module>
sys.exit(load_entry_point('httpie==2.3.0', 'console_scripts', 'http')())
File "/usr/lib/python3.8/site-packages/httpie/__main__.py", line 10, in main
from .core import main
File "/usr/lib/python3.8/site-packages/httpie/core.py", line 16, in <module>
from httpie.client import collect_messages
File "/usr/lib/python3.8/site-packages/httpie/client.py", line 15, in <module>
from httpie.plugins.registry import plugin_manager
File "/usr/lib/python3.8/site-packages/httpie/plugins/registry.py", line 1, in <module>
from httpie.plugins.manager import PluginManager
File "/usr/lib/python3.8/site-packages/httpie/plugins/manager.py", line 5, in <module>
from pkg_resources import iter_entry_points
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3239, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 567, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 884, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 770, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'PySocks!=1.5.7,>=1.5.6' distribution was not found and is required by requests
[root@tarch ~]# pacman -S python-pysocks
resolving dependencies...
looking for conflicting packages...

Packages (1) python-pysocks-1.7.1-1

Total Download Size: 0.03 MiB
Total Installed Size: 0.10 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
python-pysocks-1.7.1-1-any 27.5 KiB 743 KiB/s 00:00 [#####################################################################################################] 100%
(1/1) checking keys in keyring [#####################################################################################################] 100%
(1/1) checking package integrity [#####################################################################################################] 100%
(1/1) loading package files [#####################################################################################################] 100%
(1/1) checking for file conflicts [#####################################################################################################] 100%
(1/1) checking available disk space [#####################################################################################################] 100%
:: Processing package changes...
(1/1) installing python-pysocks [#####################################################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[root@tarch ~]# http
usage: http [--json] [--form] [--multipart] [--boundary BOUNDARY] [--compress] [--pretty {all,colors,format,none}] [--style STYLE] [--unsorted] [--sorted] [--format-options FORMAT_OPTIONS] [--print WHAT] [--headers] [--body] [--verbose] [--all] [--history-print WHAT]
[--stream] [--output FILE] [--download] [--continue] [--quiet] [--session SESSION_NAME_OR_PATH | --session-read-only SESSION_NAME_OR_PATH] [--auth USER[:PASS]] [--auth-type {basic,digest}] [--ignore-netrc] [--offline] [--proxy PROTOCOL:PROXY_URL] [--follow]
[--max-redirects MAX_REDIRECTS] [--max-headers MAX_HEADERS] [--timeout SECONDS] [--check-status] [--path-as-is] [--chunked] [--verify VERIFY] [--ssl {ssl2.3,tls1,tls1.1,tls1.2}] [--ciphers CIPHERS] [--cert CERT] [--cert-key CERT_KEY] [--ignore-stdin]
[--help] [--version] [--traceback] [--default-scheme DEFAULT_SCHEME] [--debug]
[METHOD] URL [REQUEST_ITEM [REQUEST_ITEM ...]]
http: error: the following arguments are required: URL
This task depends upon

Closed by  Morten Linderud (Foxboron)
Monday, 16 November 2020, 17:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.3.0-2

Loading...