{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/32943","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/32943/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/32943/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/32943/events","html_url":"https://github.com/saltstack/salt/pull/32943","id":151813831,"number":32943,"title":"When move a function to a new namespace, allow to keep original context.","user":{"login":"ticosax","id":1174343,"avatar_url":"https://avatars.githubusercontent.com/u/1174343?v=3","gravatar_id":"","url":"https://api.github.com/users/ticosax","html_url":"https://github.com/ticosax","followers_url":"https://api.github.com/users/ticosax/followers","following_url":"https://api.github.com/users/ticosax/following{/other_user}","gists_url":"https://api.github.com/users/ticosax/gists{/gist_id}","starred_url":"https://api.github.com/users/ticosax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ticosax/subscriptions","organizations_url":"https://api.github.com/users/ticosax/orgs","repos_url":"https://api.github.com/users/ticosax/repos","events_url":"https://api.github.com/users/ticosax/events{/privacy}","received_events_url":"https://api.github.com/users/ticosax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-29T08:03:06Z","updated_at":"2016-04-29T17:48:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/32943","html_url":"https://github.com/saltstack/salt/pull/32943","diff_url":"https://github.com/saltstack/salt/pull/32943.diff","patch_url":"https://github.com/saltstack/salt/pull/32943.patch"},"body":"### What does this PR do?\r\n\r\nAttempt to extend `salt.utils.namespaced_function()` by preserving available context\r\nof function before recreated in new module.\r\n\r\n### What issues does this PR fix or reference?\r\n #32887\r\n\r\n### Previous Behavior\r\nWhen moved function refers to a resource only available in original namespace, `NameError` was raised\r\n\r\n### New Behavior\r\nNew function keeps references to resources existing in original context.\r\n\r\n### Tests written?\r\n\r\nYes\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/215828118","html_url":"https://github.com/saltstack/salt/pull/32943#issuecomment-215828118","issue_url":"https://api.github.com/repos/saltstack/salt/issues/32943","id":215828118,"user":{"login":"cachedout","id":111616,"avatar_url":"https://avatars.githubusercontent.com/u/111616?v=3","gravatar_id":"","url":"https://api.github.com/users/cachedout","html_url":"https://github.com/cachedout","followers_url":"https://api.github.com/users/cachedout/followers","following_url":"https://api.github.com/users/cachedout/following{/other_user}","gists_url":"https://api.github.com/users/cachedout/gists{/gist_id}","starred_url":"https://api.github.com/users/cachedout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cachedout/subscriptions","organizations_url":"https://api.github.com/users/cachedout/orgs","repos_url":"https://api.github.com/users/cachedout/repos","events_url":"https://api.github.com/users/cachedout/events{/privacy}","received_events_url":"https://api.github.com/users/cachedout/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T17:48:18Z","updated_at":"2016-04-29T17:48:18Z","body":"Very nice."}}