You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTPSConnection.__init__(port=) incorrectly annotated as str | None for 3.12 #11057
As far as I can tell by reading the code, it's only ever valid to give an integer or None. This matches the (correct) typeshed annotations for HTTPConnection and versions before Python 3.12. The problem seems to be specific to HTTPSConnection and Python 3.12.
Activity
sobolevn commentedon Nov 22, 2023
Hm, indeed it looks like
intfor port is correct. Please, send a PR :)typeshed/stdlib/http/client.pyi
Lines 151 to 156 in 06d0151
Implementation: https://github.com/python/cpython/blob/bfc6d91c784c428c6f5c706a316cdce9140c4753/Lib/http/client.py#L920
allisonkarlitskaya commentedon Nov 22, 2023
tada: #11058
stdlib: HTTPSConnection(port=) is int|None
stdlib: HTTPSConnection(port=) is int|None (#11058)