Title: Docs: Fix getstatus() -> getcode() typos by hugovk · Pull Request #101296 · python/cpython · GitHub
Open Graph Title: Docs: Fix getstatus() -> getcode() typos by hugovk · Pull Request #101296 · python/cpython
X Title: Docs: Fix getstatus() -> getcode() typos by hugovk · Pull Request #101296 · python/cpython
Description: The docs say getstatus() for http.client.HTTPResponse and urllib.response.addinfourl: https://docs.python.org/3/library/http.client.html#http.client.HTTPResponse.getstatus https://docs.python.org/3/library/urllib.request.html#urllib.response.addinfourl.getstatus But they're really getcode(): cpython/Lib/http/client.py Lines 778 to 783 in f02fa64 def getcode(self): '''Return the HTTP status code that was sent with the response, or None if the URL is not an HTTP URL. ''' return self.status cpython/Lib/urllib/response.py Lines 80 to 81 in f02fa64 def getcode(self): return self.code The documentation (and typos) for these were added as part of #11447 for Python 3.9 in 2019, although the methods have been around much longer (2009 and 2008). Let's backport to at least 3.10.
Open Graph Description: The docs say getstatus() for http.client.HTTPResponse and urllib.response.addinfourl: https://docs.python.org/3/library/http.client.html#http.client.HTTPResponse.getstatus https://docs.python.org/...
X Description: The docs say getstatus() for http.client.HTTPResponse and urllib.response.addinfourl: https://docs.python.org/3/library/http.client.html#http.client.HTTPResponse.getstatus https://docs.python.org/...
Opengraph URL: https://github.com/python/cpython/pull/101296
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:46bc822d-51a2-7be6-ebb0-96976b487236 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 85A6:15F89A:221CF27:2E7A810:696ACED1 |
| html-safe-nonce | c7b2848611a42414dd121a0d2c52ea66a735f3a378331ccc830cc95ec2a035d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUE2OjE1Rjg5QToyMjFDRjI3OjJFN0E4MTA6Njk2QUNFRDEiLCJ2aXNpdG9yX2lkIjoiODEyNjQ1MzUzNjAwNzA0ODkxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6d5e4b12751becb7b5b7032c93108ef5220fa94965e04b98bf98d721d21b9d59 |
| hovercard-subject-tag | pull_request:1215769864 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/101296/files |
| twitter:image | https://avatars.githubusercontent.com/u/1324225?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1324225?s=400&v=4 |
| og:image:alt | The docs say getstatus() for http.client.HTTPResponse and urllib.response.addinfourl: https://docs.python.org/3/library/http.client.html#http.client.HTTPResponse.getstatus https://docs.python.org/... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | c785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c718a376fcf780eb22089171adb84a543f660bf7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width