cgrok / clashroyale

Async + Sync wrapper for royaleapi.com and the CR official API
MIT License
47 stars 19 forks source link

Initial Update #7

Closed pyup-bot closed 6 years ago

pyup-bot commented 6 years ago

This PR sets up pyup.io on this repo and updates all dependencies at once, in a single branch.

Subsequent pull requests will update one dependency at a time, each in their own branch. If you want to start with that right away, simply close this PR.

Update aiohttp from 2.2.5 to 3.1.1.

Changelog ### 3.1.0 ``` ================== Welcome to aiohttp 3.1 release. This is an *incremental* release, fully backward compatible with *aiohttp 3.0*. But we have added several new features. The most visible one is ``app.add_routes()`` (an alias for existing ``app.router.add_routes()``. The addition is very important because all *aiohttp* docs now uses ``app.add_routes()`` call in code snippets. All your existing code still do register routes / resource without any warning but you've got the idea for a favorite way: noisy ``app.router.add_get()`` is replaced by ``app.add_routes()``. The library does not make a preference between decorators:: routes = web.RouteTableDef() routes.get('/') async def hello(request): return web.Response(text="Hello, world") app.add_routes(routes) and route tables as a list:: async def hello(request): return web.Response(text="Hello, world") app.add_routes([web.get('/', hello)]) Both ways are equal, user may decide basing on own code taste. Also we have a lot of minor features, bug fixes and documentation updates, see below. Features -------- - Relax JSON content-type checking in the ``ClientResponse.json()`` to allow "application/xxx+json" instead of strict "application/json". (2206) - Bump C HTTP parser to version 2.8 (2730) - Accept a coroutine as an application factory in ``web.run_app`` and gunicorn worker. (2739) - Implement application cleanup context (``app.cleanup_ctx`` property). (2747) - Make ``writer.write_headers`` a coroutine. (2762) - Add tracking signals for getting request/response bodies. (2767) - Deprecate ClientResponseError.code in favor of .status to keep similarity with response classes. (2781) - Implement ``app.add_routes()`` method. (2787) - Implement ``web.static()`` and ``RouteTableDef.static()`` API. (2795) - Install a test event loop as default by ``asyncio.set_event_loop()``. The change affects aiohttp test utils but backward compatibility is not broken for 99.99% of use cases. (2804) - Refactor ``ClientResponse`` constructor: make logically required constructor arguments mandatory, drop ``_post_init()`` method. (2820) - Use ``app.add_routes()`` in server docs everywhere (2830) - Websockets refactoring, all websocket writer methods are converted into coroutines. (2836) - Provide ``Content-Range`` header for ``Range`` requests (2844) Bugfixes -------- - Fix websocket client return EofStream. (2784) - Fix websocket demo. (2789) - Property ``BaseRequest.http_range`` now returns a python-like slice when requesting the tail of the range. It's now indicated by a negative value in ``range.start`` rather then in ``range.stop`` (2805) - Close a connection if an unexpected exception occurs while sending a request (2827) - Fix firing DNS tracing events. (2841) Improved Documentation ---------------------- - Change ``ClientResponse.json()`` documentation to reflect that it now allows "application/xxx+json" content-types (2206) - Document behavior when cchardet detects encodings that are unknown to Python. (2732) - Add diagrams for tracing request life style. (2748) - Drop removed functionality for passing ``StreamReader`` as data at client side. (2793) ``` ### 3.0.9 ``` ================== - Close a connection if an unexpected exception occurs while sending a request (2827) ``` ### 3.0.8 ``` ================== - Use ``asyncio.current_task()`` on Python 3.7 (2825) ``` ### 3.0.7 ``` ================== - Fix SSL proxy support by client. (2810) - Restore a imperative check in ``setup.py`` for python version. The check works in parallel to environment marker. As effect a error about unsupported Python versions is raised even on outdated systems with very old ``setuptools`` version installed. (2813) ``` ### 3.0.6 ``` ================== - Add ``_reuse_address`` and ``_reuse_port`` to ``web_runner.TCPSite.__slots__``. (2792) ``` ### 3.0.5 ``` ================== - Fix ``InvalidStateError`` on processing a sequence of two ``RequestHandler.data_received`` calls on web server. (2773) ``` ### 3.0.4 ``` ================== - Fix ``IndexError`` in HTTP request handling by server. (2752) - Fix MultipartWriter.append* no longer returning part/payload. (2759) ``` ### 3.0.3 ``` ================== - Relax ``attrs`` dependency to minimal actually supported version 17.0.3 The change allows to avoid version conflicts with currently existing test tools. ``` ### 3.0.2 ``` ================== Security Fix ------------ - Prevent Windows absolute URLs in static files. Paths like ``/static/D:\path`` and ``/static/\\hostname\drive\path`` are forbidden. ``` ### 3.0.1 ``` ===== - Technical release for fixing distribution problems. ``` ### 3.0.0 ``` ================== Features -------- - Speed up the `PayloadWriter.write` method for large request bodies. (2126) - StreamResponse and Response are now MutableMappings. (2246) - ClientSession publishes a set of signals to track the HTTP request execution. (2313) - Content-Disposition fast access in ClientResponse (2455) - Added support to Flask-style decorators with class-based Views. (2472) - Signal handlers (registered callbacks) should be coroutines. (2480) - Support ``async with test_client.ws_connect(...)`` (2525) - Introduce *site* and *application runner* as underlying API for `web.run_app` implementation. (2530) - Only quote multipart boundary when necessary and sanitize input (2544) - Make the `aiohttp.ClientResponse.get_encoding` method public with the processing of invalid charset while detecting content encoding. (2549) - Add optional configurable per message compression for `ClientWebSocketResponse` and `WebSocketResponse`. (2551) - Add hysteresis to `StreamReader` to prevent flipping between paused and resumed states too often. (2555) - Support `.netrc` by `trust_env` (2581) - Avoid to create a new resource when adding a route with the same name and path of the last added resource (2586) - `MultipartWriter.boundary` is `str` now. (2589) - Allow a custom port to be used by `TestServer` (and associated pytest fixtures) (2613) - Add param access_log_class to web.run_app function (2615) - Add ``ssl`` parameter to client API (2626) - Fixes performance issue introduced by 2577. When there are no middlewares installed by the user, no additional and useless code is executed. (2629) - Rename PayloadWriter to StreamWriter (2654) - New options *reuse_port*, *reuse_address* are added to `run_app` and `TCPSite`. (2679) - Use custom classes to pass client signals parameters (2686) - Use ``attrs`` library for data classes, replace `namedtuple`. (2690) - Pytest fixtures renaming, add ``aiohttp_`` prefix (2578) - Add ``aiohttp-`` prefix for ``pytest-aiohttp`` command line parameters (2578) Bugfixes -------- - Correctly process upgrade request from server to HTTP2. ``aiohttp`` does not support HTTP2 yet, the protocol is not upgraded but response is handled correctly. (2277) - Fix ClientConnectorSSLError and ClientProxyConnectionError for proxy connector (2408) - Fix connector convert OSError to ClientConnectorError (2423) - Fix connection attempts for multiple dns hosts (2424) - Fix writing to closed transport by raising `asyncio.CancelledError` (2499) - Fix warning in `ClientSession.__del__` by stopping to try to close it. (2523) - Fixed race-condition for iterating addresses from the DNSCache. (2620) - Fix default value of `access_log_format` argument in `web.run_app` (2649) - Freeze sub-application on adding to parent app (2656) - Do percent encoding for `.url_for()` parameters (2668) - Correctly process request start time and multiple request/response headers in access log extra (2641) Improved Documentation ---------------------- - Improve tutorial docs, using `literalinclude` to link to the actual files. (2396) - Small improvement docs: better example for file uploads. (2401) - Rename `from_env` to `trust_env` in client reference. (2451) - Fixed mistype in `Proxy Support` section where `trust_env` parameter was used in `session.get("http://python.org", trust_env=True)` method instead of aiohttp.ClientSession constructor as follows: `aiohttp.ClientSession(trust_env=True)`. (2688) - Fix issue with unittest example not compiling in testing docs. (2717) Deprecations and Removals ------------------------- - Simplify HTTP pipelining implementation (2109) - Drop `StreamReaderPayload` and `DataQueuePayload`. (2257) - Drop `md5` and `sha1` finger-prints (2267) - Drop WSMessage.tp (2321) - Drop Python 3.4 and Python 3.5.0, 3.5.1, 3.5.2. Minimal supported Python versions are 3.5.3 and 3.6.0. `yield from` is gone, use `async/await` syntax. (2343) - Drop `aiohttp.Timeout` and use `async_timeout.timeout` instead. (2348) - Drop `resolve` param from TCPConnector. (2377) - Add DeprecationWarning for returning HTTPException (2415) - `send_str()`, `send_bytes()`, `send_json()`, `ping()` and `pong()` are genuine async functions now. (2475) - Drop undocumented `app.on_pre_signal` and `app.on_post_signal`. Signal handlers should be coroutines, support for regular functions is dropped. (2480) - `StreamResponse.drain()` is not a part of public API anymore, just use `await StreamResponse.write()`. `StreamResponse.write` is converted to async function. (2483) - Drop deprecated `slow_request_timeout` param and `**kwargs`` from `RequestHandler`. (2500) - Drop deprecated `resource.url()`. (2501) - Remove `%u` and `%l` format specifiers from access log format. (2506) - Drop deprecated `request.GET` property. (2547) - Simplify stream classes: drop `ChunksQueue` and `FlowControlChunksQueue`, merge `FlowControlStreamReader` functionality into `StreamReader`, drop `FlowControlStreamReader` name. (2555) - Do not create a new resource on `router.add_get(..., allow_head=True)` (2585) - Drop access to TCP tuning options from PayloadWriter and Response classes (2604) - Drop deprecated `encoding` parameter from client API (2606) - Deprecate ``verify_ssl``, ``ssl_context`` and ``fingerprint`` parameters in client API (2626) - Get rid of the legacy class StreamWriter. (2651) - Forbid non-strings in `resource.url_for()` parameters. (2668) - Deprecate inheritance from ``ClientSession`` and ``web.Application`` and custom user attributes for ``ClientSession``, ``web.Request`` and ``web.Application`` (2691) - Drop `resp = await aiohttp.request(...)` syntax for sake of `async with aiohttp.request(...) as resp:`. (2540) - Forbid synchronous context managers for `ClientSession` and test server/client. (2362) Misc ---- - 2552 ``` ### 2.3.10 ``` =================== - Fix 100% CPU usage on HTTP GET and websocket connection just after it (1955) - Patch broken `ssl.match_hostname()` on Python<3.7 (2674) ``` ### 2.3.9 ``` ================== - Fix colon handing in path for dynamic resources (2670) ``` ### 2.3.8 ``` ================== - Do not use `yarl.unquote` internal function in aiohttp. Fix incorrectly unquoted path part in URL dispatcher (2662) - Fix compatibility with `yarl==1.0.0` (2662) ``` ### 2.3.7 ``` ================== - Fixed race-condition for iterating addresses from the DNSCache. (2620) - Fix docstring for request.host (2591) - Fix docstring for request.remote (2592) ``` ### 2.3.6 ``` ================== - Correct `request.app` context (for handlers not just middlewares). (2577) ``` ### 2.3.5 ``` ================== - Fix compatibility with `pytest` 3.3+ (2565) ``` ### 2.3.4 ``` ================== - Make `request.app` point to proper application instance when using nested applications (with middlewares). (2550) - Change base class of ClientConnectorSSLError to ClientSSLError from ClientConnectorError. (2563) - Return client connection back to free pool on error in `connector.connect()`. (2567) ``` ### 2.3.3 ``` ================== - Having a `;` in Response content type does not assume it contains a charset anymore. (2197) - Use `getattr(asyncio, 'async')` for keeping compatibility with Python 3.7. (2476) - Ignore `NotImplementedError` raised by `set_child_watcher` from `uvloop`. (2491) - Fix warning in `ClientSession.__del__` by stopping to try to close it. (2523) - Fixed typo's in Third-party libraries page. And added async-v20 to the list (2510) ``` ### 2.3.2 ``` ================== - Fix passing client max size on cloning request obj. (2385) - Fix ClientConnectorSSLError and ClientProxyConnectionError for proxy connector. (2408) - Drop generated `_http_parser` shared object from tarball distribution. (2414) - Fix connector convert OSError to ClientConnectorError. (2423) - Fix connection attempts for multiple dns hosts. (2424) - Fix ValueError for AF_INET6 sockets if a preexisting INET6 socket to the `aiohttp.web.run_app` function. (2431) - `_SessionRequestContextManager` closes the session properly now. (2441) - Rename `from_env` to `trust_env` in client reference. (2451) ``` ### 2.3.1 ``` ================== - Relax attribute lookup in warning about old-styled middleware (2340) ``` ### 2.3.0 ``` ================== Features -------- - Add SSL related params to `ClientSession.request` (1128) - Make enable_compression work on HTTP/1.0 (1828) - Deprecate registering synchronous web handlers (1993) - Switch to `multidict 3.0`. All HTTP headers preserve casing now but compared in case-insensitive way. (1994) - Improvement for `normalize_path_middleware`. Added possibility to handle URLs with query string. (1995) - Use towncrier for CHANGES.txt build (1997) - Implement `trust_env=True` param in `ClientSession`. (1998) - Added variable to customize proxy headers (2001) - Implement `router.add_routes` and router decorators. (2004) - Deprecated `BaseRequest.has_body` in favor of `BaseRequest.can_read_body` Added `BaseRequest.body_exists` attribute that stays static for the lifetime of the request (2005) - Provide `BaseRequest.loop` attribute (2024) - Make `_CoroGuard` awaitable and fix `ClientSession.close` warning message (2026) - Responses to redirects without Location header are returned instead of raising a RuntimeError (2030) - Added `get_client`, `get_server`, `setUpAsync` and `tearDownAsync` methods to AioHTTPTestCase (2032) - Add automatically a SafeChildWatcher to the test loop (2058) - add ability to disable automatic response decompression (2110) - Add support for throttling DNS request, avoiding the requests saturation when there is a miss in the DNS cache and many requests getting into the connector at the same time. (2111) - Use request for getting access log information instead of message/transport pair. Add `RequestBase.remote` property for accessing to IP of client initiated HTTP request. (2123) - json() raises a ContentTypeError exception if the content-type does not meet the requirements instead of raising a generic ClientResponseError. (2136) - Make the HTTP client able to return HTTP chunks when chunked transfer encoding is used. (2150) - add `append_version` arg into `StaticResource.url` and `StaticResource.url_for` methods for getting an url with hash (version) of the file. (2157) - Fix parsing the Forwarded header. * commas and semicolons are allowed inside quoted-strings; * empty forwarded-pairs (as in for=_1;;by=_2) are allowed; * non-standard parameters are allowed (although this alone could be easily done in the previous parser). (2173) - Don't require ssl module to run. aiohttp does not require SSL to function. The code paths involved with SSL will only be hit upon SSL usage. Raise `RuntimeError` if HTTPS protocol is required but ssl module is not present. (2221) - Accept coroutine fixtures in pytest plugin (2223) - Call `shutdown_asyncgens` before event loop closing on Python 3.6. (2227) - Speed up Signals when there are no receivers (2229) - Raise `InvalidURL` instead of `ValueError` on fetches with invalid URL. (2241) - Move `DummyCookieJar` into `cookiejar.py` (2242) - `run_app`: Make `print=None` disable printing (2260) - Support `brotli` encoding (generic-purpose lossless compression algorithm) (2270) - Add server support for WebSockets Per-Message Deflate. Add client option to add deflate compress header in WebSockets request header. If calling ClientSession.ws_connect() with `compress=15` the client will support deflate compress negotiation. (2273) - Support `verify_ssl`, `fingerprint`, `ssl_context` and `proxy_headers` by `client.ws_connect`. (2292) - Added `aiohttp.ClientConnectorSSLError` when connection fails due `ssl.SSLError` (2294) - `aiohttp.web.Application.make_handler` support `access_log_class` (2315) - Build HTTP parser extension in non-strict mode by default. (2332) Bugfixes -------- - Clear auth information on redirecting to other domain (1699) - Fix missing app.loop on startup hooks during tests (2060) - Fix issue with synchronous session closing when using `ClientSession` as an asynchronous context manager. (2063) - Fix issue with `CookieJar` incorrectly expiring cookies in some edge cases. (2084) - Force use of IPv4 during test, this will make tests run in a Docker container (2104) - Warnings about unawaited coroutines now correctly point to the user's code. (2106) - Fix issue with `IndexError` being raised by the `StreamReader.iter_chunks()` generator. (2112) - Support HTTP 308 Permanent redirect in client class. (2114) - Fix `FileResponse` sending empty chunked body on 304. (2143) - Do not add `Content-Length: 0` to GET/HEAD/TRACE/OPTIONS requests by default. (2167) - Fix parsing the Forwarded header according to RFC 7239. (2170) - Securely determining remote/scheme/host 2171 (2171) - Fix header name parsing, if name is split into multiple lines (2183) - Handle session close during connection, `KeyError: <aiohttp.connector._TransportPlaceholder>` (2193) - Fixes uncaught `TypeError` in `helpers.guess_filename` if `name` is not a string (2201) - Raise OSError on async DNS lookup if resolved domain is an alias for another one, which does not have an A or CNAME record. (2231) - Fix incorrect warning in `StreamReader`. (2251) - Properly clone state of web request (2284) - Fix C HTTP parser for cases when status line is split into different TCP packets. (2311) - Fix `web.FileResponse` overriding user supplied Content-Type (2317) Improved Documentation ---------------------- - Add a note about possible performance degradation in `await resp.text()` if charset was not provided by `Content-Type` HTTP header. Pass explicit encoding to solve it. (1811) - Drop `disqus` widget from documentation pages. (2018) - Add a graceful shutdown section to the client usage documentation. (2039) - Document `connector_owner` parameter. (2072) - Update the doc of web.Application (2081) - Fix mistake about access log disabling. (2085) - Add example usage of on_startup and on_shutdown signals by creating and disposing an aiopg connection engine. (2131) - Document `encoded=True` for `yarl.URL`, it disables all yarl transformations. (2198) - Document that all app's middleware factories are run for every request. (2225) - Reflect the fact that default resolver is threaded one starting from aiohttp 1.1 (2228) Deprecations and Removals ------------------------- - Drop deprecated `Server.finish_connections` (2006) - Drop %O format from logging, use %b instead. Drop %e format from logging, environment variables are not supported anymore. (2123) - Drop deprecated secure_proxy_ssl_header support (2171) - Removed TimeService in favor of simple caching. TimeService also had a bug where it lost about 0.5 seconds per second. (2176) - Drop unused response_factory from static files API (2290) Misc ---- - 2013, 2014, 2048, 2094, 2149, 2187, 2214, 2225, 2243, 2248 ```
Links - PyPI: https://pypi.python.org/pypi/aiohttp - Changelog: https://pyup.io/changelogs/aiohttp/ - Repo: https://github.com/aio-libs/aiohttp/