Skip to content

Undeprecate and document urllib.parse.unwrap #79578

Description

@stevendaprano
BPO 35397
Nosy @merwok, @stevendaprano, @serhiy-storchaka, @csabella
PRs
  • bpo-35397: Remove deprecation and document urllib.parse.unwrap #11481
  • bpo-35397: Remove deprecation and document urllib.parse.unwrap #11481
  • bpo-35397: Remove deprecation and document urllib.parse.unwrap #11481
  • 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 2019-05-27.13:48:59.972>
    created_at = <Date 2018-12-03.23:25:50.480>
    labels = ['type-feature', '3.8']
    title = 'Undeprecate and document urllib.parse.unwrap'
    updated_at = <Date 2019-05-27.13:48:59.971>
    user = 'https://github.com/stevendaprano'

    bugs.python.org fields:

    activity = <Date 2019-05-27.13:48:59.971>
    actor = 'cheryl.sabella'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-27.13:48:59.972>
    closer = 'cheryl.sabella'
    components = []
    creation = <Date 2018-12-03.23:25:50.480>
    creator = 'steven.daprano'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35397
    keywords = ['patch', 'patch', 'patch']
    message_count = 4.0
    messages = ['331003', '331945', '343624', '343626']
    nosy_count = 4.0
    nosy_names = ['eric.araujo', 'steven.daprano', 'serhiy.storchaka', 'cheryl.sabella']
    pr_nums = ['11481', '11481', '11481']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue35397'
    versions = ['Python 3.8']

    Activity

    1. stevendaprano commented on Dec 3, 2018

      @stevendaprano
      MemberAuthor

      The urllib.parse module contains an undocumented function unwrap:

      unwrap('<URL:type://host/path>') --> 'type://host/path'
      

      This is useful. I've been re-inventing this function in many of my scripts, because I didn't know it existed (not documented!) and only stumbled across it by accident today, where I see it was deprecated in bpo-27485 but I can't see any reason for the deprecation.

      If not for the deprecation, I would certainly use this unwrap function in preference to rolling my own.

      It seems to me that this might have been a case of an over-enthusiastic change. bpo-27485 talks about deprecating the various split* functions, which are officially redundant (urlparse and urlsplit are preferred) but doesn't talk about unwrap, which is useful and (in my opinion) should have been documented rather than deprecated.

    2. merwok commented on Dec 17, 2018

      @merwok
      Member

      I suspect the only reason was that unwrap was caught in the bag of «undocumented functions (that don‘t seem useful)».

      Personally I think I see more bare URLs than URLs in angle brackets these days, and `URL:` feels like an archaic marker :) But I don’t see any harm in un-deprecating and documenting the function now that you say you would find it useful.

    3. csabella commented on May 27, 2019

      @csabella
      Contributor

      New changeset 674ee12 by Cheryl Sabella (Rémi Lapeyre) in branch 'master':
      bpo-35397: Remove deprecation and document urllib.parse.unwrap (GH-11481)
      674ee12

    4. csabella commented on May 27, 2019

      @csabella
      Contributor

      Thanks for the report and for the patch. :-)

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

      3.8 (EOL)end of lifetype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions