This was introduced in #10392.
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.