-
Notifications
You must be signed in to change notification settings - Fork 27
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
pydantic v2 #160
Merged
mansenfranzen
merged 42 commits into
mansenfranzen:main-2.x
from
Extrality:aw/pydantic-v2
Jul 22, 2023
Merged
pydantic v2 #160
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
b56fe0a
update pydantic dep
awoimbee ffd7fbb
poetry lock
awoimbee 6785aa6
up sphinx default to 4
awoimbee 40111d7
poetry lock
awoimbee ecf9486
pyproject: add pydantic-settings
awoimbee 84d3493
ock
awoimbee cb9c3d8
pydantic v2 early compat
awoimbee caa1401
no import error, limited warnings
awoimbee 786b84b
more tests passing
awoimbee c22c76d
Remove poetry.lock
0582abe
Order of constraints is now alphabetical in v2.
b7e02fd
Fix ignore additional kwargs in Field for v2.
c905902
Adapt to changed behavior of optional/required field values.
2233774
Add `Optional[int]` as required field in v2.
9a90075
Change `None` to `PydanticUndefined` to due changed semantics in v2.
869c382
Respect order of parameters in `ConfigDict`.
0e744dc
Adjust tests to account for removed config member.
a860b59
Adjust docs to account for removed config documenter.
2fb22f9
Adjust to modified bound->unbound reused validators in v2.
a458bde
Simplify `ValidatorAdapter` & `ValidatorInspector`. Simplify reused v…
3584ae0
`ConfigInspector` remains mandatory for `ModelDocumenter`.
998d9d7
Adjust for removed config documenter.
e5774ce
Replace `root_validators` with `model_validators` in v2.
62ba8a0
Remove config directive tests in v2.
aede571
Support fetching constraints in v2.
12c1cac
Adjust serializability checks for v2.
48744cd
Adjust tests for v2 and account for removed config documenter.
7f17e40
Further test adjustments to account for better field serializability …
e341207
Adjust model config retrieval to work with modified `BaseSettings` in…
476f842
Fix generics example for v2.
b07222e
Remove obsolete test cases.
7178e9f
Adjust constraint keys to varying levels of nesting.
0f81c1a
Fix imports for v2 compatibility.
d57cfd4
Update test matrix for latest features versions.
1ab16b3
Fix sphinx version dependant type annotation.
71ccfc7
Remove erdantic version number from test.
1c04090
Allow python 3.7.1. Bump version to 2.0.0.
19ba844
Add separate test for JSON warning/coerce.
ff6b73d
Catch `PydanticInvalidForJsonSchema` in v2.
881f50f
Move schema generation after error checks.
17ea809
Remove reference to config documenter.
d6ef69f
Bump version - ci skip.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "autodoc_pydantic" | ||
version = "1.9.0" | ||
version = "2.0.0" | ||
description = "Seamlessly integrate pydantic models in your Sphinx documentation." | ||
authors = ["mansenfranzen <[email protected]>"] | ||
packages = [{ include = "sphinxcontrib" }] | ||
|
@@ -19,8 +19,9 @@ include = ["sphinxcontrib/autodoc_pydantic/css/autodoc_pydantic.css"] | |
|
||
[tool.poetry.dependencies] | ||
python = ">=3.7.1,<4.0.0" | ||
Sphinx = ">=3.4" | ||
pydantic = ">=1.5,<2.0.0" | ||
Sphinx = ">=4.0" | ||
pydantic = ">=2.0,<3.0.0" | ||
pydantic-settings = ">=2.0,<3.0.0" | ||
|
||
sphinx-rtd-theme = { version = "^1.0", optional = true } | ||
sphinx-tabs = { version = "^3", optional = true } | ||
|
@@ -30,7 +31,7 @@ pytest = {version = "^7", optional = true } | |
coverage = { version ="^7", optional = true } | ||
flake8 = { version = "^3", optional = true } | ||
tox = { version ="^3", optional = true } | ||
erdantic= { version ="^0.5", optional = true } | ||
erdantic = { version ="^0.6", optional = true } | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root validator is deprecated