{"action":"closed","number":62,"pull_request":{"url":"https://api.github.com/repos/scikit-hep/uproot/pulls/62","id":173882054,"html_url":"https://github.com/scikit-hep/uproot/pull/62","diff_url":"https://github.com/scikit-hep/uproot/pull/62.diff","patch_url":"https://github.com/scikit-hep/uproot/pull/62.patch","issue_url":"https://api.github.com/repos/scikit-hep/uproot/issues/62","number":62,"state":"closed","locked":false,"title":"Temp fixed a problem preventing JaggedArray from being pickled","user":{"login":"asymmetry","id":679529,"avatar_url":"https://avatars3.githubusercontent.com/u/679529?v=4","gravatar_id":"","url":"https://api.github.com/users/asymmetry","html_url":"https://github.com/asymmetry","followers_url":"https://api.github.com/users/asymmetry/followers","following_url":"https://api.github.com/users/asymmetry/following{/other_user}","gists_url":"https://api.github.com/users/asymmetry/gists{/gist_id}","starred_url":"https://api.github.com/users/asymmetry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asymmetry/subscriptions","organizations_url":"https://api.github.com/users/asymmetry/orgs","repos_url":"https://api.github.com/users/asymmetry/repos","events_url":"https://api.github.com/users/asymmetry/events{/privacy}","received_events_url":"https://api.github.com/users/asymmetry/received_events","type":"User","site_admin":false},"body":"This is probably another tiny bug about the diskcache. It seems the JaggedArray class is not able to be pickled if generated by reading a rootfile (ok if from lists). I tested it with HZZ.root and some codes like this:\r\n```\r\n_disk_cache = uproot.cache.DiskCache.create(50 * 1024**3, _cache_dir)\r\n_cache = uproot.cache.MemoryCache(8 * 1024**3, spillover=_disk_cache, spill_immediately=True)\r\ntree = uproot.open('HZZ.root')['events']\r\nmuon_px = tree.arrays([\"Muon_Px\"], cache=_cache)\r\n```\r\nand the output is:\r\n```\r\n_pickle.PicklingError: Can't pickle <class 'uproot.rootio.TLeafI'>: attribute lookup TLeafI on uproot.rootio failed\r\n```\r\n\r\nDigging into the code, it seems that the leafcount attribute in JaggedArray is causing this problem since it saves a dynamically generated class. And pickle does not work very well with dynamic things. The only place leafcount is used is the JaggedArray.aligned() function and after a grep, I did not see any other place this function is called. So I removed this leafcount attribute as a temp work-around and aligned() can still be calculated by comparing starts and stops.\r\n\r\nI might be wrong if this function is added on purpose. If so, just drop off this PR and fix it with a more decent way.\r\n\r\nuproot is a great project! Thanks a lot!","created_at":"2018-03-08T23:38:43Z","updated_at":"2018-03-09T01:28:25Z","closed_at":"2018-03-09T01:28:25Z","merged_at":null,"merge_commit_sha":"1e9bcea534f32af6fbe033e3a00cb197955fe118","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-hep/uproot/pulls/62/commits","review_comments_url":"https://api.github.com/repos/scikit-hep/uproot/pulls/62/comments","review_comment_url":"https://api.github.com/repos/scikit-hep/uproot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-hep/uproot/issues/62/comments","statuses_url":"https://api.github.com/repos/scikit-hep/uproot/statuses/1058fcf1700ae7bda14704d8cacec4a4cb852e1c","head":{"label":"asymmetry:develop","ref":"develop","sha":"1058fcf1700ae7bda14704d8cacec4a4cb852e1c","user":{"login":"asymmetry","id":679529,"avatar_url":"https://avatars3.githubusercontent.com/u/679529?v=4","gravatar_id":"","url":"https://api.github.com/users/asymmetry","html_url":"https://github.com/asymmetry","followers_url":"https://api.github.com/users/asymmetry/followers","following_url":"https://api.github.com/users/asymmetry/following{/other_user}","gists_url":"https://api.github.com/users/asymmetry/gists{/gist_id}","starred_url":"https://api.github.com/users/asymmetry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asymmetry/subscriptions","organizations_url":"https://api.github.com/users/asymmetry/orgs","repos_url":"https://api.github.com/users/asymmetry/repos","events_url":"https://api.github.com/users/asymmetry/events{/privacy}","received_events_url":"https://api.github.com/users/asymmetry/received_events","type":"User","site_admin":false},"repo":{"id":124189932,"name":"uproot","full_name":"asymmetry/uproot","owner":{"login":"asymmetry","id":679529,"avatar_url":"https://avatars3.githubusercontent.com/u/679529?v=4","gravatar_id":"","url":"https://api.github.com/users/asymmetry","html_url":"https://github.com/asymmetry","followers_url":"https://api.github.com/users/asymmetry/followers","following_url":"https://api.github.com/users/asymmetry/following{/other_user}","gists_url":"https://api.github.com/users/asymmetry/gists{/gist_id}","starred_url":"https://api.github.com/users/asymmetry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asymmetry/subscriptions","organizations_url":"https://api.github.com/users/asymmetry/orgs","repos_url":"https://api.github.com/users/asymmetry/repos","events_url":"https://api.github.com/users/asymmetry/events{/privacy}","received_events_url":"https://api.github.com/users/asymmetry/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/asymmetry/uproot","description":"Minimalist ROOT I/O in pure Python and Numpy.","fork":true,"url":"https://api.github.com/repos/asymmetry/uproot","forks_url":"https://api.github.com/repos/asymmetry/uproot/forks","keys_url":"https://api.github.com/repos/asymmetry/uproot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/asymmetry/uproot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/asymmetry/uproot/teams","hooks_url":"https://api.github.com/repos/asymmetry/uproot/hooks","issue_events_url":"https://api.github.com/repos/asymmetry/uproot/issues/events{/number}","events_url":"https://api.github.com/repos/asymmetry/uproot/events","assignees_url":"https://api.github.com/repos/asymmetry/uproot/assignees{/user}","branches_url":"https://api.github.com/repos/asymmetry/uproot/branches{/branch}","tags_url":"https://api.github.com/repos/asymmetry/uproot/tags","blobs_url":"https://api.github.com/repos/asymmetry/uproot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/asymmetry/uproot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/asymmetry/uproot/git/refs{/sha}","trees_url":"https://api.github.com/repos/asymmetry/uproot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/asymmetry/uproot/statuses/{sha}","languages_url":"https://api.github.com/repos/asymmetry/uproot/languages","stargazers_url":"https://api.github.com/repos/asymmetry/uproot/stargazers","contributors_url":"https://api.github.com/repos/asymmetry/uproot/contributors","subscribers_url":"https://api.github.com/repos/asymmetry/uproot/subscribers","subscription_url":"https://api.github.com/repos/asymmetry/uproot/subscription","commits_url":"https://api.github.com/repos/asymmetry/uproot/commits{/sha}","git_commits_url":"https://api.github.com/repos/asymmetry/uproot/git/commits{/sha}","comments_url":"https://api.github.com/repos/asymmetry/uproot/comments{/number}","issue_comment_url":"https://api.github.com/repos/asymmetry/uproot/issues/comments{/number}","contents_url":"https://api.github.com/repos/asymmetry/uproot/contents/{+path}","compare_url":"https://api.github.com/repos/asymmetry/uproot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/asymmetry/uproot/merges","archive_url":"https://api.github.com/repos/asymmetry/uproot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/asymmetry/uproot/downloads","issues_url":"https://api.github.com/repos/asymmetry/uproot/issues{/number}","pulls_url":"https://api.github.com/repos/asymmetry/uproot/pulls{/number}","milestones_url":"https://api.github.com/repos/asymmetry/uproot/milestones{/number}","notifications_url":"https://api.github.com/repos/asymmetry/uproot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/asymmetry/uproot/labels{/name}","releases_url":"https://api.github.com/repos/asymmetry/uproot/releases{/id}","deployments_url":"https://api.github.com/repos/asymmetry/uproot/deployments","created_at":"2018-03-07T06:28:26Z","updated_at":"2018-03-07T06:28:28Z","pushed_at":"2018-03-08T23:40:32Z","git_url":"git://github.com/asymmetry/uproot.git","ssh_url":"git@github.com:asymmetry/uproot.git","clone_url":"https://github.com/asymmetry/uproot.git","svn_url":"https://github.com/asymmetry/uproot","homepage":"","size":5840,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-hep:master","ref":"master","sha":"1980055f13ac32f123fdef1923380891b1d63b47","user":{"login":"scikit-hep","id":23454624,"avatar_url":"https://avatars0.githubusercontent.com/u/23454624?v=4","gravatar_id":"","url":"https://api.github.com/users/scikit-hep","html_url":"https://github.com/scikit-hep","followers_url":"https://api.github.com/users/scikit-hep/followers","following_url":"https://api.github.com/users/scikit-hep/following{/other_user}","gists_url":"https://api.github.com/users/scikit-hep/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-hep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-hep/subscriptions","organizations_url":"https://api.github.com/users/scikit-hep/orgs","repos_url":"https://api.github.com/users/scikit-hep/repos","events_url":"https://api.github.com/users/scikit-hep/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-hep/received_events","type":"Organization","site_admin":false},"repo":{"id":102874853,"name":"uproot","full_name":"scikit-hep/uproot","owner":{"login":"scikit-hep","id":23454624,"avatar_url":"https://avatars0.githubusercontent.com/u/23454624?v=4","gravatar_id":"","url":"https://api.github.com/users/scikit-hep","html_url":"https://github.com/scikit-hep","followers_url":"https://api.github.com/users/scikit-hep/followers","following_url":"https://api.github.com/users/scikit-hep/following{/other_user}","gists_url":"https://api.github.com/users/scikit-hep/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-hep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-hep/subscriptions","organizations_url":"https://api.github.com/users/scikit-hep/orgs","repos_url":"https://api.github.com/users/scikit-hep/repos","events_url":"https://api.github.com/users/scikit-hep/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-hep/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-hep/uproot","description":"Minimalist ROOT I/O in pure Python and Numpy.","fork":false,"url":"https://api.github.com/repos/scikit-hep/uproot","forks_url":"https://api.github.com/repos/scikit-hep/uproot/forks","keys_url":"https://api.github.com/repos/scikit-hep/uproot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-hep/uproot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-hep/uproot/teams","hooks_url":"https://api.github.com/repos/scikit-hep/uproot/hooks","issue_events_url":"https://api.github.com/repos/scikit-hep/uproot/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-hep/uproot/events","assignees_url":"https://api.github.com/repos/scikit-hep/uproot/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-hep/uproot/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-hep/uproot/tags","blobs_url":"https://api.github.com/repos/scikit-hep/uproot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-hep/uproot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-hep/uproot/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-hep/uproot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-hep/uproot/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-hep/uproot/languages","stargazers_url":"https://api.github.com/repos/scikit-hep/uproot/stargazers","contributors_url":"https://api.github.com/repos/scikit-hep/uproot/contributors","subscribers_url":"https://api.github.com/repos/scikit-hep/uproot/subscribers","subscription_url":"https://api.github.com/repos/scikit-hep/uproot/subscription","commits_url":"https://api.github.com/repos/scikit-hep/uproot/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-hep/uproot/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-hep/uproot/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-hep/uproot/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-hep/uproot/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-hep/uproot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-hep/uproot/merges","archive_url":"https://api.github.com/repos/scikit-hep/uproot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-hep/uproot/downloads","issues_url":"https://api.github.com/repos/scikit-hep/uproot/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-hep/uproot/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-hep/uproot/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-hep/uproot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-hep/uproot/labels{/name}","releases_url":"https://api.github.com/repos/scikit-hep/uproot/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-hep/uproot/deployments","created_at":"2017-09-08T15:16:01Z","updated_at":"2018-03-08T14:23:28Z","pushed_at":"2018-03-09T01:27:54Z","git_url":"git://github.com/scikit-hep/uproot.git","ssh_url":"git@github.com:scikit-hep/uproot.git","clone_url":"https://github.com/scikit-hep/uproot.git","svn_url":"https://github.com/scikit-hep/uproot","homepage":"","size":5879,"stargazers_count":81,"watchers_count":81,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":11,"open_issues":0,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-hep/uproot/pulls/62"},"html":{"href":"https://github.com/scikit-hep/uproot/pull/62"},"issue":{"href":"https://api.github.com/repos/scikit-hep/uproot/issues/62"},"comments":{"href":"https://api.github.com/repos/scikit-hep/uproot/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-hep/uproot/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-hep/uproot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-hep/uproot/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-hep/uproot/statuses/1058fcf1700ae7bda14704d8cacec4a4cb852e1c"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":10,"changed_files":1}}
{"actor":{"display_login":"jpivarski"}}