Skip to content

5.0.5#98

Merged
kishan-cashfree merged 1 commit intomasterfrom
5.0.5
Jan 21, 2026
Merged

5.0.5#98
kishan-cashfree merged 1 commit intomasterfrom
5.0.5

Conversation

@rajnandan1
Copy link
Contributor

Raising PR to github

Copilot AI review requested due to automatic review settings January 21, 2026 11:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".\
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"SDK Package Version: 4.5.1".\
"SDK Package Version: 5.0.5".\

Copilot uses AI. Check for mistakes.
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]
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
one_of_schemas: List[str] = Literal[TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS]
one_of_schemas: List[str] = Field(default=TERMINALPAYMENTENTITYPAYMENTMETHOD_ONE_OF_SCHEMAS)

Copilot uses AI. Check for mistakes.
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]
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@kishan-cashfree kishan-cashfree merged commit d28dd7f into master Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants