Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
fabric.main.is_task_module should use isinstance #718
fabric.main.is_task_module is currently defined like this:
What's the purpose of
I was trying to use types.ModuleType subclass and fabric fails to discover tasks in this case.
Yea, that just looks like @goosemo either forgot
If you submit a pull request (don't forget to use hub pull-request to attach it to this issue!) with the change + a changelog entry crediting yourself, I'll merge it. Thanks! You should probably base your PR off the
I'll submit a pull request soon.
By the way, support for ModuleType subclasses is a real problem for me :) We are developing a framework for Fabric and in order to solve #573 without waiting for Fabric 2.0 we're using https://github.com/kmike/fabric-taskset package. The idea is to just create module objects and put them as variables to fabfile (without adding to sys.modules, etc); fabric loads tasks fine from such objects. Creating objects of ModuleType class works fine but sometimes a subclass provides a cleaner solution.