Query regarding plugin integration with mailman3

Can someone tell me if the following way is suitable for implementing a plug in on mailman3 :
A folder contains all the .py codes needed to implement the plugin feature aimed. In that folder we make an executable file i.e. .sh file, which runs the script that adds the code mentioned above in the right places of mailman3 src code.
Regards, Aanand

Aanand Shekhar Roy writes:
Can someone tell me if the following way is suitable for implementing a plug in on mailman3 :
See
src/Mailman/mailman/src/mailman/core/chains.py src/Mailman/mailman/src/mailman/core/pipelines.py
[@Barry This stuff seems kinda underdocumented, at least in this module?]
This is not the way to create a plugin for a Python program. The chains and pipelines code show the right way to do that: create a simple module that Python can import given its name, and then have that module do any further loading of code necessary for the plugin implementation.
The question that remains is whether a chain (which is used to check whether a message should be distributed at all) or a pipeline handler (which manipulates messages) is sufficient for the plugins you envision. I don't see why they would not be -- they are quite general mechanisms -- but there may be edge cases I haven't thought of.

Aanand Shekhar Roy writes:
Can someone tell me if the following way is suitable for implementing a plug in on mailman3 :
See
src/Mailman/mailman/src/mailman/core/chains.py src/Mailman/mailman/src/mailman/core/pipelines.py
[@Barry This stuff seems kinda underdocumented, at least in this module?]
This is not the way to create a plugin for a Python program. The chains and pipelines code show the right way to do that: create a simple module that Python can import given its name, and then have that module do any further loading of code necessary for the plugin implementation.
The question that remains is whether a chain (which is used to check whether a message should be distributed at all) or a pipeline handler (which manipulates messages) is sufficient for the plugins you envision. I don't see why they would not be -- they are quite general mechanisms -- but there may be edge cases I haven't thought of.
participants (2)
-
Aanand Shekhar Roy
-
Stephen J. Turnbull