On 12/10/20 11:51 AM, Andreas Barth wrote:
Hi,
I noticed that a mail to -subscribe for an already subscribed user doesn't get any response (about line 225 in mailman/src/mailman/app/subscriptions.py). Same but different for unsubscribe for users not on the list.
I tested and I see this, so there is a bug, but I don't know what the issue is. The code you point to should raise AlreadySubscribedError and <https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/commands/eml_membership.py#L110> should catch it and report, but this doesn't seem to be happening..
Also, <https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/commands/eml_membership.py#L210> should report an attempt to unsubscribe a non-member, but the issue here is <https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/runners/command.py#L70> which supresses sending the response because it is redundant if the user gets a 'you have been removed' email, but in this case there isn't one.
I'd need these kind of mails however in hope that users complain less.
Would that be generally interessting, and if so, any special requirements for submitting patches, or should I just do that locally?
These things should be fixed, but it's more involved than just a patch to fix the error. For all but trivial fixes, the workflow should be something along the lines of the following.
There should be an issue on GitLab for the appropriate project; in this case at <https://gitlab.com/mailman/mailman/-/issues>.
Then to develop a fix, there needs to be a fix, a test for the fixed code and a note in the NEWS.rst file about the fix. I generally prefer to start with a local clone of the GitLab branch and first create a test for the desired behavior. This test should fail. Then I create the fix, and now the test should pass. Finally, I create the NEWS item and commit those changes and create a merge request.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan