Skip to content

Commit df4665d

Browse files
fix(desktop): stop pruning _pyrepl from Windows/Linux stdlib (#31)
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
1 parent 7d33d55 commit df4665d

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

android/python-android-dart.exclude

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ lib/python*/turtle*
2121
lib/python*/wsgiref
2222
# Interactive-REPL / dev-only modules + easter eggs / frozen demos (never imported when
2323
# running a script in embedded mode). _pyrepl is intentionally NOT pruned: CPython 3.14's
24-
# pdb imports it at module load, so dropping it breaks pdb / pytest / anything that imports it.
24+
# pydoc and pdb import it at module load, so dropping it breaks pydoc / pdb / pytest /
25+
# anything that imports them.
2526
lib/python*/rlcompleter*
2627
lib/python*/tabnanny*
2728
lib/python*/antigravity*

darwin/python-darwin-stdlib.exclude

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ turtle*
2020
wsgiref
2121
# Interactive-REPL / dev-only modules — never imported when running a script (embedded
2222
# mode); plus easter eggs and frozen demo modules. _pyrepl is intentionally NOT pruned:
23-
# CPython 3.14's pdb imports it at module load, so dropping it breaks pdb / pytest /
24-
# anything that imports it on-device.
23+
# CPython 3.14's pydoc and pdb import it at module load, so dropping it breaks
24+
# pydoc / pdb / pytest / anything that imports them.
2525
rlcompleter*
2626
tabnanny*
2727
antigravity*

linux/python-linux-dart.exclude

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ lib/python*/turtle*
2020
lib/python*/wsgiref
2121
# Interactive-REPL / dev-only modules + easter eggs / frozen demos (never imported when
2222
# running a script in embedded mode). Globs catch the .pyc too (sources go via *.py above).
23-
lib/python*/_pyrepl
23+
# _pyrepl is intentionally NOT pruned: CPython 3.14's pydoc and pdb import it at module
24+
# load, so dropping it breaks pydoc / pdb / pytest / anything that imports them.
2425
lib/python*/rlcompleter*
2526
lib/python*/tabnanny*
2627
lib/python*/antigravity*

windows/python-windows-dart.exclude

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Lib/site-packages/pip*
1313
Lib/site-packages/setuptools*
1414
Lib/site-packages/wheel*
1515
# Interactive-REPL / dev-only modules + easter eggs / frozen demos.
16-
Lib/_pyrepl
16+
# _pyrepl is intentionally NOT pruned: CPython 3.14's pydoc and pdb import it at
17+
# module load, so dropping it breaks pydoc / pdb / pytest / anything that imports them.
1718
Lib/rlcompleter.py
1819
Lib/tabnanny.py
1920
Lib/antigravity.py

0 commit comments

Comments
 (0)