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

_mboxMMDF.get_string() fails to pass param to get_bytes() #75703

Closed
bpoaugust mannequin opened this issue Sep 19, 2017 · 8 comments
Closed

_mboxMMDF.get_string() fails to pass param to get_bytes() #75703

bpoaugust mannequin opened this issue Sep 19, 2017 · 8 comments
Labels
3.8 (EOL) end of life topic-email type-bug An unexpected behavior, bug, or error

Comments

@bpoaugust
Copy link
Mannequin

bpoaugust mannequin commented Sep 19, 2017

BPO 31522
Nosy @warsaw, @bitdancer, @iritkatriel
PRs
  • bpo-31522: mailbox: pass from_ parameter to get_bytes #9857
  • 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-10-22.22:59:21.956>
    created_at = <Date 2017-09-19.22:34:29.303>
    labels = ['type-bug', '3.8', 'expert-email']
    title = '_mboxMMDF.get_string() fails to pass param to get_bytes()'
    updated_at = <Date 2020-10-22.23:01:02.267>
    user = 'https://bugs.python.org/bpoaugust'

    bugs.python.org fields:

    activity = <Date 2020-10-22.23:01:02.267>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-10-22.22:59:21.956>
    closer = 'barry'
    components = ['email']
    creation = <Date 2017-09-19.22:34:29.303>
    creator = 'bpoaugust'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31522
    keywords = ['patch']
    message_count = 8.0
    messages = ['302564', '302569', '302571', '328013', '378757', '378758', '379378', '379379']
    nosy_count = 4.0
    nosy_names = ['barry', 'r.david.murray', 'bpoaugust', 'iritkatriel']
    pr_nums = ['9857']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31522'
    versions = ['Python 3.8']

    @bpoaugust
    Copy link
    Mannequin Author

    bpoaugust mannequin commented Sep 19, 2017

    See:
    https://github.com/python/cpython/blob/master/Lib/mailbox.py#L787

    The code should be

    self.get_bytes(key, from_)).as_string(unixfrom=from_)

    @bpoaugust bpoaugust mannequin added 3.7 (EOL) end of life topic-email type-bug An unexpected behavior, bug, or error labels Sep 19, 2017
    @bpoaugust
    Copy link
    Mannequin Author

    bpoaugust mannequin commented Sep 19, 2017

    https://github.com/python/cpython/blob/master/Lib/mailbox.py#L778

    The code here reads the first line, but fails to save it as the unixfrom line.

    Alternatively perhaps it should reset the file back to the start so the message factory has sight of the envelope.

    The end result is that the envelope is lost.

    @bpoaugust bpoaugust mannequin changed the title _mboxMMDF.get_string() fails to pass param to get_bytes() mailbox._mboxMMDF.get_message throws away From envelope Sep 19, 2017
    @bpoaugust bpoaugust mannequin changed the title mailbox._mboxMMDF.get_message throws away From envelope _mboxMMDF.get_string() fails to pass param to get_bytes() Sep 19, 2017
    @bpoaugust
    Copy link
    Mannequin Author

    bpoaugust mannequin commented Sep 19, 2017

    Ignore msg302569 - that was supposed to be a new issue.

    @csabella csabella added 3.8 (EOL) end of life and removed 3.7 (EOL) end of life labels Oct 13, 2018
    @bitdancer
    Copy link
    Member

    New changeset d16f012 by R. David Murray (Cheryl Sabella) in branch 'master':
    bpo-31522: mailbox.get_string: pass from_ parameter to get_bytes (bpo-9857)
    d16f012

    @iritkatriel
    Copy link
    Member

    This seems complete, can it be closed?

    @iritkatriel
    Copy link
    Member

    Well, the PR doesn't have a unit test so maybe not.

    @warsaw
    Copy link
    Member

    warsaw commented Oct 22, 2020

    Actually, it looks to me like the PR *does* include unittests, and I see them in the repo, so I'm closing this bug.

    @warsaw warsaw closed this as completed Oct 22, 2020
    @iritkatriel
    Copy link
    Member

    Right!

    @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.8 (EOL) end of life topic-email type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants