Skip to content

fix: load Homebrew's PySide6 when it's built for another Python version - #129

Merged
mcoliver merged 3 commits into
mainfrom
fix/pyside-python-mismatch
Oct 14, 2026
Merged

mcoliver merged 3 commits into
mainfrom
fix/pyside-python-mismatch

Conversation

@mcoliver

@mcoliver mcoliver commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Homebrew builds pyside for one Python version and moves it on its own schedule. It moved to 3.15 on 2026-10-14. With 2026.13, which uses 3.14, PySide6 can't be imported, so Media Info, multiple source media rep and local thumbnail generation fail to load:

ERROR: python module media_info could not be imported
ERROR: python module multiple_source_media_rep could not be imported
ERROR: python module local_thumbnail_gen could not be imported

Homebrew's PySide6 modules use Python's stable ABI (QtCore.abi3.so, Shiboken.abi3.so), so they load in any Python 3.10 or newer. Only the version-specific directory, opt/pyside/lib/python3.15/site-packages, kept 3.14 from finding them.

  • DarwinBundle (macOS) and QTBundle (Linux): when opt/pyside/lib has no build for UTV's Python, append the site-packages of the newest other version to PYTHONPATH. This covers UTV-bin, py-interp and the tools. A build for UTV's Python is still found first, so nothing changes when the versions match.
  • Homebrew canary: checks that py-interp can import PySide6. The daily canary only started the apps, so it passed with this breakage.

This lets a release keep working when Homebrew's pyside moves to the next Python. It doesn't cover Homebrew removing UTV's Python itself, or Qt changes.

Testing Done

  • Released 2026.13: with PYTHONPATH set to Homebrew's python3.15 pyside, 2026.13 (Python 3.14) imports PySide6 6.12.0, and UTV-bin starts without the three import errors.
  • This branch: built py-interp for Python 3.14 against Homebrew's pyside 6.12.0_1 (3.15 only). With no PYTHONPATH, sys.path gains /opt/homebrew/opt/pyside/lib/python3.15/site-packages and from PySide6 import QtCore works.
  • Canary: it runs on this PR against the released 2026.13, which doesn't have this fix, so it fails until a release that includes this PR ships. On the first run it reported UTV uses python3.14; Homebrew's pyside is built for python3.15.

Homebrew builds pyside for one Python version and moves it on its own
schedule. When it no longer matches the Python UTV was built for, UTV
still starts but PySide6 can't be imported and its PySide features
(Media Info, thumbnail generation) don't load, with only a console error.

- macOS launcher: compare Contents/lib/python3.X with
  opt/pyside/lib/python3.Y. From Finder, show a warning with Continue,
  Update with Homebrew and Quit, which can be silenced until either side
  changes. From a terminal, print the warning and continue.
- Linux bin/utv: print the same warning.
- Homebrew canary: import PySide6 with py-interp, since UTV starting
  is no longer enough to catch this.

UTV_SKIP_PYSIDE_CHECK=1 skips the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Homebrew builds pyside for one Python version and moves it on its own
schedule. Its modules use Python's stable ABI (*.abi3.so), so the only
thing stopping a build for Python 3.15 from loading in UTV's 3.14 is the
version-specific site-packages directory. When opt/pyside has no build
for UTV's Python, append its site-packages for the newest other version
to PYTHONPATH. A build for UTV's Python still wins.

Replaces the launcher and bin/utv warnings from the previous commit:
with the fallback, a version mismatch no longer turns PySide off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
@mcoliver mcoliver changed the title fix: warn when Homebrew's pyside is built for a different Python fix: load Homebrew's PySide6 when it's built for another Python version Oct 14, 2026
@mcoliver
mcoliver merged commit ab7579e into main Oct 14, 2026
18 of 22 checks passed
@mcoliver
mcoliver deleted the fix/pyside-python-mismatch branch October 14, 2026 18:44
mcoliver added a commit that referenced this pull request Oct 14, 2026
… on failure (#132)

* ci(dev-build): recreate the dev-build tag instead of moving it

GITHUB_TOKEN can't update a ref across commits that change
.github/workflows, so the PATCH that moved the dev-build tag failed with
"Resource not accessible by integration" whenever a workflow had changed
since the last dev build (ab7579e, after #129 changed
homebrew-canary.yml). The release had already been deleted, so no
dev-build release was left.

Delete the tag and let `gh release create --target` create it on this
commit instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>

* ci(dev-build): move the tag before replacing the release, and keep it on failure

Recreating the tag doesn't avoid the 403: re-running the ab7579e job
with the tag already on that commit failed the same way. GITHUB_TOKEN
may not point a ref at a commit whose workflow files differ from main's,
which happens when a workflow change (#131) is merged during the build.

Move the tag first and only delete and recreate the release when that
works. Otherwise upload the files to the existing release with
--clobber and update its notes, so a dev-build release always exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>

---------

Signed-off-by: Michael Oliver <mcoliver@gmail.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