Skip to content

Comments

Bump pydantic to 1.9+#153

Merged
JacobHayes merged 8 commits intogoldenfrom
bump-pydantic
Jan 7, 2022
Merged

Bump pydantic to 1.9+#153
JacobHayes merged 8 commits intogoldenfrom
bump-pydantic

Conversation

@JacobHayes
Copy link
Member

Upgrade pydantic to the 1.9.0 release. 1.9.0 includes support for using a interface/base class as a type hint and assigning subclasses without requiring a new the type hint. This reduces stutter when defining Artifact subclasses (eg: type = Int64() instead of type: Type = Int64() or type: Int64 = Int64()).

It also includes a few things we have patched locally (thus we can remove):

  • hiding fields from model repr
  • using dict subclasses, such as a frozendict to preserve immutability/hashability

@JacobHayes JacobHayes self-assigned this Jan 7, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2022

Codecov Report

Merging #153 (4b9486c) into golden (b96bf80) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            golden      #153   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           35        35           
  Lines         2176      2170    -6     
  Branches       476       476           
=========================================
- Hits          2176      2170    -6     
Impacted Files Coverage Δ
src/arti/backends/memory.py 100.00% <ø> (ø)
src/arti/internal/patches.py 100.00% <ø> (ø)
src/arti/internal/utils.py 100.00% <ø> (ø)
src/arti/internal/models.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b96bf80...4b9486c. Read the comment docs.

@JacobHayes JacobHayes merged commit e80e394 into golden Jan 7, 2022
@JacobHayes JacobHayes deleted the bump-pydantic branch January 7, 2022 21:43
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.

2 participants