[Python-modules-commits] [python-aiohttp] 01/04: Import python-aiohttp_1.2.0.orig.tar.gz
Piotr Ożarowski
piotr at moszumanska.debian.org
Wed Dec 21 12:41:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
piotr pushed a commit to branch master
in repository python-aiohttp.
commit 4a74b0a6d3f82f187d7c364e8662f23ceaba395e
Author: Piotr Ożarowski <piotr at debian.org>
Date: Wed Dec 21 13:30:14 2016 +0100
Import python-aiohttp_1.2.0.orig.tar.gz
---
CHANGES.rst | 142 ++------
CONTRIBUTORS.txt | 6 +
Makefile | 3 +
PKG-INFO | 144 ++-------
aiohttp.egg-info/PKG-INFO | 144 ++-------
aiohttp.egg-info/SOURCES.txt | 5 +
aiohttp.egg-info/requires.txt | 4 +-
aiohttp/__init__.py | 2 +-
aiohttp/_websocket.c | 57 ++--
aiohttp/abc.py | 9 +
aiohttp/client.py | 11 +
aiohttp/client_reqrep.py | 26 +-
aiohttp/connector.py | 46 ++-
aiohttp/cookiejar.py | 10 +-
aiohttp/file_sender.py | 54 +++-
aiohttp/helpers.py | 3 +-
aiohttp/multipart.py | 8 +-
aiohttp/parsers.py | 2 -
aiohttp/protocol.py | 11 +-
aiohttp/pytest_plugin.py | 30 +-
aiohttp/server.py | 44 ++-
aiohttp/test_utils.py | 142 ++++----
aiohttp/web.py | 225 ++++---------
aiohttp/web_reqrep.py | 168 +++++++---
aiohttp/web_server.py | 166 ++++++++++
aiohttp/web_urldispatcher.py | 9 +-
aiohttp/worker.py | 80 ++++-
docs/changes.rst | 2 +
docs/client.rst | 4 +-
docs/client_reference.rst | 6 +-
docs/deployment.rst | 4 +-
docs/faq.rst | 54 +++-
docs/index.rst | 3 +-
docs/server.rst | 11 +-
docs/spelling_wordlist.txt | 2 +
docs/testing.rst | 474 +++++++++++++++++++++++----
docs/third_party.rst | 2 +
docs/tutorial.rst | 112 +++++--
docs/web.rst | 43 ++-
docs/web_lowlevel.rst | 93 ++++++
docs/web_reference.rst | 188 ++++++++---
examples/fake_server.py | 2 +-
examples/lowlevel_srv.py | 25 ++
examples/web_rewrite_headers_middleware.py | 18 +-
setup.py | 4 +-
tests/test_client_connection.py | 11 +
tests/test_client_functional.py | 2 +-
tests/test_client_request.py | 10 +
tests/test_client_session.py | 7 +
tests/test_connector.py | 84 +++++
tests/test_cookiejar.py | 38 ++-
tests/test_helpers.py | 6 +
tests/test_multipart.py | 7 +
tests/test_proxy.py | 33 +-
tests/test_proxy_functional.py | 500 +++++++++++++++++++++++++++++
tests/test_pytest_plugin.py | 4 +-
tests/test_server.py | 91 +++++-
tests/test_test_utils.py | 13 +-
tests/test_urldispatch.py | 8 +-
tests/test_web_application.py | 29 +-
tests/test_web_functional.py | 33 +-
tests/test_web_request_handler.py | 6 -
tests/test_web_response.py | 13 +
tests/test_web_sendfile.py | 111 ++++++-
tests/test_web_sendfile_functional.py | 125 ++++++++
tests/test_web_server.py | 73 +++++
tests/test_web_urldispatcher.py | 20 +-
tests/test_worker.py | 97 +++++-
68 files changed, 2964 insertions(+), 955 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 5496dd0..39b6bd7 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,138 +1,60 @@
CHANGES
=======
-1.1.5 (2016-11-16)
+1.2.0 (2016-12-17)
------------------
-- Fix static file serving in fallback mode #1401
-
-1.1.4 (2016-11-14)
-------------------
+- Extract `BaseRequest` from `web.Request`, introduce `web.Server`
+ (former `RequestHandlerFactory`), introduce new low-level web server
+ which is not coupled with `web.Application` and routing #1362
- Make `TestServer.make_url` compatible with `yarl.URL` #1389
-- Generate informative exception on redirects from server which
- doesn't provide redirection headers #1396
-
-
-1.1.3 (2016-11-10)
-------------------
-
-- Support *root* resources for sub-applications #1379
-
-
-1.1.2 (2016-11-08)
-------------------
-
-- Allow starting variables with an underscore #1379
-
-- Properly process UNIX sockets by gunicorn worker #1375
-
-- Fix ordering for `FrozenList`
-
-- Don't propagate pre and post signals to sub-application #1377
-
-1.1.1 (2016-11-04)
-------------------
-
-- Fix documentation generation #1120
-
-1.1.0 (2016-11-03)
-------------------
-
-- Drop deprecated `WSClientDisconnectedError` (BACKWARD INCOMPATIBLE)
-
-- Use `yarl.URL` in client API. The change is 99% backward compatible
- but `ClientResponse.url` is an `yarl.URL` instance now. #1217
-
-- Close idle keep-alive connections on shutdown #1222
-
-- Modify regex in AccessLogger to accept underscore and numbers #1225
-
-- Use `yarl.URL` in web server API. `web.Request.rel_url` and
- `web.Request.url` are added. URLs and templates are percent-encoded
- now. #1224
-
-- Accept `yarl.URL` by server redirections #1278
-
-- Return `yarl.URL` by `.make_url()` testing utility #1279
-
-- Properly format IPv6 addresses by `aiohttp.web.run_app` #1139
-
-- Use `yarl.URL` by server API #1288
-
- * Introduce `resource.url_for()`, deprecate `resource.url()`.
-
- * Implement `StaticResource`.
-
- * Inherit `SystemRoute` from `AbstractRoute`
-
- * Drop old-style routes: `Route`, `PlainRoute`, `DynamicRoute`,
- `StaticRoute`, `ResourceAdapter`.
-
-- Revert `resp.url` back to `str`, introduce `resp.url_obj` #1292
-
-- Raise ValueError if BasicAuth login has a ":" character #1307
-
-- Fix bug when ClientRequest send payload file with opened as
- open('filename', 'r+b') #1306
-
-- Enhancement to AccessLogger (pass *extra* dict) #1303
-
-- Show more verbose message on import errors #1319
-
-- Added save and load functionality for `CookieJar` #1219
-
-- Added option on `StaticRoute` to follow symlinks #1299
-
-- Force encoding of `application/json` content type to utf-8 #1339
+- Implement range requests for static files #1382
-- Fix invalid invocations of `errors.LineTooLong` #1335
+- Support task attribute for StreamResponse #1410
-- Websockets: Stop `async for` iteration when connection is closed #1144
+- Drop `TestClient.app` property, use `TestClient.server.app` instead
+ (BACKWARD INCOMPATIBLE)
-- Ensure TestClient HTTP methods return a context manager #1318
+- Drop `TestClient.handler` property, use `TestClient.server.handler` instead
+ (BACKWARD INCOMPATIBLE)
-- Raise `ClientDisconnectedError` to `FlowControlStreamReader` read function
- if `ClientSession` object is closed by client when reading data. #1323
+- `TestClient.server` property returns a test server instance, was
+ `asyncio.AbstractServer` (BACKWARD INCOMPATIBLE)
-- Document deployment without `Gunicorn` #1120
+- Follow gunicorn's signal semantics in `Gunicorn[UVLoop]WebWorker` #1201
-- Add deprecation warning for MD5 and SHA1 digests when used for fingerprint
- of site certs in TCPConnector. #1186
+- Call worker_int and worker_abort callbacks in
+ `Gunicorn[UVLoop]WebWorker` #1202
-- Implement sub-applications #1301
+- Has functional tests for client proxy #1218
-- Don't inherit `web.Request` from `dict` but implement
- `MutableMapping` protocol.
+- Fix bugs with client proxy target path and proxy host with port #1413
-- Implement frozen signals
+- Fix bugs related to the use of unicode hostnames #1444
-- Don't inherit `web.Application` from `dict` but implement
- `MutableMapping` protocol.
+- Preserve cookie quoting/escaping #1453
-- Support freezing for web applications
+- FileSender will send gzipped response if gzip version available #1426
-- Accept access_log parameter in `web.run_app`, use `None` to disable logging
+- Don't override `Content-Length` header in `web.Response` if no body
+ was set #1400
-- Don't flap `tcp_cork` and `tcp_nodelay` in regular request handling.
- `tcp_nodelay` is still enabled by default.
+- Introduce `router.post_init()` for solving #1373
-- Improve performance of web server by removing premature computing of
- Content-Type if the value was set by `web.Response` constructor.
+- Fix raise error in case of multiple calls of `TimeServive.stop()`
- While the patch boosts speed of trivial `web.Response(text='OK',
- content_type='text/plain)` very well please don't expect significant
- boost of your application -- a couple DB requests and business logic
- is still the main bottleneck.
+- Allow to raise web exceptions on router resolving stage #1460
-- Boost performance by adding a custom time service #1350
+- Add a warning for session creation outside of coroutine #1468
-- Extend `ClientResponse` with `content_type` and `charset`
- properties like in `web.Request`. #1349
+- Avoid a race when application might start accepting incoming requests
+ but startup signals are not processed yet e98e8c6
-- Disable aiodns by default #559
+- Raise a `RuntimeError` when trying to change the status of the HTTP response
+ after the headers have been sent #1480
-- Don't flap `tcp_cork` in client code, use TCP_NODELAY mode by default.
+- Fix bug with https proxy acquired cleanup #1340
-- Implement `web.Request.clone()` #1361
+- Use UTF-8 as the default encoding for multipart text parts #1484
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 0a5a9a7..2d1bac1 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -10,6 +10,7 @@ Alexander Bayandin
Alexander Karpinsky
Alexander Koshevoy
Alexander Malev
+Alexander Mohr
Alexander Shorin
Alexander Travov
Alexandru Mihai
@@ -21,6 +22,7 @@ Alex Lisovoy
Amy Boyle
Andrei Ursulenko
Andrej Antonov
+Andrew Leech
Andrew Svetlov
Andrii Soldatenko
Anton Kasyanov
@@ -104,10 +106,13 @@ Mun Gwan-gyeong
Nicolas Braem
Nikolay Novik
Olaf Conradi
+Pahaz Blinov <pahaz.blinov at gmail.com>
Pankaj Pandey
Pau Freixes
Paul Colomiets
+Paulus Schoutsen
Philipp A.
+Rafael Viotti
Raúl Cumplido
"Required Field" <requiredfield256 at gmail.com>
Robert Lu
@@ -117,6 +122,7 @@ Sebastian Hüther
SeongSoo Cho
Sergey Ninua
Sergey Skripnick
+Serhii Kostel
Simon Kennedy
Sin-Woo Bang
Stanislas Plum
diff --git a/Makefile b/Makefile
index 21eb37e..1f98de9 100644
--- a/Makefile
+++ b/Makefile
@@ -48,8 +48,11 @@ cov-dev: .develop
@echo "open file://`pwd`/coverage/index.html"
cov-dev-full: .develop
+ @echo "Run without extensions"
@AIOHTTP_NO_EXTENSIONS=1 py.test --cov=aiohttp tests
+ @echo "Run in debug mode"
@PYTHONASYNCIODEBUG=1 py.test --cov=aiohttp --cov-append tests
+ @echo "Regular run"
@py.test --cov=aiohttp --cov-report=term --cov-report=html --cov-append tests
@echo "open file://`pwd`/coverage/index.html"
diff --git a/PKG-INFO b/PKG-INFO
index 589e88b..3a79382 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: aiohttp
-Version: 1.1.5
+Version: 1.2.0
Summary: http client/server for asyncio
Home-page: https://github.com/KeepSafe/aiohttp/
Author: Andrew Svetlov
@@ -161,141 +161,63 @@ Description: http client/server for asyncio
CHANGES
=======
- 1.1.5 (2016-11-16)
+ 1.2.0 (2016-12-17)
------------------
- - Fix static file serving in fallback mode #1401
-
- 1.1.4 (2016-11-14)
- ------------------
+ - Extract `BaseRequest` from `web.Request`, introduce `web.Server`
+ (former `RequestHandlerFactory`), introduce new low-level web server
+ which is not coupled with `web.Application` and routing #1362
- Make `TestServer.make_url` compatible with `yarl.URL` #1389
- - Generate informative exception on redirects from server which
- doesn't provide redirection headers #1396
-
-
- 1.1.3 (2016-11-10)
- ------------------
-
- - Support *root* resources for sub-applications #1379
-
-
- 1.1.2 (2016-11-08)
- ------------------
-
- - Allow starting variables with an underscore #1379
-
- - Properly process UNIX sockets by gunicorn worker #1375
-
- - Fix ordering for `FrozenList`
-
- - Don't propagate pre and post signals to sub-application #1377
-
- 1.1.1 (2016-11-04)
- ------------------
-
- - Fix documentation generation #1120
-
- 1.1.0 (2016-11-03)
- ------------------
-
- - Drop deprecated `WSClientDisconnectedError` (BACKWARD INCOMPATIBLE)
-
- - Use `yarl.URL` in client API. The change is 99% backward compatible
- but `ClientResponse.url` is an `yarl.URL` instance now. #1217
-
- - Close idle keep-alive connections on shutdown #1222
-
- - Modify regex in AccessLogger to accept underscore and numbers #1225
-
- - Use `yarl.URL` in web server API. `web.Request.rel_url` and
- `web.Request.url` are added. URLs and templates are percent-encoded
- now. #1224
-
- - Accept `yarl.URL` by server redirections #1278
-
- - Return `yarl.URL` by `.make_url()` testing utility #1279
-
- - Properly format IPv6 addresses by `aiohttp.web.run_app` #1139
-
- - Use `yarl.URL` by server API #1288
-
- * Introduce `resource.url_for()`, deprecate `resource.url()`.
-
- * Implement `StaticResource`.
-
- * Inherit `SystemRoute` from `AbstractRoute`
-
- * Drop old-style routes: `Route`, `PlainRoute`, `DynamicRoute`,
- `StaticRoute`, `ResourceAdapter`.
-
- - Revert `resp.url` back to `str`, introduce `resp.url_obj` #1292
-
- - Raise ValueError if BasicAuth login has a ":" character #1307
-
- - Fix bug when ClientRequest send payload file with opened as
- open('filename', 'r+b') #1306
-
- - Enhancement to AccessLogger (pass *extra* dict) #1303
-
- - Show more verbose message on import errors #1319
-
- - Added save and load functionality for `CookieJar` #1219
-
- - Added option on `StaticRoute` to follow symlinks #1299
-
- - Force encoding of `application/json` content type to utf-8 #1339
+ - Implement range requests for static files #1382
- - Fix invalid invocations of `errors.LineTooLong` #1335
+ - Support task attribute for StreamResponse #1410
- - Websockets: Stop `async for` iteration when connection is closed #1144
+ - Drop `TestClient.app` property, use `TestClient.server.app` instead
+ (BACKWARD INCOMPATIBLE)
- - Ensure TestClient HTTP methods return a context manager #1318
+ - Drop `TestClient.handler` property, use `TestClient.server.handler` instead
+ (BACKWARD INCOMPATIBLE)
- - Raise `ClientDisconnectedError` to `FlowControlStreamReader` read function
- if `ClientSession` object is closed by client when reading data. #1323
+ - `TestClient.server` property returns a test server instance, was
+ `asyncio.AbstractServer` (BACKWARD INCOMPATIBLE)
- - Document deployment without `Gunicorn` #1120
+ - Follow gunicorn's signal semantics in `Gunicorn[UVLoop]WebWorker` #1201
- - Add deprecation warning for MD5 and SHA1 digests when used for fingerprint
- of site certs in TCPConnector. #1186
+ - Call worker_int and worker_abort callbacks in
+ `Gunicorn[UVLoop]WebWorker` #1202
- - Implement sub-applications #1301
+ - Has functional tests for client proxy #1218
- - Don't inherit `web.Request` from `dict` but implement
- `MutableMapping` protocol.
+ - Fix bugs with client proxy target path and proxy host with port #1413
- - Implement frozen signals
+ - Fix bugs related to the use of unicode hostnames #1444
- - Don't inherit `web.Application` from `dict` but implement
- `MutableMapping` protocol.
+ - Preserve cookie quoting/escaping #1453
- - Support freezing for web applications
+ - FileSender will send gzipped response if gzip version available #1426
- - Accept access_log parameter in `web.run_app`, use `None` to disable logging
+ - Don't override `Content-Length` header in `web.Response` if no body
+ was set #1400
- - Don't flap `tcp_cork` and `tcp_nodelay` in regular request handling.
- `tcp_nodelay` is still enabled by default.
+ - Introduce `router.post_init()` for solving #1373
- - Improve performance of web server by removing premature computing of
- Content-Type if the value was set by `web.Response` constructor.
+ - Fix raise error in case of multiple calls of `TimeServive.stop()`
- While the patch boosts speed of trivial `web.Response(text='OK',
- content_type='text/plain)` very well please don't expect significant
- boost of your application -- a couple DB requests and business logic
- is still the main bottleneck.
+ - Allow to raise web exceptions on router resolving stage #1460
- - Boost performance by adding a custom time service #1350
+ - Add a warning for session creation outside of coroutine #1468
- - Extend `ClientResponse` with `content_type` and `charset`
- properties like in `web.Request`. #1349
+ - Avoid a race when application might start accepting incoming requests
+ but startup signals are not processed yet e98e8c6
- - Disable aiodns by default #559
+ - Raise a `RuntimeError` when trying to change the status of the HTTP response
+ after the headers have been sent #1480
- - Don't flap `tcp_cork` in client code, use TCP_NODELAY mode by default.
+ - Fix bug with https proxy acquired cleanup #1340
- - Implement `web.Request.clone()` #1361
+ - Use UTF-8 as the default encoding for multipart text parts #1484
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
diff --git a/aiohttp.egg-info/PKG-INFO b/aiohttp.egg-info/PKG-INFO
index 589e88b..3a79382 100644
--- a/aiohttp.egg-info/PKG-INFO
+++ b/aiohttp.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: aiohttp
-Version: 1.1.5
+Version: 1.2.0
Summary: http client/server for asyncio
Home-page: https://github.com/KeepSafe/aiohttp/
Author: Andrew Svetlov
@@ -161,141 +161,63 @@ Description: http client/server for asyncio
CHANGES
=======
- 1.1.5 (2016-11-16)
+ 1.2.0 (2016-12-17)
------------------
- - Fix static file serving in fallback mode #1401
-
- 1.1.4 (2016-11-14)
- ------------------
+ - Extract `BaseRequest` from `web.Request`, introduce `web.Server`
+ (former `RequestHandlerFactory`), introduce new low-level web server
+ which is not coupled with `web.Application` and routing #1362
- Make `TestServer.make_url` compatible with `yarl.URL` #1389
- - Generate informative exception on redirects from server which
- doesn't provide redirection headers #1396
-
-
- 1.1.3 (2016-11-10)
- ------------------
-
- - Support *root* resources for sub-applications #1379
-
-
- 1.1.2 (2016-11-08)
- ------------------
-
- - Allow starting variables with an underscore #1379
-
- - Properly process UNIX sockets by gunicorn worker #1375
-
- - Fix ordering for `FrozenList`
-
- - Don't propagate pre and post signals to sub-application #1377
-
- 1.1.1 (2016-11-04)
- ------------------
-
- - Fix documentation generation #1120
-
- 1.1.0 (2016-11-03)
- ------------------
-
- - Drop deprecated `WSClientDisconnectedError` (BACKWARD INCOMPATIBLE)
-
- - Use `yarl.URL` in client API. The change is 99% backward compatible
- but `ClientResponse.url` is an `yarl.URL` instance now. #1217
-
- - Close idle keep-alive connections on shutdown #1222
-
- - Modify regex in AccessLogger to accept underscore and numbers #1225
-
- - Use `yarl.URL` in web server API. `web.Request.rel_url` and
- `web.Request.url` are added. URLs and templates are percent-encoded
- now. #1224
-
- - Accept `yarl.URL` by server redirections #1278
-
- - Return `yarl.URL` by `.make_url()` testing utility #1279
-
- - Properly format IPv6 addresses by `aiohttp.web.run_app` #1139
-
- - Use `yarl.URL` by server API #1288
-
- * Introduce `resource.url_for()`, deprecate `resource.url()`.
-
- * Implement `StaticResource`.
-
- * Inherit `SystemRoute` from `AbstractRoute`
-
- * Drop old-style routes: `Route`, `PlainRoute`, `DynamicRoute`,
- `StaticRoute`, `ResourceAdapter`.
-
- - Revert `resp.url` back to `str`, introduce `resp.url_obj` #1292
-
- - Raise ValueError if BasicAuth login has a ":" character #1307
-
- - Fix bug when ClientRequest send payload file with opened as
- open('filename', 'r+b') #1306
-
- - Enhancement to AccessLogger (pass *extra* dict) #1303
-
- - Show more verbose message on import errors #1319
-
- - Added save and load functionality for `CookieJar` #1219
-
- - Added option on `StaticRoute` to follow symlinks #1299
-
- - Force encoding of `application/json` content type to utf-8 #1339
+ - Implement range requests for static files #1382
- - Fix invalid invocations of `errors.LineTooLong` #1335
+ - Support task attribute for StreamResponse #1410
- - Websockets: Stop `async for` iteration when connection is closed #1144
+ - Drop `TestClient.app` property, use `TestClient.server.app` instead
+ (BACKWARD INCOMPATIBLE)
- - Ensure TestClient HTTP methods return a context manager #1318
+ - Drop `TestClient.handler` property, use `TestClient.server.handler` instead
+ (BACKWARD INCOMPATIBLE)
- - Raise `ClientDisconnectedError` to `FlowControlStreamReader` read function
- if `ClientSession` object is closed by client when reading data. #1323
+ - `TestClient.server` property returns a test server instance, was
+ `asyncio.AbstractServer` (BACKWARD INCOMPATIBLE)
- - Document deployment without `Gunicorn` #1120
+ - Follow gunicorn's signal semantics in `Gunicorn[UVLoop]WebWorker` #1201
- - Add deprecation warning for MD5 and SHA1 digests when used for fingerprint
- of site certs in TCPConnector. #1186
+ - Call worker_int and worker_abort callbacks in
+ `Gunicorn[UVLoop]WebWorker` #1202
- - Implement sub-applications #1301
+ - Has functional tests for client proxy #1218
- - Don't inherit `web.Request` from `dict` but implement
- `MutableMapping` protocol.
+ - Fix bugs with client proxy target path and proxy host with port #1413
- - Implement frozen signals
+ - Fix bugs related to the use of unicode hostnames #1444
- - Don't inherit `web.Application` from `dict` but implement
- `MutableMapping` protocol.
+ - Preserve cookie quoting/escaping #1453
- - Support freezing for web applications
+ - FileSender will send gzipped response if gzip version available #1426
- - Accept access_log parameter in `web.run_app`, use `None` to disable logging
+ - Don't override `Content-Length` header in `web.Response` if no body
+ was set #1400
- - Don't flap `tcp_cork` and `tcp_nodelay` in regular request handling.
- `tcp_nodelay` is still enabled by default.
+ - Introduce `router.post_init()` for solving #1373
- - Improve performance of web server by removing premature computing of
- Content-Type if the value was set by `web.Response` constructor.
+ - Fix raise error in case of multiple calls of `TimeServive.stop()`
- While the patch boosts speed of trivial `web.Response(text='OK',
- content_type='text/plain)` very well please don't expect significant
- boost of your application -- a couple DB requests and business logic
- is still the main bottleneck.
+ - Allow to raise web exceptions on router resolving stage #1460
- - Boost performance by adding a custom time service #1350
+ - Add a warning for session creation outside of coroutine #1468
- - Extend `ClientResponse` with `content_type` and `charset`
- properties like in `web.Request`. #1349
+ - Avoid a race when application might start accepting incoming requests
+ but startup signals are not processed yet e98e8c6
- - Disable aiodns by default #559
+ - Raise a `RuntimeError` when trying to change the status of the HTTP response
+ after the headers have been sent #1480
- - Don't flap `tcp_cork` in client code, use TCP_NODELAY mode by default.
+ - Fix bug with https proxy acquired cleanup #1340
- - Implement `web.Request.clone()` #1361
+ - Use UTF-8 as the default encoding for multipart text parts #1484
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
diff --git a/aiohttp.egg-info/SOURCES.txt b/aiohttp.egg-info/SOURCES.txt
index 5ae2b03..8f69f42 100644
--- a/aiohttp.egg-info/SOURCES.txt
+++ b/aiohttp.egg-info/SOURCES.txt
@@ -33,6 +33,7 @@ aiohttp/test_utils.py
aiohttp/web.py
aiohttp/web_exceptions.py
aiohttp/web_reqrep.py
+aiohttp/web_server.py
aiohttp/web_urldispatcher.py
aiohttp/web_ws.py
aiohttp/worker.py
@@ -68,6 +69,7 @@ docs/testing.rst
docs/third_party.rst
docs/tutorial.rst
docs/web.rst
+docs/web_lowlevel.rst
docs/web_reference.rst
docs/whats_new_1_1.rst
docs/_static/aiohttp-icon-128x128.png
@@ -82,6 +84,7 @@ examples/client_json.py
examples/client_ws.py
examples/curl.py
examples/fake_server.py
+examples/lowlevel_srv.py
examples/server.crt
examples/server.csr
examples/server.key
@@ -121,6 +124,7 @@ tests/test_multipart.py
tests/test_parser_buffer.py
tests/test_protocol.py
tests/test_proxy.py
+tests/test_proxy_functional.py
tests/test_pytest_plugin.py
tests/test_resolver.py
tests/test_run_app.py
@@ -142,6 +146,7 @@ tests/test_web_request_handler.py
tests/test_web_response.py
tests/test_web_sendfile.py
tests/test_web_sendfile_functional.py
+tests/test_web_server.py
tests/test_web_urldispatcher.py
tests/test_web_websocket.py
tests/test_web_websocket_functional.py
diff --git a/aiohttp.egg-info/requires.txt b/aiohttp.egg-info/requires.txt
index 2075b89..1b49143 100644
--- a/aiohttp.egg-info/requires.txt
+++ b/aiohttp.egg-info/requires.txt
@@ -1,4 +1,4 @@
chardet
-multidict>=2.0
+multidict>=2.1.4
async_timeout>=1.1.0
-yarl>=0.5.0
+yarl>=0.8.1
diff --git a/aiohttp/__init__.py b/aiohttp/__init__.py
index 057e9e8..21265cb 100644
--- a/aiohttp/__init__.py
+++ b/aiohttp/__init__.py
@@ -1,4 +1,4 @@
-__version__ = '1.1.5'
+__version__ = '1.2.0'
# Deprecated, keep it here for a while for backward compatibility.
import multidict # noqa
diff --git a/aiohttp/_websocket.c b/aiohttp/_websocket.c
index 0500ae7..fdea978 100644
--- a/aiohttp/_websocket.c
+++ b/aiohttp/_websocket.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
/* BEGIN: Cython Metadata
{
@@ -16,7 +16,7 @@ END: Cython Metadata */
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython requires Python 2.6+ or Python 3.2+.
#else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -199,7 +199,7 @@ END: Cython Metadata */
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
- ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
@@ -352,10 +352,39 @@ END: Cython Metadata */
#define CYTHON_RESTRICT
#endif
#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+# else
+# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+# endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+# define CYTHON_NCP_UNUSED
+# else
+# define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifndef CYTHON_INLINE
- #if defined(__GNUC__)
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #elif defined(__GNUC__)
#define CYTHON_INLINE __inline__
#elif defined(_MSC_VER)
#define CYTHON_INLINE __inline
@@ -421,26 +450,6 @@ static CYTHON_INLINE float __PYX_NAN() {
#define CYTHON_WITHOUT_ASSERTIONS
#endif
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-# define CYTHON_NCP_UNUSED
-# else
-# define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
diff --git a/aiohttp/abc.py b/aiohttp/abc.py
index 90ed599..fb426f1 100644
--- a/aiohttp/abc.py
+++ b/aiohttp/abc.py
@@ -11,6 +11,15 @@ class AbstractRouter(ABC):
def __init__(self):
self._frozen = False
+ def post_init(self, app):
+ """Post init stage.
+
+ It's not an abstract method for sake of backward compatibility
+ but if router wans to be aware about application it should
+ override it.
+
+ """
+
@property
def frozen(self):
return self._frozen
diff --git a/aiohttp/client.py b/aiohttp/client.py
index 6c5d029..4b49874 100644
--- a/aiohttp/client.py
+++ b/aiohttp/client.py
@@ -54,6 +54,17 @@ class ClientSession:
if loop.get_debug():
self._source_traceback = traceback.extract_stack(sys._getframe(1))
+ if not loop.is_running():
+ warnings.warn("Creating a client session outside of coroutine is "
+ "a very dangerous idea", ResourceWarning,
+ stacklevel=2)
+ context = {'client_session': self,
+ 'message': 'Creating a client session outside '
+ 'of coroutine'}
+ if self._source_traceback is not None:
+ context['source_traceback'] = self._source_traceback
+ loop.call_exception_handler(context)
+
if cookie_jar is None:
cookie_jar = CookieJar(loop=loop)
self._cookie_jar = cookie_jar
diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py
index 929f083..3b5b6c0 100644
--- a/aiohttp/client_reqrep.py
+++ b/aiohttp/client_reqrep.py
@@ -165,7 +165,7 @@ class ClientRequest:
# add host
if hdrs.HOST not in used_headers:
- netloc = self.url.host
+ netloc = self.url.raw_host
if not self.url.is_default_port():
netloc += ':' + str(self.url.port)
self.headers[hdrs.HOST] = netloc
@@ -185,7 +185,10 @@ class ClientRequest:
for name, value in cookies.items():
if isinstance(value, http.cookies.Morsel):
- c[value.key] = value.value
+ # Preserve coded_value
+ mrsl_val = value.get(value.key, http.cookies.Morsel())
+ mrsl_val.set(value.key, value.value, value.coded_value)
+ c[name] = mrsl_val
else:
c[name] = value
@@ -432,9 +435,19 @@ class ClientRequest:
self._writer = None
def send(self, writer, reader):
- path = self.url.raw_path
- if self.url.raw_query_string:
- path += '?' + self.url.raw_query_string
+ # Specify request target:
+ # - CONNECT request must send authority form URI
+ # - not CONNECT proxy must send absolute form URI
+ # - most common is origin form URI
+ if self.method == hdrs.METH_CONNECT:
+ path = '{}:{}'.format(self.url.raw_host, self.url.port)
+ elif self.proxy and not self.ssl:
+ path = str(self.url)
+ else:
+ path = self.url.raw_path
+ if self.url.raw_query_string:
+ path += '?' + self.url.raw_query_string
+
request = aiohttp.Request(writer, self.method, path,
self.version)
@@ -522,6 +535,9 @@ class ClientResponse(HeadersMixin):
@property
def url(self):
+ warnings.warn("Deprecated, use .url_obj",
+ DeprecationWarning,
+ stacklevel=2)
return str(self._url_obj)
@property
diff --git a/aiohttp/connector.py b/aiohttp/connector.py
index f24354f..16403ad 100644
--- a/aiohttp/connector.py
+++ b/aiohttp/connector.py
@@ -91,6 +91,8 @@ class Connection:
self._transport = None
def detach(self):
+ if self._transport is not None:
+ self._connector._release_acquired(self._key, self._transport)
self._transport = None
@property
@@ -351,7 +353,7 @@ class BaseConnector(object):
waiter.set_result(None)
break
- def _release(self, key, req, transport, protocol, *, should_close=False):
+ def _release_acquired(self, key, transport):
if self._closed:
# acquired connection is already released on connector closing
return
@@ -362,9 +364,19 @@ class BaseConnector(object):
except KeyError: # pragma: no cover
# this may be result of undetermenistic order of objects
# finalization due garbage collection.
- pass
- else:
- if self._limit is not None and len(acquired) < self._limit:
+ return None
+
+ return acquired
+
+ def _release(self, key, req, transport, protocol, *, should_close=False):
+ if self._closed:
+ # acquired connection is already released on connector closing
+ return
+
+ acquired = self._release_acquired(key, transport)
+
+ if self._limit is not None and acquired is not None:
+ if len(acquired) < self._limit:
self._release_waiter(key)
resp = req.response
@@ -634,7 +646,7 @@ class TCPConnector(BaseConnector):
def _create_proxy_connection(self, req):
proxy_req = ClientRequest(
hdrs.METH_GET, req.proxy,
- headers={hdrs.HOST: req.host},
+ headers={hdrs.HOST: req.headers[hdrs.HOST]},
auth=req.proxy_auth,
loop=self._loop)
try:
@@ -644,8 +656,6 @@ class TCPConnector(BaseConnector):
except OSError as exc:
raise ProxyConnectionError(*exc.args) from exc
... 5049 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-aiohttp.git
More information about the Python-modules-commits
mailing list