aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2023-12-28 17:31:19 +0900
committerGitHub <noreply@github.com>2023-12-28 17:31:19 +0900
commitbfee2f77e16f01a718c1044564ee624f1f2bc328 (patch)
tree32eb86065b384b9920a753cedc3d48ef97328014 /Python/sysmodule.c
parent7ab9efdd6a2fb21cddca1ccd70175f1ac6bd9168 (diff)
downloadcpython-bfee2f77e16f01a718c1044564ee624f1f2bc328.tar.gz
cpython-bfee2f77e16f01a718c1044564ee624f1f2bc328.zip
gh-73427: deprecate `_enablelegacywindowsfsencoding` (#107729)
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 57dc4a1226c..c2de4ecdc8c 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1715,6 +1715,13 @@ static PyObject *
sys__enablelegacywindowsfsencoding_impl(PyObject *module)
/*[clinic end generated code: output=f5c3855b45e24fe9 input=2bfa931a20704492]*/
{
+ if (PyErr_WarnEx(PyExc_DeprecationWarning,
+ "sys._enablelegacywindowsfsencoding() is deprecated and will be "
+ "removed in Python 3.16. Use PYTHONLEGACYWINDOWSFSENCODING "
+ "instead.", 1))
+ {
+ return NULL;
+ }
if (_PyUnicode_EnableLegacyWindowsFSEncoding() < 0) {
return NULL;
}