Skip to content

add better error logs for when dill or pickle fail#5502

Merged
adhami3310 merged 1 commit into
mainfrom
add-better-error-logs-for-when-dill-or-pickle-fail
Jun 26, 2025
Merged

add better error logs for when dill or pickle fail#5502
adhami3310 merged 1 commit into
mainfrom
add-better-error-logs-for-when-dill-or-pickle-fail

Conversation

@adhami3310
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Enhanced error handling and debugging for state serialization in Reflex, particularly focusing on pickle/dill failures, with Python 3.11+ optimizations.

  • Added debug_failed_pickles function in reflex/istate/__init__.py for recursive inspection of unpicklable objects
  • Improved process method type safety in reflex/app.py from AsyncIterator to more specific AsyncGenerator
  • Added contextlib.aclosing wrapper in app.py for proper generator cleanup
  • Moved HANDLED_PICKLE_ERRORS constant to reflex.istate module for better organization
  • Added pre-computed schema separation from serialization step in state.py for clearer error messages

3 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 26, 2025

CodSpeed Performance Report

Merging #5502 will not alter performance

Comparing add-better-error-logs-for-when-dill-or-pickle-fail (c8179b9) with main (7b4df17)

Summary

✅ 8 untouched benchmarks

Copy link
Copy Markdown
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

@adhami3310 adhami3310 merged commit a9f8ab0 into main Jun 26, 2025
40 of 41 checks passed
@adhami3310 adhami3310 deleted the add-better-error-logs-for-when-dill-or-pickle-fail branch June 26, 2025 03:25
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.

2 participants