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

Add a policy argument to email.mime.MIMEBase #71518

Closed
berkerpeksag opened this issue Jun 16, 2016 · 5 comments
Closed

Add a policy argument to email.mime.MIMEBase #71518

berkerpeksag opened this issue Jun 16, 2016 · 5 comments
Labels
topic-email type-feature A feature request or enhancement

Comments

@berkerpeksag
Copy link
Member

BPO 27331
Nosy @warsaw, @bitdancer, @berkerpeksag
Files
  • mimebase_policy.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-07.20:50:47.963>
    created_at = <Date 2016-06-16.10:40:47.437>
    labels = ['type-feature', 'expert-email']
    title = 'Add a policy argument to email.mime.MIMEBase'
    updated_at = <Date 2016-09-07.20:50:47.961>
    user = 'https://github.com/berkerpeksag'

    bugs.python.org fields:

    activity = <Date 2016-09-07.20:50:47.961>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-09-07.20:50:47.963>
    closer = 'r.david.murray'
    components = ['email']
    creation = <Date 2016-06-16.10:40:47.437>
    creator = 'berker.peksag'
    dependencies = []
    files = ['43409']
    hgrepos = []
    issue_num = 27331
    keywords = ['patch']
    message_count = 5.0
    messages = ['268653', '274880', '274882', '274883', '274886']
    nosy_count = 4.0
    nosy_names = ['barry', 'r.david.murray', 'python-dev', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue27331'
    versions = ['Python 3.6']

    @berkerpeksag
    Copy link
    Member Author

    Quoting Barry's message msg268430 from bpo-10839:

    On Jun 13, 2016, at 06:38 AM, Berker Peksag wrote:
    
    >I don't know if it's a good idea or API but can we add a 'policy' keyword
    >argument to email.mime.base.MIMEBase? Right now, this is the only way to
    >change the default policy without using high level functions like
    >email.message_from_string():
    >
    >    m = MIMEMultipart()
    >    m.policy = email.policy.default
    
    I think we just need to plumb a `policy` argument through to the ultimate base
    class, email.message.Message
    

    @berkerpeksag berkerpeksag added topic-email type-feature A feature request or enhancement labels Jun 16, 2016
    @bitdancer
    Copy link
    Member

    I'm going to commit this, but leave the issue open for someone to provide tests.

    @bitdancer
    Copy link
    Member

    Sorry, I must have mispaged or something and missed the tests on the first readthrough.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 7, 2016

    New changeset 481d14cb7595 by R David Murray in branch 'default':
    bpo-27331: add policy keyword argument to all MIME subclasses.
    https://hg.python.org/cpython/rev/481d14cb7595

    @bitdancer
    Copy link
    Member

    Thanks, Berker.

    @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
    topic-email type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants