Title: Can't pickle generic types · Issue #511 · python/typing · GitHub
Open Graph Title: Can't pickle generic types · Issue #511 · python/typing
X Title: Can't pickle generic types · Issue #511 · python/typing
Description: Briefly: >>> import pickle, typing >>> tp = typing.List[int] >>> pickle.loads(pickle.dumps(tp)) Traceback (most recent call last): File "
Open Graph Description: Briefly: >>> import pickle, typing >>> tp = typing.List[int] >>> pickle.loads(pickle.dumps(tp)) Traceback (most recent call last): File "
X Description: Briefly: >>> import pickle, typing >>> tp = typing.List[int] >>> pickle.loads(pickle.dumps(tp)) Traceback (most recent call last): File "<ipython-input-5-ae365d48...
Opengraph URL: https://github.com/python/typing/issues/511
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't pickle generic types","articleBody":"Briefly:\r\n```\r\n\u003e\u003e\u003e import pickle, typing\r\n\u003e\u003e\u003e tp = typing.List[int]\r\n\u003e\u003e\u003e pickle.loads(pickle.dumps(tp))\r\nTraceback (most recent call last):\r\n File \"\u003cipython-input-5-ae365d48e86d\u003e\", line 1, in \u003cmodule\u003e\r\n pickle.loads(pickle.dumps(tp))\r\nPicklingError: Can't pickle typing.List[int]: it's not the same object as typing.List\r\n```\r\n\r\nThis can be an issue with certain advanced serialization libraries such as [dill](https://github.com/uqfoundation/dill/issues/179) or [cloudpickle](https://github.com/cloudpipe/cloudpickle/issues/63), which are often used by distributed computing frameworks.\r\n","author":{"url":"https://github.com/pitrou","@type":"Person","name":"pitrou"},"datePublished":"2017-12-07T16:25:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/511/typing/issues/511"}
| 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:7bd6507f-6e83-8ee9-157e-a7e976d7ff61 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E442:13DA2D:2506EFA:3581EED:6A4D19C9 |
| html-safe-nonce | d2c0a329f77e7ca004fa81a47198f684ca851a76ca22b80144a70bc6a7222578 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDQyOjEzREEyRDoyNTA2RUZBOjM1ODFFRUQ6NkE0RDE5QzkiLCJ2aXNpdG9yX2lkIjoiNDE0MzgxNzM0NDExODc1NzgzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d41cf45718665a658b32040a4b3210730e2c48f64c77d5ff711ae0980e543fb0 |
| hovercard-subject-tag | issue:280192439 |
| 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/typing/511/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c07b04423523ff42ef907b529fa6813f11419c067929369c11c4cb0935b5e876/python/typing/issues/511 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c07b04423523ff42ef907b529fa6813f11419c067929369c11c4cb0935b5e876/python/typing/issues/511 |
| og:image:alt | Briefly: >>> import pickle, typing >>> tp = typing.List[int] >>> pickle.loads(pickle.dumps(tp)) Traceback (most recent call last): File " |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pitrou |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| 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 | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width