You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@hamilton.apache.org by "Bitu-Singh-Rathoud (via GitHub)" <gi...@apache.org> on 2026/08/05 17:51:49 UTC

Re: [I] Cannot setup local UI due to error produced by pydantic [hamilton]

Bitu-Singh-Rathoud commented on issue #1443:
URL: https://github.com/apache/hamilton/issues/1443#issuecomment-5195325517

    class UserOut(ModelSchema):
   -    class Config:
   -        model = User
   -        model_fields = ["id", "email", "first_name", "last_name"]
   +    class Meta:
   +        model = User
   +        model_fields = ["id", "email", "first_name", "last_name"]
   
   
   
   pdate the UI schema definitions
   
   Replace any ModelSchema inner Config classes in the UI package with Meta.
   The traceback points to hamilton_ui/trackingserver_auth/schema.py, so start there.
   Check for other affected schemas
   
   Search the UI codebase for all class Config blocks under ModelSchema subclasses.
   There may be more than one file using the old django-ninja pattern.
   Verify dependency compatibility
   
   Confirm which django-ninja / pydantic versions are pulled in by sf-hamilton[ui].
   If the UI currently relies on an older API, either:
   pin compatible versions, or
   update the code to support the newer stack.
   Add a regression test
   
   Add a startup/import test for the UI module so this failure is caught immediately.
   A simple test that imports the UI app or its schema module would likely reproduce the issue.
   Validate on Python 3.13
   
   Since the issue reproduces on Python 3.13, test the UI startup there after the schema change.
   Also check whether the project officially supports 3.13 yet.
   Document the fix
   
   Update the UI setup docs or release notes if the required dependency versions change.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@hamilton.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org