WARN: No explicit support for version 2.7. Support for Python versions prior to 3 is deprecated

  • which versions are you using: SonarQube Server v10.5.1
  • how is SonarQube deployed: Helm
  • what are you trying to achieve: Get a report for Python2.7
  • what have you tried so far to achieve this: Run my SonarQube workflow in GitHub actions while also specifying the python version like this: sonar.python.version=2.7. But I get the warning message in the title. Is there anything I can do to fix this? Even rolling back to a specific SonarQube version

Hello @Ioannis_Mantios,

The reason you’re seeing this warning is because the SonarQube Python analyzer internally relies on Typeshed to retrieve the appropriate standard library information for the version that is set through sonar.python.version. However, support for Python 2.7 was dropped a few years ago, and no stubs will be available during the analysis.

The analysis should still run as expected and give you a report. It might, however, be a little less precise for rules that rely on type information of builtin symbols.

Hope that helps,
Guillaume

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.