Closed willcroft closed 1 year ago
Hi, @willcroft . I've been trying to setup vonage for SMS integration in my django app but I'm getting the 2nd error you've mentioned (TypeError: constr() got an unexpected keyword argument 'regex'). I currently have vonage v3.7.0 and pydantic v2.0. I tried going back to pydantic v1.9.1 and running the server and I got another error(something related to 'to_upper' function not working correctly). So it seems to be a compatibility issue.
I'm not sure how to really fix this. What should I do?
Update: I tried with pydantic v1.10.10 and the error seemed to have gone away and the SMS worked too. Is this a solid solution? considering it's a very older version. Thanks in advance.
Considering it's a very older version
The 2.0 release is an entirely new and diverges significantly from the 1.x series. So 1.10.10 is actually also a recent release (for those who are not ready to update to 2.x), and was also released on June 30.
@willcroft thanks. Also is this good enough for production or should I keep an eye for possible updates in pydantic?
Also is this good enough for production
I neither work for Vonage nor am I a contributor/maintainer for Pydantic, so I can't speak to compatibility. The Pydantic release is a regular, supported release of the 1.x branch. Nothing different there.
Alright, Thanks!
Hi, thanks for raising this! I'll merge this in and release a new patch version of the SDK to get rid of this problem.
Fantastic, thanks!
@willcroft I chose to pin to the v1 version but allow minor updates for security reasons. No breaking changes though! You can get the new version from PyPI now ๐
Awesome, this'll be added to our next release then! Thanks for the speedy turnaround ๐
No problem, if you have any other issues feel free to raise an issue or PR ๐
Pins the
pydantic
package dependency to the last known release of v1. Breaking changes in Pydantic v2.0 (released June 30) means that the Vonage SDK now throws exceptions due to use of removed functionality.For example, for Vonage SDK version 3.2.x:
Or for Vonage SDK version 3.7.x (the latest release at the time of this PR):
I suggest the same is done for all other dependencies, though I am not in a position to ascertain the version at which they should be pinned to maintain compatibility with SDK functionality.