Control: tags 997478 + patch Control: tags 997478 + pending Dear maintainer,
I've prepared an NMU for pyls-black (versioned as 0.4.6-3.1) and uploaded it to DELAYED/15. Please feel free to tell me if I should cancel it. cu Adrian
diff -Nru pyls-black-0.4.6/debian/changelog pyls-black-0.4.6/debian/changelog --- pyls-black-0.4.6/debian/changelog 2021-02-05 11:19:34.000000000 +0200 +++ pyls-black-0.4.6/debian/changelog 2022-01-19 19:12:45.000000000 +0200 @@ -1,3 +1,11 @@ +pyls-black (0.4.6-3.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add upstream fix for test failure with new Black. + (Closes: #997478) + + -- Adrian Bunk <b...@debian.org> Wed, 19 Jan 2022 19:12:45 +0200 + pyls-black (0.4.6-3) unstable; urgency=medium * Fix Build-Depends diff -Nru pyls-black-0.4.6/debian/patches/0001-Fix-test-failure-with-black-21.4b0-39.patch pyls-black-0.4.6/debian/patches/0001-Fix-test-failure-with-black-21.4b0-39.patch --- pyls-black-0.4.6/debian/patches/0001-Fix-test-failure-with-black-21.4b0-39.patch 1970-01-01 02:00:00.000000000 +0200 +++ pyls-black-0.4.6/debian/patches/0001-Fix-test-failure-with-black-21.4b0-39.patch 2022-01-19 19:11:25.000000000 +0200 @@ -0,0 +1,65 @@ +From 4a2780358c2827b2b1598e9e60365f0d5c9a27a4 Mon Sep 17 00:00:00 2001 +From: Mathis <sveit...@gmail.com> +Date: Sat, 5 Jun 2021 06:40:55 +0800 +Subject: Fix test failure with black 21.4b0+ (#39) + +Inline PY36_VERSIONS because black no longer exposes it. + +Closes #36. +--- + pyls_black/plugin.py | 4 +++- + tests/test_plugin.py | 9 +++++++-- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/pyls_black/plugin.py b/pyls_black/plugin.py +index 407802f..dc5d482 100644 +--- a/pyls_black/plugin.py ++++ b/pyls_black/plugin.py +@@ -4,6 +4,8 @@ import black + import toml + from pyls import hookimpl + ++_PY36_VERSIONS = {black.TargetVersion[v] for v in ["PY36", "PY37", "PY38", "PY39"]} ++ + + @hookimpl(tryfirst=True) + def pyls_format_document(document): +@@ -97,7 +99,7 @@ def load_config(filename: str) -> Dict: + black.TargetVersion[x.upper()] for x in file_config["target_version"] + ) + elif file_config.get("py36"): +- target_version = black.PY36_VERSIONS ++ target_version = _PY36_VERSIONS + else: + target_version = set() + +diff --git a/tests/test_plugin.py b/tests/test_plugin.py +index f943b16..e722dba 100644 +--- a/tests/test_plugin.py ++++ b/tests/test_plugin.py +@@ -8,7 +8,12 @@ import pytest + from pyls import uris + from pyls.workspace import Document, Workspace + +-from pyls_black.plugin import load_config, pyls_format_document, pyls_format_range ++from pyls_black.plugin import ( ++ _PY36_VERSIONS, ++ load_config, ++ pyls_format_document, ++ pyls_format_range, ++) + + here = Path(__file__).parent + fixtures_dir = here / "fixtures" +@@ -191,7 +196,7 @@ def test_load_config_target_version(): + def test_load_config_py36(): + config = load_config(str(fixtures_dir / "py36" / "example.py")) + +- assert config["target_version"] == black.PY36_VERSIONS ++ assert config["target_version"] == _PY36_VERSIONS + + + def test_load_config_defaults(): +-- +2.20.1 + diff -Nru pyls-black-0.4.6/debian/patches/series pyls-black-0.4.6/debian/patches/series --- pyls-black-0.4.6/debian/patches/series 2021-02-05 11:19:34.000000000 +0200 +++ pyls-black-0.4.6/debian/patches/series 2022-01-19 19:12:45.000000000 +0200 @@ -1 +1,2 @@ suppress-post-install-tests.patch +0001-Fix-test-failure-with-black-21.4b0-39.patch