python / cpython

The Python programming language
https://www.python.org
Other
63.38k stars 30.35k forks source link

[imaplib] MOVE is a legal command #77517

Closed 4fce49d7-9c43-4783-b6f9-bd43eb64c326 closed 6 years ago

4fce49d7-9c43-4783-b6f9-bd43eb64c326 commented 6 years ago
BPO 33336
Nosy @vstinner, @mcepl, @moreati, @miss-islington
PRs
  • python/cpython#6569
  • python/cpython#8370
  • python/cpython#8373
  • python/cpython#8386
  • python/cpython#8409
  • python/cpython#8410
  • python/cpython#8411
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields: ```python assignee = None closed_at = created_at = labels = ['build', '3.8', '3.7', 'extension-modules', 'type-feature', 'library'] title = '[imaplib] MOVE is a legal command' updated_at = user = 'https://github.com/mcepl' ``` bugs.python.org fields: ```python activity = actor = 'vstinner' assignee = 'none' closed = True closed_date = closer = 'vstinner' components = ['Extension Modules', 'Library (Lib)', 'Cross-Build'] creation = creator = 'mcepl' dependencies = [] files = [] hgrepos = [] issue_num = 33336 keywords = ['patch'] message_count = 14.0 messages = ['315632', '318657', '318658', '321950', '321953', '322078', '322199', '322200', '322201', '322217', '322220', '322222', '322223', '322224'] nosy_count = 5.0 nosy_names = ['vstinner', 'mcepl', 'Alex.Willmer', 'miss-islington', 'Anthony Singleton'] pr_nums = ['6569', '8370', '8373', '8386', '8409', '8410', '8411'] priority = 'normal' resolution = 'fixed' stage = 'resolved' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue33336' versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8'] ```

    4fce49d7-9c43-4783-b6f9-bd43eb64c326 commented 6 years ago

    When running

        box = IMAP4_SSL(host)
        box.login(user, pass)
        msgs = somehowget_uids_of_messsages_to_move()
        box.uid('MOVE', msgs, 'target')

    I get an error "Unknown IMAP4 UID command: MOVE". The problem is that imaplib contains a list Commands of the permitted IMAP commands, and MOVE is not included, even though it is perfectly legal (and quite widely supported) command according to RFC-6851.

    vstinner commented 6 years ago

    https://tools.ietf.org/html/rfc6851 Internet Message Access Protocol (IMAP) - MOVE Extension January 2013

    vstinner commented 6 years ago

    Should we also add the MOVE command to Python 2.7, 3.6 and 3.7? The change looks safe and trivial.

    vstinner commented 6 years ago

    Should we also add the MOVE command to Python 2.7, 3.6 and 3.7? The change looks safe and trivial.

    IMHO it's ok to backport this change. The stdlib must follow evolutions of the IMAP protocol. It's a self contained and safe change, it's not a new Python method.

    vstinner commented 6 years ago

    See also bpo-33327: Add a method to move messages to IMAPlib.

    2050f877-decb-44c2-a738-282acfd82d27 commented 6 years ago

    Fuck you

    vstinner commented 6 years ago

    New changeset caa331d492acc67d8f4edd16542cebfabbbe1e79 by Victor Stinner (Matěj Cepl) in branch 'master': bpo-33336, imaplib: Legalize MOVE command (GH-6569) https://github.com/python/cpython/commit/caa331d492acc67d8f4edd16542cebfabbbe1e79

    vstinner commented 6 years ago

    Matěj Cepl: There is a bot to backport changes to other branches. I closed your backport PRs. I prefer to polish the change for the master branch, and only backport later. For example, I modified the commit message of your PR. The bot also uses "git cherry-pick -x" to mention the sha1 of the backported commit which helps to track the origin of backports.

    vstinner commented 6 years ago

    I don't think that "git cherry-pick -x" can be used before a PR is merged, since the merge changes the SHA1 (using our current workflow).

    miss-islington commented 6 years ago

    New changeset 112784984784199d54176132edc38ce8c9b007c1 by Miss Islington (bot) in branch '3.6': bpo-33336, imaplib: Legalize MOVE command (GH-6569) https://github.com/python/cpython/commit/112784984784199d54176132edc38ce8c9b007c1

    vstinner commented 6 years ago

    New changeset 96bba049f4bd4d030a72326fd1a67586454f6e2c by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-33336, imaplib: Legalize MOVE command (GH-6569) (GH-8409) https://github.com/python/cpython/commit/96bba049f4bd4d030a72326fd1a67586454f6e2c

    miss-islington commented 6 years ago

    New changeset 7868426c1fe562d2d70bbfd0bb3d0da82f909001 by Miss Islington (bot) in branch '2.7': bpo-33336, imaplib: Legalize MOVE command (GH-6569) https://github.com/python/cpython/commit/7868426c1fe562d2d70bbfd0bb3d0da82f909001

    vstinner commented 6 years ago

    Matěj Cepl: Thanks for your change. I applied it to 2.7, 3.6, 3.7 and master branches.

    vstinner commented 6 years ago

    Anthony Singleton: "Fuck you"

    What does justify this verbal violence?