Skip to content

If new email policies are used, default message factory should be EmailMessage #64675

Closed

Description

@bitdancer
BPO 20476
Nosy @warsaw, @bitdancer
Files
  • use_emailmessage.patch
  • message_factory.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-09.23:05:04.098>
    created_at = <Date 2014-02-01.22:08:05.645>
    labels = ['type-feature', 'library', 'expert-email', 'docs']
    title = 'If new email policies are used, default message factory should be EmailMessage'
    updated_at = <Date 2016-09-10.04:25:34.025>
    user = 'https://github.com/bitdancer'

    bugs.python.org fields:

    activity = <Date 2016-09-10.04:25:34.025>
    actor = 'python-dev'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2016-09-09.23:05:04.098>
    closer = 'r.david.murray'
    components = ['Documentation', 'Library (Lib)', 'email']
    creation = <Date 2014-02-01.22:08:05.645>
    creator = 'r.david.murray'
    dependencies = []
    files = ['33848', '44454']
    hgrepos = []
    issue_num = 20476
    keywords = ['patch']
    message_count = 6.0
    messages = ['209921', '210482', '210483', '274922', '275480', '275563']
    nosy_count = 5.0
    nosy_names = ['barry', 'r.david.murray', 'docs@python', 'python-dev', 'aj guy']
    pr_nums = []
    priority = 'high'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue20476'
    versions = ['Python 3.6']

    Activity

    1. bitdancer commented on Feb 1, 2014

      @bitdancer
      MemberAuthor

      This was part of the design of the new stuff added in 3.4, so it is a bug that it doesn't work...somehow I missed implementing this detail. The full implementation should make this a policy setting, so that a custom policy could specify its own factory. However, since 3.4 is in beta it would be a bad time to add that to the policy.

      The patch proposed here implements the required behavior by hardcoding any non-compat32 policy to use EmailMessage instead of Message in feedparser.

    2. python-dev commented on Feb 7, 2014

      python-devmannequin
      Mannequin

      New changeset 77082b818676 by R David Murray in branch 'default':
      bpo-20476: use EmailMessage as factory if non-compat32 policy is used.
      http://hg.python.org/cpython/rev/77082b818676

    3. bitdancer commented on Feb 7, 2014

      @bitdancer
      MemberAuthor

      I'm leaving this open and changing the version to 3.5 to remind myself to fix this right once default is open for 3.5 changes.

    4. added
      docsDocumentation in the Doc dir
      stdlibStandard Library Python modules in the Lib/ directory
      performancePerformance or resource usage
      and removed
      type-bugAn unexpected behavior, bug, or error
      on Oct 2, 2015
    5. bitdancer commented on Sep 7, 2016

      @bitdancer
      MemberAuthor

      Here's the patch to add the message_factory policy attribute.

    6. python-dev commented on Sep 9, 2016

      python-devmannequin
      Mannequin

      New changeset 9ba8f4be0651 by R David Murray in branch 'default':
      bpo-20476: add a message_factory policy attribute to email.
      https://hg.python.org/cpython/rev/9ba8f4be0651

    7. added
      type-featureA feature request or enhancement
      and removed
      performancePerformance or resource usage
      on Sep 9, 2016
    8. python-dev commented on Sep 10, 2016

      python-devmannequin
      Mannequin

      New changeset 8375b8d54bf7 by R David Murray in branch 'default':
      bpo-20476: Deal with the message_factory circular import differently.
      https://hg.python.org/cpython/rev/8375b8d54bf7

    9. 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

      docsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directorytopic-emailtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions