Skip to content

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

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

Closed
tungol opened this issue Dec 8, 2024 · 0 comments
Closed
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@tungol
Copy link
Contributor

tungol commented Dec 8, 2024

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

@tungol tungol added the type-feature A feature request or enhancement label Dec 8, 2024
orsenthil pushed a commit that referenced this issue Dec 8, 2024
…iorAuth.__init__` (#127735)

improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 8, 2024
…WithPriorAuth.__init__` (pythonGH-127735)

improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
(cherry picked from commit a03efb5)

Co-authored-by: Stephen Morton <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Dec 8, 2024
…WithPriorAuth.__init__` (pythonGH-127735)

improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
(cherry picked from commit a03efb5)

Co-authored-by: Stephen Morton <[email protected]>
@picnixz picnixz added the stdlib Python modules in the Lib dir label Dec 8, 2024
orsenthil pushed a commit that referenced this issue Dec 8, 2024
…rWithPriorAuth.__init__` (GH-127735) (#127744)

gh-127734: improve signature of `urllib.request.HTTPPasswordMgrWithPriorAuth.__init__` (GH-127735)

improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
(cherry picked from commit a03efb5)

Co-authored-by: Stephen Morton <[email protected]>
orsenthil pushed a commit that referenced this issue Dec 8, 2024
…rWithPriorAuth.__init__` (GH-127735) (#127745)

gh-127734: improve signature of `urllib.request.HTTPPasswordMgrWithPriorAuth.__init__` (GH-127735)

improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
(cherry picked from commit a03efb5)

Co-authored-by: Stephen Morton <[email protected]>
@tungol tungol closed this as completed Dec 8, 2024
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Jan 8, 2025
…WithPriorAuth.__init__` (python#127735)

improve signature of urllib.request.HTTPPasswordMgrWithPriorAuth.__init__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants