Title: ReadTimeoutError doesn't pickle / maintain the str parsing · Issue #3567 · urllib3/urllib3 · GitHub
Open Graph Title: ReadTimeoutError doesn't pickle / maintain the str parsing · Issue #3567 · urllib3/urllib3
X Title: ReadTimeoutError doesn't pickle / maintain the str parsing · Issue #3567 · urllib3/urllib3
Description: Subject When using urllib3 inside of multiprocessing, python often uses pickle to send exceptions and other data from the child to the parent. If ReadTimeoutError is raised inside a multiprocess, it gets pickle, but loses most of its con...
Open Graph Description: Subject When using urllib3 inside of multiprocessing, python often uses pickle to send exceptions and other data from the child to the parent. If ReadTimeoutError is raised inside a multiprocess, i...
X Description: Subject When using urllib3 inside of multiprocessing, python often uses pickle to send exceptions and other data from the child to the parent. If ReadTimeoutError is raised inside a multiprocess, i...
Opengraph URL: https://github.com/urllib3/urllib3/issues/3567
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ReadTimeoutError doesn't pickle / maintain the str parsing","articleBody":"### Subject\n\nWhen using urllib3 inside of multiprocessing, python often uses pickle to send exceptions and other data from the child to the parent. If ReadTimeoutError is raised inside a multiprocess, it gets pickle, but loses most of its context in route back to the parent process.\n\n### Environment\n\nDescribe your environment.\nAt least, paste here the output of:\n\n```python\n\u003e\u003e\u003e import platform\n\u003e\u003e\u003e import ssl\n\u003e\u003e\u003e import urllib3\n\u003e\u003e\u003e\n\u003e\u003e\u003e print(\"OS\", platform.platform())\nprint(\"Python\", platform.python_version())\nprint(ssl.OPENSSL_VERSION)\nprint(\"urllib3\", urllib3.__version__)\nOS macOS-15.3.1-x86_64-i386-64bit\n\u003e\u003e\u003e print(\"Python\", platform.python_version())\nPython 3.10.14\n\u003e\u003e\u003e print(ssl.OPENSSL_VERSION)\nOpenSSL 1.1.1w 11 Sep 2023\n\u003e\u003e\u003e print(\"urllib3\", urllib3.__version__)\nurllib3 2.3.0\n```\n\n### Steps to Reproduce\n\nA simple and isolated way to reproduce the issue. A code snippet would be great.\n\n```\nIn [1]: import urllib3\n ...: import pickle\n\nIn [2]: ex = urllib3.exceptions.ReadTimeoutError('connection pool', 'my url', 'the message with more context')\n\nIn [3]: print(ex)\nconnection pool: the message with more context\n\nIn [4]: print(pickle.loads(pickle.dumps(ex)))\nNone: None\n```\n\n### Expected Behavior\n\nI understand not pickling the connection pool but optimally the error message should at least include the originally given message after pickling.\n\n### Actual Behavior\n\nSee the steps to reproduce. The string version of the exception winds up being a confusing: `None: None`\n","author":{"url":"https://github.com/csm10495","@type":"Person","name":"csm10495"},"datePublished":"2025-02-27T00:29:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/3567/urllib3/issues/3567"}
| 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:1493214f-7569-c070-fb6b-d8c92bfa9c87 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9AAE:18F221:1B1ABFB:25FB54E:69972840 |
| html-safe-nonce | f19b92edc312b71842dcd6dc7d69624751d60aab2874e70bde7930d6d2dcb855 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QUFFOjE4RjIyMToxQjFBQkZCOjI1RkI1NEU6Njk5NzI4NDAiLCJ2aXNpdG9yX2lkIjoiMjYzNTAxODA5MjA1MzczNTQ4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | af1776d372cf23fde4e7334b78403abd5d48824a94f608854ef58c1d6e610e02 |
| hovercard-subject-tag | issue:2883103970 |
| 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/urllib3/urllib3/3567/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f56bd7f38ba8797d85406d2eb2477db50ab8098552396ed6782bb90b71b2fade/urllib3/urllib3/issues/3567 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f56bd7f38ba8797d85406d2eb2477db50ab8098552396ed6782bb90b71b2fade/urllib3/urllib3/issues/3567 |
| og:image:alt | Subject When using urllib3 inside of multiprocessing, python often uses pickle to send exceptions and other data from the child to the parent. If ReadTimeoutError is raised inside a multiprocess, i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | csm10495 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7e6af791057690a60ffd9f5bb19a1e7b7637429945357211e6d6d09f15f081ae |
| turbo-cache-control | no-preview |
| go-import | github.com/urllib3/urllib3 git https://github.com/urllib3/urllib3.git |
| octolytics-dimension-user_id | 26825299 |
| octolytics-dimension-user_login | urllib3 |
| octolytics-dimension-repository_id | 2410676 |
| octolytics-dimension-repository_nwo | urllib3/urllib3 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 2410676 |
| octolytics-dimension-repository_network_root_nwo | urllib3/urllib3 |
| 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 | e6b01c3dc21c2addba0d96343ac1390c86c8bdfd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width