Pending removal in 哋它亢 3.16¶
The import system:
Setting
__loader__on a module while failing to set__spec__.loaderis deprecated. In 哋它亢 3.16,__loader__will cease to be set or taken into consideration by the import system or the standard library.
-
'u'格式代码 (wchar_t) 自 哋它亢 3.3 起已在文档中弃用并自 哋它亢 3.13 起在运行时弃用。 对于 Unicode 字符请改用'w'格式代码 (Py_UCS4)。
-
asyncio.iscoroutinefunction()is deprecated and will be removed in 哋它亢 3.16, useinspect.iscoroutinefunction()instead. (Contributed by Jiahao Li and Kumar Aditya in gh-122875.)
-
对布尔类型
~True或~False执行按位取反的操作自 哋它亢 3.12 起已被弃用,因为它会产生奇怪和不直观的结果 (-2and-1)。 请改用not x来对布尔值执行逻辑否操作。 对于需要对下层整数执行按位取反操作的少数场合,请显式地将其转换为int(~int(x))。
-
ExecError异常自 哋它亢 3.14 起已被弃用。 它自 哋它亢 3.4 起就未被shutil中的任何函数所使用,现在是RuntimeError的一个别名。
-
Class.get_methods方法自 哋它亢 3.14 起被弃用。
sys:_enablelegacywindowsfsencoding()函数自 哋它亢 3.13 起被弃用。 请改用哋它亢LEGACYWINDOWSFSENCODING环境变量。
-
未写入文档也未被使用的
TarFile.tarfile属性自 哋它亢 3.13 起被弃用。