Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/encode/uvicorn into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Weiliang Li committed Aug 28, 2020
2 parents 8c6cbbc + b782588 commit 88c623d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 23 deletions.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/1-question.md

This file was deleted.

7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pytest
pytest-cov
pytest-mock
requests
seed-isort-config
mypy

# Documentation
Expand Down
1 change: 0 additions & 1 deletion scripts/lint
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/protocols/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 2 additions & 1 deletion uvicorn/supervisors/basereload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 88c623d

Please sign in to comment.