Commit Graph

489 Commits

Author SHA1 Message Date
Tom Christie 01f70bb394
Merge pull request #521 from koddr/patch-2
Add new Starlette logo to Docs
2019-05-21 09:44:30 +01:00
Vic Shóstak ed3d4a3d0e Update logo <img> with new logo 2019-05-20 22:02:32 +03:00
Vic Shóstak f0f33ad306 Update starlette.png 2019-05-20 21:55:50 +03:00
Tom Christie ab86530edd
Merge pull request #513 from blueyed/unused-cookie
CORS: preflight_response: cookie is not used here
2019-05-20 16:15:30 +01:00
Tom Christie 86b1342de4
Merge pull request #518 from ekohl/patch-1
Fix typo in api schema generation example
2019-05-20 16:03:54 +01:00
Tom Christie 4635b6c228
Update setup.py
Closes #520
2019-05-20 15:57:51 +01:00
Vic Shóstak ea2886093d
Add new Starlette logo 2019-05-20 17:53:52 +03:00
Tom Christie 2f6aeb30e4
Merge pull request #506 from blueyed/doc-fix
docs/config.md: fix DatabaseURL usage
2019-05-20 15:29:38 +01:00
Ewoud Kohl van Wijngaarden c121cb2c40
Fix typo in api schema generation example 2019-05-17 15:44:32 +00:00
Tom Christie 556a8a0a18
Merge pull request #455 from uranusjr/add-py-typed
Add py.typed to package
2019-05-13 16:18:29 +01:00
Daniel Hahler a82ef76746 CORS: preflight_response: cookie is not used here
Ref: https://github.com/encode/starlette/issues/510#issuecomment-491836700
2019-05-13 16:25:16 +02:00
Tom Christie a13ddbdde6
Merge pull request #508 from jodal/patch-1
docs: Add missing import
2019-05-13 15:24:57 +01:00
Tom Christie 29584e25fc
Fix CORS allowed origins (#511)
* Add test to expose CORSMiddleware.simple_headers access-control-allow-origin leak between requests

* Fix CORSMiddleware.simple_response to use self.simple_headers default before mutating headers based on request parameters

* lint: forgot to run black locally
2019-05-13 15:24:28 +01:00
Daniel Hahler e0e2621add flake8 fixes (#512) 2019-05-13 15:22:59 +01:00
秋葉 7eb0e4e594 fix NotImplementedError (#509) 2019-05-13 14:54:46 +01:00
Steinn Eldjárn Sigurðarson d6830cacca lint: forgot to run black locally 2019-05-13 12:09:42 +00:00
Steinn Eldjárn Sigurðarson 5f21c39c1c Fix CORSMiddleware.simple_response to use self.simple_headers default before mutating headers based on request parameters 2019-05-13 10:26:27 +00:00
Steinn Eldjárn Sigurðarson e0c383aa1b Add test to expose CORSMiddleware.simple_headers access-control-allow-origin leak between requests 2019-05-13 10:25:51 +00:00
Stein Magnus Jodal 0156ff3926
docs: Add missing import 2019-05-12 11:14:14 +02:00
Daniel Hahler eaa199be38 docs/config.md: fix DatabaseURL usage 2019-05-11 01:40:43 +02:00
Daniel Hahler d23bfd0d8f Fix typo in method name: generate_frame_html (#490) 2019-04-24 22:25:44 +01:00
Tom Christie 2d88c4cd29
Update config.md 2019-04-17 17:26:12 +01:00
Tom Christie 43c553bc4e
Update third-party-packages.md 2019-04-10 14:19:25 +02:00
Daniel Hahler f661aead04 ci: Travis: sudo is deprecated (#475) 2019-04-10 14:18:28 +02:00
Daniel Hahler 60c0be1e50 doc: fix middleware (#471) 2019-04-10 14:14:24 +02:00
David Baumgold e37ec7e561 GitHub has a capital H (#478) 2019-04-10 14:07:17 +02:00
Tzu-ping Chung e30c95d84c Add zip_safe=False in setup.py 2019-04-09 23:01:54 +08:00
Tzu-ping Chung 4929f98d96 Add py.typed to package
This package would be installed along with the package (since it is
listed in package_data), to let mypy pick up type hints in the package
source.
2019-04-09 23:01:54 +08:00
Eugene Molotov 115fc2f73a Corrects usage of CommaSeparatedStrings in docs (#467) 2019-04-08 14:48:15 +01:00
Steinn Eldjárn Sigurðarson fb616ddf9e Adding a section on timing-asgi to 3rd party middleware (#465) 2019-04-05 11:59:22 +01:00
Tom Christie 7414099e65
Make StreamingResponse compatible with normal iterators (#462)
* Add concurrency.iterator_to_async, tests and docs

* Make StreamingResponse compatible with normal iterators

* Format and typo in docs

* Rename helper function to iterate_in_threadpool

* Version 0.12.0.b3
2019-04-03 10:29:00 +01:00
Tom Christie e69c26e5dd Version 0.12.0.b2 2019-04-02 11:01:09 +01:00
Patryk Zawadzki 3226c7c6f4 Don't block the event loop in WebSocketTestSession (#459)
It's typical for event-loop-based servers to try to do a blocking
receive in a while loop. Queue.get() is blocking in a synchronous
way and it does not yield control back to the asyncio executor.
Let's explicitly yield control until the queue is no longer empty.
2019-04-02 10:52:08 +01:00
Phil Jones 77b84a08c1 Remove warning about lifespan events (#451)
It is no longer new, and Hypercorn also supports it.
2019-03-27 22:14:13 +00:00
Alex Oleshkevich 1d42dd8b59 Replace mutable "allowed_hosts" argument of TrustedHostMiddleware with None (#448)
* Replace mutable "allowed_hosts" argument of starlette.middleware.trustedhost.TrustedHostMiddleware with None.

* Add unit test to cover case when TrustedHostMiddleware.allowed_hosts is None

* Fix style issues

* Code style fixes

* Fix unit tests for TrustedHostMiddleware
2019-03-27 09:23:07 +00:00
Konstantin Chernyshkov 9ba2ba624b 🐛 Adding a percent sign to redirect with quoted params (#449) 2019-03-26 14:19:32 +00:00
Tom Christie 60a71ef1d8 Version 0.12.0b1 2019-03-20 10:34:22 +00:00
Tom Christie 9de146c449
Add `StaticFiles(html=True)` (#443)
Add StaticFiles(html=True)
2019-03-20 10:18:24 +00:00
Tom Christie 4d5708e468
ASGI 3 (#435)
* TestClient supports ASGI2 and ASGI3

* Starlette instances present ASGI3 interface

* ServerErrorMiddleware presents ASGI3 interface

* Use ASGI3 protocol throughout

* Response signatures match ASGI interface.
2019-03-19 16:03:19 +00:00
Mostafa Aitbrahim 9530470c59 Fix README.md (#438) 2019-03-19 09:17:39 +00:00
Tom Christie f29d49b583 Version 0.11.4 2019-03-18 08:55:59 +00:00
Tom Christie 5d0075736f
Fix for Mount('/', ...) (#439)
* Fix for Mount('/', ...)

* Linting
2019-03-18 08:55:20 +00:00
Tom Christie cfe3d75cd3
Populate SCRIPT_NAME in WSGIMiddleware (#434) 2019-03-11 14:41:22 +00:00
Tom Christie 9016e634d4 Docs tweaks 2019-03-11 14:35:30 +00:00
Daniel Hahler 3eb2b13ab0 config: cast=bool: handle "0" and "1" as False/True (#429)
* config: cast=bool: handle "0" and "1" as False/True
* tests: use monkeypatch.setenv
2019-03-08 19:28:08 +00:00
Daniel Hahler ed1cc13200 reqs: minor cleanup (#422)
* reqs: minor cleanup

- codecov is only required on CI/Travis, install it there then.
- databases is a requirement for testing.

* setup.py: remove sqlalchemy from (full) reqs

- it is only used for tests
- databases requires it already
2019-03-06 20:30:16 +00:00
Daniel Hahler f2bf332490 Starlette.__init__: remove template_directory arg (#421)
This appears to be unused since 37ee43e.
2019-03-06 20:11:09 +00:00
Sebastián Ramírez 8f138ce922 Add documentation for UploadFile class in the Request section (#418)
* Add documentation for UploadFile class in Request section

* Implement changes requested in code review

* Simplify upload file reading example
2019-03-04 19:25:03 +00:00
Ahti Kitsik 47207129ec Doc hint about enabling code reload support (#417) 2019-03-04 15:01:16 +00:00
Tom Christie 09fc598288
Staticfiles packages (#415)
* Support StaticFiles(packages=[...])

* Add StaticFiles(packages=...) support

* Add StaticFiles(packages=...) support
2019-02-26 14:38:05 +00:00