Skip to content

Commit

Permalink
Merge pull request #34374 from openedx/feanil/test_on_3.11
Browse files Browse the repository at this point in the history
feanil/test on 3.11
  • Loading branch information
Feanil Patel authored May 2, 2024
2 parents 2ce25b3 + 325a7b9 commit c19aca1
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8']
python-version: ['3.8', '3.11']
os: ['ubuntu-20.04']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 18 ]
python-version: [ 3.8 ]
python-version: [ '3.8', '3.11' ]

steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

- name: Install system requirements
run: sudo apt update && sudo apt install -y libxmlsec1-dev
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/migrations-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
python-version: [ '3.8', '3.11' ]
# 'pinned' is used to install the latest patch version of Django
# within the global constraint i.e. Django==4.2.8 in current case
# because we have global constraint of Django<4.2
# because we have global constraint of Django<4.2
django-version: ["pinned"]
mongo-version: ["4", "7"]
mysql-version: ["8"]
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
./manage.py lms migrate
echo "Running the CMS migrations."
./manage.py cms migrate
# This job aggregates test results. It's the required check for branch protection.
# https://github.com/marketplace/actions/alls-green#why
# https://github.com/orgs/community/discussions/33579
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11

- name: Get pip cache dir
id: pip-cache-dir
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
python-version: [ '3.8', '3.11' ]
node-version: [ 18 ]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ "ubuntu-20.04" ]
python-version: [ "3.8" ]
python-version: [ "3.8", '3.11' ]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
python-version: [ '3.8', '3.11' ]
node-version: [ 18 ]
npm-version: [ 10.5.x ]
mongo-version: ["4.4", "7.0"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests-gh-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.8' ]
python-version: [ '3.8', '3.11' ]
django-version:
- "pinned"
# When updating the shards, remember to make the same changes in
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '3.8' ]
python-version: [ '3.11' ]
django-version:
- "pinned"
steps:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
python-version:
- "3.8"
- "3.11"
django-version:
- "pinned"
# When updating the shards, remember to make the same changes in
Expand Down Expand Up @@ -56,15 +57,20 @@ jobs:
sudo apt-get update && sudo apt-get install -y mongodb-org="${{ matrix.mongo-version }}.*"
fi
- name: checkout repo
uses: actions/checkout@v3

- name: start mongod server for tests
run: |
sudo mkdir -p /data/db
sudo chmod -R a+rw /data/db
mongod &
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: checkout repo
uses: actions/checkout@v3

- name: install requirements
run: |
sudo make test-requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: [ '3.8', '3.12' ]
python-version: [ '3.8', '3.11', '3.12' ]

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/units-test-scripts-user-retirement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: [ '3.8' ]
python-version: [ '3.8', '3.11', '3.12']

steps:
- name: Checkout code
Expand Down
6 changes: 3 additions & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ django-webpack-loader==0.7.0
# version of py2neo will work with Neo4j 3.5.
py2neo<2022

# scipy version 1.8 requires numpy>=1.17.3, we've pinned numpy to <1.17.0 in requirements/edx-sandbox/py38.in
scipy<1.8.0

# edx-enterprise, snowflake-connector-python require charset-normalizer==2.0.0
# Can be removed once snowflake-connector-python>2.7.9 is released with the fix.
charset-normalizer<2.1.0
Expand Down Expand Up @@ -133,3 +130,6 @@ moto<5.0
# path==16.12.0 breaks the unit test collections check
# needs to be investigated and fixed separately
path<16.12.0

# Temporary to Support the python 3.11 Upgrade
backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library
5 changes: 2 additions & 3 deletions requirements/edx-sandbox/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ nltk==3.8.1
# via
# -r requirements/edx-sandbox/base.in
# chem
numpy==1.22.4
numpy==1.24.4
# via
# chem
# contourpy
Expand All @@ -76,9 +76,8 @@ random2==1.0.2
# via -r requirements/edx-sandbox/base.in
regex==2024.4.16
# via nltk
scipy==1.7.3
scipy==1.10.1
# via
# -c requirements/edx-sandbox/../constraints.txt
# -r requirements/edx-sandbox/base.in
# chem
# openedx-calc
Expand Down
8 changes: 4 additions & 4 deletions requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ babel==2.14.0
# enmerkar-underscore
backoff==1.10.0
# via analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/edx/../constraints.txt
# celery
# django
# edx-milestones
Expand Down Expand Up @@ -747,7 +748,7 @@ nltk==3.8.1
# via chem
nodeenv==1.8.0
# via -r requirements/edx/kernel.in
numpy==1.22.4
numpy==1.24.4
# via
# chem
# openedx-calc
Expand Down Expand Up @@ -1045,9 +1046,8 @@ s3transfer==0.10.0
# via boto3
sailthru-client==2.2.3
# via edx-ace
scipy==1.7.3
scipy==1.10.1
# via
# -c requirements/edx/../constraints.txt
# chem
# openedx-calc
semantic-version==2.10.0
Expand Down
8 changes: 4 additions & 4 deletions requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ backoff==1.10.0
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# celery
Expand Down Expand Up @@ -1246,7 +1247,7 @@ nodeenv==1.8.0
# -r requirements/edx/assets.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
numpy==1.22.4
numpy==1.24.4
# via
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
Expand Down Expand Up @@ -1797,9 +1798,8 @@ sailthru-client==2.2.3
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# edx-ace
scipy==1.7.3
scipy==1.10.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# chem
Expand Down
8 changes: 4 additions & 4 deletions requirements/edx/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ backoff==1.10.0
# via
# -r requirements/edx/base.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
# celery
# django
Expand Down Expand Up @@ -880,7 +881,7 @@ nltk==3.8.1
# chem
nodeenv==1.8.0
# via -r requirements/edx/base.txt
numpy==1.22.4
numpy==1.24.4
# via
# -r requirements/edx/base.txt
# chem
Expand Down Expand Up @@ -1239,9 +1240,8 @@ sailthru-client==2.2.3
# via
# -r requirements/edx/base.txt
# edx-ace
scipy==1.7.3
scipy==1.10.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
# chem
# openedx-calc
Expand Down
8 changes: 4 additions & 4 deletions requirements/edx/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ backoff==1.10.0
# via
# -r requirements/edx/base.txt
# analytics-python
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
# celery
# django
Expand Down Expand Up @@ -935,7 +936,7 @@ nltk==3.8.1
# chem
nodeenv==1.8.0
# via -r requirements/edx/base.txt
numpy==1.22.4
numpy==1.24.4
# via
# -r requirements/edx/base.txt
# chem
Expand Down Expand Up @@ -1360,9 +1361,8 @@ sailthru-client==2.2.3
# via
# -r requirements/edx/base.txt
# edx-ace
scipy==1.7.3
scipy==1.10.1
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
# chem
# openedx-calc
Expand Down
3 changes: 2 additions & 1 deletion scripts/user_retirement/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ attrs==23.2.0
# via zeep
backoff==2.2.1
# via -r scripts/user_retirement/requirements/base.in
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -c scripts/user_retirement/requirements/../../../requirements/constraints.txt
# django
# pendulum
boto3==1.34.26
Expand Down
2 changes: 1 addition & 1 deletion scripts/user_retirement/requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ attrs==23.2.0
# zeep
backoff==2.2.1
# via -r scripts/user_retirement/requirements/base.txt
backports-zoneinfo==0.2.1
backports-zoneinfo==0.2.1 ; python_version < "3.9"
# via
# -r scripts/user_retirement/requirements/base.txt
# django
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38, quality
envlist = py{38,311} quality

# This is needed to prevent the lms, cms, and openedx packages inside the "Open
# edX" package (defined in setup.py) from getting installed into site-packages
Expand Down

0 comments on commit c19aca1

Please sign in to comment.