{"action":"created","issue":{"url":"https://api.github.com/repos/datafolklabs/cement/issues/311","labels_url":"https://api.github.com/repos/datafolklabs/cement/issues/311/labels{/name}","comments_url":"https://api.github.com/repos/datafolklabs/cement/issues/311/comments","events_url":"https://api.github.com/repos/datafolklabs/cement/issues/311/events","html_url":"https://github.com/datafolklabs/cement/issues/311","id":83461361,"number":311,"title":"cement.core.backend globals are useless","user":{"login":"malinoff","id":1702083,"avatar_url":"https://avatars.githubusercontent.com/u/1702083?v=3","gravatar_id":"","url":"https://api.github.com/users/malinoff","html_url":"https://github.com/malinoff","followers_url":"https://api.github.com/users/malinoff/followers","following_url":"https://api.github.com/users/malinoff/following{/other_user}","gists_url":"https://api.github.com/users/malinoff/gists{/gist_id}","starred_url":"https://api.github.com/users/malinoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malinoff/subscriptions","organizations_url":"https://api.github.com/users/malinoff/orgs","repos_url":"https://api.github.com/users/malinoff/repos","events_url":"https://api.github.com/users/malinoff/events{/privacy}","received_events_url":"https://api.github.com/users/malinoff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/datafolklabs/cement/labels/dev/2.7.x","name":"dev/2.7.x","color":"DDDDDD"},{"url":"https://api.github.com/repos/datafolklabs/cement/labels/refactoring","name":"refactoring","color":"d7e102"}],"state":"open","locked":false,"assignee":{"login":"derks","id":130503,"avatar_url":"https://avatars.githubusercontent.com/u/130503?v=3","gravatar_id":"","url":"https://api.github.com/users/derks","html_url":"https://github.com/derks","followers_url":"https://api.github.com/users/derks/followers","following_url":"https://api.github.com/users/derks/following{/other_user}","gists_url":"https://api.github.com/users/derks/gists{/gist_id}","starred_url":"https://api.github.com/users/derks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derks/subscriptions","organizations_url":"https://api.github.com/users/derks/orgs","repos_url":"https://api.github.com/users/derks/repos","events_url":"https://api.github.com/users/derks/events{/privacy}","received_events_url":"https://api.github.com/users/derks/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/datafolklabs/cement/milestones/24","html_url":"https://github.com/datafolklabs/cement/milestones/2.7.2%20Development","labels_url":"https://api.github.com/repos/datafolklabs/cement/milestones/24/labels","id":1108766,"number":24,"title":"2.7.2 Development","description":"","creator":{"login":"derks","id":130503,"avatar_url":"https://avatars.githubusercontent.com/u/130503?v=3","gravatar_id":"","url":"https://api.github.com/users/derks","html_url":"https://github.com/derks","followers_url":"https://api.github.com/users/derks/followers","following_url":"https://api.github.com/users/derks/following{/other_user}","gists_url":"https://api.github.com/users/derks/gists{/gist_id}","starred_url":"https://api.github.com/users/derks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derks/subscriptions","organizations_url":"https://api.github.com/users/derks/orgs","repos_url":"https://api.github.com/users/derks/repos","events_url":"https://api.github.com/users/derks/events{/privacy}","received_events_url":"https://api.github.com/users/derks/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-05-13T15:06:16Z","updated_at":"2015-06-01T17:45:35Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-06-01T12:08:45Z","updated_at":"2015-06-01T18:40:02Z","closed_at":null,"body":"Every time I instantiate a new cement application, it cleans ``cement.core.backend.__handlers__`` and ``cement.core.backend.__hooks__``. Considering the following (simple!) code:\r\n\r\n```python\r\nfrom cement.core.foundation import CementApp\r\nfrom cement.core.interface import Interface\r\nfrom cement.core import handler\r\nfrom cement.core import backend\r\n\r\nclass MyInterface(Interface):\r\n    class IMeta:\r\n        label = 'myinterface'\r\n\r\napp1 = CementApp('app1')\r\nhandler.define(MyInterface)\r\napp2 = CementApp('app2')\r\nprint(MyInterface.IMeta.label in backend.__handlers__)\r\n```\r\nFalse will be printed. Quite unexpectedly.\r\n\r\nIf ``backend.__handlers__`` is truly global object, consider to not clean it on every ``CementApp`` instantiation. If it is local to specific ``CementApp`` object, consider moving from global containers and use app attributes and methods to work with them."},"comment":{"url":"https://api.github.com/repos/datafolklabs/cement/issues/comments/107666621","html_url":"https://github.com/datafolklabs/cement/issues/311#issuecomment-107666621","issue_url":"https://api.github.com/repos/datafolklabs/cement/issues/311","id":107666621,"user":{"login":"derks","id":130503,"avatar_url":"https://avatars.githubusercontent.com/u/130503?v=3","gravatar_id":"","url":"https://api.github.com/users/derks","html_url":"https://github.com/derks","followers_url":"https://api.github.com/users/derks/followers","following_url":"https://api.github.com/users/derks/following{/other_user}","gists_url":"https://api.github.com/users/derks/gists{/gist_id}","starred_url":"https://api.github.com/users/derks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derks/subscriptions","organizations_url":"https://api.github.com/users/derks/orgs","repos_url":"https://api.github.com/users/derks/repos","events_url":"https://api.github.com/users/derks/events{/privacy}","received_events_url":"https://api.github.com/users/derks/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T18:40:01Z","updated_at":"2015-06-01T18:40:01Z","body":"Sorry, yeah the big incompatible piece will be that all applications use the `handler` and `hook` libraries directly, without passing the Cement object... which is a pretty significant change, not just a backend/private incompatibility."}}