For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /developers/blog/2023-12-19-constant-deprecation.md.

已弃用的常量会产生日志条目

近年来,许多常量通过添加指向其替代项的代码注释,被 Enum 或其他值所取代。 现在使用已弃用的常量将生成一条警告日志条目,其中包含使用的集成、替代项以及该常量将从 core 中移除的版本。 将有一年的弃用期,以确保所有自定义集成作者有时间进行调整。

大多数常量应该已经被替换了,因为过去我们发布了多篇关于其弃用的博客文章。部分列于下方:

更多详情可在 core PR #105736 中找到,或者通过查看弃用 helper 中 check_if_deprecated_constant 函数的使用情况。