Commit Graph

1415 Commits

Author SHA1 Message Date
Renan Heckert Leal 672cd427fa
Add `pragma: no branch` in `middleware/exceptions.py`
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-12-13 23:10:16 +00:00
Renan Heckert Leal 5000c9fc9c
tests: Add skipped coverages for `websockets.py` and `templating.py` using `branch=true` (#2793)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-12-13 22:43:43 +00:00
Simon Gurcke f57b0832be
docs: Update description for third-party package Apitally (#2794) 2024-12-13 20:39:26 +01:00
Marcelo Trylesinski 8a99adfb58
docs: use `transport` instead of directly pass the app to AsyncClient (#2784) 2024-12-05 09:53:54 +01:00
Daniel Bowring d40bc9e5e1
Update documentation link for python-multipart (#2782) 2024-12-04 06:33:59 +01:00
dependabot[bot] db5063c260
Bump the python-packages group with 5 updates (#2779)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-12-03 07:09:27 +00:00
Victor Westerhuis ca1f45dc12
Use ETag from headers when parsing If-Range in FileResponse (#2761) 2024-12-03 08:07:22 +01:00
涵曦 eee4cdcb9a
Fix: Resolve the issue where the directory itself being a symlink does not work. (#2711) 2024-12-01 17:46:16 +01:00
Marcelo Trylesinski b68a142a35
Replace `mkautodoc` by `mkdocstrings` (#2776) 2024-11-30 12:41:25 +01:00
Sean Chen 35dae138a0
test: add tests in `test_routing` (#2676)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-11-30 09:58:59 +00:00
Marcelo Trylesinski 5ccbc62175
Pin httpx in `full` extra (#2773) 2024-11-30 10:53:55 +01:00
Marcelo Trylesinski 0ba83959e6 bump-python-multipart 2024-11-30 10:52:32 +01:00
Eugene Toder 13d0c1fbcd
Make _MiddlewareFactory compatible with Callable (#2768) 2024-11-26 01:28:34 -06:00
Logan Connolly 009a3bab62
docs: fix typo in applications example (#2763) 2024-11-24 16:00:32 +01:00
Yurii Karabas ad7ff0800d
Fix issue with broken link in release notes (#2758) 2024-11-19 14:50:07 +01:00
Marcelo Trylesinski 7d586f7e39
Support for `send` client disconnect to HTTP (#2732) 2024-11-18 21:56:13 +01:00
dependabot[bot] 530cbf63f7
Bump the python-packages group with 6 updates (#2743)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-11-18 21:19:15 +01:00
Marcelo Trylesinski 1a8efba9c8
Version 0.41.3 (#2754) 2024-11-18 20:43:25 +01:00
Hao Guan 9dc9d2e929
fix(testclient): exclude query sting from `raw_path` (#2716)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-11-18 20:28:43 +01:00
rijenkii cc1e2d7a2f
Replace `dict` by `Mapping` on `HTTPException.headers` (#2749) 2024-11-18 20:00:58 +01:00
Yurii Karabas 427a8dcf35
Fix issue with middleware args passing (#2752) 2024-11-14 17:34:22 -06:00
Marcelo Trylesinski c2e3a39b09
Match httpx documentation style (#2742) 2024-10-31 08:05:06 +01:00
Marcelo Trylesinski afeb7c2d12
Version 0.41.2 (#2740) 2024-10-27 09:18:54 +01:00
Marcelo Trylesinski f9ffd6239b
Revert bump on `python-multipart` (#2737) 2024-10-27 09:11:05 +01:00
Marcelo Trylesinski 18bbb5c948
Version 0.41.1 (#2736) 2024-10-24 16:39:47 +02:00
Marcelo Trylesinski 342410d250
Bump minimum `python-multipart` version to 0.0.13 (#2734) 2024-10-20 14:25:43 +02:00
Marcelo Trylesinski 837720016f
Change `python-multipart` import to `python_multipart` (#2733) 2024-10-20 14:20:25 +02:00
Marcelo Trylesinski 46131a1af8
Version 0.41.0 (#2729) 2024-10-15 19:30:20 +02:00
Marcelo Trylesinski 99b6938363
Allow to raise `HTTPException` before `websocket.accept()` (#2725)
* Allow to raise `HTTPException` before `websocket.accept()`

* move <<

* Add documentation
2024-10-15 09:50:49 +02:00
Marcelo Trylesinski 4ded4b7ac5
Version 0.40.0 (#2728) 2024-10-15 08:49:52 +02:00
Marcelo Trylesinski fd038f3070
Merge commit from fork 2024-10-15 08:40:51 +02:00
dependabot[bot] e11684013f
Bump the python-packages group with 6 updates (#2713)
Bumps the python-packages group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [importlib-metadata](https://github.com/python/importlib_metadata) | `8.4.0` | `8.5.0` |
| [ruff](https://github.com/astral-sh/ruff) | `0.6.3` | `0.6.8` |
| [types-pyyaml](https://github.com/python/typeshed) | `6.0.12.20240808` | `6.0.12.20240917` |
| [pytest](https://github.com/pytest-dev/pytest) | `8.3.2` | `8.3.3` |
| [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.34` | `9.5.39` |
| [build](https://github.com/pypa/build) | `1.2.1` | `1.2.2` |


Updates `importlib-metadata` from 8.4.0 to 8.5.0
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v8.4.0...v8.5.0)

Updates `ruff` from 0.6.3 to 0.6.8
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.6.3...0.6.8)

Updates `types-pyyaml` from 6.0.12.20240808 to 6.0.12.20240917
- [Commits](https://github.com/python/typeshed/commits)

Updates `pytest` from 8.3.2 to 8.3.3
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.2...8.3.3)

Updates `mkdocs-material` from 9.5.34 to 9.5.39
- [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/9.5.34...9.5.39)

Updates `build` from 1.2.1 to 1.2.2
- [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/1.2.1...1.2.2)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: types-pyyaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: build
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-02 08:49:29 +02:00
Marcelo Trylesinski 0b50b9c4ab
Version 0.39.2 (#2710) 2024-09-29 12:33:42 +02:00
Joel Sleppy fe46d99d92
Support `request.url_for` when only "app" scope is avaialable (#2672)
* Support request.url_for in BaseMiddleware

* Move test to test_requests

* Call the endpoint properly

* fix test

* order the type hint

---------

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-09-29 09:40:23 +00:00
Marcelo Trylesinski 1a6018e08a
Support python-multipart 0.0.12 (#2708) 2024-09-29 10:28:34 +02:00
Marcelo Trylesinski fa7b382a66
Version 0.39.1 (#2706)
* Version 0.39.1

* Update docs/release-notes.md

* Update docs/release-notes.md

* Update docs/release-notes.md
2024-09-25 17:24:24 +02:00
Trim21 075efd0c5c
generate boundary with token_hex (#2702)
* generate boundary with token_hex

* generate boundary with token_hex

* fix

* boundary size

* Update starlette/responses.py

---------

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-09-25 11:27:55 +00:00
Marcelo Trylesinski b8139f9fe3
Consider `FileResponse.chunk_size` when handling multiple ranges (#2703)
* Take in consideration the `FileResponse.chunk_size` on multiple ranges

* Update starlette/responses.py

* Update starlette/responses.py

* Update starlette/responses.py

Co-authored-by: Frost Ming <mianghong@gmail.com>

---------

Co-authored-by: Frost Ming <mianghong@gmail.com>
2024-09-25 09:16:08 +02:00
Orenoid 4fbf766b3e
test: add tests in `test_requests` (#2677)
* test: add tests in test_requests

* test: add test for Request.close method

* fix: typo

* test: ignore conditional branch in coverage report and remove unnecessary test

* test: pragma no branch

---------

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-09-23 18:38:19 +00:00
Trim21 d289ac7e8d
perf: stop use `re` on `get_route_path` (#2701)
* perf: stop use re on get_route_path

* add test
2024-09-23 20:23:34 +02:00
Trim21 9d4d5a5f3b
perf: avoid regex re-compile (#2700)
* perf

* format

* avoid

* fix
2024-09-23 08:54:17 +02:00
Marcelo Trylesinski 65bfd74307
Version 0.39.0 (#2699) 2024-09-23 08:13:56 +02:00
Marcelo Trylesinski 69ed26a859
Add support for HTTP Range to `FileResponse` (#2697)
* Add support for HTTP Range to `FileResponse`

* Remove pragmas

* Single line
2024-09-23 09:20:21 +08:00
Marcelo Trylesinski 8d0cff820f
Version 0.38.6 (#2698) 2024-09-22 18:58:20 +02:00
Moataz Elmasry 6d70ad3ba8
Close unclosed `MemoryObjectReceiveStream` in `TestClient` (#2693) 2024-09-22 18:54:30 +02:00
Marcelo Trylesinski 2d0dde8def
Version 0.38.5 (#2689)
* Version 0.38.5

* Update release-notes.md

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

---------

Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2024-09-08 10:49:21 +01:00
Adrian Garcia Badaracco 53f9dc02be
Fix `BackgroundTasks` with `BaseHTTPMiddleware` (#2688)
* Streaming response early disconnect mode

* Fix BackgroundTasks with BaseHTTPMiddleware

* move comment

* initialize field

---------

Co-authored-by: Dmitry Maliuga <dmaliuga@fireworks.ai>
2024-09-07 13:42:54 +01:00
dependabot[bot] 8e1fc9b3d1
Bump the python-packages group with 9 updates (#2683)
* Bump the python-packages group with 9 updates

Bumps the python-packages group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [coverage](https://github.com/nedbat/coveragepy) | `7.6.0` | `7.6.1` |
| [importlib-metadata](https://github.com/python/importlib_metadata) | `8.2.0` | `8.4.0` |
| [mypy](https://github.com/python/mypy) | `1.11.1` | `1.11.2` |
| [ruff](https://github.com/astral-sh/ruff) | `0.5.5` | `0.6.3` |
| [types-pyyaml](https://github.com/python/typeshed) | `6.0.12.20240724` | `6.0.12.20240808` |
| [trio](https://github.com/python-trio/trio) | `0.26.1` | `0.26.2` |
| [attrs](https://github.com/sponsors/hynek) | `23.2.0` | `24.2.0` |
| [mkdocs](https://github.com/mkdocs/mkdocs) | `1.6.0` | `1.6.1` |
| [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.30` | `9.5.34` |


Updates `coverage` from 7.6.0 to 7.6.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/7.6.0...7.6.1)

Updates `importlib-metadata` from 8.2.0 to 8.4.0
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v8.2.0...v8.4.0)

Updates `mypy` from 1.11.1 to 1.11.2
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11.1...v1.11.2)

Updates `ruff` from 0.5.5 to 0.6.3
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.5.5...0.6.3)

Updates `types-pyyaml` from 6.0.12.20240724 to 6.0.12.20240808
- [Commits](https://github.com/python/typeshed/commits)

Updates `trio` from 0.26.1 to 0.26.2
- [Release notes](https://github.com/python-trio/trio/releases)
- [Commits](https://github.com/python-trio/trio/compare/v0.26.1...v0.26.2)

Updates `attrs` from 23.2.0 to 24.2.0
- [Commits](https://github.com/sponsors/hynek/commits)

Updates `mkdocs` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/mkdocs/mkdocs/releases)
- [Commits](https://github.com/mkdocs/mkdocs/compare/1.6.0...1.6.1)

Updates `mkdocs-material` from 9.5.30 to 9.5.34
- [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/9.5.30...9.5.34)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: importlib-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-packages
- dependency-name: types-pyyaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: trio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: attrs
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: python-packages
- dependency-name: mkdocs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-packages
...

Signed-off-by: dependabot[bot] <support@github.com>

* Apply suggestions from code review

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2024-09-01 19:42:35 +00:00
Marcelo Trylesinski 616e682114
Remove short logo from documentation (#2682) 2024-09-01 20:48:01 +02:00
Marcelo Trylesinski 831418ac1e
Version 0.38.4 (#2681) 2024-09-01 17:14:29 +02:00