diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e39fa0bb..37c133cb 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.11', '3.12'] + toxenv: [django42, quality] steps: - uses: actions/checkout@v2 @@ -31,7 +31,9 @@ jobs: run: pip install -r requirements/pip.txt - name: Install Dependencies - run: pip install -r requirements/ci.txt + run: + pip install setuptools + pip install -r requirements/ci.txt - name: Run Tests env: diff --git a/edxsearch/__init__.py b/edxsearch/__init__.py index 4807b08e..c673376f 100644 --- a/edxsearch/__init__.py +++ b/edxsearch/__init__.py @@ -1,3 +1,3 @@ """ Container module for testing / demoing search """ -__version__ = '3.8.2' +__version__ = '3.9.0' diff --git a/requirements/base.txt b/requirements/base.txt index 71cfd11e..78cb9cd8 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,23 +4,26 @@ # # make upgrade # -amqp==5.1.1 +amqp==5.2.0 # via kombu asgiref==3.7.2 # via django -backports-zoneinfo[tzdata]==0.2.1 +attrs==23.2.0 + # via openedx-events +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # celery # kombu -billiard==4.1.0 +billiard==4.2.0 # via celery -celery==5.3.1 +celery==5.3.6 # via event-tracking -certifi==2023.5.7 +certifi==2024.2.2 # via elasticsearch -cffi==1.15.1 +cffi==1.16.0 # via pynacl -click==8.1.3 +click==8.1.7 # via # celery # click-didyoumean @@ -34,65 +37,78 @@ click-plugins==1.1.1 # via celery click-repl==0.3.0 # via celery -code-annotations==1.3.0 +code-annotations==1.6.0 # via edx-toggles -django==3.2.19 +django==3.2.24 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # django-crum + # django-waffle # edx-django-utils # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-waffle==3.0.0 +django-waffle==4.1.0 # via # edx-django-utils # edx-toggles -edx-django-utils==5.5.0 +edx-django-utils==5.10.1 # via # edx-toggles # event-tracking -edx-toggles==5.0.0 - # via -r requirements/base.in + # openedx-events +edx-opaque-keys[django]==2.5.1 + # via openedx-events +edx-toggles==5.1.1 + # via + # -r requirements/base.in + # event-tracking elasticsearch==7.13.4 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -event-tracking==2.1.0 +event-tracking==2.3.0 # via -r requirements/base.in -jinja2==3.1.2 +fastavro==1.9.4 + # via openedx-events +jinja2==3.1.3 # via code-annotations -kombu==5.3.1 +kombu==5.3.5 # via celery -markupsafe==2.1.3 +markupsafe==2.1.5 # via jinja2 -newrelic==8.8.0 +newrelic==9.6.0 # via edx-django-utils -pbr==5.11.1 +openedx-events==9.5.2 + # via event-tracking +pbr==6.0.0 # via stevedore -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.43 # via click-repl -psutil==5.9.5 +psutil==5.9.8 # via edx-django-utils pycparser==2.21 # via cffi pymongo==3.13.0 - # via event-tracking + # via + # edx-opaque-keys + # event-tracking pynacl==1.5.0 # via edx-django-utils python-dateutil==2.8.2 # via celery -python-slugify==8.0.1 +python-slugify==8.0.4 # via code-annotations -pytz==2023.3 +pytz==2024.1 # via # django # event-tracking -pyyaml==6.0 +pyyaml==6.0.1 # via code-annotations six==1.16.0 # via @@ -104,22 +120,24 @@ stevedore==5.1.0 # via # code-annotations # edx-django-utils + # edx-opaque-keys text-unidecode==1.3 # via python-slugify -typing-extensions==4.6.3 +typing-extensions==4.9.0 # via # asgiref + # edx-opaque-keys # kombu -tzdata==2023.3 +tzdata==2024.1 # via # backports-zoneinfo # celery -urllib3==1.26.16 +urllib3==1.26.18 # via elasticsearch -vine==5.0.0 +vine==5.1.0 # via # amqp # celery # kombu -wcwidth==0.2.6 +wcwidth==0.2.13 # via prompt-toolkit diff --git a/requirements/ci.txt b/requirements/ci.txt index 0ed5aa69..bd57292b 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,27 +4,35 @@ # # make upgrade # -distlib==0.3.6 +cachetools==5.3.2 + # via tox +chardet==5.2.0 + # via tox +colorama==0.4.6 + # via tox +distlib==0.3.8 # via virtualenv -filelock==3.12.2 +filelock==3.13.1 # via # tox # virtualenv -packaging==23.1 - # via tox -platformdirs==3.8.0 - # via virtualenv -pluggy==1.2.0 - # via tox -py==1.11.0 +packaging==23.2 + # via + # pyproject-api + # tox +platformdirs==4.2.0 + # via + # tox + # virtualenv +pluggy==1.4.0 # via tox -six==1.16.0 +pyproject-api==1.6.1 # via tox tomli==2.0.1 - # via tox -tox==3.28.0 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/ci.in -virtualenv==20.23.1 + # pyproject-api + # tox +tox==4.13.0 + # via -r requirements/ci.in +virtualenv==20.25.0 # via tox diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 7c8a02cb..aa2ccdf1 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -15,6 +15,4 @@ # ddt >= 1.4.0 causing test failures ddt < 1.4.0 - -# greater version breaking quality build. fix in separate PR. -pylint==2.10.2 \ No newline at end of file +backports.zoneinfo;python_version<"3.9" \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt index 18a58447..4b4de066 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,7 +4,7 @@ # # make upgrade # -amqp==5.1.1 +amqp==5.2.0 # via # -r requirements/quality.txt # -r requirements/testing.txt @@ -14,42 +14,56 @@ asgiref==3.7.2 # -r requirements/quality.txt # -r requirements/testing.txt # django -astroid==2.7.3 +astroid==3.0.3 # via # -r requirements/quality.txt # pylint # pylint-celery -backports-zoneinfo[tzdata]==0.2.1 +attrs==23.2.0 # via # -r requirements/quality.txt # -r requirements/testing.txt + # openedx-events +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/quality.txt + # -r requirements/testing.txt # celery # kombu -billiard==4.1.0 +billiard==4.2.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # celery -build==0.10.0 +build==1.0.3 # via # -r requirements/pip-tools.txt # pip-tools -celery==5.3.1 +cachetools==5.3.2 + # via + # -r requirements/ci.txt + # tox +celery==5.3.6 # via # -r requirements/quality.txt # -r requirements/testing.txt # event-tracking -certifi==2023.5.7 +certifi==2024.2.2 # via # -r requirements/quality.txt # -r requirements/testing.txt # elasticsearch -cffi==1.15.1 +cffi==1.16.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # pynacl -click==8.1.3 +chardet==5.2.0 + # via + # -r requirements/ci.txt + # tox +click==8.1.7 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt @@ -82,13 +96,17 @@ click-repl==0.3.0 # -r requirements/quality.txt # -r requirements/testing.txt # celery -code-annotations==1.3.0 +code-annotations==1.6.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-lint # edx-toggles -coverage[toml]==7.2.7 +colorama==0.4.6 + # via + # -r requirements/ci.txt + # tox +coverage[toml]==7.4.2 # via # -r requirements/quality.txt # -r requirements/testing.txt @@ -98,156 +116,176 @@ ddt==1.3.1 # -c requirements/constraints.txt # -r requirements/quality.txt # -r requirements/testing.txt -distlib==0.3.6 +dill==0.3.8 + # via + # -r requirements/quality.txt + # pylint +distlib==0.3.8 # via # -r requirements/ci.txt # virtualenv -django==3.2.19 +django==3.2.24 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt # -r requirements/testing.txt # django-crum + # django-waffle # edx-django-utils # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-django-utils # edx-toggles -django-waffle==3.0.0 +django-waffle==4.1.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-django-utils # edx-toggles -edx-django-utils==5.5.0 +edx-django-utils==5.10.1 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-toggles # event-tracking -edx-lint==5.3.4 + # openedx-events +edx-lint==5.3.6 # via -r requirements/quality.txt -edx-toggles==5.0.0 +edx-opaque-keys[django]==2.5.1 + # via + # -r requirements/quality.txt + # -r requirements/testing.txt + # openedx-events +edx-toggles==5.1.1 # via # -r requirements/quality.txt # -r requirements/testing.txt + # event-tracking elasticsearch==7.13.4 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt # -r requirements/testing.txt -event-tracking==2.1.0 +event-tracking==2.3.0 # via # -r requirements/quality.txt # -r requirements/testing.txt -exceptiongroup==1.1.1 +exceptiongroup==1.2.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # pytest -filelock==3.12.2 +fastavro==1.9.4 + # via + # -r requirements/quality.txt + # -r requirements/testing.txt + # openedx-events +filelock==3.13.1 # via # -r requirements/ci.txt # tox # virtualenv +importlib-metadata==7.0.1 + # via + # -r requirements/pip-tools.txt + # build iniconfig==2.0.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # pytest -isort==5.12.0 +isort==5.13.2 # via # -r requirements/quality.txt # pylint -jinja2==3.1.2 +jinja2==3.1.3 # via # -r requirements/quality.txt # -r requirements/testing.txt # code-annotations -kombu==5.3.1 +kombu==5.3.5 # via # -r requirements/quality.txt # -r requirements/testing.txt # celery -lazy-object-proxy==1.9.0 - # via - # -r requirements/quality.txt - # astroid -markupsafe==2.1.3 +markupsafe==2.1.5 # via # -r requirements/quality.txt # -r requirements/testing.txt # jinja2 -mccabe==0.6.1 +mccabe==0.7.0 # via # -r requirements/quality.txt # pylint -mock==5.0.2 +mock==5.1.0 # via # -r requirements/quality.txt # -r requirements/testing.txt -newrelic==8.8.0 +newrelic==9.6.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-django-utils -packaging==23.1 +openedx-events==9.5.2 + # via + # -r requirements/quality.txt + # -r requirements/testing.txt + # event-tracking +packaging==23.2 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt # -r requirements/quality.txt # -r requirements/testing.txt # build + # pyproject-api # pytest # tox -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # stevedore -pip-tools==6.13.0 +pip-tools==7.4.0 # via -r requirements/pip-tools.txt -platformdirs==3.8.0 +platformdirs==4.2.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # pylint + # tox # virtualenv -pluggy==1.2.0 +pluggy==1.4.0 # via # -r requirements/ci.txt # -r requirements/quality.txt # -r requirements/testing.txt # pytest # tox -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.43 # via # -r requirements/quality.txt # -r requirements/testing.txt # click-repl -psutil==5.9.5 +psutil==5.9.8 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-django-utils -py==1.11.0 - # via - # -r requirements/ci.txt - # tox -pycodestyle==2.10.0 +pycodestyle==2.11.1 # via -r requirements/quality.txt pycparser==2.21 # via # -r requirements/quality.txt # -r requirements/testing.txt # cffi -pylint==2.10.2 +pylint==3.0.3 # via - # -c requirements/constraints.txt # -r requirements/quality.txt # edx-lint # pylint-celery @@ -257,7 +295,7 @@ pylint-celery==0.3 # via # -r requirements/quality.txt # edx-lint -pylint-django==2.5.3 +pylint-django==2.5.5 # via # -r requirements/quality.txt # edx-lint @@ -270,17 +308,23 @@ pymongo==3.13.0 # via # -r requirements/quality.txt # -r requirements/testing.txt + # edx-opaque-keys # event-tracking pynacl==1.5.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # edx-django-utils +pyproject-api==1.6.1 + # via + # -r requirements/ci.txt + # tox pyproject-hooks==1.0.0 # via # -r requirements/pip-tools.txt # build -pytest==7.4.0 + # pip-tools +pytest==8.0.1 # via # -r requirements/quality.txt # -r requirements/testing.txt @@ -294,31 +338,29 @@ python-dateutil==2.8.2 # -r requirements/quality.txt # -r requirements/testing.txt # celery -python-slugify==8.0.1 +python-slugify==8.0.4 # via # -r requirements/quality.txt # -r requirements/testing.txt # code-annotations -pytz==2023.3 +pytz==2024.1 # via # -r requirements/quality.txt # -r requirements/testing.txt # django # event-tracking -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/quality.txt # -r requirements/testing.txt # code-annotations six==1.16.0 # via - # -r requirements/ci.txt # -r requirements/quality.txt # -r requirements/testing.txt # edx-lint # event-tracking # python-dateutil - # tox sqlparse==0.4.4 # via # -r requirements/quality.txt @@ -330,15 +372,12 @@ stevedore==5.1.0 # -r requirements/testing.txt # code-annotations # edx-django-utils + # edx-opaque-keys text-unidecode==1.3 # via # -r requirements/quality.txt # -r requirements/testing.txt # python-slugify -toml==0.10.2 - # via - # -r requirements/quality.txt - # pylint tomli==2.0.1 # via # -r requirements/ci.txt @@ -347,54 +386,62 @@ tomli==2.0.1 # -r requirements/testing.txt # build # coverage + # pip-tools + # pylint + # pyproject-api # pyproject-hooks # pytest # tox -tox==3.28.0 +tomlkit==0.12.3 # via - # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt - # -r requirements/ci.txt -typing-extensions==4.6.3 + # -r requirements/quality.txt + # pylint +tox==4.13.0 + # via -r requirements/ci.txt +typing-extensions==4.9.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # asgiref + # astroid + # edx-opaque-keys # kombu -tzdata==2023.3 + # pylint +tzdata==2024.1 # via # -r requirements/quality.txt # -r requirements/testing.txt # backports-zoneinfo # celery -urllib3==1.26.16 +urllib3==1.26.18 # via # -r requirements/quality.txt # -r requirements/testing.txt # elasticsearch -vine==5.0.0 +vine==5.1.0 # via # -r requirements/quality.txt # -r requirements/testing.txt # amqp # celery # kombu -virtualenv==20.23.1 +virtualenv==20.25.0 # via # -r requirements/ci.txt # tox -wcwidth==0.2.6 +wcwidth==0.2.13 # via # -r requirements/quality.txt # -r requirements/testing.txt # prompt-toolkit -wheel==0.40.0 +wheel==0.42.0 # via # -r requirements/pip-tools.txt # pip-tools -wrapt==1.12.1 +zipp==3.17.0 # via - # -r requirements/quality.txt - # astroid + # -r requirements/pip-tools.txt + # importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 8620fabd..44c48d99 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -1,23 +1,32 @@ # -# 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 # -build==0.10.0 +build==1.0.3 # via pip-tools -click==8.1.3 +click==8.1.7 # via pip-tools -packaging==23.1 +importlib-metadata==7.0.1 # via build -pip-tools==6.13.0 +packaging==23.2 + # via build +pip-tools==7.4.0 # via -r requirements/pip-tools.in pyproject-hooks==1.0.0 - # via build + # via + # build + # pip-tools tomli==2.0.1 - # via build -wheel==0.40.0 + # via + # build + # pip-tools + # pyproject-hooks +wheel==0.42.0 # via pip-tools +zipp==3.17.0 + # 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 8a5a6e3b..677bf038 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: # # make upgrade # @@ -8,7 +8,7 @@ wheel==0.37.1 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==22.0.3 +pip==24.0 # via -r requirements/pip.in -setuptools==59.8.0 +setuptools==69.1.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 832f3232..4a8c3857 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -4,7 +4,7 @@ # # make upgrade # -amqp==5.1.1 +amqp==5.2.0 # via # -r requirements/testing.txt # kombu @@ -12,32 +12,37 @@ asgiref==3.7.2 # via # -r requirements/testing.txt # django -astroid==2.7.3 +astroid==3.0.3 # via # pylint # pylint-celery -backports-zoneinfo[tzdata]==0.2.1 +attrs==23.2.0 # via # -r requirements/testing.txt + # openedx-events +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/testing.txt # celery # kombu -billiard==4.1.0 +billiard==4.2.0 # via # -r requirements/testing.txt # celery -celery==5.3.1 +celery==5.3.6 # via # -r requirements/testing.txt # event-tracking -certifi==2023.5.7 +certifi==2024.2.2 # via # -r requirements/testing.txt # elasticsearch -cffi==1.15.1 +cffi==1.16.0 # via # -r requirements/testing.txt # pynacl -click==8.1.3 +click==8.1.7 # via # -r requirements/testing.txt # celery @@ -62,12 +67,12 @@ click-repl==0.3.0 # via # -r requirements/testing.txt # celery -code-annotations==1.3.0 +code-annotations==1.6.0 # via # -r requirements/testing.txt # edx-lint # edx-toggles -coverage[toml]==7.2.7 +coverage[toml]==7.4.2 # via # -r requirements/quality.in # -r requirements/testing.txt @@ -76,109 +81,125 @@ ddt==1.3.1 # via # -c requirements/constraints.txt # -r requirements/testing.txt -django==3.2.19 +dill==0.3.8 + # via pylint +django==3.2.24 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/testing.txt # django-crum + # django-waffle # edx-django-utils # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # -r requirements/testing.txt # edx-django-utils # edx-toggles -django-waffle==3.0.0 +django-waffle==4.1.0 # via # -r requirements/testing.txt # edx-django-utils # edx-toggles -edx-django-utils==5.5.0 +edx-django-utils==5.10.1 # via # -r requirements/testing.txt # edx-toggles # event-tracking -edx-lint==5.3.4 + # openedx-events +edx-lint==5.3.6 # via -r requirements/quality.in -edx-toggles==5.0.0 - # via -r requirements/testing.txt +edx-opaque-keys[django]==2.5.1 + # via + # -r requirements/testing.txt + # openedx-events +edx-toggles==5.1.1 + # via + # -r requirements/testing.txt + # event-tracking elasticsearch==7.13.4 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/testing.txt -event-tracking==2.1.0 +event-tracking==2.3.0 # via -r requirements/testing.txt -exceptiongroup==1.1.1 +exceptiongroup==1.2.0 # via # -r requirements/testing.txt # pytest +fastavro==1.9.4 + # via + # -r requirements/testing.txt + # openedx-events iniconfig==2.0.0 # via # -r requirements/testing.txt # pytest -isort==5.12.0 +isort==5.13.2 # via pylint -jinja2==3.1.2 +jinja2==3.1.3 # via # -r requirements/testing.txt # code-annotations -kombu==5.3.1 +kombu==5.3.5 # via # -r requirements/testing.txt # celery -lazy-object-proxy==1.9.0 - # via astroid -markupsafe==2.1.3 +markupsafe==2.1.5 # via # -r requirements/testing.txt # jinja2 -mccabe==0.6.1 +mccabe==0.7.0 # via pylint -mock==5.0.2 +mock==5.1.0 # via -r requirements/testing.txt -newrelic==8.8.0 +newrelic==9.6.0 # via # -r requirements/testing.txt # edx-django-utils -packaging==23.1 +openedx-events==9.5.2 + # via + # -r requirements/testing.txt + # event-tracking +packaging==23.2 # via # -r requirements/testing.txt # pytest -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/testing.txt # stevedore -platformdirs==3.8.0 +platformdirs==4.2.0 # via pylint -pluggy==1.2.0 +pluggy==1.4.0 # via # -r requirements/testing.txt # pytest -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.43 # via # -r requirements/testing.txt # click-repl -psutil==5.9.5 +psutil==5.9.8 # via # -r requirements/testing.txt # edx-django-utils -pycodestyle==2.10.0 +pycodestyle==2.11.1 # via -r requirements/quality.in pycparser==2.21 # via # -r requirements/testing.txt # cffi -pylint==2.10.2 +pylint==3.0.3 # via - # -c requirements/constraints.txt # edx-lint # pylint-celery # pylint-django # 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 @@ -187,12 +208,13 @@ pylint-plugin-utils==0.8.2 pymongo==3.13.0 # via # -r requirements/testing.txt + # edx-opaque-keys # event-tracking pynacl==1.5.0 # via # -r requirements/testing.txt # edx-django-utils -pytest==7.4.0 +pytest==8.0.1 # via # -r requirements/testing.txt # pytest-cov @@ -202,16 +224,16 @@ python-dateutil==2.8.2 # via # -r requirements/testing.txt # celery -python-slugify==8.0.1 +python-slugify==8.0.4 # via # -r requirements/testing.txt # code-annotations -pytz==2023.3 +pytz==2024.1 # via # -r requirements/testing.txt # django # event-tracking -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/testing.txt # code-annotations @@ -230,43 +252,43 @@ stevedore==5.1.0 # -r requirements/testing.txt # code-annotations # edx-django-utils + # edx-opaque-keys text-unidecode==1.3 # via # -r requirements/testing.txt # python-slugify -toml==0.10.2 - # via pylint tomli==2.0.1 # via # -r requirements/testing.txt # coverage + # pylint # pytest -typing-extensions==4.6.3 +tomlkit==0.12.3 + # via pylint +typing-extensions==4.9.0 # via # -r requirements/testing.txt # asgiref + # astroid + # edx-opaque-keys # kombu -tzdata==2023.3 + # pylint +tzdata==2024.1 # via # -r requirements/testing.txt # backports-zoneinfo # celery -urllib3==1.26.16 +urllib3==1.26.18 # via # -r requirements/testing.txt # elasticsearch -vine==5.0.0 +vine==5.1.0 # via # -r requirements/testing.txt # amqp # celery # kombu -wcwidth==0.2.6 +wcwidth==0.2.13 # via # -r requirements/testing.txt # prompt-toolkit -wrapt==1.12.1 - # via astroid - -# The following packages are considered to be unsafe in a requirements file: -# setuptools diff --git a/requirements/testing.txt b/requirements/testing.txt index ba18e4d5..9a1d1263 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -4,7 +4,7 @@ # # make upgrade # -amqp==5.1.1 +amqp==5.2.0 # via # -r requirements/base.txt # kombu @@ -12,28 +12,33 @@ asgiref==3.7.2 # via # -r requirements/base.txt # django -backports-zoneinfo[tzdata]==0.2.1 +attrs==23.2.0 # via # -r requirements/base.txt + # openedx-events +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" + # via + # -c requirements/constraints.txt + # -r requirements/base.txt # celery # kombu -billiard==4.1.0 +billiard==4.2.0 # via # -r requirements/base.txt # celery -celery==5.3.1 +celery==5.3.6 # via # -r requirements/base.txt # event-tracking -certifi==2023.5.7 +certifi==2024.2.2 # via # -r requirements/base.txt # elasticsearch -cffi==1.15.1 +cffi==1.16.0 # via # -r requirements/base.txt # pynacl -click==8.1.3 +click==8.1.7 # via # -r requirements/base.txt # celery @@ -54,11 +59,11 @@ click-repl==0.3.0 # via # -r requirements/base.txt # celery -code-annotations==1.3.0 +code-annotations==1.6.0 # via # -r requirements/base.txt # edx-toggles -coverage[toml]==7.2.7 +coverage[toml]==7.4.2 # via # -r requirements/testing.in # pytest-cov @@ -70,67 +75,84 @@ ddt==1.3.1 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt # django-crum + # django-waffle # edx-django-utils # edx-toggles # event-tracking + # openedx-events django-crum==0.7.9 # via # -r requirements/base.txt # edx-django-utils # edx-toggles -django-waffle==3.0.0 +django-waffle==4.1.0 # via # -r requirements/base.txt # edx-django-utils # edx-toggles -edx-django-utils==5.5.0 +edx-django-utils==5.10.1 # via # -r requirements/base.txt # edx-toggles # event-tracking -edx-toggles==5.0.0 - # via -r requirements/base.txt + # openedx-events +edx-opaque-keys[django]==2.5.1 + # via + # -r requirements/base.txt + # openedx-events +edx-toggles==5.1.1 + # via + # -r requirements/base.txt + # event-tracking elasticsearch==7.13.4 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt -event-tracking==2.1.0 +event-tracking==2.3.0 # via -r requirements/base.txt -exceptiongroup==1.1.1 +exceptiongroup==1.2.0 # via pytest +fastavro==1.9.4 + # via + # -r requirements/base.txt + # openedx-events iniconfig==2.0.0 # via pytest -jinja2==3.1.2 +jinja2==3.1.3 # via # -r requirements/base.txt # code-annotations -kombu==5.3.1 +kombu==5.3.5 # via # -r requirements/base.txt # celery -markupsafe==2.1.3 +markupsafe==2.1.5 # via # -r requirements/base.txt # jinja2 -mock==5.0.2 +mock==5.1.0 # via -r requirements/testing.in -newrelic==8.8.0 +newrelic==9.6.0 # via # -r requirements/base.txt # edx-django-utils -packaging==23.1 +openedx-events==9.5.2 + # via + # -r requirements/base.txt + # event-tracking +packaging==23.2 # via pytest -pbr==5.11.1 +pbr==6.0.0 # via # -r requirements/base.txt # stevedore -pluggy==1.2.0 +pluggy==1.4.0 # via pytest -prompt-toolkit==3.0.38 +prompt-toolkit==3.0.43 # via # -r requirements/base.txt # click-repl -psutil==5.9.5 +psutil==5.9.8 # via # -r requirements/base.txt # edx-django-utils @@ -141,12 +163,13 @@ pycparser==2.21 pymongo==3.13.0 # via # -r requirements/base.txt + # edx-opaque-keys # event-tracking pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils -pytest==7.4.0 +pytest==8.0.1 # via pytest-cov pytest-cov==4.1.0 # via -r requirements/testing.in @@ -154,16 +177,16 @@ python-dateutil==2.8.2 # via # -r requirements/base.txt # celery -python-slugify==8.0.1 +python-slugify==8.0.4 # via # -r requirements/base.txt # code-annotations -pytz==2023.3 +pytz==2024.1 # via # -r requirements/base.txt # django # event-tracking -pyyaml==6.0 +pyyaml==6.0.1 # via # -r requirements/base.txt # code-annotations @@ -181,6 +204,7 @@ stevedore==5.1.0 # -r requirements/base.txt # code-annotations # edx-django-utils + # edx-opaque-keys text-unidecode==1.3 # via # -r requirements/base.txt @@ -189,27 +213,28 @@ tomli==2.0.1 # via # coverage # pytest -typing-extensions==4.6.3 +typing-extensions==4.9.0 # via # -r requirements/base.txt # asgiref + # edx-opaque-keys # kombu -tzdata==2023.3 +tzdata==2024.1 # via # -r requirements/base.txt # backports-zoneinfo # celery -urllib3==1.26.16 +urllib3==1.26.18 # via # -r requirements/base.txt # elasticsearch -vine==5.0.0 +vine==5.1.0 # via # -r requirements/base.txt # amqp # celery # kombu -wcwidth==0.2.6 +wcwidth==0.2.13 # via # -r requirements/base.txt # prompt-toolkit diff --git a/search/elastic.py b/search/elastic.py index 4e38093a..6a942ce5 100644 --- a/search/elastic.py +++ b/search/elastic.py @@ -469,6 +469,7 @@ def remove(self, doc_ids, **kwargs): log.exception("An error occurred while removing documents from the index: %r", valid_errors) raise + # pylint: disable=arguments-renamed, unused-argument def search(self, query_string=None, field_dictionary=None, @@ -478,7 +479,7 @@ def search(self, exclude_ids=None, use_field_match=False, log_search_params=False, - **kwargs): # pylint: disable=arguments-differ, unused-argument + **kwargs): """ Implements call to search the index for the desired content. diff --git a/search/filter_generator.py b/search/filter_generator.py index 8fbdabb4..5adacb86 100644 --- a/search/filter_generator.py +++ b/search/filter_generator.py @@ -14,8 +14,6 @@ class SearchFilterGenerator: Users of this search app will override this class and update setting for SEARCH_FILTER_GENERATOR """ - # disabling pylint violations because overriders will want to use these - # pylint: disable=unused-argument, no-self-use def filter_dictionary(self, **kwargs): """ base implementation which filters via start_date """ return {"start_date": DateRange(None, datetime.utcnow())} diff --git a/search/initializer.py b/search/initializer.py index 307fa533..04c6edb7 100644 --- a/search/initializer.py +++ b/search/initializer.py @@ -12,8 +12,6 @@ class SearchInitializer: Users of this search app will override this class and update setting for SEARCH_INITIALIZER """ - # disabling pylint violations because overriders will want to use these - # pylint: disable=unused-argument, no-self-use def initialize(self, **kwargs): """ empty base implementation """ diff --git a/search/result_processor.py b/search/result_processor.py index 6674cca1..24ba1b57 100644 --- a/search/result_processor.py +++ b/search/result_processor.py @@ -17,7 +17,7 @@ ELLIPSIS = '' # log appears to be standard name used for logger -log = logging.getLogger(__name__) # pylint: disable=invalid-name +log = logging.getLogger(__name__) class SearchResultProcessor: @@ -87,8 +87,7 @@ def decorate_matches(match_in, match_word): ) return match_in - # disabling pylint violations because overriders will want to use these - def should_remove(self, user): # pylint: disable=unused-argument, no-self-use + def should_remove(self, user): # pylint: disable=unused-argument """ Override this in a class in order to add in last-chance access checks to the search process Your application will want to make this decision @@ -116,7 +115,7 @@ def process_result(cls, dictionary, match_phrase, user): try: srp.add_properties() # protect around any problems introduced by subclasses within their properties - except Exception as ex: # pylint: disable=broad-except + except Exception as ex: log.exception("error processing properties for %s - %s: will remove from results", json.dumps(dictionary, cls=DjangoJSONEncoder), str(ex)) return None diff --git a/search/tests/mock_search_engine.py b/search/tests/mock_search_engine.py index 52894800..4974c80e 100644 --- a/search/tests/mock_search_engine.py +++ b/search/tests/mock_search_engine.py @@ -190,7 +190,7 @@ def add_agg_value(agg_value): for document in aggregated_documents: add_agg_value(document[aggregate]) - total = sum([terms[term] for term in terms]) + total = sum([terms[term] for term in terms]) # pylint: disable=consider-using-generator return total, terms diff --git a/search/tests/test_course_discovery.py b/search/tests/test_course_discovery.py index cad33b4a..0c823f50 100644 --- a/search/tests/test_course_discovery.py +++ b/search/tests/test_course_discovery.py @@ -1,8 +1,6 @@ #!/usr/bin/env python # Some of the subclasses that get used as settings-overrides will yield this pylint # error, but they do get used when included as part of the override_settings -# pylint: disable=too-few-public-methods -# pylint: disable=too-many-ancestors """ Tests for search functionalty """ import copy @@ -84,7 +82,7 @@ def get_and_index(cls, searcher, update_dict=None, remove_fields=None): @override_settings(COURSEWARE_CONTENT_INDEX_NAME=TEST_INDEX_NAME) @override_settings(COURSEWARE_INFO_INDEX_NAME=TEST_INDEX_NAME) # Any class that inherits from TestCase will cause too-many-public-methods pylint error -class TestMockCourseDiscoverySearch(TestCase, SearcherMixin): # pylint: disable=too-many-public-methods +class TestMockCourseDiscoverySearch(TestCase, SearcherMixin): """ Tests course discovery activities """ diff --git a/search/tests/test_course_discovery_views.py b/search/tests/test_course_discovery_views.py index 918b6ccf..f01a442a 100644 --- a/search/tests/test_course_discovery_views.py +++ b/search/tests/test_course_discovery_views.py @@ -7,11 +7,8 @@ from .test_views import MockSearchUrlTest from .test_course_discovery import DemoCourse -# Any class that inherits from TestCase will cause too-many-public-methods pylint error -# pylint: disable=too-many-public-methods - -@override_settings(ELASTIC_FIELD_MAPPINGS={ # pylint: disable=too-many-ancestors +@override_settings(ELASTIC_FIELD_MAPPINGS={ "start_date": {"type": "date"}, "enrollment_start": {"type": "date"}, "enrollment_end": {"type": "date"} diff --git a/search/tests/test_engines.py b/search/tests/test_engines.py index 659d4cc9..7888041c 100644 --- a/search/tests/test_engines.py +++ b/search/tests/test_engines.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # Some of the subclasses that get used as settings-overrides will yield this pylint # error, but they do get used when included as part of the override_settings -# pylint: disable=too-few-public-methods """ Tests for search functionality """ import json diff --git a/search/tests/test_mock_search_engine.py b/search/tests/test_mock_search_engine.py index 896a9558..13cc7867 100644 --- a/search/tests/test_mock_search_engine.py +++ b/search/tests/test_mock_search_engine.py @@ -11,10 +11,6 @@ from search.utils import DateRange -# Any class that inherits from TestCase will cause too-many-public-methods pylint error -# pylint: disable=too-many-public-methods - - @override_settings(SEARCH_ENGINE="search.tests.mock_search_engine.MockSearchEngine") @override_settings(ELASTIC_FIELD_MAPPINGS={"start_date": {"type": "date"}}) class MockSpecificSearchTests(TestCase, SearcherMixin): diff --git a/search/tests/test_search_result_processor.py b/search/tests/test_search_result_processor.py index a144a3dc..2a2efbd3 100644 --- a/search/tests/test_search_result_processor.py +++ b/search/tests/test_search_result_processor.py @@ -7,8 +7,6 @@ from search.result_processor import SearchResultProcessor, ELLIPSIS -# Any class that inherits from TestCase will cause too-many-public-methods pylint error -# pylint: disable=too-many-public-methods @ddt.ddt class SearchResultProcessorTests(TestCase): """ Tests to check SearchResultProcessor is working as desired """ @@ -297,7 +295,6 @@ class TestSearchResultProcessor(SearchResultProcessor): Override the SearchResultProcessor so that we get the additional (inferred) properties and can identify results that should be removed due to access restriction """ - # pylint: disable=no-self-use @property def additional_property(self): """ additional property that should appear within processed results """ diff --git a/search/tests/test_views.py b/search/tests/test_views.py index 92958f1e..7c3aff46 100644 --- a/search/tests/test_views.py +++ b/search/tests/test_views.py @@ -17,7 +17,6 @@ # Any class that inherits from TestCase will cause too-many-public-methods pylint error -# pylint: disable=too-many-public-methods @override_settings(SEARCH_ENGINE="search.tests.mock_search_engine.MockSearchEngine") @override_settings(ELASTIC_FIELD_MAPPINGS={"start_date": {"type": "date"}}) @override_settings(COURSEWARE_CONTENT_INDEX_NAME=TEST_INDEX_NAME) @@ -46,11 +45,11 @@ def tearDown(self): def assert_no_events_were_emitted(self): """Ensures no events were emitted since the last event related assertion""" - self.assertFalse(self.mock_tracker.emit.called) # pylint: disable=maybe-no-member + self.assertFalse(self.mock_tracker.emit.called) def assert_search_initiated_event(self, search_term, size, page): """Ensures an search initiated event was emitted""" - initiated_search_call = self.mock_tracker.emit.mock_calls[0] # pylint: disable=maybe-no-member + initiated_search_call = self.mock_tracker.emit.mock_calls[0] expected_result = call('edx.course.search.initiated', { "search_term": str(search_term), "page_size": size, @@ -60,7 +59,7 @@ def assert_search_initiated_event(self, search_term, size, page): def assert_results_returned_event(self, search_term, size, page, total): """Ensures an results returned event was emitted""" - returned_results_call = self.mock_tracker.emit.mock_calls[1] # pylint: disable=maybe-no-member + returned_results_call = self.mock_tracker.emit.mock_calls[1] expected_result = call('edx.course.search.results_displayed', { "search_term": str(search_term), "page_size": size, @@ -71,7 +70,7 @@ def assert_results_returned_event(self, search_term, size, page, total): def assert_initiated_return_events(self, search_term, size, page, total): """Asserts search initiated and results returned events were emitted""" - self.assertEqual(self.mock_tracker.emit.call_count, 2) # pylint: disable=maybe-no-member + self.assertEqual(self.mock_tracker.emit.call_count, 2) self.assert_search_initiated_event(search_term, size, page) self.assert_results_returned_event(search_term, size, page, total) diff --git a/search/tests/tests.py b/search/tests/tests.py index 3fe5047b..35383315 100644 --- a/search/tests/tests.py +++ b/search/tests/tests.py @@ -1,8 +1,6 @@ #!/usr/bin/env python # Some of the subclasses that get used as settings-overrides will yield this pylint # error, but they do get used when included as part of the override_settings -# pylint: disable=too-few-public-methods -# pylint: disable=too-many-ancestors """ Tests for search functionalty """ from datetime import datetime @@ -20,8 +18,6 @@ from .mock_search_engine import MockSearchEngine -# Any class that inherits from TestCase will cause too-many-public-methods pylint error -# pylint: disable=too-many-public-methods @override_settings(SEARCH_ENGINE="search.tests.mock_search_engine.MockSearchEngine") @override_settings(ELASTIC_FIELD_MAPPINGS={"start_date": {"type": "date"}}) @override_settings(MOCK_SEARCH_BACKING_FILE=None) diff --git a/search/tests/utils.py b/search/tests/utils.py index d8c5e074..5d38d616 100644 --- a/search/tests/utils.py +++ b/search/tests/utils.py @@ -73,14 +73,13 @@ def search(self, class ErroringIndexEngine(MockSearchEngine): """ Override to generate search engine error to test """ - def index(self, sources, **kwargs): # pylint: disable=unused-argument, arguments-differ + def index(self, sources, **kwargs): raise Exception("There is a problem here") class ErroringElasticImpl(Elasticsearch): """ Elasticsearch implementation that throws exceptions""" - # pylint: disable=unused-argument def search(self, **kwargs): # pylint: disable=arguments-differ """ this will definitely fail """ raise exceptions.ElasticsearchException("This search operation failed") diff --git a/search/urls.py b/search/urls.py index ddf59c42..10439d54 100644 --- a/search/urls.py +++ b/search/urls.py @@ -8,7 +8,6 @@ COURSE_ID_PATTERN = getattr(settings, "COURSE_ID_PATTERN", r'(?P[^/+]+(/|\+)[^/+]+(/|\+)[^/]+)') # urlpatterns is the standard name to use here -# pylint: disable=invalid-name urlpatterns = [ path('', views.do_search, name='do_search'), re_path(r'^{}$'.format(COURSE_ID_PATTERN), views.do_search, name='do_search'), diff --git a/search/views.py b/search/views.py index c59f7463..cda536b2 100644 --- a/search/views.py +++ b/search/views.py @@ -1,6 +1,5 @@ """ handle requests for courseware search http requests """ # This contains just the url entry points to use if desired, which currently has only one -# pylint: disable=too-few-public-methods import logging @@ -14,7 +13,7 @@ from .initializer import SearchInitializer # log appears to be standard name used for logger -log = logging.getLogger(__name__) # pylint: disable=invalid-name +log = logging.getLogger(__name__) def _process_pagination_values(request): @@ -123,8 +122,7 @@ def do_search(request, course_id=None): } log.debug(str(invalid_err)) - # Allow for broad exceptions here - this is an entry point from external reference - except Exception as err: # pylint: disable=broad-except + except Exception as err: results = { "error": _('An error occurred when searching for "{search_string}"').format(search_string=search_term) } @@ -209,8 +207,7 @@ def course_discovery(request): } log.debug(str(invalid_err)) - # Allow for broad exceptions here - this is an entry point from external reference - except Exception as err: # pylint: disable=broad-except + except Exception as err: results = { "error": _('An error occurred when searching for "{search_string}"').format(search_string=search_term) } diff --git a/tox.ini b/tox.ini index fa71d60a..19cc118f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,26 @@ [tox] -envlist = py38-django{32,40,42},quality +envlist = py{38,311,312}-django{42},quality [testenv] -setenv = +setenv = DJANGO_SETTINGS_MODULE = edxsearch.settings PYTHONPATH = {toxinidir} -deps = - django32: Django>=3.2,<4.0 - django40: Django>=4.0,<4.1 +deps = + setuptools + wheel django42: Django>=4.2,<4.3 -r {toxinidir}/requirements/testing.txt -commands = +commands = python -Wd -m coverage run manage.py test --settings=settings {posargs} python -m coverage xml [testenv:quality] -allowlist_externals = +allowlist_externals = make -deps = +deps = + setuptools + wheel -r{toxinidir}/requirements/quality.txt -commands = +commands = make quality