<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>244682</bug_id>
          
          <creation_ts>2022-09-01 11:36:24 -0700</creation_ts>
          <short_desc>[GLib][webkitpy] Script apply-build-revision-to-files.py does not work with Python 3.10</short_desc>
          <delta_ts>2022-09-26 13:08:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=242191</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1895553</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-09-01 11:36:24 -0700</bug_when>
    <thetext>Traceback (most recent call last):
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py&quot;, line 68, in &lt;module&gt;
    sys.exit(main(sys.argv[1:]))
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py&quot;, line 41, in main
    build_revision = get_build_revision()
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/glib/apply-build-revision-to-files.py&quot;, line 32, in get_build_revision
    return str(repository.find(&quot;HEAD&quot;, include_log=False))
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 871, in find
    return self.commit(hash=output.stdout.rstrip(), include_log=include_log, include_identifier=include_identifier)
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 685, in commit
    cached_identifier = self.cache.to_identifier(hash=hash, branch=branch) if self.cache else None
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 295, in to_identifier
    self.populate(branch=branch)
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 114, in populate
    self.populate(branch=self.repo.default_branch, remote=self.repo.default_remote)
  File &quot;/home/aperez/buildroot/output-rpi4test/build/wpewebkit-custom/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 162, in populate
    line = log.stdout.readline()
  File &quot;/home/aperez/buildroot/output-rpi4test/per-package/wpewebkit/host/lib/python3.10/codecs.py&quot;, line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: &apos;utf-8&apos; codec can&apos;t decode byte 0xea in position 4655: invalid continuation byte</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895557</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-09-01 11:40:34 -0700</bug_when>
    <thetext>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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1895593</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-09-01 14:12:23 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/3931</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901274</commentid>
    <comment_count>3</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-09-26 13:08:42 -0700</bug_when>
    <thetext>This should not be an issue after 254851@main</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>