From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id A10303858C5F for ; Thu, 16 Feb 2023 13:06:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A10303858C5F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7EB4321DD6; Thu, 16 Feb 2023 13:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1676552804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6MTqZfAeb6viGSznfl9jaA4y6g9PuHyT23powieHZZA=; b=fEKxCw2YkHCSXhGrBWOyN+VAABpLRyNMFXIQUTB1yDT4hB7SIj7HndDVJPaM0mPCxcUwUA KTB9rsnVGcc7mVV07yiN/JaGTTmbMMts2hy/S3x+MUCjK4dNxL3yKzuIeItihY4jMy8AbN 9tOd5cl0SfqgiS09PzC305vbGBYfGt0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1676552804; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6MTqZfAeb6viGSznfl9jaA4y6g9PuHyT23powieHZZA=; b=mScHFyXqKFJrzsMT2fx59lzDHgn0doyyisoSPjcHF9uhQpMOBpGhYZCKcY4Zt8S4tQSDtZ 9rOS6qt7NKb0qFAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 6854B13438; Thu, 16 Feb 2023 13:06:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id I79+GGQq7mM2UwAAMHmgww (envelope-from ); Thu, 16 Feb 2023 13:06:44 +0000 Message-ID: <7223a5d4-9310-ec99-af07-59dc38dcd806@suse.cz> Date: Thu, 16 Feb 2023 14:06:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: Git 'hooks/post_receive.py': UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 2766: invalid start byte To: Thomas Schwinge , gcc@gcc.gnu.org References: <878rgx94pq.fsf@euler.schwinge.homeip.net> Content-Language: en-US Cc: "Joseph S. Myers" From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <878rgx94pq.fsf@euler.schwinge.homeip.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 > 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 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