summaryrefslogtreecommitdiff
path: root/net-misc/httpie
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-17 04:08:35 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-17 04:08:35 +0100
commit43f85394ba834267589a4e6478ef419d40e22503 (patch)
treeb54082395e0e153c889b6dfe60d580a57992b3e8 /net-misc/httpie
parentc4507bfdfd706b2b1301972490fe88ac3ddbc70e (diff)
gentoo auto-resync : 17:05:2023 - 04:08:35
Diffstat (limited to 'net-misc/httpie')
-rw-r--r--net-misc/httpie/Manifest2
-rw-r--r--net-misc/httpie/files/httpie-urllib3-2-fixes.patch57
-rw-r--r--net-misc/httpie/httpie-3.2.1-r2.ebuild49
3 files changed, 108 insertions, 0 deletions
diff --git a/net-misc/httpie/Manifest b/net-misc/httpie/Manifest
index c5b181a8204a..ec5be45fcae5 100644
--- a/net-misc/httpie/Manifest
+++ b/net-misc/httpie/Manifest
@@ -1,3 +1,5 @@
+AUX httpie-urllib3-2-fixes.patch 1852 BLAKE2B 8298b18a64e0fc99f422d5c3260ca9b567de08f9cc7b0d2cb0c20ba675a717dd1e4cff03bc036beead71f58426153e2b040fea06e4383df768d004afdbd807e7 SHA512 c926450b4ef43274e0e70b51605ff020ccf82a0704d86814590cbe40db5ea1329ec357b7f630f860b09549f76a34211c3799956b67d8f2f0db51ad14c1ba53b9
DIST httpie-3.2.1.gh.tar.gz 1276550 BLAKE2B 627aa3db762e9e407f882be2c4267f5227301b189695537e7ac69ff140d6d39292251e131f9b9e7761e904a736d112bb4c1f5c6708c1468c6309474ee8c140b6 SHA512 ffcf6050138c49d5acb01f214d9b3fee6c78502c4c6dc45a295bafc88aafd1789f97a69c922f6e093fb48a402c1f83a7fff5307849130df81c4bcb2d595a03bf
EBUILD httpie-3.2.1-r1.ebuild 1199 BLAKE2B 168df41fb96877734b7511586c8d5866cacf4f9fef8f3d92137f17f7e9a4f93b6143e2afddbc5b91f85a9e242e47292af46b251374d534664889a20282ed4f23 SHA512 7d8cb946954088c30311c04c6d82a6f6a8f1a26a641c9b3c5f15c49e2099c0e1b514551cb7a7a1d24bfec9827e5d1be2aca0e59e47c099e48a35c973bad91c78
+EBUILD httpie-3.2.1-r2.ebuild 1257 BLAKE2B 6b1e2211e20d79e9bb4837071781b5c35abe2a24ea39d70231b23e1eb4c944095d96b00e683bfe965a6390e64167b6d3712d981cfbe2dc9893f5636c87b7fc62 SHA512 843c4649d4e5483f05b21ff87b3033e59cdfb8ff3b697664006bd092f5e2442b6260f8ed04c0b2c2de5302d91d03acfaa6b165040349f552c838159bfb9490d1
MISC metadata.xml 1018 BLAKE2B 590895c58cac7c3c12b1c605c7d9f6adaa35a88a5148bfae2f4ecbff8151996dfb58e4e8852d74e9a292e0b563cdf9b491fb5360a623e5b09db86ece421c43d2 SHA512 89503eeb43253c9237b1e1be0671f6dcfd50a1a7445aaea13bca4a832d4d2e6cb2c0c420d0803156a44b3a2a6ea4bc98531950067a7d73bd5555703a71c0a1fa
diff --git a/net-misc/httpie/files/httpie-urllib3-2-fixes.patch b/net-misc/httpie/files/httpie-urllib3-2-fixes.patch
new file mode 100644
index 000000000000..2c6c5d348171
--- /dev/null
+++ b/net-misc/httpie/files/httpie-urllib3-2-fixes.patch
@@ -0,0 +1,57 @@
+From f8bb34ebf97bf6a103a7d021b16059522d76d52d Mon Sep 17 00:00:00 2001
+From: Brendon Smith <bws@bws.bio>
+Date: Sat, 6 May 2023 16:24:26 -0400
+Subject: [PATCH] Fix `urllib3.util.ssl_.DEFAULT_CIPHERS` import
+
+---
+ httpie/cli/definition.py | 4 ++--
+ httpie/ssl_.py | 15 ++++++++++-----
+ 2 files changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/httpie/cli/definition.py b/httpie/cli/definition.py
+index 0e5f91edf7..5e54d1c896 100644
+--- a/httpie/cli/definition.py
++++ b/httpie/cli/definition.py
+@@ -831,8 +831,8 @@ def format_auth_help(auth_plugins_mapping, *, isolation_mode: bool = False):
+ short_help='A string in the OpenSSL cipher list format.',
+ help=f"""
+
+- A string in the OpenSSL cipher list format. By default, the following
+- is used:
++ A string in the OpenSSL cipher list format. By default, the available
++ system ciphers will be used, which are:
+
+ {DEFAULT_SSL_CIPHERS}
+
+diff --git a/httpie/ssl_.py b/httpie/ssl_.py
+index b9438543eb..c8dba0ea8d 100644
+--- a/httpie/ssl_.py
++++ b/httpie/ssl_.py
+@@ -3,13 +3,9 @@
+
+ from httpie.adapters import HTTPAdapter
+ # noinspection PyPackageRequirements
+-from urllib3.util.ssl_ import (
+- DEFAULT_CIPHERS, create_urllib3_context,
+- resolve_ssl_version,
+-)
++from urllib3.util.ssl_ import create_urllib3_context, resolve_ssl_version
+
+
+-DEFAULT_SSL_CIPHERS = DEFAULT_CIPHERS
+ SSL_VERSION_ARG_MAPPING = {
+ 'ssl2.3': 'PROTOCOL_SSLv23',
+ 'ssl3': 'PROTOCOL_SSLv3',
+@@ -94,3 +90,12 @@ def _is_key_file_encrypted(key_file):
+ return True
+
+ return False
++
++
++try:
++ from urllib3.util.ssl_ import DEFAULT_CIPHERS
++except ImportError:
++ _context = HTTPieHTTPSAdapter._create_ssl_context(verify=False)
++ DEFAULT_CIPHERS = ":".join([cipher["name"] for cipher in _context.get_ciphers()])
++
++DEFAULT_SSL_CIPHERS = DEFAULT_CIPHERS
diff --git a/net-misc/httpie/httpie-3.2.1-r2.ebuild b/net-misc/httpie/httpie-3.2.1-r2.ebuild
new file mode 100644
index 000000000000..c28c9e703420
--- /dev/null
+++ b/net-misc/httpie/httpie-3.2.1-r2.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE="ssl(+)"
+DISTUTILS_USE_PEP517=setuptools
+
+inherit bash-completion-r1 distutils-r1
+
+DESCRIPTION="Modern command line HTTP client"
+HOMEPAGE="https://httpie.io/ https://pypi.org/project/httpie/"
+SRC_URI="https://github.com/httpie/httpie/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ dev-python/charset_normalizer[${PYTHON_USEDEP}]
+ dev-python/defusedxml[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/multidict[${PYTHON_USEDEP}]
+ dev-python/rich[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.22.0[${PYTHON_USEDEP}]
+ >=dev-python/requests-toolbelt-0.9.1[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/pytest-httpbin[${PYTHON_USEDEP}]
+ dev-python/responses[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-urllib3-2-fixes.patch"
+)
+
+distutils_enable_tests pytest
+
+python_install_all() {
+ newbashcomp extras/httpie-completion.bash http
+ insinto /usr/share/fish/vendor_completions.d
+ newins extras/httpie-completion.fish http.fish
+ distutils-r1_python_install_all
+}