From cdd541a02c4e4cc0dc6d99eb4055b008badce841 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Sun, 19 Jul 2026 15:22:29 -0700 Subject: [PATCH] Re-pin python-build to 20260719: desktop _pyrepl restored (pydoc/pdb import, #236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/serious_python/CHANGELOG.md | 3 ++- src/serious_python/lib/src/python_versions.dart | 4 ++-- src/serious_python_android/CHANGELOG.md | 1 + src/serious_python_android/android/python_versions.properties | 4 ++-- src/serious_python_darwin/CHANGELOG.md | 2 +- src/serious_python_darwin/darwin/python_versions.properties | 4 ++-- src/serious_python_linux/CHANGELOG.md | 2 +- src/serious_python_linux/linux/python_versions.properties | 4 ++-- src/serious_python_platform_interface/CHANGELOG.md | 2 +- src/serious_python_windows/CHANGELOG.md | 2 +- src/serious_python_windows/windows/python_versions.properties | 4 ++-- 11 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index ead34392..0dbf2fa6 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,7 +1,8 @@ ## 4.3.4 +* **Windows/Linux:** desktop apps on Python **3.14** no longer crash at startup with `ModuleNotFoundError: No module named '_pyrepl'` when the app (or a dependency, e.g. NLTK) imports `pydoc` or `pdb`. `_pyrepl` was pruned from the desktop stdlib as a dev-only module, but 3.14's `pydoc`/`pdb` import it at module load. See `serious_python_windows` / `serious_python_linux` 4.3.4 and flet-dev/serious-python#236. +* Bundled python-build snapshot re-pinned to **20260719**; the only change vs 20260714 is the desktop `_pyrepl` un-prune above. All runtime versions (Python **3.12.13 / 3.13.14 / 3.14.6**, `dart_bridge` **1.5.0**) are unchanged from 4.3.3. * **Android:** fix code edits not taking effect under `flet debug android` — the app kept running stale code after a re-run because the on-device extraction cache wasn't invalidated by a same-version reinstall. See `serious_python_android` 4.3.4 and flet-dev/flet#6682. -* No runtime changes: bundled Python versions (**3.12.13 / 3.13.14 / 3.14.6**) and `dart_bridge` (**1.5.0**) are unchanged from 4.3.3. ## 4.3.3 diff --git a/src/serious_python/lib/src/python_versions.dart b/src/serious_python/lib/src/python_versions.dart index 925146ec..2134cd39 100644 --- a/src/serious_python/lib/src/python_versions.dart +++ b/src/serious_python/lib/src/python_versions.dart @@ -1,5 +1,5 @@ // GENERATED by `dart run serious_python:gen_version_tables` from python-build's -// manifest.json (release 20260714). Do not edit by hand — edit python-build's +// manifest.json (release 20260719). Do not edit by hand — edit python-build's // manifest.json, cut a release, bump `pythonReleaseDate`, and regenerate. const pythonVersionEnvironmentVariable = "SERIOUS_PYTHON_VERSION"; @@ -10,7 +10,7 @@ const pyodideVersionEnvironmentVariable = "SERIOUS_PYTHON_PYODIDE_VERSION"; const dartBridgeVersionEnvironmentVariable = "DART_BRIDGE_VERSION"; /// python-build release the bundled runtimes come from (YYYYMMDD). -const pythonReleaseDate = "20260714"; +const pythonReleaseDate = "20260719"; const dartBridgeVersion = "1.5.0"; const defaultPythonVersion = "3.14"; diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index e8c87a39..eb01fdc8 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,5 +1,6 @@ ## 4.3.4 +* Re-pins the bundled python-build snapshot to **20260719** (previously 20260714). The snapshot un-prunes `_pyrepl` on Windows/Linux desktop only; Android already shipped `_pyrepl` (un-pruned in 4.3.2), so these runtimes are byte-identical to 20260714. * **Android:** fix code edits not taking effect under `flet debug android` — the app kept running the previously-unpacked, stale code after a re-run ([flet-dev/flet#6682](https://github.com/flet-dev/flet/issues/6682)). `prepareApp` copies the app payload out of the APK only when its cache key changes, and the key was `versionName+versionCode`. Since `flet debug` reinstalls the same-version APK on each iteration (`flutter run` does an update install that preserves app data, including the cache marker), the key never changed and re-extraction was skipped. The key now also includes `PackageManager.lastUpdateTime`, which is bumped on every (re)install but stays stable across plain relaunches — so a debug reinstall re-extracts the new code while ordinary relaunches still hit the cache. `flet build apk` was unaffected (fresh/version-bumped install). ## 4.3.3 diff --git a/src/serious_python_android/android/python_versions.properties b/src/serious_python_android/android/python_versions.properties index d70c5ea7..cb87dad8 100644 --- a/src/serious_python_android/android/python_versions.properties +++ b/src/serious_python_android/android/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260714). Do not edit by hand. +# python-build manifest.json (release 20260719). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.5.0 -python_build_release_date=20260714 +python_build_release_date=20260719 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14 diff --git a/src/serious_python_darwin/CHANGELOG.md b/src/serious_python_darwin/CHANGELOG.md index b4c79b3c..bc89dc3c 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.3.4 -* Version bump aligning with the `serious_python_*` 4.3.4 release (an Android `flet debug` cache fix). No iOS/macOS-affecting changes. +* Re-pins the bundled python-build snapshot to **20260719** (previously 20260714). The snapshot un-prunes `_pyrepl` on Windows/Linux desktop (fixing a 3.14 `pydoc`/`pdb` crash — see `serious_python_windows` / `serious_python_linux` 4.3.4); iOS/macOS already shipped `_pyrepl` (un-pruned in 4.3.2), so these runtimes are byte-identical to 20260714. No iOS/macOS-affecting changes. ## 4.3.3 diff --git a/src/serious_python_darwin/darwin/python_versions.properties b/src/serious_python_darwin/darwin/python_versions.properties index d70c5ea7..cb87dad8 100644 --- a/src/serious_python_darwin/darwin/python_versions.properties +++ b/src/serious_python_darwin/darwin/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260714). Do not edit by hand. +# python-build manifest.json (release 20260719). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.5.0 -python_build_release_date=20260714 +python_build_release_date=20260719 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14 diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index 6d86c434..9b52543a 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.3.4 -* Version bump aligning with the `serious_python_*` 4.3.4 release (an Android `flet debug` cache fix). No Linux-affecting changes. +* **Fix `ModuleNotFoundError: No module named '_pyrepl'` on Python 3.14.** `_pyrepl` was pruned from the bundled Linux stdlib as a dev-only / interactive-REPL module, but CPython 3.14's `pydoc` (and `pdb`) import it at module load — so any app importing `pydoc`/`pdb`/`pytest`, or a dependency that does (e.g. NLTK → `pydoc`), crashed at startup. `_pyrepl` is no longer pruned. Re-pins the bundled python-build snapshot to **20260719** (previously 20260714). ([flet-dev/serious-python#236](https://github.com/flet-dev/serious-python/issues/236)) ## 4.3.3 diff --git a/src/serious_python_linux/linux/python_versions.properties b/src/serious_python_linux/linux/python_versions.properties index d70c5ea7..cb87dad8 100644 --- a/src/serious_python_linux/linux/python_versions.properties +++ b/src/serious_python_linux/linux/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260714). Do not edit by hand. +# python-build manifest.json (release 20260719). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.5.0 -python_build_release_date=20260714 +python_build_release_date=20260719 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14 diff --git a/src/serious_python_platform_interface/CHANGELOG.md b/src/serious_python_platform_interface/CHANGELOG.md index f2ccc571..6d3ccec6 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.3.4 -* Version bump aligning with the `serious_python_*` 4.3.4 release (an Android `flet debug` cache fix). +* Version bump aligning with the `serious_python_*` 4.3.4 release (desktop `_pyrepl` fix + Android `flet debug` cache fix). No interface changes. ## 4.3.3 diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index 10f5b13c..59929cc4 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,6 +1,6 @@ ## 4.3.4 -* Version bump aligning with the `serious_python_*` 4.3.4 release (an Android `flet debug` cache fix). No Windows-affecting changes. +* **Fix `ModuleNotFoundError: No module named '_pyrepl'` on Python 3.14.** `_pyrepl` was pruned from the bundled Windows stdlib as a dev-only / interactive-REPL module, but CPython 3.14's `pydoc` (and `pdb`) import it at module load — so any app importing `pydoc`/`pdb`/`pytest`, or a dependency that does (e.g. NLTK → `pydoc`), crashed at startup. `_pyrepl` is no longer pruned. Re-pins the bundled python-build snapshot to **20260719** (previously 20260714). ([flet-dev/serious-python#236](https://github.com/flet-dev/serious-python/issues/236)) ## 4.3.3 diff --git a/src/serious_python_windows/windows/python_versions.properties b/src/serious_python_windows/windows/python_versions.properties index d70c5ea7..cb87dad8 100644 --- a/src/serious_python_windows/windows/python_versions.properties +++ b/src/serious_python_windows/windows/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260714). Do not edit by hand. +# python-build manifest.json (release 20260719). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.5.0 -python_build_release_date=20260714 +python_build_release_date=20260719 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14