aws / aws/bedrock-agentcore-sdk-python
Pydantic deprecation warning: Support for class-based `config` is deprecated, use ConfigDict instead
- 主要言語
- Python
- スター
- 761
- フォーク
- 147
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 7
説明
On import of `BedrockAgentCoreApp` a Pydantic deprecation warning occurs, e.g. during `pytest` runs. Besides noise, it is confusing since it is not clear if the issue is in application or Bedrock SDK code.
**To Reproduce**
1. open a python REPL
2. import `BedrockAgentCoreApp`
```
✗ python
Python 3.13.11 (main, Dec 5 2025, 16:06:33) [Clang 17.0.0 (clang-1700.6.3.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Cmd click to launch VS Code Native REPL
>>> import warnings
>>> warnings.simplefilter("always")
>>> from bedrock_agentcore import BedrockAgentCoreApp
[REDACTED]/.venv/lib/python3.13/site-packages/bedrock_agentcore/runtime/context.py:12: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.12/migration/
class RequestContext(BaseModel):
```
**Expected behavior**
No deprecation warning.
**Desktop (please complete the following information):**
- OS: macOS
- Browser n/a
- Version 26.3
**Additional context**
`bedrock-agentcore` Version: 1.4.4
I'm using `pydantic` Version: 2.12.5, as required by `bedrock-agentcore`, `mcp`, `pydantic-settings`, `strands-agents`
コントリビューションガイド
調査の方向性
警告は bedrock_agentcore/runtime/context.py:12 で RequestContext を定義しているときに出力されます。まず、そのクラスと Pydantic の設定を読んでください。ドキュメントに記載された Python REPL の import で再現し、その後、BedrockAgentCoreApp を import しても非推奨警告が出力されなくなったことを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 78/100