-
Notifications
You must be signed in to change notification settings - Fork 86
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
New function uid_expunge
, which requires the capability UIDPLUS.
#508
Conversation
The function `expunge` can raise an error at the server side, when the function is utilized with *messages*, and the server does not support the capability UIDPLUS. Closes #496
Thanks very much for this. The change looks good but could you address the formatting issue mentioned by black? |
Also, I've just fixed up the project's Github Actions config so if you rebase onto master or merge master the actions should work now. |
Thanks to the linter "black", the line sizes were adjusted. The function description was adapted to use 80 columns (PEP 8). Context about the original ``expunge`` function were added.
Hello, I updated the pull request, to address the linter issue. |
imapclient/imapclient.py
Outdated
"""Same functionality as ``expunge``, but *messages* must be | ||
specified, and the capability UIDPLUS is tested beforehand. It should | ||
be more fail-proof than ``expunge`` with *messages*, which cannot be | ||
updated to prevent breaking compability with existing codebase. |
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.
I don't think the docstring requires quite as much detail. Something like this should do:
Expunge deleted messages with the specified message ids from the folder. This requires the UIDPLUS capability.
See :rfc:
4315#section-2.1
section 2.1 for more details.
Then please extend the docstring on the expunge method to discourage use of messages
there. Something like:
Use of the messages argument is discouraged. Please see the uid_expunge method instead.
I would be ok with this replacing the existing paragraph about the messages
argument.
Thanks!
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.
More "formal" : * Removed ``uid_expunge`` first appearance context. * Deprecated notice for ``expunge`` with *messages*.
The depreciation notice should be at the first line ? |
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.
This is great. Thanks very much.
The function
expunge
can raise an error at the server side, when the function is utilized with messages, and the server does not support the capability UIDPLUS.Closes #496