716 Commits

Author SHA1 Message Date
Néstor Pérez
af67801062
Fix JSONResponse default content type () 2023-04-09 22:23:21 +03:00
Adam Hopkins
d680af3709
v23.3 Deprecation Removal () 2023-03-26 15:24:08 +03:00
Adam Hopkins
6e1c787e5d
Simpler CLI targets ()
Co-authored-by: L. Kärkkäinen <98187+Tronic@users.noreply.github.com>
2023-03-21 20:50:25 +02:00
L. Kärkkäinen
932088e37e
Stricter charset handling and escaping of request URLs ()
Co-authored-by: L. Karkkainen <tronic@users.noreply.github.com>
2023-03-21 19:55:21 +02:00
Adam Hopkins
1a63b9bec0
Add convenience methods for cookie creation and deletion ()
* Add convenience methods for cookie creation and deletion

* Restore del

* Backwards compat, forward thinking

* Add delitem deprecation notice

* Add get full deprecation notice

* Add deprecation docstring

* Better deprecation docstring

* Add has_cookie

* Same defaults

* Better deprecation message

* Accessor annotations

* make pretty

* parse cookies

* Revert quote translator

* make pretty

* make pretty

* Add unit tests

* Make pretty

* Fix unit tests

* Directly include unquote

* Add some more unit tests

* Move modules into their own dir

* make pretty

* cleanup test imports

* Add test for cookie accessor

* Make test consistent

* Remove file

* Remove additional escaping

* Add header style getattr for hyphens

* Add test for cookie accessor with hyphens

* Add new translator

* Parametrize test_request_with_duplicate_cookie_key

* make pretty

* Add deprecation of direct cookie encoding

* Speedup Cookie creation

* Implement prefixes on delete_cookie

* typing changes

* Add passthru functions on response objects for setting cookies

* Add test for passthru

---------

