Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: 兼容 pydantic v2 #2454

Closed
uf-fipper opened this issue Nov 9, 2023 · 5 comments · Fixed by #2544
Closed

Feature: 兼容 pydantic v2 #2454

uf-fipper opened this issue Nov 9, 2023 · 5 comments · Fixed by #2544
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@uf-fipper
Copy link

希望能解决的问题

pydantic已经升级到v2版本,包括了一些更实用的功能,希望能在nonebot中用到

描述所需要的功能

兼容pydantic v2

@uf-fipper uf-fipper added the enhancement New feature or request label Nov 9, 2023
Copy link
Member

目前由于pydantic-settings的问题无法同时兼容pyd v1和v2

@RF-Tar-Railt
Copy link
Member

首先一点,nonebot2的内部大量依赖pydantic v1的功能,切换到v2将会造成巨大的破坏性改动
其次,nb周边,包括几乎所有适配器,与巨量的跟随nb使用pydantic v1的插件将同样收到波及。这会是一个巨量的任务
所以来说,迁移到v2,近期推动不了,也无法实现。
你可以等待nonebot的下一个大版本

@RF-Tar-Railt RF-Tar-Railt added help wanted Extra attention is needed Breaking Breaking change and removed enhancement New feature or request labels Nov 9, 2023
@RF-Tar-Railt RF-Tar-Railt pinned this issue Nov 9, 2023
@RF-Tar-Railt RF-Tar-Railt closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2023
@yanyongyu
Copy link
Member

v1和v2同时兼容都好说,主要问题在pydantic settings没法依赖

@uf-fipper
Copy link
Author

好吧,感谢大佬

@yanyongyu yanyongyu reopened this Jan 15, 2024
@yanyongyu yanyongyu added enhancement New feature or request and removed Breaking Breaking change labels Jan 15, 2024
@yanyongyu
Copy link
Member

已于 #2521 移除 pydantic-settings ,可以开始考虑兼容 pyd v2

@yanyongyu yanyongyu changed the title Feature: 考虑兼容pydantic v2吗? Feature: 兼容 pydantic v2 Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Development

Successfully merging a pull request may close this issue.

3 participants