diff --git a/.github/ISSUE_TEMPLATE/1-question.md b/.github/ISSUE_TEMPLATE/1-question.md deleted file mode 100644 index 27b2b7165d..0000000000 --- a/.github/ISSUE_TEMPLATE/1-question.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Question -about: Ask a question ---- - -### Checklist - - - -- [ ] I searched the [Uvicorn documentation](https://www.uvicorn.org/) but couldn't find what I'm looking for. -- [ ] I looked through similar issues on GitHub, but didn't find anything. -- [ ] I looked up "How to do ... in Uvicorn" on a search engine and didn't find any information. -- [ ] I asked the [community chat](https://gitter.im/encode/community) for help. - -### Question - - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..2ad6e8e270 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,7 @@ +# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser +blank_issues_enabled: true +contact_links: +- name: Question + url: https://gitter.im/encode/community + about: > + Ask a question diff --git a/requirements.txt b/requirements.txt index 4a6d084734..2ec5c2c5f4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,6 @@ pytest pytest-cov pytest-mock requests -seed-isort-config mypy # Documentation diff --git a/scripts/lint b/scripts/lint index 7925c3d7e1..795d5d01ae 100755 --- a/scripts/lint +++ b/scripts/lint @@ -9,6 +9,5 @@ export SOURCE_FILES="uvicorn tests" set -x ${PREFIX}autoflake --in-place --recursive $SOURCE_FILES -${PREFIX}seed-isort-config --application-directories=uvicorn ${PREFIX}isort --project=uvicorn $SOURCE_FILES ${PREFIX}black --target-version=py36 $SOURCE_FILES diff --git a/setup.cfg b/setup.cfg index 748336210c..21103a6a4f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ check_untyped_defs = True profile = black combine_as_imports = True known_first_party = uvicorn,tests -known_third_party = click,does_not_exist,gunicorn,h11,httptools,pytest,requests,setuptools,urllib3,uvloop,watchgod,websockets,wsproto +known_third_party = click,does_not_exist,gunicorn,h11,httptools,pytest,requests,setuptools,urllib3,uvloop,watchgod,websockets,wsproto,yaml [tool:pytest] addopts = --cov=uvicorn --cov=tests -rxXs diff --git a/tests/protocols/test_http.py b/tests/protocols/test_http.py index 891a259f2f..2987148506 100644 --- a/tests/protocols/test_http.py +++ b/tests/protocols/test_http.py @@ -696,7 +696,7 @@ async def asgi(receive, send): @pytest.mark.parametrize("asgi2or3_app, expected_scopes", asgi_scope_data) @pytest.mark.parametrize("protocol_cls", HTTP_PROTOCOLS) def test_scopes(asgi2or3_app, expected_scopes, protocol_cls): - protocol = get_connected_protocol(asgi2or3_app, protocol_cls,) + protocol = get_connected_protocol(asgi2or3_app, protocol_cls) protocol.data_received(SIMPLE_GET_REQUEST) protocol.loop.run_one() assert expected_scopes == protocol.scope.get("asgi") diff --git a/tests/test_config.py b/tests/test_config.py index 336ff5b8b3..8c70de66f8 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -127,7 +127,7 @@ def test_log_config_default(mocked_logging_config_module, use_colors, expected): mocked_logging_config_module.dictConfig.assert_called_once_with(LOGGING_CONFIG) - ((provided_dict_config,), _,) = mocked_logging_config_module.dictConfig.call_args + (provided_dict_config,), _ = mocked_logging_config_module.dictConfig.call_args assert provided_dict_config["formatters"]["default"]["use_colors"] == expected diff --git a/uvicorn/supervisors/basereload.py b/uvicorn/supervisors/basereload.py index ffdf8cb9e9..db2bf85c69 100644 --- a/uvicorn/supervisors/basereload.py +++ b/uvicorn/supervisors/basereload.py @@ -62,7 +62,8 @@ def startup(self): def restart(self): self.mtimes = {} - os.kill(self.process.pid, signal.SIGTERM) + + self.process.terminate() self.process.join() self.process = get_subprocess(