Skip to content

Make a tui group with all the tui only dependencies - #1668

Draft
toby-bro wants to merge 2 commits into
qilingframework:devfrom
toby-bro:deps/tui-extra-complete
Draft

toby-bro wants to merge 2 commits into
qilingframework:devfrom
toby-bro:deps/tui-extra-complete

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


This PR is a draft, in case #1666 is merged.
It puts all the other TUI only depenencies in the tui group.

toby-bro and others added 2 commits September 22, 2026 15:57
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>
questionary and termcolor are imported by qltui.py and by nothing else in
the tree, so they serve the `qltool qltui` front end exclusively and are
never reached by `import qiling`. With python-fx already optional, they were
the remaining TUI-only packages in the mandatory dependency set.

Move both into the `tui` extra, which now means "everything the terminal UI
needs" rather than one menu entry. `qiling.cli` catches the failed qltui
import and exits through `parser.error` with the install command, so a
default install gets a one-line explanation instead of a traceback.

This is a behavior change for `qltool qltui`: after upgrading, it requires
`pip install qiling[tui]`. Every other subcommand and the library API are
untouched. Suggested for a minor release rather than a patch.

test_qltui_import continues to prove the TUI imports -- the publish workflow
now installs the wheel with the extra, matching what a TUI user has.
test_qltui_without_tui_extra covers the new degraded path by hiding
questionary from the interpreter, so it holds in either environment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@toby-bro toby-bro changed the title Deps/tui extra complete Make a tui group with all the tui only dependencies Sep 22, 2026
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