-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Master plan to fix the "plugin"/"module" confusion #1738
Comments
That's a very good plan. I like it! |
Everything for 7.0 is done (or at least in a PR that'll be merged soon). Punting the rest to 7.1, per plan. |
I'm in favor of this. It would mean less code to maintain, and one and only one way to have proper plugins (entry point). Let's add a warning in Sopel 8 and remove that in Sopel 9, that would be fine by me! |
Assuming we continue with moving Plugins with active maintainers could migrate, in theory. I think nothing prevents one from switching to an entry-point plugin while keeping the original namespaced package name. Note that we have updates to make elsewhere if we're committed to this plan—the cookiecutter template still has a tagged version people can use to generate new namespace packages, and more importantly the website tutorial still talks about these. My current mini-project is figuring out if it's possible to keep Sphinx references to |
Self-assigned as reminder to take care of "Audit documentation and code comments for references to "modules" that actually refer to "plugins" and update them". Once that's done, the rest of this can be moved to the 8.0.0 milestone. |
And we're done with the 7.x stuff. Moving to the next milestone. |
Put back in 8.0: It's probably prudent to have deprecation warnings on |
No it's just calling the function at the top of the module. An import run the code, |
Huh, while I was messing around with doing it myself, you opened a PR. I'll take it. |
Everything from 8.0 has been merged. 🎉 |
Since long before this project was called "Sopel", the
.py
files one would drop in to add functionality have been referred to as "modules". The code uses it, the docs use it—that term is everywhere. Thing is, Python already has something called "modules", and that makes stuff confusing.Going forward, we've more-or-less decided to start calling our stuff "plugins" instead. The rewritten machinery to manage them is in
sopel.plugins
(see #1479). We (those of us who work on the project on a regular basis) are pretty consistent about referring to them as "plugins" on IRC and in new documentation. But there are still a lot of references to "modules" everywhere.Working on this will probably last the entire life-cycle of Sopel 7. It's not trivial to make such a wide-reaching change in how stuff gets named (or documented), so the implementation plan below is intentionally slow-paced.
Here are the things that [we know] need to be done, sorted by when they need to happen:
bot.py
) to call them "plugins" (see bot, config: s/module/plugin/ (where appropriate) #1743)sopel configure --modules
, for example, which replaces the oldsopel --configure-modules
option, but the new CLI should call them "plugins"—especially since we also have a newsopel-plugins
management tool to match~/.sopel/plugins
support, working just like~/.sopel/modules
does in 6.xThis probably should be split into a list of sub-tasks, but I'll leave that for another timeNot necessary; donesopel.module
(all the decorator magic) tosopel.plugin
~/.sopel/modules
by default (plugins: don't search in~/.sopel/modules
by default any more #2119)core.extra
setting, but renaming the folder is even easiersopel.module
usage (module: import-time deprecation warning #2170)import sopel.module
,from sopel import module
, orfrom sopel.module import thing, thing2
statement runs, but if that's unreasonably complicated then we can do the usual instead.sopel.module
, leaving onlysopel.plugin
as the place from which to import plugin decorators & constantsAs with all our long-term tracking issues, this will get punted from one milestone to the next as tasks for each version target get completed. It's also subject to change based on feedback from collaborators and users, so feel free to comment here or bring it up in our IRC channel!
Discarded ideas:
Possibly stop supporting plugins from PyPI in thesopel_modules.*
namespace…?Only a thought, not yet a firm decisionThe text was updated successfully, but these errors were encountered: