Skip to content

Inherited fields use the declaring class's datetime_format in expressions #79

Closed

Description

@fctl-sh

Priority: medium. A subclass that sets another datetime_format (an explicitly tested feature) writes items in its format, but the field paths it inherits keep the format of the class that declared the field:

  • An abstract Timestamped declares seen_at; Article(Timestamped, datetime_format="iso_z") stores ...Z on put().
  • filter(Article.seen_at == at) renders the base class's format and returns [].
  • update(Article.seen_at.set(at)) stores ...+00:00, mixing formats in one attribute.

Where: python/dynamoxy/attributes.py (a field path takes its spec from the declaring class) and python/dynamoxy/models.py (subclasses reuse the base class's path objects).

Fix: give subclasses their own field paths (or resolve the spec through the class the path is accessed on).

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.

Activity

  1. added
    bug
    on Oct 30, 2026
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