From owner-freebsd-python@freebsd.org Tue Jan 12 10:29:52 2021 Return-Path: Delivered-To: freebsd-python@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEF904D19A7 for ; Tue, 12 Jan 2021 10:29:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4DFRf84shzz4jtq for ; Tue, 12 Jan 2021 10:29:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id A71874D1959; Tue, 12 Jan 2021 10:29:52 +0000 (UTC) Delivered-To: python@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6DCE4D19A6 for ; Tue, 12 Jan 2021 10:29:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DFRf843PPz4k4w for ; Tue, 12 Jan 2021 10:29:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E1F92B2CF for ; Tue, 12 Jan 2021 10:29:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 10CATqiO097723 for ; Tue, 12 Jan 2021 10:29:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 10CATqqj097722 for python@FreeBSD.org; Tue, 12 Jan 2021 10:29:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: maintainer-feedback requested: [Bug 252602] www/py-notebook: Python kernel does not work since tornado websockets use Future Date: Tue, 12 Jan 2021 10:29:52 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: python@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2021 10:29:52 -0000 Bugzilla Automation has asked freebsd-python (Nobody) for maintainer-feedback: Bug 252602: www/py-notebook: Python kernel does not work since tornado websockets use Future https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252602 --- Description --- Since tornado websockets use python Future, the python3 kernel crash at file /usr/local/lib/python3.7/site-packages/notebook/services/kernels/handlers.py at the line 207 https://github.com/jupyter/notebook/blob/57db70979b677b0c47cbecfbfbc3ba5b35= 9bc0 b3/notebook/services/kernels/handlers.py#L207 if self.ws_connection is None or self.ws_connection.is_closing(): Here since self.ws_connection is a Future it does not have the member: is_closing A fix would be to wait for the Future result (with or without a timeout) : websocket =3D self.ws_connection.result() And then check for websocket.is_closing() The dirty fix would be to ignore the test on is_closing With the dirty fix the kernel run The github repos have over 2k issue, it is hard to find if this error was already reported there.