|
|
@ -8,14 +8,8 @@ from ._deprecated import * # noqa: F401, F403
|
|
|
|
from .compat_utils import passthrough_module
|
|
|
|
from .compat_utils import passthrough_module
|
|
|
|
|
|
|
|
|
|
|
|
# XXX: Implement this the same way as other DeprecationWarnings without circular import
|
|
|
|
# XXX: Implement this the same way as other DeprecationWarnings without circular import
|
|
|
|
try:
|
|
|
|
|
|
|
|
passthrough_module(__name__, '._legacy', callback=lambda attr: warnings.warn(
|
|
|
|
passthrough_module(__name__, '._legacy', callback=lambda attr: warnings.warn(
|
|
|
|
DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=2))
|
|
|
|
DeprecationWarning(f'{__name__}.{attr} is deprecated'), stacklevel=2))
|
|
|
|
HAS_LEGACY = True
|
|
|
|
|
|
|
|
except ModuleNotFoundError:
|
|
|
|
|
|
|
|
# Keep working even without _legacy module
|
|
|
|
|
|
|
|
HAS_LEGACY = False
|
|
|
|
|
|
|
|
del passthrough_module
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# HTMLParseError has been deprecated in Python 3.3 and removed in
|
|
|
|
# HTMLParseError has been deprecated in Python 3.3 and removed in
|
|
|
@ -76,3 +70,9 @@ if compat_os_name in ('nt', 'ce'):
|
|
|
|
return userhome + path[i:]
|
|
|
|
return userhome + path[i:]
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
compat_expanduser = os.path.expanduser
|
|
|
|
compat_expanduser = os.path.expanduser
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# NB: Add modules that are imported dynamically here so that PyInstaller can find them
|
|
|
|
|
|
|
|
# See https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/438
|
|
|
|
|
|
|
|
if False:
|
|
|
|
|
|
|
|
from . import _legacy # noqa: F401
|
|
|
|