proxy.py/tests
Abhinav Singh 0a038ce8be
Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714)
* Allow overriding work_klass via Proxy context manager kwargs

* Decouple acceptor and executor pools

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

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

* Add `--num_acceptors` flag and better load balancing

* Remove unused

* Lint errors

* Another arg not kwarg

* Move start work staticmethods within ExecutorPool

* mypy fixes

* Update README with `--num-acceptors` flag

* Rename `Proxy.pool` to `Proxy.acceptors`

* Add SetupShutdownContextManager abstraction

* Match --num-acceptors logic with PR description

* Rename executor utility methods and add docstring

* Remove work_klass from constructors and pass it via flags

* Update docstring for pools as they no longer accept a work_klass argument

* Turn work_klass into a flag.  main() no longer accepts input_args (only kwargs opts).  Similarly, Proxy doesnt accept any input_args now (only kwargs opts)

* Expose default work klass in README

* Expose `HttpProtocolHandler` and `HttpProtocolHandlerPlugin` within `proxy.http` module

* Start to fix tests

* Fix tests

* mypy and flake8

* Trailing comma

* Remove unused var

* Unused arg

* uff

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-10 04:27:40 +05:30
..
benchmark Initialize Menubar (#188) 2019-11-22 15:18:01 -08:00
common Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714) 2021-11-10 04:27:40 +05:30
core Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714) 2021-11-10 04:27:40 +05:30
dashboard Test Dashboard backend (#206) 2019-11-30 22:54:20 -08:00
http Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714) 2021-11-10 04:27:40 +05:30
integration Correct spelling mistakes caught by `codespell` (#656) 2021-11-03 17:33:05 +05:30
plugin Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714) 2021-11-10 04:27:40 +05:30
testing Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714) 2021-11-10 04:27:40 +05:30
__init__.py Initialize Menubar (#188) 2019-11-22 15:18:01 -08:00
test_circular_imports.py Fix python 3.10 @ ubuntu pytest ignore (#685) 2021-11-06 17:25:32 +05:30
test_main.py Add `--num-acceptors` flag + Allow `work_klass` via `Proxy` context manager kwargs (#714) 2021-11-10 04:27:40 +05:30
test_set_open_file_limit.py Rename `Proxy.initialize` as `FlagParser.initialize` (#696) 2021-11-07 23:02:34 +05:30