Skip to content

AsyncEval 2.2: The Phoenix Refactor

Latest

Choose a tag to compare

@iineolineii iineolineii released this 06 Oct 20:58

In version 2.2, AsyncEval rises from the ashes with substantial improvements, reinventing itself (yet again) with even better context management, more refined error handling, and a sleeker, streamlined code transformation process.

Key Enhancements:

  1. Execution Context Management:

    • Introduced ExecutionContext to better isolate and manage individual code executions within a structured session, making tracking and debugging so organized that it almost feels suspicious.
  2. Error Handling and Traceback:

    • Enhanced error reporting with a custom excepthook and refined traceback formatting, so you should know exactly where it all went wrong.
  3. Customizable AST Transformations:

    • Updated NodeTransformer for more efficient and flexible modifications to Python code structures.
  4. Builtin Management:

    • Added CustomBuiltins, allowing safe, temporary adjustments and isolation to Python's builtins during execution—finally giving you the power you didn't know you wanted.
  5. Optimized Performance and Memory Usage:

    • Reduced object copying, improved regex performance, and optimized AST traversal, resulting in faster evaluations and lower memory overhead.
  6. Improved Debugging Tools:

    • New utilities like reconstruct_node and dump_node aid in AST inspection, giving you deeper insights, whether you wanted them or not (actually, I just found these functions too useful during the debugging to just remove them).
  7. Streamlined API:

    • Simplified the evaluation interface with more intuitive parameters, making integration so easy that I wonder why it wasn't always this way.

Full Changelog: v2.1...v2.2