{"action":"opened","issue":{"url":"https://api.github.com/repos/zopefoundation/zope.untrustedpython/issues/1","repository_url":"https://api.github.com/repos/zopefoundation/zope.untrustedpython","labels_url":"https://api.github.com/repos/zopefoundation/zope.untrustedpython/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/zopefoundation/zope.untrustedpython/issues/1/comments","events_url":"https://api.github.com/repos/zopefoundation/zope.untrustedpython/issues/1/events","html_url":"https://github.com/zopefoundation/zope.untrustedpython/issues/1","id":142544230,"number":1,"title":"Not easy to whitelist additional modules for use in untrustedpython","user":{"login":"djay","id":41700,"avatar_url":"https://avatars.githubusercontent.com/u/41700?v=3","gravatar_id":"","url":"https://api.github.com/users/djay","html_url":"https://github.com/djay","followers_url":"https://api.github.com/users/djay/followers","following_url":"https://api.github.com/users/djay/following{/other_user}","gists_url":"https://api.github.com/users/djay/gists{/gist_id}","starred_url":"https://api.github.com/users/djay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djay/subscriptions","organizations_url":"https://api.github.com/users/djay/orgs","repos_url":"https://api.github.com/users/djay/repos","events_url":"https://api.github.com/users/djay/events{/privacy}","received_events_url":"https://api.github.com/users/djay/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-22T04:16:14Z","updated_at":"2016-03-22T04:16:14Z","closed_at":null,"body":"The following is the kind of code you have to write if you want to make a module, its classes freely available for us in untrustedpython. I might be missing something but shouldn't this be easier?\r\n\r\n```\r\nimport persistent.list\r\nimport persistent.dict\r\ndefineChecker(persistent.list, NamesChecker(['PersistentList']))\r\ndefineChecker(persistent.dict, NamesChecker(['PersistentDict']))\r\n\r\ndict_checker = NamesChecker(['__call__','__init__','__getitem__', '__len__', '__iter__',\r\n                        'get', 'has_key', 'copy', '__str__', 'keys',\r\n                        'values', 'items', 'iterkeys', 'iteritems',\r\n                        'itervalues', '__contains__'])\r\npersistent.dict.PersistentDict.__Security_checker__ = dict_checker\r\nlist_checker = NamesChecker(['__call__','__init__','__getitem__', '__getslice__', '__len__', '__iter__',\r\n                        '__contains__', 'index', 'count', '__str__',\r\n                        '__add__', '__radd__','__setitem__' ])\r\npersistent.list.PersistentList.__Security_checker__ = list_checker\r\n```"}}