From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mx.groups.io with SMTP id smtpd.web09.261.1631730203933056140 for ; Wed, 15 Sep 2021 11:23:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=ea9ImAE+; spf=pass (domain: nuviainc.com, ip: 209.85.214.177, mailfrom: rebecca@nuviainc.com) Received: by mail-pl1-f177.google.com with SMTP id n4so2147847plh.9 for ; Wed, 15 Sep 2021 11:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=dtA3HX7yMmOCap9emHHoaDIJS6yyOihaIBbyLFEVaac=; b=ea9ImAE+5gdyW9v3UAioqWR91SK8faPkWHICdJRSCl2BT3xDj8O4po8rOfnDdOzFfZ 7nPv7xreh6VnO8XxTpYEb9zicXi/Pxm2Zst5ZNrV1Uch6ZMJxzDEq9SjUCT6G4wjtv/E VvONQI1vJrvwzBpnLzd/jASWaBAL9JYJxov8nLEMGh5CcnhSLNYbTsH8D9pRSv0o1aOq /iFtC4VC0yNY/EiQCtr9PJo+AaiWVfWNmlbaYtMYTRA7WZPpXwBrezyo1Lb4Sm8e2Wjn CmXxASSo07XvCfPVlXr8azhz7iksPixmHwtGU9wVcWM3BqD0ZsuD1R016epZYuCVbeqC g+bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=dtA3HX7yMmOCap9emHHoaDIJS6yyOihaIBbyLFEVaac=; b=SnaZM/5c+voc0tAHCzSmgtaIZ2vyH+l5PvZUjRc4VAec2mmQryNuPa6CZLElKzuWVH NjHXJiJk/kfLK7108sfSJqr0+nKZwIqRebMSgmnpjPHc2Er+6GSDauWBC/YKz3Js25yd BxzFVTinb1l5N7htmD+BB4rztI5XiKp1GzUX+WszTfAeFXEN/w0+N8dgfZmHismrFVtk lsgr+HE5X1f+bcYIKfIvX3JddoOr5MpERbRaGJfWMI+cJx0+ePgvdUEaTatkAhaU/9xs B1GXmNCqFRFBz6iCipgEIo0sPXY0ttdTmSCBJBtEUtaMYrFjM1wm9b4TStipslSdT8c8 zMEg== X-Gm-Message-State: AOAM533Rel4qQOnO7iROokiRo7+g9JKLgulyX5X3lphCl9vI93AYBIW3 RLYwVGvp9JDerQlYQe6y+Y7Lhg== X-Google-Smtp-Source: ABdhPJytMcmlHEhbdkinlSztuio39hKUWH9Kybfvm++1PUd4prLfI24RrtSlRasragXQqNipCp5UIw== X-Received: by 2002:a17:902:f703:b029:12c:982:c9ae with SMTP id h3-20020a170902f703b029012c0982c9aemr891306plo.20.1631730203422; Wed, 15 Sep 2021 11:23:23 -0700 (PDT) Return-Path: Received: from linbox.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id z62sm5343161pjj.53.2021.09.15.11.23.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Sep 2021 11:23:23 -0700 (PDT) Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] AppPkg/Applications/Python/Python3.6.8: add support for atexit builtin module in py 3.6.8 To: devel@edk2.groups.io, n.jayaprakash@intel.com Cc: Michael D Kinney References: <20210914152824.2566-1-n.jayaprakash@intel.com> <20210914152824.2566-2-n.jayaprakash@intel.com> From: "Rebecca Cran" Message-ID: <7a6a8f63-7c90-b99d-56e5-25b8a896175b@nuviainc.com> Date: Wed, 15 Sep 2021 12:23:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210914152824.2566-2-n.jayaprakash@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Reviewed-by: Rebecca Cran Pushed as 60added7a61075607080ff718d7fa5e764a37044. -- Rebecca Cran On 9/14/21 9:28 AM, Jayaprakash, N wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3626 > > This commit adds support for the atexit a builtin module > in standard python 3.6.8 to it's UEFI port. There are tools > like Chipsec which are dependent on it but it can be used by > other python scripts running on UEFI shell with the help of > py 3.6.8 interpreter. Tested the changes on IA32 and X64 emulators > and it is working good. > > Cc: Rebecca Cran > Cc: Michael D Kinney > Signed-off-by: Jayaprakash N > --- > AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt | 1 + > .../Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c | 2 ++ > AppPkg/Applications/Python/Python-3.6.8/Python368.inf | 1 + > 3 files changed, 4 insertions(+) > > diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > index 69bb6bd..fb81228 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt > @@ -175,6 +175,7 @@ system as follows: > _symtable Modules/symtablemodule.c > _weakref Modules/_weakref.c > array Modules/arraymodule.c > + atexit Modules/atexitmodule.c > binascii Modules/binascii.c > cmath Modules/cmathmodule.c > datetime Modules/_datetimemodule.c > diff --git a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c > index 4b1eb0f..5ee42d8 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c > +++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/config.c > @@ -65,6 +65,7 @@ extern PyObject* PyInit__weakref(void); > extern PyObject* init_winreg(void); > extern PyObject* PyInit_zlib(void); > extern PyObject* initbz2(void); > +extern PyObject* PyInit_atexit(void); > > extern PyObject* PyMarshal_Init(void); > extern PyObject* _PyWarnings_Init(void); > @@ -111,6 +112,7 @@ struct _inittab _PyImport_Inittab[] = { > {"gc", PyInit_gc}, > {"math", PyInit_math}, > {"array", PyInit_array}, > + {"atexit", PyInit_atexit}, > {"_datetime", PyInit__datetime}, > {"parser", PyInit_parser}, > {"pyexpat", PyInit_pyexpat}, > diff --git a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf > index d2e6e73..b98b4a7 100644 > --- a/AppPkg/Applications/Python/Python-3.6.8/Python368.inf > +++ b/AppPkg/Applications/Python/Python-3.6.8/Python368.inf > @@ -215,6 +215,7 @@ > Modules/_io/iobase.c # > Modules/_io/stringio.c # > Modules/_io/textio.c # > + Modules/atexitmodule.c # > > #Modules/cjkcodecs > Modules/cjkcodecs/multibytecodec.c #