diff --git a/edx_ace/__init__.py b/edx_ace/__init__.py index 09590995..69bd5d5c 100644 --- a/edx_ace/__init__.py +++ b/edx_ace/__init__.py @@ -13,7 +13,7 @@ from .recipient import Recipient from .recipient_resolver import RecipientResolver -__version__ = '1.8.0' +__version__ = '1.9.0' __all__ = [ diff --git a/edx_ace/monitoring.py b/edx_ace/monitoring.py index 8e41d8f3..1ee06408 100644 --- a/edx_ace/monitoring.py +++ b/edx_ace/monitoring.py @@ -2,16 +2,8 @@ :mod:`edx_ace.monitoring` exposes functions that are useful for reporting ACE message delivery stats to monitoring services. """ -try: - import newrelic.agent -except ImportError: - newrelic = None # pylint: disable=invalid-name +from edx_django_utils.monitoring import set_custom_attribute def report(key, value): - report_to_newrelic(key, value) - - -def report_to_newrelic(key, value): - if newrelic: - newrelic.agent.add_custom_parameter(key, value) + set_custom_attribute(key, value) diff --git a/requirements/base.in b/requirements/base.in index e15b53b9..70d0b0c2 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -7,3 +7,4 @@ attrs>=17.2.0 # Attributes without boilerplate sailthru-client==2.2.3 six stevedore>=1.10.0 +edx-django-utils>=5.14.2 diff --git a/requirements/ci.txt b/requirements/ci.txt index 127e7293..154d9d09 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,27 +12,27 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.13.1 +filelock==3.15.4 # via # tox # virtualenv -packaging==23.2 +packaging==24.1 # via # pyproject-api # tox -platformdirs==4.2.0 +platformdirs==4.2.2 # via # tox # virtualenv -pluggy==1.4.0 +pluggy==1.5.0 # via tox -pyproject-api==1.6.1 +pyproject-api==1.7.1 # via tox tomli==2.0.1 # via # pyproject-api # tox -tox==4.14.0 +tox==4.15.1 # via -r requirements/ci.in -virtualenv==20.25.1 +virtualenv==20.26.3 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 3802d1b6..cd1509a8 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,26 +4,30 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django -astroid==3.1.0 +astroid==3.2.2 # via # pylint # pylint-celery attrs==23.2.0 # via -r requirements/base.in +backports-tarfile==1.2.0 + # via jaraco-context backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt # -r requirements/dev.in # -r requirements/quality.in # django -build==1.1.1 +build==1.2.1 # via pip-tools cachetools==5.3.3 # via tox -certifi==2024.2.2 +certifi==2024.6.2 # via requests +cffi==1.16.0 + # via pynacl chardet==5.2.0 # via # diff-cover @@ -34,60 +38,79 @@ click==8.1.7 # via # click-log # code-annotations + # edx-django-utils # edx-lint # pip-tools click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via edx-lint colorama==0.4.6 # via tox -diff-cover==8.0.3 +diff-cover==9.1.0 # via -r requirements/dev.in dill==0.3.8 # via pylint distlib==0.3.8 # via virtualenv -django==4.2.11 +django==4.2.13 # 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-i18n-tools +django-crum==0.7.9 + # via edx-django-utils +django-waffle==4.1.0 + # via edx-django-utils docutils==0.20.1 # via readme-renderer -edx-i18n-tools==1.3.0 +edx-django-utils==5.14.2 + # via -r requirements/base.in +edx-i18n-tools==1.6.0 # via -r requirements/dev.in edx-lint==5.3.6 # via # -r requirements/dev.in # -r requirements/quality.in -filelock==3.13.1 +filelock==3.15.4 # via # tox # virtualenv -idna==3.6 +idna==3.7 # via requests -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # build # keyring # twine -importlib-resources==6.1.2 +importlib-resources==6.4.0 # via keyring isort==5.13.2 # via # -r requirements/quality.in # pylint -jaraco-classes==3.3.1 +jaraco-classes==3.4.0 + # via keyring +jaraco-context==5.3.0 + # via keyring +jaraco-functools==4.0.1 # via keyring -jinja2==3.1.3 +jinja2==3.1.4 # via # code-annotations # diff-cover -keyring==24.3.1 +keyring==25.2.1 # via twine -lxml==5.1.0 - # via edx-i18n-tools +lxml[html-clean,html_clean]==5.2.2 + # via + # edx-i18n-tools + # lxml-html-clean +lxml-html-clean==0.1.1 + # via lxml markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 @@ -96,16 +119,20 @@ mccabe==0.7.0 # via pylint mdurl==0.1.2 # via markdown-it-py -more-itertools==10.2.0 - # via jaraco-classes -nh3==0.2.15 +more-itertools==10.3.0 + # via + # jaraco-classes + # jaraco-functools +newrelic==9.11.0 + # via edx-django-utils +nh3==0.2.17 # via readme-renderer -packaging==23.2 +packaging==24.1 # via # build # pyproject-api # tox -path==16.10.0 +path==16.14.0 # via edx-i18n-tools pbr==6.0.0 # via stevedore @@ -113,27 +140,31 @@ pip-tools==7.4.1 # via -r requirements/dev.in pkginfo==1.10.0 # via twine -platformdirs==4.2.0 +platformdirs==4.2.2 # via # pylint # tox # virtualenv -pluggy==1.4.0 +pluggy==1.5.0 # via # diff-cover # tox polib==1.2.0 # via edx-i18n-tools -pycodestyle==2.11.1 +psutil==6.0.0 + # via edx-django-utils +pycodestyle==2.12.0 # via -r requirements/quality.in +pycparser==2.22 + # via cffi pydocstyle==6.3.0 # via -r requirements/quality.in -pygments==2.17.2 +pygments==2.18.0 # via # diff-cover # readme-renderer # rich -pylint==3.1.0 +pylint==3.2.4 # via # edx-lint # pylint-celery @@ -147,9 +178,11 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django -pyproject-api==1.6.1 +pynacl==1.5.0 + # via edx-django-utils +pyproject-api==1.7.1 # via tox -pyproject-hooks==1.0.0 +pyproject-hooks==1.1.0 # via # build # pip-tools @@ -163,7 +196,7 @@ pyyaml==6.0.1 # edx-i18n-tools readme-renderer==43.0 # via twine -requests==2.31.0 +requests==2.32.3 # via # requests-toolbelt # sailthru-client @@ -185,12 +218,13 @@ six==1.16.0 # python-dateutil snowballstemmer==2.2.0 # via pydocstyle -sqlparse==0.4.4 +sqlparse==0.5.0 # via django stevedore==5.2.0 # via # -r requirements/base.in # code-annotations + # edx-django-utils text-unidecode==1.3 # via python-slugify tomli==2.0.1 @@ -199,31 +233,30 @@ tomli==2.0.1 # pip-tools # pylint # pyproject-api - # pyproject-hooks # tox -tomlkit==0.12.4 +tomlkit==0.12.5 # via pylint -tox==4.14.0 +tox==4.15.1 # via -r requirements/dev.in -twine==5.0.0 +twine==5.1.1 # via -r requirements/dev.in -typing-extensions==4.10.0 +typing-extensions==4.12.2 # via # asgiref # astroid # pylint # rich -urllib3==2.2.1 +urllib3==2.2.2 # via # requests # twine -virtualenv==20.25.1 +virtualenv==20.26.3 # via tox -wheel==0.42.0 +wheel==0.43.0 # via # -r requirements/dev.in # pip-tools -zipp==3.17.0 +zipp==3.19.2 # via # importlib-metadata # importlib-resources diff --git a/requirements/doc.txt b/requirements/doc.txt index c299e208..c87fc798 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -8,14 +8,16 @@ accessible-pygments==0.0.4 # via pydata-sphinx-theme alabaster==0.7.13 # via sphinx -asgiref==3.7.2 +asgiref==3.8.1 # via django attrs==23.2.0 # via -r requirements/base.in -babel==2.14.0 +babel==2.15.0 # via # pydata-sphinx-theme # sphinx +backports-tarfile==1.2.0 + # via jaraco-context backports-zoneinfo==0.2.1 ; python_version < "3.9" # via # -c requirements/constraints.txt @@ -23,14 +25,25 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # django beautifulsoup4==4.12.3 # via pydata-sphinx-theme -certifi==2024.2.2 +certifi==2024.6.2 # via requests +cffi==1.16.0 + # via pynacl charset-normalizer==3.3.2 # via requests -django==4.2.11 +click==8.1.7 + # via edx-django-utils +django==4.2.13 # 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 +django-crum==0.7.9 + # via edx-django-utils +django-waffle==4.1.0 + # via edx-django-utils doc8==1.1.1 # via -r requirements/doc.in docutils==0.19 @@ -40,22 +53,29 @@ docutils==0.19 # readme-renderer # restructuredtext-lint # sphinx -idna==3.6 +edx-django-utils==5.14.2 + # via -r requirements/base.in +idna==3.7 # via requests imagesize==1.4.1 # via sphinx -importlib-metadata==7.0.1 +importlib-metadata==6.11.0 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # keyring # sphinx # twine -importlib-resources==6.1.2 +importlib-resources==6.4.0 + # via keyring +jaraco-classes==3.4.0 # via keyring -jaraco-classes==3.3.1 +jaraco-context==5.3.0 # via keyring -jinja2==3.1.3 +jaraco-functools==4.0.1 + # via keyring +jinja2==3.1.4 # via sphinx -keyring==24.3.1 +keyring==25.2.1 # via twine markdown-it-py==3.0.0 # via rich @@ -63,11 +83,15 @@ markupsafe==2.1.5 # via jinja2 mdurl==0.1.2 # via markdown-it-py -more-itertools==10.2.0 - # via jaraco-classes -nh3==0.2.15 +more-itertools==10.3.0 + # via + # jaraco-classes + # jaraco-functools +newrelic==9.11.0 + # via edx-django-utils +nh3==0.2.17 # via readme-renderer -packaging==23.2 +packaging==24.1 # via # pydata-sphinx-theme # sphinx @@ -75,9 +99,13 @@ pbr==6.0.0 # via stevedore pkginfo==1.10.0 # via twine +psutil==6.0.0 + # via edx-django-utils +pycparser==2.22 + # via cffi pydata-sphinx-theme==0.14.4 # via sphinx-book-theme -pygments==2.17.2 +pygments==2.18.0 # via # accessible-pygments # doc8 @@ -85,6 +113,8 @@ pygments==2.17.2 # readme-renderer # rich # sphinx +pynacl==1.5.0 + # via edx-django-utils python-dateutil==2.9.0.post0 # via -r requirements/base.in pytz==2024.1 @@ -93,7 +123,7 @@ readme-renderer==43.0 # via # -r requirements/doc.in # twine -requests==2.31.0 +requests==2.32.3 # via # requests-toolbelt # sailthru-client @@ -138,26 +168,27 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlparse==0.4.4 +sqlparse==0.5.0 # via django stevedore==5.2.0 # via # -r requirements/base.in # doc8 + # edx-django-utils tomli==2.0.1 # via doc8 -twine==5.0.0 +twine==5.1.1 # via -r requirements/doc.in -typing-extensions==4.10.0 +typing-extensions==4.12.2 # via # asgiref # pydata-sphinx-theme # rich -urllib3==2.2.1 +urllib3==2.2.2 # via # requests # twine -zipp==3.17.0 +zipp==3.19.2 # via # importlib-metadata # importlib-resources diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 921c5b5c..30588308 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -4,17 +4,19 @@ # # make upgrade # -build==1.1.1 +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 https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # build +packaging==24.1 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in -pyproject-hooks==1.0.0 +pyproject-hooks==1.1.0 # via # build # pip-tools @@ -22,10 +24,9 @@ tomli==2.0.1 # via # build # pip-tools - # pyproject-hooks -wheel==0.42.0 +wheel==0.43.0 # via pip-tools -zipp==3.17.0 +zipp==3.19.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/pip.txt b/requirements/pip.txt index 66656035..7be83186 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 +pip==24.1.1 # via -r requirements/pip.in -setuptools==69.1.1 +setuptools==70.1.1 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 30921d25..87c76b0c 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -4,7 +4,7 @@ # # make upgrade # -astroid==3.1.0 +astroid==3.2.2 # via # pylint # pylint-celery @@ -19,7 +19,7 @@ click==8.1.7 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==1.6.0 +code-annotations==1.8.0 # via edx-lint dill==0.3.8 # via pylint @@ -29,7 +29,7 @@ isort==5.13.2 # via # -r requirements/quality.in # pylint -jinja2==3.1.3 +jinja2==3.1.4 # via code-annotations markupsafe==2.1.5 # via jinja2 @@ -37,13 +37,13 @@ mccabe==0.7.0 # via pylint pbr==6.0.0 # via stevedore -platformdirs==4.2.0 +platformdirs==4.2.2 # via pylint -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==3.1.0 +pylint==3.2.4 # via # edx-lint # pylint-celery @@ -71,9 +71,9 @@ text-unidecode==1.3 # via python-slugify tomli==2.0.1 # via pylint -tomlkit==0.12.4 +tomlkit==0.12.5 # via pylint -typing-extensions==4.10.0 +typing-extensions==4.12.2 # via # astroid # pylint diff --git a/requirements/test.txt b/requirements/test.txt index c5d4b131..85106676 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,7 +4,7 @@ # # make upgrade # -asgiref==3.7.2 +asgiref==3.8.1 # via django attrs==23.2.0 # via @@ -15,58 +15,81 @@ backports-zoneinfo==0.2.1 ; python_version < "3.9" # -c requirements/constraints.txt # -r requirements/test.in # django -certifi==2024.2.2 +certifi==2024.6.2 # via requests +cffi==1.16.0 + # via pynacl charset-normalizer==3.3.2 # via requests -coverage[toml]==7.4.3 +click==8.1.7 + # via edx-django-utils +coverage[toml]==7.5.4 # via pytest-cov ddt==1.7.2 # via -r requirements/test.in # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in -exceptiongroup==1.2.0 + # django-crum + # django-waffle + # edx-django-utils +django-crum==0.7.9 + # via edx-django-utils +django-waffle==4.1.0 + # via edx-django-utils +edx-django-utils==5.14.2 + # via -r requirements/base.in +exceptiongroup==1.2.1 # via # hypothesis # pytest -hypothesis[pytz]==6.98.17 +hypothesis[pytz]==6.104.1 # via # -r requirements/test.in # hypothesis-pytest hypothesis-pytest==0.19.0 # via -r requirements/test.in -idna==3.6 +idna==3.7 # via requests -importlib-metadata==7.0.1 - # via pytest-randomly +importlib-metadata==6.11.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # pytest-randomly iniconfig==2.0.0 # via pytest jedi==0.19.1 # via pudb mock==5.1.0 # via -r requirements/test.in -packaging==23.2 +newrelic==9.11.0 + # via edx-django-utils +packaging==24.1 # via # pudb # pytest -parso==0.8.3 +parso==0.8.4 # via jedi pbr==6.0.0 # via stevedore -pluggy==1.4.0 +pluggy==1.5.0 # via pytest +psutil==6.0.0 + # via edx-django-utils pudb==2024.1 # via -r requirements/test.in -pygments==2.17.2 +pycparser==2.22 + # via cffi +pygments==2.18.0 # via pudb -pytest==8.0.2 +pynacl==1.5.0 + # via edx-django-utils +pytest==8.2.2 # via # hypothesis-pytest # pytest-cov # pytest-django # pytest-randomly -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 @@ -76,7 +99,7 @@ python-dateutil==2.9.0.post0 # via -r requirements/base.in pytz==2024.1 # via hypothesis -requests==2.31.0 +requests==2.32.3 # via sailthru-client sailthru-client==2.2.3 # via -r requirements/base.in @@ -88,21 +111,23 @@ six==1.16.0 # python-dateutil sortedcontainers==2.4.0 # via hypothesis -sqlparse==0.4.4 +sqlparse==0.5.0 # via django stevedore==5.2.0 - # via -r requirements/base.in + # via + # -r requirements/base.in + # edx-django-utils tomli==2.0.1 # via # coverage # pytest -typing-extensions==4.10.0 +typing-extensions==4.12.2 # via # asgiref # urwid -urllib3==2.2.1 +urllib3==2.2.2 # via requests -urwid==2.6.8 +urwid==2.6.14 # via # pudb # urwid-readline @@ -110,5 +135,5 @@ urwid-readline==0.14 # via pudb wcwidth==0.2.13 # via urwid -zipp==3.17.0 +zipp==3.19.2 # via importlib-metadata