From 02827ff736fb38ad14dbfe58e754bf79774d2948 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 24 Sep 2026 01:40:12 +0200 Subject: [PATCH 1/4] fix(package): exit with status 1 when packaging fails The package command caught every exception, printed "Error: ..." to stdout and returned normally, so the process exited 0. Callers could not tell a failed run from a successful one: CI moved on to the integration tests, and flet build continued past the failed step, committed its package hash (so the next build passes --skip-site-packages) and, outside verbose mode, never showed the captured message. The catch writes the error to stderr and sets exitCode = 1. It uses exitCode rather than exit() so the finally block still removes the temporary directory and stops the Pyodide PyPI server. The early exit(1) and exit(2) paths are unchanged. --- src/serious_python/bin/package_command.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index bbe4f628..5c715442 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -597,7 +597,9 @@ class PackageCommand extends Command { } } } catch (e) { - stdout.writeln("Error: $e"); + stderr.writeln("Error: $e"); + // exitCode rather than exit(), so the finally block still cleans up. + exitCode = 1; } finally { if (tempDir != null && await tempDir.exists()) { stdout.writeln("Deleting temp directory"); From 3b35c958dbfee5724ad7669a54739465eedf3616 Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 24 Sep 2026 01:40:12 +0200 Subject: [PATCH 2/4] docs: changelog entry for the package exit status fix --- src/serious_python/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index 80b9d3ab..bae06ecd 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.7.2 + +* **Packaging:** `dart run serious_python:main package` exits with status `1` when packaging fails. Errors raised during packaging, such as `SERIOUS_PYTHON_APP` not being set for a native platform or the Swift Package Manager staging script (`prepare_spm.sh`) failing, were printed as `Error: ...` on stdout while the command still exited `0`, so callers carried on: CI failed only later in the integration tests, and `flet build` continued past the failed step, cached it as done, and did not show the message outside verbose mode. The error now goes to stderr and the temporary directory is still cleaned up; the other exit paths keep their status codes. + ## 4.7.1 * Fix macOS crashes during native scientific imports and NumPy operations by giving the asynchronous Python worker at least **8 MiB** of stack space, via `dart_bridge` 1.10.0. ([dart-bridge#21](https://github.com/flet-dev/dart-bridge/pull/21), [#85](https://github.com/flet-dev/serious-python/issues/85)) From 468268748eb4208db27cc00d1e56d38e73f1459e Mon Sep 17 00:00:00 2001 From: ndonkoHenri Date: Thu, 24 Sep 2026 09:25:42 +0200 Subject: [PATCH 3/4] update --- src/serious_python/bin/package_command.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index 5c715442..a55ef8a0 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -598,7 +598,6 @@ class PackageCommand extends Command { } } catch (e) { stderr.writeln("Error: $e"); - // exitCode rather than exit(), so the finally block still cleans up. exitCode = 1; } finally { if (tempDir != null && await tempDir.exists()) { From 182ecb727793e462be2892e2f23bd896a046754d Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Thu, 24 Sep 2026 16:30:24 -0700 Subject: [PATCH 4/4] Prepare serious_python 4.7.2 release --- src/serious_python/CHANGELOG.md | 6 +++--- .../example/flask_example/pubspec.lock | 12 ++++++------ src/serious_python/example/run_example/pubspec.lock | 12 ++++++------ src/serious_python/pubspec.yaml | 2 +- src/serious_python_android/CHANGELOG.md | 4 ++++ src/serious_python_android/android/build.gradle.kts | 2 +- src/serious_python_android/pubspec.yaml | 2 +- src/serious_python_darwin/CHANGELOG.md | 4 ++-- .../darwin/serious_python_darwin.podspec | 2 +- src/serious_python_darwin/pubspec.yaml | 2 +- src/serious_python_linux/CHANGELOG.md | 4 ++++ src/serious_python_linux/pubspec.yaml | 2 +- src/serious_python_platform_interface/CHANGELOG.md | 4 ++++ src/serious_python_platform_interface/pubspec.yaml | 2 +- src/serious_python_windows/CHANGELOG.md | 4 ++++ src/serious_python_windows/pubspec.yaml | 2 +- 16 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index 269a0505..70775813 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,8 +1,8 @@ ## 4.7.2 -* **Packaging:** `dart run serious_python:main package` exits with status `1` when packaging fails. Errors raised during packaging, such as `SERIOUS_PYTHON_APP` not being set for a native platform or the Swift Package Manager staging script (`prepare_spm.sh`) failing, were printed as `Error: ...` on stdout while the command still exited `0`, so callers carried on: CI failed only later in the integration tests, and `flet build` continued past the failed step, cached it as done, and did not show the message outside verbose mode. The error now goes to stderr and the temporary directory is still cleaned up; the other exit paths keep their status codes. -* **macOS:** fix App Store Connect error `90238` ("does not satisfy its designated Requirement") for bundled native modules after Xcode distribution signing ([#250](https://github.com/flet-dev/serious-python/issues/250)). See `serious_python_darwin` 4.7.2. -* **iOS/macOS (CocoaPods):** fail `pod install` when a Python runtime preparation script fails, preventing builds from continuing with an incomplete runtime. See `serious_python_darwin` 4.7.2. +* **Packaging:** report packaging exceptions on stderr and exit with status `1`, so CI and `flet build` stop on failure while temporary files are still cleaned up ([#252](https://github.com/flet-dev/serious-python/pull/252)). +* **macOS:** fix App Store Connect error `90238` ("does not satisfy its designated Requirement") for bundled native modules after Xcode distribution signing ([#250](https://github.com/flet-dev/serious-python/issues/250), [#251](https://github.com/flet-dev/serious-python/pull/251)). See `serious_python_darwin` 4.7.2. +* **iOS/macOS (CocoaPods):** fail `pod install` when a Python runtime preparation script fails, preventing builds from continuing with an incomplete runtime. See `serious_python_darwin` 4.7.2. ([#251](https://github.com/flet-dev/serious-python/pull/251)) ## 4.7.1 diff --git a/src/serious_python/example/flask_example/pubspec.lock b/src/serious_python/example/flask_example/pubspec.lock index 65022982..5a8390a0 100644 --- a/src/serious_python/example/flask_example/pubspec.lock +++ b/src/serious_python/example/flask_example/pubspec.lock @@ -361,42 +361,42 @@ packages: path: "../.." relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "4.7.1" + version: "4.7.2" shelf: dependency: transitive description: diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index 5d064a73..98bf80dd 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -384,42 +384,42 @@ packages: path: "../.." relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "4.7.1" + version: "4.7.2" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "4.7.1" + version: "4.7.2" shelf: dependency: transitive description: diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index e6e0ee9f..c42cca47 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python description: A cross-platform plugin for adding embedded Python runtime to your Flutter apps. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.7.1 +version: 4.7.2 platforms: ios: diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index cb883fee..cf75b76f 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.7.2 + +* Align with the serious_python **4.7.2** release ([#252](https://github.com/flet-dev/serious-python/pull/252)). + ## 4.7.1 * Update the python-build snapshot to **20260921** and `dart_bridge` to **1.10.0**. CPython versions remain **3.12.14 / 3.13.15 / 3.14.7**. ([python-build#42](https://github.com/flet-dev/python-build/pull/42)) diff --git a/src/serious_python_android/android/build.gradle.kts b/src/serious_python_android/android/build.gradle.kts index c0c1510a..95f6b674 100644 --- a/src/serious_python_android/android/build.gradle.kts +++ b/src/serious_python_android/android/build.gradle.kts @@ -21,7 +21,7 @@ buildscript { } group = "com.flet.serious_python_android" -version = "4.7.1" +version = "4.7.2" rootProject.allprojects { repositories { diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index 8efd2980..c0e90b0c 100644 --- a/src/serious_python_android/pubspec.yaml +++ b/src/serious_python_android/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_android description: Android implementation of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.7.1 +version: 4.7.2 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_darwin/CHANGELOG.md b/src/serious_python_darwin/CHANGELOG.md index 76a0b2b9..a9ba1ce1 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,7 +1,7 @@ ## 4.7.2 -* **macOS:** fix App Store Connect error `90238` ("does not satisfy its designated Requirement") caused by linker-signed native modules ([#250](https://github.com/flet-dev/serious-python/issues/250)). Staging now replaces linker signatures on `.so` and `.dylib` files in the stdlib, site-packages and app with regular ad-hoc signatures. This preserves their signing identifiers when Xcode re-signs them for distribution, avoiding a mismatch with their designated requirements. -* **iOS/macOS (CocoaPods):** `pod install` now stops when a Python runtime preparation script exits with an error. Previously, the podspec ignored these failures, allowing builds to continue despite native module signing errors, provider integrity mismatches, or provider signature verification failures in `require` mode. +* **macOS:** fix App Store Connect error `90238` ("does not satisfy its designated Requirement") caused by linker-signed native modules ([#250](https://github.com/flet-dev/serious-python/issues/250), [#251](https://github.com/flet-dev/serious-python/pull/251)). Staging now replaces linker signatures on `.so` and `.dylib` files in the stdlib, site-packages and app with regular ad-hoc signatures. This preserves their signing identifiers when Xcode re-signs them for distribution, avoiding a mismatch with their designated requirements. +* **iOS/macOS (CocoaPods):** `pod install` now stops when a Python runtime preparation script exits with an error. Previously, the podspec ignored these failures, allowing builds to continue despite native module signing errors, provider integrity mismatches, or provider signature verification failures in `require` mode. ([#251](https://github.com/flet-dev/serious-python/pull/251)) ## 4.7.1 diff --git a/src/serious_python_darwin/darwin/serious_python_darwin.podspec b/src/serious_python_darwin/darwin/serious_python_darwin.podspec index 207c32c2..00bcf761 100644 --- a/src/serious_python_darwin/darwin/serious_python_darwin.podspec +++ b/src/serious_python_darwin/darwin/serious_python_darwin.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'serious_python_darwin' - s.version = '4.7.1' + s.version = '4.7.2' s.summary = 'A cross-platform plugin for adding embedded Python runtime to your Flutter apps.' s.description = <<-DESC A cross-platform plugin for adding embedded Python runtime to your Flutter apps. diff --git a/src/serious_python_darwin/pubspec.yaml b/src/serious_python_darwin/pubspec.yaml index 37aa0386..6fd95b67 100644 --- a/src/serious_python_darwin/pubspec.yaml +++ b/src/serious_python_darwin/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_darwin description: iOS and macOS implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.7.1 +version: 4.7.2 environment: # The Swift Package Manager build path needs Flutter 3.44 / Dart 3.11 (the diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index 883819ad..f4dd8a28 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.7.2 + +* Align with the serious_python **4.7.2** release ([#252](https://github.com/flet-dev/serious-python/pull/252)). + ## 4.7.1 * Update the python-build snapshot to **20260921** and `dart_bridge` to **1.10.0**. CPython versions remain **3.12.14 / 3.13.15 / 3.14.7**. ([python-build#42](https://github.com/flet-dev/python-build/pull/42)) diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index 4616a14b..0d90986b 100644 --- a/src/serious_python_linux/pubspec.yaml +++ b/src/serious_python_linux/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_linux description: Linux implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.7.1 +version: 4.7.2 environment: sdk: '>=3.1.3 <4.0.0' diff --git a/src/serious_python_platform_interface/CHANGELOG.md b/src/serious_python_platform_interface/CHANGELOG.md index 90fe4608..29f16a25 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.7.2 + +* Align with the serious_python **4.7.2** release ([#252](https://github.com/flet-dev/serious-python/pull/252)). + ## 4.7.1 * Align with the serious_python **4.7.1** release. diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 90e80387..0d5d15f4 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_platform_interface description: A common platform interface for the serious_python plugin. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.7.1 +version: 4.7.2 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index 455173d9..26bf6d36 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.7.2 + +* Align with the serious_python **4.7.2** release ([#252](https://github.com/flet-dev/serious-python/pull/252)). + ## 4.7.1 * Update the python-build snapshot to **20260921** and `dart_bridge` to **1.10.0**. CPython versions remain **3.12.14 / 3.13.15 / 3.14.7**. ([python-build#42](https://github.com/flet-dev/python-build/pull/42)) diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 44c5d130..cf7536b1 100644 --- a/src/serious_python_windows/pubspec.yaml +++ b/src/serious_python_windows/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_windows description: Windows implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.7.1 +version: 4.7.2 environment: sdk: '>=3.1.3 <4.0.0'