Commit Graph

10 Commits

Author SHA1 Message Date
Abhinav Singh ebf3599abb
Bump pip group for benchmark comparisions to fix security scanner reports (#1479) 2024-09-21 12:33:42 +05:30
Abhinav Singh 0bfd7d7fdb
Fix client for HTTPS endpoints with Python 3.12 (#1454)
* Fix client for HTTPS endpoints for python 3.12

* Use only `DEFAULT_SSL_CONTEXT_OPTIONS` to prevent `CRIME` attacks

* lint fix

* install certifi types

* pre commit

* Avoid using dep options for >=3.10

* More tests

* Fix lint issues

* Use `3.12` by default everywhere

* Skip `grout -h` test on windows

* Add http only test

* Rollback to python versions, 3.12 causes doc/lint failures

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Keep proxy.py benchmarking on so that users dont run into surprises

* Install certifi

* No need of certifi

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-12 18:08:52 +05:30
Abhinav Singh 2fa320d03f
Python 3.11 support (#1384)
* Changes for Python 3.11 support

* Updated README.md for versioning info

* Update `httpx==0.27.0` to avoid `cgi` deprecation warning from pytest on Python 3.11

* Make tests work for 3.11

* Declare support for 3.11

* Use 3.11-alpine for Docker images

* Preserve pylint version for `python_version <= 3.10`

* Preserve httpx version for <= 3.10

* `httpx` usage fix in tests for <=3.10

* Adjust pylint and pytest for >= 3.11

* Use 3.11.8, bad-option-value and httpx proxies fix

* tox for 3.11

* Fix for `TOXENV: py`

* -vv for pytest

* Downgrade to `pytest-asyncio==0.21.1`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove asyncio_mode=strict

* try with `pytest-cov==4.1.0` for 3.11

* bump coverage for 3.11

* Try `3.11` in GitHub workflow which installs >3.11.8 unavailable via pyenv yet

* Revert back to `-v`

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-13 13:22:25 +05:30
Abhinav Singh ddc96d4c09
Update project test dependencies to ensure green workflow (#1371)
* Use www.google.com for http2 tests

* Update README.md

Add missing tutorial's link

(cherry picked from commit e459f932cd)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* System packages for readthedocs

* Pin pyyaml, see https://github.com/yaml/pyyaml/issues/724\#issuecomment-1638587228

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Ignore flake8 S507

* precommit `pyyaml==5.3.1`

* follow https://github.com/yaml/pyyaml/issues/724

* pin to essentials_openapi==0.1.4 for blacksheep

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove blacksheep dep

* remove system_packages

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Check if tox upgrade helps with `ERROR: FAIL could not package project ` tox related issues

* Fix links

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use `importlib.metadata` instead of `pkg_resources`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Just remove link from plugin docstring for now

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pin `sphinxcontrib-applehelp==1.0.2` which is breaking spellcheck

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Pin `sphinxcontrib-*`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pin `towncrier` too

* add kwargs as a spelling

* `_get_dist` backward compatible with 3.6

* Use `httpbingo.org` instead of `httpbin.org` in tests making network requests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use `httpbingo` for reverse proxy plugin too which is tested in workflows

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `importlib-metadata; python_version <= 3.7`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Integration test changes due to usage of httpbingo instead of httpbin

* `importlib-metadata; python_version <= 3.7` moved to build essentials and bypass reverse proxy integration test result verification for now

* Filter and ignore `DeprecationWarning` to make it work on 3.7

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* with deprecation ignore we dont need `importlib-metadata`

---------

Co-authored-by: Wermeille Bastien <bastien.wermeille@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-11 13:04:10 +05:30
Abhinav Singh f4e480b8e8
[v2.4.3] Support for dynamic reverse proxy routes (#1188)
* Merge pull request #1162 from abhinavsingh/master

v2.4.2 (#1158)

* pip prod(deps): bump blacksheep from 1.2.2 to 1.2.7 (#1161)

Bumps [blacksheep](https://github.com/Neoteroi/BlackSheep) from 1.2.2 to 1.2.7.
- [Release notes](https://github.com/Neoteroi/BlackSheep/releases)
- [Changelog](https://github.com/Neoteroi/BlackSheep/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Neoteroi/BlackSheep/compare/v1.2.2...v1.2.7)

---
updated-dependencies:
- dependency-name: blacksheep
  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>

* Bump fregante/setup-git-user from 1.0.1 to 1.1.0 (#1160)

Bumps [fregante/setup-git-user](https://github.com/fregante/setup-git-user) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/fregante/setup-git-user/releases)
- [Commits](https://github.com/fregante/setup-git-user/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: fregante/setup-git-user
  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>

* npm: bump ts-node from 10.7.0 to 10.8.0 in /dashboard (#1159)

Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.7.0 to 10.8.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.7.0...v10.8.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  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>

* npm: bump ws from 8.5.0 to 8.6.0 in /dashboard (#1165)

Bumps [ws](https://github.com/websockets/ws) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.5.0...8.6.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
  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>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>

* Delete FUNDING.yml

* pip prod(deps): bump pytest from 6.2.5 to 7.0.1 (#1164)

Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.1.
- [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/6.2.5...7.0.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>

* pip prod(deps): bump rope from 0.22.0 to 1.1.1 (#1167)

Bumps [rope](https://github.com/python-rope/rope) from 0.22.0 to 1.1.1.
- [Release notes](https://github.com/python-rope/rope/releases)
- [Changelog](https://github.com/python-rope/rope/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-rope/rope/compare/0.22.0...1.1.1)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pip prod(deps): bump starlette from 0.17.1 to 0.19.1 (#1168)

Bumps [starlette](https://github.com/encode/starlette) from 0.17.1 to 0.19.1.
- [Release notes](https://github.com/encode/starlette/releases)
- [Changelog](https://github.com/encode/starlette/blob/master/docs/release-notes.md)
- [Commits](https://github.com/encode/starlette/compare/0.17.1...0.19.1)

---
updated-dependencies:
- dependency-name: starlette
  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>

* pip prod(deps): bump mypy from 0.940 to 0.960 (#1170)

Bumps [mypy](https://github.com/python/mypy) from 0.940 to 0.960.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.940...v0.960)

---
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>

* Create FUNDING.yml

* Address yaml lint

* Bump actions/cache from 3.0.2 to 3.0.4 (#1185)

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.2 to 3.0.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.2...v3.0.4)

---
updated-dependencies:
- dependency-name: actions/cache
  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>

* Bump actions/setup-python from 3 to 4 (#1186)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pip prod(deps): bump py-spy from 0.3.11 to 0.3.12 (#1174)

Bumps [py-spy](https://github.com/benfred/py-spy) from 0.3.11 to 0.3.12.
- [Release notes](https://github.com/benfred/py-spy/releases)
- [Changelog](https://github.com/benfred/py-spy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benfred/py-spy/compare/v0.3.11...v0.3.12)

---
updated-dependencies:
- dependency-name: py-spy
  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>

* pip prod(deps): bump mypy from 0.960 to 0.961 (#1187)

Bumps [mypy](https://github.com/python/mypy) from 0.960 to 0.961.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.960...v0.961)

---
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>

* Add support for dynamic reverse proxy routing (#1180)

* Add support for dynamic reverse proxy routing.

Plugins must implement the `handle_route(self, request, pattern) -> Url`
method from the base class to provide a choice of upstream url to serve.

This work is backward compatible a.k.a. Old style static route patterns
with hardcoded upstream urls will continue to work as-is.

See `ReverseProxyBasePlugin` documentation for more details.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address type issues

* Fix spellcheck

* Attempt to solve type errors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Py3.8 also doesnt allow subscriptable pattern type

* Remove debug print

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-06-11 22:56:01 +05:30
dependabot[bot] e653d5b933
pip prod(deps): bump blacksheep from 1.2.1 to 1.2.2 (#885)
Bumps [blacksheep](https://github.com/Neoteroi/BlackSheep) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/Neoteroi/BlackSheep/releases)
- [Changelog](https://github.com/Neoteroi/BlackSheep/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Neoteroi/BlackSheep/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: blacksheep
  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>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2021-12-21 01:27:15 +05:30
dependabot[bot] ba6b45d56d
pip prod(deps): bump uvicorn from 0.15.0 to 0.16.0 (#857)
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: uvicorn
  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>
2021-12-09 15:02:10 +05:30
Abhinav Singh 921f2b56e0
Optimizations & Update Benchmark Results (#832)
* Bail out of lock earlier

* Avoid calling `get_events` for unfinished work tasks.  Use `cached_property` for `HttpParser` optimization

* Add `type: ignore[no-any-return]`, odd scenario

* We dont have to rebuild response packet repeatedly within `WebServerPlugin`

* Parse line and header in one invocation

* Minor optimizations and update benchmark to use `oha` instead of `hey`

* Remove `flask` from benchmark, only benchmark `asgi` or `async` based libraries.  Use `uvicorn` and 10 workers for `blacksheep`.  Use `oha` instead of `hey`

* Add benchmark for `starlette`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add missing dep

* pre-commit

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-01 04:18:49 +05:30
Abhinav Singh 68df66fed5
Add `benchmark` results to `README.md` (#828)
* Add benchmark results to top-level README

* mypy

* Push down WIP example

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Spelling

* Link rtfd within `Internal Documentation` for now

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-30 00:10:04 +05:30
Abhinav Singh af31564a4d
Add benchmarks comparison for `proxy.py`, `tornado`, `aiohttp`, `flask` (#827)
* Add benchmarks for `proxy.py`, `tornado`, `aiohttp`, `flask`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Lint happy

* Disable W0223 for tornado

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-29 20:20:23 +05:30