Skip to content

Missing encoding parameter in urllib/parse.py #76312

Closed

Description

@jmbc
mannequin
BPO 32131
Superseder
  • bpo-30483: urllib.parse.parse_qsl does not handle unicode data properly
  • 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 2018-05-29.12:32:20.484>
    created_at = <Date 2017-11-25.11:48:22.437>
    labels = ['type-crash']
    title = 'Missing encoding parameter in urllib/parse.py'
    updated_at = <Date 2018-05-29.12:32:20.483>
    user = 'https://bugs.python.org/jmbc'

    bugs.python.org fields:

    activity = <Date 2018-05-29.12:32:20.483>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-05-29.12:32:20.484>
    closer = 'cheryl.sabella'
    components = []
    creation = <Date 2017-11-25.11:48:22.437>
    creator = 'jmbc'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32131
    keywords = []
    message_count = 2.0
    messages = ['306953', '306954']
    nosy_count = 1.0
    nosy_names = ['jmbc']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '30483'
    type = 'crash'
    url = 'https://bugs.python.org/issue32131'
    versions = ['Python 3.6']

    Activity

    1. jmbc commented on Nov 25, 2017

      jmbcmannequin
      MannequinAuthor

      Here is the patch, working for me in Python 3.4.2
      610,611c703
      < #~ value = _coerce_result(value)
      < value = _coerce_result(value,encoding=encoding)
      ---

              value = \_coerce_result(value)
      
    2. added
      type-crash
      on Nov 25, 2017
    3. jmbc commented on Nov 25, 2017

      jmbcmannequin
      MannequinAuthor

      Sorry, the description was missing.

      parse.py crashes if provided with unicode data like "voilà" :

      [wsgi:error] [pid 20335] [client 127.0.0.1:44658] UnicodeEncodeError: 'ascii' codec can't encode character '\\xe0' in position 314: ordinal not in range(128)

      The "encoding" parameters looks missing in parse.py, so I included it.

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

      type-crash

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions