From f3e184770b0f338a5db3f1731982ee98c4b14d36 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 26 Feb 2024 13:25:34 +0500 Subject: [PATCH 1/4] feat: add python312 support --- .github/workflows/ci.yml | 67 ++++++++++++++++++++++++---------------- tox.ini | 2 +- 2 files changed, 41 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0e218a..eef2e6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,10 +2,10 @@ name: Python CI on: push: - branches: [ main ] + branches: [main] pull_request: branches: - - '**' + - '**' jobs: @@ -15,30 +15,43 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.9'] - toxenv: ["py39", "quality", "docs", "pii_check"] + python-version: + - '3.9' + - '3.12' + toxenv: + - "py39" + - "py312" + - "quality" + - "docs" + - "pii_check" + exclude: + - python-version: '3.9' + toxenv: 'py312' + - python-version: '3.12' + toxenv: 'py39' + steps: - - uses: actions/checkout@v3 - - name: setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Install Dependencies - run: pip install -r requirements/ci.txt - - - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox - - - name: Run coverage - if: matrix.python-version == '3.9' && matrix.toxenv == 'py39' - uses: codecov/codecov-action@v3 - with: - flags: unittests - fail_ci_if_error: true + - uses: actions/checkout@v3 + - name: setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + + - name: Run coverage + if: matrix.python-version == '3.9' && matrix.toxenv == 'py39' + uses: codecov/codecov-action@v3 + with: + flags: unittests + fail_ci_if_error: true diff --git a/tox.ini b/tox.ini index f0b2e4b..708346f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py39-django{42}, quality, docs, pii_check +envlist = py{39, 312}-django{42}, quality, docs, pii_check skipsdist = true [doc8] From 8fd29107ccde3fe967b204e92a63d89f4d1e8590 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 26 Feb 2024 15:37:55 +0500 Subject: [PATCH 2/4] fix: include setuptools in requirements --- Makefile | 4 +-- requirements/base.in | 1 + requirements/base.txt | 25 ++++++------- requirements/ci.txt | 2 +- requirements/common_constraints.txt | 2 ++ requirements/dev.txt | 46 ++++++++++++------------ requirements/doc.txt | 55 +++++++++++++---------------- requirements/pip-tools.txt | 8 +++-- requirements/pip.txt | 2 +- requirements/production.txt | 36 +++++++------------ requirements/quality.txt | 36 ++++++++----------- requirements/test.txt | 34 +++++++----------- requirements/validation.txt | 46 +++++++++++------------- 13 files changed, 129 insertions(+), 168 deletions(-) diff --git a/Makefile b/Makefile index ed28a6b..1145256 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ html_coverage: ## generate and view HTML coverage report coverage html && open htmlcov/index.html # Define PIP_COMPILE_OPTS=-v to get more information during make upgrade. -PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS) +PIP_COMPILE = pip-compile --upgrade --allow-unsafe $(PIP_COMPILE_OPTS) COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt .PHONY: $(COMMON_CONSTRAINTS_TXT) @@ -109,7 +109,7 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with t mv requirements/common_constraints.tmp requirements/common_constraints.txt pip install -qr requirements/pip-tools.txt # Make sure to compile files after any other files they include! - $(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in + $(PIP_COMPILE) -o requirements/pip.txt requirements/pip.in $(PIP_COMPILE) -o requirements/pip-tools.txt requirements/pip-tools.in pip install -qr requirements/pip.txt pip install -qr requirements/pip-tools.txt diff --git a/requirements/base.in b/requirements/base.in index 9cc6d5a..0a6bb15 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -17,3 +17,4 @@ genanki # used to generate Anki flash card deck files convenient mysqlclient openai # OpenAI library used to generate flash card candidates from course content pytz +setuptools diff --git a/requirements/base.txt b/requirements/base.txt index 0a15d44..a76f147 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # -anki==23.12.1 +anki==2.1.25 # via -r requirements/base.in annotated-types==0.6.0 # via pydantic @@ -16,6 +16,8 @@ asgiref==3.7.2 # via # django # django-cors-headers +backports-zoneinfo==0.2.1 + # via django beautifulsoup4==4.12.3 # via anki cached-property==1.5.2 @@ -52,9 +54,7 @@ defusedxml==0.8.0rc2 # python3-openid # social-auth-core distro==1.9.0 - # via - # anki - # openai + # via openai django==4.2.10 # via # -r requirements/base.in @@ -122,14 +122,10 @@ idna==3.6 # anyio # httpx # requests -importlib-metadata==7.0.1 - # via markdown itypes==1.2.0 # via coreapi jinja2==3.1.3 # via coreschema -markdown==3.5.2 - # via anki markupsafe==2.1.5 # via jinja2 mysqlclient==2.2.4 @@ -144,8 +140,6 @@ openai==1.12.0 # via -r requirements/base.in openapi-codec==1.3.2 # via django-rest-swagger -orjson==3.9.15 - # via anki pbr==6.0.0 # via stevedore protobuf==4.25.3 @@ -169,8 +163,6 @@ pymongo==3.13.0 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils -pysocks==1.7.1 - # via requests python3-openid==3.2.0 # via social-auth-core pytz==2024.1 @@ -225,6 +217,7 @@ tqdm==4.66.2 # via openai typing-extensions==4.10.0 # via + # annotated-types # anyio # asgiref # edx-opaque-keys @@ -235,5 +228,7 @@ uritemplate==4.1.1 # via coreapi urllib3==2.2.1 # via requests -zipp==3.17.0 - # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.1.1 + # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index 7e7ecc8..a58d1b1 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 29c3b40..48b3574 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -1,4 +1,6 @@ + + # A central location for most common version constraints # (across edx repos) for pip-installation. # diff --git a/requirements/dev.txt b/requirements/dev.txt index b498e68..39c235b 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # -anki==23.12.1 +anki==2.1.25 # via -r requirements/validation.txt annotated-types==0.6.0 # via @@ -25,6 +25,10 @@ astroid==3.1.0 # -r requirements/validation.txt # pylint # pylint-celery +backports-zoneinfo==0.2.1 + # via + # -r requirements/validation.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/validation.txt @@ -103,7 +107,6 @@ cryptography==42.0.5 # via # -r requirements/validation.txt # pyjwt - # secretstorage # social-auth-core decorator==5.1.1 # via @@ -127,7 +130,6 @@ distlib==0.3.8 distro==1.9.0 # via # -r requirements/validation.txt - # anki # openai django==4.2.10 # via @@ -239,8 +241,11 @@ importlib-metadata==7.0.1 # -r requirements/validation.txt # build # keyring - # markdown # twine +importlib-resources==6.1.2 + # via + # -r requirements/validation.txt + # keyring iniconfig==2.0.0 # via # -r requirements/validation.txt @@ -257,11 +262,6 @@ jaraco-classes==3.3.1 # via # -r requirements/validation.txt # keyring -jeepney==0.8.0 - # via - # -r requirements/validation.txt - # keyring - # secretstorage jinja2==3.1.3 # via # -r requirements/validation.txt @@ -274,10 +274,6 @@ keyring==24.3.0 # twine lxml==5.1.0 # via edx-i18n-tools -markdown==3.5.2 - # via - # -r requirements/validation.txt - # anki markdown-it-py==3.0.0 # via # -r requirements/validation.txt @@ -319,10 +315,6 @@ openapi-codec==1.3.2 # via # -r requirements/validation.txt # django-rest-swagger -orjson==3.9.15 - # via - # -r requirements/validation.txt - # anki packaging==23.2 # via # -r requirements/pip-tools.txt @@ -496,10 +488,6 @@ rich==13.7.0 # via # -r requirements/validation.txt # twine -secretstorage==3.3.3 - # via - # -r requirements/validation.txt - # keyring semantic-version==2.10.0 # via # -r requirements/validation.txt @@ -583,6 +571,7 @@ twine==5.0.0 typing-extensions==4.10.0 # via # -r requirements/validation.txt + # annotated-types # anyio # asgiref # astroid @@ -591,6 +580,7 @@ typing-extensions==4.10.0 # pydantic # pydantic-core # pylint + # rich uritemplate==4.1.1 # via # -r requirements/validation.txt @@ -613,7 +603,15 @@ zipp==3.17.0 # -r requirements/pip-tools.txt # -r requirements/validation.txt # importlib-metadata + # importlib-resources # The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools +pip==24.0 + # via + # -r requirements/pip-tools.txt + # pip-tools +setuptools==69.1.1 + # via + # -r requirements/pip-tools.txt + # -r requirements/validation.txt + # pip-tools diff --git a/requirements/doc.txt b/requirements/doc.txt index 808a28c..3cb3598 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # accessible-pygments==0.0.4 # via pydata-sphinx-theme -alabaster==0.7.16 +alabaster==0.7.13 # via sphinx -anki==23.12.1 +anki==2.1.25 # via -r requirements/test.txt annotated-types==0.6.0 # via @@ -33,6 +33,10 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx +backports-zoneinfo==0.2.1 + # via + # -r requirements/test.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/test.txt @@ -107,7 +111,6 @@ cryptography==42.0.5 # via # -r requirements/test.txt # pyjwt - # secretstorage # social-auth-core decorator==5.1.1 # via @@ -129,7 +132,6 @@ distlib==0.3.8 distro==1.9.0 # via # -r requirements/test.txt - # anki # openai django==4.2.10 # via @@ -170,7 +172,7 @@ djangorestframework==3.14.0 # edx-drf-extensions doc8==1.1.1 # via -r requirements/doc.in -docutils==0.20.1 +docutils==0.19 # via # doc8 # pydata-sphinx-theme @@ -238,12 +240,12 @@ imagesize==1.4.1 # via sphinx importlib-metadata==7.0.1 # via - # -r requirements/test.txt # build # keyring - # markdown # sphinx # twine +importlib-resources==6.1.2 + # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt @@ -258,10 +260,6 @@ itypes==1.2.0 # coreapi jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via # -r requirements/test.txt @@ -270,10 +268,6 @@ jinja2==3.1.3 # sphinx keyring==24.3.0 # via twine -markdown==3.5.2 - # via - # -r requirements/test.txt - # anki markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 @@ -307,10 +301,6 @@ openapi-codec==1.3.2 # via # -r requirements/test.txt # django-rest-swagger -orjson==3.9.15 - # via - # -r requirements/test.txt - # anki packaging==23.2 # via # -r requirements/test.txt @@ -435,6 +425,7 @@ python3-openid==3.2.0 pytz==2024.1 # via # -r requirements/test.txt + # babel # djangorestframework pyyaml==6.0.1 # via @@ -469,8 +460,6 @@ rfc3986==2.0.0 # via twine rich==13.7.0 # via twine -secretstorage==3.3.3 - # via keyring semantic-version==2.10.0 # via # -r requirements/test.txt @@ -510,24 +499,24 @@ soupsieve==2.5 # via # -r requirements/test.txt # beautifulsoup4 -sphinx==7.2.6 +sphinx==6.2.1 # via # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.1.2 +sphinx-book-theme==1.0.1 # via -r requirements/doc.in -sphinxcontrib-applehelp==1.0.8 +sphinxcontrib-applehelp==1.0.4 # via sphinx -sphinxcontrib-devhelp==1.0.6 +sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.5 +sphinxcontrib-htmlhelp==2.0.1 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.7 +sphinxcontrib-qthelp==1.0.3 # via sphinx -sphinxcontrib-serializinghtml==1.1.10 +sphinxcontrib-serializinghtml==1.1.5 # via sphinx sqlparse==0.4.4 # via @@ -570,6 +559,7 @@ twine==5.0.0 typing-extensions==4.10.0 # via # -r requirements/test.txt + # annotated-types # anyio # asgiref # astroid @@ -579,6 +569,7 @@ typing-extensions==4.10.0 # pydantic-core # pydata-sphinx-theme # pylint + # rich uritemplate==4.1.1 # via # -r requirements/test.txt @@ -594,5 +585,9 @@ virtualenv==20.25.1 # tox zipp==3.17.0 # via - # -r requirements/test.txt # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.1.1 + # via -r requirements/test.txt diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index c530da7..ab115fa 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade @@ -29,5 +29,7 @@ zipp==3.17.0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools +pip==24.0 + # via pip-tools +setuptools==69.1.1 + # via pip-tools diff --git a/requirements/pip.txt b/requirements/pip.txt index 02bceaf..6665603 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade diff --git a/requirements/production.txt b/requirements/production.txt index 7066f27..e5527a1 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # -anki==23.12.1 +anki==2.1.25 # via -r requirements/base.txt annotated-types==0.6.0 # via @@ -20,6 +20,10 @@ asgiref==3.7.2 # -r requirements/base.txt # django # django-cors-headers +backports-zoneinfo==0.2.1 + # via + # -r requirements/base.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/base.txt @@ -77,7 +81,6 @@ defusedxml==0.8.0rc2 distro==1.9.0 # via # -r requirements/base.txt - # anki # openai django==4.2.10 # via @@ -169,10 +172,6 @@ idna==3.6 # anyio # httpx # requests -importlib-metadata==7.0.1 - # via - # -r requirements/base.txt - # markdown itypes==1.2.0 # via # -r requirements/base.txt @@ -181,10 +180,6 @@ jinja2==3.1.3 # via # -r requirements/base.txt # coreschema -markdown==3.5.2 - # via - # -r requirements/base.txt - # anki markupsafe==2.1.5 # via # -r requirements/base.txt @@ -208,10 +203,6 @@ openapi-codec==1.3.2 # via # -r requirements/base.txt # django-rest-swagger -orjson==3.9.15 - # via - # -r requirements/base.txt - # anki packaging==23.2 # via gunicorn pbr==6.0.0 @@ -255,9 +246,7 @@ pynacl==1.5.0 # -r requirements/base.txt # edx-django-utils pysocks==1.7.1 - # via - # -r requirements/base.txt - # requests + # via requests python-memcached==1.62 # via -r requirements/production.in python3-openid==3.2.0 @@ -340,6 +329,7 @@ tqdm==4.66.2 typing-extensions==4.10.0 # via # -r requirements/base.txt + # annotated-types # anyio # asgiref # edx-opaque-keys @@ -354,14 +344,14 @@ urllib3==2.2.1 # via # -r requirements/base.txt # requests -zipp==3.17.0 - # via - # -r requirements/base.txt - # importlib-metadata zope-event==5.0 # via gevent zope-interface==6.2 # via gevent # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==69.1.1 + # via + # -r requirements/base.txt + # zope-event + # zope-interface diff --git a/requirements/quality.txt b/requirements/quality.txt index 8edde18..523cc66 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # -anki==23.12.1 +anki==2.1.25 # via -r requirements/test.txt annotated-types==0.6.0 # via @@ -25,6 +25,10 @@ astroid==3.1.0 # -r requirements/test.txt # pylint # pylint-celery +backports-zoneinfo==0.2.1 + # via + # -r requirements/test.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/test.txt @@ -96,7 +100,6 @@ cryptography==42.0.5 # via # -r requirements/test.txt # pyjwt - # secretstorage # social-auth-core decorator==5.1.1 # via @@ -118,7 +121,6 @@ distlib==0.3.8 distro==1.9.0 # via # -r requirements/test.txt - # anki # openai django==4.2.10 # via @@ -220,10 +222,10 @@ idna==3.6 # requests importlib-metadata==7.0.1 # via - # -r requirements/test.txt # keyring - # markdown # twine +importlib-resources==6.1.2 + # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt @@ -239,10 +241,6 @@ itypes==1.2.0 # coreapi jaraco-classes==3.3.1 # via keyring -jeepney==0.8.0 - # via - # keyring - # secretstorage jinja2==3.1.3 # via # -r requirements/test.txt @@ -250,10 +248,6 @@ jinja2==3.1.3 # coreschema keyring==24.3.0 # via twine -markdown==3.5.2 - # via - # -r requirements/test.txt - # anki markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 @@ -287,10 +281,6 @@ openapi-codec==1.3.2 # via # -r requirements/test.txt # django-rest-swagger -orjson==3.9.15 - # via - # -r requirements/test.txt - # anki packaging==23.2 # via # -r requirements/test.txt @@ -437,8 +427,6 @@ rfc3986==2.0.0 # via twine rich==13.7.0 # via twine -secretstorage==3.3.3 - # via keyring semantic-version==2.10.0 # via # -r requirements/test.txt @@ -515,6 +503,7 @@ twine==5.0.0 typing-extensions==4.10.0 # via # -r requirements/test.txt + # annotated-types # anyio # asgiref # astroid @@ -523,6 +512,7 @@ typing-extensions==4.10.0 # pydantic # pydantic-core # pylint + # rich uritemplate==4.1.1 # via # -r requirements/test.txt @@ -538,5 +528,9 @@ virtualenv==20.25.1 # tox zipp==3.17.0 # via - # -r requirements/test.txt # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.1.1 + # via -r requirements/test.txt diff --git a/requirements/test.txt b/requirements/test.txt index c6b8d4b..72ff6d2 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # -anki==23.12.1 +anki==2.1.25 # via -r requirements/base.txt annotated-types==0.6.0 # via @@ -24,6 +24,10 @@ astroid==3.1.0 # via # pylint # pylint-celery +backports-zoneinfo==0.2.1 + # via + # -r requirements/base.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/base.txt @@ -104,7 +108,6 @@ distlib==0.3.8 distro==1.9.0 # via # -r requirements/base.txt - # anki # openai # via # -r requirements/base.txt @@ -198,10 +201,6 @@ idna==3.6 # anyio # httpx # requests -importlib-metadata==7.0.1 - # via - # -r requirements/base.txt - # markdown iniconfig==2.0.0 # via pytest isort==5.13.2 @@ -215,10 +214,6 @@ jinja2==3.1.3 # -r requirements/base.txt # code-annotations # coreschema -markdown==3.5.2 - # via - # -r requirements/base.txt - # anki markupsafe==2.1.5 # via # -r requirements/base.txt @@ -242,10 +237,6 @@ openapi-codec==1.3.2 # via # -r requirements/base.txt # django-rest-swagger -orjson==3.9.15 - # via - # -r requirements/base.txt - # anki packaging==23.2 # via # pyproject-api @@ -317,9 +308,7 @@ pynacl==1.5.0 pyproject-api==1.6.1 # via tox pysocks==1.7.1 - # via - # -r requirements/base.txt - # requests + # via requests pytest==8.0.2 # via # pytest-cov @@ -425,6 +414,7 @@ tqdm==4.66.2 typing-extensions==4.10.0 # via # -r requirements/base.txt + # annotated-types # anyio # asgiref # astroid @@ -443,7 +433,7 @@ urllib3==2.2.1 # requests virtualenv==20.25.1 # via tox -zipp==3.17.0 - # via - # -r requirements/base.txt - # importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.1.1 + # via -r requirements/base.txt diff --git a/requirements/validation.txt b/requirements/validation.txt index 96709db..5f00afe 100644 --- a/requirements/validation.txt +++ b/requirements/validation.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # # make upgrade # -anki==23.12.1 +anki==2.1.25 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -31,6 +31,11 @@ astroid==3.1.0 # -r requirements/test.txt # pylint # pylint-celery +backports-zoneinfo==0.2.1 + # via + # -r requirements/quality.txt + # -r requirements/test.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/quality.txt @@ -118,7 +123,6 @@ cryptography==42.0.5 # -r requirements/quality.txt # -r requirements/test.txt # pyjwt - # secretstorage # social-auth-core decorator==5.1.1 # via @@ -145,7 +149,6 @@ distro==1.9.0 # via # -r requirements/quality.txt # -r requirements/test.txt - # anki # openai django==4.2.10 # via @@ -282,10 +285,12 @@ idna==3.6 importlib-metadata==7.0.1 # via # -r requirements/quality.txt - # -r requirements/test.txt # keyring - # markdown # twine +importlib-resources==6.1.2 + # via + # -r requirements/quality.txt + # keyring iniconfig==2.0.0 # via # -r requirements/quality.txt @@ -305,11 +310,6 @@ jaraco-classes==3.3.1 # via # -r requirements/quality.txt # keyring -jeepney==0.8.0 - # via - # -r requirements/quality.txt - # keyring - # secretstorage jinja2==3.1.3 # via # -r requirements/quality.txt @@ -320,11 +320,6 @@ keyring==24.3.0 # via # -r requirements/quality.txt # twine -markdown==3.5.2 - # via - # -r requirements/quality.txt - # -r requirements/test.txt - # anki markdown-it-py==3.0.0 # via # -r requirements/quality.txt @@ -375,11 +370,6 @@ openapi-codec==1.3.2 # -r requirements/quality.txt # -r requirements/test.txt # django-rest-swagger -orjson==3.9.15 - # via - # -r requirements/quality.txt - # -r requirements/test.txt - # anki packaging==23.2 # via # -r requirements/quality.txt @@ -566,10 +556,6 @@ rich==13.7.0 # via # -r requirements/quality.txt # twine -secretstorage==3.3.3 - # via - # -r requirements/quality.txt - # keyring semantic-version==2.10.0 # via # -r requirements/quality.txt @@ -665,6 +651,7 @@ typing-extensions==4.10.0 # via # -r requirements/quality.txt # -r requirements/test.txt + # annotated-types # anyio # asgiref # astroid @@ -673,6 +660,7 @@ typing-extensions==4.10.0 # pydantic # pydantic-core # pylint + # rich uritemplate==4.1.1 # via # -r requirements/quality.txt @@ -692,5 +680,11 @@ virtualenv==20.25.1 zipp==3.17.0 # via # -r requirements/quality.txt - # -r requirements/test.txt # importlib-metadata + # importlib-resources + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.1.1 + # via + # -r requirements/quality.txt + # -r requirements/test.txt From ccf8fdd14c74a13991989640956293557ae0b7ff Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 26 Feb 2024 15:50:55 +0500 Subject: [PATCH 3/4] fix: install backports-zoneinfo only for python<3.9 --- requirements/base.in | 3 +- requirements/base.txt | 17 ++++++++---- requirements/ci.txt | 2 +- requirements/common_constraints.txt | 1 - requirements/dev.txt | 24 ++++++++-------- requirements/doc.txt | 43 +++++++++++++++-------------- requirements/pip-tools.txt | 2 +- requirements/pip.txt | 2 +- requirements/production.txt | 29 +++++++++++++------ requirements/quality.txt | 24 ++++++++-------- requirements/test.txt | 29 +++++++++++++------ requirements/validation.txt | 29 +++++++++---------- 12 files changed, 120 insertions(+), 85 deletions(-) diff --git a/requirements/base.in b/requirements/base.in index 0a6bb15..dceb518 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -17,4 +17,5 @@ genanki # used to generate Anki flash card deck files convenient mysqlclient openai # OpenAI library used to generate flash card candidates from course content pytz -setuptools +setuptools #setuptools is needed for Python 3.12 +backports.zoneinfo;python_version<"3.9" # Can be removed once we upgrade to Python 3.12 diff --git a/requirements/base.txt b/requirements/base.txt index a76f147..9897669 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # -anki==2.1.25 +anki==23.12.1 # via -r requirements/base.in annotated-types==0.6.0 # via pydantic @@ -16,8 +16,6 @@ asgiref==3.7.2 # via # django # django-cors-headers -backports-zoneinfo==0.2.1 - # via django beautifulsoup4==4.12.3 # via anki cached-property==1.5.2 @@ -122,10 +120,14 @@ idna==3.6 # anyio # httpx # requests +importlib-metadata==7.0.1 + # via markdown itypes==1.2.0 # via coreapi jinja2==3.1.3 # via coreschema +markdown==3.5.2 + # via anki markupsafe==2.1.5 # via jinja2 mysqlclient==2.2.4 @@ -140,6 +142,8 @@ openai==1.12.0 # via -r requirements/base.in openapi-codec==1.3.2 # via django-rest-swagger +orjson==3.9.15 + # via anki pbr==6.0.0 # via stevedore protobuf==4.25.3 @@ -163,6 +167,8 @@ pymongo==3.13.0 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils +pysocks==1.7.1 + # via requests python3-openid==3.2.0 # via social-auth-core pytz==2024.1 @@ -217,7 +223,6 @@ tqdm==4.66.2 # via openai typing-extensions==4.10.0 # via - # annotated-types # anyio # asgiref # edx-opaque-keys @@ -228,6 +233,8 @@ uritemplate==4.1.1 # via coreapi urllib3==2.2.1 # via requests +zipp==3.17.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: setuptools==69.1.1 diff --git a/requirements/ci.txt b/requirements/ci.txt index a58d1b1..7e7ecc8 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -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.9 # by the following command: # # make upgrade diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 48b3574..0fc27e8 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -1,6 +1,5 @@ - # A central location for most common version constraints # (across edx repos) for pip-installation. # diff --git a/requirements/dev.txt b/requirements/dev.txt index 39c235b..188dd0d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # -anki==2.1.25 +anki==23.12.1 # via -r requirements/validation.txt annotated-types==0.6.0 # via @@ -25,10 +25,6 @@ astroid==3.1.0 # -r requirements/validation.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 - # via - # -r requirements/validation.txt - # django beautifulsoup4==4.12.3 # via # -r requirements/validation.txt @@ -241,11 +237,8 @@ importlib-metadata==7.0.1 # -r requirements/validation.txt # build # keyring + # markdown # twine -importlib-resources==6.1.2 - # via - # -r requirements/validation.txt - # keyring iniconfig==2.0.0 # via # -r requirements/validation.txt @@ -274,6 +267,10 @@ keyring==24.3.0 # twine lxml==5.1.0 # via edx-i18n-tools +markdown==3.5.2 + # via + # -r requirements/validation.txt + # anki markdown-it-py==3.0.0 # via # -r requirements/validation.txt @@ -315,6 +312,10 @@ openapi-codec==1.3.2 # via # -r requirements/validation.txt # django-rest-swagger +orjson==3.9.15 + # via + # -r requirements/validation.txt + # anki packaging==23.2 # via # -r requirements/pip-tools.txt @@ -571,7 +572,6 @@ twine==5.0.0 typing-extensions==4.10.0 # via # -r requirements/validation.txt - # annotated-types # anyio # asgiref # astroid @@ -580,7 +580,6 @@ typing-extensions==4.10.0 # pydantic # pydantic-core # pylint - # rich uritemplate==4.1.1 # via # -r requirements/validation.txt @@ -603,7 +602,6 @@ zipp==3.17.0 # -r requirements/pip-tools.txt # -r requirements/validation.txt # importlib-metadata - # importlib-resources # The following packages are considered to be unsafe in a requirements file: pip==24.0 diff --git a/requirements/doc.txt b/requirements/doc.txt index 3cb3598..3552e49 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # accessible-pygments==0.0.4 # via pydata-sphinx-theme -alabaster==0.7.13 +alabaster==0.7.16 # via sphinx -anki==2.1.25 +anki==23.12.1 # via -r requirements/test.txt annotated-types==0.6.0 # via @@ -33,10 +33,6 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx -backports-zoneinfo==0.2.1 - # via - # -r requirements/test.txt - # django beautifulsoup4==4.12.3 # via # -r requirements/test.txt @@ -172,7 +168,7 @@ djangorestframework==3.14.0 # edx-drf-extensions doc8==1.1.1 # via -r requirements/doc.in -docutils==0.19 +docutils==0.20.1 # via # doc8 # pydata-sphinx-theme @@ -240,12 +236,12 @@ imagesize==1.4.1 # via sphinx importlib-metadata==7.0.1 # via + # -r requirements/test.txt # build # keyring + # markdown # sphinx # twine -importlib-resources==6.1.2 - # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt @@ -268,6 +264,10 @@ jinja2==3.1.3 # sphinx keyring==24.3.0 # via twine +markdown==3.5.2 + # via + # -r requirements/test.txt + # anki markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 @@ -301,6 +301,10 @@ openapi-codec==1.3.2 # via # -r requirements/test.txt # django-rest-swagger +orjson==3.9.15 + # via + # -r requirements/test.txt + # anki packaging==23.2 # via # -r requirements/test.txt @@ -425,7 +429,6 @@ python3-openid==3.2.0 pytz==2024.1 # via # -r requirements/test.txt - # babel # djangorestframework pyyaml==6.0.1 # via @@ -499,24 +502,24 @@ soupsieve==2.5 # via # -r requirements/test.txt # beautifulsoup4 -sphinx==6.2.1 +sphinx==7.2.6 # via # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.0.1 +sphinx-book-theme==1.1.2 # via -r requirements/doc.in -sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-applehelp==1.0.8 # via sphinx -sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-devhelp==1.0.6 # via sphinx -sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-htmlhelp==2.0.5 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-qthelp==1.0.7 # via sphinx -sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib-serializinghtml==1.1.10 # via sphinx sqlparse==0.4.4 # via @@ -559,7 +562,6 @@ twine==5.0.0 typing-extensions==4.10.0 # via # -r requirements/test.txt - # annotated-types # anyio # asgiref # astroid @@ -569,7 +571,6 @@ typing-extensions==4.10.0 # pydantic-core # pydata-sphinx-theme # pylint - # rich uritemplate==4.1.1 # via # -r requirements/test.txt @@ -585,8 +586,8 @@ virtualenv==20.25.1 # tox zipp==3.17.0 # via + # -r requirements/test.txt # importlib-metadata - # importlib-resources # The following packages are considered to be unsafe in a requirements file: setuptools==69.1.1 diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index ab115fa..064487c 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -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.9 # by the following command: # # make upgrade diff --git a/requirements/pip.txt b/requirements/pip.txt index 6665603..02bceaf 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -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.9 # by the following command: # # make upgrade diff --git a/requirements/production.txt b/requirements/production.txt index e5527a1..4f7d0d3 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # -anki==2.1.25 +anki==23.12.1 # via -r requirements/base.txt annotated-types==0.6.0 # via @@ -20,10 +20,6 @@ asgiref==3.7.2 # -r requirements/base.txt # django # django-cors-headers -backports-zoneinfo==0.2.1 - # via - # -r requirements/base.txt - # django beautifulsoup4==4.12.3 # via # -r requirements/base.txt @@ -172,6 +168,10 @@ idna==3.6 # anyio # httpx # requests +importlib-metadata==7.0.1 + # via + # -r requirements/base.txt + # markdown itypes==1.2.0 # via # -r requirements/base.txt @@ -180,6 +180,10 @@ jinja2==3.1.3 # via # -r requirements/base.txt # coreschema +markdown==3.5.2 + # via + # -r requirements/base.txt + # anki markupsafe==2.1.5 # via # -r requirements/base.txt @@ -203,6 +207,10 @@ openapi-codec==1.3.2 # via # -r requirements/base.txt # django-rest-swagger +orjson==3.9.15 + # via + # -r requirements/base.txt + # anki packaging==23.2 # via gunicorn pbr==6.0.0 @@ -246,7 +254,9 @@ pynacl==1.5.0 # -r requirements/base.txt # edx-django-utils pysocks==1.7.1 - # via requests + # via + # -r requirements/base.txt + # requests python-memcached==1.62 # via -r requirements/production.in python3-openid==3.2.0 @@ -329,7 +339,6 @@ tqdm==4.66.2 typing-extensions==4.10.0 # via # -r requirements/base.txt - # annotated-types # anyio # asgiref # edx-opaque-keys @@ -344,6 +353,10 @@ urllib3==2.2.1 # via # -r requirements/base.txt # requests +zipp==3.17.0 + # via + # -r requirements/base.txt + # importlib-metadata zope-event==5.0 # via gevent zope-interface==6.2 diff --git a/requirements/quality.txt b/requirements/quality.txt index 523cc66..c8374ab 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # -anki==2.1.25 +anki==23.12.1 # via -r requirements/test.txt annotated-types==0.6.0 # via @@ -25,10 +25,6 @@ astroid==3.1.0 # -r requirements/test.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 - # via - # -r requirements/test.txt - # django beautifulsoup4==4.12.3 # via # -r requirements/test.txt @@ -222,10 +218,10 @@ idna==3.6 # requests importlib-metadata==7.0.1 # via + # -r requirements/test.txt # keyring + # markdown # twine -importlib-resources==6.1.2 - # via keyring iniconfig==2.0.0 # via # -r requirements/test.txt @@ -248,6 +244,10 @@ jinja2==3.1.3 # coreschema keyring==24.3.0 # via twine +markdown==3.5.2 + # via + # -r requirements/test.txt + # anki markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 @@ -281,6 +281,10 @@ openapi-codec==1.3.2 # via # -r requirements/test.txt # django-rest-swagger +orjson==3.9.15 + # via + # -r requirements/test.txt + # anki packaging==23.2 # via # -r requirements/test.txt @@ -503,7 +507,6 @@ twine==5.0.0 typing-extensions==4.10.0 # via # -r requirements/test.txt - # annotated-types # anyio # asgiref # astroid @@ -512,7 +515,6 @@ typing-extensions==4.10.0 # pydantic # pydantic-core # pylint - # rich uritemplate==4.1.1 # via # -r requirements/test.txt @@ -528,8 +530,8 @@ virtualenv==20.25.1 # tox zipp==3.17.0 # via + # -r requirements/test.txt # importlib-metadata - # importlib-resources # The following packages are considered to be unsafe in a requirements file: setuptools==69.1.1 diff --git a/requirements/test.txt b/requirements/test.txt index 72ff6d2..6c37b48 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # -anki==2.1.25 +anki==23.12.1 # via -r requirements/base.txt annotated-types==0.6.0 # via @@ -24,10 +24,6 @@ astroid==3.1.0 # via # pylint # pylint-celery -backports-zoneinfo==0.2.1 - # via - # -r requirements/base.txt - # django beautifulsoup4==4.12.3 # via # -r requirements/base.txt @@ -201,6 +197,10 @@ idna==3.6 # anyio # httpx # requests +importlib-metadata==7.0.1 + # via + # -r requirements/base.txt + # markdown iniconfig==2.0.0 # via pytest isort==5.13.2 @@ -214,6 +214,10 @@ jinja2==3.1.3 # -r requirements/base.txt # code-annotations # coreschema +markdown==3.5.2 + # via + # -r requirements/base.txt + # anki markupsafe==2.1.5 # via # -r requirements/base.txt @@ -237,6 +241,10 @@ openapi-codec==1.3.2 # via # -r requirements/base.txt # django-rest-swagger +orjson==3.9.15 + # via + # -r requirements/base.txt + # anki packaging==23.2 # via # pyproject-api @@ -308,7 +316,9 @@ pynacl==1.5.0 pyproject-api==1.6.1 # via tox pysocks==1.7.1 - # via requests + # via + # -r requirements/base.txt + # requests pytest==8.0.2 # via # pytest-cov @@ -414,7 +424,6 @@ tqdm==4.66.2 typing-extensions==4.10.0 # via # -r requirements/base.txt - # annotated-types # anyio # asgiref # astroid @@ -433,6 +442,10 @@ urllib3==2.2.1 # requests virtualenv==20.25.1 # via tox +zipp==3.17.0 + # via + # -r requirements/base.txt + # importlib-metadata # The following packages are considered to be unsafe in a requirements file: setuptools==69.1.1 diff --git a/requirements/validation.txt b/requirements/validation.txt index 5f00afe..b39e157 100644 --- a/requirements/validation.txt +++ b/requirements/validation.txt @@ -1,10 +1,10 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # make upgrade # -anki==2.1.25 +anki==23.12.1 # via # -r requirements/quality.txt # -r requirements/test.txt @@ -31,11 +31,6 @@ astroid==3.1.0 # -r requirements/test.txt # pylint # pylint-celery -backports-zoneinfo==0.2.1 - # via - # -r requirements/quality.txt - # -r requirements/test.txt - # django beautifulsoup4==4.12.3 # via # -r requirements/quality.txt @@ -285,12 +280,10 @@ idna==3.6 importlib-metadata==7.0.1 # via # -r requirements/quality.txt + # -r requirements/test.txt # keyring + # markdown # twine -importlib-resources==6.1.2 - # via - # -r requirements/quality.txt - # keyring iniconfig==2.0.0 # via # -r requirements/quality.txt @@ -320,6 +313,11 @@ keyring==24.3.0 # via # -r requirements/quality.txt # twine +markdown==3.5.2 + # via + # -r requirements/quality.txt + # -r requirements/test.txt + # anki markdown-it-py==3.0.0 # via # -r requirements/quality.txt @@ -370,6 +368,11 @@ openapi-codec==1.3.2 # -r requirements/quality.txt # -r requirements/test.txt # django-rest-swagger +orjson==3.9.15 + # via + # -r requirements/quality.txt + # -r requirements/test.txt + # anki packaging==23.2 # via # -r requirements/quality.txt @@ -651,7 +654,6 @@ typing-extensions==4.10.0 # via # -r requirements/quality.txt # -r requirements/test.txt - # annotated-types # anyio # asgiref # astroid @@ -660,7 +662,6 @@ typing-extensions==4.10.0 # pydantic # pydantic-core # pylint - # rich uritemplate==4.1.1 # via # -r requirements/quality.txt @@ -680,8 +681,8 @@ virtualenv==20.25.1 zipp==3.17.0 # via # -r requirements/quality.txt + # -r requirements/test.txt # importlib-metadata - # importlib-resources # The following packages are considered to be unsafe in a requirements file: setuptools==69.1.1 From 3e983d88a1547482f5c96bc744ac5d86d20ad568 Mon Sep 17 00:00:00 2001 From: Usama Sadiq Date: Mon, 26 Feb 2024 17:57:53 +0500 Subject: [PATCH 4/4] build: bump package version --- flashcards/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flashcards/__init__.py b/flashcards/__init__.py index 72a28ba..d671df9 100644 --- a/flashcards/__init__.py +++ b/flashcards/__init__.py @@ -1,4 +1,4 @@ """ flashcards module. """ -__version__ = '0.1.0' +__version__ = '0.1.1'