Closed Be3y4uu-K0T closed 1 year ago
aiogram использует pydantic>=2.1.1,<3; в документации pydantic сказано, что class Config устарел: Before v2.0, the Config class was used. This is still supported, but deprecated. [docs]
Before v2.0, the Config class was used. This is still supported, but deprecated.
https://github.com/MasterGroosha/aiogram-3-guide/blob/9919c10e34d1cd3c3d12825cc2b1b1e807a3ff40/book_src/quickstart.md?plain=1#L273-L278
Надо использовать: [docs]
from pydantic_settings import BaseSettings, SettingsConfigDict from pydantic import SecretStr class Settings(BaseSettings): model_config = SettingsConfigDict(env_file='.env', env_file_encoding='utf-8') bot_token: SecretStr
Упс, проглядел, исправлю
Исправлено в 1a67d735c054164f0547373f47b693fe3062ec3e
aiogram использует pydantic>=2.1.1,<3; в документации pydantic сказано, что class Config устарел:
Before v2.0, the Config class was used. This is still supported, but deprecated.
[docs]https://github.com/MasterGroosha/aiogram-3-guide/blob/9919c10e34d1cd3c3d12825cc2b1b1e807a3ff40/book_src/quickstart.md?plain=1#L273-L278
Надо использовать: [docs]