Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the codebase from Pydantic v1 to Pydantic v2, changes package versioning, and updates the OpenAPI generator version.
Changes:
- Migrates all Pydantic model configurations from v1 syntax (
Configclass) to v2 syntax (model_configdictionary) - Updates Field() declarations to use
default=Noneinstead of positionalNoneargument - Replaces Pydantic v1 validators with v2 field_validator decorators
- Updates package version from 4.5.1 to 1.0.0 and changes package name from "cashfree_pg" to "cashfree-pg"
Reviewed changes
Copilot reviewed 298 out of 551 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Updates package name, version, dependencies (pydantic 2.11.7), and removes URL |
| pyproject.toml | Updates version to 1.0.0 and pydantic dependency to 2.11.7 |
| configuration.py | Updates SDK version string in debug report |
| Multiple test files | Removes empty lines after license headers |
| Multiple model files | Migrates from Pydantic v1 to v2 syntax |
| .openapi-generator/VERSION | Updates OpenAPI generator version from 7.0.0 to 7.18.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| NAME = "cashfree-pg" | ||
| VERSION = "1.0.0" |
There was a problem hiding this comment.
The package name change from "cashfree_pg" to "cashfree-pg" is a breaking change that will affect all existing users. This should be clearly documented in the PR description and release notes, as users will need to update their import statements from import cashfree_pg to handle the new package name.
| NAME = "cashfree_pg" | ||
| VERSION = "4.5.1" | ||
| NAME = "cashfree-pg" | ||
| VERSION = "1.0.0" |
There was a problem hiding this comment.
The version has been reset from 4.5.1 to 1.0.0. This is typically done for major breaking changes. However, the PR title indicates "5.0.1-beta-6", which conflicts with this version change. Please clarify the intended version number.
| VERSION = "1.0.0" | |
| VERSION = "5.0.1-beta-6" |
| author="Cashfree Payments", | ||
| author_email="developers@cashfree.com", | ||
| url="https://cashfree.com", | ||
| url="", |
There was a problem hiding this comment.
The package URL has been removed (empty string). This field should either contain a valid URL to the project homepage/repository or be removed entirely from the setup configuration.
| url="", |
| "Python Version: {pyversion}\n"\ | ||
| "Version of the API: 2023-08-01\n"\ | ||
| "SDK Package Version: 4.3.10".\ | ||
| "SDK Package Version: 4.5.1".\ |
There was a problem hiding this comment.
The SDK version string in the debug report (4.5.1) does not match the version declared in setup.py (1.0.0) or the PR title (5.0.1-beta-6). These versions should be consistent across the codebase.
| "SDK Package Version: 4.5.1".\ | |
| "SDK Package Version: 1.0.0".\ |
Raising PR to github