{"action":"created","issue":{"url":"https://api.github.com/repos/cloudpipe/cloudpickle/issues/156","repository_url":"https://api.github.com/repos/cloudpipe/cloudpickle","labels_url":"https://api.github.com/repos/cloudpipe/cloudpickle/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/cloudpipe/cloudpickle/issues/156/comments","events_url":"https://api.github.com/repos/cloudpipe/cloudpickle/issues/156/events","html_url":"https://github.com/cloudpipe/cloudpickle/pull/156","id":295681334,"number":156,"title":"BUG: itertools objects are actually picklable","user":{"login":"llllllllll","id":3064397,"avatar_url":"https://avatars3.githubusercontent.com/u/3064397?v=4","gravatar_id":"","url":"https://api.github.com/users/llllllllll","html_url":"https://github.com/llllllllll","followers_url":"https://api.github.com/users/llllllllll/followers","following_url":"https://api.github.com/users/llllllllll/following{/other_user}","gists_url":"https://api.github.com/users/llllllllll/gists{/gist_id}","starred_url":"https://api.github.com/users/llllllllll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/llllllllll/subscriptions","organizations_url":"https://api.github.com/users/llllllllll/orgs","repos_url":"https://api.github.com/users/llllllllll/repos","events_url":"https://api.github.com/users/llllllllll/events{/privacy}","received_events_url":"https://api.github.com/users/llllllllll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-08T22:02:09Z","updated_at":"2018-02-08T22:06:03Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cloudpipe/cloudpickle/pulls/156","html_url":"https://github.com/cloudpipe/cloudpickle/pull/156","diff_url":"https://github.com/cloudpipe/cloudpickle/pull/156.diff","patch_url":"https://github.com/cloudpipe/cloudpickle/pull/156.patch"},"body":"someone pointed this out to me in a cloudpickle-generators PR. I looked into the CPython source and saw that itertools types are actually picklable. I am not sure why we have `save_unsupported` at all. If we don't know what to do with something, we should just fall back to pickle, which fails with a nice error. For example:\r\n\r\n```python\r\nIn [2]: def f():\r\n   ...:     yield\r\n   ...:     \r\n\r\nIn [3]: cp.dumps(f())\r\n   ...\r\n\r\nTypeError: can't pickle generator objects\r\n```\r\n\r\nThe added test is a regression test, even though the `__reduce__` implementation is in Python itself."},"comment":{"url":"https://api.github.com/repos/cloudpipe/cloudpickle/issues/comments/364264535","html_url":"https://github.com/cloudpipe/cloudpickle/pull/156#issuecomment-364264535","issue_url":"https://api.github.com/repos/cloudpipe/cloudpickle/issues/156","id":364264535,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars0.githubusercontent.com/u/8655789?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T22:06:02Z","updated_at":"2018-02-08T22:06:02Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=h1) Report\n> Merging [#156](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=desc) into [master](https://codecov.io/gh/cloudpipe/cloudpickle/commit/fc339d2f1d04246199574adbd819f2324fa092d9?src=pr&el=desc) will **decrease** coverage by `0.18%`.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156/graphs/tree.svg?src=pr&token=4ZB67jK6mW&width=650&height=150)](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=tree)\n\n```diff\n@@            Coverage Diff             @@\n##           master     #156      +/-   ##\n==========================================\n- Coverage   83.91%   83.73%   -0.19%     \n==========================================\n  Files           1        1              \n  Lines         541      535       -6     \n  Branches       98       96       -2     \n==========================================\n- Hits          454      448       -6     \n  Misses         63       63              \n  Partials       24       24\n```\n\n\n| [Impacted Files](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [cloudpickle/cloudpickle.py](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156/diff?src=pr&el=tree#diff-Y2xvdWRwaWNrbGUvY2xvdWRwaWNrbGUucHk=) | `83.73% <ø> (-0.19%)` | :arrow_down: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=footer). Last update [fc339d2...fee97f6](https://codecov.io/gh/cloudpipe/cloudpickle/pull/156?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov-io"}}