Skip to content

Commit 78faddc

Browse files
authored
[sys] Deprecate _enablelegacywindowsfsencoding (#14495)
1 parent 7beac25 commit 78faddc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

stdlib/sys/__init__.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,14 @@ def get_asyncgen_hooks() -> _asyncgen_hooks: ...
454454
def set_asyncgen_hooks(firstiter: _AsyncgenHook = ..., finalizer: _AsyncgenHook = ...) -> None: ...
455455

456456
if sys.platform == "win32":
457-
def _enablelegacywindowsfsencoding() -> None: ...
457+
if sys.version_info >= (3, 13):
458+
@deprecated(
459+
"Deprecated since Python 3.13; will be removed in Python 3.16. "
460+
"Use the `PYTHONLEGACYWINDOWSFSENCODING` environment variable instead."
461+
)
462+
def _enablelegacywindowsfsencoding() -> None: ...
463+
else:
464+
def _enablelegacywindowsfsencoding() -> None: ...
458465

459466
def get_coroutine_origin_tracking_depth() -> int: ...
460467
def set_coroutine_origin_tracking_depth(depth: int) -> None: ...

0 commit comments

Comments
 (0)