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

Deprecated use of boolean in resp.enable_compression() #3322

Merged
merged 30 commits into from
Oct 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
965a1cd
Quiet warnings about netrc
Sep 13, 2018
f867e91
Deprecate using boolean for enable_compression.
OisinA Oct 4, 2018
851ea02
Add CHANGES file.
OisinA Oct 4, 2018
9c8a54a
Rename 3318.feature to 3318.removal
OisinA Oct 4, 2018
e9efcf5
Added name to Contributors
OisinA Oct 4, 2018
226e23f
Fixed pep8 errors.
OisinA Oct 4, 2018
c33c2ed
Merge branch 'master' of https:/OisinA/aiohttp
OisinA Oct 4, 2018
e350cb6
Cleanup test_client_ws_functional.py
asvetlov Oct 4, 2018
93395eb
Cleanup test_web_protocol.py
asvetlov Oct 4, 2018
e00002c
response return value runtime check (#3321)
benitogf Oct 5, 2018
8b3e84b
Tests cleanup
asvetlov Oct 5, 2018
0ebdfaa
Cleanup test_client_functional.py
asvetlov Oct 5, 2018
efd6073
Clarify merge strategy (#3323)
asvetlov Oct 8, 2018
317ef47
Issue#3119: example on how to use session without context manager (#3…
gyermolenko Oct 8, 2018
381b8e5
Scheduled weekly dependency update for week 40 (#3334)
pyup-bot Oct 8, 2018
38808f5
Update 3318.removal
asvetlov Oct 8, 2018
b53cb94
Update web_response.py
asvetlov Oct 8, 2018
929e197
Lint that CONTRIBUTORS.txt is kept in alphabetical order
pollydrag Oct 8, 2018
bd224f8
Fix makefile rules to not reinstall deps on every test run
asvetlov Oct 9, 2018
9483209
Extract AccessLog into a separate module (#3336)
asvetlov Oct 9, 2018
dc7eab9
Fix test infra (#3337)
zhangyunhao116 Oct 10, 2018
f5ea58b
Added aiogmaps to trird party list (#3338)
hzlmn Oct 10, 2018
9ea8a02
add -> None to ClientSession ctor (#3339)
graingert Oct 10, 2018
f4c8232
Don't create temporary list in parse_mimetype()
asvetlov Oct 12, 2018
aac7a69
Wrap parse_mimetype in an lru_cache (#3341)
orf Oct 13, 2018
7013d4a
Merge branch 'master' of https:/nicktimko/aiohttp into ni…
asvetlov Oct 15, 2018
c8485f6
Merge branch 'nicktimko-master'
asvetlov Oct 15, 2018
b26d4a8
Scheduled weekly dependency update for week 41 (#3344)
pyup-bot Oct 15, 2018
791167e
Merge branch 'master' of https:/OisinA/aiohttp into Oisin…
asvetlov Oct 15, 2018
93f1d2d
Update tests
asvetlov Oct 15, 2018
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
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,14 @@ jobs:
script:
- python setup.py check --metadata --restructuredtext --strict --verbose

- <<: *_lint_base
name:
- CONTRIBUTORS.txt sorting check
install:
- skip
script:
- LC_ALL=C sort -c CONTRIBUTORS.txt

- <<: *osx_python_base
python: 3.5.3
env:
Expand Down
2 changes: 2 additions & 0 deletions CHANGES/3267.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Don't raise a warning if ``NETRC`` environment variable is not set and ``~/.netrc`` file
doesn't exist.
1 change: 1 addition & 0 deletions CHANGES/3318.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecated use of boolean in ``resp.enable_compression()``
1 change: 1 addition & 0 deletions CHANGES/3337.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix tests/test_connector.py typo and tests/autobahn/server.py duplicate loop def.
1 change: 1 addition & 0 deletions CHANGES/3341.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added a `lru_cache` to the `parse_mimetype` method
23 changes: 12 additions & 11 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Contributors
------------
- Contributors -
----------------
A. Jesse Jiryu Davis
Adam Mills
Adrián Chaves
Expand Down Expand Up @@ -45,14 +45,14 @@ Brian Muller
Bryce Drennan
Carl George
Cecile Tonglet
Colin Dunklau
Chien-Wei Huang
Chih-Yuan Chen
Chris AtLee
Chris Laws
Chris Moore
Christopher Schmitt
Claudiu Popa
Colin Dunklau
Damien Nadé
Dan Xu
Daniel García
Expand All @@ -64,12 +64,12 @@ Denilson Amorim
Denis Matiychuk
Dima Veselov
Dimitar Dimitrov
Dmitriy Safonov
Dmitry Doroshev
Dmitry Lukashin
Dmitry Shamov
Dmitry Trofimov
Dmytro Kuznetsov
Dmitriy Safonov
Dustin J. Mitchell
Eduard Iskandarov
Eli Ribble
Expand All @@ -88,9 +88,9 @@ Gennady Andreyev
Georges Dubus
Greg Holt
Gregory Haynes
Günther Jena
Gus Goulart
Gustavo Carneiro
Günther Jena
Hu Bo
Hugo Herter
Hynek Schlawack
Expand Down Expand Up @@ -126,13 +126,13 @@ Kirill Klenov
Kirill Malovitsa
Kyrylo Perevozchikov
Lars P. Søndergaard
Loïc Lajeanne
Louis-Philippe Huberdeau
Loïc Lajeanne
Lu Gong
Lubomir Gelo
Ludovic Gasc
Lukasz Marcin Dobrzanski
Luis Pedrosa
Lukasz Marcin Dobrzanski
Makc Belousow
Manuel Miranda
Marat Sharafutdinov
Expand All @@ -154,6 +154,7 @@ Mun Gwan-gyeong
Nicolas Braem
Nikolay Kim
Nikolay Novik
Oisin Aylward
Olaf Conradi
Pahaz Blinov
Panagiotis Kolokotronis
Expand All @@ -175,9 +176,9 @@ Robert Lu
Roman Podoliaka
Samuel Colvin
Sean Hunt
Sebastien Geffroy
Sebastian Hanula
Sebastian Hüther
Sebastien Geffroy
SeongSoo Cho
Sergey Ninua
Sergey Skripnick
Expand All @@ -198,8 +199,8 @@ Thanos Lefteris
Thijs Vermeir
Thomas Forbes
Thomas Grainger
Tomasz Trebski
Tolga Tezel
Tomasz Trebski
Trinh Hoang Nhu
Vadim Suharnikov
Vaibhav Sagar
Expand All @@ -218,12 +219,12 @@ Vladimir Shulyak
Vladimir Zakharov
Vladyslav Bondar
W. Trevor King
Wei Lin
Weiwei Wang
Will McGugan
Willem de Groot
William Grzybowski
Wilson Ong
Wei Lin
Weiwei Wang
Yang Zhou
Yannick Koechlin
Yannick Péroux
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

all: test

install-cython:
.install-deps: $(shell find requirements -type f)
@pip install -r requirements/cython.txt

.install-deps: $(shell find requirements -type f) install-cython
@pip install -U -r requirements/dev.txt
@touch .install-deps

Expand All @@ -26,6 +24,9 @@ flake: .flake
isort --diff -rc aiohttp tests examples; \
false; \
fi
@if ! LC_ALL=C sort -c CONTRIBUTORS.txt; then \
echo "CONTRIBUTORS.txt sort error"; \
fi
@touch .flake

check_changes:
Expand Down
5 changes: 2 additions & 3 deletions aiohttp/base_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ class BaseProtocol(asyncio.Protocol):

def __init__(self, loop: Optional[asyncio.AbstractEventLoop]=None) -> None:
if loop is None:
self._loop = asyncio.get_event_loop()
else:
self._loop = loop
loop = asyncio.get_event_loop()
self._loop = loop # type: asyncio.AbstractEventLoop
self._paused = False
self._drain_waiter = None # type: Optional[asyncio.Future[None]]
self._connection_lost = False
Expand Down
2 changes: 1 addition & 1 deletion aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(self, *, connector=None, loop=None, cookies=None,
read_timeout=sentinel, conn_timeout=None,
timeout=sentinel,
auto_decompress=True, trust_env=False,
trace_configs=None):
trace_configs=None) -> None:

implicit_loop = False
if loop is None:
Expand Down
7 changes: 6 additions & 1 deletion aiohttp/client_proto.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import asyncio
from contextlib import suppress
from typing import Optional

from .base_protocol import BaseProtocol
from .client_exceptions import (ClientOSError, ClientPayloadError,
Expand All @@ -10,7 +12,10 @@
class ResponseHandler(BaseProtocol, DataQueue):
"""Helper class to adapt between Protocol and StreamReader."""

def __init__(self, *, loop=None):
def __init__(self, *,
loop: Optional[asyncio.AbstractEventLoop]=None) -> None:
if loop is None:
loop = asyncio.get_event_loop()
BaseProtocol.__init__(self, loop=loop)
DataQueue.__init__(self, loop=loop)

Expand Down
Loading