mirror of https://github.com/python/cpython
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Fixes #94101 Automerge-Triggered-By: GH:tiran
This commit is contained in:
parent
fda4b2f063
commit
dc8e1d0390
|
@ -0,0 +1,3 @@
|
|||
Manual instantiation of :class:`ssl.SSLSession` objects is no longer allowed
|
||||
as it lead to misconfigured instances that crashed the interpreter when
|
||||
attributes where accessed on them.
|
|
@ -5067,7 +5067,8 @@ static PyType_Spec PySSLSession_spec = {
|
|||
.name = "_ssl.SSLSession",
|
||||
.basicsize = sizeof(PySSLSession),
|
||||
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
|
||||
Py_TPFLAGS_IMMUTABLETYPE),
|
||||
Py_TPFLAGS_IMMUTABLETYPE |
|
||||
Py_TPFLAGS_DISALLOW_INSTANTIATION),
|
||||
.slots = PySSLSession_slots,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue