]> git.ipfire.org Git - thirdparty/starlette.git/log
thirdparty/starlette.git
2 years agoAllow returning a State object from lifespans instead of accepting a dict as an argum...
Adrian Garcia Badaracco [Thu, 9 Mar 2023 20:04:12 +0000 (14:04 -0600)] 
Allow returning a State object from lifespans instead of accepting a dict as an argument (#2065)

2 years agoAllow "name" argument on `url_for()` and `url_path_for()` (#2050)
Marcelo Trylesinski [Mon, 6 Mar 2023 09:00:00 +0000 (10:00 +0100)] 
Allow "name" argument on `url_for()` and `url_path_for()` (#2050)

Co-authored-by: Daniel <709115+dansan@users.noreply.github.com>
2 years agoDocument Lifespan state (#2064)
Marcelo Trylesinski [Sun, 5 Mar 2023 17:32:50 +0000 (18:32 +0100)] 
Document Lifespan state (#2064)

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2 years agoChange `url_for` signature to return a `URL` instance (#1385)
Amin Alaee [Sun, 5 Mar 2023 15:04:51 +0000 (16:04 +0100)] 
Change `url_for` signature to return a `URL` instance (#1385)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoSupport lifespan state (#2060)
Marcelo Trylesinski [Sun, 5 Mar 2023 14:49:07 +0000 (15:49 +0100)] 
Support lifespan state (#2060)

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2 years agoBump mkdocs-material from 8.5.7 to 9.0.15 (#2053)
dependabot[bot] [Fri, 3 Mar 2023 18:03:02 +0000 (19:03 +0100)] 
Bump mkdocs-material from 8.5.7 to 9.0.15 (#2053)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump pytest from 7.2.0 to 7.2.1 (#2051)
dependabot[bot] [Wed, 1 Mar 2023 20:22:19 +0000 (21:22 +0100)] 
Bump pytest from 7.2.0 to 7.2.1 (#2051)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump types-contextvars from 2.4.7 to 2.4.7.1 (#2054)
dependabot[bot] [Wed, 1 Mar 2023 20:19:25 +0000 (21:19 +0100)] 
Bump types-contextvars from 2.4.7 to 2.4.7.1 (#2054)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump mypy from 0.991 to 1.0.1 (#2055)
dependabot[bot] [Wed, 1 Mar 2023 20:16:04 +0000 (21:16 +0100)] 
Bump mypy from 0.991 to 1.0.1 (#2055)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump build from 0.9.0 to 0.10.0 (#2052)
dependabot[bot] [Wed, 1 Mar 2023 20:10:13 +0000 (21:10 +0100)] 
Bump build from 0.9.0 to 0.10.0 (#2052)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoUpdate Flama description in third-party-packages (#2049)
migduroli [Wed, 1 Mar 2023 06:17:34 +0000 (07:17 +0100)] 
Update Flama description in third-party-packages (#2049)

2 years agoUpdate link to jinja2 (#2043)
Magnus Watn [Mon, 20 Feb 2023 11:14:47 +0000 (12:14 +0100)] 
Update link to jinja2 (#2043)

The old link doesn't support https, which makes it not work for
https-only users, and it only redirects to this one anyway.

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoDocs: Remove SentryMiddleware from third-party list (#2044)
François Voron [Mon, 20 Feb 2023 11:11:54 +0000 (12:11 +0100)] 
Docs: Remove SentryMiddleware from third-party list (#2044)

2 years agoVersion 0.25.0 (#2035) 0.25.0
Marcelo Trylesinski [Tue, 14 Feb 2023 09:06:03 +0000 (10:06 +0100)] 
Version 0.25.0 (#2035)

2 years ago🐛 Close all the multipart files on error (#2036)
Sebastián Ramírez [Tue, 14 Feb 2023 09:03:29 +0000 (10:03 +0100)] 
🐛 Close all the multipart files on error (#2036)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoMerge pull request from GHSA-74m5-2c7w-9w3x
Sebastián Ramírez [Tue, 14 Feb 2023 08:01:32 +0000 (09:01 +0100)] 
Merge pull request from GHSA-74m5-2c7w-9w3x

* ♻️ Refactor multipart parser logic to support limiting max fields and files

* ✨ Add support for new request.form() parameters max_files and max_fields

* ✅ Add tests for limiting max fields and files in form data

* 📝 Add docs about request.form() with new parameters max_files and max_fields

* 📝 Update `docs/requests.md`

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* 📝 Tweak docs for request.form()

* ✏ Fix typo in `starlette/formparsers.py`

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
---------

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2 years agoFix test not passing in 32-bit architectures (#2033)
kraptor [Sat, 11 Feb 2023 14:24:57 +0000 (15:24 +0100)] 
Fix test not passing in 32-bit architectures (#2033)

Some architectures cannot hold values after
2038 year.

This commit fixes the following tests, adjusting
the expiring date for the cookies to a maximum
year value of 2037:

* test_set_cookie
* test_expires_on_set_cookie

2 years agoDocument that UploadFile's `filename` and `content_type` can be `None` (#2029)
Rafał Pitoń [Wed, 8 Feb 2023 05:20:19 +0000 (06:20 +0100)] 
Document that UploadFile's `filename` and `content_type` can be `None` (#2029)

2 years agoVersion 0.24.0 (#1983) 0.24.0
Marcelo Trylesinski [Mon, 6 Feb 2023 16:01:14 +0000 (17:01 +0100)] 
Version 0.24.0 (#1983)

2 years agoFeature: Add size attribute to UploadFile (#1405)
Rafał Pitoń [Mon, 6 Feb 2023 12:02:29 +0000 (13:02 +0100)] 
Feature: Add size attribute to UploadFile (#1405)

2 years agoallow using Request.form() as a context manager (#1903)
Adrian Garcia Badaracco [Mon, 6 Feb 2023 05:58:21 +0000 (21:58 -0800)] 
allow using Request.form() as a context manager (#1903)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoSupport `str` and `datetime` on `expires` parameter on the `set_cookie` method (...
oskipa [Mon, 6 Feb 2023 05:45:30 +0000 (00:45 -0500)] 
Support `str` and `datetime` on `expires` parameter on the `set_cookie` method (#1908)

Co-authored-by: Hugo Estrada <hugoestrada@cal.berkeley.edu>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
2 years agoFix url parsing of ipv6 urls on `URL.replace` (#1965)
Kousik Mitra [Mon, 6 Feb 2023 05:41:54 +0000 (11:11 +0530)] 
Fix url parsing of ipv6 urls on `URL.replace` (#1965)

Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
2 years agoLazily build middleware stack (#2017)
Adrian Garcia Badaracco [Mon, 6 Feb 2023 05:35:09 +0000 (21:35 -0800)] 
Lazily build middleware stack (#2017)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoSupport Debug extension (#1991)
Marcelo Trylesinski [Mon, 6 Feb 2023 05:31:48 +0000 (06:31 +0100)] 
Support Debug extension (#1991)

2 years agoMake the file argument to UploadFile required (#1413)
Adrian Garcia Badaracco [Sat, 4 Feb 2023 17:55:25 +0000 (09:55 -0800)] 
Make the file argument to UploadFile required (#1413)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoAllow StaticFiles follow symlinks (#1683)
Amin Alaee [Sat, 4 Feb 2023 17:22:36 +0000 (18:22 +0100)] 
Allow StaticFiles follow symlinks (#1683)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoBump types-pyyaml from 6.0.12.2 to 6.0.12.3 (#2023)
dependabot[bot] [Wed, 1 Feb 2023 19:25:21 +0000 (20:25 +0100)] 
Bump types-pyyaml from 6.0.12.2 to 6.0.12.3 (#2023)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump coverage from 7.0.1 to 7.1.0 (#2025)
dependabot[bot] [Wed, 1 Feb 2023 19:20:04 +0000 (20:20 +0100)] 
Bump coverage from 7.0.1 to 7.1.0 (#2025)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoAdd Config.env_prefix option (#1990)
Alex Oleshkevich [Sun, 22 Jan 2023 21:24:35 +0000 (00:24 +0300)] 
Add Config.env_prefix option (#1990)

* add Config.env_prefix option

* fix variable name in docs

* simplify test case

* rollback markdown formatting

* Update docs/config.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoAdd Ellar to third-party packages (#2015)
Tochukwu [Sun, 22 Jan 2023 08:05:39 +0000 (09:05 +0100)] 
Add Ellar to third-party packages (#2015)

2 years agoDocument iter methods for WebSockets (#2011)
Marcelo Trylesinski [Wed, 18 Jan 2023 15:16:20 +0000 (16:16 +0100)] 
Document iter methods for WebSockets (#2011)

2 years ago➕ Esmerald to third party packages. (#2008)
Tiago Silva [Fri, 13 Jan 2023 15:34:45 +0000 (15:34 +0000)] 
➕ Esmerald to third party packages. (#2008)

Co-authored-by: Tiago A. Silva <tiago.arasilva@outlook.com>
2 years agoBump twine from 4.0.1 to 4.0.2 (#1996)
dependabot[bot] [Sun, 1 Jan 2023 20:13:12 +0000 (21:13 +0100)] 
Bump twine from 4.0.1 to 4.0.2 (#1996)

Bumps [twine](https://github.com/pypa/twine) from 4.0.1 to 4.0.2.
- [Release notes](https://github.com/pypa/twine/releases)
- [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/twine/compare/4.0.1...4.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump build from 0.8.0 to 0.9.0 (#1992)
dependabot[bot] [Sun, 1 Jan 2023 20:09:37 +0000 (21:09 +0100)] 
Bump build from 0.8.0 to 0.9.0 (#1992)

Bumps [build](https://github.com/pypa/build) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/pypa/build/releases)
- [Changelog](https://github.com/pypa/build/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pypa/build/compare/0.8.0...0.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump coverage from 6.5.0 to 7.0.1 (#1994)
dependabot[bot] [Sun, 1 Jan 2023 20:06:22 +0000 (21:06 +0100)] 
Bump coverage from 6.5.0 to 7.0.1 (#1994)

Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.5.0 to 7.0.1.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/6.5.0...7.0.1)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump black from 22.10.0 to 22.12.0 (#1995)
dependabot[bot] [Sun, 1 Jan 2023 19:56:48 +0000 (20:56 +0100)] 
Bump black from 22.10.0 to 22.12.0 (#1995)

Bumps [black](https://github.com/psf/black) from 22.10.0 to 22.12.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/compare/22.10.0...22.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoAdd template context processors. (#1904)
Alex Oleshkevich [Thu, 29 Dec 2022 14:41:41 +0000 (17:41 +0300)] 
Add template context processors. (#1904)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2 years agoDelete setup.py (#1989)
Marcelo Trylesinski [Thu, 29 Dec 2022 14:13:02 +0000 (15:13 +0100)] 
Delete setup.py (#1989)

2 years agoAdd import statement on "Testing template responses" section (#1986)
Marcelo Trylesinski [Sun, 25 Dec 2022 18:25:51 +0000 (19:25 +0100)] 
Add import statement on "Testing template responses" section (#1986)

2 years agoVersion 0.23.1 (#1978) 0.23.1
Marcelo Trylesinski [Fri, 9 Dec 2022 14:45:37 +0000 (15:45 +0100)] 
Version 0.23.1 (#1978)

2 years agoOnly stop receiving stream on `body_stream` if body is empty (#1940)
Marcelo Trylesinski [Thu, 8 Dec 2022 08:18:50 +0000 (09:18 +0100)] 
Only stop receiving stream on `body_stream` if body is empty (#1940)

2 years agoVersion 0.23.0 (#1974) 0.23.0
Marcelo Trylesinski [Mon, 5 Dec 2022 12:35:37 +0000 (13:35 +0100)] 
Version 0.23.0 (#1974)

2 years agoFix `FloatConvertor` regex (#1973)
Marcelo Trylesinski [Sat, 3 Dec 2022 11:16:16 +0000 (12:16 +0100)] 
Fix `FloatConvertor` regex (#1973)

* Bugfix of regex at FloatConvertor (version 2)

For passing your checks of https://github.com/encode/starlette/pull/1942
A correct statement is: regex = r"[0-9]+(\.[0-9]+)?"
Reference: https://www.flake8rules.com/rules/W605.html

I have no problem to corrected without 'r' prefix directly at /site-packages/starlette/convertors.py of my computer.
Having submitted last pull-request, I realized to add a 'r' prefix to pass your tests.

* Add test

Co-authored-by: Ching <thus.kindly@gmail.com>
2 years agoDeprecate `Starlette` and `Router` decorators (#1897)
Marcelo Trylesinski [Sat, 3 Dec 2022 07:54:08 +0000 (08:54 +0100)] 
Deprecate `Starlette` and `Router` decorators (#1897)

2 years agoTest client init to support headers argument (#1966)
Roy Pasternak [Sat, 3 Dec 2022 07:40:48 +0000 (09:40 +0200)] 
Test client init to support headers argument (#1966)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Roy Pasternak <roy@larium.co>
Co-authored-by: Roy Pasternak <roy-pstr>
2 years agoBump mkdocs from 1.4.0 to 1.4.2 (#1971)
dependabot[bot] [Thu, 1 Dec 2022 22:07:48 +0000 (23:07 +0100)] 
Bump mkdocs from 1.4.0 to 1.4.2 (#1971)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump black from 22.8.0 to 22.10.0 (#1969)
dependabot[bot] [Thu, 1 Dec 2022 21:56:18 +0000 (22:56 +0100)] 
Bump black from 22.8.0 to 22.10.0 (#1969)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump types-pyyaml from 6.0.12 to 6.0.12.2 (#1968)
dependabot[bot] [Thu, 1 Dec 2022 21:43:07 +0000 (22:43 +0100)] 
Bump types-pyyaml from 6.0.12 to 6.0.12.2 (#1968)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoBump mypy from 0.971 to 0.991 (#1972)
dependabot[bot] [Thu, 1 Dec 2022 21:28:16 +0000 (22:28 +0100)] 
Bump mypy from 0.971 to 0.991 (#1972)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 years agoFix test_gzip_ignored_for_responses_with_encoding_set w/ brotli (#1962)
Michał Górny [Wed, 23 Nov 2022 08:02:53 +0000 (09:02 +0100)] 
Fix test_gzip_ignored_for_responses_with_encoding_set w/ brotli (#1962)

Closes https://github.com/encode/starlette/pull/1597

2 years agoVersion 0.22.0 (#1910) 0.22.0
Marcelo Trylesinski [Thu, 17 Nov 2022 06:24:34 +0000 (07:24 +0100)] 
Version 0.22.0 (#1910)

2 years agoFix TestClient for extra unquote in query parameters (#1952) (#1953)
Eugenio Panadero [Wed, 16 Nov 2022 18:56:25 +0000 (19:56 +0100)] 
Fix TestClient for extra unquote in query parameters (#1952) (#1953)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agodocs(testclient): change requests url to httpx url (#1937)
arl [Sat, 5 Nov 2022 16:17:32 +0000 (12:17 -0400)] 
docs(testclient): change requests url to httpx url (#1937)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years ago♻️ Add compatibility with the next version of AnyIO (#1936)
Sebastián Ramírez [Fri, 4 Nov 2022 22:58:00 +0000 (23:58 +0100)] 
♻️ Add compatibility with the next version of AnyIO (#1936)

3 years agoIgnore Trio excepthook warning (#1932)
Quentin Pradet [Wed, 2 Nov 2022 21:11:51 +0000 (01:11 +0400)] 
Ignore Trio excepthook warning (#1932)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump typing-extensions from 4.3.0 to 4.4.0 (#1929)
dependabot[bot] [Tue, 1 Nov 2022 20:09:25 +0000 (21:09 +0100)] 
Bump typing-extensions from 4.3.0 to 4.4.0 (#1929)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump mkdocs-material from 8.5.5 to 8.5.7 (#1928)
dependabot[bot] [Tue, 1 Nov 2022 19:18:42 +0000 (20:18 +0100)] 
Bump mkdocs-material from 8.5.5 to 8.5.7 (#1928)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoRemove `greenlet` from `requirements.txt`
Marcelo Trylesinski [Tue, 1 Nov 2022 19:15:12 +0000 (20:15 +0100)] 
Remove `greenlet` from `requirements.txt`

3 years agoBump coverage from 6.4.2 to 6.5.0 (#1930)
dependabot[bot] [Tue, 1 Nov 2022 19:12:18 +0000 (20:12 +0100)] 
Bump coverage from 6.4.2 to 6.5.0 (#1930)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoReplace 3.11-dev by 3.11 on the pipeline (#1924)
Marcelo Trylesinski [Sat, 29 Oct 2022 21:21:49 +0000 (23:21 +0200)] 
Replace 3.11-dev by 3.11 on the pipeline (#1924)

3 years agoTouch up types in MutableHeaders (#1920)
Adrian Garcia Badaracco [Fri, 21 Oct 2022 13:22:30 +0000 (08:22 -0500)] 
Touch up types in MutableHeaders (#1920)

3 years agoMake sure MutableHeaders._list is actually a list (#1917)
Adrian Garcia Badaracco [Fri, 21 Oct 2022 12:57:01 +0000 (07:57 -0500)] 
Make sure MutableHeaders._list is actually a list (#1917)

3 years agoRemove `databases` from tests (#1919)
Marcelo Trylesinski [Thu, 20 Oct 2022 19:22:10 +0000 (21:22 +0200)] 
Remove `databases` from tests (#1919)

3 years agoBypass GZipMiddleware when response includes `Content-Encoding` (#1901)
kklingenberg [Wed, 12 Oct 2022 14:15:29 +0000 (11:15 -0300)] 
Bypass GZipMiddleware when response includes `Content-Encoding` (#1901)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoInstall latest pip on `install` script (#1894)
Marcelo Trylesinski [Sat, 8 Oct 2022 09:30:42 +0000 (11:30 +0200)] 
Install latest pip on `install` script (#1894)

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoAdd starlette_babel lib (#1906)
Alex Oleshkevich [Sat, 8 Oct 2022 03:41:54 +0000 (06:41 +0300)] 
Add starlette_babel lib (#1906)

3 years agoAdd edit button on documentation pages
Ayush Sharma [Fri, 7 Oct 2022 15:25:42 +0000 (20:55 +0530)] 
Add edit button on documentation pages

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoRemove unneeded installation on `install` script (#1895)
Marcelo Trylesinski [Thu, 6 Oct 2022 14:27:23 +0000 (16:27 +0200)] 
Remove unneeded installation on `install` script (#1895)

Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agotouch up TestClient type annotations (#1890)
Adrian Garcia Badaracco [Wed, 5 Oct 2022 19:26:44 +0000 (14:26 -0500)] 
touch up TestClient type annotations (#1890)

3 years agoIgnore `type: ignore` without code error (#1893)
Marcelo Trylesinski [Wed, 5 Oct 2022 18:40:04 +0000 (20:40 +0200)] 
Ignore `type: ignore` without code error (#1893)

3 years agoFix note about deprecation on `0.16.0` release notes (#1887)
Marcelo Trylesinski [Mon, 3 Oct 2022 17:57:39 +0000 (19:57 +0200)] 
Fix note about deprecation on `0.16.0` release notes (#1887)

3 years agoPin importlib-metadata to 4.13.0 in CI (#1886)
Marcelo Trylesinski [Mon, 3 Oct 2022 17:09:42 +0000 (19:09 +0200)] 
Pin importlib-metadata to 4.13.0 in CI (#1886)

3 years agoBump mkdocs-material from 8.4.2 to 8.5.5 (#1883)
dependabot[bot] [Mon, 3 Oct 2022 09:38:02 +0000 (11:38 +0200)] 
Bump mkdocs-material from 8.4.2 to 8.5.5 (#1883)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoBump types-pyyaml from 6.0.11 to 6.0.12 (#1884)
dependabot[bot] [Sat, 1 Oct 2022 19:19:03 +0000 (21:19 +0200)] 
Bump types-pyyaml from 6.0.11 to 6.0.12 (#1884)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump pytest from 7.1.2 to 7.1.3 (#1880)
dependabot[bot] [Sat, 1 Oct 2022 19:09:13 +0000 (21:09 +0200)] 
Bump pytest from 7.1.2 to 7.1.3 (#1880)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump mkautodoc from 0.1.0 to 0.2.0 (#1881)
dependabot[bot] [Sat, 1 Oct 2022 19:05:29 +0000 (21:05 +0200)] 
Bump mkautodoc from 0.1.0 to 0.2.0 (#1881)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoAdd project URLs to `pyproject.toml` (#1875)
Marcelo Trylesinski [Thu, 29 Sep 2022 15:10:51 +0000 (17:10 +0200)] 
Add project URLs to `pyproject.toml` (#1875)

3 years agoRemove note about `BackgroundTasks` being a limitation on the `BaseHTTPMiddleware...
Marcelo Trylesinski [Wed, 28 Sep 2022 06:14:05 +0000 (08:14 +0200)] 
Remove note about `BackgroundTasks` being a limitation on the `BaseHTTPMiddleware` (#1874)

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
3 years agoAdd missing import on `HTTPSRedirectMiddleware` docs section (#1873)
TheOnlyWayUp [Tue, 27 Sep 2022 17:30:06 +0000 (13:30 -0400)] 
Add missing import on `HTTPSRedirectMiddleware` docs section (#1873)

3 years agoVersion 0.21.0 (#1812) 0.21.0
Marcelo Trylesinski [Mon, 26 Sep 2022 17:09:36 +0000 (18:09 +0100)] 
Version 0.21.0 (#1812)

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
3 years agoReplace task cancellation in `BaseHTTPMiddleware` with `http.disconnect`+`recv_stream...
Jean Hominal [Sat, 24 Sep 2022 05:29:08 +0000 (07:29 +0200)] 
Replace task cancellation in `BaseHTTPMiddleware` with `http.disconnect`+`recv_stream.close` (#1715)

* replace BaseMiddleware cancellation after request send with closing recv_stream + http.disconnect in receive

fixes #1438

* Add no cover pragma on pytest.fail in tests/middleware/test_base.py

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
* make http_disconnect_while_sending test more robust in the face of scheduling issues

* Fix issue with running middleware context manager

Reported in https://github.com/encode/starlette/issues/1678#issuecomment-1172916042

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoImplement __repr__ for route classes (#1864)
Alex Oleshkevich [Fri, 23 Sep 2022 12:54:55 +0000 (15:54 +0300)] 
Implement __repr__ for route classes (#1864)

* implement __repr__ for Route

* implemenr __repr__ for WebSocketRoute, Host, and Mount.

* fix linting issues

* change repr format

* force repr() for inner apps

* Update starlette/routing.py

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

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

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

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

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

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

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

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

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
* fix linting issues and tests

* remove repr from Router

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoAdd official support for Python 3.11 (#1863)
Marcelo Trylesinski [Thu, 22 Sep 2022 15:18:44 +0000 (17:18 +0200)] 
Add official support for Python 3.11 (#1863)

3 years agoAdd Mount(..., middleware=[...]) (#1649)
Adrian Garcia Badaracco [Wed, 21 Sep 2022 19:02:41 +0000 (14:02 -0500)] 
Add Mount(..., middleware=[...]) (#1649)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
Co-authored-by: Aber <me@abersheeran.com>
3 years agoAdd `Starlette-Admin` to third party package section (#1853)
Jocelin Hounon [Thu, 8 Sep 2022 05:06:23 +0000 (06:06 +0100)] 
Add `Starlette-Admin` to third party package section (#1853)

3 years agoReplace HTTP client on TestClient from `requests` to `httpx` (#1376)
Marcelo Trylesinski [Tue, 6 Sep 2022 05:43:32 +0000 (07:43 +0200)] 
Replace HTTP client on TestClient from `requests` to `httpx` (#1376)

3 years agoRemove reference to `DatabaseMiddleware` in the documentation (#1845)
Marcelo Trylesinski [Tue, 6 Sep 2022 04:46:00 +0000 (06:46 +0200)] 
Remove reference to `DatabaseMiddleware` in the documentation (#1845)

3 years agoAdd `WebSocketException` and support for WS handlers (#1263)
Marcelo Trylesinski [Mon, 5 Sep 2022 12:31:59 +0000 (14:31 +0200)] 
Add `WebSocketException` and support for WS handlers (#1263)

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoAdd missing `Middleware` import on `BaseHTTPMiddleware` section (#1844)
Marcelo Trylesinski [Mon, 5 Sep 2022 06:35:52 +0000 (08:35 +0200)] 
Add missing `Middleware` import on `BaseHTTPMiddleware` section (#1844)

3 years agoAdd fake setup.py (#1836)
Marcelo Trylesinski [Fri, 2 Sep 2022 06:03:17 +0000 (08:03 +0200)] 
Add fake setup.py (#1836)

3 years agoBump databases[sqlite] from 0.5.5 to 0.6.1 (#1842)
dependabot[bot] [Thu, 1 Sep 2022 19:59:38 +0000 (21:59 +0200)] 
Bump databases[sqlite] from 0.5.5 to 0.6.1 (#1842)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump autoflake from 1.4 to 1.5.3 (#1839)
dependabot[bot] [Thu, 1 Sep 2022 19:22:16 +0000 (21:22 +0200)] 
Bump autoflake from 1.4 to 1.5.3 (#1839)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump black from 22.6.0 to 22.8.0 (#1841)
dependabot[bot] [Thu, 1 Sep 2022 19:14:47 +0000 (21:14 +0200)] 
Bump black from 22.6.0 to 22.8.0 (#1841)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoBump mkdocs-material from 8.3.9 to 8.4.2 (#1838)
dependabot[bot] [Thu, 1 Sep 2022 19:10:26 +0000 (21:10 +0200)] 
Bump mkdocs-material from 8.3.9 to 8.4.2 (#1838)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years agoUpdate package metadata (#1819)
Ofek Lev [Wed, 24 Aug 2022 05:50:13 +0000 (01:50 -0400)] 
Update package metadata (#1819)

3 years agoRemove unecessary override of Headers.get (#1810)
Adrian Garcia Badaracco [Sun, 14 Aug 2022 10:39:02 +0000 (05:39 -0500)] 
Remove unecessary override of Headers.get (#1810)

3 years agoAdd Starception library (#1800)
Alex Oleshkevich [Wed, 10 Aug 2022 10:05:00 +0000 (13:05 +0300)] 
Add Starception library (#1800)

Co-authored-by: euri10 <benoit.barthelet@gmail.com>
3 years agoImprove wording and structure of pure ASGI middleware docs (#1723)
Florimond Manca [Tue, 9 Aug 2022 10:08:52 +0000 (12:08 +0200)] 
Improve wording and structure of pure ASGI middleware docs (#1723)

* Improve wording and structure of pure ASGI middleware docs

* Address feedback

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
3 years agoUpdate requests.md (#1792)
Marcelo Trylesinski [Sat, 6 Aug 2022 21:46:06 +0000 (23:46 +0200)] 
Update requests.md (#1792)