diff options
author | Louis Sautier <sbraz@gentoo.org> | 2021-02-23 18:12:55 +0100 |
---|---|---|
committer | Louis Sautier <sbraz@gentoo.org> | 2021-02-24 01:04:55 +0100 |
commit | 2070b7a4935339213b16d8200b64af925cdf120d (patch) | |
tree | d89335cc49c6eee41ec9cef4473db1964d88fd43 /dev-python/uvicorn | |
parent | dev-python/httpx: new package, version 0.16.1 (diff) | |
download | gentoo-2070b7a4935339213b16d8200b64af925cdf120d.tar.gz gentoo-2070b7a4935339213b16d8200b64af925cdf120d.tar.bz2 gentoo-2070b7a4935339213b16d8200b64af925cdf120d.zip |
dev-python/uvicorn: new package, version 0.13.4
Indirect dependency of dev-python/denonavr.
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python/uvicorn')
-rw-r--r-- | dev-python/uvicorn/Manifest | 1 | ||||
-rw-r--r-- | dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch | 31 | ||||
-rw-r--r-- | dev-python/uvicorn/metadata.xml | 13 | ||||
-rw-r--r-- | dev-python/uvicorn/uvicorn-0.13.4.ebuild | 50 |
4 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/uvicorn/Manifest b/dev-python/uvicorn/Manifest new file mode 100644 index 000000000000..ee9b0e8f29cd --- /dev/null +++ b/dev-python/uvicorn/Manifest @@ -0,0 +1 @@ +DIST uvicorn-0.13.4.tar.gz 505858 BLAKE2B 486436c0b4c717741c11b7da6a979dc9fe977baa2dbc3e2538ce28551d2dee593076b670b16c099056165624c149f96974f64d2847e38234122ec93b65b31cda SHA512 5332494e0b43b4e87f9d6742be679527b1ec2bc4d2e061768594d44b1fd1d6961a2bd1fa23469fca6c530ef36d6123e453306c2bb664cb27b0cd6145b9a70fd7 diff --git a/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch b/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch new file mode 100644 index 000000000000..da3038d6db40 --- /dev/null +++ b/dev-python/uvicorn/files/uvicorn-0.13.4-fix-wsproto-1.0.patch @@ -0,0 +1,31 @@ +https://github.com/encode/uvicorn/pull/892 + +diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py +index f35a965d..25110fc6 100644 +--- a/tests/protocols/test_http.py ++++ b/tests/protocols/test_http.py +@@ -67,6 +67,7 @@ + b"Host: example.org", + b"Connection: upgrade", + b"Upgrade: websocket", ++ b"Sec-WebSocket-Version: 11", + b"", + b"", + ] +diff --git a/tests/protocols/test_websocket.py b/tests/protocols/test_websocket.py +index 24bc285f..7c3fcc08 100644 +--- a/tests/protocols/test_websocket.py ++++ b/tests/protocols/test_websocket.py +@@ -51,7 +51,11 @@ def app(scope): + async with httpx.AsyncClient() as client: + response = await client.get( + "http://127.0.0.1:8000", +- headers={"upgrade": "websocket", "connection": "upgrade"}, ++ headers={ ++ "upgrade": "websocket", ++ "connection": "upgrade", ++ "sec-webSocket-version": "11", ++ }, + timeout=5, + ) + if response.status_code == 426: diff --git a/dev-python/uvicorn/metadata.xml b/dev-python/uvicorn/metadata.xml new file mode 100644 index 000000000000..1454d51b226a --- /dev/null +++ b/dev-python/uvicorn/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <upstream> + <remote-id type="pypi">uvicorn</remote-id> + <remote-id type="github">encode/uvicorn</remote-id> + <bugs-to>https://github.com/encode/uvicorn/issues</bugs-to> + </upstream> +</pkgmetadata> diff --git a/dev-python/uvicorn/uvicorn-0.13.4.ebuild b/dev-python/uvicorn/uvicorn-0.13.4.ebuild new file mode 100644 index 000000000000..afae4f633023 --- /dev/null +++ b/dev-python/uvicorn/uvicorn-0.13.4.ebuild @@ -0,0 +1,50 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +# entry points are used +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit distutils-r1 + +DESCRIPTION="Lightning-fast ASGI server implementation" +HOMEPAGE="https://www.uvicorn.org/" +SRC_URI="https://github.com/encode/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + =dev-python/click-7*[${PYTHON_USEDEP}] + >=dev-python/h11-0.8[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/typing-extensions[${PYTHON_USEDEP}]' python3_7) +" +BDEPEND=" + test? ( + dev-python/cryptography[${PYTHON_USEDEP}] + dev-python/httpx[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + dev-python/pytest-mock[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/trustme[${PYTHON_USEDEP}] + dev-python/websockets[${PYTHON_USEDEP}] + dev-python/wsproto[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/${P}-fix-wsproto-1.0.patch" +) + +distutils_enable_tests pytest + +python_prepare_all() { + # watchgod is not in the tree + sed -e '/^from uvicorn.supervisors.watchgodreload/d' \ + -e 's/, WatchGodReload//' \ + -i tests/supervisors/test_reload.py + distutils-r1_python_prepare_all +} |