After r271938, sometimes the flatpak invocation could raise the following error without more information: Error: Invalid byte sequence in conversion input This seems to happen due to LANG being deleted in flatpakutils.py before being set in webkit-bwrap. Also, the webkit-flatpak script may fail with encoding issues when printing the messages "Running..." and "Command.... exited with non-zero status" with the non-ascii prompt.
Created attachment 418600 [details] Patch
Comment on attachment 418600 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418600&action=review > Tools/ChangeLog:10 > + (WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and What's wrong with that?
Comment on attachment 418600 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418600&action=review >> Tools/ChangeLog:10 >> + (WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and > > What's wrong with that? It's not supported in Python, it's a case of iterator invalidation: e.g. a = {"a":1, "b": 2, "c": 3} for k in a.keys(): print(k) del a[k] RuntimeError: dictionary changed size during iteration
(In reply to Alicia Boya García from comment #3) > Comment on attachment 418600 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=418600&action=review > > >> Tools/ChangeLog:10 > >> + (WebkitFlatpak.run_in_sandbox): Avoid iterating mutating dict and > > > > What's wrong with that? > > It's not supported in Python, it's a case of iterator invalidation: > > e.g. > > a = {"a":1, "b": 2, "c": 3} > > for k in a.keys(): > print(k) > del a[k] > > RuntimeError: dictionary changed size during iteration This. Py2[1] had dict.keys()[1], returning a list, and dict.viewkeys()[2], which returned an iterator (a view) on them. Py3 changed the behavior of keys() to return the view[3]. [1] https://python.readthedocs.io/en/v2.7.2/library/stdtypes.html#dict.keys [2] https://python.readthedocs.io/en/v2.7.2/library/stdtypes.html#dict.viewkeys [3] https://docs.python.org/3/library/stdtypes.html#dict.keys
Committed r272011: <https://trac.webkit.org/changeset/272011> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418600 [details].
<rdar://problem/73704686>