Skip to content

python-client requires an empty py file in case of a plugin package #63

@btipling

Description

@btipling

If I have a directory that exports the @neovim.plugin class in an __init__.py python-client doesn't doesn't see the plugin unless there's also an empty python file with the same name. This is because we only check for if ext == '.py': and not directories in neovim/__init__.py

The plugin will actually though load the plugin from the package directory instead of the empty python file because of how find_module and imp.load_module work in neovim/plugin/host.py.

Our floobits plugin is too complicated and shares code with other plugins and so cannot be contained in a single python file.

In addition when there is a problem with a plugin package the error reported (only with code in #62 because error logging has problems that pr fixes) reports the empty python file as the cause of the problem which is incorrect. This is because neovim/plugin/host.py reports the path for the empty python file and not the path returned by find_module.

I plan on issuing patches for these problems, but I'm blocked by #62 which is still outstanding. I may just go ahead and start adding pull requests blocked by other pull requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions