RESOLVED CONFIGURATION CHANGED 244682
[GLib][webkitpy] Script apply-build-revision-to-files.py does not work with Python 3.10
https://bugs.webkit.org/show_bug.cgi?id=244682
Summary [GLib][webkitpy] Script apply-build-revision-to-files.py does not work with P...
Adrian Perez
Reported 2022-09-01 11:36:24 PDT
Traceback (most recent call last): File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py", line 68, in <module> sys.exit(main(sys.argv[1:])) File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py", line 41, in main build_revision = get_build_revision() File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py", line 32, in get_build_revision return str(repository.find("HEAD", include_log=False)) File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 871, in find return self.commit(hash=output.stdout.rstrip(), include_log=include_log, include_identifier=include_identifier) File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 685, in commit cached_identifier = self.cache.to_identifier(hash=hash, branch=branch) if self.cache else None File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 295, in to_identifier self.populate(branch=branch) File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 114, in populate self.populate(branch=self.repo.default_branch, remote=self.repo.default_remote) File "/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 162, in populate line = log.stdout.readline() File "/home/aperez/buildroot/output-rpi4test/per-package/wpewebkit/host/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xea in position 4655: invalid continuation byte
Attachments
Adrian Perez
Comment 1 2022-09-01 11:40:34 PDT
Populating the cache only needs to parse identifiers which should be exclusively ASCII, so as long as we get to read those, it does not matter what's the encoding of Git commit logs. I think it would be good to use an ASCII stream reader that ignores decoding errors to make the code more robust to whatever oddball content may be present in commit logs.
Adrian Perez
Comment 2 2022-09-01 14:12:23 PDT
Adrian Perez
Comment 3 2022-09-26 13:08:42 PDT
This should not be an issue after 254851@main
Note You need to log in before you can comment on or make changes to this bug.