From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uJvbFkDLr2SFjAAASxT56A (envelope-from ) for ; Thu, 13 Jul 2023 12:00:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kHwKFkDLr2Ri+wAAG6o9tA (envelope-from ) for ; Thu, 13 Jul 2023 12:00:32 +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 04ADA42484 for ; Thu, 13 Jul 2023 12:00:32 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=mxALBxPQ; 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=1689242432; 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=LIAARQu91LcYDbIuqk8zmPapg7kesDI2s0NuyY9L80k=; b=mc5C8/bu6O5bDRX0PzxXG0818jGvFoUGEbT85L1DfXgQysfiEsKp2stUTd85EpDkQTQ/uB +M+c/y2wmoXUlA6t57vL0dKgf8dtzBSg3wdiE+zrL+TYbBUa63ju+abxrFmunkgReXjyRG XTnmkwCZ8gamdbCusZ890zqtERBRY6Cu5BoS7yvOf2LKpvwbaEAKA6QGvQZYT+mUj8vaaf AEeRt7V013G9DTqu1Vc69qz5AixCIZ4NgZe/6l4MX9p5fsktwa/FG9+eWW37tD87Pbz8xp DtszmRidJA5RnYoM5HdXZLMOE7nfMBo8IjhcFyVoiWsSmUV0ucDwBo5j6GBS6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=mxALBxPQ; 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=1689242432; a=rsa-sha256; cv=none; b=PoqHtpM21SUSA3sKq2SlKbaQHKYkAKuhzMlUmFWKJIO1lHka/yWf47+J4rPDmIg4ygaDEQ FXZbbdyjsI0v9Paw8t/NL+nH+SSCP9lqCPCxtNFvVvr8F8K4HZgW/TAbnGwMMcaDmetVba kSxDbqkxTx4v5euk2jL/YH9I2bno8tBjs6dm2TL2JkDe2LiLQEha4dR2ZmMq6IAHXghRpu NpipOnSabJTRkQVTtc0FucHFpqQZYG7jvhYZR3p3s/qtfwUlk8C8h+waWnT2p6+xKc9Y5j ZkfppRSialDQGRNDCYAe0tORnMlMfq6MHxQDY9wlz8DPc0+5gR1l1eS1q1ZE5w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJt6m-0001F7-8c; Thu, 13 Jul 2023 05:59:36 -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 1qJt6k-0001Ej-HL for emacs-orgmode@gnu.org; Thu, 13 Jul 2023 05:59:34 -0400 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJt6i-0005g0-P8 for emacs-orgmode@gnu.org; Thu, 13 Jul 2023 05:59:34 -0400 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-56368c40e8eso454788eaf.0 for ; Thu, 13 Jul 2023 02:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689242371; x=1691834371; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LIAARQu91LcYDbIuqk8zmPapg7kesDI2s0NuyY9L80k=; b=mxALBxPQZCizpBMzPxaSGksBkerNzabX0K3jpIuPgEPE3gaefR2H8Ji5HKk/8FdlUI Xg1gtR3ivvaG55pmKU6VOdh3ZJurc3+bSmR6xKChZ2yV8Xu7lL0ce/z2cwTHVBpnPOSG vDci26rOd+79C0zfyi6mgdVNqC70CSSfP64/14irEUtIlzDVmCBl4fTSCn6GlK7aH7xs i1SywOz2LH0wgzbZ0Sq7yGEbcUPY/l5qd0l9GVry/nBYs5vPs3BPiuZrzdlzMlg9OiSe XMcIFYMfHu1BmYkAQGq21Sm8hzbHwZ0z2F3cRORhg+wU2P6vpILmJO1ub0Lt3whQfy/x VNkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689242371; x=1691834371; 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=LIAARQu91LcYDbIuqk8zmPapg7kesDI2s0NuyY9L80k=; b=GuVW8di7UuXSQbLilkEAjBjqwUdfwWIeBz6vReNQpTKR/rbmVuTtcMuZsSuwkbFjUX CiNgfZJfFA6JZlDeVUvFvs+DV8I2wDkKDcsgakBxnREOpkoFBkRsVPInVtxb5H9YjjSX qXJgAAeSmvTOWSSTsV267Sm/EFDerec1ZDnuUjfhWbNgdBJ9cTu219mjY5XZ5VJAQiJ0 aAwYokRY1bruJPpY0yMoe51g9e1CXDSy09ITj9XWTPE+oNbC7goq4h9r0KwnqZoYu9VY j6Oh0lISbnVRlXaa5BghR9Il+Yn7aK1RLHkZwPzrL8puej2T0UCwQwNtgQkbom3oqOxq 6Rgw== X-Gm-Message-State: ABy/qLb34iZ3b1e2TkFBsIpu/BcTKPv6QnKWaopG+HePmk+BYnsQ3eck +eQHKAhoXgpO02qlCvqwxMu10zJc5kfJIUBEgGA= X-Google-Smtp-Source: APBJJlEwS6tqackZrJtATM+FaR1uLkyKaOKg/VGdWqB1o98mLsE0VQt+mEou0xV9HDpeZOAovjtyf+xNk2iYq06InYE= X-Received: by 2002:a4a:2a1e:0:b0:566:f7c7:93bb with SMTP id k30-20020a4a2a1e000000b00566f7c793bbmr1032938oof.4.1689242371234; Thu, 13 Jul 2023 02:59:31 -0700 (PDT) MIME-Version: 1.0 References: <87ilaqolmf.fsf@localhost> <87ilapka0e.fsf@gmail.com> <87a5w023ms.fsf@gmail.com> In-Reply-To: <87a5w023ms.fsf@gmail.com> From: Liu Hui Date: Thu, 13 Jul 2023 17:59:19 +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="0000000000007a3bb306005b638b" Received-SPF: pass client-ip=2607:f8b0:4864:20::c2b; envelope-from=liuhui1610@gmail.com; helo=mail-oo1-xc2b.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-Spam-Score: -8.40 X-Migadu-Queue-Id: 04ADA42484 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -8.40 X-TUID: CPwZDFjmokig --0000000000007a3bb306005b638b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Jack Kamm =E4=BA=8E2023=E5=B9=B47=E6=9C=8813=E6=97=A5= =E5=91=A8=E5=9B=9B 05:58=E5=86=99=E9=81=93=EF=BC=9A > While your test works on its own, it seems to break subsequent tests > (the next test hangs). Thanks for pointing out the problem! I find the problem disappears after removing the `run-python` line, and I have updated the patch accordingly. --0000000000007a3bb306005b638b 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_lk0z766b0 RnJvbSA0YzU1MmViNGVlYzVkODQ3Mjc3NzU2NDVjZGY0MWFjZWJkN2ZkMWRhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMaXUgSHVpIDxsaXVodWkxNjEwQGdtYWlsLmNvbT4KRGF0ZTog V2VkLCAxMiBKdWwgMjAyMyAxODowNzowNiArMDgwMApTdWJqZWN0OiBbUEFUQ0hdIG9iLXB5dGhv bjogRml4IGFzeW5jIGV2YWx1YXRpb24KCiogbGlzcC9vYi1weXRob24uZWwgKG9yZy1iYWJlbC1w eXRob24tYXN5bmMtZXZhbH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3JnLWlkLXV1aWQpKSkKLSAgICAgICAg ICh3aXRoLXRlbXAtYnVmZmVyCi0gICAgICAgICAgIChpbnNlcnQgKGZvcm1hdCBvcmctYmFiZWwt cHl0aG9uLWFzeW5jLWluZGljYXRvciAic3RhcnQiIHV1aWQpKQotICAgICAgICAgICAoaW5zZXJ0 ICJcbiIpCi0gICAgICAgICAgIChpbnNlcnQgYm9keSkKLSAgICAgICAgICAgKGluc2VydCAiXG4i KQotICAgICAgICAgICAoaW5zZXJ0IChmb3JtYXQgb3JnLWJhYmVsLXB5dGhvbi1hc3luYy1pbmRp Y2F0b3IgImVuZCIgdXVpZCkpCi0gICAgICAgICAgIChweXRob24tc2hlbGwtc2VuZC1idWZmZXIp KQotICAgICAgICAgdXVpZCkpCi0gICAgICAoYHZhbHVlCi0gICAgICAgKGxldCAoKHRtcC1yZXN1 bHRzLWZpbGUgKG9yZy1iYWJlbC10ZW1wLWZpbGUgInB5dGhvbi0iKSkKLSAgICAgICAgICAgICAo dG1wLXNyYy1maWxlIChvcmctYmFiZWwtdGVtcC1maWxlICJweXRob24tIikpKQotICAgICAgICAg KHdpdGgtdGVtcC1maWxlIHRtcC1zcmMtZmlsZSAoaW5zZXJ0IGJvZHkpKQotICAgICAgICAgKHdp dGgtdGVtcC1idWZmZXIKLSAgICAgICAgICAgKGluc2VydCAob3JnLWJhYmVsLXB5dGhvbi1mb3Jt YXQtc2Vzc2lvbi12YWx1ZSB0bXAtc3JjLWZpbGUgdG1wLXJlc3VsdHMtZmlsZSByZXN1bHQtcGFy YW1zKSkKLSAgICAgICAgICAgKGluc2VydCAiXG4iKQotICAgICAgICAgICAoaW5zZXJ0IChmb3Jt YXQgb3JnLWJhYmVsLXB5dGhvbi1hc3luYy1pbmRpY2F0b3IgImZpbGUiIHRtcC1yZXN1bHRzLWZp bGUpKQotICAgICAgICAgICAocHl0aG9uLXNoZWxsLXNlbmQtYnVmZmVyKSkKLSAgICAgICAgIHRt cC1yZXN1bHRzLWZpbGUpKSkpKQorICAocGNhc2UgcmVzdWx0LXR5cGUKKyAgICAoYG91dHB1dAor ICAgICAobGV0ICgodXVpZCAob3JnLWlkLXV1aWQpKSkKKyAgICAgICAod2l0aC10ZW1wLWJ1ZmZl cgorICAgICAgICAgKGluc2VydCAoZm9ybWF0IG9yZy1iYWJlbC1weXRob24tYXN5bmMtaW5kaWNh dG9yICJzdGFydCIgdXVpZCkpCisgICAgICAgICAoaW5zZXJ0ICJcbiIpCisgICAgICAgICAoaW5z ZXJ0IGJvZHkpCisgICAgICAgICAoaW5zZXJ0ICJcbiIpCisgICAgICAgICAoaW5zZXJ0IChmb3Jt YXQgb3JnLWJhYmVsLXB5dGhvbi1hc3luYy1pbmRpY2F0b3IgImVuZCIgdXVpZCkpCisgICAgICAg ICAobGV0ICgocHl0aG9uLXNoZWxsLWJ1ZmZlci1uYW1lCisgICAgICAgICAgICAgICAgKG9yZy1i YWJlbC1weXRob24td2l0aG91dC1lYXJtdWZmcyBzZXNzaW9uKSkpCisgICAgICAgICAgIChweXRo b24tc2hlbGwtc2VuZC1idWZmZXIpKSkKKyAgICAgICB1dWlkKSkKKyAgICAoYHZhbHVlCisgICAg IChsZXQgKCh0bXAtcmVzdWx0cy1maWxlIChvcmctYmFiZWwtdGVtcC1maWxlICJweXRob24tIikp CisgICAgICAgICAgICh0bXAtc3JjLWZpbGUgKG9yZy1iYWJlbC10ZW1wLWZpbGUgInB5dGhvbi0i KSkpCisgICAgICAgKHdpdGgtdGVtcC1maWxlIHRtcC1zcmMtZmlsZSAoaW5zZXJ0IGJvZHkpKQor ICAgICAgICh3aXRoLXRlbXAtYnVmZmVyCisgICAgICAgICAoaW5zZXJ0IChvcmctYmFiZWwtcHl0 aG9uLWZvcm1hdC1zZXNzaW9uLXZhbHVlIHRtcC1zcmMtZmlsZSB0bXAtcmVzdWx0cy1maWxlIHJl c3VsdC1wYXJhbXMpKQorICAgICAgICAgKGluc2VydCAiXG4iKQorICAgICAgICAgKGluc2VydCAo Zm9ybWF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pb248PSAiMjgiIGVtYWNzLXZlcnNpb24pKQorICAod2hlbi1s ZXQgKChidWYgKGdldC1idWZmZXIgIipQeXRob24qIikpKQorICAgIChsZXQgKGtpbGwtYnVmZmVy LXF1ZXJ5LWZ1bmN0aW9ucykKKyAgICAgIChraWxsLWJ1ZmZlciBidWYpKSkKKyAgKG9yZy10ZXN0 LXdpdGgtdGVtcC10ZXh0LWluLWZpbGUKKyAgICAgICIjIC0qLSBweXRob24tc2hlbGwtYnVmZmVy LW5hbWU6IFwiUHl0aG9uIDNcIiAtKi0KKzxwb2ludD4jK2JlZ2luX3NyYyBweXRob24gOnNlc3Np b24gXCIqUHl0aG9uIDMqXCIgOmFzeW5jIHllcworMQorIytlbmRfc3JjIgorICAgIChzaG91bGQg KG9yZy1iYWJlbC1leGVjdXRlLXNyYy1ibG9jaykpKSkKKwogKHByb3ZpZGUgJ3Rlc3Qtb2ItcHl0 aG9uKQogCiA7OzsgdGVzdC1vYi1weXRob24uZWwgZW5kcyBoZXJlCi0tIAoyLjI1LjEKCg== --0000000000007a3bb306005b638b--