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

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

Closed
bitdancer opened this issue Feb 1, 2014 · 6 comments
Labels
docs Documentation in the Doc dir expert-email stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@bitdancer
Copy link
Member

bitdancer commented Feb 1, 2014

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']

    @bitdancer
    Copy link
    Member Author

    bitdancer commented Feb 1, 2014

    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.

    @bitdancer bitdancer added type-bug An unexpected behavior, bug, or error expert-email labels Feb 1, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Feb 7, 2014

    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

    @bitdancer
    Copy link
    Member Author

    bitdancer commented Feb 7, 2014

    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.

    @ajguy ajguy mannequin added docs Documentation in the Doc dir stdlib Python modules in the Lib dir performance Performance or resource usage and removed type-bug An unexpected behavior, bug, or error labels Oct 2, 2015
    @ajguy ajguy mannequin assigned docspython Oct 2, 2015
    @bitdancer
    Copy link
    Member Author

    bitdancer commented Sep 7, 2016

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

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 9, 2016

    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

    @bitdancer bitdancer added type-feature A feature request or enhancement and removed performance Performance or resource usage labels Sep 9, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 10, 2016

    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

    @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
    docs Documentation in the Doc dir expert-email stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant