-
-
Notifications
You must be signed in to change notification settings - Fork 409
Expose plugin versions, enable retrieval with .version
#2133
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
Conversation
dgw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nitpicks big and small. Which means they're not really all "nitpicks", I guess.
f1f9ad8 to
a09b91f
Compare
dgw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but for a couple of docstring-formatting nits that I missed the first time. (In rST, a single ` does something entirely different from what it does in Markdown; the equivalent is ``.)
I don't care enough about the performance to benchmark .format() vs. %s interpolation vs. .join() or anything, and it's not like this is going to run on every line, so I just marked that thread as resolved. 🙃
|
At first, I was rather hesitant regarding plugin version, because something didn't sit well with me. Now, I think plugin's version is an interesting information, so I put that aside for later. After further consideration, I think it would be best if the Plugin Handler object had a |
|
@Exirel Is that "would be best" a request-changes or someone-should-follow-up-on-this? I'm ready to approve and let a plugin-handler @half-duplex Note that when you squash, it would be a good time to fix the typo "retreiving" in 1be8bbe |
|
Exi, what's the benefit of a .get_version() over just changing how get_meta_description() generates the version return attr? If you prefer it on its own, would a property be cleaner? |
I think I left this comment expecting a conversation, and that didn't happen a month ago.
Getting a plugin's version can depends on the type of plugin, therefore each Plugin Handler may require an override on how to get said version. For example, there is no need for a Another reason is that it's easier to get a Plugin object, and ask for its version, without having to retrieve a dict and hope that it gets everything required. It means less code overall, so less chance of mistake. Last but not least, it's easier to deprecate a behavior if you have a method with a single purpose for it. That's the reason for a proper interface. |
|
Still hoping for a refactor with that getter method Exi asked about. |
9ddd2ef to
6007ec2
Compare
6007ec2 to
c63524a
Compare
|
Now depends on #2199 |
|
Refocusing on some 8.0 stuff now that 7.1.7 is out (and we weathered the Python 3.9.8 kerfuffle). Merged #2199, which opens the way to rebasing this patch on top of it. Looks like some small difference in documentation was introduced when splitting the new |
c63524a to
dcd43fe
Compare
dcd43fe to
e4a6df0
Compare
dgw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whee

Description
Exposes
plugin._module.__version__(orNone) in plugin metadata, and adds.version plugin_name.This will confuse any daring person with a sopel module named sopel, but that's a risk I'm willing to take.
It does work for individual .py files that contain a
__version__.Checklist
make qa(runsmake qualityandmake test)