From 852b5ed7a0e9ddec44bd78e04cf6e3270fa1e641 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 10 Apr 2023 06:40:02 +0000 Subject: automatic import of python-websockets --- .gitignore | 1 + python-websockets.spec | 99 +++++++++++++++++++++++++++----------------------- sources | 2 +- 3 files changed, 56 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index c8b3dee..ad8a816 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /websockets-10.4.tar.gz +/websockets-11.0.1.tar.gz diff --git a/python-websockets.spec b/python-websockets.spec index 17bcb95..ea40aa3 100644 --- a/python-websockets.spec +++ b/python-websockets.spec @@ -1,32 +1,25 @@ %global _empty_manifest_terminate_build 0 Name: python-websockets -Version: 10.4 +Version: 11.0.1 Release: 1 Summary: An implementation of the WebSocket Protocol (RFC 6455 & 7692) -License: BSD -URL: https://github.com/aaugustin/websockets -Source0: https://mirrors.nju.edu.cn/pypi/web/packages/85/dc/549a807a53c13fd4a8dac286f117a7a71260defea9ec0c05d6027f2ae273/websockets-10.4.tar.gz +License: BSD-3-Clause +URL: https://pypi.org/project/websockets/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/bd/90/6b5802fad3992d6eac7163216e0389a72475cbb57b23005135190e96d160/websockets-11.0.1.tar.gz %description websockets is a library for building WebSocket_ servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. -Built on top of ``asyncio``, Python's standard asynchronous I/O framework, it -provides an elegant coroutine-based API. +Built on top of ``asyncio``, Python's standard asynchronous I/O framework, the +default implementation provides an elegant coroutine-based API. +An implementation on top of ``threading`` and a Sans-I/O implementation are also +available. `Documentation is available on Read the Docs. `_ -Here's how a client sends and receives messages: +Here's an echo server with the ``asyncio`` API: #!/usr/bin/env python import asyncio - from websockets import connect - async def hello(uri): - async with connect(uri) as websocket: - await websocket.send("Hello world!") - await websocket.recv() - asyncio.run(hello("ws://localhost:8765")) -And here's an echo server: - #!/usr/bin/env python - import asyncio - from websockets import serve + from websockets.server import serve async def echo(websocket): async for message in websocket: await websocket.send(message) @@ -34,6 +27,16 @@ And here's an echo server: async with serve(echo, "localhost", 8765): await asyncio.Future() # run forever asyncio.run(main()) +Here's how a client sends and receives messages with the ``threading`` API: + #!/usr/bin/env python + import asyncio + from websockets.sync.client import connect + def hello(): + with connect("ws://localhost:8765") as websocket: + websocket.send("Hello world!") + message = websocket.recv() + print(f"Received: {message}") + hello() Does that look good? `Get started with the tutorial! `_ @@ -49,22 +52,15 @@ BuildRequires: gdb %description -n python3-websockets websockets is a library for building WebSocket_ servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. -Built on top of ``asyncio``, Python's standard asynchronous I/O framework, it -provides an elegant coroutine-based API. +Built on top of ``asyncio``, Python's standard asynchronous I/O framework, the +default implementation provides an elegant coroutine-based API. +An implementation on top of ``threading`` and a Sans-I/O implementation are also +available. `Documentation is available on Read the Docs. `_ -Here's how a client sends and receives messages: - #!/usr/bin/env python - import asyncio - from websockets import connect - async def hello(uri): - async with connect(uri) as websocket: - await websocket.send("Hello world!") - await websocket.recv() - asyncio.run(hello("ws://localhost:8765")) -And here's an echo server: +Here's an echo server with the ``asyncio`` API: #!/usr/bin/env python import asyncio - from websockets import serve + from websockets.server import serve async def echo(websocket): async for message in websocket: await websocket.send(message) @@ -72,6 +68,16 @@ And here's an echo server: async with serve(echo, "localhost", 8765): await asyncio.Future() # run forever asyncio.run(main()) +Here's how a client sends and receives messages with the ``threading`` API: + #!/usr/bin/env python + import asyncio + from websockets.sync.client import connect + def hello(): + with connect("ws://localhost:8765") as websocket: + websocket.send("Hello world!") + message = websocket.recv() + print(f"Received: {message}") + hello() Does that look good? `Get started with the tutorial! `_ @@ -81,22 +87,15 @@ Provides: python3-websockets-doc %description help websockets is a library for building WebSocket_ servers and clients in Python with a focus on correctness, simplicity, robustness, and performance. -Built on top of ``asyncio``, Python's standard asynchronous I/O framework, it -provides an elegant coroutine-based API. +Built on top of ``asyncio``, Python's standard asynchronous I/O framework, the +default implementation provides an elegant coroutine-based API. +An implementation on top of ``threading`` and a Sans-I/O implementation are also +available. `Documentation is available on Read the Docs. `_ -Here's how a client sends and receives messages: - #!/usr/bin/env python - import asyncio - from websockets import connect - async def hello(uri): - async with connect(uri) as websocket: - await websocket.send("Hello world!") - await websocket.recv() - asyncio.run(hello("ws://localhost:8765")) -And here's an echo server: +Here's an echo server with the ``asyncio`` API: #!/usr/bin/env python import asyncio - from websockets import serve + from websockets.server import serve async def echo(websocket): async for message in websocket: await websocket.send(message) @@ -104,11 +103,21 @@ And here's an echo server: async with serve(echo, "localhost", 8765): await asyncio.Future() # run forever asyncio.run(main()) +Here's how a client sends and receives messages with the ``threading`` API: + #!/usr/bin/env python + import asyncio + from websockets.sync.client import connect + def hello(): + with connect("ws://localhost:8765") as websocket: + websocket.send("Hello world!") + message = websocket.recv() + print(f"Received: {message}") + hello() Does that look good? `Get started with the tutorial! `_ %prep -%autosetup -n websockets-10.4 +%autosetup -n websockets-11.0.1 %build %py3_build @@ -148,5 +157,5 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog -* Thu Mar 09 2023 Python_Bot - 10.4-1 +* Mon Apr 10 2023 Python_Bot - 11.0.1-1 - Package Spec generated diff --git a/sources b/sources index 3c33e51..f9d3bac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d6b1a2cb5e194ae43f849c125b71c8db websockets-10.4.tar.gz +ce1f2b10250cd3fa233ff572593d6ed3 websockets-11.0.1.tar.gz -- cgit v1.2.3