From 2ea63266360983247a7ee13fd833b636a6448747 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 25 Mar 2024 14:07:43 +0500 Subject: [PATCH 1/6] feat: Adding python3.12 support. Removed django32 support. --- .github/workflows/ci.yml | 4 +- organizations/__init__.py | 2 +- requirements/base.in | 1 + requirements/base.txt | 64 ++++++------- requirements/common_constraints.txt | 13 ++- requirements/constraints.txt | 6 +- requirements/pip-tools.txt | 20 +++-- requirements/pip.txt | 6 +- setup.py | 3 +- test-requirements.txt | 135 ++++++++++++++-------------- tox.ini | 8 +- 11 files changed, 138 insertions(+), 124 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80202215..a43d9a85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [django32, django40, django42, quality] + python-version: ['3.8', '3.12'] + toxenv: [django42, quality] steps: - uses: actions/checkout@v2 diff --git a/organizations/__init__.py b/organizations/__init__.py index 549c79c4..7f810e13 100644 --- a/organizations/__init__.py +++ b/organizations/__init__.py @@ -1,4 +1,4 @@ """ edx-organizations app initialization module """ -__version__ = '6.12.1' # pragma: no cover +__version__ = '6.13.0' # pragma: no cover diff --git a/requirements/base.in b/requirements/base.in index 345e5414..fcf53789 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,3 +7,4 @@ djangorestframework edx-drf-extensions edx-opaque-keys>=0.1.2 Pillow +setuptools \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt index 9b419423..520acc03 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,21 +4,26 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django -certifi==2023.7.22 +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django + # djangorestframework +certifi==2024.2.2 # via requests -cffi==1.15.1 +cffi==1.16.0 # via # cryptography # pynacl -charset-normalizer==3.2.0 +charset-normalizer==3.3.2 # via requests -click==8.1.6 +click==8.1.7 # via edx-django-utils -cryptography==41.0.2 +cryptography==42.0.5 # via pyjwt -django==3.2.20 +django==4.2.11 # via # -c requirements/common_constraints.txt # -r requirements/base.in @@ -31,40 +36,40 @@ django==3.2.20 # edx-drf-extensions django-crum==0.7.9 # via edx-django-utils -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.in django-simple-history==3.1.1 # via # -c requirements/constraints.txt # -r requirements/base.in -django-waffle==4.0.0 +django-waffle==4.1.0 # via # edx-django-utils # edx-drf-extensions -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via # -r requirements/base.in # drf-jwt # edx-drf-extensions drf-jwt==1.19.2 # via edx-drf-extensions -edx-django-utils==5.6.0 +edx-django-utils==5.11.0 # via edx-drf-extensions -edx-drf-extensions==8.8.0 +edx-drf-extensions==10.2.0 # via -r requirements/base.in -edx-opaque-keys==2.3.0 +edx-opaque-keys==2.5.1 # via # -r requirements/base.in # edx-drf-extensions -idna==3.4 +idna==3.6 # via requests -newrelic==8.9.0 +newrelic==9.7.1 # via edx-django-utils -pbr==5.11.1 +pbr==6.0.0 # via stevedore -pillow==10.0.0 +pillow==10.2.0 # via -r requirements/base.in -psutil==5.9.5 +psutil==5.9.8 # via edx-django-utils pycparser==2.21 # via cffi @@ -76,27 +81,22 @@ pymongo==3.13.0 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils -python-dateutil==2.8.2 - # via edx-drf-extensions -pytz==2023.3 - # via - # django - # djangorestframework requests==2.31.0 # via edx-drf-extensions semantic-version==2.10.0 # via edx-drf-extensions -six==1.16.0 - # via - # edx-drf-extensions - # python-dateutil sqlparse==0.4.4 # via django -stevedore==5.1.0 +stevedore==5.2.0 # via # edx-django-utils # edx-opaque-keys -typing-extensions==4.7.1 - # via asgiref -urllib3==2.0.4 +typing-extensions==4.10.0 + # via + # asgiref + # edx-opaque-keys +urllib3==2.2.1 # via requests + +# The following packages are considered to be unsafe in a requirements file: +# setuptools diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 163513c3..fc5c765e 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -13,7 +13,7 @@ # using LTS django version -Django<4.0 +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 @@ -22,6 +22,11 @@ elasticsearch<7.14.0 # django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected -# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos. -# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810 -tox<4.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 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index f50ae5d4..b398986e 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -12,4 +12,8 @@ -c common_constraints.txt # incremental upgrade plan. -django-simple-history<=3.1.1 \ No newline at end of file +django-simple-history<=3.1.1 + + +# it is not availablein python3.9 +backports.zoneinfo;python_version<"3.9" diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 5748bf66..b1ac4e54 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,23 +4,31 @@ # # make upgrade # -build==0.10.0 +build==1.1.1 # via pip-tools -click==8.1.6 +click==8.1.7 # via pip-tools -packaging==23.1 +importlib-metadata==6.11.0 + # via + # -c requirements/common_constraints.txt + # build +packaging==24.0 # via build -pip-tools==7.1.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 - # via build + # via + # build + # pip-tools tomli==2.0.1 # via # build # pip-tools # pyproject-hooks -wheel==0.41.0 +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/pip.txt b/requirements/pip.txt index fb1908e6..cf449024 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.41.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==23.2.1 +pip==24.0 # via -r requirements/pip.in -setuptools==68.0.0 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/setup.py b/setup.py index 841c891e..22ab0989 100644 --- a/setup.py +++ b/setup.py @@ -57,8 +57,6 @@ def get_version(*file_paths): 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Framework :: Django', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', 'License :: OSI Approved :: GNU Affero General Public License v3', @@ -66,6 +64,7 @@ def get_version(*file_paths): 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.12', ], packages=find_packages(exclude=['tests']), install_requires=load_requirements('requirements/base.in'), diff --git a/test-requirements.txt b/test-requirements.txt index d2aa698c..35907ce0 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,28 +4,38 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django -astroid==2.15.6 +astroid==3.1.0 # via # pylint # pylint-celery -certifi==2023.7.22 +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django + # djangorestframework +cachetools==5.3.3 + # via tox +certifi==2024.2.2 # via # -r requirements/base.txt # requests -cffi==1.15.1 +cffi==1.16.0 # via # -r requirements/base.txt # cryptography # pynacl -charset-normalizer==3.2.0 +chardet==5.2.0 + # via tox +charset-normalizer==3.3.2 # via # -r requirements/base.txt # requests -click==8.1.6 +click==8.1.7 # via # -r requirements/base.txt # click-log @@ -34,21 +44,23 @@ click==8.1.6 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.5.0 +code-annotations==1.7.0 # via edx-lint -coverage[toml]==7.2.7 +colorama==0.4.6 + # via tox +coverage[toml]==7.4.4 # via # -r requirements/test.in # pytest-cov -cryptography==41.0.2 +cryptography==42.0.5 # via # -r requirements/base.txt # pyjwt -ddt==1.6.0 +ddt==1.7.2 # via -r requirements/test.in -dill==0.3.7 +dill==0.3.8 # via pylint -distlib==0.3.7 +distlib==0.3.8 # via virtualenv # via # -c requirements/common_constraints.txt @@ -64,18 +76,18 @@ django-crum==0.7.9 # via # -r requirements/base.txt # edx-django-utils -django-model-utils==4.3.1 +django-model-utils==4.4.0 # via -r requirements/base.txt django-simple-history==3.1.1 # via # -c requirements/constraints.txt # -r requirements/base.txt -django-waffle==4.0.0 +django-waffle==4.1.0 # via # -r requirements/base.txt # edx-django-utils # edx-drf-extensions -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via # -r requirements/base.txt # drf-jwt @@ -84,75 +96,73 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -edx-django-utils==5.6.0 +edx-django-utils==5.11.0 # via # -r requirements/base.txt # edx-drf-extensions -edx-drf-extensions==8.8.0 +edx-drf-extensions==10.2.0 # via -r requirements/base.txt -edx-lint==5.3.4 +edx-lint==5.3.6 # via -r requirements/test.in -edx-opaque-keys==2.3.0 +edx-opaque-keys==2.5.1 # via # -r requirements/base.txt # edx-drf-extensions -exceptiongroup==1.1.2 +exceptiongroup==1.2.0 # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==19.2.0 +faker==24.3.0 # via factory-boy -filelock==3.12.2 +filelock==3.13.1 # via # tox # virtualenv httpretty==0.9.7 # via -r requirements/test.in -idna==3.4 +idna==3.6 # via # -r requirements/base.txt # requests iniconfig==2.0.0 # via pytest -isort==5.12.0 +isort==5.13.2 # via pylint -jinja2==3.1.2 +jinja2==3.1.3 # via code-annotations -lazy-object-proxy==1.9.0 - # via astroid -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 mccabe==0.7.0 # via pylint -newrelic==8.9.0 +newrelic==9.7.1 # via # -r requirements/base.txt # edx-django-utils -packaging==23.1 +packaging==24.0 # via + # pyproject-api # pytest # tox -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/base.txt # stevedore -pillow==10.0.0 +pillow==10.2.0 # via -r requirements/base.txt -platformdirs==3.10.0 +platformdirs==4.2.0 # via # pylint + # tox # virtualenv -pluggy==1.2.0 +pluggy==1.4.0 # via # pytest # tox -psutil==5.9.5 +psutil==5.9.8 # via # -r requirements/base.txt # edx-django-utils -py==1.11.0 - # via tox -pycodestyle==2.11.0 +pycodestyle==2.11.1 # via -r requirements/test.in pycparser==2.21 # via @@ -163,7 +173,7 @@ pyjwt[crypto]==2.8.0 # -r requirements/base.txt # drf-jwt # edx-drf-extensions -pylint==2.17.5 +pylint==3.1.0 # via # edx-lint # pylint-celery @@ -171,7 +181,7 @@ pylint==2.17.5 # pylint-plugin-utils pylint-celery==0.3 # via edx-lint -pylint-django==2.5.3 +pylint-django==2.5.5 # via edx-lint pylint-plugin-utils==0.8.2 # via @@ -185,26 +195,20 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -pytest==7.4.0 +pyproject-api==1.6.1 + # via tox +pytest==8.1.1 # via # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.in -pytest-django==4.5.2 +pytest-django==4.8.0 # via -r requirements/test.in -python-dateutil==2.8.2 - # via - # -r requirements/base.txt - # edx-drf-extensions - # faker -python-slugify==8.0.1 +python-dateutil==2.9.0.post0 + # via faker +python-slugify==8.0.4 # via code-annotations -pytz==2023.3 - # via - # -r requirements/base.txt - # django - # djangorestframework pyyaml==6.0.1 # via code-annotations requests==2.31.0 @@ -217,17 +221,14 @@ semantic-version==2.10.0 # edx-drf-extensions six==1.16.0 # via - # -r requirements/base.txt - # edx-drf-extensions # edx-lint # httpretty # python-dateutil - # tox sqlparse==0.4.4 # via # -r requirements/base.txt # django -stevedore==5.1.0 +stevedore==5.2.0 # via # -r requirements/base.txt # code-annotations @@ -239,26 +240,24 @@ tomli==2.0.1 # via # coverage # pylint + # pyproject-api # pytest # tox -tomlkit==0.12.1 +tomlkit==0.12.4 # via pylint -tox==3.28.0 - # via - # -c requirements/common_constraints.txt - # -r requirements/test.in -typing-extensions==4.7.1 +tox==4.14.2 + # via -r requirements/test.in +typing-extensions==4.10.0 # via # -r requirements/base.txt # asgiref # astroid + # edx-opaque-keys # faker # pylint -urllib3==2.0.4 +urllib3==2.2.1 # via # -r requirements/base.txt # requests -virtualenv==20.24.2 +virtualenv==20.25.1 # via tox -wrapt==1.15.0 - # via astroid diff --git a/tox.ini b/tox.ini index 3992ee9c..3e82bcba 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,11 @@ [tox] -envlist = py38-django{32,40,42}, quality +envlist = py{38,312}-django{42}, quality [testenv] setenv = DJANGO_SETTINGS_MODULE = test_settings PYTHONPATH = {toxinidir} -deps = - django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 +deps = django42: Django>=4.2,<4.3 -rtest-requirements.txt commands = @@ -18,7 +16,7 @@ commands = setenv = PYTHONPATH = {toxinidir} deps = - Django>=3.2,<4.0 + Django>=4.2,<4.3 -rtest-requirements.txt commands = pycodestyle organizations From 5478381dcc840ad13b0a9c5fe8813fc2705a88e8 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 25 Mar 2024 15:26:37 +0500 Subject: [PATCH 2/6] feat: Adding python3.12 support. Removed django32 support. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 338a1219..542ace34 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ upgrade: $(COMMON_CONSTRAINTS_TXT) pip-compile --upgrade -o requirements/pip-tools.txt requirements/pip-tools.in pip install -qr requirements/pip.txt pip install -qr requirements/pip-tools.txt - pip-compile --upgrade -o requirements/base.txt requirements/base.in + pip-compile --upgrade --allow-unsafe -o requirements/base.txt requirements/base.in pip-compile --upgrade -o test-requirements.txt requirements/test.in # Let tox control the Django version for tests sed -i.tmp '/^django==/d' test-requirements.txt From 4e3a75dc4268ecf5ee852e0acba2dc38796d62d3 Mon Sep 17 00:00:00 2001 From: edX requirements bot Date: Mon, 25 Mar 2024 06:30:58 -0400 Subject: [PATCH 3/6] chore: Updating Python Requirements --- requirements/base.txt | 3 ++- test-requirements.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/requirements/base.txt b/requirements/base.txt index 520acc03..45784fcd 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -99,4 +99,5 @@ urllib3==2.2.1 # via requests # The following packages are considered to be unsafe in a requirements file: -# setuptools +setuptools==69.2.0 + # via -r requirements/base.in diff --git a/test-requirements.txt b/test-requirements.txt index 35907ce0..4a195a4e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -261,3 +261,6 @@ urllib3==2.2.1 # requests virtualenv==20.25.1 # via tox + +# The following packages are considered to be unsafe in a requirements file: +# setuptools From 39f4d1e492a76b68ef61b9ebc833ec9f60f6ad83 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Mon, 1 Apr 2024 14:33:58 +0500 Subject: [PATCH 4/6] feat: Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a43d9a85..711dfba6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8', '3.12'] + python-version: ['3.8', '3.11', '3.12'] toxenv: [django42, quality] steps: From 8efa38ac2f64cff50f457abfad38cf1f9aca89c3 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Mon, 1 Apr 2024 14:34:28 +0500 Subject: [PATCH 5/6] feat: Update setup.py --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 22ab0989..304f7ad4 100644 --- a/setup.py +++ b/setup.py @@ -64,6 +64,7 @@ def get_version(*file_paths): 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', ], packages=find_packages(exclude=['tests']), From 0a75e52aad354cc4c0127fcd23f26d0302ce644b Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 2 Apr 2024 15:48:10 -0400 Subject: [PATCH 6/6] fix: Update tox.ini Needed to run Python 3.11 tests locally via tox. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3e82bcba..da860961 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38,312}-django{42}, quality +envlist = py{38,311,312}-django{42}, quality [testenv] setenv =