Skip to content

Fix Vint version detection#5138

Open
letorbi wants to merge 2 commits into
dense-analysis:masterfrom
letorbi:fix-vint-version-detection
Open

Fix Vint version detection#5138
letorbi wants to merge 2 commits into
dense-analysis:masterfrom
letorbi:fix-vint-version-detection

Conversation

@letorbi

@letorbi letorbi commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the broken Vint version detection due to Python warnings that interfere with ALE's version detection algorithm.

I discovered that my Vint based Vim Script linting did not work anymore and was able to track it down to a new Python version (3.14) that has been installed on my system recently. The reason is the pkg_resources API, which is still used by the last stable Vint version (0.3.21), but has been declared as obsolete for a longer time now.

This causes vint --version to return the following:

/usr/lib/python3.14/site-packages/vint/linting/cli.py:4: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
0.3.21

ALE's semver module parses this as [3, 14, 0], possibly due to python3.14 in the first line. Since ALE assumes that this version of Vint has stdin support, it calls Vint with the --stdin-display-name option, which is not yet available in Vint 0.3.21.

This PR changes the call to print Vint's version from just vint --version to PYTHONWARNINGS=ignore vint --version. This suppresses all Python warnings and thus allows ALE's semver module to detect the correct version.

@letorbi letorbi requested a review from w0rp as a code owner June 2, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant