1 |
commit: 5c469f40fba70bc6b32a8d0dffcf97f2702534d0 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 18 18:12:29 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 18 19:43:51 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c469f40 |
7 |
|
8 |
dev-python/httpx: Remove old |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/httpx/Manifest | 1 - |
13 |
.../httpx/files/httpx-0.18.2-big-endian.patch | 40 -------------- |
14 |
dev-python/httpx/httpx-0.18.2.ebuild | 63 ---------------------- |
15 |
3 files changed, 104 deletions(-) |
16 |
|
17 |
diff --git a/dev-python/httpx/Manifest b/dev-python/httpx/Manifest |
18 |
index fb87c3c7508..eae53688531 100644 |
19 |
--- a/dev-python/httpx/Manifest |
20 |
+++ b/dev-python/httpx/Manifest |
21 |
@@ -1,2 +1 @@ |
22 |
-DIST httpx-0.18.2.tar.gz 1666756 BLAKE2B 3d1e25d503ae5306150c157bc83afdac9a475110d042e041b58de448a0dcfd75de3f4c15836b838dc799cd5f8b7e0d646e43bbe107ffad87d51ff016afe585cd SHA512 727974e5d5924fdd653987dd4f528d27bb2653085b01ef5efcdac39dc92ef2ed586f872c202349aa31105ad970cff914de4315c2d79338a6aa18bebb8126f392 |
23 |
DIST httpx-0.19.0.tar.gz 1667455 BLAKE2B b8d4cb0b6e7f643b62b507930ccf1534d73d93261cab9281ef57d6392f00da325e897d5339aebacfa07aeae8278d3a81b78d6501a1587ffeaef68cc5087bfdaa SHA512 3b327f07d62cf0430672d4f1a4f884618e588496f049522de327f5c34f7260eb21739b7f1fbd6f43a21962bc8737547f3eddbc22751546647f56c9cd7212840a |
24 |
|
25 |
diff --git a/dev-python/httpx/files/httpx-0.18.2-big-endian.patch b/dev-python/httpx/files/httpx-0.18.2-big-endian.patch |
26 |
deleted file mode 100644 |
27 |
index 794609d86a5..00000000000 |
28 |
--- a/dev-python/httpx/files/httpx-0.18.2-big-endian.patch |
29 |
+++ /dev/null |
30 |
@@ -1,40 +0,0 @@ |
31 |
-From 88a0a85ff795d8c23d5cd2cd113eeac957cc818a Mon Sep 17 00:00:00 2001 |
32 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
33 |
-Date: Thu, 5 Aug 2021 17:35:54 +0200 |
34 |
-Subject: [PATCH] Fix JSON wrong encoding tests on big endian platforms |
35 |
- |
36 |
-Fix test_json_without_specified_encoding_*_error tests on big endian |
37 |
-platforms. The tests wrongly assume that data encoded as "utf-32-be" |
38 |
-can not be decoded as "utf-32". This is true on little endian platforms |
39 |
-but on big endian platforms "utf-32" is equivalent to "utf-32-be". |
40 |
-To avoid the problem, explicitly decode as "utf-32-le", as this should |
41 |
-trigger the expected exception independently of platform's endianness. |
42 |
---- |
43 |
- tests/models/test_responses.py | 4 ++-- |
44 |
- 1 file changed, 2 insertions(+), 2 deletions(-) |
45 |
- |
46 |
-diff --git a/tests/models/test_responses.py b/tests/models/test_responses.py |
47 |
-index f1815dc..b7c2d57 100644 |
48 |
---- a/tests/models/test_responses.py |
49 |
-+++ b/tests/models/test_responses.py |
50 |
-@@ -735,7 +735,7 @@ def test_json_without_specified_encoding_decode_error(): |
51 |
- content = json.dumps(data).encode("utf-32-be") |
52 |
- headers = {"Content-Type": "application/json"} |
53 |
- # force incorrect guess from `guess_json_utf` to trigger error |
54 |
-- with mock.patch("httpx._models.guess_json_utf", return_value="utf-32"): |
55 |
-+ with mock.patch("httpx._models.guess_json_utf", return_value="utf-32-le"): |
56 |
- response = httpx.Response( |
57 |
- 200, |
58 |
- content=content, |
59 |
-@@ -750,7 +750,7 @@ def test_json_without_specified_encoding_value_error(): |
60 |
- content = json.dumps(data).encode("utf-32-be") |
61 |
- headers = {"Content-Type": "application/json"} |
62 |
- # force incorrect guess from `guess_json_utf` to trigger error |
63 |
-- with mock.patch("httpx._models.guess_json_utf", return_value="utf-32"): |
64 |
-+ with mock.patch("httpx._models.guess_json_utf", return_value="utf-32-le"): |
65 |
- response = httpx.Response(200, content=content, headers=headers) |
66 |
- with pytest.raises(json.decoder.JSONDecodeError): |
67 |
- response.json() |
68 |
--- |
69 |
-2.32.0 |
70 |
- |
71 |
|
72 |
diff --git a/dev-python/httpx/httpx-0.18.2.ebuild b/dev-python/httpx/httpx-0.18.2.ebuild |
73 |
deleted file mode 100644 |
74 |
index a91225037d5..00000000000 |
75 |
--- a/dev-python/httpx/httpx-0.18.2.ebuild |
76 |
+++ /dev/null |
77 |
@@ -1,63 +0,0 @@ |
78 |
-# Copyright 2021 Gentoo Authors |
79 |
-# Distributed under the terms of the GNU General Public License v2 |
80 |
- |
81 |
-EAPI=7 |
82 |
- |
83 |
-# Docs builder mkdocs not keyworded on all these arches yet |
84 |
-# DOCS_BUILDER="mkdocs" |
85 |
-# DOCS_DEPEND="dev-python/mkdocs-material" |
86 |
-# DOCS_AUTODOC=1 |
87 |
-PYTHON_COMPAT=( python3_{8..10} ) |
88 |
- |
89 |
-inherit distutils-r1 # docs |
90 |
- |
91 |
-DESCRIPTION="Fully-featured HTTP client which provides sync and async APIs" |
92 |
-HOMEPAGE="https://www.python-httpx.org/" |
93 |
-SRC_URI="https://github.com/encode/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
94 |
- |
95 |
-LICENSE="BSD" |
96 |
-SLOT="0" |
97 |
-KEYWORDS="amd64 arm arm64 ppc ppc64 sparc x86" |
98 |
- |
99 |
-RDEPEND=" |
100 |
- dev-python/certifi[${PYTHON_USEDEP}] |
101 |
- dev-python/sniffio[${PYTHON_USEDEP}] |
102 |
- =dev-python/httpcore-0.13*[${PYTHON_USEDEP}] |
103 |
- >=dev-python/rfc3986-1.3[${PYTHON_USEDEP}] |
104 |
- <dev-python/rfc3986-2[${PYTHON_USEDEP}] |
105 |
-" |
106 |
-BDEPEND=" |
107 |
- test? ( |
108 |
- dev-python/brotlicffi[${PYTHON_USEDEP}] |
109 |
- dev-python/cryptography[${PYTHON_USEDEP}] |
110 |
- dev-python/hyper-h2[${PYTHON_USEDEP}] |
111 |
- dev-python/pytest-asyncio[${PYTHON_USEDEP}] |
112 |
- dev-python/trustme[${PYTHON_USEDEP}] |
113 |
- dev-python/typing-extensions[${PYTHON_USEDEP}] |
114 |
- dev-python/uvicorn[${PYTHON_USEDEP}] |
115 |
- ) |
116 |
-" |
117 |
- |
118 |
-distutils_enable_tests pytest |
119 |
- |
120 |
-PATCHES=( |
121 |
- # https://github.com/encode/httpx/pull/1781 |
122 |
- "${FILESDIR}"/${P}-big-endian.patch |
123 |
-) |
124 |
- |
125 |
-python_prepare_all() { |
126 |
- # trio is not currently in the tree |
127 |
- sed -i '/^import trio/d' tests/concurrency.py || die |
128 |
- sed -i '/pytest.param("trio", marks=pytest.mark.trio)/d' tests/conftest.py || die |
129 |
- distutils-r1_python_prepare_all |
130 |
-} |
131 |
- |
132 |
-python_test() { |
133 |
- local deselect=( |
134 |
- # Internet |
135 |
- tests/client/test_proxies.py::test_async_proxy_close |
136 |
- tests/client/test_proxies.py::test_sync_proxy_close |
137 |
- ) |
138 |
- |
139 |
- epytest ${deselect[@]/#/--deselect } |
140 |
-} |