From 4908fae3d57f68694cf006e89fd7761f45003447 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 30 Apr 2021 14:56:27 +0200 Subject: 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. --- Python/sysmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 36297ff82e..2190bbf37f 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -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) { -- cgit v1.2.1