Skip to content

Commit

Permalink
Merge branch 'main' into huniafatima/deprecate-edx-sphinx-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
huniafatima-arbi authored Oct 2, 2024
2 parents 5562bb0 + 905b465 commit 92999ed
Show file tree
Hide file tree
Showing 18 changed files with 295 additions and 481 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-reserved-keywords.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: ["py38", "quality", "pii_check"]
python-version: ['3.12']
toxenv: ["py312", "quality", "pii_check"]

steps:
- uses: actions/checkout@v2
Expand All @@ -37,7 +37,7 @@ jobs:
run: tox

- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'py38'
if: matrix.python-version == '3.12' && matrix.toxenv == 'py312'
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
with:
branch: ${{ github.event.inputs.branch || 'main' }}
python_version: "3.8"
python_version: "3.12"
# optional parameters below; fill in if you'd like github or email notifications
# user_reviewers: ""
# team_reviewers: ""
Expand Down
35 changes: 31 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,50 @@ MAINTAINER [email protected]

# gcc; for compiling python extensions distributed with python packages like mysql-client

# ENV variables for Python 3.12 support
ARG PYTHON_VERSION=3.12
ENV TZ=UTC
ENV TERM=xterm-256color
ENV DEBIAN_FRONTEND=noninteractive

# software-properties-common is needed to setup Python 3.12 env
RUN apt-get update && \
apt-get install -y software-properties-common && \
apt-add-repository -y ppa:deadsnakes/ppa

# If you add a package here please include a comment above describing what it is used for
RUN apt-get update && apt-get -qy install --no-install-recommends \
language-pack-en \
locales \
python3.8 \
python3-pip \
# libmysqlclient-dev header files needed to use native C implementation for MySQL-python for performance gains.
libmysqlclient-dev \
# mysqlclient>=2.2.0 requires pkg-config (https://github.com/PyMySQL/mysqlclient/issues/620)
pkg-config \
# mysqlclient wont install without libssl-dev
libssl-dev \
python3-dev \
build-essential \
gcc
gcc \
curl \
python3-pip \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-dev \
python${PYTHON_VERSION}-distutils


# need to use virtualenv pypi package with Python 3.12
RUN pip install --upgrade pip setuptools
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION}
RUN pip install virtualenv

RUN pip install --upgrade pip setuptools
# delete apt package lists because we do not need them inflating our image
RUN rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/bin/python3 /usr/bin/python

# Setup zoneinfo for Python 3.12
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
Expand All @@ -57,6 +81,9 @@ WORKDIR /edx/app/program-intent-engagement
# this prevents the image cache from busting unless the dependencies have changed.
COPY requirements/production.txt /edx/app/program-intent-engagement/requirements/production.txt

ARG INTENT_MANAGEMENT_VENV_DIR="/edx/app/venvs/program-intent-management"
RUN virtualenv -p python${PYTHON_VERSION} --always-copy ${INTENT_MANAGEMENT_VENV_DIR}

# Dependencies are installed as root so they cannot be modified by the application user.
RUN pip install -r requirements/production.txt

