Skip to content

Commit

Permalink
pythongh-126455: Disallow _ssl.SSLSocket instantiation (python#126481)
Browse files Browse the repository at this point in the history
Prevent creation of incomplete/invalid _ssl.SSLSocket objects when
created directly.
  • Loading branch information
vstinner authored Nov 6, 2024
1 parent 09d7083 commit b1c4ffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2979,7 +2979,7 @@ static PyType_Spec PySSLSocket_spec = {
.name = "_ssl._SSLSocket",
.basicsize = sizeof(PySSLSocket),
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE |
Py_TPFLAGS_HAVE_GC),
Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_DISALLOW_INSTANTIATION),
.slots = PySSLSocket_slots,
};

Expand Down

0 comments on commit b1c4ffc

Please sign in to comment.