Open vpwang opened 3 months ago
Thank you for the request.
Off the top of my head, here is what I am aware of that would need to change:
display_errors
function is imported in order to format the errors in the validation error exception during the creation of an OperationOutcome. Writing a replacement would likely be trivial.fhir.resources
dropped support for FHIR R4. FHIRStarter supports sequence R4 by enabling the developer to install an older version of fhir.resources
which I believe does not support pydantic >= 2.0. Given this, there are one of two paths to take:
There might be a few more, but that is what I'm aware of at the moment.
To answer your specific question, yes, FHIRStarter will support Pydantic 2.0 in the future, though I don't have a specific timeline at the moment.
One more note on this -- I didn't know this, but apparently FHIR R4B is functionally equivalent to FHIR R4.
Given this, my feeling is that the best path forward for this would be to drop support for R4 to avoid having to conditionally support both.
Description The Pydantic version is limited to V1 in this package. However, the V2 version has added many useful features, such as customizable serializers. As both fhir.resources and FastAPI have supported Pydantic V2, will there be a plan for fhirstarter to upgrade to support the Pydantic V2?
What I Did
pip install fhir.resources -U
After starting the server, I got an error:ImportError: cannot import name 'display_errors' from 'pydantic.error_wrappers' (/usr/local/lib/python3.9/site-packages/pydantic/error_wrappers.py)
Related Package Versions
pydantic 2.7.2
pydantic_core 2.18.3
fhir.resources 7.1.0
fhirstarter 2.4.0
fastapi 0.111.0
fastapi-cli 0.0.3