Repository navigation
OMC 5.4.1 #31
abra-code
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
OMC 5 requires macOS 14.6 or later. For older macOS versions, use OMC 4.x.
OMC 5.4.1 is a point release on top of 5.4, built against ActionUI 0.9.0. It moves the embedded Python to 3.15.2, adds a
Chartelement and checkbox lists, and fixes a clipboard bug that could keep a command from running, along with a set of ActionUI layout and input fixes.Rebuild your applets with AppletBuilder 5.4.1. The ActionUI and engine fixes arrive only when an applet is rebuilt. The new Python does not: it has to be requested, and moving an applet from Python 3.14 to 3.15 is a decision of its own (see the next section).
Embedded Python 3.15.2
The embedded Python shipped in AppletBuilder, and copied into every new Python applet, moves from 3.14.8 to 3.15.2, with OpenSSL 4.1.0 (from 3.6.5), expat 2.9.0 and SQLite 3.54.0.
lzmais included, as in 5.4.Existing applets keep their Python until you ask. Turn on "Update Embedded Python" in Build & Run, or pass
--update-pythontoappletbuilder build. Because 3.14 to 3.15 is a minor-version upgrade, AppletBuilder asks before replacing the runtime. The Build & Run pane now shows the applet's embedded Python version, so you can see which applets are still on 3.14.Before you upgrade an applet:
Contents/Library/Packagesthat contains a version-specific extension (a file ending in.cpython-314-darwin.so) does not load in 3.15. Install it again with the 3.15 interpreter. Pure-Python packages, and extensions built for the stable ABI (.abi3.so), keep working.site-packagesis replaced, as with every Python update.Contents/Library/Packagessurvives.multiprocessingthat the standard library loads on first use, andconcurrent.futures.ProcessPoolExecutorfailed.What 3.15 changes for handler scripts:
open()and other I/O without anencodingargument read and write UTF-8, whatever the locale the applet was started with. SetPYTHONUTF8=0to get the old behavior, or passencodingexplicitly.lazy import xandlazy from m import nat module level defer the import until the name is first used, which can shorten a handler's start-up.frozendictandsentinel, unpacking in comprehensions, and a sampling profiler inprofiling.sampling.sre_compile,sre_constantsandsre_parsemodules;glob.glob0()andglob.glob1();pathlib.PurePath.is_reserved()(useos.path.isreserved());platform.java_ver();http.server.CGIHTTPRequestHandler;types.CodeType.co_lnotab;ctypes.SetPointerType(); thepackageparameter ofimportlib.resources.files(); and keyword-argumentNamedTupleand zero-fieldTypedDictforms intyping.sqlite3.connect()takes every argument exceptdatabaseby keyword only;argparse.add_argument('-f', '-foo')now names the destinationfoo;base64.urlsafe_b64decode()no longer requires padding;datetime.strptime()raisesValueErrorfor a format with%dand no year;importlib.metadata.metadata()raisesMetadataNotFoundfor a missing package instead of returning an empty result;__cached__is no longer set on modules.NO_COLOR=1orPYTHON_COLORS=0.Security fixes in 3.15.2 that matter to applets:
tarfile: thetarextraction filter accepted a link member that resolves to the destination folder itself (CVE-2026-114583).ssl: certificate chains that use any of a set of compromised eMudhra intermediate CA keys are now refused (CVE-2026-115557). A connection to a server that relies on one of them fails.http.cookiejar: a cookie with a negativeVersionwas accepted without checking its domain against the request host.Charts
The new
Chartelement draws Swift Charts from JSON:LineMark,PointMark,BarMark,AreaMark,RuleMark,RectangleMarkandSectorMark, grouped withPlotand repeated withForEach. A chart can have axis marks and label formats, axis domains, color, symbol, line-style and symbol-size scales, annotations drawn next to marks, scrolling with a visible range, and a user selection that becomes the element's value and runsvalueChangeActionID.The data comes either inline in the chart's description or as rows, which a handler fills with the same
omc_dialog_controlcommands as aTable(omc_table_set_rows,omc_table_set_rows_from_stdinand the others). Replace the whole description at runtime withomc_set_property chart '<json>'. The schema, with examples, is in the AppletBuilder documentation underChart, and the UI editor has a template for it.Checkbox lists and checkbox columns
List(or any data-driven container) whose template is aTogglebecomes a checkbox list. Each row holds its own state in the column thatisOnnames ("isOn": "$1"). Clicking a checkbox writes"true"or"false"into that row and runs the Toggle'sactionIDwith the row index; it does not select the row. The row's other columns can supplytitleanddisabled.Tablecolumn with"viewType": "Toggle"shows a checkbox in every row. The cell text is the state,disabledColumnnames a column that disables the checkbox per row, and the column'sactionIDruns with the row index as its context. Toggling does not change the table's selection.Rows written by a handler change what the checkboxes show and run no action. The full rules are in the
ToggleandTabledocumentation.Clipboard text reaches commands again
A command with no text of its own gets
$OMC_OBJ_TEXTfrom the clipboard. Two bugs could make such a command fail without running:public.utf8-plain-text) was never read, so an item whose other text types had been promised by an application that has since quit gave no text at all.Both are fixed, and UTF-16 text is read correctly when it is empty.
ActionUI fixes
hiddenhides the whole element. A hidden element drew its background, border, overlay and shadow while its content was hidden. Its space is still reserved, as documented.ScrollViewReaderscrolls. It never moved before. It now scrolls to its target when it appears, and again, animated, whenever a handler writes a target, including the same one again.SpacerminLengthfollows its stack. It is a minimum height in aVStackand a minimum width in anHStack. It used to be applied as a minimum width everywhere.DatePickerno longer emits tomorrow's date in the evening. A date-only picker wrote the UTC day, so in time zones west of UTC an evening selection came out as the next day. It now writes the local day. A date string with a zone designator (Z,+02:00) is now read as that instant and shown in the Mac's time zone; before, the designator was dropped.StepperlabelFormat:%dand%ishow the value instead of0, a format such as%@or%sshows the plain value instead of crashing the applet, and the number uses the user's decimal separator (2,5in a German locale).Sliderwith a very fine step no longer hangs the applet. SwiftUI keeps every step in memory, so a large range with a small step could use gigabytes. A step that makes more than a million steps is ignored and the slider slides freely.TextFieldlineLimitor number-format fraction length with its maximum below its minimum stopped the applet; the maximum is now raised to the minimum.TextEditorkeeps its text. Typing into it changed the screen but not the value, and undoing that typing could crash. Its text stays selectable.keyboardShortcutwith"modifiers": []binds the plain key, so a default button can answer Return and a cancel button Escape. An omittedmodifiersstill means Command.AppletBuilder
omc.window()call in a tested applet failed ("nothing could be read from descriptor 3") and AppletBuilder's control values reached handlers where a test set none. Each test file now starts clean.OMCTEST_API_VERSIONis unchanged at 7./usr/bin/python3, which is Python 3.9 and cannot read the 3.14 and 3.15 standard libraries, and the resulting plan quietly missed imports. Thinning now uses only an interpreter at least as new as the applet's, and otherwise stops with a message naming the version it needs.codesign_applet.shno longer gets an applet refused by notarization. A helper built with a plain Xcode build carries the debugger entitlementcom.apple.security.get-task-allow, and the script carried it over when re-signing, so the notary service refused the app. Signing with a certificate now drops it and says so; an ad hoc signing keeps it. If you keep your own copy of the script beside an applet, replace it with the one inScripts/.Compatibility notes
PhaseAnimatorandKeyframeAnimatorare removed. A document that still uses one shows an empty view and logs a warning, and the verifier reports an unknown element type. Use theanimationandtransitionproperties of the animated view instead."modifiers": []in akeyboardShortcutused to mean Command and now means no modifier. Remove the key to keep Command.DatePickervalues: a date string with a zone designator now means that instant, and a date-only picker reports the local day. A handler that worked around the UTC day should drop the workaround.Stepperlabels show the user's decimal separator. A handler that parses the label text, rather than the value, should expect it.In this distribution
~/Library/Preferences/com.abracode.OnMyCommandCMPrefs.plist.codesign_applet.sh,install_contextual_menu_plugin.sh,thin_distribution.sh,OMCApplet.entitlements, and the examplecom.abracode.OnMyCommandCMPrefs.plist.See the main OMC README at https://github.com/abra-code/OMC/ for full documentation on commands, runtime context, dialogs, and services.
This discussion was created from the release OMC 5.4.1.
All reactions