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

upgrade to pydantic ^2 #2518

Merged
merged 7 commits into from
Aug 21, 2024
Merged

upgrade to pydantic ^2 #2518

merged 7 commits into from
Aug 21, 2024

Conversation

ITProKyle
Copy link
Collaborator

@ITProKyle ITProKyle commented Aug 20, 2024

Why This Is Needed

  • pydantic ^1 has been in maintenance mode for some time now
  • newer versions of type checkers (e.g. pyright) need fixes that are only available in pydantic ^2
  • resolves Upgrade Pydantic to v2 #2101

What Changed

Added

  • added eval-type-backport as a dependency for python < 3.10
    • enables the use of | syntax in pydantic models

Changed

  • changed pydantic requirement from ^1.4 to ^2.8.0
  • updated pyright to the latest version
  • adjusted type annotations and type guarding logic to pass type checking

Fixed

  • fixed issues with type annotations enabling pyright to be updated to the latest version

Removed

  • removed uses of typing.Option and typing.Union

@ITProKyle ITProKyle added the changelog:minor Minor change resulting in a minor release label Aug 20, 2024
@ITProKyle ITProKyle self-assigned this Aug 20, 2024
@github-actions github-actions bot added feature Request or pull request for a new feature javascript Pull request that updates Javascript code poetry Update to Poetry configuration python Update to Python code labels Aug 20, 2024
@github-actions github-actions bot added the github_actions Update to GitHub Actions label Aug 20, 2024
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 96.20991% with 52 lines in your changes missing coverage. Please review.

Project coverage is 90.17%. Comparing base (2c00768) to head (bb4786e).
Report is 1 commits behind head on master.

Files Patch % Lines
runway/cfngin/hooks/staticsite/build_staticsite.py 0.00% 10 Missing ⚠️
...gin/hooks/staticsite/auth_at_edge/lambda_config.py 0.00% 7 Missing ⚠️
.../staticsite/auth_at_edge/callback_url_retriever.py 0.00% 6 Missing ⚠️
runway/blueprints/staticsite/staticsite.py 0.00% 5 Missing ⚠️
...in/hooks/staticsite/auth_at_edge/client_updater.py 0.00% 5 Missing ⚠️
runway/blueprints/staticsite/auth_at_edge.py 0.00% 2 Missing ⚠️
runway/blueprints/staticsite/dependencies.py 0.00% 2 Missing ⚠️
runway/cfngin/blueprints/testutil.py 0.00% 2 Missing ⚠️
...in/hooks/staticsite/auth_at_edge/domain_updater.py 0.00% 2 Missing ⚠️
runway/s3_utils.py 0.00% 2 Missing ⚠️
... and 9 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2518      +/-   ##
==========================================
+ Coverage   90.15%   90.17%   +0.01%     
==========================================
  Files         247      256       +9     
  Lines       15610    15650      +40     
==========================================
+ Hits        14073    14112      +39     
- Misses       1537     1538       +1     
Files Coverage Δ
runway/_cli/commands/_gen_sample/_k8s_cfn_repo.py 100.00% <100.00%> (ø)
runway/_cli/commands/_gen_sample/utils.py 100.00% <100.00%> (ø)
runway/_cli/commands/_schema/_cfngin.py 100.00% <100.00%> (ø)
runway/_cli/commands/_schema/_runway.py 100.00% <100.00%> (ø)
runway/_cli/commands/_tfenv/_uninstall.py 100.00% <100.00%> (ø)
runway/cfngin/actions/deploy.py 85.29% <100.00%> (ø)
runway/cfngin/actions/diff.py 81.48% <100.00%> (ø)
runway/cfngin/blueprints/base.py 100.00% <100.00%> (ø)
runway/cfngin/blueprints/cfngin_bucket.py 100.00% <100.00%> (ø)
runway/cfngin/blueprints/raw.py 98.86% <100.00%> (ø)
... and 137 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@ITProKyle ITProKyle marked this pull request as ready for review August 20, 2024 15:50
@sam-fakhreddine sam-fakhreddine merged commit 297a3a1 into master Aug 21, 2024
24 checks passed
@ITProKyle ITProKyle deleted the feat/pydantic branch August 21, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:minor Minor change resulting in a minor release feature Request or pull request for a new feature github_actions Update to GitHub Actions javascript Pull request that updates Javascript code poetry Update to Poetry configuration python Update to Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Pydantic to v2
2 participants