proxy.py/.vscode/settings.json

60 lines
1.7 KiB
JSON
Raw Normal View History

2021-11-19 19:55:05 +00:00
{
"editor.rulers": [100],
"editor.formatOnSaveMode": "modifications",
"editor.formatOnSave": true,
2021-11-19 19:55:05 +00:00
"editor.codeActionsOnSave": {
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 e459f932cdb54c37ac6343470eed8581396b642b) * [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 07:34:10 +00:00
"source.fixAll": "explicit"
2021-11-19 19:55:05 +00:00
},
"[yaml]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.autoIndent": "advanced",
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"typescript.format.semicolons": "remove",
"typescript.preferences.quoteStyle": "single",
"[python]": {
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 e459f932cdb54c37ac6343470eed8581396b642b) * [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 07:34:10 +00:00
"editor.wordBasedSuggestions": "matchingDocuments",
"editor.defaultFormatter": "ms-python.black-formatter"
},
2021-11-19 19:55:05 +00:00
"python.testing.unittestEnabled": false,
"python.testing.autoTestDiscoverOnSaveEnabled": true,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["tests"],
"python.linting.enabled": true,
"python.linting.lintOnSave": true,
"python.linting.ignorePatterns": [
".tox/**/*.py",
".vscode/*.py",
".venv*/**/*.py",
"venv*/**/*.py",
"docs/**/*.py",
2022-01-01 07:06:27 +00:00
"helper/**/*.py"
2021-11-19 19:55:05 +00:00
],
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": ["--generate-members"],
"python.linting.flake8Enabled": true,
Async `get_events`, `handle_event`, `handle_readables`, `handle_writables` (#769) * Asynchronous `handle_event` and `LocalExecutor` thread * Bail out on first task completion * mypy * Add `helper/benchmark.sh` and fix threaded which must now use asyncio (reduced performance of threaded) * Print open file diff from `benchmark.sh` * Add `--local-executor` flag, disabled by default for now until tests are updated * Async `handle_readables` and `handle_writables` for `HttpProtocolHandlerPlugin` interface (doesnt impact proxy/web plugins for now) * Async `get_events` * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Address tests after async changes * mypy and flake8 * spelldoc * `check.py` and trailing comma * Rename to `_assertions.py` * Add missing `pytest-mock` and `pytest-asyncio` deps * Add `pytest-mock` to `pylint` deps * Correct use of `parameterize` and add `PT007` to flake8 ignores * Fix mypy hints broken for `< Python3.9` * Remove usage of `asynccontextmanager` which is not available for all Python versions that `proxy.py` supports * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix for pre-python-3.9 versions * `AsyncTask` apis `set_name` and `get_name` are not available on all supported versions * Install setuptools via `lib-dep` until we recommend editable install * Deprecate support for `Python 3.6` * Use recommendation suggested here https://github.com/abhinavsingh/proxy.py/pull/769\#discussion_r753840929 * Address recommendation here https://github.com/abhinavsingh/proxy.py/pull/769\#discussion_r753841906 * Make `Threadless` agnostic of `multiprocessing.Process` * Acceptors must dispatch to local executor in non-blocking fashion * No daemon for executor processes and fix shutdown logic * Only return fds from `_selected_events` not all events data * Refactor logic * Prefix private methods with `_` * `work_queue` and not `client_queue` * Turn `Threadless` into an abstract executor. Introduce `RemoteExecutor` * Make `LocalExecutor` agnostic of `threading.Thread` * `LocalExecutor` now implements `Threadless` * `get_events` and `get_descriptors` now must return int and not sock. `Threadless` now avoids repeated register/unregister and instead make use of `selectors.modify` * Fix `main` tests * Apply suggestions from code review Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua> * Apply code review recommendations manually * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Revert back `Any` and use `addr or None` * Address `flake8` * Update tests to use `fileno` * Fix doc build * Fix doc spell, use tear down and not teardown * Doc updates * Add back support for `Python 3.6` * Acceptors dont need loop initialization * On Python 3.6 `asyncio.new_event_loop()` is necessary * Make doc happy * `--threaded` needs a new event loop for 3.7 too * Always use `asyncio.new_event_loop()` for threaded mode Added e2e integration tests (subprocess & curl) for all modes. * Lint fixes Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
2021-11-23 09:32:00 +00:00
"python.linting.flake8Args": ["--config", ".flake8"],
2021-11-19 19:55:05 +00:00
"python.linting.mypyEnabled": true,
"python.formatting.provider": "autopep8",
"autoDocstring.docstringFormat": "sphinx",
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.py$",
"isAsync": false,
"cmd": "./.venv/bin/autoflake --in-place --remove-all-unused-imports \"${file}\""
},
{
"match": "\\.py$",
"isAsync": false,
"cmd": "./.venv/bin/isort \"${file}\""
}
]
}
2021-11-19 19:55:05 +00:00
}