-
Notifications
You must be signed in to change notification settings - Fork 0
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
Chore(deps): bump pydantic from 1.10.9 to 2.6.2 #234
Conversation
Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.9 to 2.6.2. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](pydantic/pydantic@v1.10.9...v2.6.2) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
WalkthroughThe recent updates encompass a range of improvements, including enhancements to file ignoring patterns, modification of Pydantic model configurations, updates to class method decorators and parameters in CLI types, inheritance and default value adjustments in Kubernetes types, and a refinement in JSON serialization logic. These changes aim to increase flexibility, maintainability, and efficiency across the codebase. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@coderabbitai review |
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
poetry.lock
is excluded by:!**/*.lock
pyproject.toml
is excluded by:!**/*.toml
Files selected for processing (5)
- .gitignore (1 hunks)
- komposer/types/base.py (1 hunks)
- komposer/types/cli.py (2 hunks)
- komposer/types/kubernetes.py (4 hunks)
- komposer/utils.py (1 hunks)
Files skipped from review due to trivial changes (1)
- .gitignore
Additional comments: 9
komposer/types/base.py (2)
- 12-12: The introduction of
model_config = ConfigDict(frozen=True)
inImmutableBaseModel
correctly sets the model to be immutable. This is a good practice for models that should not change after creation, enhancing the predictability and safety of the code.- 16-16: The addition of
model_config = ConfigDict(frozen=True, alias_generator=to_camel)
inCamelCaseImmutableBaseModel
not only makes the model immutable but also specifies an alias generator for field names. This is a significant improvement for consistency in JSON representation, especially when integrating with systems that use camelCase naming conventions.komposer/utils.py (1)
- 68-68: The modification to use
model_dump_json(by_alias=True)
instead ofjson.loads
for serializing Pydantic models to JSON is a significant improvement. This method respects model configurations such as aliasing, which is crucial for maintaining consistency in serialized data, especially when working with external systems or APIs that expect specific naming conventions.komposer/types/cli.py (3)
- 47-48: Replacing
validator
withfield_validator
forproject_name
inContext
class is a precise change that aligns with Pydantic's recommendations for field-specific validations. This ensures that the validation logic is tightly coupled with the specific field it's intended for, improving readability and maintainability.- 55-56: The use of
field_validator
forbranch_name
and making the method a class method is appropriate. It ensures that the validation logic is applied directly to thebranch_name
field and allows for the use of class-level logic, which is beneficial for validations that do not depend on instance-specific data.- 62-63: Similarly, applying
field_validator
torepository_name
and converting the method to a class method is a good practice. It centralizes the validation logic forrepository_name
, making the code more organized and easier to understand.komposer/types/kubernetes.py (3)
- 3-3: Importing
ABC
fromabc
and modifying theItem
class to inherit fromABC
is a strategic decision that enforces the abstract nature ofItem
. This ensures thatItem
serves as a base class and cannot be instantiated directly, which is a good practice for clarity and preventing misuse in a class hierarchy.- 121-121: Setting a default value of
None
forvalue
in theEnvironmentVariable
class is a thoughtful change. It allows for the creation of environment variables without explicitly setting a value, which can be useful in scenarios where the value is to be determined or populated later.- 259-259: Changing the type of
items
in theList
class to a union of specific types (ConfigMap
,Deployment
,Service
,Ingress
) is an excellent improvement. It enhances type safety by ensuring that only instances of these types can be added to theitems
list, reducing the risk of runtime errors and improving code readability.
Bumps pydantic from 1.10.9 to 2.6.2.
Release notes
Sourced from pydantic's releases.
... (truncated)
Changelog
Sourced from pydantic's changelog.
... (truncated)
Commits
511d862
fixing test0a2eee8
fix number8668927
Upgradepydantic-core
to 2.16.3 (#8879)18433ee
prep for 2.6.2, reformattingcf822bd
prep for 2.6.1 releasefa8acbb
Version bump for pydantic 2.16.2 (#8717)2d812a8
Reverting problematic fix from 2.6 release, fixing schema building bug (#8718)8e790d5
Fix unsupported types bug with plain validator (#8710)aac1069
Fix regression in core schema generation for indirect definition references (...43327d8
Fix inheriting annotations in dataclasses (#8679)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)Summary by CodeRabbit
.gitignore
configurations for better file management.