Skip to content

Commit

Permalink
feat(package-managers/python)!: Support Python 3.11
Browse files Browse the repository at this point in the history
Add "3.11" to the list of python versions which ORT allows to pass to
`python-inspector` via the `-p` option. Doing so leads to a successful
analysis of python projects which require python version 3.11. This also
work for any analysis triggered from `Poetry.kt` via the approch to
generate the `requirements` file from `pyproject.toml`. In particular,
this works without upgrading the installed python verison to `3.11`

The change is breaking, because also the default Python version is
changed to 3.11. For analyzing Python projects targeting 3.10 the
Python version as of now must be explicitly specified.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Sep 28, 2023
1 parent 583a15f commit 1e7e428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/package-managers/python/src/main/kotlin/Pip.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import org.ossreviewtoolkit.utils.ort.showStackTrace
private const val OPTION_OPERATING_SYSTEM_DEFAULT = "linux"
private val OPERATING_SYSTEMS = listOf(OPTION_OPERATING_SYSTEM_DEFAULT, "macos", "windows")

private const val OPTION_PYTHON_VERSION_DEFAULT = "3.10"
private val PYTHON_VERSIONS = listOf("2.7", "3.6", "3.7", "3.8", "3.9", OPTION_PYTHON_VERSION_DEFAULT)
private const val OPTION_PYTHON_VERSION_DEFAULT = "3.11"
private val PYTHON_VERSIONS = listOf("2.7", "3.6", "3.7", "3.8", "3.9", "3.10", OPTION_PYTHON_VERSION_DEFAULT)

/**
* The [PIP](https://pip.pypa.io/) package manager for Python. Also see
Expand Down

0 comments on commit 1e7e428

Please sign in to comment.