Skip to content

fix: replace quickjs with mini-racer for Python 3.13 + Windows support#727

Open
kkollsga wants to merge 1 commit intoKanaries:mainfrom
kkollsga:fix/optional-js-runtime-707
Open

fix: replace quickjs with mini-racer for Python 3.13 + Windows support#727
kkollsga wants to merge 1 commit intoKanaries:mainfrom
kkollsga:fix/optional-js-runtime-707

Conversation

@kkollsga
Copy link

Summary

quickjs breaks on Python 3.13 + Windows because the upstream maintainer will not build Windows wheels. This PR removes quickjs entirely and replaces it with mini-racer (V8-based), which has prebuilt wheels for all major platforms.

The JS runtime is only used for static HTML chart export (to_chart_html, Component.to_html(render_type="pure_chart")). The core interactive walk()/render() workflow never touches it.

Changes

  • pyproject.toml — removed quickjs from required deps, added export = ["mini-racer>=0.12"] optional extra
  • pygwalker/utils/dsl_transform.py — replaced eager quickjs import with lazy mini-racer initialization
  • tests/test_dsl_transform.py — new test file covering both happy path and error path

Checklist

What changes for users

User Before After
pip install pygwalker on Py3.13 + Windows Fails Works
Uses walk() / render() interactively quickjs installed but never used No change
Uses static HTML export Works via quickjs Needs pip install pygwalker[export]

Note on the existing fix attempt

The branch claude/fix-quickjs-python-01GWFAZsTowE67S2bsCkWFeg (commit 7200df6) uses dukpy (Duktape, ES5.1 only) which cannot execute the ESNext UMD bundles built by the project's Vite/esbuild pipeline. This PR uses V8 via mini-racer instead.

Test plan

  • import pygwalker works without any JS runtime installed
  • dsl_to_workflow({}) returns valid workflow JSON via mini-racer
  • vega_to_dsl() converts Vega-Lite spec correctly via mini-racer
  • Clear ImportError with install instructions when mini-racer is missing
  • Lazy init only runs once (idempotent)
  • Existing test suite passes (13/13)
  • Verified on Python 3.13

🤖 Generated with Claude Code

…s#707)

quickjs breaks on Python 3.13 + Windows because the upstream maintainer
will not build Windows wheels. This commit:

- Removes quickjs from required dependencies entirely
- Adds mini-racer (V8) as optional dep: pip install pygwalker[export]
- Lazily initializes the JS runtime only when static HTML export is used
- Gives a clear error message with install instructions if missing
- Adds tests for dsl_transform module

Closes Kanaries#707, closes Kanaries#726.

Co-authored-by: Claude <noreply@anthropic.com>
@ObservedObserver
Copy link
Member

Hi, thanks for you PR;

Can you share a screenshot or video of new version of pygwalker working in python 3.13, just want to make sure this is a real work of fix instead of a auto PR BOT's pure code work.

I am not a maintainer aginst code agent, but i do want to make sure people are putting real effort for a real fix and understand what the agent have done.

@kkollsga
Copy link
Author

Sure:
image

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.

[BUG] Unable to install with pip [BUG] pygwalker doesn't work with Python 3.13 and Windows because of quickjs

2 participants