Skip to content

Autocomplete doesn't work for Gtk+ 3 #582

Closed

Description

Environment data

VS Code version: Code 1.19.1 (0759f77bb8d86658bc935a10a64f6182c5a1eeba, 2017-12-19T09:46:23.884Z)
Python Extension version: 0.9.1
Python Version: 2.7.14
OS and version: Windows_NT x64 10.0.16299

Actual behavior

Autocomplete doesn't work for Gtk+ 3 library. It does work for all other libraries I have tried in the past. It also works for pygtk (gtk 2.x). Even in the given script, it works with gi but doesn't work with Gtk. It shows all the member functions and variables for gi, auto completion only shows suggestions based on used keywords and no member functions.

Is this related to the Gobject and introspection ?

Expected behavior

Autocomplete should show member functions

Steps to reproduce:

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
win = Gtk.

Logs

Output from Python output panel

Output from Console window (Help->Developer Tools menu)

Kudos on the awesome extension BTW ;)

Cheers
Pavan

Activity

  1. inochisa commented on Jan 16, 2018

    @inochisa

    I have the same problem. But I can see something in the module gi, can not see the thing in the gi.repository(use from gi.repository import ...). And I see there is only a __inty__.py and __pycache__ folder in my folder /usr/lib/python3.6/site-package/gi/repository,maybe the extension can not load the information from the pycache?
    The other thing I see it's the linting is ok, I get error when I type the wrong function name in the gi.repository(But I don't know why, i just get an message that show me there is no function named "xxx".)
    My code version is 1.19.2 and the python version is 3.6.4. Os is linux
    My console window is also nothing.

  2. lazka commented on Jan 16, 2018

    @lazka

    Does this plugin support PEP 484 stub files? There was some discussion on the python+gtk site to look into supporting that: pygobject/pgi-docgen#79 (comment)

  3. brettcannon commented on Jan 16, 2018

    @brettcannon
    Member

    SakuraLife the __pycache__ is just the cache of .pyc files and is only used when there's a corresponding .py file, so it plays no part in intellisense.

    Christoph Reiter (@lazka) davidhalter/jedi#839 suggests that Jedi doesn't have support yet for .pyi files.

  4. pavan-inferno commented on Jan 18, 2018

    @pavan-inferno
    Author

    Should have seen this earlier. Its a jedi issue.
    davidhalter/jedi#531
    It doesn't support gobject introspection modules (Gtk 3 is one). I wanted to know if the source of jedi used by the extension is patched to resolve this issue. And also the suggested monkey patch in the above link doesn't work for me.

  5. brettcannon commented on Jan 18, 2018

    @brettcannon
    Member

    We don't patch Jedi ATM, but Mikhail Arkhipov (@MikhailArkhipov) is collecting known issues with Jedi in hopes that we can resolve them eventually.

  6. pavan-inferno commented on Jan 18, 2018

    @pavan-inferno
    Author

    Thanks brett !
    I have another question.
    Can I use python.jediPath to try monkey patching it ?

  7. brettcannon commented on Jan 18, 2018

    @brettcannon
    Member

    Pavan Nuthi (@pavan-inferno) I believe so, yes.

  8. MikhailArkhipov commented on Feb 17, 2018

    @MikhailArkhipov

    We integrated Jedi 0.11, could you try insiders build please

    https://github.com/Microsoft/vscode-python/blob/master/CONTRIBUTING.md#insiders-build

  9. 9 remaining items

  10. skewty commented on Sep 22, 2018

    @skewty
  11. brettcannon commented on Sep 24, 2018

    @brettcannon
  12. fredrikaverpil commented on May 3, 2019

    @fredrikaverpil

    For anyone interested, work is now being done on davidhalter/jedi#839 !

  13. tristan957 commented on May 3, 2019

    @tristan957

    Has anyone tried this with the Python language server? Admittedly I don't write much Python anymore. Not sure if the language server makes use of Jedi or not.

  14. brettcannon commented on May 10, 2019

    @brettcannon
    Member

    Tristan Partin (@tristan957) the language server does not use Jedi.

  15. tristan957 commented on May 11, 2019

    @tristan957

    Brett Cannon (@brettcannon) I am aware. I was meaning that "has someone tried writing PyGObject using the language server instead of the Jedi-based completions".

  16. fredrikaverpil commented on May 24, 2019

    @fredrikaverpil
  17. fredrikaverpil commented on May 24, 2019

    @fredrikaverpil

    Proof of .pyi files being loaded in vscode: davidhalter/jedi#1318 (comment)

  18. brettcannon commented on Jul 29, 2019

    @brettcannon
    Member

    Closing as this is an upstream issue which we don't have direct control or influence over.

  19. locked as resolved and limited conversation to collaborators on Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions