Stephen Sadowski
3411a12c40
Pipfile crud removed
2019-12-26 18:50:52 -06:00
Stephen Sadowski
28899356c8
Bumping up version from 19.12.0 to 19.12.0
2019-12-26 18:47:56 -06:00
Eli Uriegas
2b5f8d20de
ci: Add python nightlies to test matrix ( #1710 )
...
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2019-12-25 16:50:31 -08:00
Adam Hopkins
243f240e5f
Add RFC labels to stale exclusion list ( #1737 )
2019-12-23 17:31:33 -06:00
L. Kärkkäinen
0a25868a86
HTTP1 header formatting moved to headers.format_headers and rewritten. ( #1669 )
...
* HTTP1 header formatting moved to headers.format_headers and rewritten.
- New implementation is one line of code and twice faster than the old one.
- Whole header block encoded to UTF-8 in one pass.
- No longer supports custom encode method on header values.
- Cookie objects now have __str__ in addition to encode, to work with this.
* Add an import missed in merge.
2019-12-23 17:30:45 -06:00
Liran Nuna
fccbc1adc4
Allow empty body without Content-Type; Introduce response.empty() ( #1736 )
2019-12-23 14:16:53 -06:00
Adam Hopkins
3f6a978328
Swap out requests-async for httpx ( #1728 )
...
* Begin swap of requests-async for httpx
* Finalize httpx adoption and resolve tests
Resolve linting and formatting
* Remove documentation references to requests-async in favor of httpx
2019-12-20 19:23:52 -08:00
Harsha Narayana
a6077a1790
GIT-37: fix blueprint middleware application ( #1690 )
...
* GIT-37: fix blueprint middleware application
1. If you register a middleware via `@blueprint.middleware` then it will apply only to the routes defined by the blueprint.
2. If you register a middleware via `@blueprint_group.middleware` then it will apply to all blueprint based routes that are part of the group.
3. If you define a middleware via `@app.middleware` then it will be applied on all available routes
Fixes #37
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* GIT-37: add changelog
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-12-20 10:01:04 -06:00
Eli Uriegas
179a07942e
Merge pull request #1734 from seemethere/testing_host
...
testing: Add host argument to SanicTestClient
2019-12-18 16:50:59 -08:00
Eli Uriegas
c3aed01096
testing: Add host argument to SanicTestClient
...
Adds the ability to specify a host argument when using the
SanicTestClient.
Signed-off-by: Eli Uriegas <eliuriegas@fb.com >
2019-12-18 16:31:38 -08:00
7
028778ed56
Fix #1714 ( #1716 )
...
* fix abort call errors out when calling inside stream handler
* handle pending task properly after cleanup
2019-12-16 09:46:18 -06:00
Adam Bannister
2d72874b0b
Add return type to Sanic.create_server for type hinting and docs ( #1724 )
...
* add type hint and doc when create_server returns AsyncioServer
* fix linting
2019-12-12 10:25:13 -06:00
Seonghyeon Kim
4c45d30400
FIX: invalid rst syntax ( #1727 )
2019-12-12 10:24:11 -06:00
Junyeong Jeong
ecbe5c839f
pass request_buffer_queue_size argument to HttpProtocol ( #1717 )
...
* pass request_buffer_queue_size argument to HttpProtocol
* fix to use simultaneously only one task to put body to stream buffer
* add a test code for REQUEST_BUFFER_QUEUE_SIZE
2019-11-21 09:33:50 -06:00
Vinícius Dantas
ed1f367a8a
Reduce nesting for the sample authentication decorator ( #1715 )
...
* Reduce nesting for the sample authentication decorator
* Add missing decorator argument
2019-11-14 14:57:41 -06:00
Lagicrus
a4185a0ba7
Doc rework ( #1698 )
...
* blueprints
* class_based_views
* config
* decorators
* deploying
* exceptions
* extensions
* getting_started
* middleware
* request_data
* response
* routing
* static_files
* streaming
* testing
* versioning
* Fix bug and links
* spelling mistakes
* Bug fixes and minor tweaks
* Create 1691.doc.rst
* Bug fixes and tweaks
Co-Authored-By: Harsha Narayana <harsha2k4@gmail.com >
2019-11-14 14:11:38 -06:00
Harsha Narayana
e81a8ce073
fix SERVER_NAME enforcement in url_for and request.args documentation ( #1708 )
...
* 🐛 fix SERVER_NAME enforcement in url_for
fixes #1707
* 💡 add additional documentation for using request.args
fixes #1704
* ✅ add additional test to check url_for without SERVER_NAME
* 📝 add changelog for fixes
2019-11-01 10:32:49 -07:00
Harsha Narayana
e506c89304
deprecate None value support for app name ( #1705 )
...
* ➖ deprecate None value support for app name
* 🚨 cleanup linter issues across the codebase
2019-10-23 09:12:20 -07:00
Bruno Oliveira
fcdc9c83c5
Add 'python_requires' key to setup.py ( #1701 )
...
This key is important so that `pip` doesn't try to install `sanic` in unsupported Python versions:
https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
2019-10-14 21:17:05 -07:00
7
be0d539746
19.9.0 release ( #1699 )
2019-10-12 09:54:47 -05:00
Lagicrus
4f9739ed2c
Update helpers.py ( #1693 )
2019-10-08 16:29:03 -07:00
Lagicrus
0df37fa653
Update websocket.rst ( #1694 )
2019-10-08 16:28:09 -07:00
Eli Uriegas
3e932505b0
Bump up pytest version for fixing ci build ( #1689 )
...
Bump up pytest version for fixing ci build
2019-10-08 14:32:38 -07:00
Yun Xu
01be691936
misc: bump up pytest version for fixing ci build
2019-10-07 11:41:44 -07:00
Simon
134c414fe5
Support websockets 8.x as well as 7.x ( #1687 )
...
Sanic currently requires websockets 7.x, but it's straightforward to
also support the more recent 8.x.
2019-10-01 23:03:09 -07:00
L. Kärkkäinen
c54a8b10bb
Implement dict-like API on request objects for custom data. ( #1666 )
...
* Implement dict-like API on request objects for custom data.
* Updated docs about custom_context.
2019-09-26 14:11:31 -07:00
Vinícius Dantas
6fc3381229
Add a type checking pipeline ( #1682 )
...
* Integrate with mypy
2019-09-22 13:55:36 -07:00
Ashley Sommer
927c0e082e
Fix tests for multiprocessing pickle app and pickle blueprint ( #1680 )
...
The old tests were not quite checking for the right thing.
Fixing the test does not change Sanic code, expose any bugs, or fix any bugs.
2019-09-18 10:22:24 -07:00
Ashley Sommer
7674e917e4
Fixes "after_server_start" when using return_asyncio_server. ( #1676 )
...
* Fixes ability to trigger "after_server_start", "before_server_stop", "after_server_stop" server events when using app.create_server to start your own asyncio_server
See example file run_async_advanced for a full example
* Fix a missing method on AsyncServer that some tests need
Add a tiny bit more documentation in-code
Change name of AsyncServerCoro to AsyncioServer
2019-09-16 10:59:16 -07:00
ku-mu
e13f42c17b
Fix docstring style in Sanic.register_listener ( #1678 )
...
* Fix docstring style: google -> reST
2019-09-16 10:27:22 -07:00
Lagicrus
b7d4121586
Update static_files.md ( #1672 )
2019-09-11 14:37:14 -07:00
L. Kärkkäinen
fbcd4b9767
Sanic does not support Python 3.5 and won't need this code. ( #1670 )
...
* imports code cleanup as we dropping python3.5 support
2019-09-08 14:08:34 -07:00
7
17c5e28727
Merge pull request #1665 from snguyenthanh/fix-changelog-link
...
doc: fix the link to CHANGELOG in README.rst
2019-09-06 11:07:41 -07:00
Son
e62b29ca44
Fix link to CHANGELOG in README.rst
2019-09-02 21:51:45 +08:00
L. Kärkkäinen
1e4b1c4d1a
Forwarded headers and otherwise improved proxy handling ( #1638 )
...
* Added support for HTTP Forwarded header and combined parsing of other proxy headers.
- Accessible via request.forwarded that tries parse_forwarded and then parse_xforwarded
- parse_forwarded uses the Forwarded header, if config.FORWARDED_SECRET is provided and a matching header field is found
- parse_xforwarded uses X-Real-IP and X-Forwarded-* much alike the existing implementation
- This commit does not change existing request properties that still use the old code and won't make use of Forwarded headers.
* Use req.forwarded in req properties server_name, server_port, scheme and remote_addr.
X-Scheme handling moved to parse_xforwarded.
* Cleanup and fix req.server_port; no longer reports socket port if any forwards headers are used.
* Update docstrings to incidate that forwarded header is used first.
* Remove testing function.
* Fix tests and linting.
- One test removed due to change of semantics - no socket port will be used if any forwarded headers are in effect.
- Other tests augmented with X-Forwarded-For, to allow the header being tested take effect (shouldn't affect old implementation).
* Try to workaround buggy tools complaining about incorrect ordering of imports.
* Cleanup forwarded processing, add comments. secret is now also returned.
* Added tests, fixed quoted string handling, cleanup.
* Further tests for full coverage.
* Try'n make linter happy.
* Add support for multiple Forwarded headers. Unify parse_forwarded parameters with parse_xforwarded.
* Implement multiple headers support for X-Forwarded-For.
- Previously only the first header was used, so this BUGFIX may affect functionality.
* Bugfix for request.server_name: strip port and other parts.
- request.server_name docs claim that it returns the hostname only (no port).
- config.SERVER_NAME may be full URL, so strip scheme, port and path
- HTTP Host and consequently forwarded Host may include port number, so
strip that also for forwarded hosts (previously only done for HTTP Host).
- Possible performance benefit of limiting to one split.
* Fallback to app.url_for and let it handle SERVER_NAME if defined (until a proper solution is implemented).
* Revise previous commit. Only fallback for full URL SERVER_NAMEs; allows host to be defined and proxied information still being used.
* Heil lintnazi.
* Modify testcase not to use underscores in URLs. Use hyphens which the spec allows for.
* Forwarded and Host header parsing improved.
- request.forwarded lowercases hosts, separates host:port into their own fields and lowercases addresses
- forwarded.parse_host helper function added and used for parsing all host-style headers (IPv6 cannot be simply split(":")).
- more tests fixed not to use underscores in hosts as those are no longer accepted and lead to the field being rejected
* Fixed typo in docstring.
* Added IPv6 address tests for Host header.
* Fix regex.
* Further tests and stricter forwarded handling.
* Fix merge commit
* Linter
* Linter
* Linter
* Add to avoid re-using the variable. Make a few raw strings non-raw.
* Remove unnecessary or
* Updated docs (work in progress).
* Enable REAL_IP_HEADER parsing irregardless of PROXIES_COUNT setting.
- Also cleanup and added comments
* New defaults for PROXIES_COUNT and REAL_IP_HEADER, updated tests.
* Remove support for PROXIES_COUNT=-1.
* Linter errors.
- This is getting ridiculous: cannot fit an URL on one line, linter requires
splitting the string literal!
* Add support for by=_proxySecret, updated docs, updated tests.
* Forwarded headers' semantics tuning.
- Forwarded host is now preserved in original format
- request.host now returns a forwarded host if available, else the Host header
- Forwarded options are preserved in original order, and later keys override earlier ones
- Forwarded path is automatically URL-unquoted
- Forwarded 'by' and 'for' are omitted if their value is unknown
- Tests modified accordingly
- Cleanup and improved documentation
* Add ASGI test.
* Linter
* Linter #2
2019-09-02 08:50:56 -05:00
Subham Roy
ae91852cd5
check for already set asyncio event loop policy ( #1637 )
...
* check for already set asyncio event loop policy
* fix linting warning
2019-08-28 11:30:23 -05:00
L. Kärkkäinen
2011f3a0b2
PEP 594 has cgi module scheduled for deprecation in Python 3.8 ( #1649 )
...
* PEP 594 has cgi module scheduled for deprecation in Python 3.8. Reimplement
cgi.parse_header in Sanic. The new implementation is much faster than either
cgi.parse_header or equivalent werkzeug.parse_options_header, and unlike the
two, handles also quoted values with semicolons or \" in them.
* Fix string escape.
* Useless linter complaints.
* More linter issues
* Add return type hint.
* Do not support quoted-pair escapes.
- Improved documentation and renamed the function more aptly as it only seems
to apply to content-type and content-disposition headers.
* Unquote filenames also in normal mode.
* Add tests for headers. Adapted from CPython parse_header tests with changes on the final test.
* Linter
* Revert "Unquote filenames also in normal mode."
This reverts commit bf0d502bcd .
* Improved parse_content_header and added tests with Firefox and Chrome.
- Unescaping of quotes moved to parse_content_header because it affects all fields,
not just filenames.
- It is impossible to handle all cases correctly but the current heuristics should
suffice well for typical cases and beyond.
- Added comparisons with cgi.parse_header and werkzeug.parse_options_header.
* Updated comments as well.
2019-08-27 08:30:23 -05:00
7
228a31ee0a
Merge pull request #1657 from huge-success/release-19.6.3
...
release: 19.6.3
2019-08-21 23:00:51 -07:00
Yun Xu
8bf2bdff74
Bumping up version from 19.6.2 to 19.6.3
2019-08-20 18:51:17 -07:00
7
41862eca61
Merge pull request #1654 from huge-success/asgi-content-type
...
Add content-type headers in response in ASGI mode
2019-08-13 12:30:40 -07:00
Yun Xu
21307b397b
release: 19.6.3
2019-08-13 10:03:08 -07:00
7
3f9c94ba4a
Merge pull request #1635 from huge-success/upgrade-websockets
...
Upgrade websockets, resolve incompatible issue between multidict and websockets
2019-08-12 10:48:56 -07:00
Adam Hopkins
aa270d3ac2
Add content-type headers in response in ASGI mode
2019-08-11 11:29:08 +03:00
7
a15d9552c4
Merge pull request #1632 from harshanarayana/feature/GIT-1631-Enable_Towncrier
...
feature: GIT-1631 enable towncrier
2019-08-06 08:33:10 -07:00
7
2363c0653e
Merge pull request #1640 from Tronic/sockaddrfix
...
Fix server crash on request.server_port when bound to IPv6.
2019-07-25 00:10:56 -07:00
Harsha Narayana
651c98d19a
fix : #1631 : add ignore file to ensure empty changelog dir is retained
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-24 05:39:20 +05:30
Harsha Narayana
c1a7e0e3cd
feat: #1631 : enable change log as part of release script
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-24 05:32:00 +05:30
Harsha Narayana
80b32d0c71
feat: #1631 : enable make command to support settings up release
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-24 05:03:04 +05:30
Harsha Narayana
3842eb36fd
fix : #1631 : fix pyproject toml indentation
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-24 04:28:11 +05:30
L. Kärkkäinen
7c7bedfa5d
Fix server crash on request.server_port when bound to IPv6.
...
If no X-Forwarded-Port nor Host headers are present, Sanic uses "sockname"
to determine the port. This expected (host, port) tuple to be returned but
for IPv6 a 4-tuple is returned instead. Changed code so that port is picked
up in either case. Handling of "peername" was already correct in this regard.
_get_address and server_port both still return incorrect data or crash for
other socket types (e.g unix). Socket type should checked before any queries.
2019-07-22 15:32:57 +03:00
Yun Xu
5dafa9a170
bugfix: replace CIMultiDict with compat.Header in all places
2019-07-18 20:11:25 -07:00
Yun Xu
b397637bb9
bugfix: fix incompatible api between multidict and websockets, and bump up websockets version to match uvicorn
2019-07-18 19:57:17 -07:00
Harsha Narayana
95a0b2db2c
fix : #1631 : move pyproject.toml to avoid PEP 517 conflict
2019-07-14 14:26:22 +05:30
Harsha Narayana
83864f890a
fix : #1631 : add common contribution guidelines and towncrier detail to contribution guides
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-13 21:48:34 +05:30
Harsha Narayana
a019ff61e3
fix : #1631 : linter fix and tox platform selector
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-13 21:48:26 +05:30
Harsha Narayana
b3ada6308b
fix : #1631 : add doc test for travis CI
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-13 21:48:16 +05:30
Harsha Narayana
4e50295bf0
fix : #1631 : add tox test support for documentation
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-13 21:48:06 +05:30
Harsha Narayana
32eb8abb63
fix : #1631 : add towncrier support and fix documentation warnings
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-13 21:47:48 +05:30
7
84b41123f2
Merge pull request #1625 from harshanarayana/fix/GIT-1623-Cookie_Handling
...
fix: GIT-1623: handle cookie duplication and serialization issue
2019-07-10 21:35:35 -07:00
Harsha Narayana
23f2d33394
fix: GIT-1623: fix dict initalization for empty case
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-11 06:38:55 +05:30
Harsha Narayana
97f288a534
fix: GIT-1623: handle cookie duplication and serialization issue
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-07-08 13:03:33 +05:30
Adam Hopkins
68d5039c5f
Merge pull request #1624 from huge-success/release-19-6-2
...
19.6.2 release
2019-07-07 05:04:23 +03:00
Yun Xu
9d07988d75
19.6.2 release
2019-07-06 18:05:44 -07:00
7
1eaa2e3a5f
Merge pull request #1614 from huge-success/asgi-custom-request
...
Add custom request support to ASGI mode; fix a couple tests
2019-07-06 11:47:58 -07:00
Yun Xu
c7f2399ded
remove commented code
2019-07-06 11:34:22 -07:00
7
650ab61c2e
Merge pull request #1619 from huge-success/abc-fix
...
Resolve deprecation notice for import of an ABC from collections module
2019-07-04 15:07:53 -07:00
Lagicrus
b7df86e7dd
Updated routing docs ( #1620 )
...
* Updated routing docs
Updated routing docs to show all supported types as defined within 3685b4de85/sanic/router.py (L18)
Added example code for all examples besides regex
Added examples of queries that work with that type and ones that would not
* Tweak to call out string not str
Related to https://github.com/huge-success/sanic/pull/1620#discussion_r300120962
* Changed to using code comments to achieve a mono space like display
To address https://github.com/huge-success/sanic/pull/1620#discussion_r300120726
* Adjusted to list
Following https://github.com/huge-success/sanic/pull/1620#discussion_r300120726
2019-07-04 07:14:10 -05:00
BananaWanted
72b445621b
Respect X-Forward-* headers and generate correct URLs in url_for ( #1465 )
...
* handle forwarded address in request
* added test cases
* Fix lint errors
* Fix uncovered code branch
* Update docstrings
* Update documents
* fix import order
2019-07-04 07:13:43 -05:00
Adam Hopkins
ba0e9baffa
Resolve deprecation notice for import of an ABC from collections module
2019-07-03 09:39:38 +03:00
Adam Hopkins
503622438a
Merge pull request #1617 from newAM/patch-2
...
Fix a minor typo in websocket.rst.
2019-07-01 09:37:40 +03:00
Alex
d5e9aae425
Fix a minor typo in websocket.rst.
2019-06-30 22:11:02 -07:00
Adam Hopkins
a2666a2b8a
Add custom request support to ASGI mode; fix a couple tests
...
Undo change to request stream test
2019-06-24 22:59:23 +03:00
7
966b05b47e
Merge pull request #1612 from c-goosen/bandit_security_static_analysis
...
Add bandit code static analyzer for security.
2019-06-24 10:05:20 -07:00
Christo Goosen
78fe97b9cb
Add bandit code static analyzer for security, some false positives removed with #nosec.
...
Bandit is a python package for staticly scanning code for security issues.
* Added to tox.ini
* Added to setup.py
* Added to .travis.yml
As part of CI/CD pipeline
2019-06-24 09:53:29 +02:00
7
d2094fed38
Merge pull request #1607 from huge-success/doc-changelog
...
Changelog for 19.6.0 release
2019-06-21 09:42:12 -07:00
Yun Xu
e2d65ba57c
fix readthedoc changelog page
2019-06-20 22:35:47 -07:00
Yun Xu
c9d8ab4b27
release: add 19.6.0 standard release changelog
2019-06-20 22:35:26 -07:00
7
891f99d71d
Merge pull request #1475 from tomchristie/asgi-refactor-attempt
...
ASGI refactoring attempt
2019-06-20 16:33:44 -07:00
Adam Hopkins
3f47fa9f99
Specify websockets version
2019-06-19 00:40:44 +03:00
Adam Hopkins
b1c23fdbaa
Increase testing coverage for ASGI
...
Beautify
Specify websockets version
2019-06-19 00:38:58 +03:00
Adam Hopkins
62e0e5b9ec
Increase testing coverage for ASGI
...
Beautify
2019-06-19 00:19:40 +03:00
Adam Hopkins
fb61834a2e
Add ASGI documentation
2019-06-18 09:57:42 +03:00
7
8fbbe94fe1
Merge pull request #1436 from jotagesales/config_from_object_string
...
Config from object string
2019-06-16 16:58:43 -07:00
Adam Hopkins
ab706dda7d
Resolve linting issues with imports
2019-06-11 11:21:37 +03:00
Adam Hopkins
b2d4132a14
Merge branch 'master' into asgi-refactor-attempt
2019-06-11 11:11:32 +03:00
7
322cf89c92
Merge pull request #1605 from GTedHa/fix_typo/request_data_md
...
Fix typo in request_data.md, docs.
2019-06-10 20:20:12 -07:00
G.Ted
09acd64ba1
Fix typo in request_data.md, docs.
2019-06-11 11:09:29 +09:00
Eli Uriegas
072fcfe03e
Fix #1587 : add support for handling Expect Header ( #1600 )
...
Fix #1587 : add support for handling Expect Header
2019-06-10 14:45:37 -07:00
Harsha Narayana
13079c6e30
GIT-1591 Strict Slashes behavior fix ( #1594 )
...
* fix: GIT-1591: fix strict_slashes option inheriting behavior
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* doc: GIT-1591: add documentation exlaining the strict_slashes behavior
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* fix: GIT-1591: fix deprecated for test_client
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-06-06 07:21:58 -05:00
Yun Xu
1b1a51c1bb
minor: fix typo in error msg
2019-06-04 10:37:03 -07:00
Yun Xu
39d134994d
minor: address pr feedbacks, small refactoring and fix
2019-06-04 10:25:32 -07:00
Adam Hopkins
5f9e98554f
Run black and manually break up some text lines to correct linting
2019-06-04 13:26:05 +03:00
Adam Hopkins
0d9a21718f
Run black and manually break up some text lines to correct linting
2019-06-04 13:18:05 +03:00
Adam Hopkins
daf42c5f43
Add placement of before_server_start and after_server_stop
2019-06-04 12:59:15 +03:00
Adam Hopkins
3685b4de85
Lifespan and code cleanup
2019-06-04 10:58:00 +03:00
Yun Xu
2631f10c5e
lint: fix isort and flake8 complains
2019-06-03 22:12:10 -07:00
Yun Xu
f21db60859
fix: handle expect header
2019-06-03 22:08:24 -07:00
Adam Hopkins
c15158224b
Set testing.PORT on all app.create_server() in tests ( #1593 )
2019-05-30 09:10:00 -05:00
Adam Hopkins
a57c14c70b
Add requests-async as a hard requirement. See #1592 ( #1595 )
2019-05-28 08:30:07 -05:00
Adam Hopkins
bb2bd2fe53
Point extensions page to awesome-sanic repo ( #1596 )
2019-05-28 08:13:12 -05:00
Adam Hopkins
aebe2b5809
Merge branch 'master' into asgi-refactor-attempt
2019-05-27 21:03:23 +03:00
Adam Hopkins
9172399b8c
Implement ASGI lifespan events to match Sanic listeners
2019-05-27 12:33:25 +03:00
Adam Hopkins
22c0d97783
Streaming responses
2019-05-27 02:11:52 +03:00
Adam Hopkins
3ead529693
Setup streaming on ASGI
2019-05-27 00:57:50 +03:00
7
e36f398aa6
Merge pull request #1590 from huge-success/security-md
...
Create SECURITY.md
2019-05-23 17:40:19 -07:00
Adam Hopkins
18cd4caf70
Create SECURITY.md
2019-05-23 23:58:15 +03:00
7
80df45ba6d
Merge pull request #1588 from huge-success/prepare-19.6.0
...
Prepare 19.6.0
2019-05-22 16:32:36 -07:00
Yun Xu
16d262e3e5
release: v19.6.0
2019-05-22 15:51:56 -07:00
Harsha Narayana
83e3d4ca1f
doc: GIT-1582: add fedora package dependency
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-05-22 15:51:17 -07:00
zach valenta
1c9141bd5d
fix typo
2019-05-22 15:51:17 -07:00
Yun Xu
1b984422db
add help wanted in stale.yml
2019-05-22 15:51:17 -07:00
Adam Hopkins
b6453e9fac
Update stale.yml
2019-05-22 15:51:17 -07:00
Adam Hopkins
7b8e3624b8
Prepare initial websocket support
2019-05-22 01:42:19 +03:00
Adam Hopkins
8a56da84e6
Create SanicASGITestClient and refactor ASGI methods
2019-05-21 19:30:55 +03:00
7
14a00490e2
Merge pull request #1585 from harshanarayana/fix/GIT-1582-Fix_Install_Documentation
...
doc: GIT-1582: add fedora package dependency
2019-05-19 18:56:20 -07:00
Harsha Narayana
29bf967a7e
doc: GIT-1582: add fedora package dependency
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-05-20 06:46:18 +05:30
7
eeb79f2587
Merge pull request #1583 from zachvalenta/patch-1
...
fix typo
2019-05-18 15:56:09 -07:00
zach valenta
6d1741694d
fix typo
2019-05-18 15:05:03 -04:00
7
746dccf8f9
Merge pull request #1575 from huge-success/add-necessary-stale
...
Update stale.yml
2019-05-18 12:00:35 -07:00
Yun Xu
28a897e599
add help wanted in stale.yml
2019-05-18 11:02:46 -07:00
7
21ebf6d777
Merge pull request #1581 from huge-success/fix-build-time
...
Fix build time
2019-05-17 13:45:36 -07:00
Yun Xu
a2dbbb25a1
add try/finally block for always clean up resources
2019-05-17 00:25:46 -07:00
Yun Xu
2a64dabe82
fix request_timeout and request_streaming tests
2019-05-17 00:22:34 -07:00
Yun Xu
046ca6eaf1
fix unit tests due to dependency upgrade
2019-05-16 22:44:46 -07:00
Yun Xu
3661afa461
bump request-async version for fixing build time issue
2019-05-16 08:56:25 -07:00
7
12f1985375
Merge pull request #1576 from huge-success/conda-docs
...
Add conda install and download stats
2019-05-15 22:42:25 -07:00
Adam Hopkins
bb800c9db8
Add conda install and download stats
2019-05-15 09:54:02 +03:00
Adam Hopkins
262048df95
Update stale.yml
2019-05-15 07:46:58 +03:00
7
9255eb6902
Merge pull request #1573 from huge-success/doc-fix-for-35
...
Remove Python 3.5 references in docs
2019-05-14 09:15:52 -07:00
7
56d386f152
Merge pull request #1571 from huge-success/stale
...
Add stale to repo
2019-05-14 09:15:16 -07:00
Adam Hopkins
193dbe89cd
Remove Python 3.5 references in docs
2019-05-14 11:21:24 +03:00
Adam Hopkins
601e158ffe
Add stale to repo
2019-05-14 10:50:34 +03:00
7
42b9fa3779
Merge pull request #1570 from 5onic/FIX-add-missed-documentation
...
Added documentation for missed arguments
2019-05-12 21:53:30 -07:00
Adam Hopkins
4767a67acd
Merge branch 'master' into asgi-refactor-attempt
2019-05-12 22:57:02 +03:00
Mike Yusko
4c8cc84b64
Delete unnecessary whitespace
2019-05-12 15:36:13 +03:00
Mike Yusko
c5efc4b64b
Added documentation for missed arguments
2019-05-12 15:32:34 +03:00
7
25e2151fdf
Merge pull request #1568 from huge-success/deprecate-route-removal
...
deprecation: deprecate the use of remove_route
2019-05-11 02:24:11 +08:00
7
cb10e261a2
Merge pull request #1567 from huge-success/fix-readthedoc-build
...
minor: fix readthedoc build
2019-05-10 12:16:09 +08:00
Yun Xu
bd89c7f269
fix lint issue
2019-05-09 21:14:27 -07:00
Yun Xu
d4ef151cc4
deprecation: deprecate the use of remove_route
2019-05-09 20:52:24 -07:00
7
669cfa33df
Merge pull request #1566 from ketan86/developer-guide-improvements
...
developer guide enhancements.
2019-05-09 04:14:21 +08:00
7
f70ab2f68a
Merge pull request #1565 from ketan86/1564-processes-initialization-fix
...
1564 - Moving `processes` variable intialization before `sig_handler`.
2019-05-09 04:13:29 +08:00
Ketan Patel
900020ddc9
developer guide enhancements.
2019-05-08 00:40:40 -07:00
Ketan Patel
ec428135ce
1564 - Moving processes variable intialization before sig_handler.
2019-05-07 22:38:29 -07:00
Yun Xu
8e2a1a61a5
minor: fix readthedoc build
2019-05-07 16:51:24 -07:00
Adam Hopkins
5fb8f5d3e7
Add Awesome Sanic list button ( #1563 )
2019-05-06 07:47:16 -05:00
Adam Hopkins
c68523150f
Merge branch 'master' into asgi-refactor-attempt
2019-05-06 12:59:56 +03:00
7
ae2b8f0056
Merge pull request #1562 from huge-success/testing-client
...
Testing client
2019-05-03 06:32:26 +08:00
Eli Uriegas
ef6d78c580
Allow to disable Transfer-Encoding: chunked ( #1560 )
...
Allow to disable Transfer-Encoding: chunked
2019-04-30 14:56:27 -07:00
Adam Hopkins
ccd4c9615c
Create requests-async based TestClient, remove aiohttp dependency, drop Python 3.5
...
Update all tests to be compatible with requests-async
Cleanup testing client changes with black and isort
Remove Python 3.5 and other meta doc cleanup
rename pyproject and fix pep517 error
Add black config to tox.ini
Cleanup tests and remove aiohttp
tox.ini change for easier development commands
Remove aiohttp from changelog and requirements
Cleanup imports and Makefile
2019-04-30 15:26:06 +03:00
andreymal
7d6e60ab7d
Never use chunked transfer encoding for HTTP/1.0
2019-04-22 10:53:13 +03:00
andreymal
9615e37ef9
Add file streaming section to the streaming documentation page
2019-04-20 23:50:19 +03:00
andreymal
6be12ba773
Upadte documentation for streaming response
2019-04-20 23:38:16 +03:00
andreymal
03855d316b
Update tests for StreamingHTTPResponse
2019-04-20 22:27:10 +03:00
andreymal
9f07109616
Allow to disable Transfer-Encoding: chunked
2019-04-20 22:26:30 +03:00
7
6a4a3f617f
Merge pull request #1558 from andreymal/fix/graceful_shutdown
...
Fix graceful shutdown
2019-04-20 20:02:16 +08:00
Eli Uriegas
f32c9be41f
Merge pull request #1559 from andreymal/fix/pytest_behchmark_require
...
Add pytest-benchmark to tests_require
2019-04-19 15:52:39 -07:00
andreymal
d83d829e0a
Add pytest-benchmark to tests_require
2019-04-19 17:31:23 +03:00
andreymal
99e56ef74b
Fix broken bail_out when HttpProtocol is closed
2019-04-19 16:14:27 +03:00
andreymal
df23692802
Fix graceful shutdown (the connections set was always empty in serve function)
2019-04-19 15:58:17 +03:00
7
b68a7fe7ae
doc: fix README.rst for pip installing sanic without uvloop and ujson ( #1554 )
2019-04-17 08:48:21 -05:00
andreymal
5c9ba189bc
Add options to control the behavior of Request.remote_addr ( #1539 )
...
* Add options to control the behavior of Request.remote_addr
* Update tests for Request.remote_addr
* Update documentation for Request.remote_addr
2019-04-16 08:30:28 -05:00
7
5631a31099
Merge pull request #1553 from jrmi/master
...
Fix #1551 add missing parameter in create_server
2019-04-15 17:36:51 -07:00
Jeremie Pardou-Piquemal
f4bc0efc31
Fix #1551 missing parameter in create_server
2019-04-15 22:18:35 +02:00
7
53f45810ff
Fix #1528 ( #1549 )
...
* assign app before handle_request so that request.app could be used in case of connection timeout
* gitignore pip-wheel-metadata/
* remove default app for request class and fix lint issue
2019-04-12 07:48:32 -05:00
7
d58151a0eb
Merge pull request #1546 from krigar1184/master
...
Fixed a docstring typo and simplified code a little
2019-04-11 10:37:32 -07:00
Nikita Antonenkov
de582d2fc7
Refactor the app.route decorator
2019-04-06 22:26:56 +03:00
Nikita Antonenkov
653ac7ee14
Fix app.patch decorator docstring typo
2019-04-06 22:23:50 +03:00
Zaar Hai
0b4769289a
Drop dependency on disutils ( #1544 )
...
* Drop dependency on distutils
While distutils is part of stdlib, it feels odd to use distutils in main application code.
I personally use a (lean)[https://hub.docker.com/r/haizaar/python-minimal/tags ] Python distribution for running my applications that does not include distutils.
* Flake8 fixes
* "black" fixes
* strtobool should actually return bool
2019-04-02 08:22:26 -05:00
Daniel Golding
3bedb223fc
Add 19.03 release to changelog ( #1537 )
2019-03-29 10:34:13 -05:00
7
94a1720e04
Merge pull request #1541 from cakemanny/fix-number-route-accepting-invalid-float
...
stop number route accepting excess '.'s
2019-03-28 10:42:24 -07:00
Eli Uriegas
d0c8808340
Merge pull request #1542 from cakemanny/some-typo-fixes
...
Fix some typos in docs
2019-03-27 21:24:33 -07:00
cakemanny
dd32d81726
fix typos in docs
2019-03-28 01:05:39 +00:00
cakemanny
378a732968
fix expected float error message
2019-03-27 22:46:30 +00:00
cakemanny
b2e82685b4
stop number route accepting excess '.'s
...
We stop getting:
ValueError: could not convert string to float: '12.34.56'
when passing 12.34.56 as a number route parameter argument.
By accepting ".12" and "12.", this is a non-breaking change. All valid
floats described by [0-9\.]+ are still accepted, just invalid ones are
now rejected.
2019-03-27 02:49:05 +00:00
andreymal
566940e052
Fix typo in CONTRIBUTING.md: [.dev] -> .[dev] ( #1538 )
2019-03-26 11:08:08 -05:00
Eli Uriegas
dab802fbf4
Merge pull request #1530 from seemethere/bump_19031
...
Bump version to 19.03.1
2019-03-22 19:48:50 -07:00
Eli Uriegas
7bca95205d
Bump version to 19.03.1
...
Couldn't delete the release on github so we go with the next best thing
which is to just bump the patch version
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2019-03-22 16:44:28 -07:00
Eli Uriegas
669e2ed5b0
Merge pull request #1529 from huge-success/pypi-credentials
...
Update PyPI credentials
2019-03-22 16:41:12 -07:00
Eli Uriegas
783eb1a6e8
Merge pull request #1527 from seemethere/bump_1903
...
Bump version to 19.03.0
2019-03-22 16:40:54 -07:00
Adam Hopkins
9b9599b12f
Update PyPI credentials
2019-03-22 13:44:13 +02:00
Eli Uriegas
6ed0d3def7
Bump version to 19.03.0
...
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2019-03-21 16:24:57 -07:00
Amit Garu
c42731a55c
await keyword missing fix in response doc ( #1520 )
2019-03-19 07:15:28 -05:00
Sam Havens
abf8534ea9
fix typo in Asyncio example ( #1510 )
...
* fix typo
* args to kwargs
2019-03-15 12:28:15 -05:00
Moshe Zada
773a66bc5b
Fix typo ( #1516 )
2019-03-15 11:49:18 -05:00
Harsha Narayana
269100eac1
format: fix linter issue causing travis build failures ( fix #1514 ) ( #1515 )
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-03-14 12:18:47 -05:00
Serge Fedoruk
2a15583b87
add Request.not_grouped_args, deprecation warning Request.raw_args ( #1476 )
...
* add Request.not_grouped_args, deprecation warning Request.raw_args
* add 1 more test for coverage
* custom parser for Request.args and Request.query_args, some additional tests
* add docs for custom queryset parsing
* fix import sorting
* docstrings for get_query_args and get_args methods
* lost import
2019-03-14 09:04:05 -05:00
Jotagê Sales
b534df242b
rename config in class in test_config
2019-03-05 14:36:54 -03:00
Jotagê Sales
734730640a
added param package to relative imports
2019-03-05 01:40:17 -03:00
Jotagê Sales
bee7cfa6aa
Merge branch 'master' of github.com:huge-success/sanic into config_from_object_string
2019-03-05 01:10:09 -03:00
Daniel Thorn
d5813152ab
Allow sanic test client to bind to a random port ( #1376 )
2019-03-04 15:23:03 -06:00
Jotagê Sales
eacf78b83c
Merge branch 'master' of github.com:huge-success/sanic into config_from_object_string
2019-03-04 00:37:59 -03:00
Harsha Narayana
348964fe12
Enable Middleware Support for Blueprint Groups ( #1399 )
...
* enable blueprint group middleware support
This commit will enable the users to implement a middleware at the
blueprint group level whereby enforcing the middleware automatically to
each of the available Blueprints that are part of the group.
This will eanble a simple way in which a certain set of common features
and criteria can be enforced on a Blueprint group. i.e. authentication
and authorization
This commit will address the feature request raised as part of Issue #1386
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* enable indexing of BlueprintGroup object
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* rename blueprint group file to fix spelling error
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* add documentation and additional unit tests
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* cleanup and optimize headers in unit test file
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* fix Bluprint Group iteratable method
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* add additional unit test to check StopIteration condition
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* cleanup iter protocol implemenation for blueprint group and add slots
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* fix blueprint group middleware invocation identification
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* feat: enable list behavior on blueprint group object and use append instead of properly to add blueprint to group
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-03-03 16:26:05 -06:00
Markus Lång
e5c7589fc0
Remove update_current_time refresh ( #1502 )
2019-03-03 11:22:26 -06:00
Ashley Sommer
4260528645
Fix the auto_reloader to work when the executable was launched with a module, rather than a script. ( #1501 )
2019-03-03 11:03:26 -06:00
Harsha Narayana
34fe26e51b
Add Route Resolution Benchmarking to Unit Test ( #1499 )
...
* feat: add benchmark tester for route resolution and cleanup test warnings
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* feat: refactor sanic benchmark test util into fixtures
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2019-02-28 08:56:41 -06:00
PWZER
8a59907319
Recognizes non-ASCII filenames in RFC 2231, and suport filename length is zero for multipart/form-data. ( #1497 )
...
* suport filename length is 0
* 1. suport filename length is zero for multipart/form-data.
2. Now recognizes non-ASCII filenames in RFC 2231, "filename*" format
3. Add some test cases in tests/test_requests.py::test_request_multipart_files.
* reformat sanic/request.py
2019-02-28 08:55:32 -06:00
7
52deebaf65
Merge pull request #1490 from chenjr0719/fix_doc_build
...
Fix python version in doc build
2019-02-19 16:26:56 -08:00
jacob
1e05b22fbc
Fix python version in environment.yml
2019-02-18 14:02:45 +08:00
7
ab56af5d15
Merge pull request #1489 from tomchristie/patch-1
...
Added "databases"
2019-02-15 16:43:38 -08:00
Tom Christie
123f00eee6
Added "databases"
...
Adds https://github.com/encode/databases to the "Database Integration" section.
2019-02-14 13:44:18 +00:00
Mykhailo Kushchenko
42bf103269
Remove deleted repo ( #1487 )
...
https://github.com/Sniedes722/Sanic-OAuth (Sanic-OAuth: OAuth Library for connecting to & creating your own token providers.) returns 404
2019-02-08 08:43:43 -06:00
0xflotus
c8d2a462e3
did you mean specific? ( #1486 )
2019-02-06 16:28:32 -06:00
Leonardo Teixeira Menezes
08794ae1cf
Enforce Datetime Type for Expires on Set-Cookie ( #1484 )
...
* Enforce Datetime Type for Expires on Set-Cookie
* Fix lint issues
* Format code and improve error type
* Fix import order
2019-02-06 12:29:33 -06:00
Kevin ZHANG Qing
4f70dba935
sanic-zipkin ( #1483 )
2019-02-05 07:59:33 -06:00
Enda Farrell
b926a2c9b0
sanic#1480 Allow negative int/number in path ( #1481 )
...
* sanic#1480 Allow negative int/number
* Rerun ``make beautify`` on this change.
2019-02-05 07:54:48 -06:00
Jacob
52bdd1d5a2
Add stream support for bp.add_route() ( #1482 )
...
* Fix #1454
* Update doc
* Fix F632 in response.py
2019-02-05 07:47:46 -06:00
7
bc7d0f0da5
Merge pull request #1478 from chenjr0719/fix_doc_build
...
Upgrade setuptools version and use native docutils in doc build
2019-01-21 22:42:51 -08:00
jacob
6a8e9c9e95
Add deps based on docs extras require, Remove unnecessary deps
2019-01-22 14:05:29 +08:00
jacob
211a922f3c
Upgrade setuptools version and use native docutils
2019-01-21 10:16:57 +08:00
7
2758a3ade6
Merge pull request #1472 from xxNB/dev
...
Remove unwanted None check for __repr__ in `Request` class
2019-01-20 14:21:57 -08:00
7
ef3c9eae73
Merge pull request #1477 from kyb3r/patch-2
...
Fix grammar in README.md
2019-01-20 14:21:27 -08:00
7
9cf2e1b519
Merge pull request #1470 from denismakogon/create-server
...
make Sanic.create_server return an asyncio.Server
2019-01-20 14:21:11 -08:00
Kyber
51c2f7a599
Use backticks
2019-01-19 20:10:44 +11:00
Kyber
5bdd046b11
Fix grammar in README.md
...
> It allows usage the async and await syntax
Doesn't make sense.
2019-01-19 20:08:47 +11:00
Tom Christie
95526a82de
ASGI refactoring attempt
2019-01-18 14:50:42 +00:00
章昕
af7ad0a621
Remove unwanted None check for __repr__ in class
2019-01-17 00:24:11 +08:00
Denis Makogon
1473753d43
linter fix
2019-01-15 17:48:26 +02:00
Denis Makogon
b36bd21813
fix uvloop check
2019-01-15 17:45:47 +02:00
Denis Makogon
f8f0241c27
refactor uvloop detection in its own method
2019-01-15 17:33:53 +02:00
Denis Makogon
1af16836d4
make tests dependent on uvloop
2019-01-15 17:30:32 +02:00
Denis Makogon
757974714e
skip tests if python version is not 3.7 at least
2019-01-15 17:27:41 +02:00
Denis Makogon
eed22a7a24
Fix app.create_server calls
2019-01-15 15:47:35 +02:00
Denis Makogon
0242bc999f
Fix type asserting
2019-01-15 15:11:38 +02:00
Denis Makogon
b89c533818
Adding doc
2019-01-15 15:04:30 +02:00
Denis Makogon
2cb05ab865
More tests, attempting to fix CI
2019-01-15 14:52:53 +02:00
Denis Makogon
391639210e
make Sanic.create_server return an asyncio.Server
...
- adding 2 new parameters to Sanic.create_server:
* return_asyncio_server=False - defines whether there's
a need to return an asyncio.Server or run it right away
* asyncio_server_kwargs=None - for python 3.7 uvloop doesn't
support all necessary features like "start_serving",
so, in order to make sanic work well with asyncio from 3.7
there's a need to introduce generic way for passing
kwargs for "loop.create_server"
Closes : #1469
2019-01-15 13:38:47 +02:00
7
99f34c9f50
Merge pull request #1457 from huge-success/max-age-integer
...
enforce integer for max-age cookie
2019-01-13 13:15:10 -08:00
Raphael Deem
d418cc9950
formatting
2019-01-12 20:41:35 -08:00
Raphael Deem
6dfafb0787
test float handling
2019-01-12 20:41:35 -08:00
Raphael Deem
7067295e67
enforce integer for max-age cookie
2019-01-12 20:41:35 -08:00
Eli Uriegas
2af229eb1a
Merge pull request #1445 from huge-success/r0fls-977
...
add handler name to request as endpoint
2019-01-08 16:12:25 -08:00
7
8dd8e9916e
upgrade pytest version that compatible with pytest-cov, fixes some caplog unit tests ( #1464 )
2019-01-08 09:15:23 -06:00
7
96af1fe7cf
Merge pull request #1460 from huge-success/18.12-changelog
...
18.12 Changelog
2019-01-06 22:33:37 -08:00
Yun Xu
cb3a03356b
added changelogs to README and readthedocs
2019-01-06 13:50:40 -08:00
Yun Xu
68aa2ae3ce
added changelog for 18.12 release
2019-01-06 13:44:18 -08:00
7
52de354e24
Merge pull request #1442 from Amanit/feature/gunicorn-logging
...
add an option to change access_log using gunicorn
2019-01-05 11:40:55 -08:00
7
f4f90cada4
Merge pull request #1449 from chenjr0719/add_amending_request_object_example
...
Add example of amending request object
2019-01-02 18:32:24 -08:00
Jotagê Sales
62420e0f40
resolve conflict
2019-01-02 21:19:40 -02:00
Sergey Fedoruk
102e651741
refactor typing imports
2019-01-02 23:28:06 +01:00
Sergey Fedoruk
65daaaf64b
linteger fix and delete old tests
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
b7a6f36e95
add type annotations in run and create_server
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
a86a10b128
add control of access_log argument type
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
0b728ade3a
change Config.__init__
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
74f05108d7
async test for access_log in create_server
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
9d4d15ddc7
add config tests
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
0c5c6dff8f
fix linting
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
391fcdc83d
fix access_log in run server and fix bool in env variables
2019-01-02 23:28:05 +01:00
Sergey Fedoruk
d76d5e2c5f
add an option to change access_log using gunicorn
2019-01-02 23:28:05 +01:00
jacob
f0ada573bb
Fix a grammar error
2019-01-02 20:37:26 +08:00
jacob
ec5b790b51
Extend example of modifying the request in middleware document
2019-01-02 17:29:01 +08:00
jacob
613b23748d
Add example of amending request object
2019-01-02 14:52:25 +08:00
Adam Hopkins
cea1547e08
Merge pull request #1446 from huge-success/ahopkins-patch-1
...
Update README.rst
2019-01-01 14:51:05 +02:00
7
fd5ae01e1d
Merge pull request #1444 from ja8zyjits/master
...
Updated README.md
2018-12-31 11:49:03 -08:00
Adam Hopkins
9b6b93d467
Update README.rst
2018-12-31 21:41:35 +02:00
Adam Hopkins
ca179c12a1
Update README.rst
2018-12-31 18:47:27 +02:00
Adam Hopkins
4d527035ae
Add dotted endpoint notation and additional tests
2018-12-31 13:40:07 +02:00
Jitesh Nair
19b42830ea
Merge pull request #1 from ja8zyjits/ja8zyjits-patch-1-readme
...
Update README.rst
2018-12-31 16:01:01 +05:30
Jitesh Nair
f5162f8ab1
Update README.rst
...
Made the optional Environment variable declaration for installation more clear.
2018-12-31 16:00:34 +05:30
7
ff38a3c6b6
Merge pull request #1443 from huge-success/new-readme
...
Update README with new logo, change Congfig.LOGO, run linter
2018-12-30 13:23:12 -08:00
Adam Hopkins
94e85686b5
Ignore first row of logs when no uvloop
2018-12-30 14:07:21 +02:00
Adam Hopkins
aea4a8ed33
Modify test_logo runner
2018-12-30 13:46:08 +02:00
Adam Hopkins
05dd3b2e9d
Run linter
2018-12-30 13:18:06 +02:00
Adam Hopkins
040468755c
Change ASCII Logo
...
Update logo text
Reformat app.py
2018-12-30 12:49:23 +02:00
Adam Hopkins
50b359fdb2
Update README.rst
...
Add new logo and update contents of README.
Update README.rst
Fix image syntax.
Update README.rst
Fix README links.
2018-12-30 11:48:59 +02:00
7
72f2e18a84
Merge pull request #1440 from harshanarayana/fix/Contribution_Guide_Pip_Install
...
fix minor type and pip install instruction mismatch
2018-12-28 18:43:41 -08:00
Jotagê Sales
b36dc22b45
resolve conflict in setup.py
2018-12-28 12:08:10 -02:00
Harsha Narayana
15b1c875f5
fix minor type and pip install instruction mismatch
2018-12-28 11:32:30 +05:30
7
13804dc380
Merge pull request #1424 from harshanarayana/enh/Documentation_Update
...
Documentation Enhancements
2018-12-27 21:30:02 -08:00
Harsha Narayana
9bea23da29
fix makefile phony targets
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:03 +05:30
Harsha Narayana
7005fabd4d
add code beautification task to makefile
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:03 +05:30
Harsha Narayana
de8c37ad00
fix pip install typo in contribution page
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:03 +05:30
Harsha Narayana
a80499c4b7
update installation steps to be consistent across documentation and readme
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:03 +05:30
Harsha Narayana
82f7f847ba
cleanup requirements and move dependency inside setup.py
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:03 +05:30
Harsha Narayana
4880761fe0
add setuputil based test running and makefile support
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:02 +05:30
Harsha Narayana
87ab0b386d
fix current version in setup.cfg for relase script
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:02 +05:30
Harsha Narayana
c42c274002
update manifest configuration
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:02 +05:30
Harsha Narayana
2d82b8951f
make release script black compliant and tweak documentation with indexing and format
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:24:02 +05:30
Harsha Narayana
b7702bc3e8
add monitoring examples and documents
2018-12-28 10:22:28 +05:30
Harsha Narayana
9c6b83501f
add release note chnage log generation
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
5189d8b14c
fix string formatting error in git commands for release script
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
e13053ed89
add automated calendar version manager
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
efa77cf5ec
add api documentation for router and server
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
f6355bd075
add additional examples to documentation
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
e3dfce88ff
fix linter issues
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
939b5ea095
update copyright date and add example section with category
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
e6fba01682
add documentation for cookies, exception, blueprint and handlers
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:28 +05:30
Harsha Narayana
1623d397be
categorize the sanic extensions list
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:27 +05:30
Harsha Narayana
09678d601d
add sanic app module documentations
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-12-28 10:22:27 +05:30
7
67d51f7e1b
Merge pull request #1423 from yunstanford/request-streaming-support
...
basic request streaming support with flow control
2018-12-27 18:06:02 -08:00
7
aa7f2759a6
Merge pull request #1438 from yunstanford/master
...
18.12 Release
2018-12-27 11:15:07 -08:00
Yun Xu
9b9dd67797
adopt CalVer: MM.YY.MICRO, 18.12.0 release
2018-12-27 11:00:38 -08:00
7
3f73bc075a
Merge pull request #1437 from FlouieInCl/master
...
Fix typo in exceptions.md
2018-12-27 09:59:00 -08:00
Jotagê Sales
f2a55d01ea
fix error in import_string
2018-12-27 15:20:58 -02:00
Yun Xu
56989a017b
18.12 release
2018-12-27 08:55:17 -08:00
Jotagê Sales
bf029c1b9d
added docstring to helper function import_string
2018-12-27 14:35:04 -02:00
JeongKyungSeo
ada5918bc8
Fix typo in exceptions.md
2018-12-27 16:11:37 +09:00
Jotagê Sales
375ebd39f0
fix pep8 errors
2018-12-26 21:28:42 -02:00
Jotagê Sales
a33ebbaf11
remove dependence and implmented import_string
2018-12-26 21:19:54 -02:00
Jotagê Sales
19b304b0fc
fix doc
2018-12-26 18:31:43 -02:00
Jotagê Sales
0b64fe6746
create a documentation for config path
2018-12-26 18:27:02 -02:00
Jotagê Sales
e978121d58
configure app from object by path string
2018-12-26 16:23:16 -02:00
Jacob
4efd450b32
Add tests ( #1433 )
...
* Add tests for remove_route()
* Add tests for sanic/router.py
* Add tests for sanic/cookies.py
* Disable reset logging in test_logging.py
* Add tests for sanic/request.py
* Add tests for ContentRangeHandler
* Add tests for exception at response middleware
* Fix cached_handlers for ErrorHandler.lookup()
* Add test for websocket request timeout
* Add tests for getting cookies of StreamResponse, Remove some unused variables in tests/test_cookies.py
* Add tests for nested error handle
2018-12-22 09:21:45 -06:00
Omar Ryhan
d2670664ba
Update exceptions.md ( #1431 )
...
Documented error handling from ``app.error_handler.add``
Documented custom error handling by subclassing.
2018-12-22 09:21:03 -06:00
7
fa7405fe9c
Merge pull request #1422 from ashleysommer/server_slots
...
Add in some server.py __slots__ attribute names that are missing.
2018-12-15 13:58:22 -08:00
Jacob
33297f48a5
Add tests ( #1430 )
2018-12-13 11:50:50 -06:00
Yun Xu
956793e066
address review feedback, small code refactoring
2018-12-09 15:18:33 -08:00
Yun Xu
1bfbc67c62
expose request_buffer_queue_size to be configurable and update documentation
...
fix StreamBuffer buffer_size
2018-12-04 20:21:00 -08:00
Yun Xu
b5287184e9
fix lint
...
fix isort
2018-12-03 23:25:41 -08:00
Yun Xu
7c9957e058
update README.rst (clean up badges)
2018-12-03 23:03:14 -08:00
Yun Xu
fca7cb9fb0
update request streaming doc
2018-12-03 22:51:09 -08:00
Yun Xu
268d254d85
fix unit tests
2018-12-03 22:28:22 -08:00
Yun Xu
181adebf82
add StreamBuffer for request flow control
2018-12-03 22:19:26 -08:00
Ashley Sommer
06297a1918
Add in some server.py __slots__ property names that are missing.
2018-12-03 11:22:17 +10:00
Harsha Narayana
aa0874b6d8
100% Coverage for Sanic Blueprint ( #1419 )
...
* add unit tests to completely cover blueprints
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
* fix typo in the unit test code
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-11-25 13:56:34 -06:00
7
822ced6294
Merge pull request #1416 from chenjr0719/add_tests_for_static
...
Add tests for static and update document
2018-11-21 23:01:37 +08:00
jacob
1a59614f79
Add stream_large_files and host examples in static_file document
2018-11-20 14:28:08 +08:00
jacob
f2d528e52a
Add tests for static
2018-11-20 12:28:00 +08:00
Hasan Ramezani
f7adc5f84c
Fix remove_entity_headers helper function ( #1415 )
...
* Fix `remove_entity_headers` helper function
* Add test for `remove_entity_headers` helper function
2018-11-19 09:30:53 -06:00
7
e955e833c4
Merge pull request #33 from huge-success/master
...
Merge upstream master branch
2018-11-16 13:02:16 +08:00
Tim&Anna
096c44b910
Update extensions.md ( #1263 )
...
* Update extensions.md
add an extension: sanic-script
* Update extensions.md
2018-11-14 07:16:43 -06:00
Nir Galon
efb9a42045
Change deprecated verify_ssl to ssl ( #1155 )
2018-11-14 07:16:14 -06:00
7
296cda7801
Merge pull request #1411 from devArtoria/patch-2
...
ADD: Sanic-JWT-Extended extension to extension docs
2018-11-13 13:49:35 +08:00
Lewis
90b9d73244
ADD: Sanic-JWT-Extended extension
2018-11-13 14:39:29 +09:00
Richard K
c8b0e7f2a7
Created methods to append and finish body content on Request ( #1379 )
...
* created methods to append and finish body content on request.py so the underlying body instance can have certain flexibility; modified server.py to reflect these changes
* - made some adjustments (including the Request.body_init method) as requested by @ahopkins;
- created a new test with a custom Request class implementation of the flexibility provided by the new methods;
2018-11-12 09:11:41 -06:00
7
6ce88ab5a4
Merge pull request #1400 from chenjr0719/add_tests_for_log
...
Add test for sanic.root logger and update the docs of logging
2018-11-12 20:45:05 +08:00
7
e13ab805df
Merge pull request #1409 from yunstanford/windows-ci
...
CI Support for Windows
2018-11-12 20:05:21 +08:00
Yun Xu
e58ea8c7b4
fix unit test for windows ci
...
fix unit tests for windows ci
add appveyor build status badge
add readthedoc build status badge
2018-11-12 01:04:53 -08:00
jacob
dd5bac61cb
Update document for logging
2018-11-12 16:09:12 +08:00
Jacob
6270b27a97
Merge branch 'master' into add_tests_for_log
2018-11-12 09:53:44 +08:00
Hasan Ramezani
f89ba1d39f
Add tests for is_entity_header and is_hop_by_hop_header helper functions ( #1410 )
2018-11-11 10:57:57 -06:00
Yun Xu
8b5d137d8f
fix .appveyor.yml
2018-11-10 06:11:01 -08:00
Yun Xu
2629fab649
add .appveyor.yml for windows ci support
2018-11-10 05:50:22 -08:00
7
92cd10c6a8
Merge pull request #32 from huge-success/master
...
merge upstream master branch
2018-11-10 21:26:37 +08:00
7
cc3edb90dc
Merge pull request #1408 from harshanarayana/feature/Unit_Test_Enhancements
...
Additional Unit Tests
2018-11-10 20:46:51 +08:00
Harsha Narayana
c60ba81984
cleanup stale test for cookie object
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-11-10 16:54:24 +05:30
Harsha Narayana
ece3cdaa2e
add unit tests for App Config, Cokkies and Request handler
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-11-10 16:50:30 +05:30
7
4cb40f2042
Merge pull request #1403 from harshanarayana/fix/GIT-1398-Http_Response_Content_Length_Mismatch
...
Fix Content-Length Mismatch while using json and ujson
2018-11-10 00:14:03 +08:00
7
0e9f350982
Merge pull request #1405 from hramezani/test_has_message_body
...
Add test for has_message_body helper function.
2018-11-08 22:20:07 +08:00
Hasan Ramezani
cf439f01f8
Add test for has_message_body helper function.
2018-11-07 21:29:12 +01:00
Harsha Narayana
f1f1b8a630
add additional test cases to validate Content-Length header
...
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-11-07 22:07:28 +05:30
Harsha Narayana
d4d1df03c9
fix content length mismatch in windows and other platform
...
The current implementation of `sanic` attempts to make use of `ujson` if
it's available in the system and if not, it will default to the inbuilt
`json` module provided by python.
The current implementation of `ujson` does not provide a mechanism to
provide a custom `seperators` parameter as part of the `dumps` method
invocation and the default behavior of the module is to strip all the
spaces around seperators such as `:` and `,`. This leads to an
inconsistency in the response length when the response is generated
using the `ujson` and in built `json` module provided by python.
To maintain the consistency, this commit overrides the default behavior
of the `dumps` method provided by the `json` module to add a `seperators`
argument that will strip the white spaces around these character like
the default behavior of `ujson`
This addresses the issue referenced in #1398
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-11-07 21:38:32 +05:30
Harsha Narayana
92b73a6f4f
fix Range header handling for static files ( #1402 )
...
This commit fixes the issue in the `Range` header handling that was done
while serving the file contents.
As per the HTTP response standards, a status code of 206 will be used in
case if the Range is returning a partial value and default of 200 in
other cases.
Signed-off-by: Harsha Narayana <harsha2k4@gmail.com >
2018-11-07 07:36:56 -06:00
Meng Wang
b63c06c75a
fix the logger and make it work ( #1397 )
...
* fix the logger and make it work
* modify test_logging parameters and add a new unit test
2018-11-06 08:39:38 -06:00
jacob
3e3bce422e
Add test for sanic.root logger and update the docs of logging
2018-11-06 21:27:01 +08:00
Stephen Sadowski
e3a27c2cc4
Merge pull request #1391 from AndresSan6/loop_exception
...
Handle "loop" exception in app.py
2018-11-05 08:19:01 -06:00
Stephen Sadowski
f13f451084
Merge pull request #1385 from lixxu/master
...
update doc for latest blueprint code
2018-11-05 07:40:12 -06:00
Stephen Sadowski
df0e3de911
Merge pull request #1393 from ashleysommer/pickleable-app-blueprint
...
Fix pickling blueprints Fixes #1392
2018-11-05 07:24:15 -06:00
Ashley Sommer
8466be8728
Fix type pikcle->pickle in multiprocessing test
2018-11-04 15:27:25 +10:00
Ashley Sommer
5cf2144b3f
Fix pickling blueprints
...
Change the string passed in the "name" section of the namedtuples in Blueprint to match the name of the Blueprint module attribute name.
This allows blueprints to be pickled and unpickled, without errors, which is a requirment of running Sanic in multiprocessing mode in Windows.
Added a test for pickling and unpickling blueprints
Added a test for pickling and unpickling sanic itself
Added a test for enabling multiprocessing on an app with a blueprint (only useful to catch this bug if the tests are run on Windows).
2018-11-04 15:04:12 +10:00
Andres Sanchez
7c182f63c8
Indentation fix
2018-11-01 10:59:45 -06:00
Andres Sanchez
056180782c
Removed unnecessary changes to request and router files, changes to fix lint test
2018-11-01 10:53:53 -06:00
Andres Sanchez
ff0d5870e9
Merge branch 'lintfix' into loop_exception
...
Made changes unnecesarry changes in request and router files, went back to previous commit and made correct changes to fix lint
2018-11-01 10:40:47 -06:00
Andres Sanchez
b70176f8c7
Fixed character limit per line in requested changes for app.py
2018-11-01 10:36:34 -06:00
Andres Sanchez
e3655b525d
Modifications to ruequest and router files to fix linting issues.
2018-11-01 10:04:40 -06:00
Andres Sanchez
e63d0091af
Assert was chnaged for an if and updated error messages
2018-10-31 15:23:29 -06:00
Andres Sanchez
7b0af2d80d
Handle loop exception in app.py
2018-10-31 13:35:03 -06:00
Stephen Sadowski
7d79a86d4d
Merge pull request #1387 from huge-success/docbuild
...
Resolve build of latex documentation relating to markdown lists
2018-10-30 16:13:29 -05:00
Adam Hopkins
ba46aff069
Resolve build of latex documentation relating to markdown lists
2018-10-30 22:39:17 +02:00
lixxu
7a65471ba5
update doc for latest blueprint code
2018-10-29 16:54:34 +08:00
Stephen Sadowski
c7c46da975
Merge pull request #1383 from huge-success/docbuild
...
Fix documentation build errors
2018-10-26 08:19:10 -05:00
Adam Hopkins
c708e8425f
Fix documentation build errors
2018-10-26 11:57:28 +03:00
Eli Uriegas
905c51bef0
Merge pull request #1371 from yunstanford/integrate-isort
...
codestyle: Integrate isort
2018-10-23 16:05:36 -07:00
Eli Uriegas
bd87098b7e
Merge pull request #1368 from yunstanford/fix-redirect
...
Add '%' to quote_plus's `safe` parameter in response.redirect
2018-10-23 15:12:02 -07:00
Eli Uriegas
5f486cc25f
Merge pull request #1378 from hramezani/fix_some_lint_error
...
Fix some test files lint errors.
2018-10-23 15:10:15 -07:00
Eli Uriegas
f79fb72a33
Merge pull request #1377 from yunstanford/fix-readthedoc-build
...
Fix readthedoc build
2018-10-23 15:07:25 -07:00
Yun Xu
0505aa2dda
refactor import
2018-10-23 14:53:39 -07:00
Hasan Ramezani
485ff32e42
Fix all test files lint errors.
2018-10-23 11:04:17 +02:00
Stephen Sadowski
5ead67972f
Merge pull request #1375 from sjsadowski/master
...
Added documentation for AF_INET6 and AF_UNIX socket usage
2018-10-21 15:28:40 -05:00
Yun Xu
9c860dbff3
fix readthedoc build
2018-10-21 01:56:48 -07:00
Stephen Sadowski
a20ad99638
Added documentation for AF_INET6 and AF_UNIX socket usage
2018-10-19 13:33:01 -05:00
Yun Xu
8ef7bf8e7b
integrate with isort
2018-10-17 21:20:16 -07:00
7
0d5be1969a
Merge pull request #31 from huge-success/master
...
Merge Upstream master branch
2018-10-17 21:02:44 -07:00
Adam Hopkins
d06ea9bfc3
Merge pull request #1370 from huge-success/ahopkins-patch-1
...
Update issue templates
2018-10-17 09:47:22 +03:00
Adam Hopkins
57e79882e1
Update issue templates
2018-10-16 15:42:52 +03:00
Yun Xu
20d1ab60c7
remove unused json import
2018-10-15 22:13:42 -07:00
Yun Xu
277c2ce2d2
fix redirect with quoted param
2018-10-15 21:53:11 -07:00
7
34e51f01d1
Merge pull request #30 from huge-success/master
...
Merge Upstream Master Branch
2018-10-15 20:04:57 -07:00
7
f4b4e3a58c
Merge pull request #1366 from hramezani/lint_test_blueprints
...
Fix some lint errors and warnings in `tests/test_blueprints.py`
2018-10-14 21:02:48 -07:00
7
def2e033c8
Merge pull request #1365 from yunstanford/codestyle-black
...
Codestyle black
2018-10-14 10:07:09 -07:00
Hasan Ramezani
dfec18278b
Fix some lint errors and warnings in tests/test_blueprints.py.
2018-10-14 16:09:47 +02:00
Yun Xu
cd5bdecda3
add codestyle badge in README
2018-10-13 18:33:02 -07:00
Yun Xu
9b6217ba41
fix travisci
2018-10-13 18:19:08 -07:00
Yun Xu
272f6e195d
added black for lint check
2018-10-13 18:10:43 -07:00
Yun Xu
aa9bf04dfe
run black against sanic module
2018-10-13 17:55:33 -07:00
7
9ae6dfb6d2
Merge pull request #29 from huge-success/master
...
merge upstream master branch
2018-10-13 17:28:32 -07:00
7
619bb79a2f
Merge pull request #1336 from untitaker/logging-refactor
...
Try not to stringify exception in logging messages
2018-10-13 16:54:57 -07:00
7
0cad831eca
Merge pull request #1364 from yunstanford/raise-exception-when-param-conflicts
...
Raise exception when param conflicts
2018-10-13 16:28:59 -07:00
Yun Xu
f15a7fb588
fix flake8
2018-10-12 23:06:43 -07:00
Yun Xu
1bdf9ca057
add py37 in setup.py
2018-10-12 22:58:49 -07:00
Yun Xu
c8c370b784
raise exception when param conflicts in route
2018-10-12 22:57:56 -07:00
7
63182f55f7
Merge pull request #28 from huge-success/master
...
Merge upstream master branch
2018-10-12 22:38:37 -07:00
Stephen Sadowski
41759248e2
Merge pull request #1361 from yunstanford/cancel-request-when-connection-lost
...
Cancel request when connection lost
2018-10-12 07:25:10 -05:00
Yun Xu
3149d5a66d
add unit test for request_stream
2018-10-11 23:12:33 -07:00
Yun Xu
8b13597099
add unit tests for verifying
2018-10-11 23:02:21 -07:00
Yun Xu
36032cc26e
cancel task when connection_lost
2018-10-11 22:38:26 -07:00
7
4cb107aedc
Merge pull request #27 from huge-success/master
...
Merge upstream master branch
2018-10-11 22:34:09 -07:00
7
176f8d1981
Merge pull request #1358 from hramezani/fix_config_tests
...
Change the config test to remove `NamedTemporaryFile`
2018-10-11 21:39:48 -07:00
Hasan Ramezani
9a26030bd5
Change the config test to remove NamedTemporaryFile
2018-10-11 17:34:46 +02:00
Stephen Sadowski
6778f4d9e0
Merge pull request #1342 from hramezani/load_config_file_syntax_error
...
Handle syntax error in load config file.
2018-10-11 08:56:48 -05:00
Stephen Sadowski
fd61b9e3e2
Merge pull request #1327 from hatarist/fix-1323
...
Rename the `http` module to `helpers`
2018-10-11 07:56:51 -05:00
Stephen Sadowski
298d5cdf24
Merge pull request #1334 from chenjr0719/master
...
Fix TypeError when use Blueprint.group() to group blueprint with defa…
2018-10-11 07:28:10 -05:00
7
1bf1c9d006
Merge pull request #26 from huge-success/master
...
Merge upstream master branch
2018-10-10 20:33:57 -07:00
7
7dc62be5cf
Merge pull request #1335 from abuckenheimer/fix_windows_unittests
...
unittests passing on windows again
2018-10-10 20:15:35 -07:00
jacob
be580a6a5b
Clean up files created by pytest-html
2018-10-11 10:06:05 +08:00
7
8ce519668b
Merge pull request #1353 from abn/fix-unhandled-exception
...
Simplify request ip and port retrieval logic
2018-10-09 23:33:51 -07:00
jacob
801258c46a
Merge branch 'master' of github.com:chenjr0719/sanic
2018-10-10 14:04:45 +08:00
jacob
32a1db3622
Remove normpath
2018-10-10 14:04:21 +08:00
7
ed1f3daacc
Merge pull request #1352 from devArtoria/patch-1
...
Fix missing quotes in decorator example
2018-10-08 21:57:34 -07:00
Alec Buckenheimer
b7d74c82ba
simplified aiohttp version diffs, reverted worker import policy
2018-10-08 22:48:21 -04:00
Arun Babu Neelicattu
c3b31a6fb0
Simplify request ip and port retrieval logic
...
This change also ensures that cases where transport stream is
already closed is handled gracefully.
2018-10-08 21:25:47 +02:00
Hasan Ramezani
f4c55bbc07
Handle config error in load config file.
2018-10-08 19:17:06 +02:00
Lewis
a16842f7bc
Fix missing quotes in decorator example
2018-10-08 18:59:15 +09:00
7
439a38664f
Merge pull request #25 from huge-success/master
...
Merge upstream master branch
2018-10-07 20:32:52 -07:00
7
5cc12fd945
Merge pull request #1348 from hramezani/add_config_test
...
Add test for `config.from_object`.
2018-10-07 19:53:58 -07:00
7
fe116fff5a
Merge pull request #1350 from hramezani/config_documentation
...
Add missed documentation for config section.
2018-10-07 13:58:06 -07:00
Stephen Sadowski
06aaaf4727
Merge pull request #1351 from yunstanford/integrate-with-codecov
...
Integrate with codecov
2018-10-07 10:13:31 -05:00
Yun Xu
6deb9b49b2
correct Codecov badge url
2018-10-06 21:39:04 -07:00
Yun Xu
d59e92d3e5
integrate with codecov
2018-10-06 21:31:04 -07:00
7
cc83c1f0cf
Merge pull request #24 from huge-success/master
...
merge upstream master branch
2018-10-06 21:22:54 -07:00
Hasan Ramezani
1fe7306af8
Add missed documentation for config section.
2018-10-07 01:32:36 +02:00
Hasan Ramezani
c796d73fc3
Add test for config.from_object.
2018-10-07 00:14:37 +02:00
Markus Unterwaditzer
eb93f884f3
fix: Missing import
2018-10-05 16:47:12 +02:00
Markus Unterwaditzer
3673feb256
fix: typo
2018-10-05 16:33:46 +02:00
Markus Unterwaditzer
7c9c783e9d
deprecate Handler.log
2018-10-05 16:31:01 +02:00
Stephen Sadowski
74a4b9efaa
Merge pull request #1345 from huge-success/ahopkins-patch-1
...
Update README.rst
2018-10-04 18:45:47 -05:00
Stephen Sadowski
4466e8cce1
Merge pull request #1304 from ignatenkobrain/fedora
...
Switch to websockets 6.0
2018-10-04 18:45:22 -05:00
Adam Hopkins
b689037984
Update README.rst
2018-10-04 12:31:57 +03:00
Stephen Sadowski
db1ba21d88
Merge pull request #1343 from vltr/httptools_pinned
...
pinned httptools requirement to version 0.0.10+
2018-10-03 19:27:25 -05:00
Eli Uriegas
50d270ef7c
Merge pull request #1316 from sjsadowski/master
...
Updated changelog.md for 0.8.x
2018-10-03 15:19:21 -07:00
Richard Kuesters
d1a578b555
pinned httptools requirement to version 0.0.10+
2018-10-03 12:22:29 -03:00
Stephen Sadowski
76e9859cf8
Merge branch 'master' into master
2018-10-03 09:56:29 -05:00
Stephen Sadowski
add9d363c5
Merge branch 'master' into logging-refactor
2018-10-03 09:55:01 -05:00
Stephen Sadowski
1498baab0f
Merge pull request #1338 from hramezani/improve_config_test
...
Check error message and fix some lint error in test config.
2018-10-03 09:18:46 -05:00
Stephen Sadowski
df7f63d45d
Merge branch 'master' into improve_config_test
2018-10-03 06:30:44 -05:00
Stephen Sadowski
f7425126a1
Merge pull request #1341 from ashleysommer/unnecessary_code
...
Fixes #1340
2018-10-03 06:30:22 -05:00
Ashley Sommer
790047e450
Fixes #1340
2018-10-03 10:59:24 +10:00
Stephen Sadowski
9198b5b0be
Merge branch 'master' into improve_config_test
2018-10-02 13:21:23 -05:00
Stephen Sadowski
d534acb79d
Merge branch 'master' into logging-refactor
2018-10-01 15:41:07 -05:00
Hasan Ramezani
d100f54551
Check error message and fix some lint error in test config.
2018-10-01 20:36:21 +02:00
Stephen Sadowski
7a9e100b0f
Merge branch 'master' into fix_windows_unittests
2018-10-01 10:10:48 -05:00
Stephen Sadowski
fafe23d7c2
Merge pull request #1337 from cmcaine/fix-error-msg
...
Fix whitespace in error message
2018-10-01 09:31:45 -05:00
Alec Buckenheimer
9a08bdae4a
fix flake8 linelength errors
2018-10-01 09:46:18 -04:00
Colin Caine
bcc11fa7fe
Fix whitespace in error message
2018-09-30 09:36:55 +01:00
Markus Unterwaditzer
7d0c0fdf7c
fix: Namespacing of sanic logger
2018-09-29 22:40:05 +02:00
Markus Unterwaditzer
0e33d46ead
Try not to stringify exception in logging messages
...
This just fixes the worst offenders that trip up error reporting tools
like Sentry.io
2018-09-29 22:32:51 +02:00
Alec Buckenheimer
efbacc17cf
unittests passing on windows again
2018-09-29 13:54:47 -04:00
jacob
bd6dbd9090
Fix TypeError when use Blueprint.group() to group blueprint with default url_prefix, Use os.path.normpath to avoid invalid url_prefix like api//v1
2018-09-29 18:23:16 +08:00
Eli Uriegas
076cf51fb2
Merge pull request #1305 from Stranger6667/app-fixture
...
Reuse app fixture in tests
2018-09-26 18:30:46 -07:00
Igor Hatarist
f8a6af1e28
Rename the http module to helpers to prevent conflicts with the built-in Python http library ( fixes #1323 )
2018-09-25 20:46:40 +03:00
Stephen Sadowski
96912f436d
Corrected Raphael Deem's name in changelog - sorry @r0fls!
2018-09-24 09:05:58 -05:00
Raphael Deem
f0e162442f
Merge branch 'master' into app-fixture
2018-09-21 15:16:00 -07:00
Eli Uriegas
04b8dd989f
Merge pull request #1315 from seemethere/multidocs
...
Add multidict to readthedocs environment.yml
2018-09-15 19:03:56 +02:00
Stephen Sadowski
5851c8bd91
revised formatting for CHANGELOG.md
2018-09-14 13:30:57 -05:00
Stephen Sadowski
78efcf93f8
Updated changelog for all accepted PRs from 0.7.0 to Current
2018-09-14 10:56:32 -05:00
Eli Uriegas
bb35bc3898
Add multidict to readthedocs environment.yml
...
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2018-09-14 16:00:29 +02:00
Stephen Sadowski
f38783bdef
Merge pull request #1 from huge-success/master
...
Merge from head
2018-09-14 08:20:37 -05:00
Channel Cat
d8f9986089
Re-releasing with updated credentials
2018-09-13 02:24:31 -07:00
Channel Cat
3e616b599a
update encrypted creds for new org
2018-09-13 02:17:27 -07:00
Channel Cat
d38fc17191
Update version to test pypi
2018-09-13 01:50:32 -07:00
Channel Cat
7ae0eb0dc3
Transfer ownership
2018-09-13 01:39:24 -07:00
Channel Cat
9082eb56a7
Update version to circumvent pypi upload errors
2018-09-06 13:51:31 -07:00
Igor Gnatenko
c578974246
Switch to websockets 6.0
...
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com >
2018-09-02 09:23:30 +02:00
dmitry.dygalo
fec81ffe73
Reuse app fixture in tests
2018-08-26 16:43:14 +02:00
Ashley Sommer
30e6a310f1
Pausable response streams ( #1179 )
...
* This commit adds handlers for the asyncio/uvloop protocol callbacks for pause_writing and resume_writing.
These are needed for the correct functioning of built-in tcp flow-control provided by uvloop and asyncio.
This is somewhat of a breaking change, because the `write` function in user streaming callbacks now must be `await`ed.
This is necessary because it is possible now that the http protocol may be paused, and any calls to write may need to wait on an async event to be called to become unpaused.
Updated examples and tests to reflect this change.
This change does not apply to websocket connections. A change to websocket connections may be required to match this change.
* Fix a couple of PEP8 errors caused by previous rebase.
* update docs
add await syntax to response.write in response-streaming docs.
* remove commented out code from a test file
2018-08-18 18:12:13 -07:00
Eli Uriegas
a87934d434
Merge pull request #1292 from seemethere/increment_080
...
Increment to 0.8.0
2018-08-17 11:52:47 -07:00
Eli Uriegas
b398c1fe72
Increment to 0.8.0
...
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2018-08-17 11:43:15 -07:00
Eli Uriegas
6f813f940e
Merge pull request #1278 from ashleysommer/graceful_cancel
...
Gracefully handle when the request_handler_task is cancelled.
2018-08-17 11:41:39 -07:00
Eli Uriegas
d52498b787
Merge pull request #1284 from ashleysommer/aiohttp_update
...
Fix broken tests when aiohttp >= 3.3.0
2018-08-17 11:40:49 -07:00
Ashley Sommer
79e35bbdf6
Fix auto_reload in Linux ( #1286 )
...
* Fix two problems with the auto_reloader in Linux.
1) Change 'posix' to 'linux' in sys.plaform check, because 'posix' is an invalid value and 'linux' is the correct value to use here.
2) In kill_process_children, don't just kill the 2nd level procs, also kill the 1st level procs.
Also in kill_process_children, catch and ignore errors in the case that the child proc is already killed.
* Fix flake8 formatting on PR
2018-08-16 23:30:03 -07:00
Innokenty Lebedev
1814ff05f4
Add sse extension ( #1288 )
2018-08-16 11:59:58 -07:00
Ashley Sommer
ec226e33cb
Pin aiohttp <= 3.2.1 in requirements-dev.txt (fixes errors for new contributors checking out the code and setting up a dev environment)
...
Future-proof the some test cases so they work with aiohttp >= 3.3.0, in case we bump the aiohttp version in the future.
2018-08-16 15:00:23 +10:00
hqy
6abdf9f9c1
fixed #1143 ( #1276 )
...
* fixed #1143
* fixed build failed with create_serve call _helper failed
2018-08-15 10:23:04 -07:00
abuckenheimer
212da1029e
disabled auto_reload by default in windows ( #1280 )
2018-08-07 11:48:18 -07:00
Ashley Sommer
afea15e4a7
Add a test for the graceful CancelledError handling. The user app should _never_ see a CancelledError bubble up, nor should they be able to catch it, because the response is already sent at that point.
2018-08-06 15:02:12 +10:00
Ashley Sommer
39ff02b6e4
Modifications the handle_request function to detect and gracefully handle the case that the request_handler Task is canceled by the sanic server while it is handling the request. One common occurrence of this is when the server issues a ResponseTimeout error, it also cancels the response_handler Task.
...
The Canceled exception handler purposely sets `response` to `None` to drop references to the handler coroutine, in an attempt to preemptively release resources.
This commit also fixes a possible reference-before-assignment of the `response` variable in the `handle_request` function.
Finally, another byproduct of this change is that ResponseMiddleware will no longer run if the `response` is `None`.
2018-08-06 14:12:30 +10:00
Cosmo Borsky
b238be54a4
Add content_type flag to Sanic.static ( #1267 )
...
* Add content_type flag to Sanic.static
Fixes #1266
* Fix flake8 error in travis
Add line to document `content_type` arg
* Fix content_type for file streams
Update tests
herp derp
* Remove content_type as an arg to HTTPResponse
`response.HTTPResponse` will default to `headers['Content-Type']` instead of `content_type`
https://github.com/channelcat/sanic/pull/1267#discussion_r204190913
2018-07-20 22:31:15 -07:00
Cosmo Borsky
377c9890a3
Support status code for file reponse ( #1269 )
...
Fixes #1268
2018-07-20 13:39:10 -07:00
ciscorn
599834b0e1
Add subprotocols param to add_websocket_route ( #1261 )
2018-07-16 12:20:26 -07:00
John Doe
a39a7ca9d5
Add url_bytes to Request ( #1258 )
...
We need to have access to the raw unparsed URL.
2018-07-16 12:13:27 -07:00
Ave
cd22745e6b
Sanitize the URL before redirecting ( #1260 )
...
* URL Quote the URL before redirecting
* Use safe url instead of unsafe one
* Fix query params
* fix build
* Whitelist all reserved characters from rfc3986
* Add tests for redirect url sanitizing
* Remove check for resulting URL on header injection test
The thing the tests are testing for can be implemented in other
ways that don't redirect to 100% the same address, but they'll all have
to match the remaining parts of the test to succeed.
2018-07-12 21:31:33 -07:00
7
334649dfd4
Fix response ci header ( #1244 )
...
* add unit tests, which should fail
* fix CIDict
* moving CIDict to avoid circular imports
* fix unit tests
* use multidict for headers
* fix cookie
* add version constraint for multidict
* omit test coverage for __main__.py
* make flake8 happy
* consolidate check in for loop
* travisci retry build
2018-07-11 01:44:21 -07:00
fanjindong
becbc5f9ef
fix one example and add one example ( #1257 )
2018-07-11 01:42:34 -07:00
7
a7dd73c657
Merge pull request #23 from channelcat/master
...
py37 (#1256 )
2018-07-03 22:12:02 -07:00
7
f9b29fd7e7
py37 ( #1256 )
...
* add py37 to travisci
* use dist:xenial for py37
* sudo: true in .travici
* bump websockets version for py37 support and fix unit tests
2018-07-03 22:07:08 -07:00
7
f770e16f6d
Merge pull request #22 from channelcat/master
...
merge upstream master branch
2018-06-26 23:33:35 -07:00
Arnulfo Solís
9092ee9f0e
HTTP Entity Headers ( #1127 )
...
* introduced basic entity and hopbyhop header identification
* removed entity headers
* coding style fixes
* remove unneeded header check
* moved from bytes to unicode in headers
* changed list to tuple in empty response statuses
2018-06-26 22:25:25 -07:00
GaryO
01257f65a6
Make auto reloader work on Mac ( #1249 )
2018-06-18 15:16:10 -07:00
7
c1222175b3
Merge pull request #21 from channelcat/master
...
remote tracking
2018-06-10 20:17:27 -07:00
Volodymyr Maksymiv
5ff481952d
add UUID support ( #1241 )
2018-06-09 01:16:17 -07:00
7
baa689ad43
Fix failed build and add websockets version specifier ( #1239 )
...
* add websockets version constraint
* fix failed build
2018-06-07 10:07:26 -07:00
Philip Xu
2f30f4f69f
Fixed #1231 - release resource no matter what ( #1232 )
2018-06-06 14:43:57 -07:00
Raphael Deem
202a4c6525
make request truthy if has transport ( #1222 )
2018-05-16 14:12:12 -07:00
7
7928b9b3a2
Merge pull request #20 from channelcat/master
...
merge upstream master branch
2018-04-29 21:50:07 -07:00
Adam Hopkins
e1c9020268
Update extensions.md ( #1205 )
...
Changing the description of [Sanic JWT](https://github.com/ahopkins/sanic-jwt ) to include permission scoping
2018-04-29 18:41:17 -07:00
Philip Xu
04a12b436e
Added Sanic-Auth, Sanic-CookieSession and Sanic-WTF to Extensions doc ( #1210 )
2018-04-29 18:40:18 -07:00
Fantix King
818a8c2196
Added GINO to Extensions doc ( #1200 )
2018-04-21 21:02:49 -07:00
Arnulfo Solís
b6715464fd
added init docs ( #1167 )
2018-04-01 20:53:08 -07:00
Raphael Deem
8f2d543d9f
default to auto_reload in debug mode ( #1159 )
...
* default to auto_reload in debug mode
* disable auto-reload in testing client
2018-04-01 20:52:56 -07:00
Raphael Deem
6cf320bedb
Merge pull request #1181 from kot83/patch-1
...
rename function in examples to post_json
2018-03-29 20:13:48 -07:00
kot83
a850ce5086
rename function to something else
...
function already defined
2018-03-29 15:57:10 -07:00
Raphael Deem
ef3bdf5408
Merge pull request #1180 from ashleysommer/fix_aiohttp_breakages
...
Fix failing tests when aiohttp>=3.1.0
2018-03-29 01:05:50 -07:00
Ashley Sommer
94b9bc7950
Some of the tests in Sanic (test_request_timout, test_response_timeout, test_keep_alive_timeout) use a custom SanicClient with modified methods. This relies on overriding internal aiohttp Client classes.
...
In aiohttp 3.1.0 there were some breaking changes that caused the custom methods to be no longer compatible with latest upstream aiohttp Client class.
See: 903073283f
and: b42e0ced46
This commit adds aiohttp version checks to adapt to these changes.
2018-03-29 11:54:59 +10:00
Raphael Deem
8a07463a67
Merge pull request #1175 from PyManiacGR/patch-1
...
Fix try_everything example.
2018-03-28 00:41:07 -07:00
PyManiac
2995b23929
Update try_everything.py
2018-03-24 15:55:15 +02:00
TheRubyDoggy
eb4276373b
Fix try_everything example.
2018-03-24 15:34:41 +02:00
Raphael Deem
79df52e519
Merge pull request #1169 from charlax/patch-1
...
Clarify arguments to request/response middleware
2018-03-21 10:46:09 -07:00
Charles-Axel Dein
3dfb31b1b9
Clarify arguments to request/response middleware
2018-03-21 12:07:26 +01:00
Raphael Deem
c4c4ed70d9
Merge pull request #1163 from vopankov/master
...
Add __weakref__ to Request slots
2018-03-17 14:52:25 -07:00
Raphael Deem
45422df1b7
Merge pull request #1162 from yunstanford/fix-hang-build
...
Fix hang build and failed builds
2018-03-16 11:14:44 -07:00
Yun Xu
e0b7624414
fix hang build
2018-03-15 22:06:58 -07:00
Yun Xu
b0ecb3170f
fix hang build
2018-03-15 22:03:36 -07:00
Yun Xu
fc8b5f378a
migrate to trusty
2018-03-15 21:39:21 -07:00
Yun Xu
d42cb7ddb3
fix hang build
2018-03-15 21:28:52 -07:00
Панков Василий
6454ac0944
Add __weakref__ to Request slots
2018-03-14 13:37:15 +03:00
7
31cf83f10b
Merge pull request #19 from channelcat/master
...
merge upstream master branch
2018-03-13 22:11:40 -07:00
Raphael Deem
cc84005593
Merge pull request #1157 from kinware/feature/add-route-streams
...
Allow streaming handlers in app.add_route()
2018-03-13 00:08:25 -07:00
Kinware
915d2732a1
Allow streaming handlers in add_route
2018-03-12 20:21:59 +01:00
Raphael Deem
44bc47361e
Merge pull request #1149 from channelcat/travis-retry
...
use travis_retry on tox
2018-03-06 15:54:19 -08:00
Raphael Deem
3619b07843
Merge pull request #1146 from yunstanford/upgrade-test-client
...
Upgrade test client
2018-03-01 23:18:20 -08:00
Raphael Deem
ad3f588c79
use travis_retry on tox
2018-03-01 23:16:49 -08:00
Yun Xu
a2fc37121b
migrating all to async syntax
2018-03-01 22:35:58 -08:00
Raphael Deem
7f36d20123
Merge pull request #1145 from yingshaoxo/patch-1
...
add an necessary import for better understanding
2018-02-28 01:19:29 -08:00
Yun Xu
d1a8e8b042
fixed unit tests
2018-02-27 22:25:38 -08:00
Yun Xu
c39ddd00d3
workaround fix for an issue in aiohttp.Client
2018-02-27 21:42:41 -08:00
Yun Xu
d55e453bd5
cleaning up
2018-02-27 20:26:49 -08:00
Raphael Deem
bffed27bdb
Merge pull request #1142 from clarksun/patch-1
...
exception.md code sample miss 'async' prefix
2018-02-27 01:03:47 -08:00
7
fffcb158f1
Merge pull request #18 from channelcat/master
...
Merge upstream master branch
2018-02-26 22:19:30 -08:00
Yun Xu
eca98a54eb
fixed all unit tests
2018-02-26 22:18:21 -08:00
Yun Xu
46ed2c5270
upgrade aiohttp for test_client
2018-02-26 22:08:05 -08:00
Sun Wei
23ea0b7ec9
exception.md code sample miss 'async' prefix
2018-02-26 16:09:26 +08:00
yingshaoxo
ef26cb283b
add an necessary import for better understanding
...
add `from sanic.response import redirect`
2018-02-26 11:24:54 +08:00
Eli Uriegas
b8bb77eff6
Merge pull request #1137 from Julien00859/1136
...
sanic.handlers.ErrorHandler.response handler call was too restrictive
2018-02-21 09:55:52 -06:00
Julien00859
9c75ad3de1
close #1136
2018-02-21 00:50:27 +01:00
Eli Uriegas
0b38dea613
Merge pull request #1117 from abuckenheimer/env_dependent_ujson_uvloop
...
only install ujson and uvloop with cpython on non windows machines
2018-02-20 13:13:21 -06:00
Raphael Deem
7e4a9e3bc2
Merge pull request #1047 from Yaser-Amiri/master
...
Add auto reloading.
2018-02-16 11:11:49 -08:00
Raphael Deem
36f12c822f
Merge pull request #1122 from knowsuchagency/master
...
add app.register_listener method
2018-02-15 16:58:27 -08:00
Raphael Deem
0cbea0f5d3
Merge pull request #1129 from cloudship/patch-1
...
raw requires a bytes-like object
2018-02-14 20:44:40 -08:00
panxb
e735fe54c3
raw requires a bytes-like object
...
raw requires a bytes-like object, or an object that implements __bytes__, not 'str'
2018-02-15 00:11:37 +08:00
Stephan Fitzpatrick
e911e2e1df
updated doc
2018-02-13 23:58:03 -08:00
Stephan Fitzpatrick
1d75f6c2be
changed docstring spacing
2018-02-13 10:15:16 -08:00
Raphael Deem
ad8a168469
Merge pull request #1121 from tandalf/issue-1120
...
Fixed bug when passing a list into route decorator's host argument #1120
2018-02-12 12:48:13 -08:00
Raphael Deem
74fc502089
Merge pull request #1124 from yunstanford/add-doc
...
Expose WebSocket Param and Add Doc
2018-02-11 02:02:13 -08:00
Yun Xu
dfc2166d8b
add websocket.rst to index.rst
2018-02-10 12:21:23 -08:00
Yun Xu
2b70346db4
fix doc
2018-02-09 21:32:09 -08:00
Yun Xu
090df6f224
add websocket section in doc
2018-02-09 21:26:39 -08:00
Yun Xu
745a1d6e94
document websocket args
2018-02-09 21:03:21 -08:00
Yun Xu
0fe0796870
expose websocket protocol arguments
2018-02-09 20:44:02 -08:00
7
224b56bd3a
Merge pull request #17 from channelcat/master
...
merge from upstream sanic
2018-02-09 20:12:29 -08:00
Stephan Fitzpatrick
571b5b544d
added app.register_listener method w/test
2018-02-09 14:01:17 -08:00
Timothy Ebiuwhe
220b40f7f4
Added regression tests for issue #1120
2018-02-09 22:33:34 +01:00
Timothy Ebiuwhe
60774c5a49
Fixed bug that occurs on calling @app.route or any of it's variants
...
causes a route to be added twice. One without the slash, the other with the
Setting strict_slashes to false when a route does not end with slashes
slash. This is ok if the Router._add method runs linearly, but problematic
when it runs recursively. Unfortunately recursion is triggered when
the host param to the Router._add function is a list of hosts.
2018-02-09 22:27:20 +01:00
Raphael Deem
6d37ef7256
Merge pull request #1109 from DirkGuijt/master
...
fixed bug in multipart/form-data parser
2018-02-08 00:11:20 -08:00
Dirk Guijt
e083224df1
changed bewline formatting
2018-02-07 09:29:44 +01:00
Alec Buckenheimer
5ef567405f
fixed platform from windows to win32
2018-02-06 19:56:25 -05:00
Raphael Deem
ea2521f430
Merge pull request #1112 from boboldehampsink/extend_websocketprotocol_arguments
...
Extend WebSocketProtocol arguments
2018-02-06 15:05:58 -08:00
Alec Buckenheimer
82cb182fe7
added pip requirement to only install ujson and uvloop with cpython on non windows machines
2018-02-06 09:57:16 -05:00
Raphael Deem
3fe31ff551
Merge pull request #1104 from arnulfojr/minor/keep-alive-timeout-log-level
...
KeepAlive Timeout log level change to debug
2018-02-02 18:54:24 -08:00
Dirk Guijt
48d45f1ca4
sorry, style issue again
2018-02-03 03:14:04 +01:00
Dirk Guijt
ddf2a604d1
changed 'file' variable to 'form_file' to prevent overwriting the reserved word
2018-02-03 03:07:07 +01:00
Raphael Deem
8b920d9d56
Merge pull request #1113 from arnulfojr/bugfix/content-length-header-on-X04
...
Content Length header on 204 and 304 responses
2018-02-02 13:18:08 -08:00
Arnulfo Solis
f2c0489452
replaced comparison for in operator
2018-02-02 20:19:15 +01:00
Arnulfo Solis
f5a2d19199
touch commit
2018-02-02 14:13:14 +01:00
Arnulfo Solis
86fed12d91
less flake8 warnings in response test
2018-02-02 14:05:57 +01:00
Arnulfo Solis
7ca3ad5d4c
no body and content length to 0 when 304 response is returned
2018-02-02 13:24:51 +01:00
Dirk Guijt
1eecffce97
fixed minor flake8 style problem
2018-02-02 09:57:06 +01:00
Dirk Guijt
5c341a2b00
made field name mandatory in multipart/form-data headers
...
A field name in the Content-Disposition header is required by the multipart/form-data spec. If one field/part does not have it, it will be omitted from the request. When this happens, we log it to DEBUG.
2018-02-02 09:43:42 +01:00
Arnulfo Solis
0ab64e9803
simplified logic when handling the body
2018-02-02 09:29:54 +01:00
Dirk Guijt
27108334f1
Merge branch 'master' of https://github.com/DirkGuijt/sanic
2018-02-02 00:55:58 +01:00
Dirk Guijt
788253cbe8
changes based on discussion on PR #1109
2018-02-02 00:55:51 +01:00
Arnulfo Solis
4b6e89a526
added one more test
2018-02-01 20:00:32 +01:00
Arnulfo Solis
68fd1b66b5
Response model now handles the 204 no content
2018-02-01 17:51:51 +01:00
Bob Olde Hampsink
5806666949
Extend WebSocketProtocol arguments to accept all arguments of websockets.protocol.WebSocketCommonProtocol
2018-02-01 16:23:10 +01:00
DirkGuijt
a76d8108fe
small code style change
...
changed double quotes to single quotes to match the coding style
2018-02-01 11:55:30 +01:00
Arnulfo Solis
2135294e2e
changed None to return empty string instead of null string
2018-02-01 11:52:55 +01:00
Dirk Guijt
ed1c563d1f
fixed bug in multipart/form-data parser
...
Sanic automatically assumes that a form field is a file if it has a content-type header, even though the header is text/plain or application/json. This is a fix for it, I took into account the RFC7578 specification regarding the defaults.
2018-02-01 11:30:24 +01:00
Raphael Deem
74efa3a108
Merge pull request #1105 from manisenkov/upgrade-status-to-beta
...
Upgrade development status to beta
2018-01-31 14:36:06 -08:00
manisenkov
49c29e6862
Upgrade development status to beta
2018-01-31 23:25:50 +01:00
Raphael Deem
17d7f24825
Merge pull request #1108 from manisenkov/pin-pytest-version
...
Pin pytest version to 3.3.2
2018-01-31 14:24:04 -08:00
manisenkov
f23c3da4ff
Pin pytest version to 3.3.2
2018-01-31 22:58:48 +01:00
Arnulfo Solis
cabcf50fbe
KeepAlive Timeout log level change to debug
2018-01-30 11:26:15 +01:00
Raphael Deem
8b23b5d389
Merge pull request #1101 from SirEdvin/master
...
Provide information about sanic-oauth extension
2018-01-29 15:00:11 -08:00
SirEdvin
37eb2c1db6
Provide information about sanic-oauth extension
2018-01-27 10:28:53 +02:00
Eli Uriegas
9751a37343
Merge pull request #1098 from shahinism/refactor/docker
...
Install Python 3.5 and 3.6 on docker container
2018-01-26 14:01:21 -08:00
Eli Uriegas
ed3bdd3443
Merge pull request #1100 from NyanKiyoshi/master
...
No longer raising a missing parameter when value is null
2018-01-26 13:56:52 -08:00
NyanKiyoshi
285ad9bdc1
No longer raising a missing parameter when value is null
...
When passing a null value as parameter (ex.: 0, None or False), Sanic said "Error: Required parameter `param` was not passed to url_for"
Example:
```
@app.route("/<idx>")
def route(rq, idx):
pass
```
```
url_for("route", idx=0)
```
No longer raises: `Error: Required parameter `idx` was not passed to url_for`
2018-01-26 21:13:43 +01:00
Shahin
16f5914c90
Install Python 3.5 and 3.6 on docker container
...
To cover all supported versions of Python using Tox
2018-01-24 16:46:45 +03:30
Raphael Deem
72d56a89a2
Merge pull request #1094 from caitinggui/master
...
update class_based_views
2018-01-23 17:25:59 -08:00
Raphael Deem
1135c8c1b1
Merge pull request #1097 from howie6879/master
...
Add parameter check
2018-01-23 17:25:25 -08:00
caitinggui
ec4339bd47
update description
2018-01-24 09:02:07 +08:00
howie6879
6c0fbef843
Add parameter check
2018-01-24 08:17:55 +08:00
howie6879
040c85a43b
Add parameter check
2018-01-24 08:11:47 +08:00
Raphael Deem
420554c737
Merge pull request #1096 from kyb3r/patch-1
...
Typo in readme?
2018-01-22 23:56:16 -08:00
howie6879
f20b854dd2
Add parameter check
2018-01-22 14:52:30 +08:00
howie6879
3844cec7a4
Add parameter check
2018-01-22 14:12:41 +08:00
howie.hu
0db49f7520
Merge pull request #4 from channelcat/master
...
Update
2018-01-22 13:36:48 +08:00
Kyber
f8dedcaa1e
Typo in readme?
2018-01-22 15:55:29 +11:00
Yaser Amiri
f8b1122467
Revert "Change parsing cookies mechanism. (like Django instade of http.cookies.SimpleCookie)"
...
This reverts commit ba1dbacd35 .
2018-01-21 09:10:15 +03:30
Raphael Deem
f3bf5e9a5c
Merge pull request #1090 from yunstanford/patch-signal-handling
...
Patch signal handling
2018-01-20 14:03:23 -08:00
Yaser Amiri
ba1dbacd35
Change parsing cookies mechanism. (like Django instade of http.cookies.SimpleCookie)
2018-01-20 12:49:16 +03:30
caitinggui
4036f1c121
update class_based_views
2018-01-19 16:20:07 +08:00
Raphael Deem
22ad697d1f
Merge pull request #1078 from eltrhn/master
...
Add support for blueprint groups and nesting
2018-01-18 17:26:52 -08:00
Eli
a10d7469cd
Add blueprint groups + nesting
2018-01-18 17:20:51 -08:00
Raphael Deem
06c3153d22
Merge pull request #1092 from mattfox/patch-1
...
Add request.method to documentation
2018-01-17 16:10:42 -08:00
Matt Fox
9677158b75
Add request.method to documentation
2018-01-17 07:31:39 -08:00
Raphael Deem
226a73141b
Merge pull request #1091 from yunstanford/patch-router-fix
...
Patch router fix
2018-01-17 00:15:33 -08:00
Raphael Deem
da3201bf35
Merge pull request #1088 from cosven/master
...
use single quote in readme.rst
2018-01-16 13:34:39 -08:00
Yun Xu
7daebc6aea
fix Router.check_dynamic_route_exists
2018-01-15 17:53:37 -08:00
Yun Xu
d9002769cf
fix a typo
2018-01-15 17:49:11 -08:00
Yun Xu
6d0b30953a
add unit test which should fail on original code
2018-01-15 17:40:44 -08:00
Yun Xu
09d6452475
fixed unit test
2018-01-15 15:15:08 -08:00
Yun Xu
6a61fce84e
worker process should ignore SIGINT when run_multiple
2018-01-15 11:53:15 -08:00
Yun Xu
11017902be
signal handling
2018-01-15 11:23:49 -08:00
7
bd7333723e
Merge pull request #16 from channelcat/master
...
Merge upstream master branch
2018-01-15 10:48:34 -08:00
cosven
6648250fb9
Merge pull request #1 from cosven/cosven-patch-1
...
use single quote in readme.rst
2018-01-15 14:56:52 +08:00
cosven
a94a2d46d0
use single quote in readme.rst
...
As we use single quote in sanic package, we may be supposed to use single quote in readme also?
2018-01-15 14:55:36 +08:00
Raphael Deem
ab97018c78
Merge pull request #1082 from channelcat/1042
...
fix exception handling
2018-01-13 17:06:46 -08:00
Raphael Deem
be702b0924
Merge pull request #1087 from Stranger6667/fix-get_socket
...
Fix typo
2018-01-13 17:06:03 -08:00
Dmitry Dygalo
c5c10cfb50
Fix typo
2018-01-13 17:56:29 +01:00
howie.hu
5682d642a6
Merge pull request #3 from channelcat/master
...
Update
2018-01-10 09:23:43 +08:00
Raphael Deem
62c6d7274c
Merge pull request #1083 from bow/fix/log_response_host
...
Fix log_response to correctly output request ip and port
2018-01-09 13:55:14 -08:00
bow
4f8633375d
Fix log_response to correctly output request ip and port
2018-01-09 13:47:01 +01:00
Raphael Deem
9f559818e5
Merge pull request #1081 from howie6879/master
...
Fix: the Chinese URI
2018-01-08 15:54:46 -08:00
howie6879
5f329f72ee
Update test_routes.py
2018-01-08 08:38:54 +08:00
howie6879
7303a06f83
Fix: the Chinese URI
2018-01-07 12:07:18 +08:00
howie6879
e34de96b24
Fix: the Chinese URI
2018-01-07 12:06:21 +08:00
howie6879
42cd424274
Fix: the Chinese URI
2018-01-07 10:59:12 +08:00
howie.hu
9426e94314
Merge pull request #2 from channelcat/master
...
Update
2018-01-07 09:57:51 +08:00
r0fls
7a1dab3319
fix exception handling
2018-01-05 14:12:22 -08:00
Raphael Deem
d63ec84745
Merge pull request #1037 from youknowone/xdist
...
Boost test speed by pytest-xdist
2018-01-05 12:10:27 -08:00
Raphael Deem
0e7e2f4e5b
Merge pull request #1080 from channelcat/1079
...
fix timeout bug when self.transport is None
2018-01-04 15:01:40 -08:00
r0fls
46521240a9
fix timeout bug when self.transport is None
2018-01-03 23:33:22 -08:00
Jeong YunWon
a8827a5d95
Boost test speed by pytest-xdist
2018-01-03 18:52:25 +09:00
Raphael Deem
ca0bc1cb7d
Merge pull request #1076 from channelcat/1074
...
fix strict_slashes bug when route has slash
2018-01-01 12:47:48 -08:00
r0fls
8c28ce7d79
fix strict_slashes bug when route has slash
2018-01-01 02:24:48 -08:00
r0fls
5b051f0891
add test
2018-01-01 02:14:55 -08:00
Raphael Deem
c93de9450a
Merge pull request #1073 from Kurlov/master
...
remove uvloop for windows setup
2017-12-29 14:56:38 -08:00
Aleksandr Kurlov
96976fa892
remove uvloop for windows setup
2017-12-29 23:04:22 +05:00
Raphael Deem
c14e99cef0
Merge pull request #1071 from r0fls/1062-docs
...
udpate docs with add_task app injection
2017-12-28 02:01:23 -08:00
Raphael Deem
c91a806774
udpate docs with add_task app injection
2017-12-28 01:59:16 -08:00
Raphael Deem
2f0076f429
Merge pull request #1063 from r0fls/1062
...
try to inject the app in add_task method
2017-12-27 11:40:05 -08:00
Raphael Deem
a1ffc6d55b
try to inject the app in add_task method
2017-12-27 01:06:43 -08:00
Yaser Amiri
9bdf7a9980
Revert files those fixed for flake problems.
2017-12-26 23:35:54 +03:30
Yaser Amiri
81494453b0
Remove dependency on requests library.
...
Change auto reloader enviroment varible name to SANIC_SERVER_RUNNING
Fix some typo mistakes, flake uncompatibilities and such problems.
Raise NotImplementedError for operating systems except posix systems for auto reloading.
2017-12-26 19:17:13 +03:30
Raphael Deem
008cbe5ce7
Merge pull request #1069 from r0fls/1050
...
add samesite cookie to cookie keys
2017-12-24 02:50:37 -08:00
Raphael Deem
5ee35e7eeb
add samesite cookie to cookie keys
2017-12-24 02:33:52 -08:00
Raphael Deem
1a98e70281
Merge pull request #1066 from r0fls/1065
...
allow add_task after server starts
2017-12-21 23:44:18 -08:00
Raphael Deem
8e3f3977bd
allow add_task after server starts
2017-12-21 23:37:42 -08:00
Raphael Deem
04b04f094c
Merge pull request #1064 from r0fls/1061
...
double quotes in unauthorized exception per rfc7230
2017-12-21 18:59:41 -08:00
Raphael Deem
9c02cdbad9
double quotes in unauthorized exception per rfc7230
2017-12-21 18:05:05 -08:00
Raphael Deem
c30e805623
Merge pull request #1060 from seemethere/fix_readthedocs_builds
...
Add sphinxcontrib-asyncio to environment.yml
2017-12-20 23:40:04 -08:00
Eli Uriegas
cd81538ce3
Add sphinxcontrib-asyncio to environment.yml
...
readthedocs builds were broken because they were missing this dependency
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2017-12-19 22:55:50 -06:00
howie.hu
68cb280513
Merge pull request #1 from channelcat/master
...
Update
2017-12-20 09:08:52 +08:00
Raphael Deem
19466a15b4
Merge pull request #1055 from youknowone/cancel-timeout
...
Cancel request tasks when response timeout is triggered
2017-12-17 16:46:29 -08:00
Jeong YunWon
d54b406cba
Cancel request tasks when response timeout is triggered
...
Before: Even after raising ResponseTimeout, server still processes
remaining tasks until it is done
After: Before raising ResponseTimeout, server stops working task.
2017-12-14 18:43:52 +09:00
Raphael Deem
72254a7af9
Merge pull request #1054 from r0fls/rfc7231
...
fix issues with method not allowed response
2017-12-13 23:42:37 -08:00
Raphael Deem
52feff266e
fix edge case with methods as None
2017-12-13 23:23:04 -08:00
Raphael Deem
2c3f50e34a
fix stream handling
2017-12-13 23:06:18 -08:00
Raphael Deem
2b0258c13a
fix issues with method not allowed response
2017-12-11 20:12:26 -08:00
Raphael Deem
2585900692
Merge pull request #1053 from danpalmer/master
...
Fix ip and socket data format on V6
2017-12-11 20:24:52 -06:00
Dan Palmer
48c2dcb110
Fix ip and socket data format on V6
2017-12-11 22:16:03 +00:00
Dan Palmer
10a378bd46
Typo
2017-12-11 14:33:43 +00:00
Yaser Amiri
3fe3c2c79f
Add test for auto reloading.
2017-12-07 20:19:40 +03:30
Yaser Amiri
52c2a8484e
Add auto reloader.
2017-12-07 16:30:54 +03:30
Eli Uriegas
21435c1863
Merge pull request #1045 from seemethere/increment_070
...
Increment to 0.7.0
2017-12-05 19:27:11 -08:00
Eli Uriegas
1ea3ab7fe8
Increment to 0.7.0
...
Signed-off-by: Eli Uriegas <seemethere101@gmail.com >
2017-12-05 19:13:16 -08:00
Raphael Deem
1b0ad2c3cd
Merge pull request #1035 from yunstanford/patch-N
...
Adopt new websockets interface
2017-12-02 01:27:09 -08:00
Raphael Deem
aa4821864a
Merge pull request #1039 from lixxu/master
...
check request.ip before using it
2017-11-28 19:47:34 -08:00
lixxu
283762224c
clean codes
2017-11-28 14:47:43 +08:00
lixxu
f50a37fc88
ignore error if request.ip is None
2017-11-28 14:44:32 +08:00
Yun Xu
076f0515ca
Fix flake8
2017-11-25 21:14:18 -08:00
Yun Xu
049f12096d
fix unit tests
2017-11-25 21:07:38 -08:00
Yun Xu
f09c0393ba
adopt new websockets interface
2017-11-25 21:01:22 -08:00
7
472bbcf293
Merge pull request #15 from channelcat/master
...
Merge upstream master branch
2017-11-25 20:49:09 -08:00
Raphael Deem
7a3f9daccf
Merge pull request #1025 from nkoshell/route-version-params
...
Route version params
2017-11-20 23:43:22 -08:00
Nikita Koshelev
76511d61e0
Added removing duplicate 'v' for Router.add() version parameter
...
Fix sanic/router.py:123:80: E501 line too long (80 > 79 characters)
2017-11-18 01:39:00 +03:00
Nikita Koshelev
8e7475ccf6
Added regex escaping for Router.add() version parameter
2017-11-18 01:22:42 +03:00
Raphael Deem
820d8c7bf5
Merge pull request #1021 from EdwardBetts/spelling
...
Correct spelling mistakes.
2017-11-16 16:26:40 -08:00
Edward Betts
cfc75b4f1a
Correct spelling mistakes.
2017-11-15 15:46:39 +00:00
Raphael Deem
98567fe5a8
Merge pull request #1008 from youknowone/pytest-xdist
...
Let SanicTestClient has its own port
2017-11-10 10:50:01 -08:00
Raphael Deem
05bb812e2b
Merge pull request #1010 from Yaser-Amiri/master
...
Change unit tests names with repeated names.
2017-11-08 20:25:45 -08:00
Yaser Amiri
c9876a6c88
Change unit tests names with repeated names.
2017-11-08 14:14:57 +03:30
Raphael Deem
979b5a52d3
Merge pull request #1005 from joar/feature/static-strict-slashes
...
Add strict_slashes to {app, blueprint}.static()
2017-11-07 07:49:32 -08:00
Joar Wandborg
e70535e8d7
Use .get instead of .pop
2017-11-07 10:34:17 +01:00
Jeong YunWon
ed8725bf6c
Let SanicTestClient has its own port
...
For parallel test running, the servers must have different ports.
See examples/pytest_xdist.py for example.
2017-11-06 17:29:32 +09:00
Raphael Deem
098cd70e82
Merge pull request #1007 from furious-luke/master
...
Call connection_open after websocket handshake
2017-11-05 14:26:19 -08:00
Raphael Deem
969dac2033
Merge pull request #1004 from Stibbons/optionalize_log_config
...
Optionalize app.run dictConfig (fix #1000 )
2017-11-04 12:35:38 -07:00
Gaetan Semet
49b1d667f1
Optionalize app.run dictConfig ( fix #1000 )
...
Signed-off-by: Gaetan Semet <gaetan@xeberon.net >
2017-11-04 15:58:27 +01:00
Luke Hodkinson
bca1e08411
Call connection_open after websocket handshake
...
It seems that due to (recent?) changes in the websocket library, we
now need to call "connection_open" to flag that the websocket is now
ready to use. I've added that call just after the call to
"connection_made".
2017-11-04 22:04:59 +11:00
Raphael Deem
bf6ed217c2
Merge pull request #1006 from r0fls/routing-fix
...
check if method is added in strict slash logic
2017-11-04 00:09:52 -07:00
Raphael Deem
bb8e9c6438
check if method is added in strict slash logic
2017-11-03 18:36:06 -07:00
Joar Wandborg
f128ed5b1f
Set threshold to 1MiB instead of 0.97MiB
...
Reference: https://en.wikipedia.org/wiki/Mebibyte#Definition
2017-11-03 14:37:01 +01:00
Joar Wandborg
ff5786d61b
pep8
2017-11-03 14:33:24 +01:00
Joar Wandborg
ca596c8ecd
Add strict_slashes to {Sanic, Blueprint}().static()
2017-11-02 15:44:36 +01:00
Raphael Deem
c3bcafb514
Merge pull request #997 from ignatenkobrain/localhost
...
tests: do not assume that locahost == 127.0.0.1
2017-11-01 00:22:14 -07:00
Igor Gnatenko
a9c7d95e9b
tests: do not assume that locahost == 127.0.0.1
...
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org >
2017-10-31 09:39:09 +01:00
Raphael Deem
63bbcb5152
Merge branch 'master' into 977
2017-10-25 22:18:25 -07:00
Raphael Deem
01042c1d98
Merge pull request #992 from r0fls/968
...
remove port from ip
2017-10-25 22:15:07 -07:00
Raphael Deem
5bf722c7ae
remove bare exceptions
2017-10-25 21:58:31 -07:00
Raphael Deem
c2191153cf
remove port from ip
2017-10-23 21:37:59 -07:00
davidtgq
5bcbc5a337
Replaced COMMON_STATUS_CODES with a simple 200 check for more fast ( #982 )
...
* Replaced COMMON_STATUS_CODES with a simple 200 check for more fast
* Added IPware algorithm
* Remove HTTP prefix from Django-style headers
Remove right_most_proxy because it's outside spec
* Remove obvious docstrings
* Revert "Replaced COMMON_STATUS_CODES with a simple 200 check for more fast"
This reverts commit 15b6980
* Revert "Added IPware algorithm"
This reverts commit bdf66cb
WTF HOW DO I GIT
* Revert "Revert "Replaced COMMON_STATUS_CODES with a simple 200 check for more fast""
This reverts commit d8df095
* Revert "Added IPware algorithm"
This reverts commit bdf66cb
* Delete ip.py
2017-10-19 16:43:07 -07:00
Eli Uriegas
f721f90add
Merge pull request #820 from youknowone/worker-protocol
...
Protocol configurable gunicorn worker
2017-10-19 16:21:28 -07:00
Eli Uriegas
0e92d8ce2c
Merge branch 'master' into worker-protocol
2017-10-19 16:21:18 -07:00
Eli Uriegas
727d6a1b61
Merge pull request #972 from lanfon72/patch-2
...
to fix condition error that used in `log_response`
2017-10-19 16:16:57 -07:00
Raphael Deem
666c0847b7
Merge pull request #976 from ashleysommer/fix_websocket_timeout
...
Fix Websocket protocol timeouts after #939
2017-10-18 21:20:52 -07:00
Raphael Deem
0a411f9bba
Merge pull request #985 from ashleysommer/ashleysommer-docs-spf
...
Add Sanic-Plugins-Framework library to Extensions doc
2017-10-18 21:20:13 -07:00
Ashley Sommer
49f3ba39f9
Add Sanic-Plugins-Framework library to Extensions doc
...
I made a new tool for devs to use for easily and quickly creating Sanic Plugins (extensions), and for application builders to easily use those plugins in their app.
2017-10-18 17:52:03 +10:00
Raphael Deem
794128a053
Merge pull request #981 from kszucs/manifest
...
Include LICENSE file in manifest
2017-10-17 10:31:19 -07:00
Krisztián Szűcs
e6be3b2313
include LICENSE file in manifest
2017-10-17 16:05:24 +02:00
Raphael Deem
9150767574
add blueprint name to request.endpoint
2017-10-16 23:25:37 -07:00
Raphael Deem
75f2180cb1
add handler name to request as endpoint
2017-10-16 22:43:40 -07:00
Raphael Deem
c5cdcf0f95
Merge pull request #975 from ashleysommer/timeouts_documentation
...
Add documentation for new Timeout values, after #939
2017-10-16 09:13:49 -07:00
Ashley Sommer
ea5b07f636
Update websocket protocol to accomodate changes in HTTP protocol from https://github.com/channelcat/sanic/pull/939
...
Fixes https://github.com/channelcat/sanic/issues/969
2017-10-16 11:06:33 +10:00
Ashley Sommer
477e6b8663
Add documentation for REQUEST_TIMEOUT, RESPONSE_TIMEOUT and KEEP_ALIVE_TIMEOUT config values.
...
Fixed some inconsistent default values.
2017-10-16 10:53:45 +10:00
Raphael Deem
a0d8418b40
Merge pull request #965 from samael500/master
...
fix issue #959
2017-10-13 14:58:46 -07:00
Raphael Deem
006fb08024
Merge pull request #966 from yunstanford/patch-M
...
Sanic routes should not pass angled params with empty names
2017-10-13 02:18:20 -07:00
lanf0n
4578f6016b
to fix condition error that used in log_response
...
`request` class is derived from `dict`, so it will never be `True`.
2017-10-13 16:48:02 +08:00
Raphael Deem
5b06bcc57d
Merge pull request #967 from samael500/custom_filename
...
Custom filename
2017-10-13 01:35:11 -07:00
Raphael Deem
d4bb14a511
Merge pull request #971 from pcinkh/socket_disconnects_speedup
...
Critical speedup websocket disconnects from O(N) to O(1)
2017-10-13 01:25:14 -07:00
pcinkh
6d2f5da506
Speedup websocket disconnects.
2017-10-11 14:02:26 +03:00
Yun Xu
c96df86111
make flake8 happy
2017-10-09 07:58:04 -07:00
Maks Skorokhod
86f87cf4ac
🔧 no use f'string'
2017-10-09 17:55:35 +03:00
Yun Xu
770a8fb288
raise exception for invalid param syntax
2017-10-09 07:54:39 -07:00
Maks Skorokhod
c4e3a98ea7
✅ add test for custom filename
2017-10-09 17:45:42 +03:00
Maks Skorokhod
07e95dba4f
🔁 customize filename in file response
2017-10-09 17:45:22 +03:00
7
9bc1abcd00
Merge pull request #14 from channelcat/master
...
merge upstream master branch
2017-10-09 07:19:57 -07:00
Maks Skorokhod
4d515b05f3
✅ fix missed assertion
2017-10-09 17:18:04 +03:00
Maks Skorokhod
64edf7ad9c
✅ upd test for connection lost error
2017-10-09 16:00:32 +03:00
Maks Skorokhod
7610c0fb2e
🔧 log Connection lost only if debug
2017-10-09 15:50:36 +03:00
Raphael Deem
0189e4ed59
Merge pull request #962 from ProstoMaxim/fix_logs
...
Fix logs
2017-10-08 20:16:11 -07:00
Raphael Deem
8018c9b91d
Merge pull request #961 from r0fls/fix-920
...
fix false cookie encoding and output
2017-10-06 23:57:30 -07:00
Max Murashov
4b3920daba
Fix logs
2017-10-06 16:53:30 +03:00
Raphael Deem
d876e3ed5c
fix false cookie encoding and output
2017-10-05 22:20:50 -07:00
Raphael Deem
086b5daa53
Merge pull request #960 from piotrbulinski/refactor_server_access_log
...
Refactor access log for server.HttpProtocol
2017-10-05 20:20:28 -07:00
Piotr Buliński
4b877e3f6b
Update server.py
2017-10-05 09:28:13 +02:00
Piotr Buliński
8ce749e339
Update server.py
2017-10-05 09:27:18 +02:00
Piotr Buliński
752ddfa7fc
Merge branch 'master' into refactor_server_access_log
2017-10-05 09:26:19 +02:00
Raphael Deem
8700c96c4d
Merge pull request #942 from yunstanford/patch-logging-refactor
...
Patch logging refactor
2017-10-05 00:22:02 -07:00
Piotr Bulinski
e3852ceeca
Refactor access log for server
2017-10-04 12:50:57 +02:00
Yun Xu
225ea49b6f
resolve conflicts again
2017-10-01 01:22:27 -07:00
Raphael Deem
15fd49037f
Merge pull request #939 from ashleysommer/keepalive_timeout
...
Split RequestTimeout, ResponseTimeout, and KeepAliveTimeout into different timeouts
2017-09-30 22:15:50 -07:00
Raphael Deem
2fb4697e12
Merge pull request #952 from ahopkins/patch-1
...
Update extensions.md
2017-09-29 18:33:30 -07:00
Eli Uriegas
1a9f770317
Merge pull request #957 from lanfon72/master
...
add sphinx extension to add asyncio-specific markups
2017-09-29 11:17:29 -07:00
lanf0n
62871ec9b3
add sphinx extension to add asyncio-specific markups
2017-09-30 01:16:26 +08:00
Raphael Deem
39c64214ee
Merge pull request #953 from r0fls/949
...
support vhosts in static routes
2017-09-27 01:28:43 -07:00
Raphael Deem
9aec5febb8
support vhosts in static routes
2017-09-27 01:24:49 -07:00
Adam Hopkins
91b2167eba
Update extensions.md
...
Add - [JWT](https://github.com/ahopkins/sanic-jwt ): Authentication extension for JSON Web Tokens (JWT) extension package.
2017-09-27 11:07:06 +03:00
Raphael Deem
00d40a35cd
Merge pull request #951 from lixxu/master
...
fix bug and set scheme to http if not provided
2017-09-26 21:57:54 -07:00
lixxu
f96ab02767
set scheme to http if not provided
2017-09-27 09:59:49 +08:00
Raphael Deem
4ce699e57f
Merge pull request #944 from blazehu/master
...
add __repr__ for sanic request
2017-09-25 13:58:09 -07:00
Raphael Deem
4ee042c330
Merge pull request #948 from chiuczek/json-dependency-injection
...
Use dependency injection to allow alternative json parser or encoder
2017-09-24 21:05:39 -07:00
Yun Xu
0b23f4ff81
resolve conflicts
2017-09-23 06:19:09 -07:00
Hugh McNamara
5cef1634ed
use json_loads function in json property of request
2017-09-22 10:19:15 +01:00
Eli Uriegas
1b0286916e
Merge pull request #947 from lanfon72/patch-1
...
to fix if platform is windows.
2017-09-19 10:15:35 -07:00
Hugh McNamara
a8f764c161
make method instead of property for alternative json decoding of request
2017-09-19 18:12:53 +01:00
Hugh McNamara
1d719252cb
use dependency injection to allow alternative json parser or encoder
2017-09-19 14:58:49 +01:00
lanf0n
d8cebe1188
to fix if platform is windows.
2017-09-19 18:14:25 +08:00
Eli Uriegas
329ebf6a5d
Merge pull request #946 from trthhrtz/patch-1
...
Update getting_started.md
2017-09-18 11:13:48 -07:00
Kuzma Leshakov
c836441a75
Update getting_started.md
...
Hello World example at the main Readme file (https://github.com/channelcat/sanic/blob/master/README.rst ) is different, it returns json. Here is returned text. In the following examples, such as Routing (http://sanic.readthedocs.io/en/latest/sanic/routing.html ) is again used json. Therefore I suggest to make examples the same, having json as output
2017-09-18 11:37:32 +03:00
huyuhan
074d36eeba
add __repr__ for sanic request
2017-09-15 21:15:05 +08:00
huyuhan
f6eb35f67d
add __repr__ for sanic request
2017-09-15 21:05:25 +08:00
huyuhan
77f70a0792
add __repr__ for sanic request
2017-09-15 20:56:44 +08:00
huyuhan
12dafd07b8
add __repr__ for sanic request
2017-09-15 18:34:56 +08:00
Eli Uriegas
9fb8bec715
Merge pull request #943 from crvv/master
...
fix #763 , sanic can't decode latin1 encoded header value
2017-09-14 13:38:44 -07:00
Wèi Cōngruì
eb1146c6b6
fix #763 , sanic can't decode latin1 encoded header value
2017-09-14 19:23:02 +08:00
Yun Xu
730f7c5e41
add doc for customizing logging config
2017-09-13 18:30:38 -07:00
Yun Xu
5cabc9cff2
update doc
2017-09-13 18:16:58 -07:00
Yun Xu
ddc039ed2e
update doc
2017-09-13 18:14:46 -07:00
Eli Uriegas
a146ebd856
Merge pull request #941 from aiosin/master
...
add status codes and teapot example
2017-09-13 11:39:14 -07:00
Yun Xu
5ee7b6caeb
fixing small issue
2017-09-13 10:35:34 -07:00
Yun Xu
9c4b0f7b15
fix flake8
2017-09-13 07:40:42 -07:00
aiosin
2e5d1ddff9
add status codes and teapot example
2017-09-13 14:08:29 +02:00
Yun Xu
24bdb1ce98
add unit tests/refactoring
2017-09-12 23:42:42 -07:00
Ashley Sommer
8eb59ad4dc
Fixed error where the RequestTimeout test wasn't actually testing the correct behaviour
...
Fixed error where KeepAliveTimeout wasn't being triggered in the test suite, when using uvloop
Fixed test cases when using other asyncio loops such as uvloop
Fixed Flake8 linting errors
2017-09-13 10:18:36 +10:00
Raphael Deem
d8c8ccd180
Merge pull request #932 from lixxu/master
...
static files url building using url_for
2017-09-12 12:59:04 -07:00
Yun Xu
a46e004f07
apply new loggers
2017-09-11 22:12:49 -07:00
Ashley Sommer
173f94216a
Fixed the delays, and expected responses, in the keepalive_timeout tests
2017-09-12 13:40:43 +10:00
Ashley Sommer
1a74accd65
finished the keepalive_timeout tests
2017-09-12 13:09:42 +10:00
Ashley Sommer
2979e03148
WIP - Split RequestTimeout, ResponseTimout, and KeepAliveTimeout into different timeouts, with different callbacks.
2017-09-11 17:17:33 +10:00
Yun Xu
4bdb9a2c8e
prototype
2017-09-10 23:19:09 -07:00
Yun Xu
8f6fa5e9ff
old logging cleanup
2017-09-10 18:44:54 -07:00
Yun Xu
986135ff76
remove DefaultFilter
2017-09-10 18:39:42 -07:00
Yun Xu
c9cbc00e36
use access_log as param
2017-09-10 18:38:52 -07:00
Yun Xu
c9a40c180a
remove some logging stuff
2017-09-10 11:11:16 -07:00
7
125cb17fcb
Merge pull request #13 from channelcat/master
...
sync from upstream master branch
2017-09-09 16:52:13 -07:00
Raphael Deem
53a5bd2319
Merge pull request #936 from yunstanford/patch-debug-logging
...
Patch debug logging
2017-09-08 20:49:16 -07:00
Raphael Deem
4fd68f9af3
Merge pull request #935 from iad42/patch-1
...
Added information on request.token
2017-09-08 20:49:01 -07:00
Yun Xu
c4417b399b
fixing debug logging
2017-09-08 17:47:05 -07:00
7
c2a3e42a53
Merge pull request #12 from channelcat/master
...
merge upstream master branch
2017-09-08 17:39:50 -07:00
Anatoly Ivanov
73c04f5a89
Added information on request.token
...
The manual lacked info about request.token, which keeps authorization data. See https://github.com/channelcat/sanic/blob/master/sanic/request.py#L84 for details
2017-09-08 14:21:49 +03:00
lixxu
195f707f14
missing '/' in doc
2017-09-06 19:19:59 +08:00
lixxu
bc20dc5c62
use url_for for url building for static files
2017-09-06 19:17:52 +08:00
Raphael Deem
8b4ca51805
Merge pull request #931 from Tim-Erwin/envvar_prefix
...
make the prefix for environment variables alterable
2017-09-05 11:22:56 -07:00
Tim Mundt
e2e25eb751
fixed flake convention
2017-09-05 11:05:31 +02:00
Tim Mundt
9572ecc5ea
test for env var prefix
2017-09-05 10:58:48 +02:00
Tim Mundt
97d8b9e908
documentation for env var prefix; allow passing in the prefix through the app constructor
2017-09-05 10:41:55 +02:00
Tim Mundt
c59a8a60eb
make the prefix for environment variables alterable
2017-09-05 09:53:33 +02:00
Raphael Deem
158da0927a
Merge pull request #901 from lixxu/master
...
add name option for route building
2017-08-31 15:29:03 -07:00
Eli Uriegas
78a7338346
Merge pull request #922 from timka/patch-1
...
Example logging X-Request-Id transparently
2017-08-31 10:35:48 -07:00
Eli Uriegas
90e5c8d39b
Merge pull request #904 from jiaxiaolei/master
...
feat(examples): add `authorized_sanic.py`
2017-08-31 10:35:23 -07:00
Raphael Deem
7a6f2d8336
Merge pull request #926 from manisenkov/patch-1
...
Fix LICENSE date and name
2017-08-30 17:49:59 -07:00
Maksim Anisenkov
f49554aa57
Fix LICENSE date and name
2017-08-30 15:30:22 +02:00
Timur
0a72168f8f
Example logging X-Request-Id transparently
2017-08-29 23:05:57 +03:00
Raphael Deem
5011bfef55
Merge pull request #917 from CharAct3/bugfix/fix_unauthorized
...
fix #914 , change arguments of Unauthorized.__init__
2017-08-24 13:45:58 -07:00
Darren
6038813d03
fix #914 , change arguments of Unauthorized.__init__
2017-08-24 22:59:25 +08:00
Raphael Deem
fee9de96de
Merge pull request #908 from Ezi4Zy/master
...
fix: error param
2017-08-23 16:22:13 -07:00
xmsun
35e028cd99
fix: error param
2017-08-22 16:40:42 +08:00
lixxu
145cdd5c1b
Merge branch 'use-route-name-for-method'
2017-08-22 14:02:56 +08:00
lixxu
762b2782ee
use name to define route name for different methods on same url
2017-08-22 14:02:38 +08:00
jiaxiaolei
91f031b661
feat(examples): add authorized_sanic.py
...
You can check a request if the client is authorized
to access a resource by the decorator `authorized`
2017-08-21 22:40:07 +08:00
lixxu
eab809d410
add name option for route building
2017-08-21 18:05:34 +08:00
Raphael Deem
826f1b4713
Merge pull request #898 from jiaxiaolei/master
...
feat(examples): add `add_task_sanic.py`
2017-08-21 00:32:38 -07:00
Raphael Deem
fa1a95ae91
Merge pull request #900 from yunstanford/patch-default-strict-slashes
...
Patch default strict slashes
2017-08-21 00:31:42 -07:00
Yun Xu
63babae63d
add doc
2017-08-21 00:28:01 -07:00
Raphael Deem
db9924a399
Merge pull request #899 from hatarist/patch-2
...
Add a line on headers in the "Request Data" docs
2017-08-20 23:51:07 -07:00
Yun Xu
5d23c7644b
add unit tests
2017-08-20 23:37:22 -07:00
Yun Xu
ef81a9f547
make strict_slashes default value configurable
2017-08-20 23:11:38 -07:00
7
747c21da70
Merge pull request #11 from channelcat/master
...
merge upstream master branch
2017-08-20 22:51:19 -07:00
Igor Hatarist
439ff11d13
Added a line on headers in the "Request Data" docs
2017-08-20 19:28:09 +03:00
jiaxiaolei
947364e15f
feat(exapmles): add add_task_sanic.py
2017-08-20 11:11:14 +08:00
Eli Uriegas
750115b727
Merge pull request #894 from pkuphy/patch-1
...
fix typo
2017-08-18 10:44:35 -07:00
pkuphy
a55efc832d
fix typo
2017-08-19 01:03:54 +08:00
Raphael Deem
c96bd21389
Merge pull request #892 from jiaxiaolei/master
...
docs(README): Make it clear and easy to read.
2017-08-18 02:09:19 -07:00
jiaxiaolei
dd241bd6fa
docs(README): Make it clear and easy to read.
2017-08-18 17:00:34 +08:00
Raphael Deem
0dbde7400f
Merge pull request #889 from dongweiming/doc
...
Fix blueprint doc
2017-08-16 00:19:58 -07:00
dongweiming
2587f6753d
Fix blueprint doc
2017-08-15 22:04:25 +08:00
Raphael Deem
4155e76a81
Merge pull request #886 from yunstanford/fix-cov-report
...
Fix cov report
2017-08-14 16:21:50 -07:00
Yun Xu
756bd19181
do not fail if no files for coverage combine
2017-08-10 08:39:02 -07:00
Yun Xu
fbb2344895
fix cov report
2017-08-10 07:55:38 -07:00
7
bda6c85638
Merge pull request #10 from channelcat/master
...
merge upstream master branch
2017-08-10 07:47:45 -07:00
Raphael Deem
df4a149cd0
Merge pull request #885 from yunstanford/master
...
add triggers events when async create_server
2017-08-09 15:59:44 -07:00
Yun Xu
80f27b1db9
add unit tests and make flake8 happy
2017-08-08 22:21:40 -07:00
Yun Xu
d5d1d3b45a
add trigger before_start events in create_server
2017-08-08 21:58:10 -07:00
Eli Uriegas
c797c3f22d
Merge pull request #883 from miguelgrinberg/websocket-subprotocols
...
Weboscket subprotocol negotiation
2017-08-08 11:49:21 -07:00
Miguel Grinberg
375ed23216
Weboscket subprotocol negotiation
...
Fixes #874
2017-08-08 11:40:44 -07:00
Raphael Deem
7b66a56cad
Merge pull request #870 from MichaelYusko/small-amendment
...
Did the small changes for better readable
2017-08-03 18:39:26 -07:00
MichaelYusko
7216bf7835
merge master into local branch
2017-08-03 12:11:47 +03:00
Eli Uriegas
8b24c35ac7
Merge pull request #878 from seemethere/increment_060
...
Increment to 0.6.0
2017-08-02 19:13:39 -07:00
Eli Uriegas
f80a6ae228
Increment to 0.6.0
2017-08-02 19:11:53 -07:00
7
9b3fbe4593
fixed small doc issue ( #877 )
2017-08-02 10:15:18 -07:00
Yun Xu
f99a723627
fixed small doc issue
2017-08-02 09:05:33 -07:00
7
181ffb00a7
Merge pull request #9 from channelcat/master
...
merging upstream master branch
2017-08-02 09:04:31 -07:00
Eli Uriegas
222eca64d7
Merge pull request #875 from cctse/patch-1
...
add some example links for readme
2017-08-01 09:36:37 -07:00
akc
1b687f3feb
add some example links
2017-08-01 16:32:15 +08:00
Eli Uriegas
2228104bff
Merge pull request #862 from zyguan/revert-599fbce
...
revert 599fbce
2017-07-31 13:51:04 -07:00
Raphael Deem
402c3752c4
Merge pull request #871 from Frzk/unauthorized-exception
...
Simplified the Unauthorized exception __init__ signature.
2017-07-31 12:23:12 -07:00
François KUBLER
69a8bb5e1f
Fixed a trailing white space in the docstring.
2017-07-28 22:29:45 +02:00
Raphael Deem
0d76f9e030
Merge pull request #873 from yunstanford/fix-timeout-issue
...
Fix timeout issue
2017-07-28 09:49:22 -07:00
Yun Xu
eb8f65c58b
switch to use dist: precise
2017-07-27 22:21:19 -07:00
7
e0e27a671e
Merge pull request #8 from channelcat/master
...
merge upstream master branch
2017-07-27 20:01:59 -07:00
François KUBLER
b65eb69d9f
Simplified the Unauthorized exception __init__ signature.
...
(again).
Use of **kwargs makes it more straight forward and easier to use.
2017-07-27 23:00:27 +02:00
Raphael Deem
8118e542fb
Merge pull request #866 from Nikamura/patch-1
...
Fix typo in documentation
2017-07-26 13:18:52 -07:00
Raphael Deem
c866759bd4
Merge pull request #868 from cclauss/patch-2
...
Comment: F821 undefined name is done on purpose
2017-07-26 13:18:29 -07:00
MichaelYusko
429f7377cb
Did the small changes for better readable
2017-07-26 19:32:23 +03:00
cclauss
40776e5324
Comment: F821 undefined name is done on purpose
...
Comment helps readers and `# noqa` silences linters
2017-07-26 12:44:30 +02:00
Karolis Mažukna
621343112d
Fix typo in documentation
2017-07-25 13:29:17 +03:00
Raphael Deem
eb06e6ba51
Merge pull request #863 from zyguan/issue-760
...
handle keep-alive timeout gracefully
2017-07-25 00:54:43 -07:00
zyguan
da91b16244
add tests
2017-07-24 18:21:15 +08:00
zyguan
918e2ba8d0
Revert "fix #752 "
...
This reverts commit 599fbcee6e .
2017-07-24 11:53:11 +08:00
zyguan
f50dc83829
handle keep-alive timeout gracefully
2017-07-24 01:37:36 +08:00
Raphael Deem
e8a9b4743b
Merge pull request #861 from yunstanford/add-jinja-sanic
...
Add jinja2-sanic
2017-07-22 20:16:21 -07:00
Yun Xu
f34226425e
add jinja2-sanic
2017-07-22 18:41:53 -07:00
7
e27c7ba36f
Merge pull request #7 from channelcat/master
...
merge upstreaming master branch
2017-07-22 18:28:38 -07:00
Raphael Deem
1aad527956
Merge pull request #824 from Frzk/unauthorized-exception
...
Simplified the `Unauthorized.__init__` signature.
2017-07-21 23:50:36 -07:00
Raphael Deem
173c62acb6
Merge branch 'master' into unauthorized-exception
2017-07-21 01:54:45 -07:00
Raphael Deem
76605d7dfe
Merge pull request #858 from mohd-akram/freebsd-syslog
...
Fix FreeBSD syslog path
2017-07-20 20:50:25 -07:00
Mohamed Akram
32be1a6496
Fix FreeBSD syslog path
2017-07-20 03:02:40 +04:00
Raphael Deem
c7d43aa544
Merge pull request #853 from yunstanford/patch-proxy-fix
...
proxy fix
2017-07-17 01:01:26 -07:00
Yun Xu
198bf55b7b
flake8 fix
2017-07-14 17:23:18 -07:00
Yun Xu
75378d3567
add remote_addr property for proxy fix
2017-07-14 09:29:16 -07:00
7
55cb371569
Merge pull request #6 from channelcat/master
...
merge upstreaming master branch
2017-07-13 20:07:15 -07:00
Raphael Deem
5bb97d25d0
Merge pull request #839 from asvetlov/patch-1
...
Drop benchmarks from README
2017-07-13 14:41:57 -07:00
Andrew Svetlov
b2017cae77
Drop benchmarks from readme
2017-07-13 23:41:04 +02:00
Raphael Deem
35af903d4a
Merge pull request #851 from zenixls2/issue-805
...
don't let default LOGGING to dictConfig influence already existed configs
2017-07-13 12:49:29 -07:00
zenix
426e00b6f4
dont let dictConfig influence already exists configs
2017-07-13 15:09:04 +09:00
Raphael Deem
8e62b3e438
Merge pull request #850 from r0fls/versioning
...
Versioning
2017-07-12 22:37:14 -07:00
Raphael Deem
4265ad5f23
add versioning
2017-07-12 22:19:42 -07:00
Raphael Deem
c181eb0539
Merge branch 'master' of https://github.com/channelcat/sanic
2017-07-12 21:12:15 -07:00
Raphael Deem
e0f06753c6
Merge pull request #831 from yunstanford/auto-doc
...
Improve Documentation.
2017-07-12 20:20:51 -07:00
Raphael Deem
8aafd72ef0
Merge branch 'auto-doc' of https://github.com/yunstanford/sanic
2017-07-12 20:19:30 -07:00
Raphael Deem
48549ce97b
Merge pull request #847 from youknowone/gunicorn
...
ensure loop.close() and sys.exit() in gunicorn worker
2017-07-12 18:19:39 -07:00
Jeong YunWon
47abf83960
Protocol configurable gunicorn worker
2017-07-12 22:30:13 +09:00
Jeong YunWon
be0f3731b4
ensure loop.close() and sys.exit() in gunicorn worker
2017-07-12 22:26:58 +09:00
Raphael Deem
b755431b93
Merge pull request #844 from sfermigier/patch-1
...
Add missing code block qualifier
2017-07-10 15:26:57 -07:00
Stefane Fermigier
04ff393875
Add missing code block qualifier
2017-07-10 22:11:12 +02:00
Raphael Deem
7841274300
Merge pull request #843 from yunstanford/case-insensitive-check
...
Case insensitive check
2017-07-10 12:44:25 -07:00
Yun Xu
235687d983
should call lower just once
2017-07-10 12:37:21 -07:00
Yun Xu
3d75e6ed95
case-insensitive check for header fields
2017-07-10 12:29:47 -07:00
Andrew Svetlov
eb9af8bceb
Drop aiohttp from benchmark table
...
The reason is: aiohttp with disabled access log shows about 16,000 RPS on sanic's own benchmark.
It's pretty much faster than 3,000 RPS from the table.
I'm not a Sanic dev team member. You should not trust users to update this table but manage periodic updates yourself.
If you don't want to do it --- it's up to you.
Please just drop very incorrect and outdated numbers from README in this case.
2017-07-09 08:18:45 +02:00
7
39ea434513
Merge pull request #5 from channelcat/master
...
merge upstream master branch
2017-07-08 14:23:00 -07:00
Raphael Deem
f0a956467c
Merge pull request #815 from yunstanford/master
...
add graceful timeout when shutdown
2017-07-08 11:31:37 -07:00
Yun Xu
e48bd08095
make flake8 happy
2017-07-02 10:05:33 -07:00
Yun Xu
5d00717f39
improve doc and remove warnings
2017-07-02 10:02:04 -07:00
Yun Xu
3fff685c44
add auto-doc support
2017-07-01 23:46:34 -07:00
Raphael Deem
1e75265eed
Merge pull request #756 from qwesda/master
...
fixes #755 fragmented headers
2017-06-30 18:24:51 -07:00
Eli Uriegas
b6ac3ef445
Merge pull request #826 from yunstanford/pytest-sanic
...
Pytest sanic
2017-06-30 18:17:15 -07:00
Raphael Deem
421f78f3e6
Merge pull request #814 from Frzk/forbidden-exception
...
Added a Forbidden exception
2017-06-30 18:11:23 -07:00
Eli Uriegas
b71fdcfc20
Merge pull request #829 from Frzk/config_doc
...
Fixed an error : `Sanic.__init__` doesn't have a `load_vars` parameter.
2017-06-30 10:06:30 -07:00
François KUBLER
021e9b228a
Fixed a small error : Sanic.__init__ doesn't have a load_vars parameter.
...
It is `load_env`.
2017-06-30 16:24:41 +02:00
Raphael Deem
00d4533022
Merge pull request #821 from Frzk/bearer-support
...
Inverted the order of prefixes in Request.token property.
2017-06-29 09:43:34 -07:00
Yun Xu
fd5faeb5dd
add an example
2017-06-29 09:14:21 -07:00
Yun Xu
e7c8035ed7
add pytest-sanic
2017-06-29 09:06:17 -07:00
François KUBLER
e427e38da8
Simplified the Unauthorized.__init__ signature.
...
It doesn't really make sense to have a `realm` parameter in the method signature.
Instead, one can simply set the realm in the `challenge` dict if necessary.
Also fixed the tests accordingly (and added a new one for "Bearer" auth-scheme).
2017-06-29 12:34:52 +02:00
François KUBLER
1f24abc3d2
Fixed support for "Bearer" and "Token" auth-schemes.
...
Removed the test for "Authentication: Bearer Token <TOKEN>" which was not supposed to exist (see https://github.com/channelcat/sanic/pull/821 )
Also added a call to `split` when retrieving the token value to handle cases where there are leading or trailing spaces.
2017-06-29 10:23:49 +02:00
François
76e62779ba
Merge branch 'master' into forbidden-exception
2017-06-28 17:25:40 +02:00
Eli Uriegas
1af343ef50
Merge pull request #823 from ojii/cookies-warning
...
Added a warning to the cookies documentation about security
2017-06-27 19:35:35 -07:00
Jonas Obrist
412ffd1592
Added a warning to the cookies documentation about security
2017-06-28 11:05:59 +09:00
Daniel Schwarz
b141fec573
Merge remote-tracking branch 'upstream/master'
...
# Conflicts:
# sanic/server.py
2017-06-27 13:32:49 +02:00
François KUBLER
d2e14abfd5
Inverted the order of prefixes in Request.token property.
...
As suggested by @allan-simon
See: https://github.com/channelcat/sanic/pull/811#pullrequestreview-46144327
2017-06-27 12:57:47 +02:00
Raphael Deem
d4abca0480
Merge pull request #818 from youknowone/debug
...
Introduce debug mode for HTTP protocol
2017-06-26 22:02:37 -07:00
Raphael Deem
529f5822ee
Merge pull request #819 from r0fls/817
...
convert environment vars to int if digits
2017-06-26 21:54:54 -07:00
Raphael Deem
395d85a12f
use try/except
2017-06-26 21:35:01 -07:00
Raphael Deem
4379a4b067
float logic
2017-06-26 20:59:59 -07:00
Raphael Deem
ad8e1cbf62
convert environment vars to int if digits
2017-06-26 20:49:41 -07:00
Jeong YunWon
dc5a70b0de
Introduce debug mode for HTTP protocol
2017-06-26 21:13:13 +09:00
Yun Xu
b5d1f52ea4
make flake8 happy
2017-06-25 10:22:40 -07:00
Yun Xu
221cf235b5
fix a unit test
2017-06-25 01:03:28 -07:00
Yun Xu
7720e31a31
add unit test
2017-06-25 00:51:59 -07:00
Yun Xu
d812affef0
add graceful_shutdown_timeout to gunicorn worker
2017-06-25 00:51:14 -07:00
Yun Xu
5c19eb34bf
add graceful_shutdown_timeout
2017-06-24 19:00:33 -07:00
7
e18ebaee3d
Merge pull request #4 from channelcat/master
...
merge upstream master branch
2017-06-24 18:21:13 -07:00
Eli Uriegas
dbcbf12456
Merge pull request #811 from Frzk/bearer-support
...
Added support for 'Authorization: Bearer <TOKEN>' header...
2017-06-23 10:32:21 -07:00
Eli Uriegas
c04b44057c
Merge pull request #813 from Frzk/unauthorized-exception
...
Added an Unauthorized exception
2017-06-23 10:30:51 -07:00
François KUBLER
60aa60f48e
Fixed the test for the new Unauthorized exception.
2017-06-23 17:16:31 +02:00
François KUBLER
2848d7c80e
Added a Forbidden exception
...
Also added a small test.
2017-06-23 16:44:57 +02:00
François KUBLER
9fcdacb624
Modified the name of an argument.
2017-06-23 16:29:04 +02:00
François KUBLER
cf1713b085
Added a Unauthorized exception.
...
Also added a few tests related to this new exception.
2017-06-23 16:12:15 +02:00
7
f049a4ca67
Recycling gunicorn worker ( #800 )
...
* add recycling feature to gunicorn worker
* add unit tests
* add more unit tests, and remove redundant trigger_events call
* fixed up unit tests
* make flake8 happy
* address feedbacks
* make flake8 happy
* add doc
2017-06-22 13:26:50 -07:00
François KUBLER
55f860da2f
Added support for 'Authorization: Bearer <TOKEN>' header in Request.token property.
...
Also added a test case for that kind of header.
2017-06-22 18:11:23 +02:00
Eli Uriegas
b5369e611c
Merge pull request #764 from stopspazzing/master
...
Clean up of examples.
2017-06-20 14:53:37 -07:00
Jeremy Zimmerman
3d1dd1c6ac
re-add extensions.md to fix merge conflict.
2017-06-20 14:49:12 -07:00
Eli Uriegas
10a363b275
Merge pull request #809 from jrocketfingers/feature/allow-textual-responses
...
Allow textual responses when using test_client and aiohttp 2
2017-06-20 10:30:26 -07:00
Nikola Kolevski
d865c5e2b6
Conform to pep8
2017-06-20 13:22:28 +02:00
Nikola Kolevski
9fac37588c
Allow textual responses when using test_client and aiohttp 2
2017-06-20 13:15:30 +02:00
Jeremy Zimmerman
aac0d58417
Delete extensions.md
...
non-core content moved to wiki
2017-06-19 15:18:32 -07:00
Eli Uriegas
b37e6187d4
Merge pull request #802 from yunstanford/add-match-info
...
Add match_info property to request class
2017-06-18 10:15:46 -07:00
Yun Xu
20138ee85f
add match_info to request
2017-06-17 09:47:58 -07:00
Raphael Deem
6dc569cde5
Merge pull request #795 from ekampf/patch-1
...
Prevent `run` from overriding logging config set in constructor
2017-06-15 23:39:09 -07:00
Eran Kampf
77cf0b678a
Fix has_log value
2017-06-15 11:21:08 -07:00
Eran Kampf
2dfb061063
Prevent run from overriding logging config set in constructor
...
When creating the `Sanic` instance I provide it with a customized `log_config`.
Calling `run` overrides these settings unless I provide it *again* with the same `log_config`.
This is confusing and error prone. `run` shouldnt override configurations set in the `Sanic` constructor...
2017-06-15 10:39:00 -07:00
7
e4669e2581
Merge pull request #3 from channelcat/master
...
merge upstream master branch
2017-06-12 22:15:31 -07:00
Eli Uriegas
df47cf72d3
Merge pull request #791 from seemethere/add_docs_requirements
...
Add docs requirements
2017-06-12 10:55:45 -07:00
Eli Uriegas
ba1b34e375
Add docs requirements
...
Closes channelcat/sanic#787
2017-06-12 10:29:38 -07:00
Eli Uriegas
950b5ee529
Merge pull request #789 from yunstanford/coverage-report
...
Coverage report
2017-06-11 23:38:04 -07:00
Raphael Deem
041c48de19
Merge pull request #790 from r0fls/752
...
fix #752
2017-06-11 23:24:32 -07:00
Raphael Deem
599fbcee6e
fix #752
2017-06-11 23:20:04 -07:00
Yun Xu
ce2df8030c
quick fix for test_gunicorn_worker test
2017-06-11 09:06:48 -07:00
Yun Xu
47e761bbe2
add coverage report
2017-06-11 08:49:35 -07:00
7
0646baa18d
Merge pull request #2 from channelcat/master
...
remote-tracking with upstream
2017-06-10 11:54:11 -07:00
Eli Uriegas
38997c1b47
Merge pull request #786 from yunstanford/handle_stream_404
...
Handle stream 404
2017-06-10 10:03:54 -07:00
Yun Xu
acaafabc23
retry build
2017-06-10 09:57:32 -07:00
Yun Xu
6a80bdafa6
add unit tests
2017-06-10 09:48:30 -07:00
Yun Xu
cf30ed745c
also should handle InvalidUsage exception
2017-06-10 09:42:48 -07:00
Eli Uriegas
a399fb4044
Merge pull request #785 from youknowone/gunicorn
...
Gunicorn worker hints app weather it is being terminated
2017-06-09 11:00:12 -07:00
Yun Xu
24b946e850
make flake8 happy
2017-06-09 08:43:23 -07:00
Yun Xu
236daf48ff
add unit tests
2017-06-09 08:42:48 -07:00
Yun Xu
4942af27dc
handle NotFound
2017-06-09 08:33:34 -07:00
7
3adb90071b
Merge pull request #1 from channelcat/master
...
merge upstream project
2017-06-09 08:23:14 -07:00
Jeong YunWon
29b4a2a08c
Gunicorn worker hints app weather it is being terminated
...
For now, `Sanic.is_running` is set when the worker is started but not
unset when it is about to stopped. Setting the flag for quit signal
will not affect working requests, but the `Sanic.is_running` flag still
can be used to support graceful termination.
2017-06-09 14:51:15 +09:00
Eli Uriegas
e1331fc0a2
Merge pull request #783 from yunstanford/master
...
add content_type property in request
2017-06-08 17:30:07 -07:00
Yun Xu
3802f8ff65
unit tests
2017-06-08 17:25:22 -07:00
Eli Uriegas
4b0abdbe7c
Merge pull request #782 from yunstanford/sanic-transmute-doc
...
add sanic-transmute
2017-06-08 14:27:29 -07:00
Yun Xu
81889fd7a3
add unit tests
2017-06-07 20:48:07 -07:00
Yun Xu
aac99c45c0
add content_type property in request
2017-06-07 20:46:48 -07:00
Yun Xu
566a6369a5
add sanic-transmute
2017-06-07 20:27:54 -07:00
Eli Uriegas
4fdf340d04
Merge pull request #773 from mbatchkarov/await-json-too
...
Testing: store JSON response in local request
2017-06-07 12:05:30 -07:00
Miroslav Batchkarov
ddd7145153
check json is None if body is not JSON
2017-06-07 10:03:27 +01:00
Miroslav Batchkarov
3f22b644b6
wrap call to json in try-except to make tests pass
2017-06-07 09:57:07 +01:00
Eli Uriegas
639c9f579d
Merge pull request #774 from algtmatt/feature/logging_doc_fixes
...
Small logging docs fixes
2017-06-05 10:56:00 -07:00
Matthew Snyder
735b8665f1
Small logging docs fixes
2017-06-05 10:42:17 -07:00
Miroslav Batchkarov
199fa50a9d
also store json result in local request
2017-06-05 16:24:23 +01:00
Jeremy Zimmerman
aac5ad8504
Merge remote-tracking branch 'origin/master'
2017-06-01 16:53:36 -07:00
Jeremy Zimmerman
349c108ebc
re-added request_stream example.
2017-06-01 16:52:56 -07:00
Eli Uriegas
3b464782ef
Merge pull request #765 from ttopholm/master
...
Added content_type to be set for son response
2017-06-01 16:29:08 -05:00
Tue Topholm
3d97fd8d2a
Removed whitespace
2017-06-01 23:09:37 +02:00
Tue Topholm
c102e76146
Fixed line width
2017-06-01 23:01:27 +02:00
Jeremy Zimmerman
beee7b68bf
reverted back to default 0.0.0.0 host
2017-06-01 14:01:13 -07:00
Tue Topholm
f47e571d92
Added content_type to be set for son response
2017-06-01 22:53:56 +02:00
Jeremy Zimmerman
4b5320a8f0
Clean up of examples. Removes non-core examples, optimizes and restyles remaining to strictly follow PEP 8 styling guidelines. Non-Core examples will be moved to Wiki.
2017-06-01 11:53:05 -07:00
Daniel Schwarz
30c2c89c6b
fix partial url parsing
2017-05-30 16:13:49 +02:00
Raphael Deem
4a1d1a0dc1
Merge pull request #750 from xenu256/patch-1
...
aiomysql has DictCursor
2017-05-29 22:54:09 -07:00
Raphael Deem
360adc9130
Merge pull request #757 from monobot/asyncOrmV020
...
update asyncorm version example to 0.2.0
2017-05-29 22:51:46 -07:00
Raphael Deem
cc21abe843
Merge pull request #751 from ak04nv/patch-1
...
Update jinja_example.py
2017-05-28 23:50:16 -07:00
monobot
9a27555763
update asyncorm version example to 0.2.0
2017-05-29 00:01:56 +01:00
Daniel Schwarz
aaef2fbd01
fix flake8 errors
2017-05-28 18:46:07 +02:00
Anton Kochnev
5bb640ca17
Update jinja_example.py
...
Added python version check for enabling async mode.
2017-05-28 14:37:41 +08:00
Daniel Schwarz
0e5c7a62cb
remove debug messages
2017-05-27 22:36:08 +02:00
Daniel Schwarz
1b33e05f74
fix debug log messages
2017-05-27 16:32:39 +02:00
Daniel Schwarz
53a04309ff
add header_fragment handeling
2017-05-27 16:28:57 +02:00
Daniel Schwarz
dc411651b6
add check for header and value
2017-05-27 15:36:57 +02:00
Daniel Schwarz
514540b90b
add debug for header values
2017-05-27 15:32:37 +02:00
Tadas Talaikis
a5249d1f5d
aiomysql has DictCursor
2017-05-27 11:06:45 +03:00
Eli Uriegas
21aa3f6578
Merge pull request #748 from messense/feature/websocket-config
...
Add websocket max_size and max_queue configuration
2017-05-26 10:44:49 -05:00
messense
0024edbbb9
Add websocket max_size and max_queue configuration
2017-05-26 11:15:28 +08:00
Raphael Deem
23cb39b557
Merge pull request #744 from algtmatt/feature/from_file_doc_fix
...
Update config file loader docs
2017-05-24 18:16:10 -07:00
Eli Uriegas
48de321869
Merge pull request #697 from 38elements/stream
...
Add Request.stream
2017-05-24 16:22:52 -07:00
Raphael Deem
c6d68009d2
Merge pull request #745 from messense/feature/gunicorn-worker-test-case
...
Add a simple integration test for Gunicorn worker
2017-05-23 20:53:01 -07:00
Raphael Deem
2cab267405
Merge pull request #734 from ashleysommer/static_large_file_stream
...
Add option to static helper to use streaming for large files.
2017-05-23 20:52:12 -07:00
messense
6bdc0d2e5e
Fix Gunicorn worker
2017-05-23 11:28:12 +08:00
messense
3eed81c1eb
Add a simple integration test for Gunicorn worker
2017-05-23 11:04:27 +08:00
Raphael Deem
b447807b36
Merge pull request #742 from r0fls/700
...
changes required for unix socket support
2017-05-22 19:29:32 -07:00
Eli Uriegas
2771c8c32e
Merge pull request #738 from messense/feature/conduct
...
Add Code of Conduct
2017-05-22 15:34:01 -07:00
Eli Uriegas
21a88bc2d3
Add maintainers email address
2017-05-22 15:31:05 -07:00
Matthew Snyder
57c1838f68
Update config file loader docs
2017-05-22 14:10:08 -07:00
Raphael Deem
52b0254ec6
unix socket support; fixes #700
2017-05-21 03:15:06 -07:00
Raphael Deem
49631542ce
Merge pull request #732 from jrocketfingers/feature/explicit-register-middleware
...
Extract register_middleware into a method.
2017-05-21 03:06:12 -07:00
Raphael Deem
4b80ffb9eb
Merge pull request #740 from r0fls/739
...
add abort function
2017-05-21 02:20:02 -07:00
Raphael Deem
9efa7c116d
remove redundant code; decode response
2017-05-20 23:27:00 -07:00
Raphael Deem
5d9c8d59a0
add abort() test
2017-05-20 14:43:57 -07:00
Raphael Deem
1a60201f68
flake8 spacing
2017-05-20 10:44:09 -07:00
Raphael Deem
f3186abf09
SANIC_EXCEPTIONS -> _sanic_exceptions
2017-05-20 10:29:00 -07:00
Raphael Deem
6bcc0d3c7f
Merge remote-tracking branch 'upstream/master'
2017-05-20 02:17:26 -07:00
Raphael Deem
57b9a57dde
Update README.rst
2017-05-20 02:17:12 -07:00
Raphael Deem
28994f4b64
update todo
2017-05-20 02:15:45 -07:00
Raphael Deem
588b4712bf
add exception decorator
2017-05-20 01:24:34 -07:00
Raphael Deem
d3b6208057
add abort function
2017-05-19 18:52:19 -07:00
Ashley Sommer
ef80953b1b
Fix flake8 line length error.
2017-05-20 09:56:05 +10:00
ashleysommer
72db1188c7
Add an option to the static() helper to switch on streaming for large files.
...
By default uses a 1M threshold.
ie. if the static file to serve is >= 1M it will stream the file.
This threshold value is configurable by passing an int instead of a bool to `stream_large_files` parameter of `static()`.
2017-05-20 09:56:05 +10:00
Raphael Deem
0858d3c544
Merge pull request #733 from ashleysommer/file_stream
...
Add file_stream response handler
2017-05-19 16:48:12 -07:00
Ashley Sommer
5c5656f981
Moved file_stream tests to test_responses.py
2017-05-20 09:41:36 +10:00
Raphael Deem
58a9c92d75
fix 739
2017-05-19 13:35:04 -07:00
Eli Uriegas
a6dc4646db
Merge pull request #737 from 38elements/deploying
...
Fix Running via Gunicorn in deploying.md
2017-05-19 12:10:36 -07:00
messense
8ff553e926
Add Code of Conduct
2017-05-19 23:09:44 +08:00
38elements
848a5c61f0
Fix Running via Gunicorn in deploying.md
2017-05-19 23:22:57 +09:00
Raphael Deem
d49000e9f4
Merge pull request #736 from fanjindong/examples_read
...
debug 'Blueprint names must be unique'
2017-05-19 01:45:06 -07:00
fanjindong
a82145c4e6
debug 'Blueprint names must be unique'
2017-05-19 16:26:56 +08:00
Ashley Sommer
181edb7235
Test file() and file_stream() response helpers.
...
Added test for `file()` response helper and `file_stream()` response helper.
2017-05-19 13:01:21 +10:00
Ashley Sommer
ff2ae11ac8
Remove exception print(e) statement.
2017-05-19 13:00:01 +10:00
Johnny Rocketfingers
3f841f3b21
Switch to non-hardcoded register_middleware.
2017-05-18 22:08:44 +02:00
ashleysommer
181977ad4e
Added brief documentation with an example for file_stream
...
Added test to ensure `file_stream()` works in the test suite.
2017-05-18 18:12:26 +10:00
ashleysommer
e155fe403d
Add file_stream response handler
...
For streaming large static files
Like `file()` but breaks the file into chunks and sends it with a `StreamingHTTPResponse`
Chunk size is configurable, but defaults to 4k, this seemed to be the sweet spot in my testing.
Also supports ContentRange same as `file()` does.
2017-05-18 18:04:28 +10:00
Johnny Rocketfingers
bf5438d573
Extract register_middleware into a method.
2017-05-18 06:36:11 +02:00
Raphael Deem
0e4aaf8856
Merge pull request #731 from jrocketfingers/fix/token-missing-auth-headers
...
Check that the Authorization headers are actually provided.
2017-05-17 13:10:12 -07:00
Raphael Deem
5c44ce1637
Merge pull request #719 from messense/feature/worker-uvloop
...
Gunicorn worker should not require uvloop
2017-05-17 12:47:19 -07:00
Raphael Deem
974fe25a11
Merge pull request #722 from messense/feature/ci-without-ext
...
Add py3*-no-ext test env
2017-05-17 12:47:05 -07:00
Johnny
58bae83558
Add a regression test.
2017-05-17 11:15:45 +02:00
Johnny
5d309af86f
Check that the headers are actually provided.
2017-05-17 11:08:50 +02:00
messense
ec857d1c53
Drop tox-travis
2017-05-17 12:21:56 +08:00
messense
2f84cdd708
Fix websocket handler bug on Python3.5 with no uvloop
2017-05-17 12:12:25 +08:00
messense
7cc02e84ed
Fix json loads bug on Python 3.5
2017-05-17 12:12:25 +08:00
Raphael Deem
87c2a5bc97
Merge pull request #724 from suoning/doc-logger
...
update logging doc
2017-05-16 21:10:57 -07:00
Eli Uriegas
826c2e0f4e
Merge pull request #725 from 38elements/contributing
...
Add rule in CONTRIBUTING.md
2017-05-15 14:45:57 -07:00
Eli Uriegas
b5e25e13b7
Merge pull request #727 from argaen/update_aiocache_example
...
Update aiocache example to latest version
2017-05-15 11:39:02 -07:00
argaen
f9653114d1
Update aiocache example to latest version
2017-05-15 20:30:52 +02:00
Eli Uriegas
6b7e19891b
Get rid of un-needed s, Fix some formatting.
2017-05-15 10:54:47 -07:00
38elements
a677f14423
Add rule in CONTRIBUTING.md
2017-05-15 21:28:35 +09:00
suoning
dddce3f30d
update logging, Remove the comments
2017-05-15 13:59:03 +08:00
Raphael Deem
be93d670a3
Merge pull request #717 from jrocketfingers/fix/ipv6-access-log
...
Fix "TypeError: not all arguments converted during string formatting"
2017-05-14 20:28:07 -07:00
suoning
68d4bb6ffe
update logging doc
2017-05-15 10:54:30 +08:00
suoning
a27471178a
update logger doc
2017-05-15 10:25:19 +08:00
messense
66fcb0cc8f
Add py3*-no-ext test env
2017-05-15 10:10:50 +08:00
messense
05d0ddc281
Gunicorn worker should not require uvloop
2017-05-15 00:01:51 +08:00
Johnny Rocketfingers
b1890f50b6
Conform to pep8
2017-05-14 10:15:11 +02:00
Johnny Rocketfingers
b44c707e94
Prevent incorrect tuple size on get_extra_info errors
...
According to https://docs.python.org/3/library/asyncio-protocol.html#asyncio.BaseTransport.get_extra_info ,
get_extra_info fails by returning None. This is an attempt in
normalization of the response in cases of AF_INET, AF_INET6 and
erroneous return values.
2017-05-14 09:56:56 +02:00
Johnny
4c7675939a
Fix "TypeError: not all arguments converted during string formatting"
...
socket.getpeername() returns AF_INET6 address family four-tuple, with
flowid and scopeid.
In server's write_response, an exception is raised when an IPv6 client
connects due to four-tuple elements having two unused elements (flowid
and scopeid).
This makes sure that only the first two (host and port) are used in log
string formatting.
2017-05-13 17:35:04 +02:00
Eli Uriegas
fa1b7de52a
Merge pull request #706 from messense/feature/remove-log-file
...
Remove timedRotatingFile log config
2017-05-12 10:56:19 -07:00
Eli Uriegas
666f8c8d3c
Merge pull request #712 from stopspazzing/master
...
Fixed plotly_example, now works
2017-05-12 10:39:57 -07:00
Jeremy Zimmerman
996c0b3280
Fixed with a working example
...
Remember:
K.I.S.S
2017-05-11 13:40:16 -07:00
Eli Uriegas
f9d428de8b
Merge pull request #711 from stopspazzing/master
...
Use of register_blueprint will be deprecated, why not upgrade?
2017-05-11 12:53:43 -07:00
Jeremy Zimmerman
a17b3f1b84
Use of register_blueprint will be deprecated, why not upgrade?
2017-05-11 12:33:57 -07:00
Jeremy Zimmerman
f39512aa63
double if statement ( #707 )
...
* Migrated `%` string formating
* double if statement
combined double 'if' to a single 'if' with 'and'
* Revert "Fix "Prefer `format()` over string interpolation operator" issue"
2017-05-11 11:49:32 -07:00
Raphael Deem
23ee9f64d4
Merge pull request #710 from monobot/asyncorm_update
...
modify the asyncorm example, with the new lazy querysets
2017-05-11 10:35:52 -07:00
monobot
ad68739df7
modify the asyncorm example, for the new lazy querysets
2017-05-11 18:15:04 +01:00
38elements
a50d8421b8
Add heading in streaming.md
2017-05-11 19:18:58 +09:00
messense
3ea1b07906
Revert "Add access.log and error.log to .gitignore"
...
This reverts commit fc0d69616c .
2017-05-11 11:19:03 +08:00
messense
c3683662c2
Remove timedRotatingFile log config
2017-05-11 11:18:59 +08:00
Eli Uriegas
861865807a
Merge pull request #705 from stopspazzing/patch-2
...
spelling mistake
2017-05-10 10:52:29 -07:00
Jeremy Zimmerman
18930082e2
spelling mistake
...
fixed incorrect spelling
2017-05-10 09:38:57 -07:00
38elements
6a14e49479
Replace stream decorator to stream parameter
2017-05-09 22:31:15 +09:00
Raphael Deem
c530d5f016
Merge pull request #704 from seemethere/fix_camel_case
...
Fix camel case module
2017-05-08 20:50:39 -07:00
Eli Uriegas
ac5e1a6ebd
Fix import
2017-05-08 20:47:20 -07:00
Eli Uriegas
bb6de53f28
Fix docs
2017-05-08 20:44:19 -07:00
Eli Uriegas
bfcd499cc2
Remove default_filter module, put into logging
2017-05-08 20:41:34 -07:00
Eli Uriegas
3e88ec18e2
Actually add file >.>
2017-05-08 20:37:44 -07:00
Eli Uriegas
1fb640c313
Fix camel case module
2017-05-08 20:36:57 -07:00
Eli Uriegas
bece3d2bcf
Merge pull request #702 from seemethere/increment_054
...
Increment to 0.5.4
2017-05-08 17:44:50 -07:00
Eli Uriegas
307d866bb6
Increment to 0.5.4
2017-05-08 17:44:23 -07:00
Eli Uriegas
95c9514a44
Merge pull request #701 from seemethere/increment_053
...
Increment to 0.5.3
2017-05-08 17:42:54 -07:00
Eli Uriegas
768be433d6
Increment to 0.5.3
2017-05-08 17:42:26 -07:00
38elements
4d4f38fb35
is_request_stream for CompositionView and HTTPMethodView
2017-05-09 01:04:03 +09:00
38elements
15ad07f03d
Fix streaming.md
2017-05-08 00:10:36 +09:00
38elements
0b53c413a7
Add stream decorator for HTTPMethodView
2017-05-07 21:33:15 +09:00
38elements
931397c7e1
Add stream for CompositionView
2017-05-07 18:38:48 +09:00
38elements
ef2cc7ebf5
Add Request.stream
2017-05-07 18:38:48 +09:00
Eli Uriegas
8d3fd75ec2
Merge pull request #695 from kszucs/aiopeewee
...
aiopeewee example
2017-05-05 11:31:37 -07:00
Szucs Krisztian
a42b254c33
use async version of model_to_dict
2017-05-05 10:51:12 +02:00
Szucs Krisztian
d24e1ae110
removed lines from distributed example
2017-05-05 08:25:18 +02:00
Szucs Krisztian
2e7badab4e
aiopeewee example
2017-05-05 08:19:09 +02:00
Raphael Deem
7cf3d49f00
Merge pull request #690 from 38elements/sanic_endpoint_test
...
Remove utils.py
2017-05-03 23:56:13 -07:00
38elements
25037006bf
Remove utils.py
2017-05-04 15:52:18 +09:00
Eli Uriegas
f611eb2c2b
Merge pull request #686 from 38elements/loop
...
Remove loop argument in run() and create_server()
2017-05-03 15:27:16 -07:00
38elements
e12c10b087
Remove loop argument in run() and create_server()
2017-05-03 17:52:19 +09:00
Raphael Deem
9527e5ded8
Merge pull request #685 from r0fls/document-create-server
...
document create_server method
2017-05-02 22:45:51 -07:00
Raphael Deem
23b4b20b4f
document create_server method
2017-05-02 22:44:42 -07:00
Eli Uriegas
7f9ecd659c
Merge pull request #682 from graingert/fix-readme.rst-encoding
...
fix README.rst -> long_description encoding
2017-05-02 10:48:45 -07:00
Eli Uriegas
bb31d465f2
Add distribution types
2017-05-02 10:47:55 -07:00
Thomas Grainger
834468e8e7
fix README.rst -> long_description encoding
2017-05-02 17:37:17 +01:00
Eli Uriegas
4720513672
Merge pull request #679 from graingert/verify-readme-rst-pypi
...
verify readme for PyPI
2017-05-02 09:31:01 -07:00
Eli Uriegas
a480110d43
Merge pull request #681 from 38elements/deprecation
...
Remove before_start, before_stop, after_start and after_stop
2017-05-02 09:28:33 -07:00
38elements
0a2c95cc10
Remove before_start, before_stop, after_start and after_stop
2017-05-02 23:07:09 +09:00
Thomas Grainger
9d2e32902d
check readme in travis
2017-05-02 10:17:24 +01:00
Thomas Grainger
77b6413526
validate readme for PyPI
2017-05-02 10:05:06 +01:00
Thomas Grainger
9e502099e0
add readme to package directly
2017-05-02 10:05:05 +01:00
Eli Uriegas
c6a7e44ae7
Merge pull request #678 from stopspazzing/patch-1
...
misspelling
2017-05-01 17:27:31 -07:00
Jeremy Zimmerman
1bf06312b8
misspelling
...
acutal -> actual
2017-05-01 17:07:38 -07:00
Eli Uriegas
c35721abbd
Merge pull request #670 from ticosax/set-exit-code-on-error
...
In case of error when starting sanic
2017-05-01 15:16:02 -07:00
Eli Uriegas
7f3c417078
Merge pull request #677 from abuckenheimer/master
...
added exception chain rendering in debug #675
2017-05-01 15:15:34 -07:00
Alec Buckenheimer
69511c2783
added exception chain rendering in debug #675
2017-05-01 12:56:33 -04:00
Eli Uriegas
158a94d34c
Merge pull request #674 from 38elements/test-for-uri-template
...
Add test for uri_template
2017-04-30 20:22:51 -07:00
Eli Uriegas
db58bd68f5
Merge pull request #673 from 38elements/routing
...
Fix docs/sanic/routing.md
2017-04-30 20:22:30 -07:00
38elements
e65f08a2c8
Fix docs/sanic/routing.md
2017-04-30 22:03:16 +09:00
38elements
ab8f616385
Add test for uri_template
2017-04-30 21:57:32 +09:00
Eli Uriegas
6dc6f9bbb5
Merge pull request #671 from banteg/uri-template
...
Expose matched request uri template
2017-04-28 14:22:59 -07:00
banteg
7754bb995b
expose matched request uri template
2017-04-29 02:39:56 +07:00
Nicolas Delaby
d1fefce61c
fixup! In case of error when starting sanic
2017-04-28 20:06:44 +02:00
Nicolas Delaby
c3abdab9c4
The main process that spawn sub processes doesn't run any loop.
...
let's not try to stop one
2017-04-28 19:57:49 +02:00
Nicolas Delaby
8b13e103fd
In case of error when starting sanic
...
Don't exit with code 0
2017-04-28 19:08:51 +02:00
Eli Uriegas
5f94f65f4f
Merge pull request #669 from 38elements/log
...
Add access.log and error.log to .gitignore
2017-04-28 07:40:42 -07:00
38elements
fc0d69616c
Add access.log and error.log to .gitignore
2017-04-28 18:52:15 +09:00
Raphael Deem
656f5b93d6
Merge pull request #668 from seemethere/stop_workers_on_sigint
...
Add the killing of children
2017-04-27 22:39:48 -07:00
Eli Uriegas
436d37c079
Add the killing of children
...
Kills children processes when parent process receives a signal to
shutdown.
Solves for #594
2017-04-27 17:47:08 -07:00
Eli Uriegas
ed0081fcf7
Merge pull request #625 from zenixls2/master
...
based on issue #608 , create access log
2017-04-27 14:31:53 -07:00
Eli Uriegas
140062f8a3
Merge pull request #662 from rsrdesarrollo/master
...
invariant: body after request is processed must be binary
2017-04-27 14:31:28 -07:00
Raphael Deem
75f5fa7c06
Merge pull request #666 from pyx/issue-665
...
Fix #665 - ImportError not preserved in __main__.py
2017-04-27 00:32:09 -07:00
Philip Xu
9152a1a266
Improved on wording
2017-04-27 03:16:38 -04:00
Philip Xu
ade89ab795
Fix #665 - ImportError not preserved in __main__.py
2017-04-26 22:57:19 -04:00
zenix
95cfdee8b8
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-26 14:50:42 +09:00
zenix
63a27cc5e2
add document on logging
2017-04-26 14:50:21 +09:00
Eli Uriegas
472face796
Add link to issue tracking sanic projects!
2017-04-25 21:50:49 -07:00
Raphael Deem
8d537a6d0b
Merge pull request #663 from mmaybeno/fix_jinja_example_typo
...
Fix typo for jinja example and converted to dir
2017-04-25 20:29:12 -07:00
Matt Maybeno
b3101d339e
Fix typo for jinja example and converted to dir
2017-04-25 20:10:46 -07:00
Raúl Sampedro
85acddddba
invariant: body after request is processed must be binary
2017-04-25 12:00:27 +02:00
zenix
c9d747d97f
fix merge error
2017-04-25 11:46:13 +09:00
zenix
0bba267808
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-25 11:07:40 +09:00
Eli Uriegas
1036242064
Merge pull request #661 from seemethere/increment_052
...
Increment to 0.5.2
2017-04-24 13:39:39 -05:00
Eli Uriegas
5fd62098bd
Increment to 0.5.2
2017-04-24 11:37:04 -07:00
Raphael Deem
74cc7be922
Merge branch 'master' into master
2017-04-24 00:47:01 -07:00
Raphael Deem
b3814ca89a
Merge pull request #646 from r0fls/637
...
allow disabling keep alive
2017-04-24 00:43:16 -07:00
Raphael Deem
b75a321e4a
Merge pull request #644 from kszucs/master
...
Example to use dask distibuted
2017-04-22 01:14:34 -07:00
Raphael Deem
9caa4fec4a
Merge pull request #656 from r0fls/token-rework
...
update token attribute
2017-04-21 22:44:42 -07:00
Raphael Deem
a0cba1aee1
accept token directly in auth header
2017-04-21 22:36:45 -07:00
Raphael Deem
97018ad62f
Merge pull request #655 from seemethere/fix_gunicorn_worker
...
Fix duplicate signal settings for gunicorn worker
2017-04-21 22:16:43 -07:00
Eli Uriegas
a7d17fae44
Fix duplicate signal settings for gunicorn worker
2017-04-21 17:06:52 -05:00
Raphael Deem
6ce0050979
Merge pull request #652 from 38elements/signal-stopped
...
Fix `this.signal.stopped` is `True` #639
2017-04-20 13:06:28 -07:00
38elements
bc035fca78
Remove unnecessary variables
2017-04-20 18:27:28 +09:00
38elements
df914a92e4
Fix this.signal.stopped is True #639
2017-04-19 11:19:01 +09:00
Szucs Krisztian
1b939a6823
work with distributed 1.16.1
2017-04-17 11:05:19 +02:00
Raphael Deem
81b6d988ec
NO_KEEP_ALIVE -> KEEP_ALIVE
2017-04-16 22:43:49 -07:00
Raphael Deem
7e9b65feca
Merge pull request #647 from r0fls/645
...
use absolute path in static root
2017-04-16 22:06:40 -07:00
Raphael Deem
6f098b3d21
add no_keep_alive setting to docs
2017-04-16 22:05:34 -07:00
Raphael Deem
5ddb0488f2
allow disabling keep alive
2017-04-16 22:03:20 -07:00
Raphael Deem
3e87314adf
use absolute path in static root
2017-04-16 21:58:10 -07:00
Raphael Deem
f6d4a06661
Merge pull request #643 from aryeh/allow_unknown_status_codes
...
Allow unknown status codes
2017-04-16 18:42:59 -07:00
Raphael Deem
ff17fc95e6
Merge pull request #632 from messense/feature/path-route
...
Add path type for router
2017-04-16 18:39:10 -07:00
Eli Uriegas
c5a46f1cea
Merge pull request #638 from seemethere/add_contributing_rules
...
Add new contributing rules
2017-04-16 13:15:01 -05:00
Eli Uriegas
0b072189c4
Merge pull request #641 from TomIsPrettyCool/master
...
Use render_async and a template env with the Jinja2 example.
2017-04-16 13:14:35 -05:00
Szucs Krisztian
5b22d1486a
fix syntax error in comment
2017-04-16 18:13:00 +02:00
Szucs Krisztian
9eb48c2b0d
dask distributed example
2017-04-16 18:11:24 +02:00
aryeh
ff0632001c
prevent crash for unknown response codes
...
set text for unknown status code, otherwise when None is used exception occurs.
2017-04-16 10:07:29 -04:00
aryeh
28bd09a2ea
Merge pull request #1 from channelcat/master
...
pull master
2017-04-16 09:48:59 -04:00
Tom Haines
c6aaa9b09c
Use render_async and a template env with jinja2
2017-04-16 13:50:07 +01:00
Eli Uriegas
20d9ec1fd2
Fix the numbered list
2017-04-14 14:38:45 -05:00
Eli Uriegas
2c45c2d3c0
Add new contributing rules
2017-04-14 14:35:28 -05:00
Eli Uriegas
18829e648a
Merge pull request #635 from yeahx/master
...
fix directory traversal flaw
2017-04-14 14:01:29 -05:00
Eli Uriegas
a64c636a33
Merge pull request #627 from Sniedes722/master
...
Updating examples for 0.5.0
2017-04-14 13:21:43 -05:00
Shawn Niederriter
5796f211c1
Added detailed plotly example project
2017-04-14 17:17:23 +00:00
lazydog
ae09dec05e
fixed UnboundLocalError
2017-04-14 03:38:55 +08:00
lazydog
afd51e0823
fix directory traversal flaw
2017-04-14 02:55:39 +08:00
zenix
0bbf826b21
fix typo
2017-04-13 16:52:40 +09:00
zenix
02d1900e2f
try to fix container error
2017-04-13 16:49:36 +09:00
zenix
73da11b04c
switch to use streaming for access log and error log
2017-04-13 16:26:13 +09:00
zenix
4af07e3731
change naming of default log config
2017-04-13 13:49:45 +09:00
zenix
7f60f85cd4
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-13 13:35:37 +09:00
messense
4c66cb1854
Fix static files router
2017-04-13 12:11:38 +08:00
messense
35b92e1511
Add path type for router
2017-04-13 11:34:35 +08:00
Raphael Deem
e5d3fe52c5
Merge pull request #630 from 38elements/keep_alive
...
Refactor keep_alive
2017-04-12 19:46:33 -07:00
Raphael Deem
63fe7c0a86
Merge pull request #631 from adamserafini/fix-installation
...
Fix installation on Ubuntu 16.10 #629
2017-04-12 18:53:23 -07:00
zenix
c5f137c715
fix original code logic
2017-04-12 18:52:01 +09:00
zenix
66923bc0e3
remove unused param
2017-04-12 18:48:16 +09:00
zenix
8bf7b5a323
remove unused dependency
2017-04-12 18:45:38 +09:00
zenix
36d4d85849
change to use default python config code
2017-04-12 18:44:47 +09:00
zenix
5f0e05f3bf
fix flake8
2017-04-12 18:08:06 +09:00
adam.serafini
235e5511eb
Bump version
2017-04-12 11:02:13 +02:00
zenix
6fb60ae0b1
Merge branch 'master' of https://github.com/channelcat/sanic
2017-04-12 18:01:12 +09:00
adam.serafini
6b2883074b
Fix installation on Ubuntu 16.10
...
Fixes issue #629 . Printing a unicode string at the end of the
setup.py script is asking for trouble. It's also redundant:
the pip tool itself tells the user whether the installation was
successful or not.
2017-04-12 10:59:03 +02:00
38elements
7fe418d1b7
Refactor keep_alive
2017-04-12 17:55:22 +09:00
zenix
f872ceb0d9
fix bug in access logging when error happens
2017-04-12 17:39:17 +09:00
Shawn Niederriter
0f10a36b40
Added url_for example
2017-04-12 06:20:35 +00:00
Shawn Niederriter
3c45c9170f
Fixed to merge with #626
2017-04-11 21:55:45 +00:00
Shawn Niederriter
a0730aeb44
Merge https://github.com/channelcat/sanic
...
Version 0.0.5
2017-04-11 21:47:08 +00:00
Eli Uriegas
e5fdc7fdd0
Merge pull request #626 from seemethere/increment_050
...
Increment to 0.5.0
2017-04-11 16:05:26 -05:00
Eli Uriegas
015c87b5e1
Add traceback for better debugging
2017-04-11 16:02:57 -05:00
Eli Uriegas
d20a49e500
Lock chardet for now...
2017-04-11 16:02:49 -05:00
Shawn Niederriter
adb7331670
Updated examples for 0.5.0
2017-04-11 20:34:55 +00:00
Eli Uriegas
084f0d27a3
Increment to 0.5.0
2017-04-11 15:19:00 -05:00
Eli Uriegas
522a0beec0
Merge pull request #622 from aryeh/provide_request_object
...
Allow a custom Request class to be passed in to Sanic
2017-04-11 15:13:05 -05:00
zenix
bf46bcf376
Merge branch 'logging'
2017-04-11 19:03:35 +09:00
zenix
f330c3f8c5
add logging based on issue #608 , add default config
2017-04-11 18:59:07 +09:00
Raphael Deem
77a51c1e05
Merge pull request #617 from Sniedes722/master
...
Update Examples for 0.4.2
2017-04-10 19:07:29 -07:00
Raphael Deem
144f215705
Merge pull request #623 from qwIvan/master
...
Fixed #615
2017-04-10 18:58:31 -07:00
ivan
51b01b6b44
Merge branch 'master' of github.com:qwIvan/sanic
2017-04-10 18:33:43 +08:00
ivan
09885534c6
fixed #615
2017-04-10 18:31:28 +08:00
aryeh
b9dfec38c2
Break long line (> 80 chars) into 2 lines
2017-04-09 13:38:36 -04:00
aryeh
2ef8120073
Allow a custom Request class to be passed in to Sonic
...
Allowing a custom Request class to be defined would enable either a different Request class or a subclass of Request to be used, providing more flexibility.
2017-04-09 13:29:21 -04:00
Raphael Deem
52ff2e0e63
Merge pull request #621 from r0fls/620
...
fix python -m method of running
2017-04-08 13:32:17 -07:00
Raphael Deem
8cf7dce33f
fix python -m method of running
2017-04-08 13:31:17 -07:00
Shawn Niederriter
9d3bb4a37a
Updated examples in-line with response docs
2017-04-06 19:47:25 +00:00
Shawn Niederriter
c30437448b
Updated aiohttp & run_async examples, added redirect
2017-04-06 19:42:05 +00:00
Raphael Deem
7e3496f8aa
Merge pull request #614 from dkruchinin/middleware
...
Response middleware should be called even if server replies with an error
2017-04-06 11:49:44 -07:00
Shawn Niederriter
46ac79f4dc
Update run_async demo
2017-04-06 14:39:54 -04:00
Shawn Niederriter
833b14e353
Updated aiohttp example.
2017-04-06 13:33:29 -04:00
Eli Uriegas
e9eca25792
Merge pull request #616 from r0fls/610
...
use socket.set_inheritable instead of os version
2017-04-04 15:17:31 -05:00
Raphael Deem
1854ad133c
use socket.set_inheritable instead of os version
2017-04-04 13:13:52 -07:00
Eli Uriegas
2b5e723ea5
Merge pull request #519 from youknowone/recall-379
...
Add #379 again and make related test rework
2017-04-04 15:08:57 -05:00
Raphael Deem
9a18906edd
Merge pull request #612 from dkruchinin/prom
...
Add prometheus extension
2017-04-04 11:06:43 -07:00
Raphael Deem
93cb7582c2
Merge branch 'master' into prom
2017-04-04 11:06:32 -07:00
Raphael Deem
b4529639f6
Merge pull request #611 from ashleysommer/master
...
Add Sanic-RestPlus to extensions.
2017-04-04 11:06:02 -07:00
Dan Kruchinin
f0a59fccf8
flake8-related fixes
2017-04-04 17:19:45 +01:00
Dan Kruchinin
46dbaf95a6
Response middleware should be called even if server replies with error
2017-04-04 15:55:43 +01:00
Dan Kruchinin
d418b03708
Add prometheus extension
2017-04-04 14:22:31 +01:00
Ashley Sommer
765e90ecfa
update extensions
...
Add Sanic-RestPlus!
2017-04-04 13:40:59 +10:00
Ashley Sommer
ff1e88dde6
Merge pull request #2 from channelcat/master
...
update to latest sanic
2017-04-04 13:39:21 +10:00
Eli Uriegas
62ebcba647
Add graphql integration extension
...
Closes #579
2017-04-03 14:45:18 -05:00
Jeong YunWon
429e90183b
Add #379 again and make related test rework
...
Original PR: https://github.com/channelcat/sanic/pull/379
2017-04-03 18:56:39 +09:00
Raphael Deem
875790e862
Merge pull request #606 from monobot/master
...
Fix URL Parse Error #599
2017-04-02 12:16:24 -07:00
monobot
25edbe6805
update docs
2017-04-02 02:28:16 +01:00
monobot
e148b50d6a
Merge remote-tracking branch 'upstream/master'
2017-04-02 00:02:49 +01:00
Raphael Deem
06d46d56cd
Merge pull request #602 from jkbbwr/fix/env-install
...
Flake8 cleanup. Setup environmental variables.
2017-03-31 10:42:21 -07:00
Jakob Bowyer
edd8770c67
Restored tests to upstream/master
2017-03-31 08:53:46 +01:00
Jakob Bowyer
daedda8547
Checked out original tests
2017-03-31 08:51:12 +01:00
Raphael Deem
df9d897e75
Merge pull request #607 from nosahama/hotfix/docs-cookie-typo-fix
...
Typo Fix in docs/sanic/cookies.md
2017-03-30 16:24:58 -07:00
nosaevb
fcd8e5e5ad
Typo Fix in docs/sanic/cookies.md
2017-03-30 23:02:46 +01:00
monobot
6c003f71f4
Merge remote-tracking branch 'upstream/master'
2017-03-29 23:54:11 +01:00
monobot
5b704478d9
raw_args for request objects
2017-03-29 22:06:54 +01:00
Eli Uriegas
60eb528d68
Merge pull request #491 from r0fls/remove-stop-event
...
remove stop_event
2017-03-29 07:08:55 -05:00
Jakob Bowyer
1cf730d957
Added usage documentation for optional installs
2017-03-29 10:12:24 +01:00
Raphael Deem
171110b445
Merge pull request #604 from seemethere/add_docker_unittest_support
...
Fixing the unittests
2017-03-29 02:03:54 -07:00
Jakob Bowyer
22699db855
Moved skips to seperate pull request
2017-03-29 09:16:53 +01:00
Eli Uriegas
18405b3908
There was a line missing here?
2017-03-28 22:57:58 -05:00
Eli Uriegas
f0a55b5cbb
Fix line length again...
2017-03-28 22:51:23 -05:00
Eli Uriegas
04a0774ee5
Fix line length
2017-03-28 22:51:23 -05:00
Eli Uriegas
3a8cfb1f45
Make these tests not so far apart
2017-03-28 22:51:23 -05:00
Eli Uriegas
dcc19d17d4
Lock to aiohttp 1.3.5 for now
2017-03-28 22:51:23 -05:00
Eli Uriegas
1ef69adc6f
Simplify this as well, it replicated effort
2017-03-28 22:51:23 -05:00
Eli Uriegas
75a4df0f32
Simplify this, it had a lot of fluff
2017-03-28 22:51:23 -05:00
Eli Uriegas
8ba1b5fc35
Add docker support for local unit testing
...
Addresses consistency across different OS's by making it very similar to
the base Travis image.
2017-03-28 22:51:23 -05:00
Eli Uriegas
a09471ac6c
Merge pull request #600 from monobot/master
...
added asyncorm example
2017-03-28 22:50:20 -05:00
Eli Uriegas
a916eea684
Merge pull request #601 from SakuraSound/master
...
Detailed example with logging, database access, environment variables, and basic middleware
2017-03-28 22:49:26 -05:00
Eli Uriegas
511998d8e1
Merge pull request #573 from r0fls/env-config
...
allow setting config from individual env variables
2017-03-28 22:24:37 -05:00
Joir-dan Gumbs
e3cf50f791
Changed out redis middleware for redis listeners (open/close). Fleshed out the payloads of both endpoints. Added comment about required packages.
2017-03-28 15:00:23 -07:00
Jakob Bowyer
42ba5298a7
Flake8 cleanup. Setup environmental variables.
...
Skipping broken tests unrelated.
2017-03-28 10:50:09 +01:00
Joir-dan Gumbs
ee79750a22
Cleaned up functions. Added extra middleware function to log endpoint being called. Added documentation to make easier to understand.
2017-03-28 01:22:36 -07:00
Raphael Deem
1787f8617f
Merge pull request #592 from weargoggles/patch-1
...
Document synchronous response.write in streaming
2017-03-27 20:14:20 -07:00
Joir-dan Gumbs
748ca28185
Created detailed example of using sanic. Adds configurations based on various environment variables, handles database access (using aioredis), uses middleware to check for db object and attach it to request object, and logs events to a logfile (which is set using environment variables).
2017-03-27 15:42:13 -07:00
monobot
9c68d713ba
added asyncorm example
2017-03-27 22:47:35 +01:00
Raphael Deem
fc69678206
Merge remote-tracking branch 'upstream/master' into remove-stop-event
2017-03-26 15:59:31 -07:00
Raphael Deem
aebd717039
fix merge conflict
2017-03-26 15:49:58 -07:00
Raphael Deem
1ddb01ac44
remove stop_event
2017-03-26 15:48:41 -07:00
Raphael Deem
3e279cd670
Merge pull request #593 from itielshwartz/master
...
add sanic-nginx-docker-example to extensions.md
2017-03-26 11:50:45 -07:00
Raphael Deem
724c03630a
Update extensions.md
2017-03-26 11:49:15 -07:00
itiel
b00b2561e5
add sanic-nginx-docker-example to extensions.md
2017-03-26 21:16:03 +03:00
Raphael Deem
c5b50fe3cf
allow setting config from individual env variables
2017-03-25 17:45:55 -07:00
Raphael Deem
df9884de3c
Merge pull request #576 from matuusu/master
...
fix http status code not propagating in response
2017-03-24 19:23:20 -07:00
Pete Wildsmith
65ae7669f9
Document synchronous response.write in streaming
...
The Streaming section of the docs was updated to make clear that a synchronous write should be used in the callback, but this section was not updated.
2017-03-24 10:11:30 +00:00
Raphael Deem
179606feb1
Merge pull request #590 from r0fls/blueprint-strict-slash
...
add blueprint strict_slashes
2017-03-23 18:42:21 -07:00
Raphael Deem
536140340e
Merge pull request #585 from subyraman/listener-docs
...
add docs for server lifecycle listeners and `add_task`
2017-03-23 18:38:48 -07:00
Raphael Deem
5d293df64b
add blueprint strict_slashes
2017-03-23 18:37:06 -07:00
Suby Raman
6188891a53
add-listeners-docs
2017-03-23 15:49:23 -04:00
Raphael Deem
9774661cfe
Merge pull request #580 from skytoup/master
...
Fix testing not support binary file
2017-03-23 12:22:08 -07:00
Raphael Deem
563bc34fb5
Merge pull request #578 from messense/feature/gunicorn-deploy-doc
...
Add documentation for Gunicorn worker
2017-03-23 12:20:00 -07:00
Raphael Deem
9c95ab3a28
Merge pull request #584 from subyraman/add-decorators-info
...
add decorator docs
2017-03-23 12:19:23 -07:00
Suby Raman
b776c37b36
add decorator docs
2017-03-23 15:16:46 -04:00
Eli Uriegas
5b3f92b70f
Merge pull request #577 from seemethere/fix_tests_after_aiohttp_2
...
Hotfixes tests failing from URL object change
2017-03-23 13:56:16 -05:00
ivan
1562b81522
add arg load_body in testing
2017-03-23 20:48:57 +08:00
ivan
be1016ace6
merge upstream
2017-03-23 20:08:19 +08:00
ivan
ee27c689e1
commented aiohttp load response body in testing
2017-03-23 20:06:39 +08:00
skytoup
fdbf452ced
1. try...catch aiohttp encode response body to text in test_client
...
2. add tests static binary file
2017-03-23 15:22:00 +08:00
messense
3d9927dee0
Add documentation for Gunicorn worker
2017-03-23 09:12:23 +08:00
Raphael Deem
1456b128d2
Merge pull request #572 from sourcepirate/master
...
Removed raw string in cookies documentation
2017-03-22 14:55:20 -07:00
Eli Uriegas
166f77cb86
Merge pull request #545 from messense/feature/gunicorn-worker
...
Addition of a gunicorn worker
2017-03-22 16:27:06 -05:00
Eli Uriegas
5577838905
Hotfixes tests failing from URL object change
...
aiohttp decided to use yarl for their new URL objects so that they
aren't plain strings anymore which means that this single test fails.
Not a huge change but this should fix the testing suite.
2017-03-22 16:21:35 -05:00
matuusu
9c15982299
Update response.py
...
fix status code not propagating from response.stream to response.StreamingHTTPResponse
2017-03-22 12:40:40 +01:00
sourcepirate
63c24122db
Removed raw string in cookies documentation
2017-03-22 06:39:23 +05:30
messense
1396ca903d
Fix before_stop event
2017-03-20 14:27:02 +08:00
messense
d1fb5bdc30
Fix async before_server_start hook bug
2017-03-20 14:25:32 +08:00
messense
e27812bf3e
Set signal.stopped = True on closing
2017-03-20 14:25:32 +08:00
messense
11a3cf9b99
Add signal handling
2017-03-20 14:25:32 +08:00
messense
a90d70feae
Check connections is not None
2017-03-20 14:25:32 +08:00
messense
466b34735c
Set app.is_running to True
2017-03-20 14:25:32 +08:00
messense
7ca9116e37
Trigger before_stop before closing server, after_stop before closing
...
loop
2017-03-20 14:25:31 +08:00
messense
decd3e737c
Flake8 fix
2017-03-20 14:25:31 +08:00
messense
f35442ad1b
Fix RuntimeError: this event loop is already running
2017-03-20 14:25:31 +08:00
messense
2b296435b3
Trigger events
2017-03-20 14:25:31 +08:00
messense
19ee1dfecc
Gunicorn worker
2017-03-20 14:25:31 +08:00
Raphael Deem
7da4596ef8
Merge pull request #567 from Sniedes722/master
...
Added Sanic-OAuth to extensions.
2017-03-19 14:20:19 -07:00
Shawn Niederriter
a379ef6781
Added Sanic-OAuth to extensions.
2017-03-18 23:56:11 -04:00
Raphael Deem
7beb065be3
Merge pull request #562 from lixxu/master
...
update function name as it not halt request actually
2017-03-18 13:17:24 -07:00
Raphael Deem
38b9091513
Merge pull request #443 from sourcepirate/master
...
Fixed sanic peewee example.
2017-03-17 13:12:39 -07:00
Raphael Deem
96db3c9601
Merge pull request #564 from messense/feature/aioredis-example
...
Add an aioredis example
2017-03-17 13:11:19 -07:00
Raphael Deem
43c4fc8e33
Merge pull request #559 from r0fls/557
...
accept strict_slash routes
2017-03-17 13:10:26 -07:00
messense
986ff101ce
Add an aioredis example
2017-03-17 14:16:13 +08:00
lixxu
94c83c445f
fix broken table
2017-03-17 14:01:54 +08:00
lixxu
625865412f
update function name as it not halt request actually
2017-03-17 13:12:17 +08:00
Raphael Deem
46677e69ce
accept strict_slash routes
2017-03-16 11:46:07 -07:00
Eli Uriegas
5fbca5b823
Merge pull request #561 from kdelwat/master
...
Fix ReadTheDocs build errors
2017-03-16 09:02:39 -05:00
Eli Uriegas
879fab120f
Merge pull request #560 from miguelgrinberg/cancel-websocket-tasks
...
cancel websocket tasks if server is stopped
2017-03-16 09:02:30 -05:00
Cadel Watson
391b24bc17
Add websockets dependency to ReadTheDocs environment
2017-03-16 17:01:49 +11:00
Cadel Watson
d713533d26
Fix docstring formatting errors
2017-03-16 16:52:18 +11:00
Cadel Watson
24f745a334
Fix formatting errors in RST files
2017-03-16 16:51:02 +11:00
Cadel Watson
86f3101861
Add autodoc extension to Sphinx configuration
2017-03-16 16:50:33 +11:00
Miguel Grinberg
fd823c63ab
cancel websocket tasks if server is stopped
2017-03-15 22:45:19 -07:00
Raphael Deem
fa69892f70
Merge pull request #558 from Zheaoli/master
...
Add a new example by using aiomysql
2017-03-15 20:05:37 -07:00
lizheao
cfc53d0d26
Change some code in sanic aiomysql code
2017-03-15 14:42:22 +08:00
lizheao
97c2056e4a
Change some code in sanic aiomysql code
2017-03-15 14:41:54 +08:00
lizheao
0ad0164171
Change some code in sanic aiomysql code
2017-03-15 14:41:38 +08:00
lizheao
df0e285b6f
Add a new example
2017-03-15 14:12:37 +08:00
Raphael Deem
e92f1b8c28
Merge pull request #556 from AntonDnepr/fix-414
...
Small changes to the docs and tests for the #414
2017-03-14 21:07:55 -07:00
Anton Zhyrnyi
410f86c960
fix for docs&tests
2017-03-14 20:53:58 +02:00
Raphael Deem
85f27320e7
Merge pull request #553 from ashleysommer/ashleysommer-add-dispatch-extension
...
Add Dispatcher Extension to Extensions page in Docs
2017-03-13 17:00:46 -07:00
Raphael Deem
9a3fac90e1
Merge pull request #551 from messense/feature/documentation-links
...
Add hyperlinks in response documentation
2017-03-13 17:00:00 -07:00
Raphael Deem
6984f6eec4
Merge pull request #549 from ai0/websocket-scheme
...
add websocket scheme in request
2017-03-13 16:59:47 -07:00
Ashley Sommer
d05f502fc8
Add Dispatcher Extension
...
Adds a link to the extension
https://github.com/ashleysommer/sanic-dispatcher
And a very short description
2017-03-14 08:37:53 +10:00
Jing Su
ba41ab8f67
fix typo
2017-03-13 18:36:22 +08:00
Jing Su
250bb7e29d
add websocket secure scheme in request @messense
2017-03-13 18:34:43 +08:00
messense
48a26fd5df
Add hyperlinks in response documentation
2017-03-13 16:20:12 +08:00
Jing Su
3af26540ec
add websocket scheme in request
2017-03-13 13:28:35 +08:00
Raphael Deem
7d9de068d9
Merge pull request #544 from messense/feature/document-response
...
Add response documentation
2017-03-11 22:49:53 -08:00
messense
d174917a07
Add response documentation
2017-03-12 14:31:51 +08:00
Eli Uriegas
af398fc4c4
Merge pull request #543 from r0fls/windows-setup
...
windows setup
2017-03-11 21:57:15 -08:00
Raphael Deem
878ef446a2
refactor redundant print logic
2017-03-11 21:54:07 -08:00
Raphael Deem
668f6477bb
fix spacing
2017-03-11 21:46:31 -08:00
Raphael Deem
01a770cbca
windows setup
2017-03-11 19:32:38 -08:00
Raphael Deem
23a1174aa2
Merge pull request #542 from nszceta/master
...
Faster asyncpg queries via a global connection pool
2017-03-11 16:07:16 -08:00
Raphael Deem
414020e75b
Merge pull request #541 from r0fls/speedup
...
remove default host attribute in router
2017-03-11 16:07:05 -08:00
Adam Gradzki
ed74bccad6
Faster asyncpg queries via a global connection pool
...
In my benchmarks I was able to obtain a 17% performance
improvement over the current asyncpg demo code with a shared
connection pool.
Resolves : #540
See also: #531
2017-03-11 17:55:57 -06:00
Raphael Deem
0eedde445c
remove default host attribute in router
2017-03-11 15:39:48 -08:00
Raphael Deem
88bf78213f
Merge pull request #512 from subyraman/fix-url-building
...
Fix `request.url` and other url properties
2017-03-10 00:38:16 -08:00
Raphael Deem
d342461a51
Merge pull request #535 from ai0/master
...
Update blueprints example
2017-03-10 00:36:02 -08:00
Raphael Deem
dffaaf8751
Merge pull request #533 from 38elements/patch-1
...
Fix bail_out()
2017-03-10 00:35:54 -08:00
Raphael Deem
313edadf47
Merge pull request #528 from r0fls/523
...
allow running with SSL via commandline
2017-03-10 00:35:46 -08:00
Raphael Deem
c9ce33dfe6
Merge pull request #524 from r0fls/exception-list
...
allow exceptions to be a list
2017-03-10 00:35:38 -08:00
Raphael Deem
0f50ac7205
Merge pull request #517 from r0fls/empty-json
...
return valid json in request.json
2017-03-10 00:35:26 -08:00
Raphael Deem
e807c08275
Merge pull request #536 from lixxu/master
...
add sanic-babel extension
2017-03-09 12:28:22 -08:00
Lix Xu
893977365c
Update extensions.md
...
add babel extension
2017-03-09 23:58:02 +08:00
Jing Su
0cac45809f
add blueprints websocket example
2017-03-09 18:33:34 +08:00
Jing Su
489ca3c207
use blueprint method instead of deprecated register_blueprint
2017-03-09 18:31:19 +08:00
38elements
313535c599
Fix bail_out()
2017-03-09 13:36:01 +09:00
Raphael Deem
7f1e0557c9
Merge pull request #532 from r0fls/example-asyncpg-close
...
close connection in asyncpg example
2017-03-08 18:51:44 -08:00
Raphael Deem
0860f84a39
close connection in asyncpg example
2017-03-08 18:50:41 -08:00
Raphael Deem
2fe9e78b6d
Merge pull request #525 from r0fls/518
...
rename TestClient
2017-03-08 18:24:13 -08:00
Raphael Deem
2ba30f2022
allow running with SSL via commandline
2017-03-07 19:57:10 -08:00
Raphael Deem
b3b27cab34
Merge pull request #527 from r0fls/asyncpg-example
...
update asyncpg example
2017-03-07 19:34:10 -08:00
Raphael Deem
694207a86d
update asyncpg example
2017-03-07 19:32:26 -08:00
Raphael Deem
90138c4bae
return valid json in request.json
2017-03-07 18:03:45 -08:00
Raphael Deem
58a833e987
rename TestClient
2017-03-07 17:13:23 -08:00
Raphael Deem
86c5a569d5
allow exceptions to be a list
2017-03-07 16:22:23 -08:00
Eli Uriegas
19592e8eea
Merge pull request #473 from subyraman/explore-streams-v2
...
Add `stream` method for streaming content, add docs and examples
2017-03-05 17:51:44 -08:00
Eli Uriegas
8e6678d526
Merge pull request #469 from miguelgrinberg/websocket-support
...
websocket support
2017-03-05 17:42:49 -08:00
Suby Raman
e792a1e030
add host test
2017-03-03 14:51:13 -05:00
Suby Raman
f0e818a28c
add host test
2017-03-03 13:32:32 -05:00
Suby Raman
69bd63b742
add docs
2017-03-03 11:59:33 -05:00
Suby Raman
b40f30f2e5
fix tests
2017-03-03 11:49:35 -05:00
Suby Raman
1fbde87ec2
initial commit
2017-03-03 11:44:50 -05:00
Eli Uriegas
f9dc34c8fa
Merge pull request #510 from jamesstidard/patch-2
...
Sanic EnvConfig
2017-03-02 22:21:16 -06:00
James Stidard
f7186f5331
Sanic EnvConfig
...
Services like Heroku force your hand into using environment variables. Made this to help.
2017-03-02 21:22:07 +00:00
Eli Uriegas
6a680e4db0
Merge pull request #509 from kcy1019/master
...
Fix exception_monitoring example
2017-03-02 10:48:05 -06:00
고창영(Chang-young Koh)
f6b69f412f
Fix exception_monitoring example
2017-03-03 00:55:08 +09:00
Eli Uriegas
5aed18862d
Merge pull request #506 from zenixls2/bugfix/bind-listener
...
special handling when sock is provided and number of workers > 1
2017-03-02 09:08:59 -06:00
(Zenix) Han-Sheng Huang
62bf213a6e
pass flake8
2017-03-02 13:42:55 +09:00
(Zenix) Han-Sheng Huang
e5c32e9b48
special handling when sock is provided and number of workers > 1
2017-03-02 13:27:52 +09:00
Raphael Deem
b87dc37fbb
Merge pull request #500 from r0fls/revert-498
...
Revert "add reuse_port to create_server"
2017-02-28 19:29:29 -08:00
Raphael Deem
002d4cb37c
Revert "add reuse_port to create_server"
...
This reverts commit c3386dec84 .
2017-02-28 19:27:42 -08:00
Raphael Deem
ff321fc355
Merge pull request #499 from r0fls/498
...
add reuse_port to create_server
2017-02-28 19:24:35 -08:00
Raphael Deem
c3386dec84
add reuse_port to create_server
2017-02-28 19:21:53 -08:00
Eli Uriegas
927d2761f7
Merge pull request #496 from bohea/master
...
rate limiting for sanic
2017-02-28 09:03:03 -06:00
Eli Uriegas
5e5f513088
Merge pull request #497 from seemethere/increment_041
...
Increment version to 0.4.1
2017-02-28 08:55:34 -06:00
Eli Uriegas
9fcf725061
Increment version to 0.4.1
2017-02-28 08:55:04 -06:00
Eli Uriegas
601e015f00
Merge pull request #495 from r0fls/494
...
fix routing issue with slashes
2017-02-28 08:54:15 -06:00
bohea
3289e8403a
Update extensions.md
2017-02-28 17:34:40 +08:00
James Stidard
104a7c7d05
Added app to websocket request ( #1 )
2017-02-27 22:35:28 -08:00
Miguel Grinberg
7560660ec7
handle timeouts and disconnects properly
2017-02-27 22:35:28 -08:00
Miguel Grinberg
40ccb4a0dd
websocket documentation
2017-02-27 22:35:28 -08:00
Miguel Grinberg
f90288f5dc
websocket routes in blueprints
2017-02-27 22:35:28 -08:00
Miguel Grinberg
3bf79898d9
websocket unit test
2017-02-27 22:35:28 -08:00
Miguel Grinberg
1d6e11ca10
addressed feedback
2017-02-27 22:35:28 -08:00
Miguel Grinberg
6e903ee7d5
websocket support, using websockets package
2017-02-27 22:35:28 -08:00
Raphael Deem
21fb1dff7e
fix routing issue with slashes
2017-02-27 20:01:11 -08:00
Eli Uriegas
da924a359c
Merge pull request #493 from seemethere/fix_install
...
Attempt to remedy install problems from 0.4.0
2017-02-27 10:19:13 -06:00
Eli Uriegas
a5066f15dc
Attempt to remedy install problems from 0.4.0
...
Relates to 1436fb3ef4
2017-02-27 10:14:47 -06:00
Raphael Deem
2dca53a696
remove stop_event
2017-02-26 16:37:48 -08:00
Eli Uriegas
bfbcdf8b86
Merge pull request #488 from seemethere/increment_version_040
...
Increment version to 0.4.0
2017-02-25 13:37:09 -06:00
Eli Uriegas
42e1d18470
Increment version to 0.4.0
2017-02-25 13:36:47 -06:00
Raphael Deem
435dc72aa1
Merge pull request #484 from r0fls/483
...
use getattr for request url in error handler
2017-02-24 10:12:04 -08:00
Raphael Deem
66c380548b
use getattr for request url in error handler
2017-02-23 23:17:31 -08:00
Raphael Deem
13f81e9a6f
Merge pull request #480 from subyraman/patch-2
...
Add documentation about `request.app`
2017-02-23 18:52:11 -08:00
Eli Uriegas
68c8796adb
Merge pull request #481 from lixxu/master
...
url_for has something wrong with //
2017-02-23 18:27:13 -06:00
Suby Raman
4232f5342e
correct indendation
2017-02-23 11:47:39 -05:00
lixxu
28c31359bf
bug: url / will be empty
2017-02-24 00:45:50 +08:00
Suby Raman
a36e815227
Add documentation about request.app
2017-02-23 11:42:59 -05:00
lixxu
ff3d33d5e0
bug: url_for in blueprint may have // at the beginning
2017-02-24 00:17:43 +08:00
Eli Uriegas
d015d6b103
Merge pull request #476 from seemethere/inject_app_into_request
...
Inject app into request object
2017-02-23 09:12:41 -06:00
Eli Uriegas
0d160fbeaa
Merge pull request #478 from messense/fix-requests-post-test-cases
...
Fix exception collection typo
2017-02-22 20:43:53 -06:00
messense
fedd7920a8
Fix exception collection typo
2017-02-23 10:39:14 +08:00
Eli Uriegas
6afac06596
Merge pull request #477 from messense/fix-requests-post-test-cases
...
Fix test cases for requests post
2017-02-22 20:39:03 -06:00
messense
91b2b40b9a
Fix test cases for requests post
2017-02-23 10:36:08 +08:00
Eli Uriegas
56ecb6a3ea
Inject app into request object
...
Allows for injection of the app object into the request object through
the request handler.
This allows for users to setup things like database connections etc. in
listeners and then utilize them throughout the their various route
handlers.
Usage is fairly simple like so:
```python
@app.get('/')
async def handler(request):
request.app.anything
```
Name is up in the air but I'll leave this up for a few days and I'll
change it if we get a consensus
2017-02-22 11:34:14 -06:00
Eli Uriegas
64f73f624f
Merge pull request #471 from r0fls/vhost-default
...
allow default vhost
2017-02-22 11:08:28 -06:00
Eli Uriegas
20b78b68a6
Merge pull request #470 from r0fls/url-slash
...
route logic for trailing slash
2017-02-22 11:07:23 -06:00
Suby Raman
d8a6d7e02f
response.write should be synchronous for performance reasons
2017-02-22 10:42:16 -05:00
Raphael Deem
d1cc14201b
Merge pull request #474 from r0fls/remove-ws-extension
...
remove websocket extension
2017-02-21 15:31:50 -08:00
Raphael Deem
a57ec9e669
remove websocket extension
2017-02-21 15:30:42 -08:00
Suby Raman
1a8961587c
more info in docs
2017-02-21 11:38:57 -05:00
Suby Raman
fa13ad8849
clean up imports
2017-02-21 11:36:45 -05:00
Suby Raman
8b23dec322
improve performance
2017-02-21 11:28:45 -05:00
Suby Raman
4e8aac4b41
rebase
2017-02-21 11:05:06 -05:00
Raphael Deem
9c72b557ec
allow default vhost
2017-02-20 16:52:36 -08:00
Raphael Deem
207ec1e032
route logic for trailing slash
2017-02-20 16:11:28 -08:00
Eli Uriegas
ff5d4276bc
Merge pull request #468 from hhstore/master
...
fix import path.
2017-02-20 07:29:11 -06:00
hhstore
26c9618e63
fix import path.
2017-02-20 17:57:15 +08:00
Eli Uriegas
9c306899ba
Merge pull request #464 from tommyip/patch-1
...
Fix typo in routing.md
2017-02-19 11:40:48 -06:00
Tommy Ip
4b7e7aab33
Fix typo in routing.md
2017-02-19 12:39:39 +00:00
Eli Uriegas
2921e9f868
Merge pull request #463 from subyraman/patch-1
...
add sanic_compress extension
2017-02-18 18:56:17 -06:00
Suby Raman
70b7606cb8
add sanic_compress extension
2017-02-18 19:53:32 -05:00
Eli Uriegas
0cae91d525
Merge pull request #459 from seemethere/add_app_loop_safety
...
Add app loop safety
2017-02-18 16:53:49 -06:00
Eli Uriegas
2c2a28e46b
Add better error message around app.loop
2017-02-18 12:29:25 -06:00
Eli Uriegas
c75d484f23
Merge branch 'master' of github.com:channelcat/sanic into add_app_loop_safety
2017-02-17 07:10:59 -06:00
Eli Uriegas
072f7fec30
Merge pull request #460 from seemethere/fix_travis_build
...
Fix coverage build
2017-02-17 07:10:27 -06:00
Eli Uriegas
a73379495f
Fix coverage build
...
Moved `sanic.py` to `app.py` this change reflects that
2017-02-17 07:06:57 -06:00
Eli Uriegas
0b914866eb
Merge pull request #401 from youknowone/error-logging
...
Enhance error logging
2017-02-17 07:01:40 -06:00
Eli Uriegas
f12186d024
Merge pull request #438 from r0fls/coverage
...
add coverage to tox
2017-02-17 07:01:14 -06:00
Eli Uriegas
4a2835dc84
Merge pull request #458 from lixxu/master
...
add user_agent to request
2017-02-17 07:00:52 -06:00
Eli Uriegas
55dc45de33
Merge pull request #455 from seemethere/add_better_response_error_detection
...
Adds some safety around response types being wrong
2017-02-17 06:59:52 -06:00
Eli Uriegas
39aa64ff68
Remove un-needed loop assignment
2017-02-17 06:57:41 -06:00
Eli Uriegas
94bb91f2fa
Adds some safety around app loop property
2017-02-17 06:54:26 -06:00
Lix Xu
f553ca95a5
add user_agent to request
2017-02-17 15:12:07 +08:00
Jeong YunWon
b44e8167d7
Enhance error logging
...
- Prevent to fall into error logging recursion when it doesn't have
request info (Print 'Unknown' when the request is still `None`
- Print repr(e) rather than str(e)
2017-02-17 14:05:46 +09:00
Eli Uriegas
36c1122d20
Merge pull request #457 from seemethere/remove_double_logging_message
...
Removes the extra logging message for run
2017-02-16 21:53:25 -06:00
Eli Uriegas
ad13529eaa
Removes the extra logging message for run
...
Solves for #456
2017-02-16 21:51:19 -06:00
Eli Uriegas
04c8f4a5ed
Adds some safety around response types being wrong
...
Before we didn't check if the response object was actually a response
object. This PR catches the exception should it happen and reports it to
the user.
2017-02-16 17:49:14 -06:00
Eli Uriegas
850446195f
Merge pull request #441 from robintiwari/master
...
added sanic motor (async driver for mongodb) example
2017-02-16 17:19:42 -06:00
Eli Uriegas
865506546f
Merge pull request #440 from r0fls/isinstance
...
isinstance -> try/except
2017-02-16 17:19:04 -06:00
Eli Uriegas
fe72fadedd
Merge pull request #432 from agoose77/cleanups
...
Bugfix & simplfication for host based routing
2017-02-16 17:18:24 -06:00
Eli Uriegas
9cf9d3ad5c
Merge pull request #453 from seemethere/add_file_example
...
Adds file response object example
2017-02-16 17:17:29 -06:00
Eli Uriegas
426d0e6af1
Merge pull request #454 from seemethere/fix_empty_request_args
...
Default request.args to RequestParameters
2017-02-16 17:16:55 -06:00
Eli Uriegas
483b442b7d
Default request.args to RequestParameters
2017-02-16 15:54:20 -06:00
Eli Uriegas
9420b0c947
Adds file response object example
2017-02-16 15:53:31 -06:00
Eli Uriegas
dcfb7345f0
Merge pull request #451 from abuckenheimer/master
...
#449 use stdlib json module if ujson is unavailible
2017-02-16 14:14:45 -06:00
Alec Buckenheimer
f9ab24a077
#449 use stdlib json module if ujson is unavailible
2017-02-16 15:03:52 -05:00
Raphael Deem
f932d16ba7
Merge pull request #448 from Typhon66/patch-1
...
Adding sanic_crud to extensions
2017-02-16 09:57:58 -08:00
Typhon
7d9acc3c36
Adding sanic_crud to extensions
2017-02-16 09:49:48 -08:00
Eli Uriegas
72f735124f
Merge pull request #446 from subyraman/document-error
...
Fix blueprint documentation re: prefixes
2017-02-16 11:21:23 -06:00
Suby Raman
6ea5a4719a
add url_for doc in blueprint
2017-02-16 11:48:31 -05:00
Suby Raman
f8c50b7f1e
fix blueprints documentation
2017-02-16 11:46:19 -05:00
Eli Uriegas
feb1f1d71a
Merge pull request #444 from lixxu/master
...
simple motor wrapper
2017-02-16 09:46:09 -06:00
Lix Xu
550afc27dc
simple motor wrapper
2017-02-16 22:36:16 +08:00
sourcepirate
e6a828572a
Changed method name from create to new
2017-02-16 11:07:49 +05:30
plasmashadow
6ea43d8e6d
Fixed sanic_peewee error and added a simple interface to query and create
2017-02-16 10:58:52 +05:30
@robintiwari
d13af4bdc4
updated examples
2017-02-15 22:11:16 -06:00
Robin
53a365dd2b
added sanic motor (async driver for mongodb) example
2017-02-15 21:42:25 -06:00
Raphael Deem
6726affa7e
isinstance -> try/except
2017-02-15 19:34:45 -08:00
Eli Uriegas
6ecf2a6eb2
Merge pull request #439 from seemethere/move_sanic_to_app
...
Moves sanic/sanic.py to sanic/app.py
2017-02-15 21:03:41 -06:00
Eli Uriegas
a359e11f97
Merge pull request #422 from r0fls/420
...
move logging to method in ErrorHandler
2017-02-15 21:03:15 -06:00
Eli Uriegas
54b2d74068
Get rid of relative imports
2017-02-15 20:54:00 -06:00
Eli Uriegas
c99aa7279b
Moves sanic/sanic.py to sanic/app.py
...
Functionality wise this won't change much for most users, unless you
were directly importing from `sanic.sanic` in which case I am sorry if
you're affected by this.
Main motivation was because jedi autocompletion didn't work with this
and we were using relative imports to compensate for the fact that
having a module inside of your module with the same name creates major
namespace problems.
2017-02-15 20:47:34 -06:00
Raphael Deem
4fa568ce8a
add coverage to tox
2017-02-15 15:20:43 -08:00
Eli Uriegas
874698b93f
Merge pull request #431 from subyraman/test-client-v2
...
Add Flask-like `test_client` to replace `sanic_endpoint_test`
2017-02-15 15:44:30 -06:00
Eli Uriegas
b286fc1e4a
Merge pull request #436 from lixxu/master
...
simple pagination support
2017-02-15 13:31:57 -06:00
Raphael Deem
1cf1024332
Merge branch 'master' into 420
2017-02-15 09:29:52 -08:00
Lix Xu
6b391b701b
simple pagination support
2017-02-15 13:27:58 +08:00
Raphael Deem
efc90f8f5a
Merge pull request #434 from agoose77/fix_warn_error
...
Fix mistake in warning
2017-02-14 16:46:37 -08:00
Angus Hollands
6535ba7c24
Fix mistake in warning
2017-02-14 20:53:55 +00:00
Angus Hollands
5c29c3d160
Merge branch 'master' of https://github.com/channelcat/sanic into cleanups
2017-02-14 20:47:28 +00:00
Angus Hollands
742d4bff78
Change to iterable as Python3.5 doesn't support Collection.
...
We don't really need the getitem and len attributes anyway
2017-02-14 20:46:14 +00:00
Suby Raman
7726ffa3f7
remove documentation about passing in the loop
2017-02-14 15:44:43 -05:00
Angus Hollands
b442d78ebb
Bugfix & simplfication for host based routing (if list of hosts passed after a previous vhost route was added, previously attempted to add set to set)
...
Add comment documenting substandard behaviour
2017-02-14 20:32:04 +00:00
Eli Uriegas
d44edb5930
Merge pull request #430 from aquacash5/master
...
Added raw response for bag o' bytes responses
2017-02-14 14:19:01 -06:00
Suby Raman
d5633b3705
fix deprecation message
2017-02-14 15:16:58 -05:00
Suby Raman
3b68dc72e7
rework testing
2017-02-14 14:51:20 -05:00
Angus Hollands
51611c3934
Pep8 cleanups ( #429 )
...
* PEP8 cleanups
* PEP8 cleanups (server.py)
* PEP8 cleanups (blueprints.py)
* PEP8 cleanups (config.py)
* PEP8 cleanups (cookies.py)
* PEP8 cleanups (handlers.py)
* PEP8 cleanups (request.py)
* PEP8 cleanups (response.py)
* PEP8 cleanups (router.py)
* PEP8 cleanups (sanic.py) #2
* PEP8 cleanups (server.py) #2
* PEP8 cleanups (static.py)
* PEP8 cleanups (utils.py)
* PEP8 cleanups (views.py)
Updated docstring
2017-02-14 13:10:19 -06:00
Kyle Blöm
747b7567d7
Changed docstring for raw response
2017-02-14 09:40:33 -08:00
Kyle Blöm
797891d6cf
Added raw response for bag o' bytes responses
2017-02-14 09:27:39 -08:00
Eli Uriegas
286dc3c32b
Merge pull request #399 from lixxu/master
...
improve url_for to support multi values and special options
2017-02-14 10:27:54 -06:00
Eli Uriegas
a66ba21c3d
Merge pull request #421 from Superman132/master
...
Fixed readme
2017-02-14 10:26:41 -06:00
Eli Uriegas
b139810b6a
Merge pull request #424 from growingdever/blueprint-support-view
...
support view instance for blueprint add_route method
2017-02-14 10:26:05 -06:00
Eli Uriegas
dddc18d77c
Merge pull request #427 from agoose77/trigger_cleanup
...
Simplify trigger events (now guaranteeed to receive list of events)
2017-02-14 09:34:34 -06:00
Angus Hollands
56f56d008a
Simplify trigger events (now guaranteeed to receive list of events)
...
Don't bother checking if list empty - this function is not called often
2017-02-14 15:15:15 +00:00
growingdever
81a8a99b6e
wrap over width comment
2017-02-14 17:20:39 +09:00
growingdever
07aa0ee7ad
- copy codes from Sonic.add_route
...
- modify comment by r0fls
2017-02-14 17:15:38 +09:00
growingdever
b66a6bddbc
fix typo
2017-02-14 14:30:07 +09:00
growingdever
d57d90fe6b
- make blueprint add_route method support view instance
...
- update documentation that doesn't specify url_prefix parameter
2017-02-14 14:23:22 +09:00
Raphael Deem
de6c646ee8
move logging to method in ErrorHandler
2017-02-13 19:44:54 -08:00
lixxu
4839ede64f
update test for url_for and update routing.md doc
2017-02-14 10:26:30 +08:00
Superman132
84f5faf653
Update README.rst
2017-02-13 20:48:37 -05:00
Superman132
281077bc26
Update README.rst
2017-02-13 19:35:03 -05:00
Superman132
ed5fe9ae9f
Merge pull request #1 from channelcat/master
...
Merge commits with master
2017-02-13 19:31:33 -05:00
Eli Uriegas
1866e4ef44
Merge pull request #418 from argaen/fix_cache_example
...
Use decorator for cache example
2017-02-13 17:23:29 -06:00
Eli Uriegas
a6a07c3b3a
Merge pull request #411 from r0fls/ensure-future
...
Ensure future
2017-02-13 17:13:26 -06:00
argaen
b2af8e640c
Use decorator
2017-02-14 00:12:39 +01:00
Raphael Deem
7a3f5d508b
fix merge conflicts
2017-02-13 14:19:44 -08:00
Eli Uriegas
7e1fd03104
Merge pull request #417 from argaen/fix_cache_example
...
Fixed aiocache example according to new loop policy
2017-02-13 16:11:26 -06:00
argaen
758415d326
Fixed aiocache example according to new loop policy
2017-02-13 23:08:42 +01:00
Eli Uriegas
1660041470
Merge pull request #408 from agoose77/master
...
Use app decorator instead of run arguments for before_start
2017-02-13 12:54:46 -06:00
Eli Uriegas
1783df883e
Merge pull request #416 from subyraman/more-view-tests
...
Add CompositionView tests, simplify checks for invalid/duplicate methods
2017-02-13 11:09:56 -06:00
Suby Raman
b2be821637
reverse router changes
2017-02-13 11:55:00 -05:00
Suby Raman
051ff2b325
remove repr stuff
2017-02-13 11:50:09 -05:00
Suby Raman
4d6f9ffd7c
rebase
2017-02-13 11:45:55 -05:00
Suby Raman
d614823013
rebase
2017-02-13 11:38:28 -05:00
Eli Uriegas
48aa51b739
Merge pull request #413 from r0fls/loop-signal-handlers
...
use try/except when adding loop sig handlers
2017-02-13 10:13:56 -06:00
Raphael Deem
41c6125e1b
use try/except when adding loop sig handlers
2017-02-12 14:43:00 -08:00
Eli Uriegas
bb3d48f98b
Merge pull request #412 from seemethere/improving_performance
...
Header performance gains
2017-02-12 15:48:45 -06:00
Raphael Deem
b5e46e83e2
ensure_future -> add_task
2017-02-12 12:29:12 -08:00
Angus Hollands
2340910b46
Update deprecation message
...
Fix bug with single callbacks
2017-02-12 18:15:14 +00:00
Eli Uriegas
d8c4c1525d
Merge pull request #406 from agoose77/master_pre_patches_1
...
Cleanup middleware decorator
2017-02-12 12:14:50 -06:00
Eli Uriegas
6713ef7726
Remove unused import
2017-02-12 12:09:06 -06:00
Eli Uriegas
ae7555b065
Performance was down so this brings it back up
...
Changes from #378 introduced about a 10k request/sec slowdown. This
tries to rememdy it while keeping the same functionality but it's still
not as fast as 0.3.1
2017-02-12 12:05:14 -06:00
Angus Hollands
ee6ff0cc60
Add deprecation and old API
2017-02-12 12:28:02 +00:00
Raphael Deem
94b2352c2c
add ensure_future method
2017-02-11 17:40:17 -08:00
Eli Uriegas
cf3f943feb
Merge pull request #409 from r0fls/loop-attribute
...
add loop property
2017-02-11 18:31:50 -06:00
Eli Uriegas
55c4d583b9
Merge pull request #410 from r0fls/extensions
...
add extension to docs
2017-02-11 18:31:16 -06:00
Raphael Deem
0e1bb6ab04
add loop property
2017-02-11 16:28:35 -08:00
Raphael Deem
7944cff7a5
add extension to docs
2017-02-11 15:31:58 -08:00
Angus Hollands
8b08a370c5
Remove todo
2017-02-11 14:39:32 +00:00
Angus Hollands
2d5fd2fe1c
fix test
2017-02-11 14:35:44 +00:00
Angus Hollands
b5e50ecb75
Use app decorator instead of run arguments for before_start
...
Mirror listener of blueprints
2017-02-11 14:30:17 +00:00
Angus Hollands
e00c9d0ee0
Fix line length
2017-02-11 12:39:04 +00:00
Angus Hollands
be9c9f045a
Cleanup middleware decorator
2017-02-11 12:27:25 +00:00
Raphael Deem
75fca1b9c7
Merge pull request #402 from agoose77/patch-1
...
Don't ask for uvloop on windows
2017-02-10 12:11:12 -08:00
Angus Hollands
1436fb3ef4
Don't ask for uvloop on windows
...
This is a tricky issue, but essentially uvloop is unavailable on windows. This means for windows users, we have to install Sanic with no requirements, and then manually specify all requirements apart from uvloop.
However, Sanic will work with standard asyncio event loop. So, I propose we remove the uvloop requirement on windows. This patch doesn't touch any demo imports.
2017-02-10 13:14:36 +00:00
Raphael Deem
2bfd127218
Merge pull request #400 from aquacash5/master
...
added build folder to .gitignore
2017-02-09 23:13:49 -08:00
Kyle Blöm
de5da63d5c
added build folder to .gitignore
2017-02-09 18:49:11 -08:00
lixxu
fb419eaa36
fix bug: netloc always in url if SERVER_NAME defined in config even _external not true
2017-02-09 18:26:17 +08:00
lixxu
cf2a363e5e
improve url_for to support multi values for one arg, add _anchor/_external/_scheme options
2017-02-09 16:44:23 +08:00
Eli Uriegas
7401facc21
Merge pull request #398 from seemethere/fix_errors_from_content_range
...
Fixes errors related to #378
2017-02-08 20:06:02 -06:00
Eli Uriegas
579afe012b
Fixes errors related to #378
2017-02-08 19:59:34 -06:00
Eli Uriegas
4f856e8783
Merge pull request #378 from aquacash5/master
...
Added the tests, code formatting changes, and the Range Request feature.
2017-02-08 19:39:29 -06:00
Eli Uriegas
eb059183f7
Merge branch 'master' into master
2017-02-08 19:37:32 -06:00
Eli Uriegas
419156f7cc
Merge pull request #397 from seemethere/increment_031
...
Increment to v0.3.1
2017-02-08 19:23:20 -06:00
Eli Uriegas
b7f7883fb7
Increment to v0.3.1
2017-02-08 19:22:51 -06:00
Eli Uriegas
a5a7490bca
Merge pull request #379 from youknowone/exception
...
Let exception handler handle inherited exceptions
2017-02-08 19:20:42 -06:00
Eli Uriegas
6724d8131c
Merge pull request #387 from subyraman/url-for-v3
...
Add `url_for` method for simple routes, blueprints, HTTPMethodView
2017-02-08 19:20:09 -06:00
Raphael Deem
a19bb15070
Merge pull request #389 from chenfengyuan/fix_run_async_demo
...
fix run_async demo
2017-02-07 14:58:48 -08:00
Eli Uriegas
2ee0147848
Merge pull request #386 from youknowone/sanic_endpoint_test
...
Fix sanic_endpoint_test working with redirects
2017-02-07 10:57:05 -06:00
Eli Uriegas
252f1add7e
Merge pull request #394 from brian-bates/tox-cleanup
...
Add missing dependency to tox.ini
2017-02-07 10:55:52 -06:00
Jeong YunWon
413c92c631
Let exception handler handle inherited exceptions
...
Original sanic exception handler only could handle exact matching
exceptions. New `lookup` method will provide ability to looking up
their ancestors without additional cost of performance.
2017-02-07 21:08:31 +09:00
Suby Raman
36d519026f
reject unnamed handlers
2017-02-06 11:11:00 -05:00
Fengyuan Chen
aa54785918
fix always warning loop is passed issue
2017-02-06 11:11:00 -05:00
Raphael Deem
d6b386083f
Merge pull request #390 from chenfengyuan/pass_loop_warning
...
fix always warning loop is passed issue
2017-02-05 14:01:41 -08:00
Brian Bates
82f383b64f
Add missing dependency
...
Added missing `aiofiles` to tox.ini and cleaned up requirements files.
2017-02-05 11:44:01 -08:00
Jeong YunWon
a15ee3ad06
Fix sanic_endpoint_test working with redirects
...
Before fix, it raises error like:
```
tests/test_utils.py F
================================= FAILURES =================================
______________________________ test_redirect _______________________________
app = <sanic.sanic.Sanic object at 0x1045fda20>, method = 'get', uri = '/1', gather_request = True, debug = False
server_kwargs = {}, request_args = (), request_kwargs = {}
_collect_request = <function sanic_endpoint_test.<locals>._collect_request at 0x1045ec950>
_collect_response = <function sanic_endpoint_test.<locals>._collect_response at 0x1045ec7b8>
def sanic_endpoint_test(app, method='get', uri='/', gather_request=True,
debug=False, server_kwargs={},
*request_args, **request_kwargs):
results = []
exceptions = []
if gather_request:
def _collect_request(request):
results.append(request)
app.request_middleware.appendleft(_collect_request)
async def _collect_response(sanic, loop):
try:
response = await local_request(method, uri, *request_args,
**request_kwargs)
results.append(response)
except Exception as e:
exceptions.append(e)
app.stop()
app.run(host=HOST, debug=debug, port=PORT,
after_start=_collect_response, **server_kwargs)
if exceptions:
raise ValueError("Exception during request: {}".format(exceptions))
if gather_request:
try:
> request, response = results
E ValueError: too many values to unpack (expected 2)
sanic/utils.py:47: ValueError
During handling of the above exception, another exception occurred:
utils_app = <sanic.sanic.Sanic object at 0x1045fda20>
def test_redirect(utils_app):
"""Test sanic_endpoint_test is working for redirection"""
> request, response = sanic_endpoint_test(utils_app, uri='/1')
tests/test_utils.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
app = <sanic.sanic.Sanic object at 0x1045fda20>, method = 'get', uri = '/1', gather_request = True, debug = False
server_kwargs = {}, request_args = (), request_kwargs = {}
_collect_request = <function sanic_endpoint_test.<locals>._collect_request at 0x1045ec950>
_collect_response = <function sanic_endpoint_test.<locals>._collect_response at 0x1045ec7b8>
def sanic_endpoint_test(app, method='get', uri='/', gather_request=True,
debug=False, server_kwargs={},
*request_args, **request_kwargs):
results = []
exceptions = []
if gather_request:
def _collect_request(request):
results.append(request)
app.request_middleware.appendleft(_collect_request)
async def _collect_response(sanic, loop):
try:
response = await local_request(method, uri, *request_args,
**request_kwargs)
results.append(response)
except Exception as e:
exceptions.append(e)
app.stop()
app.run(host=HOST, debug=debug, port=PORT,
after_start=_collect_response, **server_kwargs)
if exceptions:
raise ValueError("Exception during request: {}".format(exceptions))
if gather_request:
try:
request, response = results
return request, response
except:
raise ValueError(
"Request and response object expected, got ({})".format(
> results))
E ValueError: Request and response object expected, got ([{}, {}, {}, <ClientResponse(http://127.0.0.1:42101/3 ) [200 OK]>
E <CIMultiDictProxy('Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '2', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=1')>
E ])
sanic/utils.py:52: ValueError
```
2017-02-05 13:57:04 +09:00
Fengyuan Chen
29680cb515
fix always warning loop is passed issue
2017-02-04 16:09:09 +08:00
Fengyuan Chen
884749f345
fix run_async demo
2017-02-04 15:27:46 +08:00
Suby Raman
5c63ce666c
punctuation
2017-02-02 14:21:59 -05:00
Suby Raman
5632d073be
update docs
2017-02-02 13:00:15 -05:00
Suby Raman
f9056099f9
all works
2017-02-02 12:52:48 -05:00
Suby Raman
7c09ec29f7
rebase
2017-02-02 12:21:14 -05:00
Eli Uriegas
6f0b09509e
Merge pull request #213 from sfstpala/master
...
Make it possible to disable the logo by subclassing Config
2017-02-01 23:07:52 -06:00
Eli Uriegas
31c53d67e2
Merge pull request #384 from seemethere/update_static_tests
...
Updates static tests to test for issue #374
2017-02-01 15:20:34 -06:00
Eli Uriegas
6a322ba3f8
Updates static tests to test for issue #374
...
Adds a test to test for serving a static directory at the root uri '/'
to address concerns found in #374 . Also rewrites the tests so that they
are parametrized and do more with less.
2017-02-01 09:00:57 -06:00
Raphael Deem
dece636d54
Merge pull request #383 from r0fls/derp
...
typo: async_run -> run_async
2017-02-01 00:29:12 -08:00
Raphael Deem
b29f648148
typo: async_run -> run_async
2017-01-31 12:46:02 -08:00
Eli Uriegas
c91d264ff1
Merge pull request #380 from channelcat/openapi-extension
...
Added sanic-openapi to extensions
2017-01-31 07:39:38 -06:00
Eli Uriegas
487e3352e4
Revert "fix async run, add tests"
...
This reverts commit 41da793b5a .
2017-01-31 07:30:17 -06:00
Channel Cat
34966fb182
Added sanic-openapi to extensions
2017-01-31 01:24:41 -08:00
Eli Uriegas
17a92a58b2
Merge pull request #369 from r0fls/fix-async-run
...
fix async run, add tests
2017-01-30 22:21:25 -06:00
Raphael Deem
60d3e5b9e0
Merge pull request #377 from r0fls/373
...
update route method docs
2017-01-30 17:07:26 -08:00
Kyle Blöm
d193a1eb70
Added the tests, code formatting changes, and the Range Request feature.
2017-01-30 17:04:51 -08:00
Raphael Deem
1501c56bbc
update route method docs
2017-01-30 16:42:43 -08:00
Eli Uriegas
6d18fb6bae
Merge pull request #363 from r0fls/run-helper
...
Run helper
2017-01-30 05:51:50 -06:00
Eli Uriegas
eac26a4514
Merge pull request #372 from JordanP/fix_docs_config
...
Fix docs/config.md: the MYAPP_SETTINGS is not exported
2017-01-30 05:43:29 -06:00
Channel Cat
1649f30808
Updated password
2017-01-30 02:22:12 -08:00
Jordan Pittier
82680bf43f
Fix docs/config.md: the MYAPP_SETTINGS is not exported
...
If we don"t `export` the variable, it's not available in subcommand:
MYAPP_SETTINGS=/path/to/config_file; python3 -c "import os; os.environ['MYAPP_SETTINGS']"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.5/os.py", line 725, in __getitem__
raise KeyError(key) from None
KeyError: 'MYAPP_SETTINGS'
The ';' is the culprit here.
2017-01-30 10:39:02 +01:00
Raphael Deem
41da793b5a
fix async run, add tests
2017-01-29 23:47:47 -08:00
Raphael Deem
cfb5734b85
Merge pull request #371 from channelcat/blueprint-shorthand
...
Blueprint route shorthand
2017-01-29 23:23:47 -08:00
Channel Cat
b72d841619
.
2017-01-29 23:21:00 -08:00
Channel Cat
0ef39f35ae
Added route shorthands to blueprints
2017-01-29 23:20:38 -08:00
Channel Cat
38d1ed76d2
Merge pull request #368 from channelcat/blueprint-clarity
...
Restructured blueprint class for clarity
2017-01-29 18:47:27 -08:00
Channel Cat
4c80cd185f
Fix flake8
2017-01-29 17:44:46 -08:00
Channel Cat
629524af04
Restructured blueprint class
...
Blueprints currently queue functions to be called, which are simple, yet
hard to inspect. These changes allow tools to be built that analyze
blueprints more easily.
2017-01-29 17:39:55 -08:00
Channel Cat
a245e54bd3
Merge pull request #367 from channelcat/fix-rtd-build
...
Fix readthedocs includes
2017-01-29 16:46:48 -08:00
Channel Cat
52e485cce9
Fix readthedocs includes
2017-01-29 16:46:16 -08:00
Channel Cat
02d374b65b
Merge pull request #365 from channelcat/fix-rtd-build
...
Adding readthedocs file
2017-01-29 16:41:41 -08:00
Channel Cat
0de6bb0063
Adding readthedocs file
2017-01-29 16:40:36 -08:00
Channel Cat
9d6b379999
Merge pull request #364 from channelcat/fix-rtd-build
...
Fix readthedocs build
2017-01-29 16:38:29 -08:00
Channel Cat
c132c4e673
fix conflict part 2
2017-01-29 16:32:57 -08:00
Channel Cat
6962dcd66c
fix conflict
2017-01-29 16:31:37 -08:00
Channel Cat
2a9496fcda
Fix readthedocs build
2017-01-29 16:25:22 -08:00
Raphael Deem
82d1d30a41
review updates
2017-01-29 14:01:00 -08:00
Eli Uriegas
85639d0806
Revert "testing"
...
This reverts commit 3fd6ecaedb .
2017-01-29 15:55:47 -06:00
Channel Cat
3fd6ecaedb
testing
2017-01-29 13:52:17 -08:00
Channel Cat
884d3a0316
Fix RTD build
2017-01-29 13:45:44 -08:00
Raphael Deem
10dbb9186d
combine logic from create_server() and run()
2017-01-29 13:36:13 -08:00
Eli Uriegas
a547798b08
Merge pull request #360 from seemethere/fix_route_overloading_for_dynamic_routes
...
Fixes route overloading for dynamic routes
2017-01-29 15:35:13 -06:00
Eli Uriegas
894b434875
Merge pull request #362 from channelcat/read-the-docs
...
Added basic readthedocs support
2017-01-29 15:34:58 -06:00
Eli Uriegas
8db0ece459
Merge branch 'master' into read-the-docs
2017-01-29 15:31:22 -06:00
Eli Uriegas
f56c5e3a45
Merge pull request #199 from Tim-Erwin/improved_config
...
added methods to load config from a file
2017-01-29 15:27:34 -06:00
Eli Uriegas
0a5fa72099
Add logic to make dynamic route merging work
...
This is by no means the final solution but it's a start in the right
direction. Eventually what needs to happen is we need to reduce the
complexity of the routing. CompsitionView can probably be removed later
on in favor of better Route objects. Also in the next version of sanic
we need to move merge_route and add_parameter out of the add_route logic
and just have them as standalone methods.
The tests should cover everything that we need so that if any changes
are made we can identify regression.
2017-01-29 15:16:07 -06:00
Channel Cat
0eaccea38f
updated project name in docs build
2017-01-29 12:49:59 -08:00
Channel Cat
de32c389d0
Added basic readthedocs support
2017-01-29 12:47:00 -08:00
Raphael Deem
753d2da6db
fix async run
2017-01-28 15:47:29 -08:00
Eli Uriegas
d3344da9c5
Add a pesky newline
2017-01-27 22:15:34 -06:00
Eli Uriegas
ae0876876e
Switch them to verifying headers instead
2017-01-27 22:13:16 -06:00
Eli Uriegas
dea8e16f49
Force method to lower
2017-01-27 22:07:31 -06:00
Eli Uriegas
13803bdb30
Update for HTTPMethodView compatibility
2017-01-27 22:05:46 -06:00
Eli Uriegas
7257e5794f
Merge pull request #359 from r0fls/fix-warnings
...
fix deprecation warnings
2017-01-27 21:05:51 -06:00
Eli Uriegas
41c52487ee
Fixes route overloading for dynamic routes
...
Addresses #353 , now dynamic routes work alongside our newly minted
overloaded routes! Also fixed an unintended side effect where methods
were still being passed in as None for `Sanic.add_route`.
2017-01-27 21:00:33 -06:00
Raphael Deem
0eb779185d
fix deprecation warnings
2017-01-27 18:09:19 -08:00
Eli Uriegas
3d790a71a0
Merge pull request #358 from seemethere/incrment_version_030
...
Increment version to 0.3.0
2017-01-27 19:37:02 -06:00
Eli Uriegas
cfc32d940a
Increment version to 0.3.0
2017-01-27 19:36:03 -06:00
Eli Uriegas
59242df7d6
Move serve_multiple, fix tests ( #357 )
...
* Move serve_multiple, remove stop_events, fix tests
Moves serve_multiple out of the app, removes stop_event (adds a
deprecation warning, but it also wasn't doing anything) fixes
multiprocessing tests so that they don't freeze pytest's runner.
Other notes:
Also moves around some imports so that they are better optimized as
well.
* Re-add in stop_event, maybe it wasn't so bad!
* Get rid of unused warnings import
2017-01-27 19:34:21 -06:00
Eli Uriegas
fad9fbca6f
Merge pull request #335 from r0fls/remove-loop
...
remove loop as argument and update examples
2017-01-27 19:25:09 -06:00
Eli Uriegas
c81c92967c
Merge pull request #354 from JordanP/use_isinstance
...
Use ``isinstance(`` instead of ``issubclass(type(``
2017-01-27 15:05:12 -06:00
Jordan Pittier
fa36dcbe09
Use `isinstance( instead of issubclass(type(`
...
When we already have an `instance` it's less typing and faster to
use `isinstance`.
2017-01-27 11:11:29 +01:00
Raphael Deem
c72bcc136c
add semaphore concurrency limit example
2017-01-26 17:43:54 -08:00
Raphael Deem
d52f5f0b09
remove loop as argument and update examples
2017-01-26 17:38:46 -08:00
Eli Uriegas
4f6650fce2
Merge pull request #349 from kdelwat/compositionview-docs
...
Add documentation for the CompositionView class
2017-01-26 19:38:32 -06:00
Raphael Deem
2774414f9e
Merge pull request #350 from r0fls/deprecate-loop
...
add deprecate loop message
2017-01-26 15:24:43 -08:00
Eli Uriegas
c1f1dca22c
Merge pull request #351 from r0fls/revert-log-changes
...
use string formatting in start message
2017-01-26 17:17:49 -06:00
Raphael Deem
965fbc917d
use string formatting in start message
2017-01-26 15:11:53 -08:00
Raphael Deem
2a1b63c93c
add deprecate loop message
2017-01-26 15:07:42 -08:00
Cadel Watson
011be51232
Add documentation for the CompositionView class
2017-01-27 09:52:41 +11:00
Eli Uriegas
d1c4f3172f
Merge pull request #348 from r0fls/275
...
add async run
2017-01-26 10:37:52 -06:00
Raphael Deem
14697c7ea9
review changes
2017-01-26 08:36:00 -08:00
Raphael Deem
54ca8c787b
add async run
2017-01-25 22:47:18 -08:00
Channel Cat
88c3bffe20
Merge pull request #342 from channelcat/fix-slow-upload
...
Fix slow upload
2017-01-25 22:04:48 -08:00
Channel Cat
a4f85cd02e
Merge pull request #343 from channelcat/cookie-usability
...
Cookie deletion and default path
2017-01-25 21:59:43 -08:00
Channel Cat
fd118a41fd
Only use request.body
2017-01-25 21:56:49 -08:00
Channel Cat
b0f71c5304
Fixed default path in documentation
2017-01-25 21:48:39 -08:00
Raphael Deem
a162f2ce34
Merge branch 'master' into cookie-usability
2017-01-25 21:24:30 -08:00
Eli Uriegas
0f64702d72
Merge pull request #347 from r0fls/345
...
false cookie attributes should not be set
2017-01-25 18:51:02 -06:00
Raphael Deem
3c355f19eb
false cookie attributes should not be set
2017-01-25 16:47:14 -08:00
Raphael Deem
fb9f2171a9
Merge pull request #346 from r0fls/event-docstring
...
fix before/after event docstrings
2017-01-25 16:29:10 -08:00
Raphael Deem
4efcb6d5ad
fix before/after event docstrings
2017-01-25 16:25:16 -08:00
Raphael Deem
5ddc166b12
Merge pull request #344 from atbentley/docs
...
Update blueprints docs with correct listener example
2017-01-25 10:48:17 -08:00
Andrew Bentley
ecd7e5bdd3
Update blueprints docs with correct listener example
2017-01-25 23:01:57 +11:00
Channel Cat
d0a121ad06
Added del cookie and default path
2017-01-25 01:53:39 -08:00
Channel Cat
85a28d3c30
Fix slow upload
2017-01-25 01:19:21 -08:00
Tim Mundt
5bba3388a0
Merge branch 'master' into improved_config
2017-01-25 09:36:21 +01:00
Eli Uriegas
0ad31a471b
Merge pull request #341 from r0fls/340
...
set error handler debug from run debug arg
2017-01-24 21:07:15 -06:00
Raphael Deem
28f7abd1f8
set error handler debug from run debug arg
2017-01-24 17:24:06 -08:00
Raphael Deem
049a5a7493
Merge pull request #339 from lixxu/master
...
add sanic-jinja2 extension
2017-01-23 23:46:26 -08:00
Lix Xu
a9ee01c7ec
add sanic-jinja2 extension
2017-01-24 15:34:32 +08:00
Manuel Miranda
1f89b15792
Caching example ( #334 )
...
* Caching example using aiocache
* Caching example using aiocache
* Added aiocache to requirements
* Fixed example with newest aiocache
* Fixed bug in cache example
2017-01-23 10:19:42 -06:00
Raphael Deem
afe390d407
Merge pull request #253 from dutradda/add_register_sys_signals_flag
...
add a flag to skip SIGINT and SIGTERM signals registration
2017-01-21 23:09:12 -08:00
Eli Uriegas
6f4f2758d6
Merge pull request #331 from ctlaltdefeat/json-response-args
...
allowed passing arguments to json response encoder
2017-01-21 15:31:57 -06:00
ctlaltdefeat
592ee5f839
fixed line length to satisfy travis
2017-01-21 23:02:02 +02:00
ctlaltdefeat
a811c84e99
allowed passing arguments to json response encoder
2017-01-21 22:40:34 +02:00
Eli Uriegas
214162adf0
Merge branch 'master' into add_register_sys_signals_flag
2017-01-21 10:25:57 -06:00
Raphael Deem
28396c8620
Merge pull request #327 from awiddersheim/logging-override
...
Make it easier to override logging
2017-01-20 16:23:03 -08:00
Andrew Widdersheim
72fba62e09
Make it easier to override logging
...
Take influence from how Werkzeug configures logging by only configuring
a handler if no root handlers were previously configured by the end
user.
2017-01-20 18:26:55 -05:00
Raphael Deem
5669cafc59
Merge pull request #328 from awiddersheim/remove-multidict
...
Remove multidict requirement
2017-01-20 15:14:39 -08:00
Andrew Widdersheim
0c7275da1a
Remove multidict requirement
...
This is no longer necessary after #302 .
2017-01-20 18:12:54 -05:00
Eli Uriegas
e5cbf25cbd
Merge pull request #325 from seemethere/add_key_error
...
Simplify RequestParameters
2017-01-20 15:27:00 -06:00
Eli Uriegas
c3cf618e84
Merge pull request #326 from seemethere/fix_exception_monitoring_documentation
...
Fix exception_monitoring example to actually work
2017-01-20 14:39:26 -06:00
Eli Uriegas
7780a8c187
Merge pull request #320 from r0fls/method-decorators
...
add method shorthands
2017-01-20 14:38:34 -06:00
Eli Uriegas
40f1e14bb7
Fix exception_monitoring example to actually work
...
Closes #324
Super was used incorrectly in the example, also fixed some formatting
here and there.
2017-01-20 14:36:15 -06:00
Eli Uriegas
a7cd4ccd09
Simplify RequestParameters
...
Simplifies request parameters, it defined a bit more than it had too,
added some docstrings and made the code simpler as well. Should now
raise a KeyError on __getitem__ as @amsb had noted on commit 9dd954b
2017-01-20 14:31:24 -06:00
Raphael Deem
6fd69b6284
separate tests
2017-01-20 10:19:14 -08:00
Raphael Deem
96424b6b0a
add method shorthands
2017-01-20 00:07:22 -08:00
Eli Uriegas
bef34d66f5
Merge pull request #314 from seemethere/make_closed_transport_handling_more_robust
...
Add exception handling for closed transports
2017-01-19 21:31:30 -06:00
Eli Uriegas
c6049be688
Merge pull request #316 from youknowone/route-get
...
For function decorators, ['GET'] is the default methods
2017-01-19 21:31:06 -06:00
Eli Uriegas
5ea653244e
Merge pull request #319 from seemethere/fix_docs_links
...
Fixes doc link extensions from .html to .md
2017-01-19 21:30:40 -06:00
Eli Uriegas
596bb54ee3
Oops on 2 of the non-relative links
2017-01-19 21:26:37 -06:00
Eli Uriegas
7554e87374
Fixes doc link extensions from .html to .md
...
Whoops! Totally missed that all the links pointed to `.html` files
instead of `.md` files
2017-01-19 21:24:08 -06:00
Cadel Watson
6176964bdf
Clarify, reformat, and add to documentation guides ( #318 )
...
* Reorder and clarify the 'Request Data' guide, adding a section on RequestParameters
* Clarify routing guide, adding introduction and HTTP types sections
* Clarify the use-cases of middleware
* Clean up formatting in the exceptions guide and add some common exceptions.
* Fix formatting of blueprints and add use-case example.
* Clarify the class-based views guide
* Clarify and fix formatting of cookies guide
* Clarify static files guide
* Clarify the custom protocols guide.
* Add more information to the deploying guide
* Fix broken list in the community extensions list.
* Add introduction and improve warning to contributing guide
* Expand getting started guide
* Reorder guides and add links between them
* Standardise heading capitalisation
2017-01-19 21:18:52 -06:00
Eli Uriegas
f77bb81def
Merge pull request #229 from kdelwat/sphinx-docs
...
Use Sphinx for documentation
2017-01-19 16:54:02 -06:00
Eli Uriegas
ed4752bbc0
Move transport close to finally statment
2017-01-19 16:35:48 -06:00
Cadel Watson
30862c0a3e
Update documentation generation instructions.
2017-01-20 09:32:08 +11:00
Cadel Watson
7c4ffa8866
Merge branch 'master' into sphinx-docs
2017-01-20 09:30:42 +11:00
Eli Uriegas
a79f073077
Merge pull request #228 from seanpar203/issue_41
...
Adding more docstrings
2017-01-19 16:18:28 -06:00
Raphael Deem
4682d7b4b8
Merge pull request #296 from mdaue/ssl
...
Add SSL context to server
2017-01-19 11:29:07 -08:00
Raphael Deem
d2217b5c5f
Merge branch 'master' into ssl
2017-01-19 11:23:21 -08:00
Jeong YunWon
0a160c4a0b
For function decorators, ['GET'] is the default methods
2017-01-19 23:56:51 +09:00
Eli Uriegas
aed8255a8b
Merge pull request #315 from h4ck3rm1k3/patch-1
...
untie
2017-01-19 08:28:18 -06:00
James Michael DuPont
ba60659894
untie
2017-01-19 04:04:16 -05:00
Raphael Deem
1ad7b95437
Merge pull request #306 from zkanda/always-log-error-exception
...
Always log if there's an exception occurred.
2017-01-19 00:22:46 -08:00
zkanda
cc43ee3b3d
Always log of there's an exception occured.
2017-01-19 16:03:12 +08:00
Eli Uriegas
5a7b70c054
Merge pull request #313 from r0fls/logging-var
...
remove logger from run
2017-01-18 23:50:07 -06:00
Eli Uriegas
e9bfa30c1d
Add exception handling for closed transports
...
Adds handling for closed transports in the server for `write_response`
as well as `write_error`, letting it all flow to `bail_out` seemed to be
a little light handed in terms of telling the logs where the
error actually occured.
Handling to fix the infinite `write_error` loop is still there and those
exceptions will get reported on in the debug logs.
2017-01-18 23:46:22 -06:00
Raphael Deem
bb83a25a52
remove logger from run
2017-01-18 21:45:30 -08:00
Eli Uriegas
99c8d779dc
Merge pull request #312 from r0fls/allow-vhost-lists
...
allow using a list of hosts on a route
2017-01-18 23:42:59 -06:00
Raphael Deem
2c1ff5bf5d
allow using a list of hosts on a route
2017-01-18 19:41:32 -08:00
Eli Uriegas
e218a59911
Merge pull request #311 from youknowone/route-overload
...
Feature: Routing overload
2017-01-18 16:32:46 -06:00
Jeong YunWon
11f3c79a77
Feature: Routing overload
...
When user specifies HTTP methods to function handlers, it automatically
will be overloaded unless they duplicate.
Example:
# This is a new route. It works as before.
@app.route('/overload', methods=['GET'])
async def handler1(request):
return text('OK1')
# This is the exiting route but a new method. They are merged and
# work as combined. The route will serve all of GET, POST and PUT.
@app.route('/overload', methods=['POST', 'PUT'])
async def handler2(request):
return text('OK2')
# This is the existing route and PUT method is the duplicated method.
# It raises RouteExists.
@app.route('/overload', methods=['PUT', 'DELETE'])
async def handler3(request):
return text('Duplicated')
2017-01-19 07:12:45 +09:00
Cadel Watson
5cfd8b9aa8
Fix formatting of 'Final Word' in README
2017-01-19 08:58:13 +11:00
Cadel Watson
ebce7b01c7
Add new guides to documentation index
2017-01-19 08:54:20 +11:00
Cadel Watson
9d4b104d2d
Merge branch 'master' into sphinx-docs
2017-01-19 08:48:54 +11:00
Raphael Deem
5a6fb679c9
Merge pull request #309 from seemethere/fix_write_error_loop
...
Fixes write_error loop from bail_out function
2017-01-17 18:11:22 -08:00
Raphael Deem
9102a9cd6e
Merge branch 'master' into ssl
2017-01-17 18:09:33 -08:00
Eli Uriegas
573d1da0ef
Fixes write_error loop from bail_out function
...
Fixes stack-overflow found in #307
2017-01-17 18:28:22 -06:00
Raphael Deem
2848dce968
Merge pull request #308 from r0fls/287
...
update logging placement
2017-01-17 15:51:38 -08:00
Raphael Deem
ba1e006585
update logging placement
2017-01-17 15:49:17 -08:00
Eli Uriegas
9108a4c69f
Merge pull request #291 from subyraman/master
...
Add rich HTML traceback in debug mode, add HTML 500 page in prod
2017-01-17 15:47:37 -06:00
Eli Uriegas
f42ceb1baa
Merge pull request #304 from gpip/missing_ip_slots
...
cannot use the new .ip without updating __slots__
2017-01-17 10:54:21 -06:00
Guilherme Polo
5903dd2939
cannot use the new .ip without updating __slots__
2017-01-17 02:58:45 -02:00
Eli Uriegas
55b39a3f15
Merge pull request #301 from r0fls/cache-remote-ip
...
cache the remote IP property
2017-01-16 20:07:53 -06:00
Raphael Deem
9bc69f7de9
use hasattr
2017-01-16 17:35:08 -08:00
Channel Cat
2aa380c5a3
Merge pull request #302 from channelcat/request-headers-ci
...
Trimmed down features of CIMultiDict
2017-01-16 17:08:12 -08:00
Channel Cat
638fbcb619
Encoding needs a default
2017-01-16 17:03:55 -08:00
Channel Cat
ccbbce0036
Fix header capitalization on input
...
also removed redundant utf-8 in encodes/decodes
2017-01-16 16:55:55 -08:00
Channel Cat
41918eaf0a
Trimmed down features of CIMultiDict
2017-01-16 16:12:42 -08:00
Eli Uriegas
5c344f7efa
Remove redundant else
2017-01-16 17:51:56 -06:00
Raphael Deem
213580ea78
cache the remote IP property
2017-01-16 15:48:55 -08:00
Eli Uriegas
d5fd269fda
Merge pull request #300 from channelcat/move-request-ip-retry
...
Moved Remote-Addr header to request.ip
2017-01-16 17:35:04 -06:00
Ubuntu
2cf4baddfb
Moved Remote-Addr header to request.ip so it can be pulled on-demand
2017-01-16 23:27:50 +00:00
Eli Uriegas
48d496936a
Merge pull request #294 from subyraman/redirect
...
Add redirect method from @pcdinh
2017-01-16 13:53:02 -06:00
Eli Uriegas
e410c06a68
Merge pull request #293 from r0fls/extensions-docs
...
Extensions docs
2017-01-15 19:37:30 -06:00
Eli Uriegas
f6c2d0bcaf
Merge pull request #297 from seemethere/increment_020
...
Increment version to 0.2.0
2017-01-14 11:25:10 -06:00
Eli Uriegas
e2a16f96a8
Increment version to 0.2.0
2017-01-14 11:24:31 -06:00
Matt Daue
49fdc6563f
Add SSL to server
...
Add ssl variable passthrough to following:
-- sanic.run
-- server.serve
Add ssl variable to loop.create_server to enable built-in async context socket wrapper
Update documentation
Tested with worker = 1, and worker = 2.
Signed-off-by: Matt Daue <mattdaue@gmail.com >
2017-01-14 07:16:59 -05:00
Suby Raman
b5bbef09c5
add redirect method
2017-01-14 00:47:28 -05:00
Suby Raman
7a1e089725
add headers none test
2017-01-14 00:45:04 -05:00
Suby Raman
7de3f7aa78
rename test app
2017-01-14 00:43:30 -05:00
Suby Raman
02b9a0a297
add redirect code from @pcdinh
2017-01-14 00:41:54 -05:00
Tim Mundt
0b9094d348
Merge branch 'master' into improved_config
2017-01-13 12:34:56 +01:00
Raphael Deem
a86cc32dff
Update extensions.md
...
Since there have been a few extensions discussed in open issues, it makes sense to start keeping track of them.
2017-01-12 19:30:22 -08:00
Raphael Deem
974c857a97
add a list of extensions
2017-01-12 19:25:08 -08:00
Suby Raman
6e53fa03f5
add beautifulsoup4 to tox
2017-01-12 20:03:35 -05:00
Suby Raman
8c5e214131
html and tests pass
2017-01-12 19:54:34 -05:00
Eli Uriegas
cf60ebd988
Merge pull request #289 from seemethere/update_request_form_getitem
...
Update request.form to work with __getitem__
2017-01-11 17:02:45 -06:00
Eli Uriegas
9dd954bccd
Update request.form to work with __getitem__
2017-01-11 16:55:34 -06:00
Eli Uriegas
a02eb8e7cb
Merge pull request #284 from r0fls/remove-defualt-type
...
remove default from host in _get method
2017-01-11 10:01:11 -06:00
Eli Uriegas
a93ca9b8f1
Merge pull request #285 from r0fls/blueprint-domains
...
add vhosts to blueprints
2017-01-11 10:00:35 -06:00
Raphael Deem
15e4ec7ffb
add ability to override default host in blueprint
2017-01-10 22:08:15 -08:00
Raphael Deem
62df50e22b
add vhosts to blueprints
2017-01-10 21:35:07 -08:00
Raphael Deem
055430d4b8
remove default from host in _get method
2017-01-10 16:01:21 -08:00
Eli Uriegas
57f27c41e0
Merge pull request #278 from r0fls/vhosts
...
add support for virtual hosts
2017-01-10 15:18:36 -06:00
Cadel Watson
385328ffd5
Generate API documentation in the _api folder
2017-01-10 09:41:00 +11:00
Cadel Watson
34d1e5e67e
Convert README to RestructuredText and include it in the documentation index.
2017-01-10 09:28:33 +11:00
Raphael Deem
4f832ac9af
add support for virtual hosts
2017-01-08 18:46:29 -08:00
Eli Uriegas
b0bf989056
Merge pull request #261 from yoloseem/parsed_json
...
Cache request.json even when it's empty.
2017-01-08 11:57:33 -06:00
Eli Uriegas
fd0e8624c4
Merge pull request #276 from r0fls/workers
...
Fix multiple worker problem
2017-01-08 11:57:10 -06:00
Eli Uriegas
5566668a5f
Change the skips to actual pytest skips
...
By using the builtin pytest skips we can identify that the tests are still there but are being currently skipped.
Will update later to remove the skips once we figure out why they freeze with pytest (I experienced this same issue with multiprocessing when testing start/stop events).
2017-01-08 11:55:08 -06:00
Raphael Deem
f8e6becb9e
skip multiprocessing tests
2017-01-07 18:58:02 -08:00
Raphael Deem
dd28d70680
fix stop event
2017-01-07 18:46:38 -08:00
Raphael Deem
ed8e3f237c
this branch is broken
2017-01-07 15:28:21 -08:00
Raphael Deem
77c04c4cf9
fix multiple worker problem
2017-01-07 12:57:14 -08:00
Eli Uriegas
ebc8d7168a
Merge pull request #274 from AntonDnepr/cbw_fixes
...
Class based views fixes
2017-01-07 10:07:14 -06:00
Anton Zhyrney
434fa74e67
removed debug from test
2017-01-07 07:14:27 +02:00
Anton Zhyrney
47a4f34cdf
tests&small update
2017-01-07 07:13:49 +02:00
Anton Zhyrney
1317b1799c
add docstrings&updated docs
2017-01-07 06:57:07 +02:00
Anton Zhyrney
fcae4a9f0a
added as_view
2017-01-07 06:30:23 +02:00
Eli Uriegas
d733c5bb7c
Merge pull request #271 from easydaniel/master
...
Asyncpg example
2017-01-06 09:11:42 -06:00
Eli Uriegas
baf8254907
Change Ellipsis to None for consistency
2017-01-05 15:29:57 -06:00
Eli Uriegas
802e7d4654
Merge pull request #269 from r0fls/263
...
add configurable backlog
2017-01-04 20:37:19 -06:00
Raphael Deem
616e20d467
move backlog to run()
2017-01-04 09:31:06 -08:00
easydaniel
5c7c2cf85e
Update sanic_asyncpg_example.py
...
Remove unused library
2017-01-04 23:35:06 +08:00
DanielChien
1942644434
modify config to varbles
2017-01-04 23:30:29 +08:00
DanielChien
b67482de9b
add example for asyncpg
2017-01-04 23:29:09 +08:00
Eli Uriegas
35bb71f952
Merge pull request #270 from seemethere/add_server_event_tests
...
Add server event tests
2017-01-04 00:32:13 -06:00
Eli Uriegas
9c91b09ab1
Fix this to actually reflect current behavior
2017-01-04 00:23:59 -06:00
Eli Uriegas
06911a8d2e
Add tests for server start/stop event functions
2017-01-04 00:23:35 -06:00
Raphael Deem
e7922c1b54
add configurable backlog #263
2017-01-03 18:36:31 -08:00
Eli Uriegas
16959caa34
Merge pull request #259 from yoloseem/route
...
Correct Router documentation
2017-01-03 18:47:54 -06:00
Eli Uriegas
0675f388b9
Merge pull request #255 from seemethere/add_more_verbose_debug_error_handling
...
Add more verbose debug error handling
2017-01-03 15:43:26 -06:00
Eli Uriegas
b4ad9459da
Merge pull request #260 from yoloseem/gitign
...
Update .gitignore
2017-01-03 14:42:00 -06:00
Eli Uriegas
8a9b1fee14
Merge pull request #265 from youknowone/test-middleware-schedule
...
Prevent flooding of meaningless traceback in `sanic_endpoint_test`
2017-01-03 14:41:23 -06:00
Jeong YunWon
e6eb697bb2
Use constant PORT rather than literal in test code ( #266 )
2017-01-03 14:40:13 -06:00
Eli Uriegas
4ccc782e29
Merge pull request #209 from 38elements/protocol
...
Customizable protocol
2017-01-03 11:52:54 -06:00
Hyunjun Kim
cfdd9f66d1
Correct sanic.router.Router documentation
2017-01-02 14:32:22 +09:00
Hyunjun Kim
035cbf84ae
Cache request.json even when it's null or empty
...
In case of request body is set to `{}`, `[]` or `null`, even it's
already processed, parsed_json won't be used due to its boolean
evaluation.
2017-01-02 14:20:20 +09:00
Hyunjun Kim
31e92a8b4f
Update .gitignore
...
* .python-version is generated by `pyenv local` command
* .eggs/ directory contains *.egg files
2017-01-02 13:33:24 +09:00
Jeong YunWon
87c24e5a7c
Prevent flooding of meaningless traceback in sanic_endpoint_test
...
When Sanic has an exception in a request middleware, it fails to
save request object in `results`. In `sanic_endpoint_test`, because
it always requires `results` to have both `request` and `response` objects,
it prints traceback like attached example. It is not a user code and
it doesn't give any information to users, it is better to suppress
to print this kind of error.
To fix it, this patch insert collect hook as first request middleware
to guarantee to successfully run it always.
```
app = <sanic.sanic.Sanic object at 0x1102b5358>, method = 'get', uri = '/ping/', gather_request = True, loop = None
debug = True, request_args = (), request_kwargs = {}
_collect_request = <function sanic_endpoint_test.<locals>._collect_request at 0x11286c158>
_collect_response = <function sanic_endpoint_test.<locals>._collect_response at 0x11286c378>
def sanic_endpoint_test(app, method='get', uri='/', gather_request=True,
loop=None, debug=False, *request_args,
**request_kwargs):
results = []
exceptions = []
if gather_request:
@app.middleware
def _collect_request(request):
results.append(request)
async def _collect_response(sanic, loop):
try:
response = await local_request(method, uri, *request_args,
**request_kwargs)
results.append(response)
except Exception as e:
exceptions.append(e)
app.stop()
app.run(host=HOST, debug=debug, port=42101,
after_start=_collect_response, loop=loop)
if exceptions:
raise ValueError("Exception during request: {}".format(exceptions))
if gather_request:
try:
> request, response = results
E ValueError: not enough values to unpack (expected 2, got 1)
../sanic/sanic/utils.py:46: ValueError
```
2017-01-02 13:18:22 +09:00
Eli Uriegas
552ff9d736
Merge pull request #235 from yoloseem/patch-1
...
Allow Sanic-inherited application
2016-12-31 13:21:44 -06:00
Eli Uriegas
738396c2e2
Merge pull request #236 from seanpar203/token_property
...
Add token property to request
2016-12-31 13:21:12 -06:00
Eli Uriegas
9f18b5a096
Merge pull request #248 from youknowone/debuggable-typecheck
...
Handle hooks parameters in more debuggable way
2016-12-31 13:17:06 -06:00
Eli Uriegas
15c965c08c
Make exception tests test unhandled exceptions
...
* Adds tests for unhandled exceptions
* Adds tests for unhandled exceptions in exception handlers
* Rewrites tests to utilize pytest fixtures (No need to create the app
on import)
2016-12-30 13:50:12 -06:00
Eli Uriegas
7a8fd6b0df
Add more verbose error handling
...
* Adds logging to error messages in debug mode as pointed out in PR #249 ,
while also improving the debug message.
2016-12-30 13:48:17 -06:00
Eli Uriegas
3ada6f358c
Merge pull request #197 from r0fls/178
...
convert header values to strings
2016-12-30 12:17:29 -06:00
Eli Uriegas
f1c2854358
Merge branch 'master' into 178
2016-12-30 12:15:08 -06:00
Eli Uriegas
87559a34f8
Include more explicit loop for headers conversion
...
Also merges master changes into this PR for this branch
2016-12-30 12:13:16 -06:00
Eli Uriegas
9586351f37
Merge pull request #243 from dutradda/add_remove_route_method
...
created methods to remove a route from api/router
2016-12-30 09:39:57 -06:00
Diogo
0f6ed642da
created methods to remove a route from api/router
2016-12-30 07:36:57 -02:00
Diogo Dutra
6d1d4ade19
add a flag to skip SIGINT and SIGTERM signals registration
2016-12-29 19:35:41 -02:00
Eli Uriegas
73a57e1105
Merge pull request #252 from AntonDnepr/misprints
...
Small docs improvements
2016-12-29 11:49:55 -06:00
Anton Zhyrney
e7314d1775
fix misprints&renaming
2016-12-29 19:22:11 +02:00
38elements
ee8f8c2930
Merge branch 'master' into protocol
2016-12-29 16:44:15 +09:00
38elements
64e0e2d19f
Improve custom_protocol.md
2016-12-29 16:41:04 +09:00
38elements
6bb4dae5e0
Fix format in custom_protocol.md
2016-12-29 13:25:04 +09:00
38elements
83e9d08853
Add document for custom protocol
2016-12-29 13:11:27 +09:00
Eli Uriegas
7dfa62516c
Merge pull request #238 from r0fls/73
...
stop multiple worker server without sleep loop; issue #73
2016-12-28 18:05:06 -06:00
Jeong YunWon
15e7d8ab2e
Handle hooks parameters in more debuggable way
...
1. not list() -> callable()
The args of hooking parameters of Sanic have to be callables.
For wrong parameters, errors will be generated from:
```
listeners += args
```
By checking just list type, the raised error will be associated
with `[args]` instead of `args`, which is not given by users.
With this patch, the raised error will be associated with `args`.
Then users can notice their argument was neither callable nor list
in the easier way.
2. Function -> Functions in document
Regarding the parameter as a list is harmless to the user code.
But unawareness of its type can be list can limit the potent of
the user code.
2016-12-28 18:14:57 +09:00
Raphael Deem
a4f77984b7
stop multiple worker server without sleep loop; issue #73
2016-12-26 14:51:16 -08:00
38elements
39b279f0f2
Improve examples/custom_protocol.py
2016-12-26 23:54:59 +09:00
38elements
ac44900fc4
Add test and example for custom protocol
2016-12-26 23:41:10 +09:00
Sean Parsons
548458c3e0
Added test for new token property on request object.
2016-12-26 06:48:53 -05:00
Sean Parsons
986b0aa106
Added token property to request object.
2016-12-26 06:41:41 -05:00
Hyunjun Kim
01b42fb399
Allow Sanic-inherited application
2016-12-26 20:37:16 +09:00
Eli Uriegas
f74d44152a
Merge pull request #234 from seemethere/update_tests_to_use_tox
...
Change travis job to use tox
2016-12-25 19:10:36 -08:00
Eli Uriegas
1557854755
Update to make flake8 actually work
2016-12-25 19:05:11 -08:00
Eli Uriegas
56d6c2a929
Change travis job to use tox
2016-12-25 18:55:25 -08:00
Eli Uriegas
2d4512cd1c
Merge branch 'master' into improved_config
2016-12-25 15:26:33 -08:00
Eli Uriegas
5402e6d3a6
Merge pull request #212 from r0fls/176
...
allow overriding logging basicConfig settings
2016-12-25 09:13:51 -08:00
Cadel Watson
52c59e7133
Fix all docstring errors.
...
When generating documentation with sphinx-apidoc, there are currently
many docstring errors, mostly minor. This commit fixes all errors.
2016-12-25 20:43:45 +11:00
Cadel Watson
7654c2f902
Use Sphinx for documentation.
...
This commit creates configuration files and an index page for
documentation using Sphinx. The recommonmark package is used to enable
Markdown support for Sphinx, using the Common Mark specification. This
means that the current documentation doesn't need to be rewritten.
2016-12-25 20:24:34 +11:00
Raphael Deem
be9eca2d63
use try/except
2016-12-24 23:05:03 -08:00
Sean Parsons
d5ad5e46da
Update response docstrings to be explicit on whats returned.
2016-12-25 01:24:17 -05:00
Sean Parsons
a486fb99a9
Updated json function docstrings to be more consistent.
2016-12-25 01:06:40 -05:00
Sean Parsons
2b10860c32
Added docstrings to sanic.response.py for issue 41
2016-12-25 01:05:26 -05:00
Sean Parsons
a03f216f42
Added additional docstrings to blueprints.py
2016-12-25 00:47:51 -05:00
Raphael Deem
7d7cbaacf1
header format function
2016-12-24 20:56:13 -08:00
Raphael Deem
00b5a496dd
type -> isinstance
2016-12-24 20:56:13 -08:00
Raphael Deem
7e6c92dc52
convert header values to strings
2016-12-24 20:56:13 -08:00
Eli Uriegas
6cf3754051
Merge pull request #226 from seemethere/increment_019
...
Increment version to 0.1.9
2016-12-24 18:54:07 -08:00
Eli Uriegas
cf7616ebe5
Increment version to 0.1.9
2016-12-24 18:51:16 -08:00
Eli Uriegas
5b7964f8b6
Merge pull request #225 from seemethere/add_response_body_not_a_string_test
...
Add test for PR: #215
2016-12-24 18:50:11 -08:00
Eli Uriegas
f1f38c24da
Add test for PR: #215
2016-12-24 18:47:15 -08:00
Eli Uriegas
67a50becb0
Merge pull request #215 from cr0hn/patch-1
...
Improvement: avoid to encoding in each HTTP Response
2016-12-24 18:41:01 -08:00
Eli Uriegas
d7e94473f3
Use a try/except, it's a bit faster
...
Also reorder some imports and add some comments
2016-12-24 18:37:55 -08:00
Eli Uriegas
184c896f41
Merge pull request #224 from seemethere/rewrite_static_files_tests
...
Rewrite static files tests
2016-12-24 18:23:06 -08:00
Eli Uriegas
8be849cc40
Rewrite static files tests
...
Relates to PR #188
Changes include:
- Rewriting to work with pytest fixtures and an actual static directory
- Addition of a test that covers file paths that must be
unquoted as a uri
2016-12-24 18:18:56 -08:00
Eli Uriegas
275851a755
Merge pull request #188 from webtic/master
...
Find URL encoded filenames on the fs by decoding them first
2016-12-24 18:14:45 -08:00
Eli Uriegas
16182472fa
Remove trailing whitespace
2016-12-24 18:11:46 -08:00
Eli Uriegas
29f3c22fed
Rework conditionals to not be inline
2016-12-24 18:11:12 -08:00
Eli Uriegas
a116666d55
Merge pull request #223 from r0fls/115
...
Raise error if response is malformed.
2016-12-24 17:12:17 -08:00
Raphael Deem
c2622511ce
Raise error if response is malformed. Issue #115
2016-12-24 17:09:41 -08:00
Eli Uriegas
50243037eb
Merge pull request #222 from seemethere/add_py36_testing
...
Adds python36 to tox.ini and .travis.yml
2016-12-24 14:11:55 -08:00
Eli Uriegas
74f305cfb7
Adds python36 to tox.ini and .travis.yml
2016-12-24 14:06:53 -08:00
Eli Uriegas
75990fbaf4
Merge pull request #220 from kgantsov/master
...
Make golang performance test return JSON instead of string
2016-12-24 13:40:24 -08:00
cr0hn
cc982c5a61
Update response.py
...
Type check by isinstance
2016-12-24 15:24:25 +01:00
38elements
2d05243c4a
Refactor arguments of run function
2016-12-24 22:49:48 +09:00
Konstantin Hantsov
2f0a582aa7
Make golang performance test return JSON instead of string
2016-12-24 10:28:34 +01:00
Eli Uriegas
665881471d
Merge pull request #217 from cr0hn/patch-3
...
Upgraded Middlewares doc: Explain how to chain two (or more) middlewares
2016-12-23 22:31:03 -08:00
38elements
39211f8fbd
Refactor arguments of serve function
2016-12-24 11:40:07 +09:00
Raphael Deem
32ea45d403
allow overriding logging.basicConfig
2016-12-23 16:17:34 -08:00
Eli Uriegas
cd17a42234
Fix some verbage
2016-12-23 09:59:28 -08:00
Eli Uriegas
8e19b5938c
Merge pull request #216 from cr0hn/patch-2
...
Apply response Middleware always
2016-12-23 09:57:38 -08:00
Eli Uriegas
9e208ab744
Merge pull request #210 from kdelwat/testing-documentation
...
Create documentation for testing server endpoints.
2016-12-23 09:57:22 -08:00
Eli Uriegas
94bd9702e5
Merge pull request #211 from rmno/master
...
Fixed import error in docs
2016-12-23 09:57:08 -08:00
cr0hn
3add40625d
Explain how to chain two (or more) middlewares
...
A funny and useful examples about how to chain middlewares.
2016-12-23 16:07:59 +01:00
cr0hn
5afae986a0
Apply response Middleware always
...
Response middleware are useful to apply some post-process information, just before send to the user. For example: Add some HTTP headers (security headers, for example), remove "Server" banner (for security reasons) or cookie management.
The change is very very simple: although an "request" middleware has produced any response, we'll even apply the response middlewares.
2016-12-23 15:59:04 +01:00
cr0hn
f091d82bad
Improvement
...
improvement: support fo binary data as a input. This do that the response process has more performance because not encoding needed.
2016-12-23 13:12:59 +01:00
Stefano Palazzo
a73a7d1e7b
Make it possible to disable the logo by subclassing Config
2016-12-23 11:42:00 +01:00
Romano Bodha
5c1ef2c1cf
Fixed import error
2016-12-23 01:42:05 +01:00
Cadel Watson
8411255700
Create documentation for testing server endpoints.
...
Currently the sanic.utils functionality is undocumented. This provides
information on the interface as well as a complete example of testing
a server endpoint.
2016-12-23 11:08:04 +11:00
38elements
c657c531b4
Customizable protocol
2016-12-23 00:13:38 +09:00
Eli Uriegas
ef9d8710f5
Merge pull request #200 from 38elements/invalid-usage
...
Change HttpParserError process
2016-12-17 22:50:00 -06:00
38elements
75fc9f91b9
Change HttpParserError process
2016-12-18 09:25:39 +09:00
Tim Mundt
ef9edfd160
added documentation for configuration
2016-12-17 20:20:07 +01:00
Tim Mundt
234a7925c6
restored accidentally degraded doc string
2016-12-17 19:24:41 +01:00
Tim Mundt
a550b5c112
added tests and small fixes for config
2016-12-16 18:46:07 +01:00
Tim Mundt
04798cbf5b
added methods to load config from a file
2016-12-16 17:05:09 +01:00
Eli Uriegas
545d9eb59b
Merge pull request #198 from sagnew/patch-2
...
Fix quotes in sample code for consistency
2016-12-14 11:39:22 -06:00
Sam Agnew
a9b67c3028
Fix quotes in sample code for consistency
2016-12-14 12:36:33 -05:00
Eli Uriegas
35e79f3985
Merge pull request #171 from jpiasetz/convert_dict_to_set
...
Convert connections dict to set
2016-12-14 11:30:45 -06:00
Eli Uriegas
435d5585e9
Fix leftover blank line
...
flake8 build failed here: https://travis-ci.org/channelcat/sanic/builds/183991976
2016-12-14 11:29:09 -06:00
Eli Uriegas
ddfb7f2861
Merge branch 'master' into convert_dict_to_set
2016-12-14 11:26:31 -06:00
Eli Uriegas
6c806549ae
Merge pull request #194 from sagnew/patch-1
...
Fix PEP8 in Hello World example
2016-12-13 11:44:53 -06:00
Sam Agnew
8957e4ec25
Fix PEP8 in Hello World example
2016-12-13 12:35:46 -05:00
Paul Jongsma
2003eceba1
remove trailing space
2016-12-13 10:41:39 +01:00
Eli Uriegas
8fc1462d11
Merge pull request #193 from r0fls/jinja-example
...
add jinja example
2016-12-13 00:30:07 -06:00
Raphael Deem
93b45e9598
add jinja example
2016-12-12 22:25:24 -08:00
Eli Uriegas
a3a14cdab2
Merge pull request #170 from jpiasetz/convert_lambda_to_partial
...
Convert server lambda to partial
2016-12-12 20:40:29 -06:00
Paul Jongsma
9ba2f99ea2
added a comment on why to decode the file_path
2016-12-13 01:10:24 +01:00
Eli Uriegas
f9db796a6e
Merge pull request #189 from AntonDnepr/aiopg_examples
...
Aiopg examples
2016-12-12 13:22:32 -06:00
Eli Uriegas
94c7aaf7f8
Merge pull request #190 from kamyarg/master
...
url params docs typo fix
2016-12-12 13:21:46 -06:00
kamyar
6ef6d9a905
url params docs typo fix
...
add missing '>' in url params docs example
2016-12-11 16:34:22 +02:00
Anton Zhyrney
b44e9baaec
aiopg with sqlalchemy example
2016-12-11 14:21:02 +02:00
Anton Zhyrney
f9176bfdea
pep8&improvements
2016-12-11 14:14:03 +02:00
Anton Zhyrney
721044b378
improvements for aiopg example
2016-12-11 14:04:24 +02:00
Anton Zhyrney
154f8570f0
add sanic aiopg example with raw sql
2016-12-11 13:43:31 +02:00
Paul Jongsma
0464d31a9c
Find URL encoded filenames on the fs by decoding them first
2016-12-10 12:16:37 +01:00
Eli Uriegas
e3453553e1
Merge pull request #183 from 38elements/payload-too-large
...
Change Payload Too Large process
2016-12-08 10:27:55 -06:00
Eli Uriegas
6abaa78f9e
Merge pull request #186 from r0fls/master
...
return 400 on invalid json post data
2016-12-08 10:27:29 -06:00
Raphael Deem
457507d8dc
return 400 on invalid json post data
2016-12-07 20:40:31 -08:00
Eli Uriegas
3ea1a80496
Merge pull request #185 from 1a23456789/master
...
Fix test_request_timeout.py
2016-12-06 16:04:15 -06:00
1a23456789
fac4bca4f4
Fix test_request_timeout.py
...
This increases sleep time, Because sometimes timeout error does not occur.
2016-12-06 10:44:08 +09:00
38elements
662e0c9965
Change Payload Too Large process
...
When Payload Too Large occurs, it uses error handler.
2016-12-04 10:50:32 +09:00
Eli Uriegas
80af9e6d76
Merge pull request #173 from jackfischer/master
...
fix for cookie header capitalization bug
2016-12-03 17:28:38 -06:00
Jack Fischer
9b466db5c9
test for http2 lowercase header cookies
2016-12-03 15:19:24 -05:00
Jack Fischer
c34427690a
Merge branch 'master' of git://github.com/channelcat/sanic
2016-12-03 15:08:07 -05:00
Eli Uriegas
d8a974bb4f
Merge pull request #175 from Derrreks/master
...
Improving comments
2016-12-02 20:07:28 -06:00
Eli Uriegas
98b08676e2
Merge pull request #177 from seemethere/increment_version
...
Increment version to 0.1.8
2016-11-29 15:59:48 -06:00
Eli Uriegas
39f3a63ced
Increment version to 0.1.8
2016-11-29 15:59:03 -06:00
Eli Uriegas
89e2084489
Merge pull request #172 from 38elements/timeout
...
Change request timeout process
2016-11-29 15:56:07 -06:00
Derek Schuster
70c56b7db3
fixing line length
2016-11-28 14:22:07 -05:00
Derek Schuster
209b763302
fix typo
2016-11-28 14:05:47 -05:00
Derek Schuster
190b7a6076
improving comments and examples
2016-11-28 14:00:39 -05:00
Eli Uriegas
cce47a633a
Merge pull request #167 from AntonDnepr/class-based-views
...
Class based views
2016-11-27 21:33:46 -06:00
Eli Uriegas
ec2330c42b
Merge pull request #169 from jpiasetz/simplify_imports
...
Use explicit import for httptools
2016-11-27 20:02:57 -06:00
Jack Fischer
0c215685f2
refactoring cookies
2016-11-27 08:30:46 -05:00
Jack Fischer
d86ac5e3e0
fix for cookie header capitalization bug
2016-11-26 11:20:29 -05:00
38elements
ee89b6ad03
before process
2016-11-26 16:47:16 +09:00
38elements
a5e6d6d2e8
Use default error process
2016-11-26 16:02:44 +09:00
Anton Zhyrney
1eea1f5485
rename&remove redundant code
2016-11-26 08:45:08 +02:00
Anton Zhyrney
da4567eea5
changes in doc
2016-11-26 08:44:46 +02:00
38elements
9010a6573f
Add status code
2016-11-26 15:21:57 +09:00
38elements
d8e480ab48
Change sleep time
2016-11-26 14:47:42 +09:00
38elements
0bd61f6a57
Use write_response
2016-11-26 14:14:30 +09:00
38elements
c01cbb3a8c
Change Request timeout process
...
This add a request timeout exception.
It cancels task, when request is timeout.
2016-11-26 13:55:45 +09:00
John Piasetzki
0ca5c4eeff
Use explicit import for httptools
...
Explicit importing the parser and the exception to save a name lookup.
2016-11-25 15:14:44 -05:00
John Piasetzki
47927608b2
Convert connections dict to set
...
Connections don't need to be a dict since the value is never used
2016-11-25 15:14:19 -05:00
John Piasetzki
13808bf282
Convert server lambda to partial
...
Partials are faster then lambdas for repeated calls.
2016-11-25 15:13:58 -05:00
Anton Zhyrney
c3c7964e2e
pep8 fixes
2016-11-25 09:29:25 +02:00
Anton Zhyrney
fca0221d91
update readme
2016-11-25 09:14:37 +02:00
Anton Zhyrney
9f2d73e2f1
class based views implementation for sanic
2016-11-25 09:10:25 +02:00
Eli Uriegas
fc19f2ea34
Merge pull request #163 from channelcat/request-data-vars
...
Access Request like a dictionary
Closes #129 #132
2016-11-23 13:51:17 -06:00
Eli Uriegas
aa0f15fbb2
Adding a new line
2016-11-23 11:03:00 -06:00
Eli Uriegas
93f50b8ef7
Merge pull request #160 from jiajunhuang/log
...
fix the way using logging.exception
2016-11-21 10:37:10 -06:00
Eli Uriegas
7b85843363
Merge pull request #165 from abhishek7/master
...
Revised error message in server.py (Issue #157 )
2016-11-21 10:17:02 -06:00
abhishek7
f7f578ed44
Fixed Exception error log on line 157 of server.py
2016-11-20 21:37:01 -05:00
Abhishek
de92603ccf
Merge pull request #3 from channelcat/master
...
Updating base fork
2016-11-20 21:28:33 -05:00
Channel Cat
d02fffb6b8
Fixing import of CIMultiDict
2016-11-19 18:41:40 -08:00
Channel Cat
922c96e3c1
Updated test terminology
2016-11-19 18:26:03 -08:00
Channel Cat
993627ec44
Merged with master
2016-11-19 18:21:44 -08:00
Channel Cat
01681599ff
Fixed new test error with aiohttp
2016-11-19 18:13:02 -08:00
Channel Cat
3ce6434532
Fix flake8
2016-11-19 18:04:35 -08:00
Channel Cat
a97e554f8f
Added shared request data
2016-11-19 17:48:28 -08:00
Eli Uriegas
fd5a79a685
Merge pull request #162 from r0fls/ciheaders
...
Update headers to use CIMultiDict instead of dict.
2016-11-19 18:32:26 -06:00
Raphael Deem
635921adc7
Update headers to use CIMultiDict instead of dict
2016-11-19 16:09:38 -08:00
jiajunhuang
9eb4cecbc1
fix the way using logging.exception
2016-11-19 15:19:38 +08:00
Eli Uriegas
879b9a4a15
Merge pull request #159 from r0fls/namedefault
...
provide default app name
2016-11-18 20:47:50 -06:00
Raphael Deem
8be4dc8fb5
update readme example to use default
2016-11-18 17:22:24 -08:00
Raphael Deem
f16ea20de5
provide default app name
2016-11-18 17:16:48 -08:00
Eli Uriegas
c51b14856e
Merge pull request #154 from jackfischer/master
...
Example for using error_handler
2016-11-16 13:03:20 -06:00
Eli Uriegas
88ee71c425
Merge pull request #155 from seemethere/fix_flake8_errors
...
Fix the flake8 error caused by new flake8 version
2016-11-16 12:58:27 -06:00
Eli Uriegas
edb12da154
Fix the flake8 error caused by new flake8 version
2016-11-16 12:55:13 -06:00
Jack Fischer
d9f6846c76
improved default handling
2016-11-16 07:55:54 -05:00
Jack Fischer
9e0747db15
Example for using error_handler
2016-11-15 19:37:40 -05:00
Eli Uriegas
ae3d33ad58
Merge pull request #149 from asvetlov/patch-1
...
aiohttp is slightly faster actually
2016-11-14 10:24:15 -06:00
Manuel Miranda
edb25f799d
Caching example ( #150 )
...
* Caching example using aiocache
* Caching example using aiocache
* Added aiocache to requirements
* Fixed example with newest aiocache
2016-11-13 17:11:31 -06:00
Andrew Svetlov
0822674f70
aiohttp is slightly faster actually
...
Disabling access log increases RPS a lot
2016-11-11 22:36:49 +02:00
Eli Uriegas
49d004736a
Merge pull request #148 from gitter-badger/gitter-badge
...
Add a Gitter chat badge to README.md
2016-11-10 22:12:09 -06:00
The Gitter Badger
695f8733bb
Add Gitter badge
2016-11-11 04:11:07 +00:00
Eli Uriegas
b51af7f4bf
Merge pull request #147 from webtic/master
...
Add the client address to the request header
2016-11-10 15:30:04 -06:00
Eli Uriegas
28ce2447ef
Update variable name
...
Give `ra` a more explicit name
2016-11-10 15:28:16 -06:00
Eli Uriegas
42e3a50274
Merge pull request #145 from pahaz/fix-request-parse-multipart-form
...
Fix request parse multipart form
2016-11-10 09:00:06 -06:00
Paul Jongsma
8ebc92c236
pass flake8 tests
2016-11-10 13:09:37 +01:00
Paul Jongsma
b92e46df40
fix whitespace
2016-11-10 13:06:27 +01:00
Paul Jongsma
be5588d5d8
Add the client address to the request header
2016-11-10 12:53:00 +01:00
Pahaz Blinov
0d9fb2f927
docs(request): return value docstring
2016-11-09 18:04:15 +05:00
Pahaz Blinov
0e9819fba1
fix(request): parse_multipart_form should return RequestParameters
...
I have this code:
```
form = FileForm(request.files)
```
and it raise error because the `request.files` is `dict` but `RequestParameters` is expected =/
2016-11-09 00:36:37 +05:00
Pahaz Blinov
aaee40aabd
Merge pull request #6 from channelcat/master
...
fix(request.py): problem in case of request without content-type head…
2016-11-09 00:30:39 +05:00
Pahaz Blinov
5efe51b661
fix(request.py): problem in case of request without content-type header ( #142 )
...
* fix(request.py): exception if access request.form on GET request
* fix(request): just make a unification (parsed_form and parsed_files) + RFC fixes
parsed_form and parsed_files must be a RequestParameters type in all cases!
2016-11-07 15:27:50 -06:00
Pahaz Blinov
50f63142db
Merge pull request #4 from channelcat/master
...
pull from master
2016-11-06 21:35:20 +05:00
Pahaz Blinov
1b65b2e0c6
fix(blueprints): @middleware IndexError ( #139 )
2016-11-06 10:08:55 -06:00
Manuel Miranda
ce8742c605
Caching example using aiocache ( #140 )
...
* Keep-alive requests stay open if communicating
* time.time faster than loop.time?
* Fix flake8
* Add aiofiles to requirements.txt
* Caching example using aiocache
* Caching example using aiocache
* Added aiocache to requirements
2016-11-06 09:26:15 -06:00
Eli Uriegas
01a013b48a
Merge pull request #141 from seemethere/fix_query_tests
...
Fix value error for query string test
2016-11-05 12:16:13 -06:00
Eli Uriegas
3a2eeb9709
Fix value error for query string test
2016-11-05 13:12:55 -05:00
Eli Uriegas
1271c7d958
Merge pull request #128 from channelcat/keep-alive-timeout-fix
...
Keep alive timeout fix
2016-11-05 12:11:41 -06:00
Eli Uriegas
0032f525ce
Merge pull request #138 from seemethere/add_aiofiles_requirements
...
Add aiofiles to requirements.txt
2016-11-05 12:11:08 -06:00
Eli Uriegas
df2f91b82f
Add aiofiles to requirements.txt
2016-11-03 09:35:14 -05:00
Eli Uriegas
3a1ef6bef2
Merge pull request #125 from clenimar/fix-comments
...
Fix comments over-indentation
2016-11-03 08:27:39 -06:00
Eli Uriegas
28488075b9
Merge pull request #137 from imbolc/upload-without-content-type
...
Fix upload without content-type
2016-11-03 08:26:05 -06:00
imbolc
3cd3b2d9b7
Fix upload without content-type
2016-11-03 12:34:55 +07:00
Channel Cat
3d88818841
Merge pull request #135 from Sharpek/master
...
Add loop kwargs to sanic_endpoint_test
2016-11-02 21:37:52 -07:00
Channel Cat
b74cf65eca
Merge pull request #134 from RyanKung/patch-1
...
Update README.md
2016-11-02 21:28:36 -07:00
Marcin Baran
80fcacaf8b
Add loop kwargs to sanic_endpoint_test
2016-11-02 12:27:58 +01:00
Ryan Kung
96fcd8443f
Update README.md
...
via flake8
2016-11-01 14:35:06 +08:00
Channel Cat
707c55fbe7
Fix flake8
2016-10-28 03:35:30 -07:00
Channel Cat
c44b5551bc
time.time faster than loop.time?
2016-10-28 03:13:03 -07:00
Channel Cat
bd28da0abc
Keep-alive requests stay open if communicating
2016-10-28 02:56:32 -07:00
Abhishek
410299f5a1
Merge pull request #2 from channelcat/master
...
Updates from Oct 17th
2016-10-27 20:06:56 -04:00
Clenimar Filemon
f3fc958a0c
Fix comments over-indentation
2016-10-27 11:09:36 -03:00
Channel Cat
47b417db28
Merge pull request #119 from jackfischer/master
...
Add example with async http requests (Issue #96 )
2016-10-26 22:43:01 -07:00
Jack Fischer
5171cdd305
add example with async http requests
2016-10-26 16:53:34 -04:00
Channel Cat
65950250d9
Merge pull request #111 from channelcat/reverse-static
...
Reverse static arguments
2016-10-25 02:52:21 -07:00
Channel Cat
74ae0007d3
Reverse static arguments
2016-10-25 02:45:28 -07:00
Channel Cat
977081f4af
Merge pull request #110 from channelcat/cookies-lazy-creation
...
Lazy cookie creation
2016-10-25 01:50:33 -07:00
Channel Cat
ee70f1e55e
Upped to version 0.1.6
2016-10-25 01:49:43 -07:00
Channel Cat
9c16f6dbea
Fix flake8 issues
2016-10-25 01:36:12 -07:00
Channel Cat
c50aa34dd9
Lazy cookie creation
2016-10-25 01:27:54 -07:00
Channel Cat
0e479d53da
Merge pull request #104 from channelcat/pr/101
...
Static file support
2016-10-24 22:42:01 -07:00
Channel Cat
984c086296
Merge pull request #105 from channelcat/blueprint-ordering
...
Added blueprint order test and used deques to add blueprints
2016-10-24 02:45:31 -07:00
Channel Cat
53e00b2b4c
Added blueprint order test and used deques to add blueprints
2016-10-24 02:09:07 -07:00
Channel Cat
bb1cb29edd
Merge pull request #103 from pcdinh/master
...
Made Pylint happy: clean up some unused variables
2016-10-24 01:22:06 -07:00
Channel Cat
bf6879e46f
Made static file serving part of Sanic
...
Added sanic.static, blueprint.static, documentation, and testing
2016-10-24 01:21:06 -07:00
Channel Cat
12e900e8f9
Merge pull request #100 from chhsiao90/test-router
...
Add test for method not allow situation
2016-10-23 21:15:31 -07:00
imbolc
d7fff12b71
Static middleware
2016-10-24 02:17:03 +07:00
chhsiao90
9051e985a0
Add test for method not allow situation
2016-10-23 21:58:57 +08:00
pcdinh
5361c6f243
e is an unused variable. Safe to remove
2016-10-23 19:38:28 +07:00
pcdinh
963aef19e0
w is unused variable to it is safe to suppress Pylint warning using _
...
(underscore)
2016-10-23 19:36:08 +07:00
Abhishek
f95fe4192b
Merge pull request #1 from channelcat/master
...
Updating the fork
2016-10-17 19:36:13 -04:00