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

Drop encoding param #2606

Merged
merged 3 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGES/2606.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop deprecated `encoding` parameter from client API
9 changes: 0 additions & 9 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ async def _request(self, method, url, *,
auth=None,
allow_redirects=True,
max_redirects=10,
encoding=None,
compress=None,
chunked=None,
expect100=False,
Expand All @@ -172,12 +171,6 @@ async def _request(self, method, url, *,
# set the default to None because we need to detect if the user wants
# to use the existing timeouts by setting timeout to None.

if encoding is not None:
warnings.warn(
"encoding parameter is not supported, "
"please use FormData(charset='utf-8') instead",
DeprecationWarning)

if self.closed:
raise RuntimeError('Session is closed')

Expand Down Expand Up @@ -793,7 +786,6 @@ def request(method, url, *,
auth=None,
allow_redirects=True,
max_redirects=10,
encoding=None,
version=http.HttpVersion11,
compress=None,
chunked=None,
Expand Down Expand Up @@ -854,7 +846,6 @@ def request(method, url, *,
auth=auth,
allow_redirects=allow_redirects,
max_redirects=max_redirects,
encoding=encoding,
compress=compress,
chunked=chunked,
expect100=expect100,
Expand Down
13 changes: 0 additions & 13 deletions tests/test_client_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2004,19 +2004,6 @@ async def handler_redirect(request):
assert data == body


async def test_encoding_deprecated(loop, test_client):

async def handler_redirect(request):
return web.Response(status=301)

app = web.Application()
app.router.add_route('GET', '/redirect', handler_redirect)
client = await test_client(app)

with pytest.warns(DeprecationWarning):
await client.get('/', encoding='utf-8')


async def test_chunked_deprecated(loop, test_client):

async def handler_redirect(request):
Expand Down