We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fda4b2f commit dc8e1d0Copy full SHA for dc8e1d0
Misc/NEWS.d/next/Library/2022-06-22-11-16-11.gh-issue-94101.V9vDG8.rst
@@ -0,0 +1,3 @@
1
+Manual instantiation of :class:`ssl.SSLSession` objects is no longer allowed
2
+as it lead to misconfigured instances that crashed the interpreter when
3
+attributes where accessed on them.
Modules/_ssl.c
@@ -5067,7 +5067,8 @@ static PyType_Spec PySSLSession_spec = {
5067
.name = "_ssl.SSLSession",
5068
.basicsize = sizeof(PySSLSession),
5069
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
5070
- Py_TPFLAGS_IMMUTABLETYPE),
+ Py_TPFLAGS_IMMUTABLETYPE |
5071
+ Py_TPFLAGS_DISALLOW_INSTANTIATION),
5072
.slots = PySSLSession_slots,
5073
};
5074
0 commit comments