Skip to content

Commit 1827779

Browse files
author
taras
committed
Simplify README
1 parent 41af9af commit 1827779

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

README.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ Connects to an echo server, sends a message and disconnect upon reply.
7878
.. code-block:: python
7979
8080
import asyncio
81-
import uvloop
8281
from picows import ws_connect, WSFrame, WSTransport, WSListener, WSMsgType, WSCloseCode
8382
8483
class ClientListener(WSListener):
@@ -97,7 +96,6 @@ Connects to an echo server, sends a message and disconnect upon reply.
9796
9897
9998
if __name__ == '__main__':
100-
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
10199
asyncio.run(main("ws://127.0.0.1:9001"))
102100
103101
This prints:
@@ -112,7 +110,6 @@ Echo server
112110
.. code-block:: python
113111
114112
import asyncio
115-
import uvloop
116113
from picows import ws_create_server, WSFrame, WSTransport, WSListener, WSMsgType, WSUpgradeRequest
117114
118115
class ServerClientListener(WSListener):
@@ -138,7 +135,6 @@ Echo server
138135
await server.serve_forever()
139136
140137
if __name__ == '__main__':
141-
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
142138
asyncio.run(main())
143139
144140

examples/readme_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import uvloop
32
from picows import ws_connect, WSFrame, WSTransport, WSListener, WSMsgType, WSCloseCode
43

54

@@ -19,5 +18,4 @@ async def main(url):
1918

2019

2120
if __name__ == '__main__':
22-
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
2321
asyncio.run(main("ws://127.0.0.1:9001"))

examples/readme_server.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import uvloop
32
from picows import ws_create_server, WSFrame, WSTransport, WSListener, \
43
WSMsgType, WSUpgradeRequest
54

@@ -30,5 +29,4 @@ def listener_factory(r: WSUpgradeRequest):
3029

3130

3231
if __name__ == '__main__':
33-
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
3432
asyncio.run(main())

0 commit comments

Comments
 (0)