Skip to content

Charset instance not passed to set_payload() #71632

Closed

Description

@claudep
mannequin
BPO 27445
Nosy @warsaw, @bitdancer, @berkerpeksag
Files
  • issue27445.diff
  • 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 2016-09-08.16:43:04.342>
    created_at = <Date 2016-07-02.21:13:07.583>
    labels = ['type-bug', 'expert-email']
    title = 'Charset instance not passed to set_payload()'
    updated_at = <Date 2016-09-08.16:59:30.868>
    user = 'https://bugs.python.org/claudep'

    bugs.python.org fields:

    activity = <Date 2016-09-08.16:59:30.868>
    actor = 'claudep'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-09-08.16:43:04.342>
    closer = 'berker.peksag'
    components = ['email']
    creation = <Date 2016-07-02.21:13:07.583>
    creator = 'claudep'
    dependencies = []
    files = ['43614']
    hgrepos = []
    issue_num = 27445
    keywords = ['patch']
    message_count = 4.0
    messages = ['269740', '275061', '275062', '275066']
    nosy_count = 5.0
    nosy_names = ['barry', 'r.david.murray', 'python-dev', 'berker.peksag', 'claudep']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27445'
    versions = ['Python 3.5', 'Python 3.6']

    Activity

    1. claudep commented on Jul 2, 2016

      claudepmannequin
      MannequinAuthor

      In issue bpo-16324, I contributed an improvement so as MIMEText __init__ accept Charset instances, not only encoding strings. The use case is from Django where we customize the Charset.body_encoding before passing it to the MIMEText initialization.

      Unfortunately, what I didn't notice when Berker adapted my patch is that the Charset is casted to its string representation for the whole method, while I initially intended to let the unchanged Charset passed to self.set_payload. And the test I suggested was not smart enough to detect that.

    2. python-dev commented on Sep 8, 2016

      python-devmannequin
      Mannequin

      New changeset 4f6fef83cd0c by Berker Peksag in branch '3.5':
      Issue bpo-27445: Don't pass str(_charset) to MIMEText.set_payload()
      https://hg.python.org/cpython/rev/4f6fef83cd0c

      New changeset c5cb8bd335ae by Berker Peksag in branch 'default':
      Issue bpo-27445: Merge from 3.5
      https://hg.python.org/cpython/rev/c5cb8bd335ae

    3. berkerpeksag commented on Sep 8, 2016

      @berkerpeksag
      Member

      Thanks for the patch, Claude.

    4. claudep commented on Sep 8, 2016

      claudepmannequin
      MannequinAuthor

      Thanks for pushing the patch!

    5. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions