Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web protocol cleanup #2500

Merged
merged 4 commits into from
Nov 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Drop deprecated slow_request_timeout param
  • Loading branch information
asvetlov committed Nov 10, 2017
commit 274bfe403ffd743232d8eefe836d561851713edb
5 changes: 0 additions & 5 deletions aiohttp/web_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import http.server
import socket
import traceback
import warnings
from collections import deque
from contextlib import suppress
from html import escape as html_escape
Expand Down Expand Up @@ -84,7 +83,6 @@ class RequestHandler(asyncio.streams.FlowControlMixin, asyncio.Protocol):
def __init__(self, manager, *, loop=None,
keepalive_timeout=75, # NGINX default value is 75 secs
tcp_keepalive=True,
slow_request_timeout=None,
logger=server_logger,
access_log_class=helpers.AccessLogger,
access_log=access_logger,
Expand All @@ -96,9 +94,6 @@ def __init__(self, manager, *, loop=None,
lingering_time=10.0,
max_concurrent_handlers=1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that an accidental removal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max_concurrent_handlers is not removed, see below.
But **kwargs is dropped

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah! GitHub UI tricked me.

**kwargs):
if slow_request_timeout is not None:
warnings.warn(
'slow_request_timeout is deprecated', DeprecationWarning)

super().__init__(loop=loop)

Expand Down
5 changes: 0 additions & 5 deletions tests/test_web_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,6 @@ def test_srv_keep_alive(srv):
assert not srv._keepalive


def test_slow_request(make_srv):
with pytest.warns(DeprecationWarning):
make_srv(slow_request_timeout=0.01)


async def test_simple(srv, loop, buf):
srv.data_received(
b'GET / HTTP/1.1\r\n\r\n')
Expand Down