Title: BufferedRWPair annotations · Issue #13495 · python/typeshed · GitHub
Open Graph Title: BufferedRWPair annotations · Issue #13495 · python/typeshed
X Title: BufferedRWPair annotations · Issue #13495 · python/typeshed
Description: Bug Report It is typical to initialize an io.BufferedRWPair with the returns of Path.open() (in binary mode) as the arguments, and this works as expected. BufferedRWPair( Path('readfrom.dat').open('rb'), Path('writeto.dat').open('wb') ) ...
Open Graph Description: Bug Report It is typical to initialize an io.BufferedRWPair with the returns of Path.open() (in binary mode) as the arguments, and this works as expected. BufferedRWPair( Path('readfrom.dat').open(...
X Description: Bug Report It is typical to initialize an io.BufferedRWPair with the returns of Path.open() (in binary mode) as the arguments, and this works as expected. BufferedRWPair( Path('readfrom.dat'...
Opengraph URL: https://github.com/python/typeshed/issues/13495
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BufferedRWPair annotations","articleBody":"**Bug Report**\n\nIt is typical to initialize an `io.BufferedRWPair` with the returns of `Path.open()` (in binary mode) as the arguments, and this works as expected.\n\n```python\nBufferedRWPair(\n Path('readfrom.dat').open('rb'),\n Path('writeto.dat').open('wb')\n)\n```\n\n**To Reproduce**\n\nhttps://mypy-play.net/?mypy=latest&python=3.13&gist=79ee15dce5f93b8aa66a2a04c7bedcdc\n\n**Expected Behavior**\n\nType checking should pass.\n\n**Actual Behavior**\n\nThe type checking fails with:\n\n```\nerror: Argument 1 to \"BufferedRWPair\" has incompatible type \"BufferedReader\"; expected \"RawIOBase\" [arg-type]\nerror: Argument 2 to \"BufferedRWPair\" has incompatible type \"BufferedWriter\"; expected \"RawIOBase\" [arg-type]\n```\n\n**Your Environment**\n\n\u003c!-- Include as many relevant details about the environment you experienced the bug in -->\n\n- Mypy version used: 1.15.0\n- Mypy command-line flags:\n- Mypy configuration options from `mypy.ini` (and other config files):\n```\n[tool.mypy]\nstrict = true\n```\n- Python version used: 3.13","author":{"url":"https://github.com/CodeMouse92","@type":"Person","name":"CodeMouse92"},"datePublished":"2025-02-12T22:48:39Z","url":"https://github.com/python/typeshed/issues/13495"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:602b4034-aaf1-c4f2-2396-6604412bf5eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A52E:2FF516:C04F04:101FC8C:6B004D58 |
| html-safe-nonce | 3c4ad210be836752cae204a85e3ace0aaecc301d97924905b6703c75793345a6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTJFOjJGRjUxNjpDMDRGMDQ6MTAxRkM4Qzo2QjAwNEQ1OCIsInZpc2l0b3JfaWQiOiI1OTExNTUxNDk4NjI1NTAyNTUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3f7fdd13974998c5e3e697ed01989d55711ca6536cbdb515c9fbec3a34f5ae2f |
| hovercard-subject-tag | issue:2849515879 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/typeshed/13495/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a81585642696273cb1c432712a58fd770e4d357ac3f2ff329a0580d8e1eebafb/python/typeshed/issues/13495 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a81585642696273cb1c432712a58fd770e4d357ac3f2ff329a0580d8e1eebafb/python/typeshed/issues/13495 |
| og:image:alt | Bug Report It is typical to initialize an io.BufferedRWPair with the returns of Path.open() (in binary mode) as the arguments, and this works as expected. BufferedRWPair( Path('readfrom.dat').open(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CodeMouse92 |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width