pytest warns about a dependency to pydantic is dep...
# ask-ai
m
pytest warns about a dependency to pydantic is deprecated. I think it's from dagster. any idea how to fix?
s
Based on the information from the documentation and issues, it appears that there has been a known issue with Dagster's
ConfigurableResource
using a deprecated Pydantic
config
. This was reported in a Github issue where users experienced deprecation warnings when running tests with pytest. The specific warning mentioned the deprecation of class-based
config
in Pydantic, advising the use of
ConfigDict
instead, as class-based
config
was deprecated in Pydantic V2.0 and is planned to be removed in V3.0. To address this warning, you can take the following steps: 1. Update Dagster: Ensure that you are using the latest version of Dagster. As of Dagster version 1.5.5, there has been support for Pydantic 2, which may resolve compatibility issues with deprecated features. 2. Check Pydantic Version: If you are using Pydantic directly in your project, make sure that the version is compatible with the version of Dagster you are using. If you are on Dagster 1.5.5 or later, you should be able to use Pydantic 2. 3. Review Dependencies: If you have other dependencies that rely on Pydantic, ensure that they are also compatible with the version of Pydantic you are using. 4. Check for Updates in the Issue Tracker: Keep an eye on the relevant Github issue for any updates or fixes provided by the Dagster maintainers. If you continue to experience issues after taking these steps, you may want to report your specific case in the Github issue tracker for Dagster, providing details of your environment and the exact warnings or errors you are encountering. This can help the maintainers to provide a more targeted solution or to prioritize a fix if the issue persists.