public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: Thomas Schwinge <thomas@codesourcery.com>, gcc@gcc.gnu.org
Cc: "Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: Git 'hooks/post_receive.py': UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 2766: invalid start byte
Date: Thu, 16 Feb 2023 14:06:44 +0100	[thread overview]
Message-ID: <7223a5d4-9310-ec99-af07-59dc38dcd806@suse.cz> (raw)
In-Reply-To: <878rgx94pq.fsf@euler.schwinge.homeip.net>

On 2/16/23 13:26, Thomas Schwinge wrote:
> Hi!
> 
> The following is not an actual problem for me or GCC/Rust; just for your
> information:

Hello.

Thanks for letting me know.

> 
> I've just pushed to GCC devel/rust/master branch
> Git commits cc23831ec66..74913f718b0, which 'hooks/post_receive.py' threw
> up upon:
> 
>     $ git push upstream github/Rust-GCC/gccrs/master:devel/rust/master
>     Enumerating objects: 326, done.
>     Counting objects: 100% (326/326), done.
>     Delta compression using up to 12 threads
>     Compressing objects: 100% (143/143), done.
>     Writing objects: 100% (224/224), 32.72 KiB | 6.54 MiB/s, done.
>     Total 224 (delta 191), reused 106 (delta 79)
>     remote: Resolving deltas: 100% (191/191), completed with 86 local objects.
>     remote: Traceback (most recent call last):
>     remote:   File "hooks/post_receive.py", line 118, in <module>
>     remote:     post_receive(refs_data, args.submitter_email)
>     remote:   File "hooks/post_receive.py", line 65, in post_receive
>     remote:     submitter_email)
>     remote:   File "hooks/post_receive.py", line 47, in post_receive_one
>     remote:     update.send_email_notifications()
>     remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/__init__.py", line 189, in send_email_notifications
>     remote:     self.__email_new_commits()
>     remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/__init__.py", line 1031, in __email_new_commits
>     remote:     commit, self.get_standard_commit_email(commit))
>     remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/__init__.py", line 1011, in __send_commit_email
>     remote:     default_diff=email.diff)
>     remote:   File "/sourceware1/projects/src-home/git-hooks/hooks/updates/__init__.py", line 946, in __maybe_get_email_custom_contents
>     remote:     hook_input=json.dumps(hooks_data),
>     remote:   File "/usr/lib64/python2.7/json/__init__.py", line 244, in dumps
>     remote:     return _default_encoder.encode(obj)
>     remote:   File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
>     remote:     chunks = self.iterencode(o, _one_shot=True)
>     remote:   File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
>     remote:     return _iterencode(o, 0)
>     remote: UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 2766: invalid start byte
>     To git+ssh://gcc.gnu.org/git/gcc.git
>        cc23831ec66..74913f718b0  github/Rust-GCC/gccrs/master -> devel/rust/master

Well, the https://github.com/AdaCore/git-hooks were ported to Python 3 some time ago and I thought we've been
using the updated version. But it seems we're still on python2.7 :((

Joseph, can we update it, please?

> 
> I very much suppose this "byte 0xff" is
> commit 92d6dc8443acbd273333cab411bfd68eaca56a89
> "Implemented UTF-8 checking for include_str!()" adding
> 'gcc/testsuite/rust/compile/invalid_utf8':
> 
>     $ od -x gcc/testsuite/rust/compile/invalid_utf8
>     0000000 0aff
>     0000002
> 
> Due to that (I suppose), Git commit emails to <gcc-cvs@gcc.gnu.org> have
> not been sent.

Dunno if that will be fixed or not, but Python 3 should make our life easier.

Martin

> 
> 
> Grüße
>  Thomas
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955


  reply	other threads:[~2023-02-16 13:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-16 12:26 Thomas Schwinge
2023-02-16 13:06 ` Martin Liška [this message]
2023-02-16 17:23   ` Joseph Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7223a5d4-9310-ec99-af07-59dc38dcd806@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).