Skip to content

Fix dol Issue #18 in ModuleNamesImportedByModule.print_kvs - #2

Merged
thorwhalen merged 1 commit into
masterfrom
fix/issue18-wrapped-self
Jul 5, 2026
Merged

Fix dol Issue #18 in ModuleNamesImportedByModule.print_kvs#2
thorwhalen merged 1 commit into
masterfrom
fix/issue18-wrapped-self

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

print_kvs iterated self.items() from inside the @wrap_kvs(key_of_id=modobj_to_modname, ...)-decorated class, where self is the inner unwrapped store — so its keys are module objects, not the decoded module-name strings. It printed <Module: json.decoder> reprs instead of json.decoder.

Fix: route through dol.wrapped_self(self) (the outer, transform-applying store). Verified locally: print_kvs now prints module name strings. Requires dol>=0.3.49 (ships wrapped_self).

No regression test added (repo has no test suite). Refs i2mint/dol#18.

https://claude.ai/code/session_01H8PmV6xmMhzV64zi1Twraw

print_kvs iterated self.items() from inside the wrap_kvs-decorated class, where
`self` is the inner unwrapped store whose keys are module OBJECTS, not the
key_of_id-decoded module NAME strings — so it printed "<Module: json.decoder>"
reprs instead of "json.decoder". Route through dol.wrapped_self(self) (the outer,
transform-applying store). Requires dol>=0.3.49 (wrapped_self).

Refs i2mint/dol#18

Claude-Session: https://claude.ai/code/session_01H8PmV6xmMhzV64zi1Twraw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant