]>
git.ipfire.org Git - thirdparty/starlette.git/log
Tom Christie [Thu, 23 Apr 2020 15:13:33 +0000 (16:13 +0100)]
Delete .codecov.yml
Tom Christie [Thu, 23 Apr 2020 15:10:50 +0000 (16:10 +0100)]
Update index.md
Tom Christie [Thu, 23 Apr 2020 15:10:29 +0000 (16:10 +0100)]
Update README.md
Tom Christie [Thu, 23 Apr 2020 15:09:14 +0000 (16:09 +0100)]
Update index.md
Tom Christie [Thu, 23 Apr 2020 15:07:13 +0000 (16:07 +0100)]
Update README.md
Tom Christie [Thu, 23 Apr 2020 15:05:05 +0000 (16:05 +0100)]
github-actions-for-ci (#911)
Erik [Thu, 23 Apr 2020 08:32:45 +0000 (01:32 -0700)]
Switch to a more lenient cookie parsing method (#900)
* ADd failing test representing cookie parsing failing
* Add tests inspired by tornado test suite
* Modify requests.cookies to utilize new cookie parsing strategy
Derek Bekoe [Wed, 22 Apr 2020 10:42:14 +0000 (03:42 -0700)]
Docs: Update middleware.md - CORS max_age 600 (#909)
Update max_age documentation from 60 to the actual default value of 600.
https://github.com/encode/starlette/blob/master/starlette/middleware/cors.py#L23
Jamie Hewland [Tue, 21 Apr 2020 18:24:55 +0000 (20:24 +0200)]
Add a UUID convertor (#903)
* Implement UUID path param converter
* Add the uuid convertor to the docs
Tom Christie [Wed, 15 Apr 2020 11:20:51 +0000 (12:20 +0100)]
Version 0.13.3 (#899)
* Version 0.13.3
* Linting
Chris Withers [Wed, 15 Apr 2020 08:46:46 +0000 (10:46 +0200)]
allow exceptions in middleware to surface when using TestClient (#888)
Tony Benoy [Tue, 14 Apr 2020 09:23:46 +0000 (14:53 +0530)]
MANIFEST.ini (#895)
* MANIFEST.ini
* added excludes
* Update MANIFEST.in
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Fri, 27 Mar 2020 17:51:54 +0000 (17:51 +0000)]
Merge pull request #881 from florimondmanca/fix-cors
Fix safelisted CORS headers implementation
florimondmanca [Fri, 27 Mar 2020 17:14:05 +0000 (18:14 +0100)]
Fix safelisted CORS headers implementation
Tom Christie [Fri, 27 Mar 2020 16:51:09 +0000 (16:51 +0000)]
Update cors.py
Tom Christie [Fri, 27 Mar 2020 15:51:41 +0000 (15:51 +0000)]
Merge pull request #880 from vgerak/master
Add safelisted request headers to CORSMiddleware
Vasilis Gerakaris [Fri, 27 Mar 2020 15:02:28 +0000 (17:02 +0200)]
Add safelisted request headers to CORSMiddleware
See https://fetch.spec.whatwg.org/#cors-safelisted-request-header
Tom Christie [Thu, 26 Mar 2020 13:51:34 +0000 (13:51 +0000)]
Delete CONTRIBUTING.md
George Bogodukhov [Sat, 21 Mar 2020 08:56:02 +0000 (19:26 +1030)]
Merge pull request #867 from aviramha/master
Ignore malformed cookie
Aviram Hassan [Wed, 18 Mar 2020 08:33:30 +0000 (10:33 +0200)]
Update tests/test_requests.py
@florimondmanca better test
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Aviram Hassan [Wed, 18 Mar 2020 07:41:08 +0000 (09:41 +0200)]
ignore malformed cookie instead of raising an exception
Tom Christie [Mon, 16 Mar 2020 11:17:18 +0000 (11:17 +0000)]
More detail on how to use convertors (#862)
It wasn't immediately clear to me how to use them.
Simon Willison [Sun, 15 Mar 2020 00:51:50 +0000 (17:51 -0700)]
More detail on how to use convertors
It wasn't immediately clear to me how to use them.
ppd0705 [Tue, 10 Mar 2020 09:24:12 +0000 (17:24 +0800)]
Fix middleware repr (#858)
* Fix middleware repr
* Fix middleware base test
Aaron Mangum [Wed, 4 Mar 2020 11:07:54 +0000 (03:07 -0800)]
fix mypy failing with Mount and routes parameter (#853)
Currently, mypy fails with the following error when Starlette is initialized with a mount in routes.
```
app = Starlette(
routes=[
Mount('api', routes=routes)
]
)
```
mypy fails with the following:
```
app/main.py:24: error: Argument "routes" to "Mount" has incompatible type "List[Route]"; expected "Optional[List[BaseRoute]]"
app/main.py:24: note: "List" is invariant -- see http://mypy.readthedocs.io/en/latest/common_issues.html#variance
app/main.py:24: note: Consider using "Sequence" instead, which is covariant
```
This change also brings `Mount` types into alignment with `Router`
sysid [Mon, 2 Mar 2020 10:12:37 +0000 (11:12 +0100)]
feat: documentation for 3rd party response types: SSEResponse (#852)
Kamforka [Wed, 26 Feb 2020 13:15:47 +0000 (14:15 +0100)]
Add listener task to cancel streaming response in case of an early disconnect (#839)
* Add listener task to cancel streaming response in case of an early disconnect
* Use run_until_first_complete instead of custom wait
* Remove unused import
Jeff Astor [Tue, 25 Feb 2020 15:11:38 +0000 (10:11 -0500)]
Friendly spellcheck in convertor assertion (#845)
Daniel Hedrén [Tue, 25 Feb 2020 12:27:15 +0000 (13:27 +0100)]
SameSite support for cookies (#732)
* Add samesite support to cookies
* Cleanup
Remove unnecessary import and str()
* SameSite "lax" default, enforce valid options
* Update signature
Alessandro Ogier [Thu, 20 Feb 2020 21:43:37 +0000 (22:43 +0100)]
adding authlib middleware (#841)
Tom Christie [Thu, 20 Feb 2020 15:43:03 +0000 (15:43 +0000)]
Websocket iter (#838)
* Add iter_text, iter_bytes, iter_json to WebSocket
* Add run_until_first_complete for weksocket sender/receiver branching
Tom Christie [Thu, 20 Feb 2020 13:03:20 +0000 (13:03 +0000)]
Add iter_text, iter_bytes, iter_json to WebSocket (#837)
Tom Christie [Wed, 19 Feb 2020 10:37:43 +0000 (10:37 +0000)]
Add chat to docs (#834)
Colin Bounouar [Wed, 19 Feb 2020 10:37:21 +0000 (11:37 +0100)]
Ensure pyyaml is installed before actually using it (#833)
* Ensure pyyaml is installed before actually using it
* Remove assertion raising test case
Colin Bounouar [Wed, 19 Feb 2020 09:53:11 +0000 (10:53 +0100)]
Link to black GitHub repository (#832)
Eugene Molotov [Mon, 17 Feb 2020 14:14:30 +0000 (19:14 +0500)]
Allow non latin-1 filename in FileResponse (#792)
Yang Keming [Fri, 14 Feb 2020 09:18:42 +0000 (17:18 +0800)]
fix doc: endpoint websocket example (#827)
retnikt [Tue, 11 Feb 2020 09:36:29 +0000 (09:36 +0000)]
More debugger improvements (#825)
* HTML-escape everything in the debugger
There isn't much of an attack surface here given the debugger should never be
exposed in production and most of these things are not user-controllable (in
fact you'd have to try hard to get `<script>` in a Python identifier), but
escaping them is still important in case they mess up debugger output (see #599,
#601), and it's also just good practice.
* monospace debugger content and clean up styles
Bo Huang [Mon, 10 Feb 2020 14:53:22 +0000 (09:53 -0500)]
Allow callable functions to be passed into the config's casting (#530)
parameter
retnikt [Mon, 10 Feb 2020 12:25:05 +0000 (12:25 +0000)]
fix naive debugger line numbers in ServerErrorMiddleware (#821)
Previously the error middleware in debug mode would naively calculate the line
numbers without knowledge of the position in the file. This meant that if the
exception occurred near the top or bottom of the file, the line numbers and
the highlighted line would be incorrect. The named tuple returned by
`inspect.getinnerframes` contains an `index` field which is not naive and will
result in correct line numbers. This change also simplifies the code somewhat
Daniel [Tue, 4 Feb 2020 14:14:53 +0000 (15:14 +0100)]
Fix typo (#816)
Tom Christie [Thu, 30 Jan 2020 11:40:55 +0000 (11:40 +0000)]
Version 0.13.1 (#815)
Jorge Leitao [Wed, 29 Jan 2020 15:51:25 +0000 (16:51 +0100)]
Added 3rd party package. (#768)
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Wed, 29 Jan 2020 11:15:38 +0000 (11:15 +0000)]
WSGI middleware should lowercase ASGI headers (#813)
Tom Christie [Wed, 29 Jan 2020 09:48:35 +0000 (09:48 +0000)]
Fix slash redirects (#812)
* Fix for slash redirects
* Drop extranous 'type: ignore'
* Drop print() statement
* Add type: ignore on optional imports
Bekhzod Tillakhanov [Thu, 23 Jan 2020 09:24:39 +0000 (14:24 +0500)]
docs(database): change gino homepage url (#808)
Change homepage url gino from `https://python-gino.readthedocs.io/en/latest/` to `https://python-gino.org/`
Joseph Buckley [Wed, 15 Jan 2020 10:55:10 +0000 (02:55 -0800)]
Security patch: Updating CORS origin regex to use a full regex match (#801)
* Updating CORS origin regex to use a full regex match
* Reformatting unittest based on linting
Vlad Dmitrievich [Thu, 9 Jan 2020 15:11:28 +0000 (17:11 +0200)]
typo in configuration docs (#789)
Daniel Hahler [Tue, 7 Jan 2020 14:00:10 +0000 (15:00 +0100)]
typing: remove unused "type: ignore" comments (#779)
* typing: remove unused "type: ignore" comments
Found via:
> mypy --warn-unused-ignores --ignore-missing-imports starlette
Using:
> mypy 0.770+dev.
cdd91ba819646b0138b05a8e9180faba4ef0ff92 .dirty
* fixup! typing: remove unused "type: ignore" comments
Daniel Hahler [Tue, 7 Jan 2020 09:40:30 +0000 (10:40 +0100)]
ci: Travis: use py38 (#781)
Yang Keming [Mon, 6 Jan 2020 10:48:20 +0000 (18:48 +0800)]
update 3rd packages: add spectree (#783)
Tomasz Wójcik [Sun, 29 Dec 2019 15:11:12 +0000 (16:11 +0100)]
add starlette-context to 'third party packages' docs (encode#420) (#770)
Emil Stenström [Sat, 21 Dec 2019 21:49:27 +0000 (22:49 +0100)]
Add space so example is copy-pastable (#766)
Tom Christie [Tue, 17 Dec 2019 11:14:57 +0000 (11:14 +0000)]
Ignore gnarly type check in WSGI implementation (#756)
* Ignore gnarly type check in WSGI implementation
* Linting
Trim21 [Tue, 17 Dec 2019 09:57:02 +0000 (17:57 +0800)]
support Path in Config (#755)
* support Path in Config
* fix broken tests
podhmo [Mon, 16 Dec 2019 16:58:33 +0000 (01:58 +0900)]
add import Route (#752)
Eneko Illarramendi [Tue, 10 Dec 2019 14:58:44 +0000 (15:58 +0100)]
Document custom filters for Jinja2 (#737)
Tom Christie [Mon, 25 Nov 2019 09:13:12 +0000 (09:13 +0000)]
Update database.md
Tom Christie [Fri, 22 Nov 2019 11:28:12 +0000 (11:28 +0000)]
Update routing.md
Fulvio Esposito [Fri, 22 Nov 2019 11:26:14 +0000 (12:26 +0100)]
Drop double square brackets tests in install script (#718)
sh doesn't support double square brackets tests which are a bash feature.
This commit replace them with single square brackets tests
Jake Howard [Fri, 22 Nov 2019 11:22:15 +0000 (11:22 +0000)]
Show nicer warning when `ujson` isn't installed (#728)
Tom Christie [Wed, 20 Nov 2019 15:10:15 +0000 (15:10 +0000)]
Tweak app signatures (#723)
Florian Apolloner [Fri, 15 Nov 2019 12:06:59 +0000 (13:06 +0100)]
Added support for publishing wheel files. Fixes #668 (#719)
Jeff Triplett [Wed, 13 Nov 2019 18:56:47 +0000 (12:56 -0600)]
:pencil: Fixes example typo in README (#717)
Thanks!
Tom Christie [Wed, 13 Nov 2019 12:27:50 +0000 (12:27 +0000)]
Version 0.13.0
Tom Christie [Wed, 13 Nov 2019 12:25:18 +0000 (12:25 +0000)]
Version 0.13 (#704)
* Version 0.13
* Fix misnamed requirement
* Updating routing docs
* Update routing docs
* Update docs
* Simpler Middleware signature
* Update middleware docs
* Update exception docs
* Allow 'None' in middleware lists, for easy disabling of middleware.
* Update README
Adam Johnson [Tue, 12 Nov 2019 13:47:35 +0000 (13:47 +0000)]
List Scout APM as a third party package (#710)
Hsiaoming Yang [Tue, 12 Nov 2019 13:43:15 +0000 (22:43 +0900)]
Add Authlib into third party packages. (#712)
Grégoire Détrez [Thu, 7 Nov 2019 15:18:50 +0000 (16:18 +0100)]
Fix a small typo in CORS middleware documentation (#708)
Tom Christie [Wed, 6 Nov 2019 21:16:41 +0000 (21:16 +0000)]
Handle trailing slash redirects properly. (#707)
* Handle trailing slash redirects properly.
Currently we have behavior so that if:
* A `/some-path/`route exists.
* A `/some-path` route does not exist.
Then if a request to `/some-path` is made, we'll redirect to the trailing slash case.
We ought to also handle the converse case, so that if...
* A `/some-path`route exists.
* A `/some-path/` route does not exist.
Then if a request to `/some-path/` is made, we'll redirect to the no trailing slash case.
Closes #633
* Update routing.py
* Update routing.py
Tom Christie [Wed, 6 Nov 2019 20:57:00 +0000 (20:57 +0000)]
Strip whitespace on response headers (#706)
Strip leading/trailing whitespace on response headers.
Closes #664
Tom Christie [Wed, 6 Nov 2019 10:44:00 +0000 (10:44 +0000)]
Update release-notes.md
Florimond Manca [Tue, 5 Nov 2019 16:12:53 +0000 (17:12 +0100)]
Remove Bocadillo from third party packages (#684)
Tom Christie [Mon, 4 Nov 2019 15:08:53 +0000 (15:08 +0000)]
Version 0.12.13
Tom Christie [Mon, 4 Nov 2019 15:08:24 +0000 (15:08 +0000)]
Support app configuration on initialization. (#702)
* Add on-app-init middleware definitions
* Support on_startup, on_shutdown args
Tom Christie [Fri, 1 Nov 2019 15:30:20 +0000 (15:30 +0000)]
Version 0.12.12
Tom Christie [Fri, 1 Nov 2019 15:19:07 +0000 (15:19 +0000)]
Fix url_for with double mounts (#701)
Tom Christie [Fri, 1 Nov 2019 14:13:11 +0000 (14:13 +0000)]
Version 0.12.11
Tom Christie [Fri, 1 Nov 2019 14:11:00 +0000 (14:11 +0000)]
Include 'root_path' when returning URLs from request.url_for (#699)
* Include 'root_path' when returning URLs from request.url_for
* Preserve root_path for mounted apps
Tom Christie [Fri, 1 Nov 2019 13:27:42 +0000 (13:27 +0000)]
Resolve latest mypy issues (#700)
* Resolve latest mypy issues
* Linting
Daniel Hahler [Tue, 15 Oct 2019 14:18:44 +0000 (16:18 +0200)]
tests: minor: use "test_" prefix (#636)
The test was run previously, but this is clearer.
Tom Christie [Tue, 15 Oct 2019 12:44:00 +0000 (13:44 +0100)]
Version 0.12.10
Aaron Gunderson [Tue, 15 Oct 2019 12:43:33 +0000 (08:43 -0400)]
[docs] update RedirectResponse status code (#634)
The redirect response changed the status code it returns by default but the docs were not updated to reflect the change. Small fix to keep up to date.
https://github.com/encode/starlette/commit/
3f702238247c99089eac76880965b32bd050f3cb
Josha Inglis [Tue, 15 Oct 2019 12:41:35 +0000 (23:41 +1100)]
don't return "error" in graphql response when no error occurs (#623)
Fixes #622
Signed-off-by: Josha Inglis <joshainglis@gmail.com>
Mantas Zimnickas [Tue, 15 Oct 2019 12:40:56 +0000 (15:40 +0300)]
Update docs about html mode for static files (#624)
nwalsh1995 [Tue, 15 Oct 2019 12:40:30 +0000 (05:40 -0700)]
fix typo (#621)
Ashin Abraham [Tue, 15 Oct 2019 12:39:56 +0000 (18:09 +0530)]
Added Documentation For Bugsnag Integration in Starlette (#638)
Igor Nehoroshev [Tue, 15 Oct 2019 12:35:53 +0000 (15:35 +0300)]
Add link to EarlyDataMiddleware (#666)
Igor Nehoroshev [Tue, 15 Oct 2019 12:35:37 +0000 (15:35 +0300)]
Fix __init__ code in custom HTTP middleware example (#665)
Daniel Hahler [Tue, 15 Oct 2019 12:34:49 +0000 (14:34 +0200)]
Add HTTPException.__repr__ (#628)
Dušan Josipović [Tue, 15 Oct 2019 12:33:51 +0000 (14:33 +0200)]
Enable flag parameters (#672)
* Enable flag parameters
* Add tests for blank query param
George Bogodukhov [Mon, 14 Oct 2019 09:49:42 +0000 (20:19 +1030)]
Merge pull request #674 from dmontagu/run_in_threadpool-type-hint
Add type hint for run_in_threadpool return type
David Montague [Mon, 14 Oct 2019 09:34:51 +0000 (02:34 -0700)]
Add type hint for run_in_threadpool return type
George Bogodukhov [Mon, 14 Oct 2019 09:20:05 +0000 (19:50 +1030)]
Merge pull request #673 from dmontagu/patch-6
Update datastructures.py
dmontagu [Mon, 14 Oct 2019 08:08:21 +0000 (01:08 -0700)]
Update datastructures.py
Fix assert error message in `URL.__init__`
Igor Nehoroshev [Thu, 10 Oct 2019 09:07:30 +0000 (12:07 +0300)]
Add 425 Too Early status code (#660)
Tom Christie [Wed, 2 Oct 2019 11:57:40 +0000 (12:57 +0100)]
Merge pull request #653 from dmontagu/large-body-perf
Performantly build large request bodies
David Montague [Wed, 2 Oct 2019 07:12:34 +0000 (00:12 -0700)]
Update for new mypy
David Montague [Wed, 2 Oct 2019 06:53:59 +0000 (23:53 -0700)]
Performantly build the request body
Tom Christie [Wed, 4 Sep 2019 08:36:35 +0000 (09:36 +0100)]
Merge pull request #620 from elyobo/document-request-app-prop
Document the `request.app` property.