asgi-tools 1.2.0__cp311-cp311-macosx_11_0_arm64.whl → 1.3.2__cp311-cp311-macosx_11_0_arm64.whl
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.
- asgi_tools/forms.cpython-311-darwin.so +0 -0
- asgi_tools/middleware.py +1 -1
- asgi_tools/multipart.cpython-311-darwin.so +0 -0
- asgi_tools/response.py +4 -10
- {asgi_tools-1.2.0.dist-info → asgi_tools-1.3.2.dist-info}/METADATA +3 -3
- {asgi_tools-1.2.0.dist-info → asgi_tools-1.3.2.dist-info}/RECORD +9 -9
- {asgi_tools-1.2.0.dist-info → asgi_tools-1.3.2.dist-info}/WHEEL +0 -0
- {asgi_tools-1.2.0.dist-info → asgi_tools-1.3.2.dist-info}/licenses/LICENSE +0 -0
- {asgi_tools-1.2.0.dist-info → asgi_tools-1.3.2.dist-info}/top_level.txt +0 -0
Binary file
|
asgi_tools/middleware.py
CHANGED
@@ -392,7 +392,7 @@ class StaticFilesMiddleware(BaseMiddleware):
|
|
392
392
|
super().__init__(app)
|
393
393
|
self.url_prefix = url_prefix
|
394
394
|
folders = folders or []
|
395
|
-
self.folders: list[Path] = [Path(folder) for folder in folders]
|
395
|
+
self.folders: list[Path] = [Path(folder).resolve() for folder in folders]
|
396
396
|
|
397
397
|
async def __process__(self, scope: TASGIScope, receive: TASGIReceive, send: TASGISend) -> None:
|
398
398
|
"""Serve static files for self url prefix."""
|
Binary file
|
asgi_tools/response.py
CHANGED
@@ -399,8 +399,7 @@ class ResponseRedirect(Response, BaseException):
|
|
399
399
|
class ResponseErrorMeta(type):
|
400
400
|
"""Generate Response Errors by HTTP names."""
|
401
401
|
|
402
|
-
|
403
|
-
def __getattr__(cls, name: str) -> Callable[..., ResponseError]:
|
402
|
+
def __getattr__(cls, name: str) -> partial[ResponseError]:
|
404
403
|
"""Generate Response Errors by HTTP names."""
|
405
404
|
status = HTTPStatus[name]
|
406
405
|
return partial(
|
@@ -448,9 +447,8 @@ class ResponseError(Response, BaseException, metaclass=ResponseErrorMeta):
|
|
448
447
|
UNSUPPORTED_MEDIA_TYPE: Callable[..., ResponseError] # 415
|
449
448
|
REQUESTED_RANGE_NOT_SATISFIABLE: Callable[..., ResponseError] # 416
|
450
449
|
EXPECTATION_FAILED: Callable[..., ResponseError] # 417
|
451
|
-
|
452
|
-
|
453
|
-
# MISDIRECTED_REQUEST: Callable[..., ResponseError] # 421
|
450
|
+
IM_A_TEAPOT: Callable[..., ResponseError] # 418
|
451
|
+
MISDIRECTED_REQUEST: Callable[..., ResponseError] # 421
|
454
452
|
UNPROCESSABLE_ENTITY: Callable[..., ResponseError] # 422
|
455
453
|
LOCKED: Callable[..., ResponseError] # 423
|
456
454
|
FAILED_DEPENDENCY: Callable[..., ResponseError] # 424
|
@@ -459,8 +457,7 @@ class ResponseError(Response, BaseException, metaclass=ResponseErrorMeta):
|
|
459
457
|
PRECONDITION_REQUIRED: Callable[..., ResponseError] # 428
|
460
458
|
TOO_MANY_REQUESTS: Callable[..., ResponseError] # 429
|
461
459
|
REQUEST_HEADER_FIELDS_TOO_LARGE: Callable[..., ResponseError] # 431
|
462
|
-
|
463
|
-
# UNAVAILABLE_FOR_LEGAL_REASONS: Callable[..., ResponseError] # 451
|
460
|
+
UNAVAILABLE_FOR_LEGAL_REASONS: Callable[..., ResponseError] # 451
|
464
461
|
|
465
462
|
INTERNAL_SERVER_ERROR: Callable[..., ResponseError] # 500
|
466
463
|
NOT_IMPLEMENTED: Callable[..., ResponseError] # 501
|
@@ -532,6 +529,3 @@ def parse_websocket_msg(msg: TASGIMessage, charset: str | None = None) -> TASGIM
|
|
532
529
|
|
533
530
|
async def empty():
|
534
531
|
yield b""
|
535
|
-
|
536
|
-
|
537
|
-
# ruff: noqa: ERA001
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: asgi-tools
|
3
|
-
Version: 1.2
|
3
|
+
Version: 1.3.2
|
4
4
|
Summary: ASGI Toolkit to build web applications
|
5
5
|
Author-email: Kirill Klenov <horneds@gmail.com>
|
6
6
|
License: MIT License
|
@@ -33,7 +33,7 @@ Requires-Dist: async-timeout; python_version < "3.11"
|
|
33
33
|
Provides-Extra: tests
|
34
34
|
Requires-Dist: aiofile; extra == "tests"
|
35
35
|
Requires-Dist: pytest; extra == "tests"
|
36
|
-
Requires-Dist: pytest-aio[curio,trio]>=1.2
|
36
|
+
Requires-Dist: pytest-aio[curio,trio]>=1.3.2; extra == "tests"
|
37
37
|
Requires-Dist: pytest-benchmark; extra == "tests"
|
38
38
|
Requires-Dist: PyYAML; extra == "tests"
|
39
39
|
Requires-Dist: ruff; extra == "tests"
|
@@ -124,7 +124,7 @@ For instance these middlewares were built with the library:
|
|
124
124
|
Requirements
|
125
125
|
=============
|
126
126
|
|
127
|
-
- python >= 3.
|
127
|
+
- python >= 3.10
|
128
128
|
|
129
129
|
.. note:: pypy3 is also supported
|
130
130
|
|
@@ -1,17 +1,17 @@
|
|
1
|
-
asgi_tools-1.2.
|
2
|
-
asgi_tools-1.2.
|
3
|
-
asgi_tools-1.2.
|
4
|
-
asgi_tools-1.2.
|
5
|
-
asgi_tools-1.2.
|
1
|
+
asgi_tools-1.3.2.dist-info/RECORD,,
|
2
|
+
asgi_tools-1.3.2.dist-info/WHEEL,sha256=sunMa2yiYbrNLGeMVDqEA0ayyJbHlex7SCn1TZrEq60,136
|
3
|
+
asgi_tools-1.3.2.dist-info/top_level.txt,sha256=-6i6ebKuJ0cSaXJ3KWPmJLKUbmBE2UsuA2b7BcZMJSk,11
|
4
|
+
asgi_tools-1.3.2.dist-info/METADATA,sha256=7NwnIzvg_zHcmhcrf5h1fMwPtQrlZMZg2lAdX82JBEM,7139
|
5
|
+
asgi_tools-1.3.2.dist-info/licenses/LICENSE,sha256=ytogAgYcPT6gWj8aRc-cZwhSq9Y3wOzG-4KteKCyQOw,1070
|
6
6
|
asgi_tools/multipart.py,sha256=8RkJm9JIjyjR7z2OIhYg8fgLKq21HBWCMEOwbhx-3GA,21707
|
7
|
-
asgi_tools/multipart.cpython-311-darwin.so,sha256=
|
7
|
+
asgi_tools/multipart.cpython-311-darwin.so,sha256=ueHA1mS3n5oSaAsxIsXs0c1OdckuQBsF6NuDSZQpmD4,163232
|
8
8
|
asgi_tools/multipart.pyx,sha256=pq-DzmAaRhS0yMJIFPNI-GP7OjJUt4k3Y8vMbXJOpKk,21929
|
9
9
|
asgi_tools/forms.c,sha256=v7t7ia5JTU68Eg1weG353v2IKfjQf_jTKUBSDmg8pgQ,826881
|
10
10
|
asgi_tools/multipart.c,sha256=EY4Z9r8PmtB-EuV7mI1evcyEGOFpKZCT-KeE5GPH2II,844007
|
11
11
|
asgi_tools/constants.py,sha256=B7fJabLdpSE4COX0vAudyC32xV0dSpLgg0kob-FlCkE,128
|
12
12
|
asgi_tools/request.py,sha256=s-CqT9JI-aPZz46YtKyvSDR7CfLxEhPrIuH9OG6npzk,10802
|
13
13
|
asgi_tools/__init__.py,sha256=tBnlggb3FJPK8tDrnpC580OfbQ0QpuKFRdyfxmIeu8w,1428
|
14
|
-
asgi_tools/response.py,sha256
|
14
|
+
asgi_tools/response.py,sha256=-oePnVs5_lAjZWBgcVbdnhuStHMJoqnaqYS1Dqw3rFU,18494
|
15
15
|
asgi_tools/types.py,sha256=QWmrnhqc_jEUaXUcMm5iMpxpd6vrTcCnlq4O9moKANg,926
|
16
16
|
asgi_tools/forms.py,sha256=ers1A52YEAO1TBYWJP73K6q6jArNU7QbV0LjTlpKdeM,5059
|
17
17
|
asgi_tools/view.py,sha256=DO0Lr8euP98kMicDwmZLcbMpJ-Hzbhl3vYFYqAXpisw,1925
|
@@ -25,5 +25,5 @@ asgi_tools/forms.pyx,sha256=ol1iEXDwS--9vNIoxFFvcTRvzUF14gQC3SDWW9K5-k8,5340
|
|
25
25
|
asgi_tools/router.py,sha256=1MCF5QLfYPWZH10AuXMRN0rTMTyQWciDSh3owgsFhk4,440
|
26
26
|
asgi_tools/_compat.py,sha256=3BTsysYhxa0itJzCWnzpnE-HuYGs7vXzZRgQRei0IW4,7483
|
27
27
|
asgi_tools/tests.py,sha256=elUGlBE8qklBzKAov1x1i0eVHfkFLzj5Oifd6_JjHv4,12944
|
28
|
-
asgi_tools/middleware.py,sha256=
|
29
|
-
asgi_tools/forms.cpython-311-darwin.so,sha256=
|
28
|
+
asgi_tools/middleware.py,sha256=hkAdedGiWNTZJ2_AULzI9trn_qHMoN3QxHOQ7tvegF0,15158
|
29
|
+
asgi_tools/forms.cpython-311-darwin.so,sha256=c_0U7_azY9CtM9PyBJafcn-NheG6OSoZDGaK4_wzMKQ,188648
|
File without changes
|
File without changes
|
File without changes
|