This causes some ‘friction’ and conflicts with other packages. It also causes some issues with LLM usage, as most default to Pydantic>2 syntax these days (in my experience at least). So far we have been able to find work-arounds, though sometimes that means forgoing the use of certain tools/packages/extensions.
I know it is a pain, since they changed the api when they went from v1 to v2, but I’d like to request that eventually this dependency get upgraded in order to help facilitate the use of the LBT packages more easily within other environments.
Pydantic 2 has been out for almost 2 years now, so would be be much appreciated if we could align the LBT dependencies with the modern version at some point.
This is more of a question for @mostapha since he did a lot of the work to put together the pydantic-openapi-helper and he has the best sense of how large an effort it is to make the change. But, just to set expectations, I am pretty sure that it’s a substantial effort and this is the first time that I have seen anyone bring up the pydantic 2.0 shift as a pain point in the LBT community. So it still might be some time before the cost/benefit to making the change becomes worth it.
Can you be more specific about the packages that are causing the dependency conflicts? Maybe we can find a solution to help you resolve or work around them for the time being until we can eventually update the LBT core libraries.
Resurrecting this thread as I sometimes find myself checking back here in case anything else has been added to it
It’s been a while since the original reply, and I’m starting to experience a lot of other packages moving over to pydantic>2, which means trying to use LB packages in environments that include them is getting trickier.
Has any more thought been given to upgrading the version used by the wider LB tools?
This is one of those items that will be very challenging to predict without some testing. Generally speaking, it is a major effort since it will affect both Ladybug Tools and Pollination libraries. This might be a good case to test some of the AI coding agents and see if they could save us some time. It is unlikely that we get to work on this before October.
We might be able to get around this for Ladybug Tools by removing pydantic-openapi-helper from the required dependencies. It is mainly used to generate the files that are needed to generate the .NET version of the schemas. I don’t know if we need it as a required dependency.