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

Update urllib quoting to RFC 3986 #60489

Closed
MatteoParrucci mannequin opened this issue Oct 19, 2012 · 6 comments
Closed

Update urllib quoting to RFC 3986 #60489

MatteoParrucci mannequin opened this issue Oct 19, 2012 · 6 comments
Assignees
Labels
3.7 stdlib type-feature

Comments

@MatteoParrucci
Copy link
Mannequin

@MatteoParrucci MatteoParrucci mannequin commented Oct 19, 2012

BPO 16285
Nosy @ncoghlan, @orsenthil, @ezio-melotti, @vadmium, @serhiy-storchaka, @rtnpro
PRs
  • #173
  • #552
  • Files
  • 0be3805cade1.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 = 'https://github.com/ncoghlan'
    closed_at = <Date 2017-02-25.09:00:58.389>
    created_at = <Date 2012-10-19.10:56:08.914>
    labels = ['3.7', 'type-feature', 'library']
    title = 'Update urllib quoting to RFC 3986'
    updated_at = <Date 2017-03-31.16:36:10.920>
    user = 'https://bugs.python.org/MatteoParrucci'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:10.920>
    actor = 'dstufft'
    assignee = 'ncoghlan'
    closed = True
    closed_date = <Date 2017-02-25.09:00:58.389>
    closer = 'ncoghlan'
    components = ['Library (Lib)']
    creation = <Date 2012-10-19.10:56:08.914>
    creator = 'Matteo.Parrucci'
    dependencies = []
    files = ['34950']
    hgrepos = ['241']
    issue_num = 16285
    keywords = ['patch']
    message_count = 6.0
    messages = ['173319', '173327', '216698', '288086', '288122', '290403']
    nosy_count = 10.0
    nosy_names = ['ncoghlan', 'orsenthil', 'ctheune', 'ezio.melotti', 'cvrebert', 'martin.panter', 'piotr.dobrogost', 'serhiy.storchaka', 'Matteo.Parrucci', 'rtnpro']
    pr_nums = ['173', '552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue16285'
    versions = ['Python 3.7']

    @MatteoParrucci
    Copy link
    Mannequin Author

    @MatteoParrucci MatteoParrucci mannequin commented Oct 19, 2012

    RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt) says:

    For consistency, percent-encoded octets in the ranges of ALPHA
    (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E),
    underscore (%5F), or tilde (%7E) should not be created by URI
    producers and, when found in a URI, should be decoded to their
    corresponding unreserved characters by URI normalizers.

    From python documentation talking about urllib.quote()

    Example: quote('/~connolly/') yields '/%7econnolly/'.

    I think ~ should be added to the safe characters of quote function

    @serhiy-storchaka
    Copy link
    Member

    @serhiy-storchaka serhiy-storchaka commented Oct 19, 2012

    Yes, urllib based on RFC 2396, but RFC 3986 obsoletes RFC 2396. Updating to RFC 3986 should be new feature.

    For older versions can not change anything. But you always can use "safe" argument with quote().

    @serhiy-storchaka serhiy-storchaka added the stdlib label Oct 19, 2012
    @serhiy-storchaka serhiy-storchaka changed the title Erroneously encoding tilde to %7e in quote Update urllib to RFC 3986 Oct 19, 2012
    @serhiy-storchaka serhiy-storchaka added the type-feature label Oct 19, 2012
    @ctheune
    Copy link
    Mannequin

    @ctheune ctheune mannequin commented Apr 17, 2014

    I'll update this.

    @ctheune ctheune mannequin changed the title Update urllib to RFC 3986 Update urllib quoting to RFC 3986 Apr 17, 2014
    @rtnpro
    Copy link
    Mannequin

    @rtnpro rtnpro mannequin commented Feb 18, 2017

    I have started to work on this issue and get it merge ready.

    @ncoghlan ncoghlan added the 3.7 label Feb 19, 2017
    @rtnpro
    Copy link
    Mannequin

    @rtnpro rtnpro mannequin commented Feb 19, 2017

    Created a pull request for the attached patch along with update of related docstrings.

    @ncoghlan ncoghlan self-assigned this Feb 25, 2017
    @ncoghlan
    Copy link
    Contributor

    @ncoghlan ncoghlan commented Mar 24, 2017

    New changeset 21024f0 by Nick Coghlan (Ratnadeep Debnath) in branch 'master':
    bpo-16285: Update urllib quoting to RFC 3986 (#173)
    21024f0

    @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
    3.7 stdlib type-feature
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants