From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF105C433E0 for ; Tue, 5 Jan 2021 19:00:48 +0000 (UTC) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02C4D22D57 for ; Tue, 5 Jan 2021 19:00:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02C4D22D57 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=cocci-bounces@systeme.lip6.fr Received: from systeme.lip6.fr (systeme.lip6.fr [132.227.104.7]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 105J0MPC007173; Tue, 5 Jan 2021 20:00:22 +0100 (CET) Received: from systeme.lip6.fr (systeme.lip6.fr [127.0.0.1]) by systeme.lip6.fr (Postfix) with ESMTP id 5F62677A3; Tue, 5 Jan 2021 20:00:22 +0100 (CET) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by systeme.lip6.fr (Postfix) with ESMTPS id 1DC603783 for ; Tue, 5 Jan 2021 20:00:20 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by isis.lip6.fr (8.15.2/8.15.2) with ESMTP id 105J0Jom024381 for ; Tue, 5 Jan 2021 20:00:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609873218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=/Sty7bYJ3dDWQE7W7ZImS+zmZzlThoNnRUCDickVDC0=; b=EwUuyxHa36jsflQTS16Qa8TI8B9ojq0v4Gb/SpqAJEoKLERI04UhWWE2thIovjuiefQOVV EBrfieSwy5pD6EiAiZCgPm8491lnqdf16w3/KDf8YBJLAln05qqu5eUui2BxWIj3fLQgYD +Ez9rXC1ixdW6SoINTk4tJrsSAfQ7/0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-150-XruL3h7oPr6z_2lz3gPAEg-1; Tue, 05 Jan 2021 14:00:10 -0500 X-MC-Unique: XruL3h7oPr6z_2lz3gPAEg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9841AFA80 for ; Tue, 5 Jan 2021 19:00:09 +0000 (UTC) Received: from localhost (ovpn-114-98.ams2.redhat.com [10.36.114.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 855017046C for ; Tue, 5 Jan 2021 19:00:09 +0000 (UTC) Date: Tue, 5 Jan 2021 19:00:08 +0000 From: "Richard W.M. Jones" To: cocci@systeme.lip6.fr Message-ID: <20210105190008.GB27779@redhat.com> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 X-Scanned-By: MIMEDefang 2.78 on 132.227.60.2 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rjones@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Greylist: Sender IP whitelisted, Sender e-mail whitelisted, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Tue, 05 Jan 2021 20:00:23 +0100 (CET) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.4.3 (isis.lip6.fr [132.227.60.2]); Tue, 05 Jan 2021 20:00:19 +0100 (CET) Subject: [Cocci] Python 3.10 again: _Py_fopen deprecated X-BeenThere: cocci@systeme.lip6.fr X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: cocci-bounces@systeme.lip6.fr Errors-To: cocci-bounces@systeme.lip6.fr Firstly a gentle reminder that there's a patch waiting to be applied: https://systeme.lip6.fr/pipermail/cocci/2020-November/thread.html#8398 Different from that patch, but still related to Python 3.10, we've got another bug report here: https://bugzilla.redhat.com/show_bug.cgi?id=1912931 This time _Py_fopen has been deprecated, replaced by _Py_wfopen or _Py_fopen_obj. It's unclear which is better. The two functions are documented here: https://github.com/python/cpython/blob/master/Python/fileutils.c#L1418 What I don't understand from the pyxml code is why we use these internal Python functions at all, instead of calling regular C functions like fopen etc. In fact it seems like for Python 2 we did call fopen ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci