diff options
author | Ashwin Ramaswami <aramaswamis@gmail.com> | 2019-09-13 04:40:08 -0700 |
---|---|---|
committer | Stéphane Wirtel <stephane@wirtel.be> | 2019-09-13 12:40:07 +0100 |
commit | ff2e18286560e981f4e09afb0d2448ea994414d8 (patch) | |
tree | 9a339486705cfbc5d6b183ffdf11ad686b256b1d /Lib/urllib/response.py | |
parent | bb41147eab15a2958f4ad38261e5bf608f6ace1b (diff) | |
download | cpython-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.py | 4 |
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 |