Skip to content

5.0.1-beta-7#94

Open
rajnandan1 wants to merge 1 commit intomasterfrom
5.0.1-beta-7
Open

5.0.1-beta-7#94
rajnandan1 wants to merge 1 commit intomasterfrom
5.0.1-beta-7

Conversation

@rajnandan1
Copy link
Contributor

Raising PR to github

Copilot AI review requested due to automatic review settings January 20, 2026 11:45
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 updates the codebase to migrate from Pydantic v1 to Pydantic v2, adjusting package metadata and configuration across numerous model files and test files.

Changes:

  • Updated package name from "cashfree_pg" to "cashfree-pg" and version from "4.5.1" to "1.0.0"
  • Migrated Pydantic models from v1 to v2 syntax (model_config, field_validator, Field defaults)
  • Removed extraneous blank lines from test files

Reviewed changes

Copilot reviewed 298 out of 551 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
setup.py Updated package name, version, pydantic dependency to v2, and removed URL
pyproject.toml Updated version and pydantic dependency to v2
configuration.py Updated SDK package version string
test/*.py (27 files) Removed blank lines for formatting consistency
cashfree_pg/models/*.py (200+ files) Migrated Pydantic v1 to v2 syntax

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

NAME = "cashfree_pg"
VERSION = "4.5.1"
NAME = "cashfree-pg"
VERSION = "1.0.0"
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The package name change from "cashfree_pg" to "cashfree-pg" is a breaking change. This should be a major version bump, but changing to "1.0.0" suggests a reset. Consider using a version like "5.0.0" to indicate continuation and breaking changes, or document why this is being reset to "1.0.0".

Suggested change
VERSION = "1.0.0"
VERSION = "5.0.0" # Major version bump to reflect breaking change from 'cashfree_pg' to 'cashfree-pg'

Copilot uses AI. Check for mistakes.
author="Cashfree Payments",
author_email="developers@cashfree.com",
url="https://cashfree.com",
url="",
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The package URL has been removed (empty string). This should either contain a valid URL or be removed entirely from the setup call, as an empty string provides no value and may cause issues with package registries.

Suggested change
url="",

Copilot uses AI. Check for mistakes.
__properties = ["channel", "upi_id", "upi_redirect_url", "upi_expiry_minutes", "authorize_only", "authorization"]

@validator('channel')
@field_validator('channel')
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

The field_validator decorator in Pydantic v2 requires mode='after' or mode='before' parameter. Without it, the default is 'after', which may cause validation issues. Add explicit mode parameter: @field_validator('channel', mode='after')

Suggested change
@field_validator('channel')
@field_validator('channel', mode='after')

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

2 participants