Skip to content
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

Pin Pydantic to <2.0 in build-environment.yml #24

Closed
stephenmccalman opened this issue Jul 6, 2023 · 2 comments
Closed

Pin Pydantic to <2.0 in build-environment.yml #24

stephenmccalman opened this issue Jul 6, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@stephenmccalman
Copy link

stephenmccalman commented Jul 6, 2023

Description

xeus-python-demo uses the latest pydantic, which is now v2.0. This appears to create an error in the build of the demo.

/home/runner/micromamba-root/envs/build-env/lib/python3.11/site-packages/jupyterlite_core/addons/__init__.py:69: UserWarning: [lite] [jupyterlite-xeus-python] failed to load: To define root models, use `pydantic.RootModel` rather than a field called '__root__'

While template will build and deploy (despite this error), the environment.yml's package (ipycanvas) is not available in the jupyterlite-xeus-python kernel (after launching the jupyterlite)

Pinning pydantic to <2.0 in the build-environment.yml will allow the demo to build and deploy properly.

Reproduce

Use to template to create a new demo.
Add page to github actions

Context

  • Browser and version: Chrome Version 114.0.5735.84
@stephenmccalman stephenmccalman added the bug Something isn't working label Jul 6, 2023
@stephenmccalman
Copy link
Author

It appears that empack does not support Pydantic V2 yet.

https://docs.pydantic.dev/2.0/migration/
namely,

We have replaced the use of the root field to specify a "custom root model" with a new type called RootModel which is intended to replace the functionality of using a field called root in Pydantic V1.

@martinRenou
Copy link
Member

Thanks for opening an issue! I'm moving it to empack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants