Accepting request 993275 from home:bnavigator:setuptools63

- Drop transfer-encoding-lower-case.patch
  The headers are lowercase again with uvicorn 0.18

OBS-URL: https://build.opensuse.org/request/show/993275
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httpx?expand=0&rev=12
This commit is contained in:
Matej Cepl 2022-08-05 10:43:23 +00:00 committed by Git OBS Bridge
parent 4059d2647e
commit 0d51b60ee9
3 changed files with 8 additions and 89 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 5 10:25:32 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Drop transfer-encoding-lower-case.patch
The headers are lowercase again with uvicorn 0.18
-------------------------------------------------------------------
Fri Aug 5 08:30:50 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@ -32,10 +32,6 @@ Summary: Python HTTP client with async support
License: BSD-3-Clause
URL: https://github.com/encode/httpx
Source: https://github.com/encode/httpx/archive/%{version}.tar.gz#/httpx-%{version}.tar.gz
# PATCH-FIX-UPSTREAM transfer-encoding-lower-case.patch mcepl@suse.com
# Reported upstream as gh#encode/httpx!2332
# name of HTTP headers are lower-case
Patch0: transfer-encoding-lower-case.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@ -67,7 +63,8 @@ BuildRequires: %{python_module pytest}
BuildRequires: %{python_module rich >= 10}
BuildRequires: %{python_module trio}
BuildRequires: %{python_module trustme}
BuildRequires: %{python_module uvicorn}
# uvicorn 0.18 fixed an issue in the test suite where http-headers wer not all lowercase as expected
BuildRequires: %{python_module uvicorn >= 0.18}
%endif
# /SECTION
%python_subpackages

View File

@ -1,84 +0,0 @@
---
tests/test_main.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -29,7 +29,7 @@ def test_get(server):
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: text/plain",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
"Hello, world!",
]
@@ -44,7 +44,7 @@ def test_json(server):
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: application/json",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
"{",
'"Hello": "world!"',
@@ -62,7 +62,7 @@ def test_binary(server):
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: application/octet-stream",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
f"<{len(content)} bytes of binary data>",
]
@@ -77,7 +77,7 @@ def test_redirects(server):
"HTTP/1.1 301 Moved Permanently",
"server: uvicorn",
"location: /",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
]
@@ -91,12 +91,12 @@ def test_follow_redirects(server):
"HTTP/1.1 301 Moved Permanently",
"server: uvicorn",
"location: /",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: text/plain",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
"Hello, world!",
]
@@ -111,7 +111,7 @@ def test_post(server):
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: text/plain",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
'{"hello": "world"}',
]
@@ -135,7 +135,7 @@ def test_verbose(server):
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: text/plain",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
"Hello, world!",
]
@@ -161,7 +161,7 @@ def test_auth(server):
"HTTP/1.1 200 OK",
"server: uvicorn",
"content-type: text/plain",
- "Transfer-Encoding: chunked",
+ "transfer-encoding: chunked",
"",
"Hello, world!",
]