microdot 2.3.0__tar.gz → 2.3.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.
- {microdot-2.3.0/src/microdot.egg-info → microdot-2.3.2}/PKG-INFO +1 -1
- {microdot-2.3.0 → microdot-2.3.2}/pyproject.toml +1 -1
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/auth.py +2 -2
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/microdot.py +2 -2
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/sse.py +2 -2
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/test_client.py +2 -2
- {microdot-2.3.0 → microdot-2.3.2/src/microdot.egg-info}/PKG-INFO +1 -1
- {microdot-2.3.0 → microdot-2.3.2}/LICENSE +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/MANIFEST.in +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/README.md +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/Makefile +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/_static/css/custom.css +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/api.rst +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/conf.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/extensions.rst +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/freezing.rst +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/index.rst +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/intro.rst +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/make.bat +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/docs/migrating.rst +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/setup.cfg +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/__init__.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/asgi.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/cors.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/helpers.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/jinja.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/login.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/multipart.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/session.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/utemplate.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/websocket.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot/wsgi.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot.egg-info/SOURCES.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot.egg-info/dependency_links.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot.egg-info/not-zip-safe +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot.egg-info/requires.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/src/microdot.egg-info/top_level.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/__init__.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.bin +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.css +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.gif +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.gz +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.html +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.jpg +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.js +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.json +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.png +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/files/test.txt.gz +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/mock_socket.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/templates/hello.jinja.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/templates/hello.utemplate.txt +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/templates/hello_utemplate_txt.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_asgi.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_auth.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_cors.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_end2end.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_jinja.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_login.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_microdot.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_multidict.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_multipart.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_request.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_response.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_session.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_sse.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_url_pattern.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_urlencode.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_utemplate.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_websocket.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tests/test_wsgi.py +0 -0
- {microdot-2.3.0 → microdot-2.3.2}/tox.ini +0 -0
|
@@ -85,7 +85,7 @@ class BasicAuth(BaseAuth):
|
|
|
85
85
|
return None
|
|
86
86
|
return username, password
|
|
87
87
|
|
|
88
|
-
def authentication_error(self, request):
|
|
88
|
+
async def authentication_error(self, request):
|
|
89
89
|
return '', self.error_status, {
|
|
90
90
|
'WWW-Authenticate': '{} realm="{}", charset="{}"'.format(
|
|
91
91
|
self.scheme, self.realm, self.charset)}
|
|
@@ -158,5 +158,5 @@ class TokenAuth(BaseAuth):
|
|
|
158
158
|
"""
|
|
159
159
|
self.error_callback = f
|
|
160
160
|
|
|
161
|
-
def authentication_error(self, request):
|
|
161
|
+
async def authentication_error(self, request):
|
|
162
162
|
abort(self.error_status)
|
|
@@ -578,9 +578,9 @@ class Response:
|
|
|
578
578
|
self.headers = NoCaseDict(headers or {})
|
|
579
579
|
self.reason = reason
|
|
580
580
|
if isinstance(body, (dict, list)):
|
|
581
|
-
|
|
581
|
+
body = json.dumps(body)
|
|
582
582
|
self.headers['Content-Type'] = 'application/json; charset=UTF-8'
|
|
583
|
-
|
|
583
|
+
if isinstance(body, str):
|
|
584
584
|
self.body = body.encode()
|
|
585
585
|
else:
|
|
586
586
|
# this applies to bytes, file-like objects or generators
|
|
@@ -29,8 +29,8 @@ class SSE:
|
|
|
29
29
|
given, it must be a string.
|
|
30
30
|
"""
|
|
31
31
|
if isinstance(data, (dict, list)):
|
|
32
|
-
data = json.dumps(data)
|
|
33
|
-
|
|
32
|
+
data = json.dumps(data)
|
|
33
|
+
if isinstance(data, str):
|
|
34
34
|
data = data.encode()
|
|
35
35
|
elif not isinstance(data, bytes):
|
|
36
36
|
data = str(data).encode()
|
|
@@ -105,10 +105,10 @@ class TestClient:
|
|
|
105
105
|
if body is None:
|
|
106
106
|
body = b''
|
|
107
107
|
elif isinstance(body, (dict, list)):
|
|
108
|
-
body = json.dumps(body)
|
|
108
|
+
body = json.dumps(body)
|
|
109
109
|
if 'Content-Type' not in headers: # pragma: no cover
|
|
110
110
|
headers['Content-Type'] = 'application/json'
|
|
111
|
-
|
|
111
|
+
if isinstance(body, str):
|
|
112
112
|
body = body.encode()
|
|
113
113
|
if body and 'Content-Length' not in headers:
|
|
114
114
|
headers['Content-Length'] = str(len(body))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|