| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
But the parameter does nonetheless exist on the CPython main branch, no? :) https://github.com/python/cpython/blob/64ed609c532a12b27f67a1e12e9e02f136ee3a94/Lib/http/server.py#L664 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.) |
Sorry, something went wrong.
|
PR changing __init__ has now been merged. :-) |
Sorry, something went wrong.
Ah! I didn't realise there was a pending PR :) |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The index_pages parameter has been removed from __init__ as subclassing is the encouraged method for modifying SimpleHttpRequestHandler.
index_pages should be a tuple of 0 or more strings (not sure I have the type hint correct).