From 9a0bc18221b4f0d877bb02bea26d3384f504135e Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Fri, 18 Nov 2016 20:31:18 +0200 Subject: [PATCH] Add missed deprecations for resp.url --- aiohttp/client_reqrep.py | 3 +++ docs/client_reference.rst | 2 ++ 2 files changed, 5 insertions(+) diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index 929f083a602..b226c011df8 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -522,6 +522,9 @@ def url_obj(self): @property def url(self): + warnings.warn("Deprecated, use .url_obj", + DeprecationWarning, + stacklevel=2) return str(self._url_obj) @property diff --git a/docs/client_reference.rst b/docs/client_reference.rst index 6514740dc29..3cc24489d6e 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -1204,6 +1204,8 @@ Response object URL of request (:class:`str`). + .. deprecated:: 1.1 + .. attribute:: url_obj URL of request (:class:`~yarl.URL`).