diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-16 18:25:06 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-16 18:25:06 +0000 |
commit | 7972abc05090180dcc09d2b16af4020ce1cd1841 (patch) | |
tree | 3e6e1c7ca86ab7d4e8dc45009f67403fc489ade9 /dev-python/trio-websocket | |
parent | e4ad5901ca8464ae513bd315a1c0349c2bd0986c (diff) |
gentoo auto-resync : 16:03:2023 - 18:25:06
Diffstat (limited to 'dev-python/trio-websocket')
-rw-r--r-- | dev-python/trio-websocket/Manifest | 3 | ||||
-rw-r--r-- | dev-python/trio-websocket/files/trio-websocket-0.9.2-async-gen.patch | 79 | ||||
-rw-r--r-- | dev-python/trio-websocket/trio-websocket-0.9.2.ebuild | 47 |
3 files changed, 0 insertions, 129 deletions
diff --git a/dev-python/trio-websocket/Manifest b/dev-python/trio-websocket/Manifest index b09f2b3f9d00..cb5abe8b5958 100644 --- a/dev-python/trio-websocket/Manifest +++ b/dev-python/trio-websocket/Manifest @@ -1,6 +1,3 @@ -AUX trio-websocket-0.9.2-async-gen.patch 2466 BLAKE2B f86007cd76395954fb7691a94814509d2871ef7a637b93b40f5b8b275f42ddf496d8012f35756693ed88de38ab29d06690e2a9a8e6f99e00acf2c156734c7a53 SHA512 b3d20d131b4c036b12b725ad732bf87d3aafade16cefe6e55083267afc916a026d15f3976bb7da56124d6995541c27a0d87283d1154aee029ce32914aee5fc20 DIST trio-websocket-0.10.0.gh.tar.gz 43808 BLAKE2B fd89ab74c3844a14940ce07a0abc07a0392607b492fa4b6e1d81ba3aa2c37338706975cb800332751c9ea70e934c4169fdcd29dd047019096726164a2130daa9 SHA512 04d775a7c1a232b470a7f415b57debce4bd1c3732934a94d65e3c9f3bb45c5ffea7464557100e2e9f68a2aa6a7812bd686220de046f399a0d0242309d2d9be59 -DIST trio-websocket-0.9.2.gh.tar.gz 43146 BLAKE2B f5463d20253c3686a0d0fe4cb38ffec235c4378c14ed2952b3518486602b06bb961291d098542a52dee7e25506713df382e303cd2dc7fa579041124d66c8ecb8 SHA512 0f25a7d234a6d9f7c0c0bdbbd2836e6baee02b4ff2daab8354f8fd483a10de65fe357a273675a172227b1b0e9f7cf6cf27ddfdf9426d1b330122a8b2ef957435 EBUILD trio-websocket-0.10.0.ebuild 916 BLAKE2B be70dc19a783ace1115dc1454559b8fa52d209e322a2f77c94d811d46586ba9aabc8ff048990983cee263b7f5d7431a956229dc674666596706f96bc02849a41 SHA512 f195846a849d9041fa32e67dda0f073aa32efac97a28855e9dd9ff2dbc7b965ce20800694db2a457246a19dadad28f0d2683c518348937907ca0b3926d79a96e -EBUILD trio-websocket-0.9.2.ebuild 1047 BLAKE2B f9d90d01e706a91b75a24a3c525a288c756cfca0c0a171d4f734fccf15ae0bfe3145db5bf6438ecfd02ce243badee2679639f3d1708ddd86c5e0c92675d42ffc SHA512 d12d934b5f2a1faef4e0cd5f7ac18a07dc8698ed9733eb9d49b126c4b6d0ae6318a442f746aa780b9503262260d2330dd393207e8c87323668b2472a8a21be88 MISC metadata.xml 409 BLAKE2B 68c9d1ab2984909315d2ec3f91f2703cc0941911fb049c35614c2cdc935e55f0f2440f6624aab4838f0d7d07e3e5717d19c7138660e82f8a3cb237e610a974e1 SHA512 c9d5e6f956b40d03d0a062ded846c507e783c55404a76b75141004df7d43e6a8bf5810480b4286a6bdf2d48c30aad51261e48581abb8799c107b924cd8131170 diff --git a/dev-python/trio-websocket/files/trio-websocket-0.9.2-async-gen.patch b/dev-python/trio-websocket/files/trio-websocket-0.9.2-async-gen.patch deleted file mode 100644 index 7631e2118678..000000000000 --- a/dev-python/trio-websocket/files/trio-websocket-0.9.2-async-gen.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 37388d8122960f6aec707a9aa30a310bdc67610a Mon Sep 17 00:00:00 2001 -From: John Belmonte <john@neggie.net> -Date: Sat, 21 Nov 2020 15:38:54 +0900 -Subject: [PATCH] use native async generator support - ---- - tests/test_connection.py | 7 ++----- - trio_websocket/_impl.py | 5 ++--- - 2 files changed, 4 insertions(+), 8 deletions(-) - -diff --git a/tests/test_connection.py b/tests/test_connection.py -index 8af07a9..7832355 100644 ---- a/tests/test_connection.py -+++ b/tests/test_connection.py -@@ -37,7 +37,6 @@ - import pytest - import trio - import trustme --from async_generator import async_generator, yield_ - from trio.testing import memory_stream_pair - from wsproto.events import CloseConnection - -@@ -78,24 +77,22 @@ - - - @pytest.fixture --@async_generator - async def echo_server(nursery): - ''' A server that reads one message, sends back the same message, - then closes the connection. ''' - serve_fn = partial(serve_websocket, echo_request_handler, HOST, 0, - ssl_context=None) - server = await nursery.start(serve_fn) -- await yield_(server) -+ yield server - - - @pytest.fixture --@async_generator - async def echo_conn(echo_server): - ''' Return a client connection instance that is connected to an echo - server. ''' - async with open_websocket(HOST, echo_server.port, RESOURCE, - use_ssl=False) as conn: -- await yield_(conn) -+ yield conn - - - async def echo_request_handler(request): -diff --git a/trio_websocket/_impl.py b/trio_websocket/_impl.py -index 693c379..440d0e2 100644 ---- a/trio_websocket/_impl.py -+++ b/trio_websocket/_impl.py -@@ -9,7 +9,7 @@ - import struct - import urllib.parse - --from async_generator import async_generator, yield_, asynccontextmanager -+from async_generator import asynccontextmanager - import trio - import trio.abc - from wsproto import ConnectionType, WSConnection -@@ -65,7 +65,6 @@ def remove_cancels(exc): - - - @asynccontextmanager --@async_generator - async def open_websocket(host, port, resource, *, use_ssl, subprotocols=None, - extra_headers=None, - message_queue_size=MESSAGE_QUEUE_SIZE, max_message_size=MAX_MESSAGE_SIZE, -@@ -115,7 +114,7 @@ async def open_websocket(host, port, resource, *, use_ssl, subprotocols=None, - except OSError as e: - raise HandshakeError from e - try: -- await yield_(connection) -+ yield connection - finally: - try: - with trio.fail_after(disconnect_timeout): diff --git a/dev-python/trio-websocket/trio-websocket-0.9.2.ebuild b/dev-python/trio-websocket/trio-websocket-0.9.2.ebuild deleted file mode 100644 index e9cd84406569..000000000000 --- a/dev-python/trio-websocket/trio-websocket-0.9.2.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{9..11} ) - -inherit distutils-r1 - -DESCRIPTION="WebSocket client and server implementation for Python Trio" -HOMEPAGE=" - https://github.com/HyperionGray/trio-websocket/ - https://pypi.org/project/trio-websocket/ -" -SRC_URI=" - https://github.com/HyperionGray/trio-websocket/archive/${PV}.tar.gz - -> ${P}.gh.tar.gz -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~riscv ~sparc ~x86" - -RDEPEND=" - >=dev-python/async_generator-1.10[${PYTHON_USEDEP}] - >=dev-python/trio-0.11[${PYTHON_USEDEP}] - >=dev-python/wsproto-0.14[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - >=dev-python/pytest-trio-0.5.0[${PYTHON_USEDEP}] - dev-python/trustme[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -PATCHES=( - # backport from https://github.com/HyperionGray/trio-websocket/pull/138/ - "${FILESDIR}"/${P}-async-gen.patch -) - -python_test() { - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - epytest -p trio -} |