]>
git.ipfire.org Git - thirdparty/starlette.git/log
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>
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>
Adrian Garcia Badaracco [Tue, 1 Feb 2022 11:55:35 +0000 (05:55 -0600)]
fix handling of scope's client in Request (#1462)
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>
Alex Grönholm [Mon, 31 Jan 2022 23:15:36 +0000 (01:15 +0200)]
Added AnyIO classifier (#1461)
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>
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>
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>
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>
Adrian Garcia Badaracco [Sun, 30 Jan 2022 00:58:05 +0000 (18:58 -0600)]
use typing.NamedTuple for Address (#1447)
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
Cyril Jouve [Thu, 27 Jan 2022 00:15:19 +0000 (01:15 +0100)]
use typing.Mapping for Response.headers (#1426)
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>
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)
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
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>
Marcelo Trylesinski [Wed, 26 Jan 2022 09:49:30 +0000 (10:49 +0100)]
Add test case for `HTTPException` when status code is 204 (#1432)
Adrian Garcia Badaracco [Tue, 25 Jan 2022 13:44:39 +0000 (07:44 -0600)]
feat: add type annotation to Request.path_params (#1404)
Tom Christie [Mon, 24 Jan 2022 15:58:07 +0000 (15:58 +0000)]
Update publish.yml (#1430)
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>
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>
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>
Michael Oliver [Fri, 21 Jan 2022 11:59:59 +0000 (11:59 +0000)]
Adjust type of `exception_handlers` to allow async callable (#1423)
Amin Alaee [Wed, 19 Jan 2022 13:38:57 +0000 (14:38 +0100)]
Allow Environment options in `Jinja2Templates` (#1401)
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>
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>
Amin Alaee [Sun, 16 Jan 2022 17:59:02 +0000 (18:59 +0100)]
Sort third-party packages and add `starlette-wtf` (#1415)
Amin Alaee [Fri, 14 Jan 2022 13:30:46 +0000 (14:30 +0100)]
Use typing `NoReturn` (#1412)
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
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>
Sondre Lillebø Gundersen [Thu, 13 Jan 2022 10:29:17 +0000 (11:29 +0100)]
Correct spelling of asynchronous in events.md (#1408)
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>
Amin Alaee [Tue, 11 Jan 2022 08:28:39 +0000 (09:28 +0100)]
Add Mypy checks to tests (#1353)
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)
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>
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>
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>
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
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>
Amin Alaee [Tue, 4 Jan 2022 08:54:22 +0000 (09:54 +0100)]
Add WebSocketRoute docs in Routing (#1388)
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>
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>
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>
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>
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>
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>
Amin Alaee [Wed, 22 Dec 2021 12:57:28 +0000 (13:57 +0100)]
fix application `exception_handlers` type hints (#1360)
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>
Amin Alaee [Fri, 17 Dec 2021 08:53:08 +0000 (09:53 +0100)]
Add dependbot (#1375)
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
Amin Alaee [Thu, 16 Dec 2021 10:03:27 +0000 (11:03 +0100)]
Update github issues template (#1371)
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>
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
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>
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
Amin Alaee [Tue, 7 Dec 2021 09:04:54 +0000 (10:04 +0100)]
Add support for Staticfiles directory in packages (#1350)
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
Amin Alaee [Tue, 30 Nov 2021 18:13:08 +0000 (19:13 +0100)]
Fix url_path_for typehints (#1341)
Bart Skowron [Mon, 29 Nov 2021 13:32:29 +0000 (14:32 +0100)]
Add Rollbar integration (#1348)
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>
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
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>
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>
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>
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>
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
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>
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>
Marcelo Trylesinski [Fri, 22 Oct 2021 13:23:10 +0000 (15:23 +0200)]
Bump Python 3.10 on pipeline (#1299)
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>
Andrey Sobolev [Sun, 17 Oct 2021 16:36:12 +0000 (19:36 +0300)]
Update third-party-packages.md (#1316)
Channel-box chat url migrate
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>
bookgin [Tue, 5 Oct 2021 21:36:24 +0000 (05:36 +0800)]
Fix #1207 (#1228)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
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>
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>
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>
Amin Alaee [Sat, 25 Sep 2021 22:50:03 +0000 (02:20 +0330)]
Fix ImmutableMultiDict getlist return type (#1235)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Lukas Kahwe Smith [Thu, 16 Sep 2021 12:48:32 +0000 (14:48 +0200)]
Add BaseHTTPMiddleware import on docs (#1285)
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>
Marcelo Trylesinski [Thu, 16 Sep 2021 12:16:25 +0000 (14:16 +0200)]
Ignore loop deprecation warnings originating inside asyncio (#1287)
Tom Christie [Thu, 19 Aug 2021 14:40:50 +0000 (15:40 +0100)]
Include FastAPI link
Tom Christie [Thu, 19 Aug 2021 14:17:41 +0000 (15:17 +0100)]
Add FastAPI sponsorship (#1271)
Hannes Küttner [Sat, 14 Aug 2021 14:38:50 +0000 (16:38 +0200)]
Fix BadSignature exception handling in SessionMiddleware (#1264)
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>
Thomas Grainger [Fri, 16 Jul 2021 10:07:55 +0000 (11:07 +0100)]
ignore charset_normalizer related warning (#1242)
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>
Thomas Grainger [Sat, 3 Jul 2021 17:43:24 +0000 (18:43 +0100)]
use an async context manager factory for lifespan (#1227)
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
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>