Commit Graph

2428 Commits

Author SHA1 Message Date
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