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

Jhony/add python 312 support #932

Merged
merged 10 commits into from
Apr 29, 2024
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:

runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
tox-env: [quality, django42]
python-version: [3.8]
python-version: ['py38', 'py312']
env-name: ['django42', 'quality']
db-version: ['mysql80']

steps:
Expand All @@ -23,9 +24,15 @@ jobs:
run: |
docker-compose -f .github/docker-compose-ci.yml up -d

- name: setup python
if: ${{ matrix.python-version == 'py312' }}
run: |
docker exec -e TOXENV=${{ matrix.python-version }}-${{ matrix.env-name }} -e DB_HOST=${{ matrix.db-version }} xqueue bash -c \
"apt update && apt install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa -y && apt install python3.12 python3.12-dev python3.12-distutils -y"

- name: Install test dependencies and run tests
env:
TOXENV: ${{ matrix.tox-env }}
TOXENV: ${{ matrix.python-version }}-${{ matrix.env-name }}
run: |
docker exec xqueue bash -c "cd /edx/app/xqueue/xqueue/; pip3 install -r requirements/ci.txt"
docker exec xqueue bash -c "cd /edx/app/xqueue/xqueue/ && DB_HOST=${{ matrix.db-version }} tox -e ${TOXENV}"
6 changes: 4 additions & 2 deletions .github/workflows/mysql8-migrations-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
python-version: [ '3.8', '3.12' ]

steps:
- name: Checkout repo
Expand Down Expand Up @@ -53,7 +53,9 @@ jobs:
pip uninstall -y mysqlclient
pip install --no-binary mysqlclient mysqlclient
pip uninstall -y xmlsec
pip install --no-binary xmlsec xmlsec
jfavellar90 marked this conversation as resolved.
Show resolved Hide resolved
# The latest version of python-xmlsec fails to compile (see https://github.com/xmlsec/python-xmlsec/issues/314)
# The recommended course of action is to pin the version of python-xmlsec
pip install --no-binary xmlsec xmlsec==1.3.13
- name: Initiate services
run: |
sudo /etc/init.d/mysql start
Expand Down
36 changes: 19 additions & 17 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
#
# make upgrade
#
asgiref==3.7.2
asgiref==3.8.1
# via django
backoff==2.2.1
# via -r requirements/base.in
backports-zoneinfo==0.2.1
# via django
boto3==1.34.52
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# django
boto3==1.34.93
# via -r requirements/base.in
botocore==1.34.52
botocore==1.34.93
# via
# boto3
# s3transfer
Expand All @@ -24,7 +26,7 @@ charset-normalizer==3.3.2
# via requests
click==8.1.7
# via edx-django-utils
django==4.2.10
django==4.2.11
# via
# -c requirements/common_constraints.txt
# -r requirements/base.in
Expand All @@ -39,13 +41,13 @@ django-storages==1.14.2
# via -r requirements/base.in
django-waffle==4.1.0
# via edx-django-utils
edx-django-release-util==1.3.0
edx-django-release-util==1.4.0
# via -r requirements/base.in
edx-django-utils==5.10.1
edx-django-utils==5.12.0
# via -r requirements/base.in
gunicorn==21.2.0
gunicorn==22.0.0
# via -r requirements/base.in
idna==3.6
idna==3.7
# via requests
isort==5.13.2
# via -r requirements/base.in
Expand All @@ -55,23 +57,23 @@ jmespath==1.0.1
# botocore
mysqlclient==2.2.4
# via -r requirements/base.in
newrelic==9.7.0
newrelic==9.9.0
# via
# -r requirements/base.in
# edx-django-utils
packaging==23.2
packaging==24.0
# via gunicorn
path-py==11.0.1
# via -r requirements/base.in
pbr==6.0.0
# via stevedore
psutil==5.9.8
# via edx-django-utils
pycparser==2.21
pycparser==2.22
# via cffi
pynacl==1.5.0
# via edx-django-utils
python-dateutil==2.8.2
python-dateutil==2.9.0.post0
# via botocore
python-memcached==1.62
# via -r requirements/base.in
Expand All @@ -83,17 +85,17 @@ pyyaml==6.0.1
# via edx-django-release-util
requests==2.31.0
# via -r requirements/base.in
s3transfer==0.10.0
s3transfer==0.10.1
# via boto3
six==1.16.0
# via
# edx-django-release-util
# python-dateutil
sqlparse==0.4.4
sqlparse==0.5.0
# via django
stevedore==5.2.0
# via edx-django-utils
typing-extensions==4.10.0
typing-extensions==4.11.0
# via asgiref
urllib3==1.26.18
# via
Expand Down
12 changes: 6 additions & 6 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ colorama==0.4.6
# via tox
distlib==0.3.8
# via virtualenv
filelock==3.13.1
filelock==3.13.4
# via
# tox
# virtualenv
packaging==23.2
packaging==24.0
# via
# pyproject-api
# tox
platformdirs==4.2.0
platformdirs==4.2.1
# via
# tox
# virtualenv
pluggy==1.4.0
pluggy==1.5.0
# via tox
pyproject-api==1.6.1
# via tox
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.13.0
tox==4.15.0
# via -r requirements/ci.in
virtualenv==20.25.1
virtualenv==20.26.0
# via tox
9 changes: 9 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@ 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
2 changes: 2 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@

# Common constraints for edx repos
-c common_constraints.txt

backports-zoneinfo==0.2.1; python_version < '3.9'
Loading
Loading