From 71ccd120c800bc45b070a738cd614c5fad240b39 Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Fri, 6 Sep 2024 09:12:34 +0500 Subject: [PATCH 1/2] fix: move to ubuntu-latest & code cleanup --- .github/workflows/ci.yml | 6 ++--- .github/workflows/pypi-publish.yml | 6 ++--- .readthedocs.yaml | 2 +- requirements/base.txt | 2 +- requirements/constraints.txt | 4 ---- requirements/dev.txt | 37 ++++++++---------------------- requirements/django.in | 4 ---- requirements/django.txt | 8 +++---- requirements/doc.txt | 8 +++---- requirements/pip.txt | 2 +- requirements/test.txt | 30 ++++++++---------------- setup.py | 1 - tox.ini | 8 +++---- 13 files changed, 40 insertions(+), 78 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f66b739f..d01127342 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: jobs: run_tests: name: tests - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -18,9 +18,9 @@ jobs: toxenv: [quality, django42] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 6ed7ebfab..a90b053a2 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -7,13 +7,13 @@ on: jobs: push: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.11 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d52e4ea2b..f3284985c 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -17,7 +17,7 @@ formats: # Set the version of python needed to build these docs. build: - os: "ubuntu-22.04" + os: "ubuntu-lts-latest" tools: python: "3.11" diff --git a/requirements/base.txt b/requirements/base.txt index 8d205ee4c..28eac9055 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,7 +8,7 @@ appdirs==1.4.4 # via fs dnspython==2.6.1 # via pymongo -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via -r requirements/base.in fs==2.4.16 # via -r requirements/base.in diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 3bb18ffde..b23164274 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,7 +10,3 @@ # Common constraints for edx repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - -# diff-cover latest requires (pluggy>=0.13.1,<0.14.0) which conflicts with pytest which requires(pluggy>=0.12,<2.0.0) -# Using the same version of diff-cover which is being used currently in edx-platform to avoid this conflict. -diff-cover==4.0.0 diff --git a/requirements/dev.txt b/requirements/dev.txt index 5cae77611..81cd83c09 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -21,11 +21,11 @@ attrs==24.2.0 # via # -r requirements/test.txt # hypothesis -boto3==1.35.10 +boto3==1.35.13 # via # -r requirements/test.txt # fs-s3fs -botocore==1.35.10 +botocore==1.35.13 # via # -r requirements/test.txt # boto3 @@ -43,6 +43,7 @@ chardet==5.2.0 # via # -r requirements/ci.txt # -r requirements/test.txt + # diff-cover # tox click==8.1.7 # via @@ -72,10 +73,8 @@ coverage[toml]==7.6.1 # pytest-cov ddt==1.7.2 # via -r requirements/test.txt -diff-cover==4.0.0 - # via - # -c requirements/constraints.txt - # -r requirements/test.txt +diff-cover==9.1.1 + # via -r requirements/test.txt dill==0.3.8 # via # -r requirements/test.txt @@ -85,7 +84,7 @@ distlib==0.3.8 # -r requirements/ci.txt # -r requirements/test.txt # virtualenv -django==4.2.15 +django==4.2.16 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt @@ -96,7 +95,7 @@ dnspython==2.6.1 # pymongo edx-lint==5.4.0 # via -r requirements/test.txt -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via -r requirements/test.txt filelock==3.15.4 # via @@ -113,12 +112,8 @@ fs-s3fs==1.1.1 # via # -r requirements/test.txt # openedx-django-pyfs -hypothesis==6.111.2 +hypothesis==6.112.0 # via -r requirements/test.txt -inflect==7.3.1 - # via - # -r requirements/test.txt - # jinja2-pluralize iniconfig==2.0.0 # via # -r requirements/test.txt @@ -132,11 +127,6 @@ jinja2==3.1.4 # -r requirements/test.txt # code-annotations # diff-cover - # jinja2-pluralize -jinja2-pluralize==0.3.0 - # via - # -r requirements/test.txt - # diff-cover jmespath==1.0.1 # via # -r requirements/test.txt @@ -159,10 +149,6 @@ mccabe==0.7.0 # pylint mock==5.1.0 # via -r requirements/test.txt -more-itertools==10.4.0 - # via - # -r requirements/test.txt - # inflect openedx-django-pyfs==3.7.0 # via -r requirements/test.txt packaging==24.1 @@ -243,7 +229,7 @@ pytest==8.3.2 # pytest-django pytest-cov==5.0.0 # via -r requirements/test.txt -pytest-django==4.8.0 +pytest-django==4.9.0 # via -r requirements/test.txt python-dateutil==2.9.0.post0 # via @@ -297,15 +283,10 @@ tox==4.18.0 # via # -r requirements/ci.txt # -r requirements/test.txt -typeguard==4.3.0 - # via - # -r requirements/test.txt - # inflect typing-extensions==4.12.2 # via # -r requirements/test.txt # edx-opaque-keys - # typeguard urllib3==2.2.2 # via # -r requirements/test.txt diff --git a/requirements/django.in b/requirements/django.in index c15b7a5ea..064856e67 100644 --- a/requirements/django.in +++ b/requirements/django.in @@ -8,7 +8,3 @@ Django openedx-django-pyfs>=1.0.5 lazy - -# Needed until we drop testing on Python 3.8 so that -# we don't try to install this on newer versions of python. -backports.zoneinfo;python_version<"3.9" diff --git a/requirements/django.txt b/requirements/django.txt index a1feb5422..153eff8e4 100644 --- a/requirements/django.txt +++ b/requirements/django.txt @@ -10,13 +10,13 @@ appdirs==1.4.4 # fs asgiref==3.8.1 # via django -boto3==1.35.10 +boto3==1.35.13 # via fs-s3fs -botocore==1.35.10 +botocore==1.35.13 # via # boto3 # s3transfer -django==4.2.15 +django==4.2.16 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/django.in @@ -25,7 +25,7 @@ dnspython==2.6.1 # via # -r requirements/base.txt # pymongo -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via -r requirements/base.txt fs==2.4.16 # via diff --git a/requirements/doc.txt b/requirements/doc.txt index fba8f9e7c..bd1782a6d 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -22,11 +22,11 @@ babel==2.16.0 # sphinx beautifulsoup4==4.12.3 # via pydata-sphinx-theme -boto3==1.35.10 +boto3==1.35.13 # via # -r requirements/django.txt # fs-s3fs -botocore==1.35.10 +botocore==1.35.13 # via # -r requirements/django.txt # boto3 @@ -35,7 +35,7 @@ certifi==2024.8.30 # via requests charset-normalizer==3.3.2 # via requests -django==4.2.15 +django==4.2.16 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/django.txt @@ -48,7 +48,7 @@ docutils==0.21.2 # via # pydata-sphinx-theme # sphinx -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via -r requirements/django.txt fs==2.4.16 # via diff --git a/requirements/pip.txt b/requirements/pip.txt index 92563d4fd..f313a9c20 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -10,5 +10,5 @@ wheel==0.44.0 # The following packages are considered to be unsafe in a requirements file: pip==24.2 # via -r requirements/pip.in -setuptools==74.0.0 +setuptools==74.1.2 # via -r requirements/pip.in diff --git a/requirements/test.txt b/requirements/test.txt index b07ebdaaf..ba4edb4c3 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -19,11 +19,11 @@ astroid==3.2.4 # pylint-celery attrs==24.2.0 # via hypothesis -boto3==1.35.10 +boto3==1.35.13 # via # -r requirements/django.txt # fs-s3fs -botocore==1.35.10 +botocore==1.35.13 # via # -r requirements/django.txt # boto3 @@ -31,7 +31,9 @@ botocore==1.35.10 cachetools==5.5.0 # via tox chardet==5.2.0 - # via tox + # via + # diff-cover + # tox click==8.1.7 # via # click-log @@ -49,10 +51,8 @@ coverage[toml]==7.6.1 # pytest-cov ddt==1.7.2 # via -r requirements/test.in -diff-cover==4.0.0 - # via - # -c requirements/constraints.txt - # -r requirements/test.in +diff-cover==9.1.1 + # via -r requirements/test.in dill==0.3.8 # via pylint distlib==0.3.8 @@ -67,7 +67,7 @@ dnspython==2.6.1 # pymongo edx-lint==5.4.0 # via -r requirements/test.in -edx-opaque-keys==2.10.0 +edx-opaque-keys==2.11.0 # via -r requirements/django.txt filelock==3.15.4 # via @@ -82,10 +82,8 @@ fs-s3fs==1.1.1 # via # -r requirements/django.txt # openedx-django-pyfs -hypothesis==6.111.2 +hypothesis==6.112.0 # via -r requirements/test.in -inflect==7.3.1 - # via jinja2-pluralize iniconfig==2.0.0 # via pytest isort==5.13.2 @@ -94,9 +92,6 @@ jinja2==3.1.4 # via # code-annotations # diff-cover - # jinja2-pluralize -jinja2-pluralize==0.3.0 - # via diff-cover jmespath==1.0.1 # via # -r requirements/django.txt @@ -117,8 +112,6 @@ mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.in -more-itertools==10.4.0 - # via inflect openedx-django-pyfs==3.7.0 # via -r requirements/django.txt packaging==24.1 @@ -174,7 +167,7 @@ pytest==8.3.2 # pytest-django pytest-cov==5.0.0 # via -r requirements/test.in -pytest-django==4.8.0 +pytest-django==4.9.0 # via -r requirements/test.in python-dateutil==2.9.0.post0 # via @@ -218,13 +211,10 @@ tomlkit==0.13.2 # via pylint tox==4.18.0 # via -r requirements/test.in -typeguard==4.3.0 - # via inflect typing-extensions==4.12.2 # via # -r requirements/django.txt # edx-opaque-keys - # typeguard urllib3==2.2.2 # via # -r requirements/django.txt diff --git a/setup.py b/setup.py index 779fc04c2..77a3c93ae 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ """ Set up for XBlock """ -import codecs import os import os.path import re diff --git a/tox.ini b/tox.ini index 4f9001094..bf7c2fb86 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,8 @@ filterwarnings = always norecursedirs = .* docs requirements [testenv] -deps = - django42: Django>=4.2,<4.3 +deps = + django42: Django>=4.2,<5.0 -r requirements/test.txt changedir = {envsitepackagesdir} commands = @@ -31,8 +31,8 @@ commands = make html [testenv:quality] -deps = - django42: Django>=4.2,<4.3 +deps = + django42: Django>=4.2,<5.0 -r requirements/test.txt changedir = {toxinidir} commands = From 645eb7ee17904b897933bf6b7906b8120032f0a3 Mon Sep 17 00:00:00 2001 From: Irtaza Akram Date: Mon, 9 Sep 2024 09:31:13 +0500 Subject: [PATCH 2/2] chore: make upgrade --- requirements/ci.txt | 2 +- requirements/dev.txt | 12 ++---------- requirements/test.txt | 8 ++------ 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/requirements/ci.txt b/requirements/ci.txt index 3c5df6382..61355c780 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -22,7 +22,7 @@ packaging==24.1 # via # pyproject-api # tox -platformdirs==4.3.1 +platformdirs==4.3.2 # via # tox # virtualenv diff --git a/requirements/dev.txt b/requirements/dev.txt index 67305db81..886560225 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -73,7 +73,7 @@ coverage[toml]==7.6.1 # pytest-cov ddt==1.7.2 # via -r requirements/test.txt -diff-cover==9.1.1 +diff-cover==9.2.0 # via -r requirements/test.txt dill==0.3.8 # via @@ -114,10 +114,6 @@ fs-s3fs==1.1.1 # openedx-django-pyfs hypothesis==6.112.0 # via -r requirements/test.txt -inflect==7.4.0 - # via - # -r requirements/test.txt - # jinja2-pluralize iniconfig==2.0.0 # via # -r requirements/test.txt @@ -153,10 +149,6 @@ mccabe==0.7.0 # pylint mock==5.1.0 # via -r requirements/test.txt -more-itertools==10.5.0 - # via - # -r requirements/test.txt - # inflect openedx-django-pyfs==3.7.0 # via -r requirements/test.txt packaging==24.1 @@ -176,7 +168,7 @@ pbr==6.1.0 # stevedore pip-tools==7.4.1 # via -r requirements/pip-tools.txt -platformdirs==4.3.1 +platformdirs==4.3.2 # via # -r requirements/ci.txt # -r requirements/test.txt diff --git a/requirements/test.txt b/requirements/test.txt index f0de1f487..b337ef2cb 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -51,7 +51,7 @@ coverage[toml]==7.6.1 # pytest-cov ddt==1.7.2 # via -r requirements/test.in -diff-cover==9.1.1 +diff-cover==9.2.0 # via -r requirements/test.in dill==0.3.8 # via pylint @@ -84,8 +84,6 @@ fs-s3fs==1.1.1 # openedx-django-pyfs hypothesis==6.112.0 # via -r requirements/test.in -inflect==7.4.0 - # via jinja2-pluralize iniconfig==2.0.0 # via pytest isort==5.13.2 @@ -114,8 +112,6 @@ mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.in -more-itertools==10.5.0 - # via inflect openedx-django-pyfs==3.7.0 # via -r requirements/django.txt packaging==24.1 @@ -129,7 +125,7 @@ pbr==6.1.0 # via # -r requirements/django.txt # stevedore -platformdirs==4.3.1 +platformdirs==4.3.2 # via # pylint # tox