-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pydantic 2 #55
Comments
Thanks for replying @matthewelwell! 🙇 That's a huge PR that is much bigger than pydantic. Is there a way to extract the pydantic part and release it before? By reading the issue, the work on pydantic itself feels quite contained (that's all I can guess with little context, though), that's why I'm asking. If you guys are able to pull this off, it would allow us to use these two weeks to work on the development and migration, otherwise we will be mostly blocked by that. |
Hi @PotHix, yes, I appreciate that is a larger PR, however, it is closely tied to the work in that PR. I will try to extract it and put out a release sooner. |
Hi @PotHix, just a heads up here that unfortunately there seem to be some hefty breaking changes in pydantic v2, particularly around the use of the We will of course continue to complete the upgrade, however, it is not a trivial task. I was hoping that upgrading and just using the |
Hey @matthewelwell! We need some confirmation that you guys can deliver it this week, otherwise, we will have to work on some alternative solutions. Can you please confirm if it's going to be merged this week? |
Hi @PotHix, we're planning to look into this on Wednesday. I should be able to provide an update on Wednesday afternoon. |
Thanks @matthewelwell. We will be waiting for your answer to decide the next move. |
Hi @PotHix, just a quick update here that we're working on this here. We're going to try and have it finished and released by the end of this week but there are a number of breaking changes migrating from pydantic 1 -> 2. Note that the engine is a core piece of technology heavily used in a lot of our services so we will need to have a thorough review and testing process. I will keep you posted on the progress. |
Thanks for the update @matthewelwell! If it's guaranteed to have a new version of this library until the end of the week, we can wait for that. If you feel it's uncertain, we would be in a bad situation, as we will have less than 1 week to do everything we need. Our plan is to have the latest version of the library working on our system on Monday, so we can have the rest of the week to migrate most of our flags from a different provider. Can we count on this plan or it's too uncertain? |
Hi @PotHix, I should have thought about this solution earlier but you can just use |
Thanks for pointing that out! Sounds good. I did some preliminary tests, and it seems to be enough to kickstart the project.
I'm assuming the release of the next version supporting pydantic 2 is going to happen at some point next week. Is that a correct assumption? |
We cant/don't guarentee any release dates for anything I'm afraid @PotHix! We are working on it and it will come soon! For now you can use the version without the pydantic dependency. |
Thanks, @dabeeeenster! We will follow up closely and consider that in our risk. 👍 |
@matthewelwell I've been facing a problem with Marshmallow when trying to test my implementation when using the version you suggested. It says:
DetailsA bit more info:
Were you aware of this problem? Is there any workaround? |
@PotHix, I'm not really sure how this is throwing an |
We have! I added the warning as an exception, but it seems I did it incorrectly. Now that we considered this warning as expected, things are working again. Thanks for pointing this out! A have another question about the older version:
What exactly is the offline mode you mention here? Is it the local evaluation mode? |
Pydantic V2 support released with SDK version 3.5.0. |
I'm basically having the exact opposite issue. I'm stuck on Pydantic v1 due to some technical issues and cannot make use of transient traits as they are only available in newer versions of the Flagsmith SDK which requires Pydantic v2. Maybe |
Hi @levrik, thanks for getting in touch. I'm afraid that this isn't something that we would be looking to add to the client at this stage. I would suggest that you look into whatever other technical constraints are preventing the Pydantic v2 upgrade on your end. Otherwise, you could always fork this repository and remove the engine yourself if you deem it necessary. |
@matthewelwell I'm trying to upgrade to Pydantic v2 for several months now already. Also a colleague has tried it but didn't manage to do it without breaking something. I guess forking this repo will be the way then. |
Our codebase uses the latest stable version of pydantic (2.1.1 at the moment) and we're not able to use flagsmith-python-client because one of its dependencies (flagsmith-engine) rely on pydantic <2.
I can see there's a issue for the migration already. Any dates on how flagsmith is going to update pydantic to v2? We will be blocked until the new version is out.
The text was updated successfully, but these errors were encountered: