已弃用的 c-element-tree (UP023) 源自 pyupgrade linter。 修复总是可用的。 作用 检查对 xml.etree.cElementTree 模块的使用。 为什么这不好? 在 Python 3.3 中,xml.etree.cElementTree 已被弃用,建议使用 xml.etree.ElementTree。 示例 from xml.etree import cElementTree as ET 建议改为 from xml.etree import ElementTree as ET 参考 Python 文档:xml.etree.ElementTree