Skip to content

fix: handle objects with __getattr__ returning non-callable values in serialization#8109

Merged
dmadisetti merged 3 commits intomainfrom
ms/8096
Feb 4, 2026
Merged

fix: handle objects with __getattr__ returning non-callable values in serialization#8109
dmadisetti merged 3 commits intomainfrom
ms/8096

Conversation

@mscolnick
Copy link
Contributor

Summary

Objects that implement __getattr__ (like rdflib.Namespace) caused serialization errors because hasattr() returns True for any attribute name, but the returned value may not be callable.

Added getcallable() utility function that safely retrieves callable attributes, returning None if the attribute doesn't exist or isn't callable

Closes #8096

…in serialization

### Summary

Objects that implement `__getattr__` (like `rdflib.Namespace`) caused serialization errors because `hasattr()` returns `True` for any attribute name, but the returned value may not be callable.

Added `getcallable()` utility function that safely retrieves callable attributes, returning `None` if the attribute doesn't exist or isn't callable

Closes #8096
@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Feb 3, 2026 9:19pm

Request Review

@mscolnick
Copy link
Contributor Author

test was fixed and merged to main

@dmadisetti dmadisetti merged commit 43f35eb into main Feb 4, 2026
40 of 45 checks passed
@dmadisetti dmadisetti deleted the ms/8096 branch February 4, 2026 00:29
@github-actions
Copy link

github-actions bot commented Feb 4, 2026

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.8-dev18

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Objects implementing getattr are interpreted as having special methods for serialization.

2 participants