Title: gh-89554: Document socket.SocketType as a class by gaborbernat · Pull Request #150683 · python/cpython · GitHub
Open Graph Title: gh-89554: Document socket.SocketType as a class by gaborbernat · Pull Request #150683 · python/cpython
X Title: gh-89554: Document socket.SocketType as a class by gaborbernat · Pull Request #150683 · python/cpython
Description: socket.SocketType is a class, but the documentation marks it with the .. data:: directive, so :class: cross-references to it cannot resolve against a py:class target. This switches the entry to .. class::. It also corrects the description: SocketType is re-exported from _socket as an alias of _socket.socket, the base class of socket.socket, so isinstance(socket(...), SocketType) is true while type(socket(...)) is socket.socket itself. The current wording, "the same as type(socket(...))", is the misleading text reported in gh-88427. This overlaps with #93288, which corrects the same sentence but keeps .. data::. This PR combines that wording fix with the role fix. Refs: gh-89554, gh-88427. Documentation-only change, so no Misc/NEWS entry (skip news). This file is not covered by CODEOWNERS, so cc @vstinner, who reviews most socket changes.
Open Graph Description: socket.SocketType is a class, but the documentation marks it with the .. data:: directive, so :class: cross-references to it cannot resolve against a py:class target. This switches the entry to .. ...
X Description: socket.SocketType is a class, but the documentation marks it with the .. data:: directive, so :class: cross-references to it cannot resolve against a py:class target. This switches the entry to .. ...
Opengraph URL: https://github.com/python/cpython/pull/150683
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5a5a316e-cb68-b5fa-defd-491abb098cef |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 95C0:388D53:E11AB4:149C959:6A561080 |
| html-safe-nonce | 44fd601d753e5b231fb196dd5010389f6bfa3a1f499dd8b16c395c79b25ea9fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUMwOjM4OEQ1MzpFMTFBQjQ6MTQ5Qzk1OTo2QTU2MTA4MCIsInZpc2l0b3JfaWQiOiI4NTc3MzM2Njk3NjY2OTcwODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8030abbed8eca9bfc5b92c168274735ba669b48f46f6b2a01202267fd5d58b6f |
| hovercard-subject-tag | pull_request:3776995689 |
| 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/150683/files |
| twitter:image | https://avatars.githubusercontent.com/u/690238?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/690238?s=400&v=4 |
| og:image:alt | socket.SocketType is a class, but the documentation marks it with the .. data:: directive, so :class: cross-references to it cannot resolve against a py:class target. This switches the entry to .. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f4368738fc918fecd9b3958f6b49218bbe60d4185f38e72e3954e11f1ad0213a |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 85a7179838b41e8b23f939d3b67b53f752ecfc54 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width