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

email/quoprimime.py doesn't use re.sub correctly #62580

Closed
umi mannequin opened this issue Jul 6, 2013 · 4 comments
Closed

email/quoprimime.py doesn't use re.sub correctly #62580

umi mannequin opened this issue Jul 6, 2013 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir topic-email topic-regex type-bug An unexpected behavior, bug, or error

Comments

@umi
Copy link
Mannequin

umi mannequin commented Jul 6, 2013

BPO 18380
Nosy @warsaw, @ezio-melotti, @bitdancer
Files
  • patch_18380: Fix the call to re.sub to pass flags as a positional argument + test
  • 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 = 'https://github.com/ezio-melotti'
    closed_at = <Date 2013-07-06.15:19:26.106>
    created_at = <Date 2013-07-06.12:32:48.411>
    labels = ['expert-regex', 'type-bug', 'library', 'expert-email']
    title = "email/quoprimime.py doesn't use re.sub correctly"
    updated_at = <Date 2013-07-06.15:19:26.105>
    user = 'https://bugs.python.org/umi'

    bugs.python.org fields:

    activity = <Date 2013-07-06.15:19:26.105>
    actor = 'ezio.melotti'
    assignee = 'ezio.melotti'
    closed = True
    closed_date = <Date 2013-07-06.15:19:26.106>
    closer = 'ezio.melotti'
    components = ['Library (Lib)', 'Regular Expressions', 'email']
    creation = <Date 2013-07-06.12:32:48.411>
    creator = 'umi'
    dependencies = []
    files = ['30819']
    hgrepos = []
    issue_num = 18380
    keywords = []
    message_count = 4.0
    messages = ['192428', '192448', '192451', '192452']
    nosy_count = 6.0
    nosy_names = ['barry', 'ezio.melotti', 'mrabarnett', 'r.david.murray', 'python-dev', 'umi']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue18380'
    versions = ['Python 3.3', 'Python 3.4']

    @umi
    Copy link
    Mannequin Author

    umi mannequin commented Jul 6, 2013

    header_decode function in the standard library email/quoprimime.py module calls re.sub with a positional argument for flags in the wrong position. My patch fixes it to use a keyword argument.

    @umi umi mannequin added stdlib Python modules in the Lib dir topic-regex topic-email type-bug An unexpected behavior, bug, or error labels Jul 6, 2013
    @umi
    Copy link
    Mannequin Author

    umi mannequin commented Jul 6, 2013

    I have updated the patch with a testcase.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 6, 2013

    New changeset c8fd1351c840 by Ezio Melotti in branch '3.3':
    bpo-18380: pass regex flags to the right argument. Patch by Valentina Mukhamedzhanova.
    http://hg.python.org/cpython/rev/c8fd1351c840

    New changeset 6e23ce14c3c6 by Ezio Melotti in branch 'default':
    bpo-18380: merge with 3.3.
    http://hg.python.org/cpython/rev/6e23ce14c3c6

    @ezio-melotti
    Copy link
    Member

    Fixed, thanks for the patch!

    @ezio-melotti ezio-melotti self-assigned this Jul 6, 2013
    @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
    stdlib Python modules in the Lib dir topic-email topic-regex type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant