{"action":"opened","number":653,"pull_request":{"url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/653","id":178301759,"html_url":"https://github.com/pyqtgraph/pyqtgraph/pull/653","diff_url":"https://github.com/pyqtgraph/pyqtgraph/pull/653.diff","patch_url":"https://github.com/pyqtgraph/pyqtgraph/pull/653.patch","issue_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues/653","number":653,"state":"open","locked":false,"title":"ScatterPlotItem: Fix a GC memory leak due to numpy issue 6581","user":{"login":"ales-erjavec","id":4716745,"avatar_url":"https://avatars0.githubusercontent.com/u/4716745?v=4","gravatar_id":"","url":"https://api.github.com/users/ales-erjavec","html_url":"https://github.com/ales-erjavec","followers_url":"https://api.github.com/users/ales-erjavec/followers","following_url":"https://api.github.com/users/ales-erjavec/following{/other_user}","gists_url":"https://api.github.com/users/ales-erjavec/gists{/gist_id}","starred_url":"https://api.github.com/users/ales-erjavec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ales-erjavec/subscriptions","organizations_url":"https://api.github.com/users/ales-erjavec/orgs","repos_url":"https://api.github.com/users/ales-erjavec/repos","events_url":"https://api.github.com/users/ales-erjavec/events{/privacy}","received_events_url":"https://api.github.com/users/ales-erjavec/received_events","type":"User","site_admin":false},"body":"Accessing ``ScatterPlotItem.points` causes that instance to persist in memory indefinitely\r\n\r\n```python\r\nimport gc\r\n\r\nfrom PyQt5.QtWidgets import QApplication\r\nfrom pyqtgraph import ScatterPlotItem\r\n\r\napp = QApplication([])\r\n\r\nsp = ScatterPlotItem(x=[1, 2], y=[1, 2], data=[42, 43])\r\nsp.points()  # fill in data[\"items\"]\r\n\r\ndel sp\r\n\r\ngc.collect()\r\n\r\nprint([o for o in gc.get_objects() if isinstance(o, ScatterPlotItem)])\r\n```\r\n\r\nThe cause is that `data` numpy array with object fields contains reference cycles back to itself (via a SpotItem._plot), but numpy does not support cyclic gc for object arrays ([numpy issue 6581](https://github.com/numpy/numpy/issues/6581)).\r\n\r\nFixed by taking a weak reference to `plot` in `SpotItem`\r\n","created_at":"2018-03-29T11:32:30Z","updated_at":"2018-03-29T11:32:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/653/commits","review_comments_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/653/comments","review_comment_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues/653/comments","statuses_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/statuses/b3a579fd004f9a841038b6adf6d4ec14dbe8748a","head":{"label":"ales-erjavec:spot-item-cycle-leak","ref":"spot-item-cycle-leak","sha":"b3a579fd004f9a841038b6adf6d4ec14dbe8748a","user":{"login":"ales-erjavec","id":4716745,"avatar_url":"https://avatars0.githubusercontent.com/u/4716745?v=4","gravatar_id":"","url":"https://api.github.com/users/ales-erjavec","html_url":"https://github.com/ales-erjavec","followers_url":"https://api.github.com/users/ales-erjavec/followers","following_url":"https://api.github.com/users/ales-erjavec/following{/other_user}","gists_url":"https://api.github.com/users/ales-erjavec/gists{/gist_id}","starred_url":"https://api.github.com/users/ales-erjavec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ales-erjavec/subscriptions","organizations_url":"https://api.github.com/users/ales-erjavec/orgs","repos_url":"https://api.github.com/users/ales-erjavec/repos","events_url":"https://api.github.com/users/ales-erjavec/events{/privacy}","received_events_url":"https://api.github.com/users/ales-erjavec/received_events","type":"User","site_admin":false},"repo":{"id":52267776,"name":"pyqtgraph","full_name":"ales-erjavec/pyqtgraph","owner":{"login":"ales-erjavec","id":4716745,"avatar_url":"https://avatars0.githubusercontent.com/u/4716745?v=4","gravatar_id":"","url":"https://api.github.com/users/ales-erjavec","html_url":"https://github.com/ales-erjavec","followers_url":"https://api.github.com/users/ales-erjavec/followers","following_url":"https://api.github.com/users/ales-erjavec/following{/other_user}","gists_url":"https://api.github.com/users/ales-erjavec/gists{/gist_id}","starred_url":"https://api.github.com/users/ales-erjavec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ales-erjavec/subscriptions","organizations_url":"https://api.github.com/users/ales-erjavec/orgs","repos_url":"https://api.github.com/users/ales-erjavec/repos","events_url":"https://api.github.com/users/ales-erjavec/events{/privacy}","received_events_url":"https://api.github.com/users/ales-erjavec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ales-erjavec/pyqtgraph","description":"pyqtgraph main development repository","fork":true,"url":"https://api.github.com/repos/ales-erjavec/pyqtgraph","forks_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/forks","keys_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/teams","hooks_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/hooks","issue_events_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/issues/events{/number}","events_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/events","assignees_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/assignees{/user}","branches_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/branches{/branch}","tags_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/tags","blobs_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/languages","stargazers_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/stargazers","contributors_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/contributors","subscribers_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/subscribers","subscription_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/subscription","commits_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/contents/{+path}","compare_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/merges","archive_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/downloads","issues_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/issues{/number}","pulls_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/labels{/name}","releases_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/releases{/id}","deployments_url":"https://api.github.com/repos/ales-erjavec/pyqtgraph/deployments","created_at":"2016-02-22T11:07:57Z","updated_at":"2016-02-22T11:07:58Z","pushed_at":"2018-03-29T10:24:10Z","git_url":"git://github.com/ales-erjavec/pyqtgraph.git","ssh_url":"git@github.com:ales-erjavec/pyqtgraph.git","clone_url":"https://github.com/ales-erjavec/pyqtgraph.git","svn_url":"https://github.com/ales-erjavec/pyqtgraph","homepage":null,"size":3943,"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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"pyqtgraph:develop","ref":"develop","sha":"ee0877170d32d8c7415305d02bc1d04d5a86f0d7","user":{"login":"pyqtgraph","id":5440571,"avatar_url":"https://avatars0.githubusercontent.com/u/5440571?v=4","gravatar_id":"","url":"https://api.github.com/users/pyqtgraph","html_url":"https://github.com/pyqtgraph","followers_url":"https://api.github.com/users/pyqtgraph/followers","following_url":"https://api.github.com/users/pyqtgraph/following{/other_user}","gists_url":"https://api.github.com/users/pyqtgraph/gists{/gist_id}","starred_url":"https://api.github.com/users/pyqtgraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyqtgraph/subscriptions","organizations_url":"https://api.github.com/users/pyqtgraph/orgs","repos_url":"https://api.github.com/users/pyqtgraph/repos","events_url":"https://api.github.com/users/pyqtgraph/events{/privacy}","received_events_url":"https://api.github.com/users/pyqtgraph/received_events","type":"Organization","site_admin":false},"repo":{"id":12777496,"name":"pyqtgraph","full_name":"pyqtgraph/pyqtgraph","owner":{"login":"pyqtgraph","id":5440571,"avatar_url":"https://avatars0.githubusercontent.com/u/5440571?v=4","gravatar_id":"","url":"https://api.github.com/users/pyqtgraph","html_url":"https://github.com/pyqtgraph","followers_url":"https://api.github.com/users/pyqtgraph/followers","following_url":"https://api.github.com/users/pyqtgraph/following{/other_user}","gists_url":"https://api.github.com/users/pyqtgraph/gists{/gist_id}","starred_url":"https://api.github.com/users/pyqtgraph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyqtgraph/subscriptions","organizations_url":"https://api.github.com/users/pyqtgraph/orgs","repos_url":"https://api.github.com/users/pyqtgraph/repos","events_url":"https://api.github.com/users/pyqtgraph/events{/privacy}","received_events_url":"https://api.github.com/users/pyqtgraph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyqtgraph/pyqtgraph","description":"Fast data visualization and GUI tools for scientific / engineering applications","fork":false,"url":"https://api.github.com/repos/pyqtgraph/pyqtgraph","forks_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/forks","keys_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/teams","hooks_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/hooks","issue_events_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues/events{/number}","events_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/events","assignees_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/assignees{/user}","branches_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/branches{/branch}","tags_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/tags","blobs_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/languages","stargazers_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/stargazers","contributors_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/contributors","subscribers_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/subscribers","subscription_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/subscription","commits_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/contents/{+path}","compare_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/merges","archive_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/downloads","issues_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues{/number}","pulls_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/labels{/name}","releases_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/releases{/id}","deployments_url":"https://api.github.com/repos/pyqtgraph/pyqtgraph/deployments","created_at":"2013-09-12T07:18:21Z","updated_at":"2018-03-29T10:44:32Z","pushed_at":"2018-03-19T11:41:35Z","git_url":"git://github.com/pyqtgraph/pyqtgraph.git","ssh_url":"git@github.com:pyqtgraph/pyqtgraph.git","clone_url":"https://github.com/pyqtgraph/pyqtgraph.git","svn_url":"https://github.com/pyqtgraph/pyqtgraph","homepage":"http://www.pyqtgraph.org","size":3955,"stargazers_count":1030,"watchers_count":1030,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":435,"mirror_url":null,"archived":false,"open_issues_count":352,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":435,"open_issues":352,"watchers":1030,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/653"},"html":{"href":"https://github.com/pyqtgraph/pyqtgraph/pull/653"},"issue":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues/653"},"comments":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/issues/653/comments"},"review_comments":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/653/comments"},"review_comment":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/pulls/653/commits"},"statuses":{"href":"https://api.github.com/repos/pyqtgraph/pyqtgraph/statuses/b3a579fd004f9a841038b6adf6d4ec14dbe8748a"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":8,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"ales-erjavec"}}