-
Notifications
You must be signed in to change notification settings - Fork 5
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
108 upgrade pydantic version #110
Commits on Oct 16, 2024
-
feat: Upgrade the pydantic version
Pydantic used to be in 1.10.5 now moving to up to v2 accepting from v2.x to the latest
Configuration menu - View commit details
-
Copy full SHA for be45061 - Browse repository at this point
Copy the full SHA be45061View commit details -
Fix: Refactor ItemHash to align with Pydantic v2 validation schema.
Replaced `__get_pydantic_core_schema__` with a more efficient schema handling using `core_schema.str_schema()` and custom validation for ItemHash.
Configuration menu - View commit details
-
Copy full SHA for bd469cb - Browse repository at this point
Copy the full SHA bd469cbView commit details -
Fix: Refactor classes and functions to align with Pydantic v2.
- Updated code to explicitly specify optional keys where necessary. - Replaced direct `.get` calls with `data.get()` to handle new validation logic. - Migrated model configuration to use `model_config = ConfigDict(extra="forbid")` or `model_config = ConfigDict(extra="allow")` in place of Pydantic v1's configuration style.
Configuration menu - View commit details
-
Copy full SHA for 4d67c1f - Browse repository at this point
Copy the full SHA 4d67c1fView commit details -
Fix: Refactor to use
model_dump
andmodel_dump_json
in place of d……eprecated methods. - Replaced `.dict()` with `.model_dump()` for model serialization. - Replaced deprecated `.json()` with `.model_dump_json()` for JSON serialization. These changes ensure compatibility with Pydantic v2 by using the updated serialization methods.
Configuration menu - View commit details
-
Copy full SHA for 097c46b - Browse repository at this point
Copy the full SHA 097c46bView commit details -
Refactor to use
model_dump
andmodel_dump_json
, and update `check……_content` function for stricter comparison. - Replaced `.dict()` with `.model_dump()` for model serialization. - Replaced deprecated `.json()` with `.model_dump_json()` for JSON serialization. - Updated the `check_content` function to properly normalize and compare JSON structures, as Pydantic v2 enforces stricter validation and comparison rules. These changes ensure compatibility with Pydantic v2 by adopting the new serialization methods and handling stricter content comparison logic.
Configuration menu - View commit details
-
Copy full SHA for da6e03d - Browse repository at this point
Copy the full SHA da6e03dView commit details -
Fix: Changes in files to comply with MyPy, Ruff, and Black
- Refactored the normalize_content function to respect MyPy. - Reformatted code according to Black. - Fixed linting issues raised by Ruff.
Configuration menu - View commit details
-
Copy full SHA for debf926 - Browse repository at this point
Copy the full SHA debf926View commit details -
Configuration menu - View commit details
-
Copy full SHA for e15e187 - Browse repository at this point
Copy the full SHA e15e187View commit details -
Fix: Missing field caused by pydantic v2
Some fields were missing and needed to be specified du to the v2 of pydantic.
Configuration menu - View commit details
-
Copy full SHA for 983655d - Browse repository at this point
Copy the full SHA 983655dView commit details -
Fix: Linter test did not pass and suggestion from Hugo
Black test failed Wrong indentation on one line, add comment for custom_dump Refactoring normalize_content function from Hugo and added docstring for better comprehension
Configuration menu - View commit details
-
Copy full SHA for 883852e - Browse repository at this point
Copy the full SHA 883852eView commit details -
Fix: Replacing print by logger and remove unecessary workaround
Debuging using logger and not print Function to convert size always return the instance needed.
Configuration menu - View commit details
-
Copy full SHA for a59d74c - Browse repository at this point
Copy the full SHA a59d74cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 87b3dc6 - Browse repository at this point
Copy the full SHA 87b3dc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c79fca - Browse repository at this point
Copy the full SHA 2c79fcaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e7435e - Browse repository at this point
Copy the full SHA 8e7435eView commit details