Skip to content

Improve Jinja2 dependency constraints in spiff-arena-common to prevent drift #2462

@coderabbitai

Description

@coderabbitai

Background

This issue tracks the need to add bounded version constraints for Jinja2 in spiff-arena-common/pyproject.toml to prevent dependency drift and ensure compatibility across environments.

Context

In PR #2461, Jinja2 constraints were temporarily removed to resolve Pyodide install issues. While this addresses the immediate problem, it leaves the dependency unpinned which can lead to:

  • Non-deterministic installs across environments and time
  • Potential compatibility issues with future Jinja2 major releases
  • Installation drift

Proposed Solutions

Choose one of the following approaches:

Option A (Simple floor + ceiling):

dependencies = [
    "Jinja2 >= 3.1.6, < 4",
    "SpiffWorkflow",
]

Option B (Platform-specific constraints):

dependencies = [
    "Jinja2 >= 3.1.6, < 4; sys_platform != 'emscripten'",
    "Jinja2 == 3.1.6; sys_platform == 'emscripten'",
    "SpiffWorkflow",
]

Option C (Optional dependencies for Pyodide):

dependencies = [
    "Jinja2 >= 3.1.6, < 4",
    "SpiffWorkflow",
]

[project.optional-dependencies]
pyodide = [
    "Jinja2 == 3.1.6",
]

Technical Notes

  • Pyodide v0.28.1 ships with Jinja2 3.1.6
  • Jinja2 provides pure-Python wheels compatible with Pyodide
  • MarkupSafe (Jinja2 dependency) is bundled in Pyodide as a WASM build

References

Requested by: @jbirddog

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

New Issue

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions