all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: leo@famulari.name, 53640@debbugs.gnu.org
Cc: marius@gnu.org
Subject: [bug#53640] Python-black 22.1.0 update
Date: Mon, 31 Jan 2022 00:41:46 +0000	[thread overview]
Message-ID: <f486325d9fe1b0a85e7358c440ed092cc2b23ca0.camel@posteo.net> (raw)
In-Reply-To: <Yfby8uhzqYCUMuh8@jasmine.lan>

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.






  parent reply	other threads:[~2022-01-31  0:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30 20:20 [bug#53640] Python-black 22.1.0 update Leo Famulari
2022-01-30 20:22 ` [bug#53640] [PATCH 1/2] gnu: Add python-click 8.0.3 Leo Famulari
2022-01-30 20:22   ` [bug#53640] [PATCH 2/2] gnu: python-black: Update to 22.1.0 Leo Famulari
2022-01-31  0:41 ` Vinicius Monego [this message]
2022-01-31 21:06   ` [bug#53640] Python-black 22.1.0 update Leo Famulari
2022-08-05  1:27 ` bug#53640: " 宋文武 via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f486325d9fe1b0a85e7358c440ed092cc2b23ca0.camel@posteo.net \
    --to=monego@posteo.net \
    --cc=53640@debbugs.gnu.org \
    --cc=leo@famulari.name \
    --cc=marius@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.