wisp-python 0.4.0__tar.gz → 0.4.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wisp-python
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: An implementation of a Wisp proxy server in Python
5
5
  Author: ading2210
6
6
  Project-URL: Homepage, https://github.com/MercuryWorkshop/wisp-server-python
@@ -13,6 +13,7 @@ Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: websockets
15
15
  Requires-Dist: asyncudp
16
+ Requires-Dist: uvloop
16
17
 
17
18
  # Python Wisp Server
18
19
 
@@ -38,7 +39,7 @@ To start the server, run `python3 -m wisp.server`. The program accepts the follo
38
39
  ```
39
40
  usage: wisp-server-python [-h] [--host HOST] [--port PORT] [--static STATIC] [--limits] [--bandwidth BANDWIDTH] [--connections CONNECTIONS] [--window WINDOW] [--allow-loopback] [--allow-private]
40
41
 
41
- A Wisp server implementation, written in Python (v0.4.0)
42
+ A Wisp server implementation, written in Python (v0.4.1)
42
43
 
43
44
  options:
44
45
  -h, --help show this help message and exit
@@ -22,7 +22,7 @@ To start the server, run `python3 -m wisp.server`. The program accepts the follo
22
22
  ```
23
23
  usage: wisp-server-python [-h] [--host HOST] [--port PORT] [--static STATIC] [--limits] [--bandwidth BANDWIDTH] [--connections CONNECTIONS] [--window WINDOW] [--allow-loopback] [--allow-private]
24
24
 
25
- A Wisp server implementation, written in Python (v0.4.0)
25
+ A Wisp server implementation, written in Python (v0.4.1)
26
26
 
27
27
  options:
28
28
  -h, --help show this help message and exit
@@ -11,7 +11,7 @@ package-dir = {"" = "src"}
11
11
 
12
12
  [project]
13
13
  name = "wisp-python"
14
- version = "0.4.0"
14
+ version = "0.4.2"
15
15
  authors = [
16
16
  {name="ading2210"},
17
17
  ]
@@ -25,7 +25,8 @@ classifiers = [
25
25
  ]
26
26
  dependencies = [
27
27
  "websockets",
28
- "asyncudp"
28
+ "asyncudp",
29
+ "uvloop"
29
30
  ]
30
31
 
31
32
  [project.urls]
@@ -1,3 +1,3 @@
1
1
  from wisp import server
2
2
 
3
- version = "0.4.0"
3
+ version = "0.4.2"
@@ -1,5 +1,10 @@
1
1
  import argparse
2
2
  import asyncio
3
+ try:
4
+ import uvloop
5
+ use_uvloop = True
6
+ except ImportError:
7
+ use_uvloop = False
3
8
 
4
9
  import wisp
5
10
  import wisp.server.http
@@ -21,4 +26,8 @@ if __name__ == "__main__":
21
26
  parser.add_argument("--allow-private", action="store_true", help="Allow connections to private IP addresses.")
22
27
  args = parser.parse_args()
23
28
 
24
- asyncio.run(wisp.server.http.main(args))
29
+ if use_uvloop:
30
+ uvloop.run(wisp.server.http.main(args))
31
+ else:
32
+ print("Warning: Importing uvloop failed. Falling back to asyncio, which is slower.")
33
+ asyncio.run(wisp.server.http.main(args))
@@ -79,5 +79,5 @@ async def main(args):
79
79
 
80
80
  limit_task = asyncio.create_task(ratelimit.reset_limits_timer())
81
81
  print(f"listening on {args.host}:{args.port}")
82
- async with serve(connection_handler, args.host, int(args.port), process_request=request_handler):
82
+ async with serve(connection_handler, args.host, int(args.port), process_request=request_handler, compression=None):
83
83
  await asyncio.Future()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wisp-python
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: An implementation of a Wisp proxy server in Python
5
5
  Author: ading2210
6
6
  Project-URL: Homepage, https://github.com/MercuryWorkshop/wisp-server-python
@@ -13,6 +13,7 @@ Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: websockets
15
15
  Requires-Dist: asyncudp
16
+ Requires-Dist: uvloop
16
17
 
17
18
  # Python Wisp Server
18
19
 
@@ -38,7 +39,7 @@ To start the server, run `python3 -m wisp.server`. The program accepts the follo
38
39
  ```
39
40
  usage: wisp-server-python [-h] [--host HOST] [--port PORT] [--static STATIC] [--limits] [--bandwidth BANDWIDTH] [--connections CONNECTIONS] [--window WINDOW] [--allow-loopback] [--allow-private]
40
41
 
41
- A Wisp server implementation, written in Python (v0.4.0)
42
+ A Wisp server implementation, written in Python (v0.4.1)
42
43
 
43
44
  options:
44
45
  -h, --help show this help message and exit
@@ -1,2 +1,3 @@
1
1
  websockets
2
2
  asyncudp
3
+ uvloop
File without changes
File without changes