mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
gh-90102: Remove isatty call during regular open (#124922)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
6e3c70c61b
commit
cc9b9bebb2
9 changed files with 47 additions and 5 deletions
|
@ -757,6 +757,7 @@ _PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) {
|
|||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_initializing));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_io));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_is_text_encoding));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_isatty_open_only));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_length_));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_limbo));
|
||||
_PyStaticObject_CheckRefcnt((PyObject *)&_Py_ID(_lock_unlock_module));
|
||||
|
|
|
@ -246,6 +246,7 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(_initializing)
|
||||
STRUCT_FOR_ID(_io)
|
||||
STRUCT_FOR_ID(_is_text_encoding)
|
||||
STRUCT_FOR_ID(_isatty_open_only)
|
||||
STRUCT_FOR_ID(_length_)
|
||||
STRUCT_FOR_ID(_limbo)
|
||||
STRUCT_FOR_ID(_lock_unlock_module)
|
||||
|
|
1
Include/internal/pycore_runtime_init_generated.h
generated
1
Include/internal/pycore_runtime_init_generated.h
generated
|
@ -755,6 +755,7 @@ extern "C" {
|
|||
INIT_ID(_initializing), \
|
||||
INIT_ID(_io), \
|
||||
INIT_ID(_is_text_encoding), \
|
||||
INIT_ID(_isatty_open_only), \
|
||||
INIT_ID(_length_), \
|
||||
INIT_ID(_limbo), \
|
||||
INIT_ID(_lock_unlock_module), \
|
||||
|
|
|
@ -784,6 +784,10 @@ _PyUnicode_InitStaticStrings(PyInterpreterState *interp) {
|
|||
_PyUnicode_InternStatic(interp, &string);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
assert(PyUnicode_GET_LENGTH(string) != 1);
|
||||
string = &_Py_ID(_isatty_open_only);
|
||||
_PyUnicode_InternStatic(interp, &string);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
assert(PyUnicode_GET_LENGTH(string) != 1);
|
||||
string = &_Py_ID(_length_);
|
||||
_PyUnicode_InternStatic(interp, &string);
|
||||
assert(_PyUnicode_CheckConsistency(string, 1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue