Skip to content

Smaller codec and update issues #100

Closed

Description

@fctl-sh

Priority: low.

  • update(M.tags.set(set())) or M.tags.remove() on a set[str] field raises "is required and cannot be removed" (repository.py, _plan_update), although save() with tags=set() works and an empty set is how such a field reads back.
  • Templates render Decimal values of union fields as given (schema.py): Decimal | str writes PRICE#1.50, the loaded instance renders PRICE#1.5, and save() raises "key changed".
  • Literal[Color.RED] with a plain Enum member passes validation, but the write fails (codecs.py, the literal codec).
  • IntCodec.validate(Decimal("Infinity")) raises OverflowError and Decimal("sNaN") raises InvalidOperation, instead of a validation error.

Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions