Commit Graph

852 Commits

Author SHA1 Message Date
Amin Alaee bff81f83d0
Add WebSocketRoute docs in Routing (#1388) 2022-01-04 09:54:22 +01:00
dependabot[bot] 9a55ac891d
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>
2022-01-01 22:04:41 +01:00
dependabot[bot] 836bb9f4dd
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>
2022-01-01 21:55:48 +01:00
dependabot[bot] fd6594f0c1
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>
2022-01-01 21:52:27 +01:00
dependabot[bot] c921cd1b37
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>
2022-01-01 20:30:25 +01:00
dependabot[bot] 9b96dd64d2
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>
2022-01-01 20:27:25 +01:00
Sondre Lillebø Gundersen 389cbfcaa5
Add request-id middleware to third-party-middleware section (#1354)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-12-28 13:25:57 +01:00
Amin Alaee d0252aaf05
fix application `exception_handlers` type hints (#1360) 2021-12-22 13:57:28 +01:00
Adrian Garcia Badaracco 0aef1724cf
fix: pass usedforsecurity to hashlib.md5 to fix error on FIPS-enabled systems (#1366)
See #1365 

Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-12-17 06:37:33 -06:00
Amin Alaee 58a104e481
Add dependbot (#1375) 2021-12-17 09:53:08 +01:00
Amin Alaee a11dbe0e9f
Pin requirements.txt dependencies (#1373)
* Pin requirements.txt dependencies

* remove duplicate optionals from requirements.txt
2021-12-16 13:36:08 +01:00
Amin Alaee 61a9c91c38
Update github issues template (#1371) 2021-12-16 11:03:27 +01:00
Amin Alaee 05d531483a
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>
2021-12-16 10:45:05 +01:00
Adrian Garcia Badaracco 0081d46d85
test: use --show-error-codes for mypy (#1368)
* test: use --show-error-codes for mypy

* move to setup.cfg
2021-12-15 18:16:31 +01:00
Marcelo Trylesinski c8b9581e37
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>
2021-12-12 00:53:34 +01:00
Amin Alaee 76cd611b50
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
2021-12-11 14:35:23 +01:00
Amin Alaee f53faba229
Add support for Staticfiles directory in packages (#1350) 2021-12-07 10:04:54 +01:00
Marcelo Trylesinski 1d1dcba1b8
Change default chunk size from 4Kb to 64Kb (#1345)
* Change default chunk size from 4Kb to 64Kb

* Update starlette/responses.py
2021-12-05 15:03:13 +01:00
Amin Alaee 10529a3b39
Fix url_path_for typehints (#1341) 2021-11-30 19:13:08 +01:00
Bart Skowron 8f5f252331
Add Rollbar integration (#1348) 2021-11-29 14:32:29 +01:00
Marcelo Trylesinski 82b75f7f2c
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>
2021-11-27 18:40:57 +01:00
Adithya Krishnan 0220088560
add greppo to third party package listAdd greppo (#1343)
* add greppo to third party package list

* update greppo description
2021-11-26 15:59:25 +01:00
Eugene Mayer 7c7ec5a7f7
Remove port from Host routing regex (#1322)
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-11-25 15:11:25 +01:00
Lars Stegman 881af38cc2
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>
2021-11-17 17:10:27 +01:00
Lars Stegman 649161cec5
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>
2021-11-15 22:54:03 +01:00
Marcelo Trylesinski 6af5c515e0
Fix release date for 0.17.0 on release notes (#1330)
Co-authored-by: Marcelo Trylesinski <marcelo@recital.ai>
2021-11-04 16:23:09 +01:00
Marcelo Trylesinski 2b3f5e6805
Version 0.17.0 (#1324)
* Release 0.17.0

* Apply suggestions from code review

* Add version on init file
2021-11-04 10:48:30 +01:00
Florimond Manca 6c9bc55af7
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>
2021-10-28 18:50:33 +02:00
Eugene Mayer d87c93eda4
add host-based routing docs (#1313)
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
2021-10-25 09:51:12 +02:00
Marcelo Trylesinski accca04685
Bump Python 3.10 on pipeline (#1299) 2021-10-22 15:23:10 +02:00
Eugene Mayer 26b5be48bb
Fix Staticfiles `404.html` in HTML mode (#1314)
Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
2021-10-19 11:27:35 +02:00
Andrey Sobolev 8160899ec9
Update third-party-packages.md (#1316)
Channel-box chat url migrate
2021-10-17 18:36:12 +02:00
Alex Oleshkevich 3282d23641
Add Imia library. (#1300)
Co-authored-by: alex.oleshkevich <alex.oleshkevich@gmail.com>
2021-10-06 10:47:28 +02:00
bookgin ada99beee5
Fix #1207 (#1228)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-10-05 23:36:24 +02:00
Amin Alaee 1db8b5b4e8
handle staticfiles OSError exceptions (#1220)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-10-05 09:31:10 +03:30
Marcelo Trylesinski 28088573ae
🔥 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>
2021-10-03 17:21:38 +02:00
Anthony Shaw 6c556f6c5e
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>
2021-09-26 23:46:04 +02:00
Amin Alaee 134eb0b3ae
Fix ImmutableMultiDict getlist return type (#1235) 2021-09-26 00:50:03 +02:00
Alex Oleshkevich ddc751a779
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>
2021-09-22 10:35:17 +02:00
Ju 85316543e7
Add `routes=routes` to schemas documentation (#1241)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-09-18 15:35:28 +02:00
jpic ∞ ce4687fd07
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>
2021-09-18 15:21:04 +02:00
Sam Burba 217019b363
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>
2021-09-18 15:16:05 +02:00
eprikazc 8360c0958d
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>
2021-09-18 15:10:00 +02:00
Simon Willison 04242e3a63
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>
2021-09-18 14:39:39 +02:00
Daniel Hahler 6902361c98
test_database_execute_many: remove unnecessary statement (#778)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-09-18 14:10:40 +02:00
Piotr Gnus 7a1108058b
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>
2021-09-18 13:08:29 +02:00
Steve Dignam 48dea4ddf1
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>
2021-09-18 12:44:11 +02:00
Pax 874ad467ac
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>
2021-09-18 12:38:52 +02:00
Amin Alaee 85ab09d1b7
Add missing await on database section on docs (#1226)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2021-09-16 19:49:59 +02:00
Lukas Kahwe Smith 1ae43b45b5
Add BaseHTTPMiddleware import on docs (#1285) 2021-09-16 14:48:32 +02:00