Open mystogan99 opened 7 months ago
Can you try dependency overriding. That should work.
hi @suhas-cashfree For me the dependency didn't work, and it throwed the error ->
File "/usr/local/lib/python3.11/site-packages/cashfree_pg/models/offer_validations_payment_method.py", line 58, in OfferValidationsPaymentMethod
one_of_schemas: List[str] = Field(OFFERVALIDATIONSPAYMENTMETHOD_ONE_OF_SCHEMAS, const=True)
File "/usr/local/lib/python3.11/site-packages/pydantic/fields.py", line 764, in Field
raise PydanticUserError('const
is removed, use Literal
instead', code='removed-kwargs')
pydantic.errors.PydanticUserError: const
is removed, use Literal
instead
For further information visit https://errors.pydantic.dev/2.5/u/removed-kwargs
is it possible for you to upgrade the versiona and support the latest.
I don't want to fork the repository and update it manually?
What is the pydantic version you are using @pradeeprecoup ?
hi @suhas-cashfree Thanks for the quick reply. here is the out of the pip list, and the version I am using.
pydantic 2.5.3 pydantic_core 2.14.6
Have to check what we can do for this. Right now our pydantic supports < 2 will dependency overriding work for you anyway ?
No, it gave the above error at run time.
So @suhas-cashfree what are suggest, how to go about it? Should i directly call the api? Because we are evaluating cashfree and if the development time is more on this.. then we can try some other gateway?
You can hit the api directly. Meanwhile we will try to get a solution for this
What are the apis you are hitting ?
Order/ Payment/ Refund/Webhook for now. Payment links also
any update on this, till when can we expect the updated l
What is the pydantic version you are using @vedrk5672 ?
@suhas-cashfree pydantic = "2.6.1"
hey @suhas-cashfree any updates ?
or any workaround apart from using requests directly.
You can downgrade pydantic version ? We have to check to make it compatible. It will take some time
Downgrading is not possible in the current scenario. No issue will work with the endpoint requests for now.
File "/lib/python3.12/site-packages/cashfree_pg/api_client.py", line 245, in
@suhas-cashfree please find the above mentioned error. actual module -> subs_create_payment200_response (present in cashfree_pg.models) but in api_client.py there is cashfree_pg.models.subs_create_payment_200_response import * please resolve this at the earliest
cashfree-pg version 4.0.3 requires pydantic version >=1.10.5,<2. My project requires pydantic version ^2.5.2, which is incompatible with the version required by cashfree-pg.
I can't downgrade my pydantic version as other features heavily rely on this. So what if I use Dependency Overrides but it might lead to runtime errors if cashfree_pg is not compatible with the newer version of pydantic?