fix(desktop): stop pruning _pyrepl from Windows/Linux stdlib#31
Merged
Conversation
CPython 3.14's pydoc (and pdb) import _pyrepl at module load, so pruning it breaks any desktop app importing pydoc/pdb/pytest with: ModuleNotFoundError: No module named '_pyrepl' Un-prune _pyrepl in the Windows and Linux Dart excludes. macOS/iOS/Android already un-pruned it (mobile fix #29); their comments now also cite pydoc. Fixes flet-dev/serious-python#236
FeodorFitsner
added a commit
to flet-dev/serious-python
that referenced
this pull request
Jul 19, 2026
…import, #236) (#237) Windows/Linux desktop apps on Python 3.14 crashed at startup with ModuleNotFoundError: No module named '_pyrepl' when the app or a dependency (e.g. NLTK) imports pydoc/pdb — 3.14's pydoc/pdb import _pyrepl at module load, but it was pruned from the desktop stdlib as a dev-only module. python-build 20260719 un-prunes _pyrepl on Windows/Linux (flet-dev/python-build#31); iOS/macOS/Android already shipped it (4.3.2), so those runtimes are byte-identical to 20260714. Folded into the not-yet-released 4.3.4. Fixes #236
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.
Problem
Windows/Linux desktop apps built with Python 3.14 crash on startup when the app (or a dependency) imports
pydoc:CPython 3.14's
pydoc.py— andpdb.py— import_pyreplat module load. The Windows and Linux Dart stdlib excludes pruneLib/_pyreplas a "dev-only / interactive-REPL" module, so any desktop app importingpydoc/pdb/pytest(or a lib that does, e.g. NLTK) dies withModuleNotFoundError: No module named '_pyrepl'.Fix
Stop pruning
_pyreplinwindows/python-windows-dart.excludeandlinux/python-linux-dart.exclude.macOS/iOS/Android already un-pruned it in the mobile fix (#29, which cited
pdb); this extends the same treatment to desktop and updates all comments to also citepydoc, the trigger reported here.Fixes flet-dev/serious-python#236