{"action":"closed","issue":{"url":"https://api.github.com/repos/davidhalter/jedi/issues/655","repository_url":"https://api.github.com/repos/davidhalter/jedi","labels_url":"https://api.github.com/repos/davidhalter/jedi/issues/655/labels{/name}","comments_url":"https://api.github.com/repos/davidhalter/jedi/issues/655/comments","events_url":"https://api.github.com/repos/davidhalter/jedi/issues/655/events","html_url":"https://github.com/davidhalter/jedi/issues/655","id":120684295,"number":655,"title":"goto_definitions ignoring absolute_import directive","user":{"login":"mxmul","id":3022244,"avatar_url":"https://avatars.githubusercontent.com/u/3022244?v=3","gravatar_id":"","url":"https://api.github.com/users/mxmul","html_url":"https://github.com/mxmul","followers_url":"https://api.github.com/users/mxmul/followers","following_url":"https://api.github.com/users/mxmul/following{/other_user}","gists_url":"https://api.github.com/users/mxmul/gists{/gist_id}","starred_url":"https://api.github.com/users/mxmul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxmul/subscriptions","organizations_url":"https://api.github.com/users/mxmul/orgs","repos_url":"https://api.github.com/users/mxmul/repos","events_url":"https://api.github.com/users/mxmul/events{/privacy}","received_events_url":"https://api.github.com/users/mxmul/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/davidhalter/jedi/labels/discussion","name":"discussion","color":"444444"},{"url":"https://api.github.com/repos/davidhalter/jedi/labels/low_prio","name":"low_prio","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-12-07T02:14:50Z","updated_at":"2016-07-31T09:45:55Z","closed_at":"2016-07-31T09:45:55Z","body":"I'm working on a (py27) project where a submodule has the same name as the top-level package, and `goto_definitions` isn't working as expected. I've been able to reproduce with a simple project that looks like this:\r\n\r\n```\r\nexample/\r\n├── __init__.py\r\n├── submodule\r\n│   ├── __init__.py\r\n│   └── example.py\r\n└── util.py\r\n```\r\n\r\nwhere `example.py` has contents:\r\n```python\r\n# -*- coding: utf-8 -*-\r\n# example/submodule/example.py\r\nfrom __future__ import absolute_import\r\n\r\nfrom example.util import some_function\r\n```\r\n\r\nWith this setup, jedi finds no definitions for `some_function` on line 5 of `example.py`, but it works fine if I rename the file:\r\n```python\r\n>>> import jedi\r\n>>> script = jedi.Script(line=5, column=25, path='example/submodule/example.py')\r\n>>> print script.goto_definitions()\r\n[]\r\n>>> script = jedi.Script(line=5, column=25, path='example/submodule/copy_of_example.py')\r\n>>> print script.goto_definitions()\r\n[<Definition def some_function>]\r\n```"}}
{"actor":{"display_login":"davidhalter"}}