Expand Down
45 changes: 18 additions & 27 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
Expand All @@ -8,13 +8,9 @@ asgiref==3.8.1
# via
# django
# django-cors-headers
backports-zoneinfo==0.2.1
# via
# django
# djangorestframework
certifi==2024.7.4
certifi==2024.8.30
# via requests
cffi==1.16.0
cffi==1.17.1
# via
# cryptography
# pynacl
Expand All @@ -28,15 +24,15 @@ coreapi==2.3.3
# openapi-codec
coreschema==0.0.4
# via coreapi
cryptography==43.0.0
cryptography==43.0.1
# via
# pyjwt
# social-auth-core
defusedxml==0.8.0rc2
# via
# python3-openid
# social-auth-core
django==4.2.14
django==4.2.16
# via
# -c requirements/common_constraints.txt
# -c requirements/constraints.txt
Expand All @@ -61,7 +57,7 @@ django-crum==0.7.9
# via edx-django-utils
django-extensions==3.2.3
# via -r requirements/base.in
django-model-utils==4.5.1
django-model-utils==5.0.0
# via -r requirements/base.in
django-rest-swagger==2.2.0
# via -r requirements/base.in
Expand Down Expand Up @@ -90,18 +86,18 @@ edx-auth-backends==4.3.0
# via -r requirements/base.in
edx-django-release-util==1.4.0
# via -r requirements/base.in
edx-django-utils==5.14.2
edx-django-utils==5.15.0
# via
# -r requirements/base.in
# edx-drf-extensions
# edx-rest-api-client
edx-drf-extensions==10.3.0
edx-drf-extensions==10.4.0
# via -r requirements/base.in
edx-opaque-keys==2.10.0
edx-opaque-keys==2.11.0
# via edx-drf-extensions
edx-rest-api-client==5.7.1
edx-rest-api-client==6.0.0
# via -r requirements/base.in
idna==3.7
idna==3.8
# via requests
inflection==0.5.1
# via drf-yasg
Expand All @@ -113,7 +109,7 @@ markupsafe==2.1.5
# via jinja2
mysqlclient==2.2.4
# via -r requirements/base.in
newrelic==9.12.0
newrelic==9.13.0
# via edx-django-utils
oauthlib==3.2.2
# via
Expand All @@ -123,13 +119,13 @@ openapi-codec==1.3.2
# via django-rest-swagger
packaging==24.1
# via drf-yasg
pbr==6.0.0
pbr==6.1.0
# via stevedore
psutil==6.0.0
# via edx-django-utils
pycparser==2.22
# via cffi
pyjwt[crypto]==2.8.0
pyjwt[crypto]==2.9.0
# via
# drf-jwt
# edx-auth-backends
Expand All @@ -146,7 +142,7 @@ pytz==2024.1
# via
# -r requirements/base.in
# drf-yasg
pyyaml==6.0.1
pyyaml==6.0.2
# via
# drf-yasg
# edx-django-release-util
Expand All @@ -156,20 +152,17 @@ requests==2.32.3
# edx-drf-extensions
# edx-rest-api-client
# requests-oauthlib
# slumber
# social-auth-core
requests-oauthlib==2.0.0
# via social-auth-core
semantic-version==2.10.0
# via edx-drf-extensions
simplejson==3.19.2
simplejson==3.19.3
# via django-rest-swagger
six==1.16.0
# via
# edx-auth-backends
# edx-django-release-util
slumber==0.7.1
# via edx-rest-api-client
social-auth-app-django==5.4.2
# via edx-auth-backends
social-auth-core==4.5.4
Expand All @@ -178,14 +171,12 @@ social-auth-core==4.5.4
# social-auth-app-django
sqlparse==0.5.1
# via django
stevedore==5.2.0
stevedore==5.3.0
# via
# edx-django-utils
# edx-opaque-keys
typing-extensions==4.12.2
# via
# asgiref
# edx-opaque-keys
# via edx-opaque-keys
uritemplate==4.1.1
# via
# coreapi
Expand Down
18 changes: 7 additions & 11 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
#
# This file is autogenerated by pip-compile with Python 3.8
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
cachetools==5.4.0
cachetools==5.5.0
# via tox
chardet==5.2.0
# via tox
colorama==0.4.6
# via tox
coverage==7.6.0
coverage==7.6.1
# via -r requirements/ci.in
distlib==0.3.8
# via virtualenv
filelock==3.15.4
filelock==3.16.0
# via
# tox
# virtualenv
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==4.2.2
platformdirs==4.3.2
# via
# tox
# virtualenv
pluggy==1.5.0
# via tox
pyproject-api==1.7.1
# via tox
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.16.0
tox==4.18.1
# via -r requirements/ci.in
virtualenv==20.26.3
virtualenv==20.26.4
# via tox
9 changes: 0 additions & 9 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ elasticsearch<7.14.0
# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0

# opentelemetry requires version 6.x at the moment:
# https://github.com/open-telemetry/opentelemetry-python/issues/3570
# Normally this could be added as a constraint in edx-django-utils, where we're
# adding the opentelemetry dependency. However, when we compile pip-tools.txt,
# that uses version 7.x, and then there's no undoing that when compiling base.txt.
# So we need to pin it globally, for now.
# Ticket for unpinning: https://github.com/openedx/edx-lint/issues/407
importlib-metadata<7

# Cause: https://github.com/openedx/event-tracking/pull/290
# event-tracking 2.4.1 upgrades to pymongo 4.4.0 which is not supported on edx-platform.
# We will pin event-tracking to do not break existing installations
Expand Down
Loading

0 comments on commit 92999ed

Please sign in to comment.