Skip to content

Improving signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ #127734

Closed
@tungol

Description

@tungol

Feature or enhancement

Proposal:

urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ (link) has (self, *args, **kwargs), but the args are just passed through to super, and the superclass for HTTPPasswordMgrWithPriorAuth takes no arguments. The passthrough doesn't serve a purpose and it muddies introspection of the method. I'd like to update urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ to have no arguments, so that signature introspection is more accurate. Currently, typeshed needs to have urllib.request.HTTPPasswordMgrWithPriorAuth.__init__ on its allowlist for stubtest errors as a result of the poor introspection.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions