I was able to instantiate the class AND get the expected three objects from it - pre_hook, post_hook, and resource.
from mailman_customizations.hooks import MailmanCustomizations instance = MailmanCustomizations() dir(instance) ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__implemented__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__providedBy__', '__provides__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'post_hook', 'pre_hook', 'resource']
I know Abhilash Raj is probably well versed in this from statements made elsewhere, so I've added them in the CC field. Abhilash Raj, any ideas?
Thomas
-----Original Message----- From: Mark Sapiro <mark@msapiro.net> Sent: Tuesday, October 24, 2023 10:36 PM To: mailman-users@mailman3.org Subject: [MM3-users] Re: (Custom) Plugins: Proper file path(s) for adding a handler?
On 10/24/23 3:56 PM, Thomas Ward via Mailman-users wrote:
When I DO NOT have the module loaded in the configuration,
mailman shell
works. Since that was functional, I went into the shell and executed this:from mailman_customizations.hooks import MailmanCustomizations
This worked fine, but obviously importing the class doesn't necessarily *activate* the class. So something is up with how I'm *supposed* to activate the plugin in the config, and we know that it's visible to Mailman in its shell, but it can't autoload it.
I'm past the limit of my knowledge here and only stabbing in the dark, but what happens after you import it. Can you instantiate it, e.g.
instance = MailmanCustomizations()
dir(instance)
I'm not saying this should succeed, just that it may possibly provide useful information.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to teward@thomas-ward.net