{"action":"created","issue":{"url":"https://api.github.com/repos/pabigot/pyxb/issues/37","labels_url":"https://api.github.com/repos/pabigot/pyxb/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/pabigot/pyxb/issues/37/comments","events_url":"https://api.github.com/repos/pabigot/pyxb/issues/37/events","html_url":"https://github.com/pabigot/pyxb/issues/37","id":88480424,"number":37,"title":"pyxb stubs contain implicit relative imports on python 3","user":{"login":"novocaine","id":57377,"avatar_url":"https://avatars.githubusercontent.com/u/57377?v=3","gravatar_id":"","url":"https://api.github.com/users/novocaine","html_url":"https://github.com/novocaine","followers_url":"https://api.github.com/users/novocaine/followers","following_url":"https://api.github.com/users/novocaine/following{/other_user}","gists_url":"https://api.github.com/users/novocaine/gists{/gist_id}","starred_url":"https://api.github.com/users/novocaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novocaine/subscriptions","organizations_url":"https://api.github.com/users/novocaine/orgs","repos_url":"https://api.github.com/users/novocaine/repos","events_url":"https://api.github.com/users/novocaine/events{/privacy}","received_events_url":"https://api.github.com/users/novocaine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-06-15T16:50:23Z","updated_at":"2015-06-16T17:02:19Z","closed_at":"2015-06-16T16:54:51Z","body":"When generating the \"Import bindings for namespaces imported into schema\" section, pyxb writes out implicit relative imports to import modules in the current directory. This doesn't work on python 3.\r\n\r\nI tried to just change https://github.com/pabigot/pyxb/blob/next/pyxb/binding/generate.py#L1356 to `from . import ..` but then apparently the test harness uses eval?! and so because python perceives the test code as not in a package you get an error `SystemError: Parent module '' not loaded, cannot perform relative import`.\r\n"},"comment":{"url":"https://api.github.com/repos/pabigot/pyxb/issues/comments/112497820","html_url":"https://github.com/pabigot/pyxb/issues/37#issuecomment-112497820","issue_url":"https://api.github.com/repos/pabigot/pyxb/issues/37","id":112497820,"user":{"login":"novocaine","id":57377,"avatar_url":"https://avatars.githubusercontent.com/u/57377?v=3","gravatar_id":"","url":"https://api.github.com/users/novocaine","html_url":"https://github.com/novocaine","followers_url":"https://api.github.com/users/novocaine/followers","following_url":"https://api.github.com/users/novocaine/following{/other_user}","gists_url":"https://api.github.com/users/novocaine/gists{/gist_id}","starred_url":"https://api.github.com/users/novocaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novocaine/subscriptions","organizations_url":"https://api.github.com/users/novocaine/orgs","repos_url":"https://api.github.com/users/novocaine/repos","events_url":"https://api.github.com/users/novocaine/events{/privacy}","received_events_url":"https://api.github.com/users/novocaine/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T17:02:19Z","updated_at":"2015-06-16T17:02:19Z","body":"Fair enough. Thanks, I do appreciate your time today and your work on the\nlibrary.\n\nOn Tue, Jun 16, 2015 at 5:54 PM, Peter A. Bigot <notifications@github.com>\nwrote:\n\n> I don't think it's as easy as you suggest given the need to reference\n> schema generated in separate invocations of PyXB. In six years of PyXB use\n> by hundreds/thousands (?) of people with fairly complicated schema nobody's\n> needed this feature. So yes, I'm not going to change it.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/pabigot/pyxb/issues/37#issuecomment-112496150>.\n>\n"}}