% python3
Python 3.9.6 (default, Sep 26 2022, 11:37:49)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from mac_alias import Alias
>>> a = Alias.for_file("/Applications")
>>> a.target.cnid_path
[2, 1152921500311879701, 1152921500312727487]
>>> a.to_bytes()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "~/Library/Python/3.9/lib/python/site-packages/mac_alias/alias.py", line 754, in to_bytes
self._to_fd(b)
File "~/Library/Python/3.9/lib/python/site-packages/mac_alias/alias.py", line 636, in _to_fd
cnid_path = struct.pack(
struct.error: 'I' format requires 0 <= number <= 4294967295
>>>
I don't know what the CNID path is supposed to contain, but I'm guessing that 2 is the ID for /Applications (it's about as small as I'd expect /Applications to have) and the other two are presumably whatever macOS considers to be the parent.
This is with current main branch, running on macOS Monterey.
We use this as part of building DMGs in our build as well, and those still seem to be working, so it could be that our build machines are still running an earlier version of macOS which is not affected. (Or, it could be we're getting an earlier version of mac_alias which doesn't have the issue, but that seems less likely.)