autocomplete issues

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

autocomplete issues

WingIDE - User mailing list
Hi,

I've been working with Python's multiprocessing module lately on Xubuntu with Wing 5.1.12-1 and Python 3.4/3.5 and I've noticed that it doesn't import items from multiprocessing quite right

For example, if I go to do this:

from multiprocessing import Process

Wing's autocomplete insists that I actually want process. Even after I import it the correct way, because Wing doesn't think it exists, none of the autocomplete functions work on my process object (except when I'm debugging). I am having a similar problem with getting autocomplete to work with an instance of threading.Lock().

Is there some kind of setting in Wing that prevents it from autocompleting on concurrency libraries?

I noticed it doesn't know what to do with the new async/await keywords either as they don't show up to be autocompleted.

Thanks,
Mike

-----------------
Mike Driscoll

Blog:   http://blog.pythonlibrary.org
Books: Python 101, Python 201: Intermediate Python 

_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: autocomplete issues

WingIDE - User mailing list
Mike Driscoll via wingide-users wrote:

> I've been working with Python's multiprocessing module lately on
> Xubuntu with Wing 5.1.12-1 and Python 3.4/3.5 and I've noticed that it
> doesn't import items from multiprocessing quite right
>
> For example, if I go to do this:
>
> from multiprocessing import Process
>
> Wing's autocomplete insists that I actually want process. Even after I
> import it the correct way, because Wing doesn't think it exists, none
> of the autocomplete functions work on my process object (except when
> I'm debugging). I am having a similar problem with getting
> autocomplete to work with an instance of threading.Lock().
>
> Is there some kind of setting in Wing that prevents it from
> autocompleting on concurrency libraries?

No, it's due to multiprocessing.py setting up its namespace dynamically
in a way that static analysis can't really crack:

globals().update((name, getattr(context._default_context, name))
                  for name in context._default_context.__all__)

The best solution is probably just to work while the debugger is
active.  We probably should also add static overrides so this particular
module is better handled.

> I noticed it doesn't know what to do with the new async/await keywords
> either as they don't show up to be autocompleted.

For those we also need to add better support.  I think it'll mainly be
in Wing 6.

Thanks,

--

Stephan Deibel
Wingware | Python IDE

The Intelligent Development Environment for Python Programmers

wingware.com


_________________________________________________
Wing IDE users list
http://wingware.com/lists/wingide
Loading...