{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython-lib/issues/49","labels_url":"https://api.github.com/repos/micropython/micropython-lib/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython-lib/issues/49/comments","events_url":"https://api.github.com/repos/micropython/micropython-lib/issues/49/events","html_url":"https://github.com/micropython/micropython-lib/issues/49","id":112234060,"number":49,"title":"contextlib: (re) add ExitStack?","user":{"login":"dxxb","id":896402,"avatar_url":"https://avatars.githubusercontent.com/u/896402?v=3","gravatar_id":"","url":"https://api.github.com/users/dxxb","html_url":"https://github.com/dxxb","followers_url":"https://api.github.com/users/dxxb/followers","following_url":"https://api.github.com/users/dxxb/following{/other_user}","gists_url":"https://api.github.com/users/dxxb/gists{/gist_id}","starred_url":"https://api.github.com/users/dxxb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dxxb/subscriptions","organizations_url":"https://api.github.com/users/dxxb/orgs","repos_url":"https://api.github.com/users/dxxb/repos","events_url":"https://api.github.com/users/dxxb/events{/privacy}","received_events_url":"https://api.github.com/users/dxxb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-19T21:11:54Z","updated_at":"2015-11-04T14:13:17Z","closed_at":null,"body":"ExitStack was added in 5557382b5e6673bee60b0c1658ff8bd752856ae4 from CPython 3.4.2 and subsequently removed in 92ef77c3d2b4dbd1e4ac257860327ebdaa967c33 maybe because it wasn't compatible with uPy out of the box.\r\n\r\nI am using a slightly modified ExitStack taken from CPython lib for some unittests which need to run on both my development host and on the target device and I am wondering if there is any interest in having ExitStack added to contextlib. Thanks"},"comment":{"url":"https://api.github.com/repos/micropython/micropython-lib/issues/comments/153731535","html_url":"https://github.com/micropython/micropython-lib/issues/49#issuecomment-153731535","issue_url":"https://api.github.com/repos/micropython/micropython-lib/issues/49","id":153731535,"user":{"login":"dpgeorge","id":6187689,"avatar_url":"https://avatars.githubusercontent.com/u/6187689?v=3","gravatar_id":"","url":"https://api.github.com/users/dpgeorge","html_url":"https://github.com/dpgeorge","followers_url":"https://api.github.com/users/dpgeorge/followers","following_url":"https://api.github.com/users/dpgeorge/following{/other_user}","gists_url":"https://api.github.com/users/dpgeorge/gists{/gist_id}","starred_url":"https://api.github.com/users/dpgeorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpgeorge/subscriptions","organizations_url":"https://api.github.com/users/dpgeorge/orgs","repos_url":"https://api.github.com/users/dpgeorge/repos","events_url":"https://api.github.com/users/dpgeorge/events{/privacy}","received_events_url":"https://api.github.com/users/dpgeorge/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T14:13:17Z","updated_at":"2015-11-04T14:13:17Z","body":"> I need to look into making stdin/stdout/stderr r/w in modsys.c. I'll give it a shot.\r\n\r\nThis is definitely a feature to add, but it's hard.  The only way I can think to do it is something similar to MICROPY_CAN_OVERRIDE_BUILTINS, in objmodule.c."}}