GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — http: improve types by JelleZijlstra · Pull Request #9055 · python/typeshed Conversation
This comment has been minimized.
srittau
requested changes
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
def request(self, method, url, body=None, headers={}, *, encode_chunked=False): """Send a complete request to the server.""" self._send_request(method, url, body, headers, encode_chunked) def _send_request(self, method, url, body, headers, encode_chunked): # ... # It also gets passed to _get_content_length(), which also supports str # ... if isinstance(body, str): # RFC 2616 Section 3.7.1 says that text default has a # default charset of iso-8859-1. body = _encode(body, 'body') self.endheaders(body, encode_chunked=encode_chunked) I think the best solution is just to add
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Comment on lines
+57
to
+59
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As
Suggested change
(directory is also passed to os.fspath() in later version (but not 3.7), but that's out of scope for this PR, since it needs overloads.)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The stub currently implies that the index_pages parameter has been removed in 3.12. Actually, it was only added in 3.12 :) See python/cpython#31985. (This is a follow-up to #9055 — cc. @JelleZijlstra.)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.