Skip to content

Rust stacktraces and panics with validate_assignment and custom fields #1516

@devkral

Description

@devkral

Environment:

In the edgy project we customize the fields and models heavily. We inherit from FieldInfo and provide our own information.

Bug:

When turning on validate_assignment suddenly rust stack traces appear for some tests. In particular when we modify the fields so they aren't required anymore for the copy.

How to reproduce:

Run the test suite of:

https://github.com/dymmond/edgy/tree/devkral/potential_pydantic_bugs

with hatch test

It seemingly happens when assigning an attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions