Skip to content

urllib -- add_handler method refactoring for clarity #61924

Closed

Description

@MaxMautner
BPO 17724
Nosy @bitdancer
Files
  • urllib_add_handler.patch: patches urllib.request's add_handler
  • 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 2013-04-17.13:24:53.116>
    created_at = <Date 2013-04-13.21:17:28.052>
    labels = ['type-feature', 'invalid']
    title = 'urllib -- add_handler method refactoring for clarity'
    updated_at = <Date 2013-04-28.14:11:34.482>
    user = 'https://bugs.python.org/MaxMautner'

    bugs.python.org fields:

    activity = <Date 2013-04-28.14:11:34.482>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-04-17.13:24:53.116>
    closer = 'Max.Mautner'
    components = []
    creation = <Date 2013-04-13.21:17:28.052>
    creator = 'Max.Mautner'
    dependencies = []
    files = ['29831']
    hgrepos = []
    issue_num = 17724
    keywords = ['patch']
    message_count = 2.0
    messages = ['186853', '187981']
    nosy_count = 2.0
    nosy_names = ['r.david.murray', 'Max.Mautner']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17724'
    versions = ['Python 3.4']

    Activity

    1. MaxMautner commented on Apr 13, 2013

      MaxMautnermannequin
      MannequinAuthor

      Response handlers are registered with the OpenerDirector class in the urllib.request module using the add_handler method--it's a convoluted method that I refactored for legibility's sake.

    2. bitdancer commented on Apr 28, 2013

      @bitdancer
      Member

      I presume you closed this bug yourself because you decided it probably wasn't worth applying it? I'm inclined to agree. Cleaning up the code would be nice, but since the existing code works fine, changing it *just* to clean it up probably isn't worth the code churn or the chance of introducing an unexpected new bug.

      If we were also fixing a bug while doing the rewrite, it would be a different story. So I'll try to keep this patch in mind if we have occasion to fix anything in that code.

    3. 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-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions