Issues with pydantic v2
DominicOram opened this issue · 0 comments
DominicOram commented
Despite 5abfa58 pinning the pydantic
version in dev
there are still potential issues with pydantic
.
Expected Behavior
I should be able to do the following in my application that uses bluesky
and pydantic
:
pip install bluesky
pip install pydantic
python
>>> from bluesky.run_engine import RunEngine
Current Behavior
The above will throw an exception.
Possible Solution
The issue is that because the pin is in dev
pip
does not realise that bluesky
requires the pin so installs the latest pydantic
. The import check in https://github.com/bluesky/event-model/blob/main/event_model/documents/generate/type_wrapper.py then picks up the v2. Possible fixes are:
- Update
event-model
to work for v2 (probably prefered) - Update the import check to also check the version (quicker but dirtier)