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

tutor-credentials codebase Python 3.11 upgrade #34

Closed
2 tasks done
DawoudSheraz opened this issue Feb 21, 2024 · 8 comments
Closed
2 tasks done

tutor-credentials codebase Python 3.11 upgrade #34

DawoudSheraz opened this issue Feb 21, 2024 · 8 comments
Assignees

Comments

@DawoudSheraz
Copy link

DawoudSheraz commented Feb 21, 2024

  • Ensure tutor-credentials is compatible with Python 3.11
  • Update Python to 3.11 in Dockerfile for nightly and ensure the image builds as expected. The changes would be merged to nightly. This task would rely on upgrade of credentials to Python 3.11

See overhangio/tutor#1004 for the context.

@Faraz32123
Copy link
Collaborator

Faraz32123 commented Mar 13, 2024

I attempted building Credentials dockerfile on Python 3.12 on Nightly branch. I had to make the following changes
tutor-credentials/tutorcredentials/templates/credentials/build/credentials/Dockerfile
L28-L30 (Python and Pyenv)

ARG PYTHON_VERSION=3.12.2
ENV PYENV_ROOT /opt/pyenv
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1

L64 - L68 (setuptools and pip update)

RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
    # https://pypi.org/project/setuptools/
    # https://pypi.org/project/pip/
    # https://pypi.org/project/wheel/
    setuptools==69.1.1 pip==24.0 wheel==0.43.0

However, the build failed when installing credentials requirements with the error:

17.12 ERROR: Could not find a version that satisfies the requirement didkit==0.3.2 (from versions: 0.0.1, 0.2.1)
17.12 ERROR: No matching distribution found for didkit==0.3.2
------
Dockerfile:72
--------------------
  70 |     
  71 |     # Install base requirements
  72 | >>> RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements/production.txt
  73 |     
  74 |     # Install extra requirements
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -r requirements/production.txt" did not complete successfully: exit code: 1

python3.12 has only support for didkit==0.0.1, didkit==0.2.1.
didkit==0.3.2 is used in credentials requirement files, I suspect the docker image build will fail until the underlying code in credentials is updated to 3.12.

@regisb
Copy link
Collaborator

regisb commented Mar 26, 2024

Is there an upstream issue to track the 3.12 upgrade in openedx/credentials? You should report your findings to the repo maintainers.

@DawoudSheraz
Copy link
Author

openedx/public-engineering#234 does not specify any issue on credentials, I dont see any active issue on https://github.com/openedx/credentials/ either. Though there is a PR up to add Python 3.11 and 3.12 support openedx/credentials#2389

@DawoudSheraz
Copy link
Author

The upstream PR has been merged, this should be unblocked now.

@GlugovGrGlib
Copy link

As CC to credentials repo I'll take the problem with didkit to work.
I'll update this issue as soon as it resolved

@justinhynes
Copy link

This seems to also be an issue for Credentials with Python 3.11 too -- I opened an issue yesterday against the Credentials repo to share my findings thus far: openedx/credentials#2477.

@Faraz32123
Copy link
Collaborator

closing this issue as its PR is merged.
NOTES:

  • Credentials codebase is not compatible with python3.12 yet.
  • CI: temporarily skipping building on arm64. As the upstream credentials repo seems to be breaking on arm64 and they are skipping arm64 builds as well due to the didkit package dependency not available on arm64 yet.

@Faraz32123 Faraz32123 changed the title tutor-credentials codebase Python 3.12 upgrade tutor-credentials codebase Python 3.11 upgrade May 14, 2024
@GlugovGrGlib
Copy link

GlugovGrGlib commented Aug 15, 2024

Hey @Faraz32123, didkit issue was resolved in version v0.3.3, after merging requirements upgrade PR into credentials, the compatibility with python 3.12 and arm64 will be fully resolved, so it can unblock any further works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

6 participants