]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43916: PyStdPrinter_Type uses Py_TPFLAGS_DISALLOW_INSTANTIATION (GH-25749)
authorVictor Stinner <vstinner@python.org>
Fri, 30 Apr 2021 12:56:27 +0000 (14:56 +0200)
committerGitHub <noreply@github.com>
Fri, 30 Apr 2021 12:56:27 +0000 (14:56 +0200)
commit4908fae3d57f68694cf006e89fd7761f45003447
treeb4168c26f8bc1017606f2308b34ae8bd1f573999
parent0cad068ec174bbe33fb80460da56eb413f3b9359
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.
Lib/test/test_embed.py
Objects/fileobject.c
Python/sysmodule.c