Skip to content
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

imaplib has no timeout setting #82796

Closed
Yajo mannequin opened this issue Oct 28, 2019 · 5 comments
Closed

imaplib has no timeout setting #82796

Yajo mannequin opened this issue Oct 28, 2019 · 5 comments
Labels
3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@Yajo
Copy link
Mannequin

Yajo mannequin commented Oct 28, 2019

BPO 38615
Nosy @warsaw, @vstinner, @ericvsmith, @bitdancer, @maxking, @corona10, @yajo
PRs
  • bpo-38615: Add timeout parameter for IMAP4 and IMAP4_SSL constructor #17203
  • 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:

    assignee = None
    closed_at = <Date 2020-01-07.17:28:49.912>
    created_at = <Date 2019-10-28.13:58:01.457>
    labels = ['type-feature', 'library', '3.9']
    title = 'imaplib has no timeout setting'
    updated_at = <Date 2020-01-07.17:28:49.910>
    user = 'https://github.com/Yajo'

    bugs.python.org fields:

    activity = <Date 2020-01-07.17:28:49.910>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-01-07.17:28:49.912>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2019-10-28.13:58:01.457>
    creator = 'Jairo Llopis'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38615
    keywords = ['patch']
    message_count = 5.0
    messages = ['355542', '355584', '356795', '359523', '359524']
    nosy_count = 7.0
    nosy_names = ['barry', 'vstinner', 'eric.smith', 'r.david.murray', 'maxking', 'corona10', 'Jairo Llopis']
    pr_nums = ['17203']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue38615'
    versions = ['Python 3.9']

    @Yajo
    Copy link
    Mannequin Author

    Yajo mannequin commented Oct 28, 2019

    No way to pass a timeout to imaplib.IMAP4 or imaplib.IMAP4_SSL.

    When opening the connection, the only way is to use socket.settimeout(), which affects the global execution environment.

    It's interesting that poplib includes the needed timeout parameter instead... weird. I think it was forgotten for imaplib.

    @Yajo Yajo mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Oct 28, 2019
    @ericvsmith
    Copy link
    Member

    I think this is a reasonable request. It would have to be a 3.9 feature.

    Perhaps some code (and tests) can be stolen from poplib.

    @ericvsmith ericvsmith removed 3.7 (EOL) end of life 3.8 only security fixes labels Oct 28, 2019
    @corona10
    Copy link
    Member

    @eric.smith

    I 've submitted the patch, Can I get a review from you if you don't mind?
    Thank you :)

    @vstinner
    Copy link
    Member

    vstinner commented Jan 7, 2020

    New changeset 13a7ee8 by Victor Stinner (Dong-hee Na) in branch 'master':
    bpo-38615: Add timeout parameter for IMAP4 and IMAP4_SSL constructor (GH-17203)
    13a7ee8

    @vstinner
    Copy link
    Member

    vstinner commented Jan 7, 2020

    Thanks Jairo Llopis for the feature request and thanks Dong-hee Na for actually implementing it!

    @vstinner vstinner closed this as completed Jan 7, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants