rupert/pyls-black

Regression on black 19.3b0

extraymond opened this issue ยท 5 comments

Test environment:

Python: python 3.6
OS: Ubuntu 18.04 64bit
IDE: atom-ide(ide-python extension)
pyls: 0.25

With newest version black 19.3b0, pyls-black is malfunctioning, the error log in atom suggests that FileMode has no attribute from_configuration. Downgrading to 18.9b0 works.

I suggest specifying a version dependency for black for the time being.

Relevant issue for vim plugin: Link

@extraymond thanks for the heads up, will have a look into it. At the moment I'm considering using blackd so we don't depend on black internals.

@rupert Sorry, I hadn't seen you ready to change when I changed it in #17.

@extraymond If you are in a hurry to use it, you can temporarily use my fork with branch patch-1.

Thanks for taking a look, keep up the great work!

At the moment I'm considering using blackd so we don't depend on black internals.

I agree it makes sense to not rely on black internals, though it looks like blackd is only a small http server around black's functionality so I'm unsure if this will make things more complicated and less performant. black is aiming for the first stable release next month, maybe that will help with future breaking changes.

@nasyxx Thx for your reply, I just added black dependency in my pyproject.toml for now.

Hi everyone, I've released 0.4.3 which supports/requires black version 19.3b0.

Please use 0.4.4 instead, version 0.4.3 introduced a bug for projects without a config file (fixed by #21).

If for some reason you'd like to continue using black version 18.9b0 you can use 0.4.2 instead.

Thanks to @extraymond for the initial bug report!