Skip to content

Check how front / py2http serialize an InstanceAttrDefault signature default (methodize default_from) #120

Closed

Description

@thorwhalen

Deferred from #118 (raised in the review of #117). A methodize(..., default_from=...) param's signature default is an InstanceAttrDefault marker (repr self.attr). Code that JSON-serializes signature defaults (front's form generation, py2http's OpenAPI spec; cf. #88/#89 with NotSet) would meet a non-serializable object if it is ever handed a methodized function.

To do: write a test in front and py2http (or here, with a minimal JSON dump of Sig(...).defaults) that feeds a methodized function, and decide whether InstanceAttrDefault should carry a serialization hook (e.g. __json__/to_jsonable) or whether consumers should treat it as "no default".

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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