From d1bbf8448a2a84453f5189b67402061d6f93f562 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 26 Feb 2024 13:57:04 +0500 Subject: [PATCH 1/5] feat: adding python3.11 support. --- .github/workflows/ci.yml | 7 ++--- Makefile | 34 +++++++++++++++------ pylintrc | 17 +++-------- requirements/base.in | 8 ++--- requirements/base.txt | 8 +++-- requirements/ci.txt | 2 +- requirements/common_constraints.txt | 47 +++++++++++++++++++++++++++++ requirements/constraints.txt | 5 ++- requirements/dev.txt | 13 +++++--- requirements/docs.txt | 9 ++++-- requirements/pip-tools.txt | 6 ++-- requirements/test.txt | 10 ++++-- requirements/tox.txt | 2 +- setup.py | 4 +-- submissions/__init__.py | 2 +- submissions/errors.py | 4 +-- tox.ini | 6 ++-- 17 files changed, 125 insertions(+), 59 deletions(-) create mode 100644 requirements/common_constraints.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3007fb4..d48edc9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,9 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [ - quality, docs, django32-drf314, django42-drf314 - ] + python-version: ['3.8', '3.11'] + toxenv: [quality, docs, django42-drf314] + steps: - uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index 3cce448..fb60659 100644 --- a/Makefile +++ b/Makefile @@ -37,20 +37,34 @@ dev_requirements: ## Install Dev Requirements test_requirements: ## Install Test Requirements pip install -r requirements/test.txt -upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade -upgrade: ## Update the requirements/*.txt files with the latest packages satisfying requirements/*.in - pip install -qr requirements/pip-tools.txt +piptools: + pip install -q -r requirements/pip-tools.txt + +define COMMON_CONSTRAINTS_TEMP_COMMENT +# This is a temporary solution to override the real common_constraints.txt\n# In edx-lint, until the pyjwt constraint in edx-lint has been removed.\n# See BOM-2721 for more details.\n# Below is the copied and edited version of common_constraints\n +endef + +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 $(@) + +export CUSTOM_COMPILE_COMMAND = make upgrade +upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in # Make sure to compile files after any other files they include! pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in - pip-compile --upgrade --verbose --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in + pip-compile --upgrade --allow-unsafe --verbose --rebuild -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 --verbose --rebuild -o requirements/base.txt requirements/base.in - pip-compile --upgrade --verbose --rebuild -o requirements/docs.txt requirements/docs.in - pip-compile --upgrade --verbose --rebuild -o requirements/test.txt requirements/test.in - pip-compile --upgrade --verbose --rebuild -o requirements/dev.txt requirements/dev.in - pip-compile --upgrade --verbose --rebuild -o requirements/tox.txt requirements/tox.in - pip-compile --upgrade --verbose --rebuild -o requirements/ci.txt requirements/ci.in + sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp + mv requirements/common_constraints.tmp requirements/common_constraints.txt + pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/base.txt requirements/base.in + pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/docs.txt requirements/docs.in + pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/test.txt requirements/test.in + pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/dev.txt requirements/dev.in + pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/tox.txt requirements/tox.in + pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/ci.txt requirements/ci.in # Let tox control the Django and DRF versions for tests sed -i.tmp '/^django==/d' requirements/test.txt sed -i.tmp '/^djangorestframework==/d' requirements/test.txt diff --git a/pylintrc b/pylintrc index cadb490..2853a4d 100644 --- a/pylintrc +++ b/pylintrc @@ -64,7 +64,7 @@ # SERIOUSLY. # # ------------------------------ -# Generated by edx-lint version: 5.2.5 +# Generated by edx-lint version: 5.3.6 # ------------------------------ [MASTER] ignore = @@ -141,7 +141,6 @@ enable = no-self-argument, no-value-for-parameter, non-iterator-returned, - non-parent-method-called, nonexistent-operator, not-a-mapping, not-an-iterable, @@ -161,13 +160,10 @@ enable = return-outside-function, signature-differs, super-init-not-called, - super-method-not-called, syntax-error, - test-inherits-tests, too-few-format-args, too-many-format-args, too-many-function-args, - translation-of-non-string, truncated-format-string, undefined-all-variable, undefined-loop-variable, @@ -213,7 +209,6 @@ enable = consider-using-enumerate, global-at-module-level, global-variable-not-assigned, - literal-used-as-attribute, logging-format-interpolation, logging-not-lazy, multiple-imports, @@ -224,7 +219,6 @@ enable = redundant-unittest-assert, reimported, simplifiable-if-statement, - simplifiable-range, singleton-comparison, superfluous-parens, unidiomatic-typecheck, @@ -233,7 +227,6 @@ enable = unnecessary-semicolon, unneeded-not, useless-else-on-loop, - wrong-assert-type, deprecated-method, deprecated-module, @@ -259,6 +252,7 @@ enable = useless-suppression, disable = bad-indentation, + broad-exception-raised, consider-using-f-string, duplicate-code, file-ignored, @@ -282,9 +276,6 @@ disable = unused-wildcard-import, use-maxsplit-arg, - feature-toggle-needs-doc, - illegal-waffle-usage, - logging-fstring-interpolation, [REPORTS] @@ -380,6 +371,6 @@ ext-import-graph = int-import-graph = [EXCEPTIONS] -overgeneral-exceptions = Exception +overgeneral-exceptions = builtins.Exception -# 54daa2b24c4b5341a45cdb4727fe15d05ef04c5f +# 5f343c05ade94b1f05eeb1763ca543bf867246f6 diff --git a/requirements/base.in b/requirements/base.in index 2da04d9..21b7bc0 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -3,12 +3,8 @@ -c constraints.txt Django -django-model-utils>=2.3.1 - +django-model-utils jsonfield pytz - - -# Don't let edx-platform upgrade DRF past versions that have already been tested here -djangorestframework<3.15.0 +djangorestframework diff --git a/requirements/base.txt b/requirements/base.txt index c206548..20ac1ed 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -6,9 +6,12 @@ # asgiref==3.7.2 # via django -django==3.2.24 +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # django +django==4.2.10 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # django-model-utils # djangorestframework @@ -22,7 +25,6 @@ jsonfield==3.1.0 pytz==2024.1 # via # -r requirements/base.in - # django # djangorestframework sqlparse==0.4.4 # via django diff --git a/requirements/ci.txt b/requirements/ci.txt index 4987c48..ddd9c1e 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via # -r requirements/tox.txt # tox diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt new file mode 100644 index 0000000..3c9a5b8 --- /dev/null +++ b/requirements/common_constraints.txt @@ -0,0 +1,47 @@ +# 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 + +# 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 + +# 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 + +# 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 + +# 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 + + +# 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 \ No newline at end of file diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 9972418..e824313 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -9,4 +9,7 @@ # linking to it here is good. # This file contains all common constraints for edx-repos --c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt +# Common constraints for edx repos +-c common_constraints.txt + +backports.zoneinfo;python_version<"3.9" \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt index 4e3d7a3..c656ee1 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -31,6 +31,13 @@ babel==2.14.0 # -r requirements/test.txt # pydata-sphinx-theme # sphinx +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # -r requirements/docs.txt + # -r requirements/test.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/docs.txt @@ -70,9 +77,8 @@ dill==0.3.8 # via # -r requirements/test.txt # pylint -django==3.2.24 +django==4.2.10 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # -r requirements/docs.txt # -r requirements/test.txt @@ -236,7 +242,6 @@ pytz==2024.1 # -r requirements/docs.txt # -r requirements/test.txt # babel - # django # djangorestframework pyyaml==6.0.1 # via @@ -329,7 +334,7 @@ tomli==2.0.1 # coverage # pylint # pytest -tomlkit==0.12.3 +tomlkit==0.12.4 # via # -r requirements/test.txt # pylint diff --git a/requirements/docs.txt b/requirements/docs.txt index 3ea9fad..fb72d70 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -16,15 +16,19 @@ babel==2.14.0 # via # pydata-sphinx-theme # sphinx +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # django beautifulsoup4==4.12.3 # via pydata-sphinx-theme certifi==2024.2.2 # via requests charset-normalizer==3.3.2 # via requests -django==3.2.24 +django==4.2.10 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # django-model-utils # djangorestframework @@ -66,7 +70,6 @@ pytz==2024.1 # via # -r requirements/base.txt # babel - # django # djangorestframework requests==2.31.0 # via sphinx diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 44c48d9..ab115fa 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -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/test.txt b/requirements/test.txt index 8a8e286..63147fc 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -26,6 +26,12 @@ babel==2.14.0 # -r requirements/docs.txt # pydata-sphinx-theme # sphinx +backports-zoneinfo==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt + # -r requirements/docs.txt + # django beautifulsoup4==4.12.3 # via # -r requirements/docs.txt @@ -54,7 +60,6 @@ ddt==1.7.2 dill==0.3.8 # via pylint # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # -r requirements/docs.txt # django-model-utils @@ -179,7 +184,6 @@ pytz==2024.1 # -r requirements/base.txt # -r requirements/docs.txt # babel - # django # djangorestframework pyyaml==6.0.1 # via code-annotations @@ -249,7 +253,7 @@ tomli==2.0.1 # coverage # pylint # pytest -tomlkit==0.12.3 +tomlkit==0.12.4 # via pylint typing-extensions==4.10.0 # via diff --git a/requirements/tox.txt b/requirements/tox.txt index 9a12d68..e9a6490 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.3.2 +cachetools==5.3.3 # via tox chardet==5.2.0 # via tox diff --git a/setup.py b/setup.py index 7c81bf5..aa58b88 100644 --- a/setup.py +++ b/setup.py @@ -74,14 +74,14 @@ def get_version(*file_paths): classifiers=[ 'Development Status :: 3 - Alpha', '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', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.11', ], packages=find_packages(include=['submissions*'], exclude=['*.test', '*.tests']), install_requires=load_requirements('requirements/base.in'), diff --git a/submissions/__init__.py b/submissions/__init__.py index 75d3609..60e7110 100644 --- a/submissions/__init__.py +++ b/submissions/__init__.py @@ -1,2 +1,2 @@ """ API for creating submissions and scores. """ -__version__ = '3.6.1' +__version__ = '3.7.0' diff --git a/submissions/errors.py b/submissions/errors.py index 25d0f3d..12d812b 100644 --- a/submissions/errors.py +++ b/submissions/errors.py @@ -67,8 +67,8 @@ def __repr__(self): Show the field errors upon output. """ return ( - f'{self.__class__.__name__}' # pylint: disable=no-member - f'(msg="{self.message}", field_errors={self.field_errors})' + # pylint: disable=no-member + f'{self.__class__.__name__}(msg="{self.message}", field_errors={self.field_errors})' ) diff --git a/tox.ini b/tox.ini index cde9012..efe154a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,11 @@ [tox] -envlist = py38-django{32,42}-drf{312, drf314}, quality, docs +envlist = py{38,311}-django{42}-drf{drf314}, quality, docs [testenv] setenv = DJANGO_SETTINGS_MODULE = settings deps = -r{toxinidir}/requirements/test.txt - django32: Django>=3.2,<4.0 django42: Django>=4.2,<4.3 drf314: djangorestframework<3.15.0 commands = @@ -23,7 +22,8 @@ commands = make test_quality [testenv:docs] -deps = +deps = + setuptools -r{toxinidir}/requirements/dev.txt commands = python setup.py build_sphinx From 7cec6f7d3702c1aedfb72f0f0bae1bb6725a4437 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 1 Apr 2024 14:39:40 +0500 Subject: [PATCH 2/5] build: adding python3.12 support. --- .github/workflows/ci.yml | 2 +- setup.py | 1 + tox.ini | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d48edc9..e06ddf3 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.11'] + python-version: ['3.8', '3.11', '3.12'] toxenv: [quality, docs, django42-drf314] diff --git a/setup.py b/setup.py index aa58b88..fdf3bff 100644 --- a/setup.py +++ b/setup.py @@ -82,6 +82,7 @@ def get_version(*file_paths): 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], packages=find_packages(include=['submissions*'], exclude=['*.test', '*.tests']), install_requires=load_requirements('requirements/base.in'), diff --git a/tox.ini b/tox.ini index efe154a..b527956 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{38,311}-django{42}-drf{drf314}, quality, docs +envlist = py{38,311,312}-django{42}-drf{drf314}, quality, docs [testenv] setenv = @@ -23,7 +23,6 @@ commands = [testenv:docs] deps = - setuptools -r{toxinidir}/requirements/dev.txt commands = python setup.py build_sphinx From ccecc62902f18489fba102f7c7aed9603b749aa6 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 1 Apr 2024 14:41:17 +0500 Subject: [PATCH 3/5] build: adding python3.12 support. --- requirements/base.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/base.in b/requirements/base.in index 21b7bc0..5a980ce 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,4 +7,4 @@ django-model-utils jsonfield pytz djangorestframework - +setuptools \ No newline at end of file From f311ad29f9843aeb3ef5e704b626ed95eeb457d0 Mon Sep 17 00:00:00 2001 From: edX requirements bot <49161187+edx-requirements-bot@users.noreply.github.com> Date: Mon, 1 Apr 2024 05:43:38 -0400 Subject: [PATCH 4/5] chore: Updating Python Requirements (#235) --- requirements/base.txt | 16 ++++++++----- requirements/ci.txt | 6 ++--- requirements/common_constraints.txt | 34 ++++++++++------------------ requirements/dev.txt | 35 ++++++++++++++++++----------- requirements/docs.txt | 23 ++++++++++++------- requirements/pip-tools.txt | 18 ++++++++------- requirements/pip.txt | 4 ++-- requirements/test.txt | 30 ++++++++++++++++--------- requirements/tox.txt | 6 ++--- 9 files changed, 96 insertions(+), 76 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 20ac1ed..97262be 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,29 +4,33 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt # django -django==4.2.10 + # djangorestframework +django==4.2.11 # via + # -c requirements/common_constraints.txt # -r requirements/base.in # django-model-utils # djangorestframework # jsonfield django-model-utils==4.4.0 # via -r requirements/base.in -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via -r requirements/base.in jsonfield==3.1.0 # via -r requirements/base.in pytz==2024.1 - # via - # -r requirements/base.in - # djangorestframework + # via -r requirements/base.in sqlparse==0.4.4 # via django typing-extensions==4.10.0 # via asgiref + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index ddd9c1e..53fbcda 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -30,14 +30,14 @@ distlib==0.3.8 # virtualenv docopt==0.6.2 # via coveralls -filelock==3.13.1 +filelock==3.13.3 # via # -r requirements/tox.txt # tox # virtualenv idna==3.6 # via requests -packaging==23.2 +packaging==24.0 # via # -r requirements/tox.txt # pyproject-api @@ -62,7 +62,7 @@ tomli==2.0.1 # -r requirements/tox.txt # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/tox.txt urllib3==2.2.1 # via requests diff --git a/requirements/common_constraints.txt b/requirements/common_constraints.txt index 3c9a5b8..c9d8d9c 100644 --- a/requirements/common_constraints.txt +++ b/requirements/common_constraints.txt @@ -3,26 +3,6 @@ # See BOM-2721 for more details. # Below is the copied and edited version of common_constraints -# 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 - -# 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 - -# 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 - -# 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. # @@ -38,10 +18,20 @@ # 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 \ No newline at end of file +# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected +django-simple-history==3.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/dev.txt b/requirements/dev.txt index c656ee1..0dffed8 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -14,7 +14,7 @@ alabaster==0.7.13 # -r requirements/docs.txt # -r requirements/test.txt # sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # -r requirements/docs.txt @@ -38,6 +38,7 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # -r requirements/docs.txt # -r requirements/test.txt # django + # djangorestframework beautifulsoup4==4.12.3 # via # -r requirements/docs.txt @@ -63,11 +64,11 @@ click-log==0.4.0 # via # -r requirements/test.txt # edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via # -r requirements/test.txt # edx-lint -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via # -r requirements/test.txt # pytest-cov @@ -77,8 +78,9 @@ dill==0.3.8 # via # -r requirements/test.txt # pylint -django==4.2.10 +django==4.2.11 # via + # -c requirements/common_constraints.txt # -r requirements/base.txt # -r requirements/docs.txt # -r requirements/test.txt @@ -90,7 +92,7 @@ django-model-utils==4.4.0 # -r requirements/base.txt # -r requirements/docs.txt # -r requirements/test.txt -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via # -r requirements/base.txt # -r requirements/docs.txt @@ -109,7 +111,7 @@ exceptiongroup==1.2.0 # pytest factory-boy==3.3.0 # via -r requirements/test.txt -faker==23.2.1 +faker==24.4.0 # via # -r requirements/test.txt # factory-boy @@ -125,8 +127,9 @@ imagesize==1.4.1 # -r requirements/docs.txt # -r requirements/test.txt # sphinx -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c requirements/common_constraints.txt # -r requirements/docs.txt # -r requirements/test.txt # sphinx @@ -160,7 +163,7 @@ mccabe==0.7.0 # pylint mock==5.1.0 # via -r requirements/test.txt -packaging==23.2 +packaging==24.0 # via # -r requirements/docs.txt # -r requirements/test.txt @@ -218,16 +221,16 @@ pylint-plugin-utils==0.8.2 # -r requirements/test.txt # pylint-celery # pylint-django -pytest==8.0.2 +pytest==8.1.1 # via # -r requirements/test.txt # pytest-cov # pytest-django -pytest-cov==4.1.0 +pytest-cov==5.0.0 # via -r requirements/test.txt pytest-django==4.8.0 # via -r requirements/test.txt -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/test.txt # faker @@ -242,7 +245,6 @@ pytz==2024.1 # -r requirements/docs.txt # -r requirements/test.txt # babel - # djangorestframework pyyaml==6.0.1 # via # -r requirements/test.txt @@ -353,8 +355,15 @@ urllib3==2.2.1 # -r requirements/docs.txt # -r requirements/test.txt # requests -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/docs.txt # -r requirements/test.txt # importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via + # -r requirements/base.txt + # -r requirements/docs.txt + # -r requirements/test.txt diff --git a/requirements/docs.txt b/requirements/docs.txt index fb72d70..79cb8a0 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -8,7 +8,7 @@ accessible-pygments==0.0.4 # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # django @@ -21,21 +21,23 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # -c requirements/constraints.txt # -r requirements/base.txt # django + # djangorestframework beautifulsoup4==4.12.3 # via pydata-sphinx-theme certifi==2024.2.2 # via requests charset-normalizer==3.3.2 # via requests -django==4.2.10 +django==4.2.11 # via + # -c requirements/common_constraints.txt # -r requirements/base.txt # django-model-utils # djangorestframework # jsonfield django-model-utils==4.4.0 # via -r requirements/base.txt -djangorestframework==3.14.0 +djangorestframework==3.15.1 # via -r requirements/base.txt docutils==0.19 # via @@ -45,15 +47,17 @@ idna==3.6 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.1 - # via sphinx +importlib-metadata==6.11.0 + # via + # -c requirements/common_constraints.txt + # sphinx jinja2==3.1.3 # via sphinx jsonfield==3.1.0 # via -r requirements/base.txt markupsafe==2.1.5 # via jinja2 -packaging==23.2 +packaging==24.0 # via # pydata-sphinx-theme # sphinx @@ -70,7 +74,6 @@ pytz==2024.1 # via # -r requirements/base.txt # babel - # djangorestframework requests==2.31.0 # via sphinx six==1.16.0 @@ -113,5 +116,9 @@ typing-extensions==4.10.0 # pydata-sphinx-theme urllib3==2.2.1 # via requests -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via -r requirements/base.txt diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index ab115fa..53b0fb2 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,15 +4,17 @@ # # make upgrade # -build==1.0.3 +build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -importlib-metadata==7.0.1 - # via build -packaging==23.2 +importlib-metadata==6.11.0 + # via + # -c requirements/common_constraints.txt + # build +packaging==24.0 # via build -pip-tools==7.4.0 +pip-tools==7.4.1 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 # via @@ -23,13 +25,13 @@ tomli==2.0.1 # build # pip-tools # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.18.1 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via pip-tools -setuptools==69.1.1 +setuptools==69.2.0 # via pip-tools diff --git a/requirements/pip.txt b/requirements/pip.txt index 6665603..cf44902 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.42.0 +wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: pip==24.0 # via -r requirements/pip.in -setuptools==69.1.1 +setuptools==69.2.0 # via -r requirements/pip.in diff --git a/requirements/test.txt b/requirements/test.txt index 63147fc..4262ba1 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -12,7 +12,7 @@ alabaster==0.7.13 # via # -r requirements/docs.txt # sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via # -r requirements/base.txt # -r requirements/docs.txt @@ -32,6 +32,7 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # -r requirements/base.txt # -r requirements/docs.txt # django + # djangorestframework beautifulsoup4==4.12.3 # via # -r requirements/docs.txt @@ -51,15 +52,16 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.7.0 # via edx-lint -coverage[toml]==7.4.3 +coverage[toml]==7.4.4 # via pytest-cov ddt==1.7.2 # via -r requirements/test.in dill==0.3.8 # via pylint # via + # -c requirements/common_constraints.txt # -r requirements/base.txt # -r requirements/docs.txt # django-model-utils @@ -83,7 +85,7 @@ exceptiongroup==1.2.0 # via pytest factory-boy==3.3.0 # via -r requirements/test.in -faker==23.2.1 +faker==24.4.0 # via factory-boy freezegun==1.4.0 # via -r requirements/test.in @@ -95,8 +97,9 @@ imagesize==1.4.1 # via # -r requirements/docs.txt # sphinx -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c requirements/common_constraints.txt # -r requirements/docs.txt # sphinx iniconfig==2.0.0 @@ -122,7 +125,7 @@ mccabe==0.7.0 # via pylint mock==5.1.0 # via -r requirements/test.in -packaging==23.2 +packaging==24.0 # via # -r requirements/docs.txt # pydata-sphinx-theme @@ -164,15 +167,15 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pytest==8.0.2 +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.8.0 # via -r requirements/test.in -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -r requirements/test.in # faker @@ -184,7 +187,6 @@ pytz==2024.1 # -r requirements/base.txt # -r requirements/docs.txt # babel - # djangorestframework pyyaml==6.0.1 # via code-annotations requests==2.31.0 @@ -268,7 +270,13 @@ urllib3==2.2.1 # via # -r requirements/docs.txt # requests -zipp==3.17.0 +zipp==3.18.1 # via # -r requirements/docs.txt # importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==69.2.0 + # via + # -r requirements/base.txt + # -r requirements/docs.txt diff --git a/requirements/tox.txt b/requirements/tox.txt index e9a6490..cc5293d 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.13.3 # via # tox # virtualenv -packaging==23.2 +packaging==24.0 # via # pyproject-api # tox @@ -32,7 +32,7 @@ tomli==2.0.1 # via # pyproject-api # tox -tox==4.13.0 +tox==4.14.2 # via -r requirements/tox.in virtualenv==20.25.1 # via tox From 5a3f48f35951f93bdc536afb4963defac8d357b7 Mon Sep 17 00:00:00 2001 From: awais qureshi Date: Mon, 1 Apr 2024 14:47:31 +0500 Subject: [PATCH 5/5] build: adding python3.12 support. --- Makefile | 16 +++++++--------- requirements/base.in | 1 - tox.ini | 1 + 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index fb60659..524e0a5 100644 --- a/Makefile +++ b/Makefile @@ -54,17 +54,15 @@ export CUSTOM_COMPILE_COMMAND = make upgrade upgrade: piptools $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in # Make sure to compile files after any other files they include! pip-compile --upgrade --allow-unsafe --rebuild -o requirements/pip.txt requirements/pip.in - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in + pip-compile --upgrade --verbose --rebuild -o requirements/pip-tools.txt requirements/pip-tools.in pip install -qr requirements/pip.txt pip install -qr requirements/pip-tools.txt - sed 's/Django<4.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp - mv requirements/common_constraints.tmp requirements/common_constraints.txt - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/base.txt requirements/base.in - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/docs.txt requirements/docs.in - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/test.txt requirements/test.in - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/dev.txt requirements/dev.in - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/tox.txt requirements/tox.in - pip-compile --upgrade --allow-unsafe --verbose --rebuild -o requirements/ci.txt requirements/ci.in + pip-compile --upgrade --verbose --rebuild -o requirements/base.txt requirements/base.in + pip-compile --upgrade --verbose --rebuild -o requirements/docs.txt requirements/docs.in + pip-compile --upgrade --verbose --rebuild -o requirements/test.txt requirements/test.in + pip-compile --upgrade --verbose --rebuild -o requirements/dev.txt requirements/dev.in + pip-compile --upgrade --verbose --rebuild -o requirements/tox.txt requirements/tox.in + pip-compile --upgrade --verbose --rebuild -o requirements/ci.txt requirements/ci.in # Let tox control the Django and DRF versions for tests sed -i.tmp '/^django==/d' requirements/test.txt sed -i.tmp '/^djangorestframework==/d' requirements/test.txt diff --git a/requirements/base.in b/requirements/base.in index 5a980ce..18a523f 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,4 +7,3 @@ django-model-utils jsonfield pytz djangorestframework -setuptools \ No newline at end of file diff --git a/tox.ini b/tox.ini index b527956..d9d9027 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,7 @@ commands = [testenv:docs] deps = + setuptools -r{toxinidir}/requirements/dev.txt commands = python setup.py build_sphinx