#3595 fix(mappers): Support `simpleeval` 1.0.5+ by subclassing `simpleeval.EvalWithCompoundTypes`
Pull request opened by
edgarrmondragon
Related
• Closes
#3561
• Re-implements upstream
danthedeckie/simpleeval#181
Summary by Sourcery
Support newer simpleeval versions in mapper expression evaluation while preserving safety guarantees for stream map expressions.
Bug Fixes:
• Restore compatibility with simpleeval 1.0.5+ by customizing evaluation to bypass redundant disallowed-item checks that conflict with mapper usage.
Enhancements:
• Introduce a dedicated _MapperEval subclass to centralize mapper-specific simpleeval behavior and safety constraints.
• Wrap datetime and json modules with simpleeval.ModuleWrapper when exposing them as mapper functions to align with simpleeval's security model.
Build:
• Relax the simpleeval dependency to require version 1.0.5 or later in project configuration.
Summary by Sourcery
Restore compatibility of mapper expression evaluation with newer simpleeval versions while maintaining existing safety guarantees.
Bug Fixes:
• Fix incompatibility with simpleeval 1.0.5+ by using a custom evaluator that bypasses redundant disallowed-item checks conflicting with mapper use cases.
Enhancements:
• Introduce a dedicated _MapperEval subclass to centralize mapper-specific simpleeval behavior and security constraints.
• Wrap the datetime and json modules with simpleeval.ModuleWrapper when exposing them as mapper functions to align with simpleeval's security model.
Build:
• Update the simpleeval dependency constraint to pin to version 1.0.7.
meltano/sdk