commit | ff2e18286560e981f4e09afb0d2448ea994414d8 | [log] [tgz] |
---|---|---|
author | Ashwin Ramaswami <aramaswamis@gmail.com> | Fri Sep 13 04:40:08 2019 -0700 |
committer | Stéphane Wirtel <stephane@wirtel.be> | Fri Sep 13 12:40:07 2019 +0100 |
tree | 9a339486705cfbc5d6b183ffdf11ad686b256b1d | |
parent | bb41147eab15a2958f4ad38261e5bf608f6ace1b [diff] [blame] |
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>
diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py index 4778118..5a2c3cc 100644 --- a/Lib/urllib/response.py +++ b/Lib/urllib/response.py
@@ -73,6 +73,10 @@ self.url = url self.code = code + @property + def status(self): + return self.code + def getcode(self): return self.code