From 437656a56fd245720cf774e0e7af1a10f5154e27 Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Fri, 23 Feb 2024 07:37:34 -0500 Subject: [PATCH 1/6] feat: add python 3.12 support --- .github/workflows/ci.yml | 6 ++++-- tox.ini | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9eff94..99946fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,10 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [testenv] + python-version: + - '3.8' + - '3.12' + toxenv: [testenv, django42] steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index 845d172..3d8ddfd 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = testenv [testenv] deps = - -rrequirements/test.txt + -rrequirements/test.txt commands = - pytest + pytest From deb95c60d03ad5b1a0b43184bda8a7c5da42a2c8 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Sat, 6 Apr 2024 17:00:38 +0500 Subject: [PATCH 2/6] feat: Adding python 3.11 support. --- .github/workflows/ci.yml | 1 + Makefile | 8 +++++- requirements/base.txt | 10 ++++--- requirements/ci.txt | 42 +++++++++++++++------------ requirements/common_constraints.txt | 1 + requirements/constraints.txt | 4 +++ requirements/pip.txt | 10 +++---- requirements/pip_tools.txt | 29 ++++++++++++++----- requirements/test.txt | 26 ++++++++--------- requirements/tox.txt | 44 ++++++++++++++++------------- 10 files changed, 108 insertions(+), 67 deletions(-) create mode 100644 requirements/common_constraints.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99946fc..2068cc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: os: [ubuntu-20.04] python-version: - '3.8' + - '3.11' - '3.12' toxenv: [testenv, django42] diff --git a/Makefile b/Makefile index 1bfccc5..a004df5 100755 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ -upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade +COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt +.PHONY: $(COMMON_CONSTRAINTS_TXT) +$(COMMON_CONSTRAINTS_TXT): + wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)" + echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@) + +upgrade: $(COMMON_CONSTRAINTS_TXT) upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in pip install -q -r requirements/pip_tools.txt pip-compile --upgrade --allow-unsafe -o requirements/pip.txt requirements/pip.in diff --git a/requirements/base.txt b/requirements/base.txt index aef9e43..5d625b3 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,8 +1,10 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # -# make upgrade +# pip-compile --output-file=requirements/base.txt requirements/base.in # -pymongo==4.1.1 +dnspython==2.6.1 + # via pymongo +pymongo==4.6.3 # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index 803aaa9..4c0405e 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -1,50 +1,56 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # -# make upgrade +# pip-compile --output-file=requirements/ci.txt requirements/ci.in # -distlib==0.3.4 +cachetools==5.3.3 # via # -r requirements/tox.txt - # virtualenv -filelock==3.7.1 + # tox +chardet==5.2.0 # via # -r requirements/tox.txt # tox - # virtualenv -packaging==21.3 +colorama==0.4.6 # via # -r requirements/tox.txt # tox -platformdirs==2.5.2 +distlib==0.3.8 + # via + # -r requirements/tox.txt + # virtualenv +filelock==3.13.3 # via # -r requirements/tox.txt + # tox # virtualenv -pluggy==1.0.0 +packaging==24.0 # via # -r requirements/tox.txt + # pyproject-api # tox -py==1.11.0 +platformdirs==4.2.0 # via # -r requirements/tox.txt # tox -pyparsing==3.0.9 + # virtualenv +pluggy==1.4.0 # via # -r requirements/tox.txt - # packaging -six==1.16.0 + # tox +pyproject-api==1.6.1 # via # -r requirements/tox.txt # tox - # virtualenv -toml==0.10.2 +tomli==2.0.1 # via # -r requirements/tox.txt + # pyproject-api # tox -tox==3.25.0 +tox==4.14.2 # via -r requirements/tox.txt -virtualenv==20.14.1 +virtualenv==20.25.1 # via # -r requirements/tox.txt # tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/requirements/common_constraints.txt @@ -0,0 +1 @@ + diff --git a/requirements/constraints.txt b/requirements/constraints.txt index d91704b..af300b8 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -10,3 +10,7 @@ # Common constraints for edx repos -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + + +# Temporary to Support the python 3.11 Upgrade +backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library diff --git a/requirements/pip.txt b/requirements/pip.txt index d13a939..c236e01 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,14 +1,14 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # -# make upgrade +# pip-compile --allow-unsafe --output-file=requirements/pip.txt requirements/pip.in # -wheel==0.37.1 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==22.1.2 +pip==24.0 # via -r requirements/pip.in -setuptools==62.3.2 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index f97219b..aa5f5e3 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -1,19 +1,34 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.8 # To update, run: # -# make upgrade +# pip-compile --output-file=requirements/pip_tools.txt requirements/pip_tools.in # -click==8.1.3 +build==1.2.1 # via pip-tools -pep517==0.12.0 +click==8.1.7 # via pip-tools -pip-tools==6.6.2 +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # build +packaging==24.0 + # via build +pip-tools==7.4.1 # via -r requirements/pip_tools.in +pyproject-hooks==1.0.0 + # via + # build + # pip-tools tomli==2.0.1 - # via pep517 -wheel==0.37.1 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.43.0 # via pip-tools +zipp==3.18.1 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/test.txt b/requirements/test.txt index d91db5f..70892ef 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,24 +1,24 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # -# make upgrade +# pip-compile --output-file=requirements/test.txt requirements/test.in # -attrs==21.4.0 +dnspython==2.6.1 + # via + # -r requirements/base.txt + # pymongo +exceptiongroup==1.2.0 # via pytest -iniconfig==1.1.1 +iniconfig==2.0.0 # via pytest -packaging==21.3 +packaging==24.0 # via pytest -pluggy==1.0.0 +pluggy==1.4.0 # via pytest -py==1.11.0 - # via pytest -pymongo==4.1.1 +pymongo==4.6.3 # via -r requirements/base.txt -pyparsing==3.0.9 - # via packaging -pytest==7.1.2 +pytest==8.1.1 # via -r requirements/test.in tomli==2.0.1 # via pytest diff --git a/requirements/tox.txt b/requirements/tox.txt index b0e7f0a..e614685 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -1,32 +1,38 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # -# make upgrade +# pip-compile --output-file=requirements/tox.txt requirements/tox.in # -distlib==0.3.4 +cachetools==5.3.3 + # via tox +chardet==5.2.0 + # via tox +colorama==0.4.6 + # via tox +distlib==0.3.8 # via virtualenv -filelock==3.7.1 +filelock==3.13.3 # via # tox # virtualenv -packaging==21.3 - # via tox -platformdirs==2.5.2 - # via virtualenv -pluggy==1.0.0 - # via tox -py==1.11.0 - # via tox -pyparsing==3.0.9 - # via packaging -six==1.16.0 +packaging==24.0 + # via + # pyproject-api + # tox +platformdirs==4.2.0 # via # tox # virtualenv -toml==0.10.2 +pluggy==1.4.0 # via tox -tox==3.25.0 +pyproject-api==1.6.1 + # via tox +tomli==2.0.1 + # via + # pyproject-api + # tox +tox==4.14.2 # via -r requirements/tox.in -virtualenv==20.14.1 +virtualenv==20.25.1 # via tox From af947b44c66f34d38326ed496744914278bfb97f Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Sat, 6 Apr 2024 17:03:04 +0500 Subject: [PATCH 3/6] feat: Adding python 3.11 support. --- .github/workflows/ci.yml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2068cc9..4ec697a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - '3.8' - '3.11' - '3.12' - toxenv: [testenv, django42] + toxenv: [testenv] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 7af566a..281262e 100644 --- a/setup.py +++ b/setup.py @@ -68,8 +68,8 @@ def is_requirement(line): 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', ], setup_requires=['pyandoc'], install_requires=load_requirements('requirements/base.in'), From 4a233ee306b6fe12c5e12c0fc41fa447bee9a9e4 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Sat, 6 Apr 2024 17:06:47 +0500 Subject: [PATCH 4/6] feat: Adding python 3.11 support. --- .github/workflows/ci.yml | 1 - requirements/constraints.txt | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ec697a..35bd071 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,6 @@ jobs: python-version: - '3.8' - '3.11' - - '3.12' toxenv: [testenv] steps: diff --git a/requirements/constraints.txt b/requirements/constraints.txt index af300b8..c56a8ee 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -9,8 +9,7 @@ # linking to it here is good. # Common constraints for edx repos --c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - +-c constraints.txt # Temporary to Support the python 3.11 Upgrade backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library From 3f4507f7a94ab3309531ddbc982d8fe716f5e1b1 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Sat, 6 Apr 2024 17:10:14 +0500 Subject: [PATCH 5/6] feat: Adding python 3.11 support. --- requirements/common_constraints.txt | 37 +++++++++++++++++++++++++++++ requirements/constraints.txt | 2 +- requirements/pip.txt | 4 ++-- requirements/pip_tools.txt | 6 ++--- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 8b13789..6847225 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -1 +1,38 @@ + +# This is a temporary solution to override the real common_constraints.txt +# In edx-lint, until the pyjwt constraint in edx-lint has been removed. +# See BOM-2721 for more details. +# Below is the copied and edited version of common_constraints + +# A central location for most common version constraints +# (across edx repos) for pip-installation. +# +# Similar to other constraint files this file doesn't install any packages. +# It specifies version constraints that will be applied if a package is needed. +# When pinning something here, please provide an explanation of why it is a good +# idea to pin this package across all edx repos, Ideally, link to other information +# that will help people in the future to remove the pin when possible. +# Writing an issue against the offending project and linking to it here is good. +# +# Note: Changes to this file will automatically be used by other repos, referencing +# this file from Github directly. It does not require packaging in edx-lint. + + +# using LTS django version +Django<5.0 + +# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process. +# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html +elasticsearch<7.14.0 + +# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected + +# 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 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index c56a8ee..0d5f5a4 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -9,7 +9,7 @@ # linking to it here is good. # Common constraints for edx repos --c constraints.txt +-c common_constraints.txt # Temporary to Support the python 3.11 Upgrade backports.zoneinfo;python_version<"3.9" # Newer versions have zoneinfo available in the standard library diff --git a/requirements/pip.txt b/requirements/pip.txt index c236e01..8e263be 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # pip-compile --allow-unsafe --output-file=requirements/pip.txt requirements/pip.in # diff --git a/requirements/pip_tools.txt b/requirements/pip_tools.txt index aa5f5e3..f230577 100644 --- a/requirements/pip_tools.txt +++ b/requirements/pip_tools.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.8 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # pip-compile --output-file=requirements/pip_tools.txt requirements/pip_tools.in # @@ -10,7 +10,7 @@ click==8.1.7 # via pip-tools importlib-metadata==6.11.0 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -c requirements/common_constraints.txt # build packaging==24.0 # via build From afa0e6e28b86d98304c76434d8a3937d9ac3c441 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 8 Apr 2024 16:08:35 +0500 Subject: [PATCH 6/6] feat: Adding python 3.11 support. --- .github/workflows/ci.yml | 1 - requirements/common_constraints.txt | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35bd071..acc8921 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ jobs: os: [ubuntu-20.04] python-version: - '3.8' - - '3.11' toxenv: [testenv] steps: diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 6847225..e0a5672 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -1,5 +1,6 @@ + # This is a temporary solution to override the real common_constraints.txt # In edx-lint, until the pyjwt constraint in edx-lint has been removed. # See BOM-2721 for more details.