2022-02-04 14:37:02 +01:00
|
|
|
"""Deprecated - New code should avoid these"""
|
2023-07-22 14:26:53 +02:00
|
|
|
import warnings
|
|
|
|
|
|
|
|
from .compat_utils import passthrough_module
|
|
|
|
|
|
|
|
# XXX: Implement this the same way as other DeprecationWarnings without circular import
|
|
|
|
passthrough_module(__name__, '.._legacy', callback=lambda attr: warnings.warn(
|
|
|
|
DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=6))
|
|
|
|
del passthrough_module
|
2022-02-04 14:37:02 +01:00
|
|
|
|
2024-11-17 00:24:11 +01:00
|
|
|
import functools # noqa: F401
|
|
|
|
import os
|
2022-06-24 10:10:17 +02:00
|
|
|
|
2022-02-04 14:37:02 +01:00
|
|
|
|
2024-11-17 00:24:11 +01:00
|
|
|
compat_os_name = os.name
|
|
|
|
compat_realpath = os.path.realpath
|
2022-06-24 10:10:17 +02:00
|
|
|
|
2024-11-17 00:24:11 +01:00
|
|
|
|
|
|
|
def compat_shlex_quote(s):
|
|
|
|
from ..utils import shell_quote
|
|
|
|
return shell_quote(s)
|