-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
update SimpleHTTPRequestHandler #9452
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
Conversation
This comment has been minimized.
This comment has been minimized.
But the parameter does nonetheless exist on the CPython We tend to be descriptive rather than prescriptive in typeshed. If a parameter exists at runtime, we tend to include it in the stub, even if it's not considered great style to use that parameter at runtime. If we do otherwise, people tend to complain loudly at us. It also means we have to switch off some of our tests that check that the stub is consistent with the runtime, and switching off those tests means our stubs become vulnerable to silently growing out of date without us noticing. (You don't see those tests failing on this PR because we haven't switched them on yet for 3.12, since 3.12 is still in development.) |
PR changing |
Ah! I didn't realise there was a pending PR :) |
Maybe we're being a bit early with the 3.12 features here :) We can make this change though now that main has been changed. |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
The
index_pages
parameter has been removed from__init__
as subclassing is the encouraged method for modifyingSimpleHttpRequestHandler
.index_pages
should be a tuple of 0 or more strings (not sure I have the type hint correct).