rupert / pyls-black

Black plugin for the Python Language Server
MIT License
72 stars 8 forks source link

Regression on black 19.3b0 #16

Closed extraymond closed 5 years ago

extraymond commented 5 years ago

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

rupert commented 5 years ago

@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.

nasyxx commented 5 years ago

@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.

lgeiger commented 5 years ago

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.

extraymond commented 5 years ago

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

rupert commented 5 years ago

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!