From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AEnTAY58rmTXLgAASxT56A (envelope-from ) for ; Wed, 12 Jul 2023 12:12:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4BsSAY58rmRuQAAAG6o9tA (envelope-from ) for ; Wed, 12 Jul 2023 12:12:30 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9FA153AF90 for ; Wed, 12 Jul 2023 12:12:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=NytLUzx8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689156749; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KNYZvuLxXO1UYSjj9vtJahrvolPTJcBlek5aEAJAqm0=; b=uJsmh7ikmQerVuQVR9/iwtABSLir2ch/ZvsHC6EY2xSLnTvX91owFqQ1CrTbPyQBKJtfRe mFltDwg05P12PQzz3iROn6UV8cWOtjjaCtG2oMVyJ0JeEa3IRBz2pPKcRrmJOYYYNEwrKY fKbe+rPhDw6pp8rQERLyNBC7RsKK+j2GtELt2tVk7u3Lg1irOlfCSgGWWOkoF4HX7iYUNN crYNFNEaYAtdwAV92XVlkpgWNDBEN5OAqLWmVz7NNGXUOaOnN05qj7D45HNICiyVfRKg62 whbEdU3yHrgRWCCsX1R0yBx0/4IQlJHg3veaONH0fZYsPKunvWeFTVjYFvI49g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=NytLUzx8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689156749; a=rsa-sha256; cv=none; b=qU3/r7arpd3ncC3ou8plH2gNtajPIQrqAFwPOXtJLenUex3xQprTOPFPqcYtkteH6d+7FC IKF1gCj41kxUzvHMWS0uvE/0ipgwJqTvF6mk1Bk7sfERkRPmOM6IMg5oKxIAgPsWz/SZEE JWoF1DirvGZvGM6U+W/EkiGXZixmnl+J3i8uvc3fnDSmd36rLgehuk+4j4Gl4p/gSgn7g1 zgauSwy/tGVAu1pEfAvBASmLtv5pqcvHph3gFp1UmPBh8+1RTosB5yE1DAlT9vrEq1nmEK g6ToQa523x+WNYYcoqZSYBshqHYL1g2oPBDKNwvl29/T+5StuXpxEBBbLhcn/A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJWom-0002Xu-Sm; Wed, 12 Jul 2023 06:11:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJWok-0002Xk-KS for emacs-orgmode@gnu.org; Wed, 12 Jul 2023 06:11:30 -0400 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJWoj-0002cj-1o for emacs-orgmode@gnu.org; Wed, 12 Jul 2023 06:11:30 -0400 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-563439ea4a2so4636560eaf.0 for ; Wed, 12 Jul 2023 03:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689156687; x=1691748687; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KNYZvuLxXO1UYSjj9vtJahrvolPTJcBlek5aEAJAqm0=; b=NytLUzx8vASNJgIbW7dJhoegJdYkQyU9I9/IQ53Ut3RUcoRkegrTK5h88d7q8W/K6M ykbb4UCa7wT2xKqy0Okw1QzPOeRRhfc57R4jXwPplxahPdcI7YpQ7drYNb0oXqzRTdxJ sQ7cQtkY1lGotY34JyqDhUOV8fRzsqhklZAXXBC8R1BGkYQ5UG7kKH4dtT2IG6gm1e8T yfUnsCxtuw+cDAfiLM6hRXh9KvHbyVqsMQSSQbs+7bNcNgwhqVxNpMicCII0TqDQeOnU DS2GBalRVpXxJ5Bl2bBFBN7Z545SYBGC2cGBIgwgs2qdTv28tbJ1IGNRls/BOJ7wGjjl Ok3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689156687; x=1691748687; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KNYZvuLxXO1UYSjj9vtJahrvolPTJcBlek5aEAJAqm0=; b=ZsyRxrJcP2jhCIW6VefI/Xx1zg7YHKIV4524Dj23KyejygfiG/cXYaTzYQTAahR6zk gInPGiwYyBCrjWMm3wmkNlvMWhSYXEgYfoqStgIBrrIqg+J0kAqS7mst8ao+X5XVHjY7 MMHiceXlk5DgTI55ltgtxjVBO0GtJDl1wsEZmDjhUk1VZX5zyQfgQWD/DGNaCadzg/cp WHk5czHllpyFUqAwQ4ULAuj+lk7aKcwlkPRTkn/UQcjEez6EYWyEshw5hGplqXK8dkxJ IO4f3y1KU3AxWRQoYrAFnjfpdyPGpvq2FCupfnS9hYEAqCuUEOwoFEqkX0IexSFArjJt eoug== X-Gm-Message-State: ABy/qLbOdSfCaaS5RBIV30IBoMfBV/pJjf63e32vRsOuE6UwvkZx6c/K jJewUPv6JgklxSKLF8NIgo+fP7Bh8gmRI5/YNjA= X-Google-Smtp-Source: APBJJlEkmX5VKLY+BiStn459p6pnoLybxDnBveeYB3cETbJCFV5Vd4QjC/wpD80EMhQeMQ0ETFPKnwUD2g582D7BuVc= X-Received: by 2002:a4a:e83c:0:b0:563:60b4:db82 with SMTP id d28-20020a4ae83c000000b0056360b4db82mr13016343ood.2.1689156687098; Wed, 12 Jul 2023 03:11:27 -0700 (PDT) MIME-Version: 1.0 References: <87ilaqolmf.fsf@localhost> <87ilapka0e.fsf@gmail.com> In-Reply-To: <87ilapka0e.fsf@gmail.com> From: Liu Hui Date: Wed, 12 Jul 2023 18:11:15 +0800 Message-ID: Subject: Re: [PATCH] ob-python: Fix async evaluation To: Jack Kamm Cc: Ihor Radchenko , emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="0000000000004e0f550600477008" Received-SPF: pass client-ip=2607:f8b0:4864:20::c30; envelope-from=liuhui1610@gmail.com; helo=mail-oo1-xc30.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 9FA153AF90 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -7.64 X-Spam-Score: -7.64 X-TUID: 45Jm5teKmj+s --0000000000004e0f550600477008 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Jack Kamm =E4=BA=8E2023=E5=B9=B47=E6=9C=8812=E6=97=A5= =E5=91=A8=E4=B8=89 12:51=E5=86=99=E9=81=93=EF=BC=9A > The patch looks good, but it would be nice to include a unit test as > well -- could you update the patch to include one, Liu Hui? OK, I have added a test to the patch. --0000000000004e0f550600477008 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-ob-python-Fix-async-evaluation.patch" Content-Disposition: attachment; filename="0001-ob-python-Fix-async-evaluation.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_ljzk1h600 RnJvbSA1NmZkNWUwNWJjMzMzMzdkYzgyZmI4MjU0MTYxMDBlNzU2NjNhNTIwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaXUgSHVpIDxsaXVodWkxNjEwQGdtYWlsLmNvbT4KRGF0ZTog V2VkLCAxMiBKdWwgMjAyMyAxODowNzowNiArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIG9iLXB5dGhv bjogRml4IGFzeW5jIGV2YWx1YXRpb24KCiogbGlzcC9vYi1weXRob24uZWwgKG9yZy1iYWJlbC1w eXRob24tYXN5bmMtZXZhbHVhdGUtc2Vzc2lvbik6IEJpbmQKYHB5dGhvbi1zaGVsbC1idWZmZX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ICAg ICAod2l0aC10ZW1wLWJ1ZmZlcgotICAgICAgICAgICAoaW5zZXJ0IChmb3JtYXQgb3JnLWJhYmVs LXB5dGhvbi1hc3luYy1pbmRpY2F0b3IgInN0YXJ0IiB1dWlkKSkKLSAgICAgICAgICAgKGluc2Vy dCAiXG4iKQotICAgICAgICAgICAoaW5zZXJ0IGJvZHkpCi0gICAgICAgICAgIChpbnNlcnQgIlxu IikKLSAgICAgICAgICAgKGluc2VydCAoZm9ybWF0IG9yZy1iYWJlbC1weXRob24tYXN5bmMtaW5k aWNhdG9yICJlbmQiIHV1aWQpKQotICAgICAgICAgICAocHl0aG9uLXNoZWxsLXNlbmQtYnVmZmVy KSkKLSAgICAgICAgIHV1aWQpKQotICAgICAgKGB2YWx1ZQotICAgICAgIChsZXQgKCh0bXAtcmVz dWx0cy1maWxlIChvcmctYmFiZWwtdGVtcC1maWxlICJweXRob24tIikpCi0gICAgICAgICAgICAg KHRtcC1zcmMtZmlsZSAob3JnLWJhYmVsLXRlbXAtZmlsZSAicHl0aG9uLSIpKSkKLSAgICAgICAg ICh3aXRoLXRlbXAtZmlsZSB0bXAtc3JjLWZpbGUgKGluc2VydCBib2R5KSkKLSAgICAgICAgICh3 aXRoLXRlbXAtYnVmZmVyCi0gICAgICAgICAgIChpbnNlcnQgKG9yZy1iYWJlbC1weXRob24tZm9y bWF0LXNlc3Npb24tdmFsdWUgdG1wLXNyYy1maWxlIHRtcC1yZXN1bHRzLWZpbGUgcmVzdWx0LXBh cmFtcykpCi0gICAgICAgICAgIChpbnNlcnQgIlxuIikKLSAgICAgICAgICAgKGluc2VydCAoZm9y bWF0IG9yZy1iYWJlbC1weXRob24tYXN5bmMtaW5kaWNhdG9yICJmaWxlIiB0bXAtcmVzdWx0cy1m aWxlKSkKLSAgICAgICAgICAgKHB5dGhvbi1zaGVsbC1zZW5kLWJ1ZmZlcikpCi0gICAgICAgICB0 bXAtcmVzdWx0cy1maWxlKSkpKSkKKyAgKHBjYXNlIHJlc3VsdC10eXBlCisgICAgKGBvdXRwdXQK KyAgICAgKGxldCAoKHV1aWQgKG9yZy1pZC11dWlkKSkpCisgICAgICAgKHdpdGgtdGVtcC1idWZm ZXIKKyAgICAgICAgIChpbnNlcnQgKGZvcm1hdCBvcmctYmFiZWwtcHl0aG9uLWFzeW5jLWluZGlj YXRvciAic3RhcnQiIHV1aWQpKQorICAgICAgICAgKGluc2VydCAiXG4iKQorICAgICAgICAgKGlu c2VydCBib2R5KQorICAgICAgICAgKGluc2VydCAiXG4iKQorICAgICAgICAgKGluc2VydCAoZm9y bWF0IG9yZy1iYWJlbC1weXRob24tYXN5bmMtaW5kaWNhdG9yICJlbmQiIHV1aWQpKQorICAgICAg ICAgKGxldCAoKHB5dGhvbi1zaGVsbC1idWZmZXItbmFtZQorICAgICAgICAgICAgICAgIChvcmct YmFiZWwtcHl0aG9uLXdpdGhvdXQtZWFybXVmZnMgc2Vzc2lvbikpKQorICAgICAgICAgICAocHl0 aG9uLXNoZWxsLXNlbmQtYnVmZmVyKSkpCisgICAgICAgdXVpZCkpCisgICAgKGB2YWx1ZQorICAg ICAobGV0ICgodG1wLXJlc3VsdHMtZmlsZSAob3JnLWJhYmVsLXRlbXAtZmlsZSAicHl0aG9uLSIp KQorICAgICAgICAgICAodG1wLXNyYy1maWxlIChvcmctYmFiZWwtdGVtcC1maWxlICJweXRob24t IikpKQorICAgICAgICh3aXRoLXRlbXAtZmlsZSB0bXAtc3JjLWZpbGUgKGluc2VydCBib2R5KSkK KyAgICAgICAod2l0aC10ZW1wLWJ1ZmZlcgorICAgICAgICAgKGluc2VydCAob3JnLWJhYmVsLXB5 dGhvbi1mb3JtYXQtc2Vzc2lvbi12YWx1ZSB0bXAtc3JjLWZpbGUgdG1wLXJlc3VsdHMtZmlsZSBy ZXN1bHQtcGFyYW1zKSkKKyAgICAgICAgIChpbnNlcnQgIlxuIikKKyAgICAgICAgIChpbnNlcnQg KGZvcm1hdCBvcmctYmFiZWwtcHl0aG9uLWFzeW5jL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