mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-43916: PyStdPrinter_Type uses Py_TPFLAGS_DISALLOW_INSTANTIATION (GH-25749)
The PyStdPrinter_Type type now uses the Py_TPFLAGS_DISALLOW_INSTANTIATION flag to disallow instantiation, rather than seting a tp_init method which always fail. Write also unit tests for PyStdPrinter_Type.
This commit is contained in:
parent
0cad068ec1
commit
4908fae3d5
3 changed files with 61 additions and 28 deletions
|
@ -3007,7 +3007,7 @@ err_occurred:
|
|||
/* Set up a preliminary stderr printer until we have enough
|
||||
infrastructure for the io module in place.
|
||||
|
||||
Use UTF-8/surrogateescape and ignore EAGAIN errors. */
|
||||
Use UTF-8/backslashreplace and ignore EAGAIN errors. */
|
||||
static PyStatus
|
||||
_PySys_SetPreliminaryStderr(PyObject *sysdict)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue