]> git.ipfire.org Git - thirdparty/starlette.git/log
thirdparty/starlette.git
3 years agoBump black from 21.12b0 to 22.1.0 (#1468)
dependabot[bot] [Tue, 1 Feb 2022 19:06:00 +0000 (20:06 +0100)] 
Bump black from 21.12b0 to 22.1.0 (#1468)

Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits/22.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoMake error handler run always (#761)
Aviram Hassan [Tue, 1 Feb 2022 14:08:24 +0000 (16:08 +0200)] 
Make error handler run always (#761)

* Error handler call always

* Add tests

* Add docs

* Only run response callable if response didn't start

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agofix handling of scope's client in Request (#1462)
Adrian Garcia Badaracco [Tue, 1 Feb 2022 11:55:35 +0000 (05:55 -0600)] 
fix handling of scope's client in Request (#1462)

3 years agoRemove manual contextvar copy logic (#1421)
Marcelo Trylesinski [Mon, 31 Jan 2022 23:18:13 +0000 (00:18 +0100)] 
Remove manual contextvar copy logic (#1421)

* Remove manual contextvar copy logic

* Add test

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
3 years agoAdded AnyIO classifier (#1461)
Alex Grönholm [Mon, 31 Jan 2022 23:15:36 +0000 (01:15 +0200)] 
Added AnyIO classifier (#1461)

3 years agoPrevent BaseHTTPMiddleware from hiding errors of StreamingResponse (#1459)
Oleksandr Fedorov [Mon, 31 Jan 2022 10:12:15 +0000 (12:12 +0200)] 
Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse (#1459)

* Prevent BaseHTTPMiddleware from hiding errors of StreamingResponse

* Apply notes from PR:

* remove `nonlocal app_exc`;
* add extra test.

* Fix formatting

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agouse explicit Optional[...] for parameters with None as a default in datastructures...
Adrian Garcia Badaracco [Mon, 31 Jan 2022 09:35:58 +0000 (03:35 -0600)] 
use explicit Optional[...] for parameters with None as a default in datastructures.py (#1448)

* use explicit Optional[...] for paramters with None as a default

See https://www.python.org/dev/peps/pep-0484/\#id29

* fix type annotations for scope

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd `raw_path` to `TestClient` scope (#1445)
Marcelo Trylesinski [Mon, 31 Jan 2022 09:31:40 +0000 (10:31 +0100)] 
Add `raw_path` to `TestClient` scope (#1445)

* Add "raw_path" to TestClient request scope

* Return raw_path as byte string

According to ASGI spec [0], connection scope's `raw_path` should be a
byte string.

[0] https://asgi.readthedocs.io/en/latest/specs/www.html#connection-scope

Co-authored-by: Justas Trimailovas <j.trimailovas@gmail.com>
3 years agoMake base convertors.Convertor generic and annotate its subclasses (#1451)
Libor Martínek [Sun, 30 Jan 2022 11:55:31 +0000 (12:55 +0100)] 
Make base convertors.Convertor generic and annotate its subclasses (#1451)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agouse typing.NamedTuple for Address (#1447)
Adrian Garcia Badaracco [Sun, 30 Jan 2022 00:58:05 +0000 (18:58 -0600)] 
use typing.NamedTuple for Address (#1447)

3 years agoAdd custom URL convertor register (#1437)
Marcelo Trylesinski [Fri, 28 Jan 2022 16:48:22 +0000 (17:48 +0100)] 
Add custom URL convertor register (#1437)

* Add register that allows custom URL convertors

* Add tests

* Simplify tests and refresh CONTENT_TYPES

* Add docs

* Simplify datetime import

* Ups

* Fix remove last dt

3 years agouse typing.Mapping for Response.headers (#1426)
Cyril Jouve [Thu, 27 Jan 2022 00:15:19 +0000 (01:15 +0100)] 
use typing.Mapping for Response.headers (#1426)

3 years agoMake `content` argument required to `JSONResponse` (#1431)
Amin Alaee [Wed, 26 Jan 2022 16:11:33 +0000 (17:11 +0100)] 
Make `content` argument required to `JSONResponse` (#1431)

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoadd Allow header to 405 responses as required by RFC 7231 (#1436)
Adrian Garcia Badaracco [Wed, 26 Jan 2022 16:02:25 +0000 (10:02 -0600)] 
add Allow header to 405 responses as required by RFC 7231 (#1436)

3 years agoAdd `headers` parameter to `HTTPException` (#1435)
Marcelo Trylesinski [Wed, 26 Jan 2022 15:06:15 +0000 (16:06 +0100)] 
Add `headers` parameter to `HTTPException` (#1435)

* Add `headers` parameter to `HTTPException`

* Update exceptions docs

3 years agoFix typo in docs/testclient.md (#1429)
Sebastian Marines [Wed, 26 Jan 2022 10:34:25 +0000 (04:34 -0600)] 
Fix typo in docs/testclient.md (#1429)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd test case for `HTTPException` when status code is 204 (#1432)
Marcelo Trylesinski [Wed, 26 Jan 2022 09:49:30 +0000 (10:49 +0100)] 
Add test case for `HTTPException` when status code is 204 (#1432)

3 years agofeat: add type annotation to Request.path_params (#1404)
Adrian Garcia Badaracco [Tue, 25 Jan 2022 13:44:39 +0000 (07:44 -0600)] 
feat: add type annotation to Request.path_params (#1404)

3 years agoUpdate publish.yml (#1430)
Tom Christie [Mon, 24 Jan 2022 15:58:07 +0000 (15:58 +0000)] 
Update publish.yml (#1430)

3 years agoVersion 0.18.0 (#1380) 0.18.0
Marcelo Trylesinski [Sun, 23 Jan 2022 11:10:50 +0000 (12:10 +0100)] 
Version 0.18.0 (#1380)

* Version 0.18.0

* Add changes until 14 jan

* Update release-notes.md

* Update release-notes.md

* Update release-notes.md

* Update release-notes.md

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
3 years agoAdd reason to WebSocket closure (#1417)
Amin Alaee [Sat, 22 Jan 2022 16:11:32 +0000 (17:11 +0100)] 
Add reason to WebSocket closure (#1417)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoDefault WebSocket accept message headers to an empty list (#1422)
Roman Vlasenko [Sat, 22 Jan 2022 14:09:18 +0000 (17:09 +0300)] 
Default WebSocket accept message headers to an empty list (#1422)

* If no extra headers are passed, set it to an empty list

* Test websocket.accept() with no additional headers

* Update starlette/websockets.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* Update tests/test_websockets.py

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
* Update tests/test_websockets.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
3 years agoAdjust type of `exception_handlers` to allow async callable (#1423)
Michael Oliver [Fri, 21 Jan 2022 11:59:59 +0000 (11:59 +0000)] 
Adjust type of `exception_handlers` to allow async callable (#1423)

3 years agoAllow Environment options in `Jinja2Templates` (#1401)
Amin Alaee [Wed, 19 Jan 2022 13:38:57 +0000 (14:38 +0100)] 
Allow Environment options in `Jinja2Templates` (#1401)

3 years agoAdd third-party CSRF middlewares (#1414)
Amin Alaee [Tue, 18 Jan 2022 15:05:09 +0000 (16:05 +0100)] 
Add third-party CSRF middlewares (#1414)

* change github issues template

* Add third-party CSRF middlewares

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoImprovements on authentication documentation (#1420)
Mathieu Kniewallner [Tue, 18 Jan 2022 14:48:48 +0000 (15:48 +0100)] 
Improvements on authentication documentation (#1420)

* Use `conn` in `AuthenticationBackend` documentation

* Remove unused import in `AuthenticationBackend` documentation

* Add missing imports in authentication documentation

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoSort third-party packages and add `starlette-wtf` (#1415)
Amin Alaee [Sun, 16 Jan 2022 17:59:02 +0000 (18:59 +0100)] 
Sort third-party packages and add `starlette-wtf` (#1415)

3 years agoUse typing `NoReturn` (#1412)
Amin Alaee [Fri, 14 Jan 2022 13:30:46 +0000 (14:30 +0100)] 
Use typing `NoReturn` (#1412)

3 years agoFix md5_hexdigest wrapper on FIPS enabled systems (#1410)
Adrian Garcia Badaracco [Fri, 14 Jan 2022 09:40:18 +0000 (01:40 -0800)] 
Fix md5_hexdigest wrapper on FIPS enabled systems (#1410)

* Fix md5_hexdigest wrapper on FIPS enabled systems

* Update _compat.py

* lint

3 years agoRemove count of available convertors (#1409)
Mng [Thu, 13 Jan 2022 21:59:47 +0000 (23:59 +0200)] 
Remove count of available convertors (#1409)

Co-authored-by: Micheal Gendy <micheal@sonono.ch>
3 years agoCorrect spelling of asynchronous in events.md (#1408)
Sondre Lillebø Gundersen [Thu, 13 Jan 2022 10:29:17 +0000 (11:29 +0100)] 
Correct spelling of asynchronous in events.md (#1408)

3 years agoAllow Session scoped cookies. (#1387)
Alex Oleshkevich [Wed, 12 Jan 2022 09:57:47 +0000 (12:57 +0300)] 
Allow Session scoped cookies. (#1387)

* Allow Session scoped cookies.

* Update docs/middleware.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* Improve typing.

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd Mypy checks to tests (#1353)
Amin Alaee [Tue, 11 Jan 2022 08:28:39 +0000 (09:28 +0100)] 
Add Mypy checks to tests (#1353)

3 years agoDocument and type annotate UploadFile as a bytes-only interface. Not bytes or text...
Adrian Garcia Badaracco [Mon, 10 Jan 2022 17:41:43 +0000 (09:41 -0800)] 
Document and type annotate UploadFile as a bytes-only interface. Not bytes or text. (#1312)

3 years agoDon't set headers for responses with 1xx, 204 and 304 status code (#1397)
Marcelo Trylesinski [Mon, 10 Jan 2022 11:08:31 +0000 (12:08 +0100)] 
Don't set  headers for responses with 1xx, 204 and 304 status code (#1397)

* Don't set  headers for responses with 1xx, 204 and 304 status code

* Fix test

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoUpdate type annotations for BackgroundTask and utils (#1383)
Yurii Karabas [Sat, 8 Jan 2022 11:12:49 +0000 (13:12 +0200)] 
Update type annotations for BackgroundTask and utils (#1383)

* Update type annotations for BackgroundTask and utils

* Add type annotation to handler

* Update setup.py

* Fix import issue

* Fix missed import

* Fix coverage

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agofeat: add headers attribute to UploadFile (#1382)
Adrian Garcia Badaracco [Fri, 7 Jan 2022 19:06:37 +0000 (11:06 -0800)] 
feat: add headers attribute to UploadFile (#1382)

This preserves the multipart field headers that may have been included in the original request

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoDon't omit `Content-Length` header for `Content-Length: 0` cases (#1395)
Marcelo Trylesinski [Fri, 7 Jan 2022 11:48:21 +0000 (12:48 +0100)] 
Don't omit `Content-Length` header for `Content-Length: 0` cases (#1395)

* Add content-length header by default

* Add test for #1099

* Revert changes and add tests

* Check if is StreamingResponse or FileResponse before adding content-length headers

* Change conditional logic to check if body is present

3 years agoAdditional headers for WS `accept` message. (#1361)
matiuszka [Thu, 6 Jan 2022 10:55:29 +0000 (11:55 +0100)] 
Additional headers for WS `accept` message. (#1361)

* Additional headers for WS accept message.

* Update tests/test_websockets.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* fixup! Additional headers for WS accept message.

* Update tests/test_websockets.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd WebSocketRoute docs in Routing (#1388)
Amin Alaee [Tue, 4 Jan 2022 08:54:22 +0000 (09:54 +0100)] 
Add WebSocketRoute docs in Routing (#1388)

3 years agoBump types-dataclasses from 0.6.1 to 0.6.2 (#1389)
dependabot[bot] [Sat, 1 Jan 2022 21:04:41 +0000 (22:04 +0100)] 
Bump types-dataclasses from 0.6.1 to 0.6.2 (#1389)

Bumps [types-dataclasses](https://github.com/python/typeshed) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-dataclasses
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump wheel from 0.37.0 to 0.37.1 (#1390)
dependabot[bot] [Sat, 1 Jan 2022 20:55:48 +0000 (21:55 +0100)] 
Bump wheel from 0.37.0 to 0.37.1 (#1390)

Bumps [wheel](https://github.com/pypa/wheel) from 0.37.0 to 0.37.1.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.37.0...0.37.1)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump mkdocs-material from 8.1.2 to 8.1.3 (#1391)
dependabot[bot] [Sat, 1 Jan 2022 20:52:27 +0000 (21:52 +0100)] 
Bump mkdocs-material from 8.1.2 to 8.1.3 (#1391)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.1.2 to 8.1.3.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.1.2...8.1.3)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump types-requests from 2.26.1 to 2.26.3 (#1392)
dependabot[bot] [Sat, 1 Jan 2022 19:30:25 +0000 (20:30 +0100)] 
Bump types-requests from 2.26.1 to 2.26.3 (#1392)

Bumps [types-requests](https://github.com/python/typeshed) from 2.26.1 to 2.26.3.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-requests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump mypy from 0.920 to 0.930 (#1393)
dependabot[bot] [Sat, 1 Jan 2022 19:27:25 +0000 (20:27 +0100)] 
Bump mypy from 0.920 to 0.930 (#1393)

Bumps [mypy](https://github.com/python/mypy) from 0.920 to 0.930.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.920...v0.930)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoAdd request-id middleware to third-party-middleware section (#1354)
Sondre Lillebø Gundersen [Tue, 28 Dec 2021 12:25:57 +0000 (13:25 +0100)] 
Add request-id middleware to third-party-middleware section (#1354)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agofix application `exception_handlers` type hints (#1360)
Amin Alaee [Wed, 22 Dec 2021 12:57:28 +0000 (13:57 +0100)] 
fix application `exception_handlers` type hints (#1360)

3 years agofix: pass usedforsecurity to hashlib.md5 to fix error on FIPS-enabled systems (#1366)
Adrian Garcia Badaracco [Fri, 17 Dec 2021 12:37:33 +0000 (06:37 -0600)] 
fix: pass usedforsecurity to hashlib.md5 to fix error on FIPS-enabled systems (#1366)

See #1365

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoAdd dependbot (#1375)
Amin Alaee [Fri, 17 Dec 2021 08:53:08 +0000 (09:53 +0100)] 
Add dependbot (#1375)

3 years agoPin requirements.txt dependencies (#1373)
Amin Alaee [Thu, 16 Dec 2021 12:36:08 +0000 (13:36 +0100)] 
Pin requirements.txt dependencies (#1373)

* Pin requirements.txt dependencies

* remove duplicate optionals from requirements.txt

3 years agoUpdate github issues template (#1371)
Amin Alaee [Thu, 16 Dec 2021 10:03:27 +0000 (11:03 +0100)] 
Update github issues template (#1371)

3 years agoFix Mypy errors in routing and testclient (#1372)
Amin Alaee [Thu, 16 Dec 2021 09:45:05 +0000 (10:45 +0100)] 
Fix Mypy errors in routing and testclient (#1372)

* Fix Mypy errors in routing and testclient

* Update starlette/testclient.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agotest: use --show-error-codes for mypy (#1368)
Adrian Garcia Badaracco [Wed, 15 Dec 2021 17:16:31 +0000 (11:16 -0600)] 
test: use --show-error-codes for mypy (#1368)

* test: use --show-error-codes for mypy

* move to setup.cfg

3 years agoFix snippet on config.md (#1358)
Marcelo Trylesinski [Sat, 11 Dec 2021 23:53:34 +0000 (00:53 +0100)] 
Fix snippet on config.md (#1358)

* Fix snippet on config.md

* Update docs/config.md

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
3 years agoAdd support for functools.partial in WebsocketRoute (#1356)
Amin Alaee [Sat, 11 Dec 2021 13:35:23 +0000 (14:35 +0100)] 
Add support for functools.partial in WebsocketRoute (#1356)

* Add support for functools.partial in WebsocketRoute

* remove commented code

* Refactor tests for partian endpoint and ws

3 years agoAdd support for Staticfiles directory in packages (#1350)
Amin Alaee [Tue, 7 Dec 2021 09:04:54 +0000 (10:04 +0100)] 
Add support for Staticfiles directory in packages (#1350)

3 years agoChange default chunk size from 4Kb to 64Kb (#1345)
Marcelo Trylesinski [Sun, 5 Dec 2021 14:03:13 +0000 (15:03 +0100)] 
Change default chunk size from 4Kb to 64Kb (#1345)

* Change default chunk size from 4Kb to 64Kb

* Update starlette/responses.py

3 years agoFix url_path_for typehints (#1341)
Amin Alaee [Tue, 30 Nov 2021 18:13:08 +0000 (19:13 +0100)] 
Fix url_path_for typehints (#1341)

3 years agoAdd Rollbar integration (#1348)
Bart Skowron [Mon, 29 Nov 2021 13:32:29 +0000 (14:32 +0100)] 
Add Rollbar integration (#1348)

3 years agoAllow head method httpendpoint (#1346)
Marcelo Trylesinski [Sat, 27 Nov 2021 17:40:57 +0000 (18:40 +0100)] 
Allow head method httpendpoint (#1346)

* Allow for custom head method in HTTPEndpoint

Fix for https://github.com/encode/starlette/issues/1221

* Fix formatting

* Allow custom head method in HTTPEndpoint

Co-authored-by: theblazehen <theblazehen@gmail.com>
3 years agoadd greppo to third party package listAdd greppo (#1343)
Adithya Krishnan [Fri, 26 Nov 2021 14:59:25 +0000 (15:59 +0100)] 
add greppo to third party package listAdd greppo (#1343)

* add greppo to third party package list

* update greppo description

3 years agoRemove port from Host routing regex (#1322)
Eugene Mayer [Thu, 25 Nov 2021 14:11:25 +0000 (17:11 +0300)] 
Remove port from Host routing regex (#1322)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoVersion 0.17.1 (#1338) 0.17.1
Lars Stegman [Wed, 17 Nov 2021 16:10:27 +0000 (17:10 +0100)] 
Version 0.17.1 (#1338)

* Release 0.17.1

* Fix punctuation

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Lars Stegman <LSm@allseas.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd authentication requires args length check (#1335)
Lars Stegman [Mon, 15 Nov 2021 21:54:03 +0000 (22:54 +0100)] 
Add authentication requires args length check (#1335)

* Add authentication requires args length check

* Update authentication.py

Fix linting

* Remove unneeded check

* Fix lifting

* Fix linting

Co-authored-by: Lars Stegman <LSm@allseas.com>
3 years agoFix release date for 0.17.0 on release notes (#1330)
Marcelo Trylesinski [Thu, 4 Nov 2021 15:23:09 +0000 (16:23 +0100)] 
Fix release date for 0.17.0 on release notes (#1330)

Co-authored-by: Marcelo Trylesinski <marcelo@recital.ai>
3 years agoVersion 0.17.0 (#1324) 0.17.0
Marcelo Trylesinski [Thu, 4 Nov 2021 09:48:30 +0000 (10:48 +0100)] 
Version 0.17.0 (#1324)

* Release 0.17.0

* Apply suggestions from code review

* Add version on init file

3 years agoPrevent anyio.ExceptionGroup in error views under a BaseHTTPMiddleware (#1262)
Florimond Manca [Thu, 28 Oct 2021 16:50:33 +0000 (18:50 +0200)] 
Prevent anyio.ExceptionGroup in error views under a BaseHTTPMiddleware (#1262)

* Prevent ExceptionGroup in error views under a BaseHTTPMiddleware

* Apply suggestion from @uSpike

Co-authored-by: euri10 <benoit.barthelet@gmail.com>
3 years agoadd host-based routing docs (#1313)
Eugene Mayer [Mon, 25 Oct 2021 07:51:12 +0000 (10:51 +0300)] 
add host-based routing docs (#1313)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
3 years agoBump Python 3.10 on pipeline (#1299)
Marcelo Trylesinski [Fri, 22 Oct 2021 13:23:10 +0000 (15:23 +0200)] 
Bump Python 3.10 on pipeline (#1299)

3 years agoFix Staticfiles `404.html` in HTML mode (#1314)
Eugene Mayer [Tue, 19 Oct 2021 09:27:35 +0000 (12:27 +0300)] 
Fix Staticfiles `404.html` in HTML mode (#1314)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
3 years agoUpdate third-party-packages.md (#1316)
Andrey Sobolev [Sun, 17 Oct 2021 16:36:12 +0000 (19:36 +0300)] 
Update third-party-packages.md (#1316)

Channel-box chat url migrate

3 years agoAdd Imia library. (#1300)
Alex Oleshkevich [Wed, 6 Oct 2021 08:47:28 +0000 (11:47 +0300)] 
Add Imia library. (#1300)

Co-authored-by: alex.oleshkevich <alex.oleshkevich@gmail.com>
3 years agoFix #1207 (#1228)
bookgin [Tue, 5 Oct 2021 21:36:24 +0000 (05:36 +0800)] 
Fix #1207 (#1228)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agohandle staticfiles OSError exceptions (#1220)
Amin Alaee [Tue, 5 Oct 2021 06:01:10 +0000 (09:31 +0330)] 
handle staticfiles OSError exceptions (#1220)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years ago🔥 Remove GraphQL support (#1198)
Marcelo Trylesinski [Sun, 3 Oct 2021 15:21:38 +0000 (17:21 +0200)] 
🔥 Remove GraphQL support (#1198)

* 🔥 Remove GraphQL support

* Remove graphene dependency and add docs

* Update docs/graphql.md

Co-authored-by: Jamie Hewland <jhewland@gmail.com>
* Update docs/graphql.md

Co-authored-by: Jamie Hewland <jhewland@gmail.com>
* Remove aiofiles warning on setup.cfg

Co-authored-by: Jamie Hewland <jhewland@gmail.com>
3 years agoUpdate the Jinja2Templates() constructor to allow PathLike (#1292)
Anthony Shaw [Sun, 26 Sep 2021 21:46:04 +0000 (07:46 +1000)] 
Update the Jinja2Templates() constructor to allow PathLike (#1292)

* Update the Jinja2Templates() to allow PathLike

* Update templating.py

* Update starlette/templating.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* Update starlette/templating.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* Update starlette/templating.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* Update starlette/templating.py

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoFix ImmutableMultiDict getlist return type (#1235)
Amin Alaee [Sat, 25 Sep 2021 22:50:03 +0000 (02:20 +0330)] 
Fix ImmutableMultiDict getlist return type (#1235)

3 years agoAdd starsessions library to the 3rd-party list. (#1225)
Alex Oleshkevich [Wed, 22 Sep 2021 08:35:17 +0000 (11:35 +0300)] 
Add starsessions library to the 3rd-party list. (#1225)

* Add starsessions library to the 3rd-party list.

* Update docs/third-party-packages.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd `routes=routes` to schemas documentation (#1241)
Ju [Sat, 18 Sep 2021 13:35:28 +0000 (01:35 +1200)] 
Add `routes=routes` to schemas documentation (#1241)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoPropose a roll your own framework solution (#1137)
jpic ∞ [Sat, 18 Sep 2021 13:21:04 +0000 (15:21 +0200)] 
Propose a roll your own framework solution (#1137)

* Propose a roll your own framework solution

* Update docs/third-party-packages.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAlign __getitem__ type with scope type (#1118)
Sam Burba [Sat, 18 Sep 2021 13:16:05 +0000 (06:16 -0700)] 
Align __getitem__ type with scope type (#1118)

Scope does not only contain strings, see full spec here:
https://asgi.readthedocs.io/en/latest/specs/www.html#websocket-connection-scope

Fixes #1117

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoFix typos in config.md code examples (#1065)
eprikazc [Sat, 18 Sep 2021 13:10:00 +0000 (16:10 +0300)] 
Fix typos in config.md code examples (#1065)

* Fix typos in config.md code examples

* Update docs/config.md

* Update docs/config.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agodatasette-auth-github is now asgi-auth-github (#967)
Simon Willison [Sat, 18 Sep 2021 12:39:39 +0000 (05:39 -0700)] 
datasette-auth-github is now asgi-auth-github (#967)

https://github.com/simonw/datasette-auth-github/issues/63

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Erik <eraker@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agotest_database_execute_many: remove unnecessary statement (#778)
Daniel Hahler [Sat, 18 Sep 2021 12:10:40 +0000 (14:10 +0200)] 
test_database_execute_many: remove unnecessary statement (#778)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd dark theme for the documentation (#1230)
Piotr Gnus [Sat, 18 Sep 2021 11:08:29 +0000 (13:08 +0200)] 
Add dark theme for the documentation (#1230)

* mkdocs: expanded theme configuration to add alternative dark theme.
  The default theme will be determined by the users system theme by the
  `prefers-color-scheme` media query.

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoadd typing overloads for Config.__call__ (#1097)
Steve Dignam [Sat, 18 Sep 2021 10:44:11 +0000 (06:44 -0400)] 
add typing overloads for Config.__call__ (#1097)

* add typing overloads for Config.__call__

This allows for more precise return types instead of the current `Any`.

We have 3 overload cases here:

1. handles cases where the user provides an explicit `cast` argument.

   ```
   reveal_type(config("POOL_SIZE", cast=int))
   # note: Revealed type is 'int'

   reveal_type(config("DEBUG", cast=bool, default=None))
   # note: Revealed type is 'Union[bool, None]'
   ```

2. handles no cast or default being passed

   ```
   reveal_type(config("FOO"))
   # note: Revealed type is 'str'
   ```

3. handles no cast being provided, and the default not being `str`

   ```
   reveal_type(config("DB_NAME", default=None))
   # note: Revealed type is 'Union[str, None]'

   reveal_type(config("FOO", default=False))
   # note: Revealed type is 'Union[str, bool]'
   ```

* ignore overloads from code coverage

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoUpdate responses.md (#1069)
Pax [Sat, 18 Sep 2021 10:38:52 +0000 (03:38 -0700)] 
Update responses.md (#1069)

- Fix typo ("Third party middleware" to "...responses")
- Fix w3 link (current link leads to 404; I followed links from archive.org to get the "latest" spec)
- Format it similarly to "Third party middleware" (use h4, use the class name as header)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd missing await on database section on docs (#1226)
Amin Alaee [Thu, 16 Sep 2021 17:49:59 +0000 (22:19 +0430)] 
Add missing await on database section on docs (#1226)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd BaseHTTPMiddleware import on docs (#1285)
Lukas Kahwe Smith [Thu, 16 Sep 2021 12:48:32 +0000 (14:48 +0200)] 
Add BaseHTTPMiddleware import on docs (#1285)

3 years agoAdd starlette-cramjam link to the docs (#1283)
Vincent Sarago [Thu, 16 Sep 2021 12:22:05 +0000 (14:22 +0200)] 
Add starlette-cramjam link to the docs (#1283)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoIgnore loop deprecation warnings originating inside asyncio (#1287)
Marcelo Trylesinski [Thu, 16 Sep 2021 12:16:25 +0000 (14:16 +0200)] 
Ignore loop deprecation warnings originating inside asyncio (#1287)

4 years agoInclude FastAPI link
Tom Christie [Thu, 19 Aug 2021 14:40:50 +0000 (15:40 +0100)] 
Include FastAPI link

4 years agoAdd FastAPI sponsorship (#1271)
Tom Christie [Thu, 19 Aug 2021 14:17:41 +0000 (15:17 +0100)] 
Add FastAPI sponsorship (#1271)

4 years agoFix BadSignature exception handling in SessionMiddleware (#1264)
Hannes Küttner [Sat, 14 Aug 2021 14:38:50 +0000 (16:38 +0200)] 
Fix BadSignature exception handling in SessionMiddleware (#1264)

4 years agoprepare release 0.16.0 (#1233) 0.16.0
Thomas Grainger [Mon, 19 Jul 2021 07:08:36 +0000 (08:08 +0100)] 
prepare release 0.16.0 (#1233)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Jamie Hewland <jhewland@gmail.com>
4 years agoignore charset_normalizer related warning (#1242)
Thomas Grainger [Fri, 16 Jul 2021 10:07:55 +0000 (11:07 +0100)] 
ignore charset_normalizer related warning (#1242)

4 years agoDocument the lifespan event handler parameter (#1110)
Emil Melnikov [Thu, 15 Jul 2021 16:13:43 +0000 (18:13 +0200)] 
Document the lifespan event handler parameter (#1110)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
4 years agouse an async context manager factory for lifespan (#1227)
Thomas Grainger [Sat, 3 Jul 2021 17:43:24 +0000 (18:43 +0100)] 
use an async context manager factory for lifespan (#1227)

4 years ago ensure TestClient requests run in the same EventLoop as lifespan (#1213)
Thomas Grainger [Sat, 3 Jul 2021 16:39:25 +0000 (17:39 +0100)] 
 ensure TestClient requests run in the same EventLoop as lifespan  (#1213)

* ensure TestClient requests run in the same EventLoop as lifespan

* for lifespan task verification, use native task identity rather than anyio.abc.TaskInfo equality

https://github.com/agronholm/anyio/issues/324

* remove redundant pragma: no cover

* it's now a loop_id not a threading.ident

* replace Protocol with plain Callable TypeAlias

* use lifespan_context to actually open a task group

trio should complain if used incorrectly here.

* assign self.portal once, schedule reset immediately after assignment

* inline apps into their tests

* make task/loop trackers nonlocals

4 years agoTestClient accepts backend and backend_options as arguments to constructor (#1211)
Thomas Grainger [Mon, 28 Jun 2021 20:36:13 +0000 (21:36 +0100)] 
TestClient accepts backend and backend_options as arguments to constructor (#1211)

as opposed to ClassVar assignment

Co-authored-by: Jamie Hewland <jhewland@gmail.com>
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
Co-authored-by: Jordan Speicher <uSpike@users.noreply.github.com>