Skip to content

Make python-fx an optional "tui" extra - #1666

Open
toby-bro wants to merge 1 commit into
qilingframework:devfrom
toby-bro:deps/optional-pyfx
Open

toby-bro wants to merge 1 commit into
qilingframework:devfrom
toby-bro:deps/optional-pyfx

Conversation

@toby-bro

Copy link
Copy Markdown

Checklist

Which kind of PR do you create?

  • This PR only contains minor fixes.
  • This PR contains major feature update.
  • This PR introduces a new function/api for Qiling Framework.

Coding convention?

  • The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • Essential comments are added.
  • The reference of the new code is pointed out.

Extra tests?

  • No extra tests are needed for this PR.
  • I have added enough tests for this PR.
  • Tests will be added after some discussion and review.

Changelog?

  • This PR doesn't need to update Changelog.
  • Changelog will be updated after some proper review.
  • Changelog has been updated in my PR.

Target branch?

  • The target branch is dev branch.

One last thing


python-fx is used only by qltui.py, for the "interactive report" entry of the post-run report menu. It was a mandatory runtime dependency, so every pip install qiling also pulled pyfx and its tree -- 19 packages and 25 MB, none of which the framework itself imports.

The cost is not only size. python-fx requires pillow<11,>=10.4, so that cap propagates to every qiling consumer: they are held on a pillow line that no longer receives fixes, and pillow 10.4.0 publishes no cp314 wheels, so pip install qiling on Python 3.14 falls back to building pillow from source.

Move it to a tui extra and import it at the point of use, mirroring the existing optional-termcolor guard (qltui.py:13). qltool qltui keeps working unchanged without the extra; selecting "interactive report" prints how to install it instead of failing.

test_qltui_import already owns "the installed qltui imports cleanly"; it now also asserts pyfx is not imported at module load, which is the contract this change adds. It fails before the change and passes after.

Closes #1665

Written by Claude, validated by me nevertheless

python-fx is used only by qltui.py, for the "interactive report" entry of
the post-run report menu. It was a mandatory runtime dependency, so every
`pip install qiling` also pulled pyfx and its tree -- 19 packages and 25 MB,
none of which the framework itself imports.

The cost is not only size. python-fx requires `pillow<11,>=10.4`, so that
cap propagates to every qiling consumer: they are held on a pillow line
that no longer receives fixes, and pillow 10.4.0 publishes no cp314 wheels,
so `pip install qiling` on Python 3.14 falls back to building pillow from
source.

Move it to a `tui` extra and import it at the point of use, mirroring the
existing optional-termcolor guard (qltui.py:13). `qltool qltui` keeps
working unchanged without the extra; selecting "interactive report" prints
how to install it instead of failing.

test_qltui_import already owns "the installed qltui imports cleanly"; it now
also asserts pyfx is not imported at module load, which is the contract this
change adds. It fails before the change and passes after.

Closes qilingframework#1665

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@toby-bro

Copy link
Copy Markdown
Author

I did not open a PR for moving all the other TUI dependencies in this group as pyfx was the worst.
But if you prefer, I opened #1668 to do it (which can also be merged after this one is accepted).
As you want.

Anyways, thanks for the awesome project !

(By the way the project in which I use it, is part of a paper at NDSS27 if you are interested in academic conferences, (the paper is not public yet)).

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.

1 participant