Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): #7476 - Support Python 3.11 #7533

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
tk-dev \
&& sudo rm -rf /var/lib/apt/lists/*

ARG PYTHON_VERSION=3.10.8
ARG PYENV_GIT_TAG=v2.3.7
ARG PYTHON_VERSION=3.11.4
mawl marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to fix #7333

It's confusing to refer to that issue as it's already closed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why upgrading python is needed in order to support 3.11?

In particular, would it suffice to stick to 3.10 (not saying we should) and only pass -p 3.11 to python inspector by default ?

ARG PYENV_GIT_TAG=v2.3.27

ENV PYENV_ROOT=/opt/python
ENV PATH=$PATH:$PYENV_ROOT/shims:$PYENV_ROOT/bin
Expand All @@ -138,7 +138,7 @@ RUN curl -kSs https://pyenv.run | bash \
ARG CONAN_VERSION=1.57.0
ARG PYTHON_INSPECTOR_VERSION=0.9.8
ARG PYTHON_PIPENV_VERSION=2022.9.24
ARG PYTHON_POETRY_VERSION=1.2.2
ARG PYTHON_POETRY_VERSION=1.6.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please upgrade the Poetry version in Dockerfile-legacy as well. Dockerfile-legacy is used by CI, maybe that is related to the failing tests.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mnonnenmacher: I hope you are fine with changing python-inspector to 0.9.8 as well, as this will resolve: #7333 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please, versions should in general stay in sync. Installing Python 3.11 would be more difficult with the legacy file, so I think it's fine to stay with the default 3.10 there. python-inspector should still support 3.11 as long as no setup.py file which depends on 3.11 is involved.

ARG PIPTOOL_VERSION=22.2.2
ARG SCANCODE_VERSION=32.0.6

Expand Down
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"
mawl marked this conversation as resolved.
Show resolved Hide resolved
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
Loading