Commit 3f5dcfd
committed
feat(core): add breaking changes warning and logging utility
Adds a warning message that displays when using early versions of the AgentRun Python SDK,
informing users about potential breaking changes and recommending dependency pinning.
Also imports necessary os and logger utilities for the warning implementation.
The warning includes both English and Chinese messages and can be disabled via
DISABLE_BREAKING_CHANGES_WARNING environment variable.
This change enhances user experience by providing clear guidance on version management
and helps prevent compatibility issues in production environments.
添加破坏性更改警告和日志工具
添加一个警告消息,在使用 AgentRun Python SDK 的早期版本时显示,
告知用户有关潜在的破坏性更改并推荐依赖版本固定。
同时导入必要的 os 和 logger 工具用于警告实现。
该警告包含英文和中文消息,并可通过 DISABLE_BREAKING_CHANGES_WARNING 环境变量禁用。
此更改通过提供清晰的版本管理指导来增强用户体验,
并帮助防止生产环境中的兼容性问题。
BREAKING CHANGE: adds breaking changes warning that displays on SDK startup
A warning message will now appear when importing the module, which may affect
automated systems that expect clean output. Users can disable this warning
by setting DISABLE_BREAKING_CHANGES_WARNING=1 environment variable.
破坏性更改:在 SDK 启动时添加破坏性更改警告
现在在导入模块时会出现警告消息,这可能会影响期望干净输出的自动化系统。
用户可以通过设置 DISABLE_BREAKING_CHANGES_WARNING=1 环境变量来禁用此警告。
Change-Id: Ieebfcc0dcf6faaf4aaffd20279f0794053b9cf7d
Signed-off-by: OhYee <oyohyee@oyohyee.com>1 parent bbd6b87 commit 3f5dcfd
1 file changed
+23
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
360 | 363 | | |
361 | 364 | | |
362 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
0 commit comments