Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stdlib/ssl.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,14 @@ ALERT_DESCRIPTION_UNSUPPORTED_CERTIFICATE: AlertDescription
ALERT_DESCRIPTION_UNSUPPORTED_EXTENSION: AlertDescription
ALERT_DESCRIPTION_USER_CANCELLED: AlertDescription

class _ASN1Object(NamedTuple):
class _ASN1ObjectBase(NamedTuple):
nid: int
shortname: str
longname: str
oid: str

class _ASN1Object(_ASN1ObjectBase):
def __new__(cls, oid: str) -> Self: ...
@classmethod
def fromnid(cls, nid: int) -> Self: ...
@classmethod
Expand Down
3 changes: 1 addition & 2 deletions tests/stubtest_allowlists/py3_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ socketserver.BaseServer.RequestHandlerClass # is defined as a property, because
socketserver.BaseServer.fileno # implemented in derived classes
socketserver.BaseServer.get_request # implemented in derived classes
socketserver.BaseServer.server_bind # implemented in derived classes
ssl.Purpose.__new__ # You cannot override __new__ in NamedTuple and runtime uses namedtuple.
ssl._ASN1Object.__new__ # You cannot override __new__ in NamedTuple and runtime uses namedtuple.
ssl.Purpose.__new__ # the multiple inheritance confuses mypy
(sys.get_int_max_str_digits)? # Added in a patch release, backported to all security branches, but has yet to find its way to all GitHub Actions images
sys.implementation # Actually SimpleNamespace but then you wouldn't have convenient attributes
(sys.set_int_max_str_digits)? # Added in a patch release, backported to all security branches, but has yet to find its way to all GitHub Actions images
Expand Down