This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients serhiy.storchaka, vstinner
Date 2020-10-10.13:52:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602337969.0.0.0978301264102.issue41986@roundup.psfhosted.org>
In-reply-to
Content
Python 3.7 defines it in fileobject.h as:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
#endif

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
PyAPI_DATA(int) Py_UTF8Mode;
#endif


Python 3.8 defines them the same way, but in Include/cpython/fileobject.h:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
#endif

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
PyAPI_DATA(int) Py_UTF8Mode;
#endif


I am likely the one who moved these definitions. It was a mistake to move them inside Include/cpython/, since "Py_LIMITED_API+0 >= 0x03070000" became useless: cpython/fileobject.h is only included if Py_LIMITED_API is not defined.

In Include/cpython/, it seems like only 2 definitions are defined the wrong way, Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode.
History
Date User Action Args
2020-10-10 13:52:49vstinnersetrecipients: + vstinner, serhiy.storchaka
2020-10-10 13:52:49vstinnersetmessageid: <1602337969.0.0.0978301264102.issue41986@roundup.psfhosted.org>
2020-10-10 13:52:48vstinnerlinkissue41986 messages
2020-10-10 13:52:48vstinnercreate