summaryrefslogtreecommitdiff
path: root/Lib/urllib/response.py
diff options
context:
space:
mode:
authorAshwin Ramaswami <aramaswamis@gmail.com>2019-09-13 04:40:08 -0700
committerStéphane Wirtel <stephane@wirtel.be>2019-09-13 12:40:07 +0100
commitff2e18286560e981f4e09afb0d2448ea994414d8 (patch)
tree9a339486705cfbc5d6b183ffdf11ad686b256b1d /Lib/urllib/response.py
parentbb41147eab15a2958f4ad38261e5bf608f6ace1b (diff)
downloadcpython-git-ff2e18286560e981f4e09afb0d2448ea994414d8.tar.gz
bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447)
Co-Authored-By: epicfaace <aramaswamis@gmail.com>
Diffstat (limited to 'Lib/urllib/response.py')
-rw-r--r--Lib/urllib/response.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py
index 4778118dbb..5a2c3cc78c 100644
--- a/Lib/urllib/response.py
+++ b/Lib/urllib/response.py
@@ -73,6 +73,10 @@ class addinfourl(addinfo):
self.url = url
self.code = code
+ @property
+ def status(self):
+ return self.code
+
def getcode(self):
return self.code