{"action":"created","comment":{"url":"https://api.github.com/repos/web2py/web2py/pulls/comments/23336709","id":23336709,"diff_hunk":"@@ -67,6 +67,13 @@ def custom_importer(name, globals=None, locals=None, fromlist=None, level=-1):\n         import_tb = None\n         try:\n             try:\n+                if ('gluon' not in name and not name.startswith('.') and\n+                   'direct_import' not in locals):\n+                    try:  # Try to load a gluon class\n+                        oname = 'gluon.%s' % name\n+                        return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)\n+                    except:\n+                        pass","path":"gluon/custom_import.py","position":19,"original_position":19,"commit_id":"de96017ced8ee6f4546ddabcbe87dd12f441ac0f","original_commit_id":"de96017ced8ee6f4546ddabcbe87dd12f441ac0f","user":{"login":"dmvieira","id":1108613,"avatar_url":"https://avatars.githubusercontent.com/u/1108613?v=3","gravatar_id":"","url":"https://api.github.com/users/dmvieira","html_url":"https://github.com/dmvieira","followers_url":"https://api.github.com/users/dmvieira/followers","following_url":"https://api.github.com/users/dmvieira/following{/other_user}","gists_url":"https://api.github.com/users/dmvieira/gists{/gist_id}","starred_url":"https://api.github.com/users/dmvieira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmvieira/subscriptions","organizations_url":"https://api.github.com/users/dmvieira/orgs","repos_url":"https://api.github.com/users/dmvieira/repos","events_url":"https://api.github.com/users/dmvieira/events{/privacy}","received_events_url":"https://api.github.com/users/dmvieira/received_events","type":"User","site_admin":false},"body":"What kind of exception?","created_at":"2015-01-21T21:39:44Z","updated_at":"2015-01-21T21:39:44Z","html_url":"https://github.com/web2py/web2py/pull/587#discussion_r23336709","pull_request_url":"https://api.github.com/repos/web2py/web2py/pulls/587","_links":{"self":{"href":"https://api.github.com/repos/web2py/web2py/pulls/comments/23336709"},"html":{"href":"https://github.com/web2py/web2py/pull/587#discussion_r23336709"},"pull_request":{"href":"https://api.github.com/repos/web2py/web2py/pulls/587"}}},"pull_request":{"url":"https://api.github.com/repos/web2py/web2py/pulls/587","id":27300498,"html_url":"https://github.com/web2py/web2py/pull/587","diff_url":"https://github.com/web2py/web2py/pull/587.diff","patch_url":"https://github.com/web2py/web2py/pull/587.patch","issue_url":"https://api.github.com/repos/web2py/web2py/issues/587","number":587,"state":"open","locked":false,"title":"fix import issue for gluon classes (ie: from dal import DAL)","user":{"login":"ilvalle","id":1519351,"avatar_url":"https://avatars.githubusercontent.com/u/1519351?v=3","gravatar_id":"","url":"https://api.github.com/users/ilvalle","html_url":"https://github.com/ilvalle","followers_url":"https://api.github.com/users/ilvalle/followers","following_url":"https://api.github.com/users/ilvalle/following{/other_user}","gists_url":"https://api.github.com/users/ilvalle/gists{/gist_id}","starred_url":"https://api.github.com/users/ilvalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilvalle/subscriptions","organizations_url":"https://api.github.com/users/ilvalle/orgs","repos_url":"https://api.github.com/users/ilvalle/repos","events_url":"https://api.github.com/users/ilvalle/events{/privacy}","received_events_url":"https://api.github.com/users/ilvalle/received_events","type":"User","site_admin":false},"body":"This PR makes\r\n\r\n* the following two import to load the same class\r\n```\r\nfrom dal import DAL\r\nfrom gluon import DAL\r\n```\r\n\r\n* allows users to have an app-module called as one in gluon/* without conflicts (i.e.: tools.py)\r\n\r\n* allows us to have a contrib module which internally has an import to other internal module called as one in gluon/* (This weird case happens for simplejson which has a module called decorator)","created_at":"2015-01-13T20:09:47Z","updated_at":"2015-01-21T21:39:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"397e2f62a2d785ecffa2e4372c9cd02d9b4bd902","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/web2py/web2py/pulls/587/commits","review_comments_url":"https://api.github.com/repos/web2py/web2py/pulls/587/comments","review_comment_url":"https://api.github.com/repos/web2py/web2py/pulls/comments/{number}","comments_url":"https://api.github.com/repos/web2py/web2py/issues/587/comments","statuses_url":"https://api.github.com/repos/web2py/web2py/statuses/de96017ced8ee6f4546ddabcbe87dd12f441ac0f","head":{"label":"ilvalle:import","ref":"import","sha":"de96017ced8ee6f4546ddabcbe87dd12f441ac0f","user":{"login":"ilvalle","id":1519351,"avatar_url":"https://avatars.githubusercontent.com/u/1519351?v=3","gravatar_id":"","url":"https://api.github.com/users/ilvalle","html_url":"https://github.com/ilvalle","followers_url":"https://api.github.com/users/ilvalle/followers","following_url":"https://api.github.com/users/ilvalle/following{/other_user}","gists_url":"https://api.github.com/users/ilvalle/gists{/gist_id}","starred_url":"https://api.github.com/users/ilvalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilvalle/subscriptions","organizations_url":"https://api.github.com/users/ilvalle/orgs","repos_url":"https://api.github.com/users/ilvalle/repos","events_url":"https://api.github.com/users/ilvalle/events{/privacy}","received_events_url":"https://api.github.com/users/ilvalle/received_events","type":"User","site_admin":false},"repo":{"id":12694286,"name":"web2py","full_name":"ilvalle/web2py","owner":{"login":"ilvalle","id":1519351,"avatar_url":"https://avatars.githubusercontent.com/u/1519351?v=3","gravatar_id":"","url":"https://api.github.com/users/ilvalle","html_url":"https://github.com/ilvalle","followers_url":"https://api.github.com/users/ilvalle/followers","following_url":"https://api.github.com/users/ilvalle/following{/other_user}","gists_url":"https://api.github.com/users/ilvalle/gists{/gist_id}","starred_url":"https://api.github.com/users/ilvalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilvalle/subscriptions","organizations_url":"https://api.github.com/users/ilvalle/orgs","repos_url":"https://api.github.com/users/ilvalle/repos","events_url":"https://api.github.com/users/ilvalle/events{/privacy}","received_events_url":"https://api.github.com/users/ilvalle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ilvalle/web2py","description":"Free and open source full-stack enterprise framework for agile development of secure database-driven web-based applications, written and programmable in Python.","fork":true,"url":"https://api.github.com/repos/ilvalle/web2py","forks_url":"https://api.github.com/repos/ilvalle/web2py/forks","keys_url":"https://api.github.com/repos/ilvalle/web2py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilvalle/web2py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilvalle/web2py/teams","hooks_url":"https://api.github.com/repos/ilvalle/web2py/hooks","issue_events_url":"https://api.github.com/repos/ilvalle/web2py/issues/events{/number}","events_url":"https://api.github.com/repos/ilvalle/web2py/events","assignees_url":"https://api.github.com/repos/ilvalle/web2py/assignees{/user}","branches_url":"https://api.github.com/repos/ilvalle/web2py/branches{/branch}","tags_url":"https://api.github.com/repos/ilvalle/web2py/tags","blobs_url":"https://api.github.com/repos/ilvalle/web2py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilvalle/web2py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilvalle/web2py/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilvalle/web2py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilvalle/web2py/statuses/{sha}","languages_url":"https://api.github.com/repos/ilvalle/web2py/languages","stargazers_url":"https://api.github.com/repos/ilvalle/web2py/stargazers","contributors_url":"https://api.github.com/repos/ilvalle/web2py/contributors","subscribers_url":"https://api.github.com/repos/ilvalle/web2py/subscribers","subscription_url":"https://api.github.com/repos/ilvalle/web2py/subscription","commits_url":"https://api.github.com/repos/ilvalle/web2py/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilvalle/web2py/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilvalle/web2py/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilvalle/web2py/issues/comments/{number}","contents_url":"https://api.github.com/repos/ilvalle/web2py/contents/{+path}","compare_url":"https://api.github.com/repos/ilvalle/web2py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilvalle/web2py/merges","archive_url":"https://api.github.com/repos/ilvalle/web2py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilvalle/web2py/downloads","issues_url":"https://api.github.com/repos/ilvalle/web2py/issues{/number}","pulls_url":"https://api.github.com/repos/ilvalle/web2py/pulls{/number}","milestones_url":"https://api.github.com/repos/ilvalle/web2py/milestones{/number}","notifications_url":"https://api.github.com/repos/ilvalle/web2py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilvalle/web2py/labels{/name}","releases_url":"https://api.github.com/repos/ilvalle/web2py/releases{/id}","created_at":"2013-09-09T06:13:43Z","updated_at":"2015-01-10T17:09:58Z","pushed_at":"2015-01-13T19:44:36Z","git_url":"git://github.com/ilvalle/web2py.git","ssh_url":"git@github.com:ilvalle/web2py.git","clone_url":"https://github.com/ilvalle/web2py.git","svn_url":"https://github.com/ilvalle/web2py","homepage":"http://www.web2py.com","size":31548,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"web2py:master","ref":"master","sha":"181546e49d66301cf737d34edca448af39905a5d","user":{"login":"web2py","id":33118,"avatar_url":"https://avatars.githubusercontent.com/u/33118?v=3","gravatar_id":"","url":"https://api.github.com/users/web2py","html_url":"https://github.com/web2py","followers_url":"https://api.github.com/users/web2py/followers","following_url":"https://api.github.com/users/web2py/following{/other_user}","gists_url":"https://api.github.com/users/web2py/gists{/gist_id}","starred_url":"https://api.github.com/users/web2py/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web2py/subscriptions","organizations_url":"https://api.github.com/users/web2py/orgs","repos_url":"https://api.github.com/users/web2py/repos","events_url":"https://api.github.com/users/web2py/events{/privacy}","received_events_url":"https://api.github.com/users/web2py/received_events","type":"Organization","site_admin":false},"repo":{"id":72690,"name":"web2py","full_name":"web2py/web2py","owner":{"login":"web2py","id":33118,"avatar_url":"https://avatars.githubusercontent.com/u/33118?v=3","gravatar_id":"","url":"https://api.github.com/users/web2py","html_url":"https://github.com/web2py","followers_url":"https://api.github.com/users/web2py/followers","following_url":"https://api.github.com/users/web2py/following{/other_user}","gists_url":"https://api.github.com/users/web2py/gists{/gist_id}","starred_url":"https://api.github.com/users/web2py/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/web2py/subscriptions","organizations_url":"https://api.github.com/users/web2py/orgs","repos_url":"https://api.github.com/users/web2py/repos","events_url":"https://api.github.com/users/web2py/events{/privacy}","received_events_url":"https://api.github.com/users/web2py/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/web2py/web2py","description":"Free and open source full-stack enterprise framework for agile development of secure database-driven web-based applications, written and programmable in Python.","fork":false,"url":"https://api.github.com/repos/web2py/web2py","forks_url":"https://api.github.com/repos/web2py/web2py/forks","keys_url":"https://api.github.com/repos/web2py/web2py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/web2py/web2py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/web2py/web2py/teams","hooks_url":"https://api.github.com/repos/web2py/web2py/hooks","issue_events_url":"https://api.github.com/repos/web2py/web2py/issues/events{/number}","events_url":"https://api.github.com/repos/web2py/web2py/events","assignees_url":"https://api.github.com/repos/web2py/web2py/assignees{/user}","branches_url":"https://api.github.com/repos/web2py/web2py/branches{/branch}","tags_url":"https://api.github.com/repos/web2py/web2py/tags","blobs_url":"https://api.github.com/repos/web2py/web2py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/web2py/web2py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/web2py/web2py/git/refs{/sha}","trees_url":"https://api.github.com/repos/web2py/web2py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/web2py/web2py/statuses/{sha}","languages_url":"https://api.github.com/repos/web2py/web2py/languages","stargazers_url":"https://api.github.com/repos/web2py/web2py/stargazers","contributors_url":"https://api.github.com/repos/web2py/web2py/contributors","subscribers_url":"https://api.github.com/repos/web2py/web2py/subscribers","subscription_url":"https://api.github.com/repos/web2py/web2py/subscription","commits_url":"https://api.github.com/repos/web2py/web2py/commits{/sha}","git_commits_url":"https://api.github.com/repos/web2py/web2py/git/commits{/sha}","comments_url":"https://api.github.com/repos/web2py/web2py/comments{/number}","issue_comment_url":"https://api.github.com/repos/web2py/web2py/issues/comments/{number}","contents_url":"https://api.github.com/repos/web2py/web2py/contents/{+path}","compare_url":"https://api.github.com/repos/web2py/web2py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/web2py/web2py/merges","archive_url":"https://api.github.com/repos/web2py/web2py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/web2py/web2py/downloads","issues_url":"https://api.github.com/repos/web2py/web2py/issues{/number}","pulls_url":"https://api.github.com/repos/web2py/web2py/pulls{/number}","milestones_url":"https://api.github.com/repos/web2py/web2py/milestones{/number}","notifications_url":"https://api.github.com/repos/web2py/web2py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/web2py/web2py/labels{/name}","releases_url":"https://api.github.com/repos/web2py/web2py/releases{/id}","created_at":"2008-11-07T06:08:58Z","updated_at":"2015-01-21T15:33:12Z","pushed_at":"2015-01-21T15:33:11Z","git_url":"git://github.com/web2py/web2py.git","ssh_url":"git@github.com:web2py/web2py.git","clone_url":"https://github.com/web2py/web2py.git","svn_url":"https://github.com/web2py/web2py","homepage":"http://www.web2py.com","size":41046,"stargazers_count":762,"watchers_count":762,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":394,"mirror_url":null,"open_issues_count":6,"forks":394,"open_issues":6,"watchers":762,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/web2py/web2py/pulls/587"},"html":{"href":"https://github.com/web2py/web2py/pull/587"},"issue":{"href":"https://api.github.com/repos/web2py/web2py/issues/587"},"comments":{"href":"https://api.github.com/repos/web2py/web2py/issues/587/comments"},"review_comments":{"href":"https://api.github.com/repos/web2py/web2py/pulls/587/comments"},"review_comment":{"href":"https://api.github.com/repos/web2py/web2py/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/web2py/web2py/pulls/587/commits"},"statuses":{"href":"https://api.github.com/repos/web2py/web2py/statuses/de96017ced8ee6f4546ddabcbe87dd12f441ac0f"}}}}