Skip to content

Fix macOS crash, upgrade deps for Python 3.14, reduce bundle size#900

Open
usqr wants to merge 14 commits intofman-users:mainfrom
usqr:fix/macos-crash-upgrade-deps-python314
Open

Fix macOS crash, upgrade deps for Python 3.14, reduce bundle size#900
usqr wants to merge 14 commits intofman-users:mainfrom
usqr:fix/macos-crash-upgrade-deps-python314

Conversation

@usqr
Copy link
Copy Markdown

@usqr usqr commented Mar 25, 2026

Summary

  • Fix SIGSEGV crash on macOS 26 caused by outdated pyobjc-core 7.1 incompatible with modern Objective-C runtime under Rosetta
  • Full Python 3.14 compatibility: fix removed private APIs (_some_str, read-only exc_type), implicit float-to-int conversions rejected by PyQt5
  • Upgrade all dependencies to modern versions (PyInstaller 6.19, pyobjc-core 12.1, rsa 4.9, boto3 1.35, requests 2.32, etc.)
  • Fix slow GoTo quicksearch (~2s → ~125ms) by caching CoreServices.framework loading
  • Fix frozen app build for PyInstaller 6.x (osxtrash module path, fbs pip syntax)
  • Reduce macOS bundle size from ~110MB to ~77MB by stripping unused Qt frameworks and build-only deps
  • Remove legacy Python 3.5/3.6 workarounds
  • Add CHANGELOG.md and update README

Test plan

  • python build.py test — 461 tests, 459 pass (2 pre-existing zip ordering failures)
  • python build.py run — app launches, no crash
  • python build.py freeze — frozen fman.app builds and launches
  • Cmd+P (GoTo) — quicksearch opens, Spotlight integration works, typing responsive
  • Cmd+Shift+P (Command Palette) — opens with all commands, filtering works
  • Verified on macOS 26.3.1 / Apple Silicon / Python 3.14

🤖 Generated with Claude Code

usqr and others added 14 commits March 25, 2026 08:40
pyobjc-core 7.1 (built for CPython 3.6) crashes in PyObjCClass_NewMetaClass
when loading Objective-C classes on macOS 26.3.1 under Rosetta.
Version 10.3.1 has native Apple Silicon support and modern macOS compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PyInstaller 4.4 -> 6.11.1 (EOL fix)
rsa 3.4.2 -> 4.9 (security)
boto3 1.17.26 -> 1.35.99 (3 years of fixes)
requests 2.25.1 -> 2.32.3 (security patches)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PyQt5 5.15.4 -> 5.15.11 (align with base)
Send2Trash 1.4.2 -> 1.8.3
pywinpty 0.5.7 (wheel) -> 2.0.14 (PyPI)
pywin32 300 -> 308

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Send2Trash 1.5.0 -> 1.8.3
distro 1.0.4 -> 1.9.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Python 3.9 is the minimum version. Remove unnecessary try/except
for Path.resolve(strict=True) and update version references in comments.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…14 compat

PyInstaller 6.11.1 requires Python <3.14; 6.19.0 supports 3.14.
pyobjc-core 10.3.1 uses pkg_resources (removed in 3.14); 12.1 works.
Also fix fbs egg fragment syntax for modern pip (PEP 440 Direct URL).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
traceback._some_str was a private function removed in Python 3.14.
Replace with inline safe-str conversion (try/except).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
\F in the docstring is not a valid escape sequence and will become
an error in a future Python version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
traceback._some_str was a private function removed in Python 3.14.
Also refactor TracebackExceptionWithTbFilter to call super().__init__()
instead of reimplementing it, fixing exc_type read-only property and
missing exceptions attribute in Python 3.14.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PyInstaller 6.x sets sys._MEIPASS to Contents/Frameworks, not
Contents/MacOS. Move osxtrash .so there so it's importable at runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Python 3.14 removed implicit float-to-int conversion in C extensions.
QSize, QPoint, and setPointSize now reject float arguments. Cast
CSS-derived values to int explicitly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
loadBundle('CoreServices.framework') takes ~800ms on first call with
pyobjc-core 12.1. Cache the namespace in LocalFileSystem so subsequent
GoTo queries don't re-load the framework. Also pre-warm the framework
in a background thread at app startup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove boto3/botocore/s3transfer (build-only, not runtime: ~40MB).
Remove unused Qt frameworks: QtQml, QtQmlModels, QtQuick, QtWebSockets.
Remove unused Qt plugins: webgl, minimal, offscreen, bearer, generic,
platformthemes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update Python version requirement (3.9+, tested to 3.14), add
per-platform install commands and key dependencies table.
Add CHANGELOG documenting all fixes and dependency upgrades.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant