You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.10 begins to throw a deprecation warning for the distutils package, which will be removed in Python 3.12. The recommended fix is to use setuptools or to check PEP 632 for alternatives.
This isn't a workflow blocking issue, as pressing Enter or typing a command brings you to vim as normal; its just an extra step when starting Vim, and a deprecation that should be fixed for Python 3.10 (and especially >=3.12) support.
To Reproduce
On a system with Python 3.10, Vim, and Black installed, install the Black Vim plugin (I use vim-plug with Plug 'psf/black', though I would guess this is an issue for other installation methods as well).
Then attempt to launch Vim and observe the resulting warning:
$ vim
Error detected while processing /home/matt/.vim/plugged/black/plugin/black.vim:
line 214:
<string>:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
Press ENTER or type command to continue
Expected behavior
The warning should not display and vim should open normally.
Environment
Black's version: black, 21.12b0 (compiled: no)
OS version: Arch Linux
Python version: Python 3.10.1
Additional context
N/A
The text was updated successfully, but these errors were encountered:
I did a bit more digging and found this line in the CHANGELOG.md for Black 21.11b0:
Fixed vim plugin with Python 3.10 by removing deprecated distutils import (#2610)
But I'm currently on 21.12b0 and I'm still seeing this. I performed a :PlugUpdate to update the vim plugin from this repository, but am still seeing this.
Is this a regression for 21.12b0, or is there something wrong with my vim plugin installation process?
@ichard26 Thanks for the extra label, I'm closing this issue though, as I've figured it out.
In case anyone else runs into this, I've just realized that when the repo migrated from master to main, that branch change was never picked up by vim-plug, so my vim plugin has been tracking an old, dead branch essentially this whole year. This was just the first compatibility problem between the software and the plugin that was visible.
Interestingly enough, when I try to change the branch to main, upon doing a PlugUpdate in vim it goes back to master. So THAT seems to be a vim-plug problem. I'll check their docs and either open a new issue there or update my system as appropriate.
Describe the bug
Python 3.10 begins to throw a deprecation warning for the
distutils
package, which will be removed in Python 3.12. The recommended fix is to usesetuptools
or to check PEP 632 for alternatives.This isn't a workflow blocking issue, as pressing Enter or typing a command brings you to vim as normal; its just an extra step when starting Vim, and a deprecation that should be fixed for Python 3.10 (and especially >=3.12) support.
To Reproduce
On a system with Python 3.10, Vim, and Black installed, install the Black Vim plugin (I use vim-plug with
Plug 'psf/black'
, though I would guess this is an issue for other installation methods as well).Then attempt to launch Vim and observe the resulting warning:
Expected behavior
The warning should not display and vim should open normally.
Environment
black, 21.12b0 (compiled: no)
Python 3.10.1
Additional context
N/A
The text was updated successfully, but these errors were encountered: