Conversation
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>
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Which kind of PR do you create?
Coding convention?
Extra tests?
Changelog?
Target 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.