Commit Graph

11 Commits

Author SHA1 Message Date
Abhinav Singh d1920460d0
Pre `v2.4.0rc8` cleanups (#1053)
* Pre-release cleanups

* Add listener pool test

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

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

* Add multi listener test

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

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-24 11:36:51 +05:30
Abhinav Singh 627b42f923
Handle `SIGINFO`. Try `kill -s INFO <pid>`. (#1024)
* Handle `SIGINFO`.  Try `kill -s INFO <pid>`.

Also remove dirty hack added in flags to incorporate `--basic-auth`
flag.  Add `__pycache__` to ignore list.  Disable http proxy
during acceptor benchmark.

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

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

* not on windows

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

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

* no cover

* # pylint: disable=E1101

* Curl retry on error and check_output 2 minute timeout

* check output timeout None

* Update `faulthandler_timeout` to 2 minutes

* Disable `test_circular_imports`, `isort` integration now works

* Fix curl flags

* Revert back to older flags

* SIGINFO attribute might not even exist

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-20 23:54:44 +05:30
Abhinav Singh 54e74a911f
[isort] Lib modules (#1016)
* isort `proxy.py` main class

* isort init and main

* isort common

* pre-commit fix

* isort dashboard and testing

* isort plugins

* isort core

* Only sort top level http py files

* isort http exception and websocket

* Remove proxy auth plugin from proxy package exports and force discover `PLUGIN_PROXY_AUTH` flags

* isort parser and web server

* no setattr

* isort all

* Enable pre-commit isort hook

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

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-20 15:34:54 +05:30
Abhinav Singh 99856a6aa7
Change `--local-executor` flag semantics (#907)
* Convert `--local-executor` in an integer flag, defaults to 1 i.e. enabled, use 0 to disable

* Consider any value other than 1 as remote mode

* Use integer to disable local executor mode in integration tests

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

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

* Fix mypy errors

* Update flags in readme

* Check for type

* Remove pid file check for now

* Update `--local-executor` flag usage

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-27 10:23:38 +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
Abhinav Singh 0a9b9a0e34
Use `--local-executor` flag by default for Docker container (#880)
* Benchmark gets packaged within wheel if set as a package

* Use `--local-executor` flag by default for Docker containers

* Dockerfile update

* Fix mypy issues

* Remove conflicting dir names

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

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

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-19 12:48:05 +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 257d237b46
`task.result` can throw (#837)
* `task.result` can raise exception

* Remove redundant `except`

* Fix doc spell.  We need to fix it well, currently strategy feels dumb and PITA

* Move common words within `spelling_wordlist.txt`
2021-12-01 19:54:00 +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