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

fix: toml urls #242

Merged
merged 4 commits into from
Jul 12, 2023
Merged

fix: toml urls #242

merged 4 commits into from
Jul 12, 2023

Conversation

sarakolding
Copy link
Contributor

No description provided.

@MartinBernstorff
Copy link
Collaborator

MartinBernstorff commented Jul 12, 2023

Pydantic 2.0 has formalised their type coercions to better match what we'd like. Specifically, they now convert 120.0 to an int, if we request an int:

image

We were checking if things were an int by using .is_integer(). However, that method does not exist on things that already are integers. That's why we got the errors.

It's also incompatible with autodoc_pydantic, so it's been removed. mansenfranzen/autodoc_pydantic#146

@MartinBernstorff MartinBernstorff merged commit 39b5460 into main Jul 12, 2023
@MartinBernstorff MartinBernstorff deleted the sk/toml-urls branch July 12, 2023 10:38
@mansenfranzen
Copy link

mansenfranzen commented Jul 24, 2023

@MartinBernstorff You can now test the new autodoc_pydantic version supporting pydantic v2 via pip install autodoc_pydantic==2.0.0. The dev docs already showcase v2 support (see here). Migration guide is available here.

Any feedback is more than appreciated. The current autodoc_pydantic version 2.0.0 on pypi remains yanked for one week until final release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants