Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the cashfree_pg SDK from version 4.5.1 to 5.0.5, primarily focused on migrating from Pydantic v1 to v2 and updating the Python version requirement.
Changes:
- Upgraded Pydantic dependency from v1 (1.10.24) to v2 (2.11.7)
- Updated minimum Python version from 3.7 to 3.9
- Migrated all model classes to use Pydantic v2 syntax and configuration
Reviewed changes
Copilot reviewed 298 out of 553 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Updated VERSION to 5.0.5, PYTHON_REQUIRES to >=3.9, and pydantic dependency to >= 2.11.7 |
| pyproject.toml | Updated version to 5.0.5, python requirement to ^3.9, and pydantic to 2.11.7 |
| configuration.py | Updated SDK Package Version reference to 4.5.1 |
| cashfree_pg/models/*.py | Migrated all model classes from Pydantic v1 to v2 syntax (model_config dict, field_validator, Field defaults, etc.) |
| test/*.py | Removed extra blank lines after license headers |
| .openapi-generator/VERSION | Updated 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.
| "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 Package Version in the debug report is inconsistent with the actual version being released (5.0.5). This should be updated to match the version in setup.py and pyproject.toml.
| "SDK Package Version: 4.5.1".\ | |
| "SDK Package Version: 5.0.5".\ |
| else: | ||
| actual_instance: Any | ||
| one_of_schemas: List[str] = Field(TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS, const=True) | ||
| one_of_schemas: List[str] = Literal[TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS] |
There was a problem hiding this comment.
The type annotation is incorrect. Literal expects actual literal values, not a variable. This should use Field(default=TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS) instead, or define this as a class variable without Literal.
| one_of_schemas: List[str] = Literal[TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS] | |
| one_of_schemas: List[str] = Field(default=TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS) |
| else: | ||
| actual_instance: Any | ||
| one_of_schemas: List[str] = Field(PAYORDERREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS, const=True) | ||
| one_of_schemas: List[str] = Literal[PAYORDERREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS] |
There was a problem hiding this comment.
The type annotation is incorrect. Literal expects actual literal values, not a variable. This should use Field(default=PAYORDERREQUESTPAYMENTMETHOD_ONE_OF_SCHEMAS) instead, or define this as a class variable without Literal.
Raising PR to github