Zhiwei Liang
80029d636d
Add reset method for init and reset bp instance; update copy method
2021-07-20 20:07:37 -05:00
Adam Hopkins
d4cd897522
Merge branch 'main' into zhiwei/bp-copy
2021-07-20 12:50:18 +03:00
Adam Hopkins
c3b6fa1bba
HTTP tests ( #2194 )
2021-07-19 16:52:33 +03:00
Adam Hopkins
94d496afe1
Change dumps to AnyStr ( #2193 )
2021-07-19 16:25:36 +03:00
gluhar2006
7b7a572f9b
raise exception for _static_request_handler
unknown exception; add test with custom error ( #2195 )
...
Co-authored-by: n.feofanov <n.feofanov@visionlabs.ru>
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-07-19 09:23:02 +03:00
Adam Hopkins
1b8cb742f9
Update README.rst
2021-07-18 23:22:19 +03:00
Adam Hopkins
3492d180a8
Update some CC config ( #2199 )
2021-07-18 12:32:35 +03:00
Zhiwei Liang
762c25e21a
doc fix
2021-07-13 16:50:35 -07:00
Zhiwei Liang
176db5f8a4
Merge branch 'zhiwei/bp-copy' of https://github.com/ChihweiLHBird/sanic into zhiwei/bp-copy
2021-07-13 13:03:45 -07:00
Zhiwei Liang
0a8ee7be9d
Fix typing 2
2021-07-13 13:03:05 -07:00
Zhiwei Liang
be1c09e7da
Fix typing
2021-07-13 12:51:56 -07:00
Zhiwei
47ebddaee5
Merge branch 'main' into zhiwei/bp-copy
2021-07-13 12:51:48 -07:00
Zhiwei Liang
69c1a8e2ac
Improve copy method in blueprint, adding possibiliy to keep original attribute values.
2021-07-13 12:48:28 -07:00
Ryu JuHeon
021da38373
style(app,blueprints): add some type hints ( #2196 )
...
* style(app,blueprints): add some type hints
* style(app): option is Any
* style(blueprints): url prefix default value is ``""``
* style(app): backward compatible
* style(app): backward compatible
* style(blueprints): defult is None
* style(app): apply code style (black)
2021-07-13 10:32:54 +03:00
Robert Palmer
ac784759d5
Update sanic-routing to fix path issues plus lookahead / lookbehind support ( #2178 )
...
* Update sanic-routing to fix path issues plus lookahead / lookbehind support
* Update setup.py
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-07-12 08:22:53 +03:00
Adam Hopkins
36eda2cd62
Resolve regressions in exceptions ( #2181 )
2021-07-12 00:35:27 +03:00
L. Kärkkäinen
08a4b3013f
Fix the handling of the end of a chunked request. ( #2188 )
...
* Fix the handling of the end of a chunked request.
* Avoid hardcoding final chunk header size.
* Add some unit tests for pipeline body reading
* Decode bytes for json serialization
Co-authored-by: L. Kärkkäinen <tronic@users.noreply.github.com>
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
2021-07-11 13:44:40 +03:00
Zhiwei
46d9ebff4b
Merge branch 'main' into zhiwei/bp-copy
2021-07-08 11:42:30 -07:00
Zhiwei
1dd0332e8b
Remove Duplicated Dependencies and PEP 517 Support ( #2173 )
...
* Remove duplicated dependencies
* Specify setuptools as the tool for generating distribution (PEP 517)
* Add `isort` to `dev_require`
* manage all dependencies in setup.py
* Execute `make pretty`
* Set usedevelop to true (revert previous change)
2021-07-08 09:12:56 +03:00
Zhiwei
94f840d596
Merge branch 'main' into zhiwei/bp-copy
2021-07-07 01:01:35 -07:00
Zhiwei Liang
d6037fc098
Initial version of Blueprint.copy, with a test case.
2021-07-07 01:01:05 -07:00
Adam Hopkins
a90877ac31
Manually reset the buffer when streaming request body ( #2183 )
2021-07-06 08:24:20 +03:00
Zhiwei
8b7ea27a48
Remove unnecessary import in test_constants.py, which also fixes an error on win ( #2180 )
...
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-07-05 11:51:36 +03:00
Adam Hopkins
8df80e276b
sanic-routing==0.7.0
v21.6.0
2021-06-27 23:01:47 +03:00
Adam Hopkins
30572c972d
21.6 Changelog, release version, and deprecations ( #2172 )
...
* Changelog and version
* Rearrange API docs for easier navigation
* Version 21.6 docs
* Change release workflow
* Disable Windows tests
2021-06-27 22:52:56 +03:00
Adam Hopkins
53da4dd091
Allow blueprints and groups to be infinitely reusable ( #2150 )
...
* Allow blueprints and groups to be infinitely reusable
2021-06-21 18:41:04 +03:00
Adam Hopkins
108a4a99c7
v2 AST router ( #2133 )
...
* Update some tests
* Update some tests
* Resolve #2122 route decorator returning tuple
* Use rc sanic-routing version
* Update unit tests to <:str>
2021-06-21 15:10:26 +03:00
Adam Hopkins
7c180376d6
Add Simple Server and Coverage action ( #2168 )
...
* Add Simple Server and CodeCov action
* Remove token
* Codecov to tox.ini
* fix tox
* Set coverage location
* Add ignore to codecov
* Try glob ignore
* Setup CodeClimate
* Allow coverage check to run
* Change coverage check
* Add codeclimate exclusions
2021-06-21 14:53:09 +03:00
Adam Hopkins
f39b8b32f7
Make sure ASGI ws subprotocols is a list ( #2127 )
...
* Ensure protocols is a list for ASGI
* Subprotocol updates
2021-06-21 14:39:06 +03:00
Adam Hopkins
c543d19f8a
CBV alternate attach; CompositionView deprecate ( #2170 )
...
* Deprecate composition view and add alternate methods to attach CBV
* Add args to CBV attaching
2021-06-21 14:26:42 +03:00
Adam Hopkins
80fca9aef7
Better exception handling ( #2128 )
...
* WIP for better exception handling
* Note about removal
* resolve conditional to reduce lookups
* Cleanup logic
2021-06-21 14:14:07 +03:00
Adam Hopkins
5bb9aa0c2c
Add reloading on addtional directories ( #2167 )
2021-06-18 11:39:09 +03:00
Stephen Sadowski
83c746ee57
Added new client_ip accessor ( #2114 )
...
* Added new client_ip accessor for ConnInfo class, updated request to use client_ip instead of client to be more representative of what will be returned (actual ipv6 ip instead of bracket wrapped ip)
* Fix ConnInfo init
* add ipv6 test - maybe will work?
* fixed silly indentation error
* Bump testing client
* Extend testing
* Fix text
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-06-16 22:34:52 +03:00
Aymeric Augustin
aff6604636
Upgrade websockets dependency. ( #2154 )
...
* Upgrade websockets dependency.
Fix #2142 .
* Bumpt sanic-testing version
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-06-16 21:49:50 +03:00
sanjeevanahilan
2c80571a8a
Update listeners.py ( #2164 )
...
fix typo
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-06-16 16:00:29 +03:00
Adam Hopkins
d964b552af
HTTPMethod enum ( #2165 )
...
* Add HTTP enum constants
* Tests
* Add some more string compat
2021-06-16 15:13:55 +03:00
Thomas Grainger
48f8b37b74
support app factory patten in CLI ( #2157 )
...
* support app factory patten in CLI
* Update sanic/__main__.py
* fix mypy errors
* Update mypy further
* Update sanic/utils.py
* Update sanic/utils.py
* support hypercorn/gunicorn style 'asgi.app:create_app()'
* add test for app factory
2021-06-09 12:05:56 +03:00
Adam Hopkins
141be0028d
Allow 8192 header max to be breached ( #2155 )
...
* Allow 8192 header max to be breached
* Add REQUEST_MAX_HEADER_SIZE as config value
* remove queue size
2021-06-04 13:56:29 +03:00
L. Kärkkäinen
a140c47195
Remove config.REQUEST_BUFFER_QUEUE_SIZE which was not being used since 21.03. ( #2156 )
...
Co-authored-by: L. Kärkkäinen <tronic@users.noreply.github.com>
2021-06-03 11:26:32 +03:00
Adam Hopkins
0c3a8392f2
Event autoregister ( #2140 )
...
* Add event autoregistration
* Setup tests
* Cleanup IDE added imports
* Remove unused imports
2021-06-01 10:44:07 +03:00
Adam Hopkins
16875b1f41
Disable MacOS Tests ( #2151 )
...
* Update pr-python37.yml
* Update workflows
2021-06-01 10:23:52 +03:00
Adam Hopkins
b1f31f2eeb
Alternatate classes on instantiation for Config and Sanic.ctx ( #2119 )
2021-06-01 00:21:31 +03:00
Adam Hopkins
d16b9e5a02
Cleanup conftest and fix warning message ( #2147 )
2021-05-31 22:41:41 +03:00
Adam Hopkins
680484bdc8
Update README.rst
2021-05-31 22:10:15 +03:00
Adam Hopkins
05cd44b5dd
Remove travis from repo ( #2149 )
...
* Remove travis from repo
* Use PR branch for Windows tests to add --user to pip args
2021-05-31 21:56:51 +03:00
Adam Hopkins
ba374139f4
Require stricter object names ( #2146 )
2021-05-30 15:37:44 +03:00
Adam Hopkins
72a745bfd5
Small improvements to CLI experience ( #2136 )
...
* Small improvements to CLI experience
* Add tests
* Add test server for cli testing
* Add LOGO logging to reloader and some additional context to logging debug
* Cleanup tests
2021-05-20 15:35:19 +03:00
Adam Hopkins
3a6fac7d59
Version prefix ( #2137 )
...
* Add version prefixing
* Versioning tests
* Testing BP group properties
2021-05-19 13:32:40 +03:00
Adam Hopkins
28ba8e53df
Implement 0.6 routing and some cleanup ( #2117 )
...
* Implement 0.6 routing and some cleanup
* Additional tests and annotation cleanup
* Resolve sorting
* cleanup test with encoding
2021-04-20 00:53:42 +03:00
Ajay Gupta
9b26358e63
add eof method to close stream ( #2094 )
...
* add eof method to close stream
* Add eof test
Co-authored-by: Ajay Gupta <ajay.gupta@1mg.com>
Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-04-18 02:46:34 +03:00