flycheck-pycheckers
flycheck-pycheckers copied to clipboard
Fix Python 3 support for pycheckers.py
Motivation
The bin/pycheckers.py script fails to run on a fresh install of Ubuntu 22.04. The issues are:
- Ubuntu 22.04 no longer ships Python 2 and it only comes with
python3command available. Since the script shebang is usingpythonit fails to run; - After fixing the above, the script outputs deprecation warnings (
distutils.versionis deprecated) which causes the flychecker to show a warning.
Approach
The above issues are overcome if the bin/pycheckers.py gets migrated to Python3. Please read the issue discussion for more details.
For more details on the changes made please read the commit messages.
This PR drops support for running bin/pycheckers.pyusing _Python 2_, yet it is still possible to usebin/pycheckers.py` to lint Python 2 scripts.
Testing
These changes were tested using emacs 28 on Ubuntu 22.04.