From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 4KEvMNAw92GbFAEAgWs5BA (envelope-from ) for ; Mon, 31 Jan 2022 01:44:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qO6QLdAw92HkLwAA9RJhRA (envelope-from ) for ; Mon, 31 Jan 2022 01:44:00 +0100 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 EE5D838E7B for ; Mon, 31 Jan 2022 01:43:59 +0100 (CET) Received: from localhost ([::1]:41310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEKnW-0006Fs-NZ for larch@yhetil.org; Sun, 30 Jan 2022 19:43:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEKmd-0006FY-Ja for guix-patches@gnu.org; Sun, 30 Jan 2022 19:43:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEKmc-0003zF-MH for guix-patches@gnu.org; Sun, 30 Jan 2022 19:43:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEKmc-0002dm-Fn for guix-patches@gnu.org; Sun, 30 Jan 2022 19:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53640] Python-black 22.1.0 update Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 Jan 2022 00:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53640 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: leo@famulari.name, 53640@debbugs.gnu.org Cc: marius@gnu.org X-Debbugs-Original-To: Leo Famulari , guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164358973010068 (code B ref -1); Mon, 31 Jan 2022 00:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Jan 2022 00:42:10 +0000 Received: from localhost ([127.0.0.1]:38028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEKlm-0002cJ-E3 for submit@debbugs.gnu.org; Sun, 30 Jan 2022 19:42:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:43416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEKlk-0002cB-9E for submit@debbugs.gnu.org; Sun, 30 Jan 2022 19:42:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEKlj-0006D7-6k for guix-patches@gnu.org; Sun, 30 Jan 2022 19:42:08 -0500 Received: from mout01.posteo.de ([185.67.36.65]:34479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEKld-0003wX-PG for guix-patches@gnu.org; Sun, 30 Jan 2022 19:42:06 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 9CC78240027 for ; Mon, 31 Jan 2022 01:41:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1643589717; bh=kZXg49Vg76Idb+a6fsmdZs+13ouxlC8MaZ4Nh1H8tjM=; h=Subject:From:To:Cc:Date:From; b=AzqKBMcjYH08/b6pTQcq3aqIG5Mw62XUAX2/Qo+urIgAk0tLFBfrWyjnZhtq4ULvL gvu3BHdPyLyt4dbkqo3jEbungbipaIMZYuTPmfzdaAGeylsMaWrJ/aB3P+l/NdlKWP B5BuKltizFNQ6lkFT4E/exWH3X54SqglzwqdnkeDrw/fiISqxB8VGr7E0W5+g8R2Ro YCqgq4IDznN9/K6Ba404IpjaUvPbmkfm2bnfKAOAELAyeE9sWqE4aOrciGhp8kkHTe gxq6eFt2MlaR1gXNQ2Bg3YWpFj1vHzoPFIbn4Ucods0M14HKKRVm5kIORxJmqbw47V VNS/OOvzh0pwQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Jn8QW3PJ7z9rxG; Mon, 31 Jan 2022 01:41:55 +0100 (CET) Message-ID: From: Vinicius Monego Date: Mon, 31 Jan 2022 00:41:46 +0000 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=monego@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643589840; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QDyU6aO8PXK0Kzh6jRcauiOf4rKFo73bR98PyIP1rMo=; b=qjjip993IkfyNFWheAIO1eks8yrRKwdBpzfmMI8XR9HzkgNqOLIASinflAY4u5BWnsrqYA 38DIrM2XOK4L3adua/1y1t35/PoxjSRq/4VLrBDKLE2YK53UA7zMfqwv4kjxdPmDLLdqMA YGe4TL7uISYU8LvGFwOSq/EMtxKtuPSJh5OAaTBYhLuPTDGVIySlanzh/RO2lWhV2LhfX6 tpeu9juTA09638/xxWGLKeXF8GntFZY7nfpUcXPDquRy648xdSlBA8OrmLMfqESVgLyFsm rcG+iDTBiVUAmQinGdVD0GKbr/v2+C3e5/dM27eNIvRG80m8j4s9Zbu4rERcOQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643589840; a=rsa-sha256; cv=none; b=Rycl1LGxiYWfDapGbOqqTalT+uIyI5uEJFJ5ybjfUGawue2AB8zdMvMz+fIoVm3OhNtOTC XazFAZNNwL0iCtn4O1BI/PimXqabKtlabpG5FhZw/A1xiPJwTsrYmyt09b6ESnZsMIsM5M pwqfcYCuAbKPtPM7LtQUGopV6djUu0Vo73HkYhJ/0+TXInrI4mUipdvXqINJ/2lMEJ2V3+ smYzsWP84Bg5z/Buv4vczVxAl7K30Y2Jy8t9sWW09ywSfE4Nn9GQNR8J2WK7H7C4Gt/OzA uLFYy6qKMcdPBwx4vdNzd+DAxZbXuiIVL6JBhDYaBUAISDWsQiwNBWUn6Iuzqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=AzqKBMcj; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=AzqKBMcj; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: EE5D838E7B X-Spam-Score: -2.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: uNW8EsG/vFYj Black changed the return type for find_project_root in this version. It now returns a tuple instead of a Path object. See [1] and [2] to compare the latest stable with the version in Guix. That is, lsp-black is not compatible with this version. If that is the only error then I guess [3] (or two lines below) can be patched via substitution to extract the first element of the tuple, corresponding to the Path, but I haven't tried this. [1] https://github.com/psf/black/blob/d038a24ca200da9dacc1dcb05090c9e5b45b7869/src/black/files.py#L33 [2] https://github.com/psf/black/blob/f1d4e742c91dd5179d742b0db9293c4472b765f8/src/black/files.py#L33 [3] https://github.com/rupert/pyls-black/blob/0f2e9ed8c0fb20f7f88fe47e11b723e311b568d6/pyls_black/plugin.py#L74 Em dom, 2022-01-30 às 15:20 -0500, Leo Famulari escreveu: > These patches update python-black to 22.1.0, so it's no longer a > beta. > > I rebuilt all packages reported by `guix refresh -l python-black`, > and > the only new failure is of python-pyls-black. Basically, all of its > tests fail like this: > > ------ > filename = '/tmp/guix-build-python-pyls-black-0.4.7.drv- > 0/source/tests/fixtures/example.py' > >     def load_config(filename: str) -> Dict: >         defaults = { >             "line_length": 88, >             "fast": False, >             "pyi": filename.endswith(".pyi"), >             "skip_string_normalization": False, >             "target_version": set(), >         } >     >         root = black.find_project_root((filename,)) >     > >       pyproject_filename = root / "pyproject.toml" > E       TypeError: unsupported operand type(s) for /: 'tuple' and > 'str' > > pyls_black/plugin.py:76: TypeError > =========================== short test summary info > ============================ > FAILED tests/test_plugin.py::test_pylsp_format_document - TypeError: > unsuppor... > FAILED tests/test_plugin.py::test_pyls_format_pyi_document - > TypeError: unsup... > FAILED tests/test_plugin.py::test_pylsp_format_document_unchanged - > TypeError... > FAILED tests/test_plugin.py::test_pyls_format_pyi_document_unchanged > - TypeEr... > FAILED tests/test_plugin.py::test_pylsp_format_document_syntax_error > - TypeEr... > FAILED tests/test_plugin.py::test_pylsp_format_document_with_config - > TypeErr... > FAILED tests/test_plugin.py::test_pylsp_format_range[0-0-a = > "hello"\n] - Typ... > FAILED tests/test_plugin.py::test_pylsp_format_range[1-1-b = 42\n] - > TypeErro... > FAILED tests/test_plugin.py::test_pylsp_format_range[0-1-a = > "hello"\nb = 42\n] > FAILED tests/test_plugin.py::test_pylsp_format_range_unchanged - > TypeError: u... > FAILED tests/test_plugin.py::test_pylsp_format_range_syntax_error - > TypeError... > FAILED tests/test_plugin.py::test_load_config - TypeError: > unsupported operan... > FAILED tests/test_plugin.py::test_load_config_target_version - > TypeError: uns... > FAILED tests/test_plugin.py::test_load_config_py36 - TypeError: > unsupported o... > FAILED tests/test_plugin.py::test_load_config_defaults - TypeError: > unsupport... > ========================= 15 failed, 1 passed in 0.47s > ========================= > ------ > > Any ideas? I've CC-ed the people who have touched the python-pyls- > black > package.