{"action":"created","issue":{"url":"https://api.github.com/repos/bitshares/python-bitshares/issues/76","repository_url":"https://api.github.com/repos/bitshares/python-bitshares","labels_url":"https://api.github.com/repos/bitshares/python-bitshares/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/bitshares/python-bitshares/issues/76/comments","events_url":"https://api.github.com/repos/bitshares/python-bitshares/issues/76/events","html_url":"https://github.com/bitshares/python-bitshares/issues/76","id":312173779,"number":76,"title":"bitshares_instance keeps getting lost","user":{"login":"jhtitor","id":34790146,"avatar_url":"https://avatars2.githubusercontent.com/u/34790146?v=4","gravatar_id":"","url":"https://api.github.com/users/jhtitor","html_url":"https://github.com/jhtitor","followers_url":"https://api.github.com/users/jhtitor/followers","following_url":"https://api.github.com/users/jhtitor/following{/other_user}","gists_url":"https://api.github.com/users/jhtitor/gists{/gist_id}","starred_url":"https://api.github.com/users/jhtitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhtitor/subscriptions","organizations_url":"https://api.github.com/users/jhtitor/orgs","repos_url":"https://api.github.com/users/jhtitor/repos","events_url":"https://api.github.com/users/jhtitor/events{/privacy}","received_events_url":"https://api.github.com/users/jhtitor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-07T06:00:23Z","updated_at":"2018-04-16T08:57:48Z","closed_at":null,"author_association":"NONE","body":"This is a systematic problem; see #67, #74. It has gotten better in the `develop` branch, but I'm still unsure if we can ever catch them all.\r\n\r\nHere's what I'm using:\r\n```\r\nclass BrokenBitsharesInstance():\r\n\tdef __init__(self, *args, **kwargs):\r\n\t\tpass\r\n\t\r\n\tdef __getattr__(self, name):\r\n\t\traise ValueError(\"Attempting to use BrokenBitsharesInstance\")\r\n\r\nclass BitsharesIsolator(object):\r\n\tenabled = False\r\n\t@classmethod\r\n\tdef enable(self):\r\n\t\tif not self.enabled:\r\n\t\t\tfrom bitshares.instance import set_shared_bitshares_instance\r\n\t\t\tbroken = BrokenBitsharesInstance()\r\n\t\t\tset_shared_bitshares_instance(broken)\r\n\t\t\tself.enabled = True\r\n```\r\n\r\nMaybe something like that should be implemented into tests somehow?"},"comment":{"url":"https://api.github.com/repos/bitshares/python-bitshares/issues/comments/381528764","html_url":"https://github.com/bitshares/python-bitshares/issues/76#issuecomment-381528764","issue_url":"https://api.github.com/repos/bitshares/python-bitshares/issues/76","id":381528764,"user":{"login":"xeroc","id":117800,"avatar_url":"https://avatars0.githubusercontent.com/u/117800?v=4","gravatar_id":"","url":"https://api.github.com/users/xeroc","html_url":"https://github.com/xeroc","followers_url":"https://api.github.com/users/xeroc/followers","following_url":"https://api.github.com/users/xeroc/following{/other_user}","gists_url":"https://api.github.com/users/xeroc/gists{/gist_id}","starred_url":"https://api.github.com/users/xeroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeroc/subscriptions","organizations_url":"https://api.github.com/users/xeroc/orgs","repos_url":"https://api.github.com/users/xeroc/repos","events_url":"https://api.github.com/users/xeroc/events{/privacy}","received_events_url":"https://api.github.com/users/xeroc/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T08:57:48Z","updated_at":"2018-04-16T08:57:48Z","author_association":"OWNER","body":"This looks like a great snippet of code ... It should be added to unit tests."}}
{"actor":{"display_login":"xeroc"}}