Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle async do_complete. #520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 13, 2024

  1. Handle async do_complete.

    A number of methods of ipykernel can optinally return `awaitable[T]`
    instead of just `T`, this is the case for `do_complete`.
    
    I think it's a mistake ; see ipython/ipykernel#1295 ; in particular
    because it's easy to forget / hard to properly type-check, and I'd like
    to make it mandatory in the long term to have await.
    
    Spyder seem to not handle the case where do_completer return an
    awaitable (or more partiularly is `do_complete` is a coroutine function.
    
    This tries to handle it – and as of course `do_completer` _can_ be
    async, all caller _must_ be async. So I try to do all the required
    updates.
    
    Note: I also add explict imports in some test, to get better error
    message in case those deps are not installed.
    Carreau committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    2f295cd View commit details
    Browse the repository at this point in the history