Co-authored-by: L. Kärkkäinen <98187+Tronic@users.noreply.github.com>
2023-03-21 11:25:35 +02:00
Zhiwei
61aa16f6ac
Decode headers as UTF-8 also in ASGI ()
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
2023-03-20 15:39:57 +02:00
Adam Hopkins
89188f5fc6
Add CertLoader as application option () 2023-03-20 14:05:21 +02:00
Adam Hopkins
53820bc241
Allow password to be passed to TLS context () 2023-03-20 12:34:36 +02:00
stricaud
009954003c
Fix comparison from wrong formats with datetime objects ()
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
2023-03-20 12:12:09 +02:00
Adam Hopkins
8f265b8169
Add convenience for dynamic changes to routing () 2023-03-19 15:40:58 +02:00
Adam Hopkins
5ee36fd933
Separate ASGI request and lifespan callables () 2023-03-17 09:05:33 +02:00
L. Kärkkäinen
a5d7d03413
Nicer traceback formatting ()
Co-authored-by: L. Kärkkäinen <98187+Tronic@users.noreply.github.com>
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
Co-authored-by: L. Karkkainen <tronic@users.noreply.github.com>
Co-authored-by: SML <smlbiobot@gmail.com>
2023-03-06 21:24:12 +02:00
L. Kärkkäinen
259e458847
Simplified parse_content_header escaping () 2023-03-06 06:39:16 +02:00
Adam Hopkins
cb49c2b26d
Add header accessors () 2023-02-28 00:26:53 +02:00
L. Kärkkäinen
dfc0704831
Error page rendering format selection ()
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
Co-authored-by: L. Karkkainen <tronic@users.noreply.github.com>
2023-02-26 08:25:10 +02:00
Adam Hopkins
d238995f1b
Refresh Request.accept functionality () 2023-02-21 08:22:51 +02:00
Ryu Juheon
5e7f6998bd
fix(websocket): ASGI websocket must pass thru bytes as is () 2023-02-05 16:41:54 +02:00
Adam Hopkins
9cb9e88678
Establish basic file browser and index fallback ()
Co-authored-by: L. Kärkkäinen <98187+Tronic@users.noreply.github.com>
Co-authored-by: L. Karkkainen <tronic@users.noreply.github.com>
2023-02-05 15:09:04 +02:00
Adam Hopkins
28f5b3c301
Add better inspector arg parsing () 2022-12-26 12:27:40 +02:00
Adam Hopkins
029f564032
Pass unquote thru add_route () 2022-12-21 10:45:23 +02:00
Adam Hopkins
2abe66b670
Add priority to register_middleware method () 2022-12-19 19:14:46 +02:00
Adam Hopkins
4744a89c33
Fix double ctrl-c kill () 2022-12-18 14:40:38 +02:00
Adam Hopkins
f7040ccec8
Implement restart ordering () 2022-12-18 14:09:17 +02:00
Adam Hopkins
0e44e9cacb
Move to HTTP Inspector () 2022-12-18 10:29:58 +02:00
Adam Hopkins
bfb54b0969
Test for 3.11 support ()
Co-authored-by: Zhiwei <zhi.wei.liang@outlook.com>
2022-12-17 23:46:22 +02:00
Zhiwei
154863d6c6
Method Signal Handler Test () 2022-12-17 20:38:46 +02:00
Adam Hopkins
a3ff0c13b7
ASGI lifespan failure on exception () 2022-12-16 08:56:07 +02:00
Adam Hopkins
b276b91c21
Allow fork in limited cases () 2022-12-15 11:49:26 +02:00
Adam Hopkins
db39e127bf
Scale workers () 2022-12-13 09:28:23 +02:00
L. Kärkkäinen
13e9ab7ba9
Filename normalisation of form-data/multipart file uploads (umlauts on Apple clients) ()
Co-authored-by: L. Karkkainen <tronic@users.noreply.github.com>
2022-12-13 08:36:21 +02:00
Adam Hopkins
92e7463721
Add a restart mechanism to all workers in the multiplexer () 2022-12-11 11:33:42 +02:00
Néstor Pérez
8e720365c2
Add JSONResponse class ()
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
2022-12-11 10:37:45 +02:00
Adam Hopkins
d4041161c7
Ensure middleware executes once per request timeout () 2022-12-07 23:07:17 +02:00
Adam Hopkins
f32437bf13
Kill server early on worker error () 2022-12-07 14:42:17 +02:00
LiraNuna
0909e94527
Corrected Colors enum under Python 3.11 ()
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
Fixes https://github.com/sanic-org/sanic/issues/2589
2022-11-29 12:17:48 +02:00
Adam Hopkins
beae35f921
Ignore recent failures on bad TLS tests () 2022-11-29 10:51:51 +02:00
Adam Hopkins
d70636ba2e
Add GenericCreator for loading SSL certs in processes () 2022-10-31 13:22:30 +02:00
Adam Hopkins
3f4663b9f8
Resolve edge case in nested BP Groups () 2022-10-31 12:58:41 +02:00
Ryu Juheon
1c4925edf7
fix: sideeffects created by changing fork to spawn () 2022-10-27 20:39:17 +03:00
Santi Cardozo
6b9edfd05c
improve error message if no apps found in registry () 2022-10-25 16:54:44 +03:00
Adam Hopkins
5052321801
Remove deprecated items () 2022-09-29 01:07:09 +03:00
Adam Hopkins
ec158ffa69
Additional logger and support for multiprocess manager () 2022-09-23 00:01:33 +03:00
Adam Hopkins
6e32270036
Begin middleware revamp () 2022-09-22 00:43:42 +03:00
Zhiwei
43ba381e7b
Refactor _static_request_handler ()
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
2022-09-21 00:45:03 +03:00
Zhiwei
16503319e5
Make WebsocketImplProtocol async iterable () 2022-09-21 00:20:32 +03:00
Adam Hopkins
389363ab71
Better request cancel handling () 2022-09-19 16:04:09 +03:00
Adam Hopkins
7f894c45b3
Add deprecation warning filter () 2022-09-18 18:54:35 +03:00
Adam Hopkins
4726cf1910
Sanic Server WorkerManager refactor ()
Co-authored-by: Néstor Pérez <25409753+prryplatypus@users.noreply.github.com>
2022-09-18 17:17:23 +03:00
Adam Hopkins
d352a4155e
Add signals before and after handler execution () 2022-09-15 15:49:21 +03:00
Adam Hopkins
e5010286b4
Raise warning and deprecation notice on violations () 2022-09-15 15:24:46 +03:00