diff --git a/Dockerfile b/Dockerfile index 6e930152..48094899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL maintainer="Odoo Community Association (OCA)" ENV LANG=C.UTF-8 \ LC_ALL=C.UTF-8 \ DEBIAN_FRONTEND=noninteractive +ARG PY=3.12 + # binutils is needed for the ar command, used by pypandoc.ensure_pandoc_installed() RUN set -x \ && apt-get update \ @@ -13,7 +15,7 @@ RUN set -x \ ca-certificates \ curl \ git \ - python3-venv \ + python${PY}-venv \ rsync \ openssh-client \ && rm -rf /var/lib/apt/lists/* @@ -24,7 +26,7 @@ RUN set -x \ # Install a specific version of icon generator, to ensure stability as any tiny change # in generated output may create many commits on all addons. RUN set -x \ - && python3 -m venv /ocamt-pinned \ + && python${PY} -m venv /ocamt-pinned \ && /ocamt-pinned/bin/pip install --no-cache-dir -U pip wheel RUN set -x \ && /ocamt-pinned/bin/pip install --no-cache-dir -e git+https://github.com/OCA/maintainer-tools@969238e47c07d0c40573acff81d170f63245d738#egg=oca-maintainers-tools \ @@ -34,10 +36,10 @@ RUN set -x \ # not as sensitive as before because it now stores a hash of the fragments in the # generated README.rst, so it will only regenerate if the fragments have changed. RUN set -x \ - && python3 -m venv /ocamt \ + && python${PY} -m venv /ocamt \ && /ocamt/bin/pip install --no-cache-dir -U pip wheel RUN set -x \ - && /ocamt/bin/pip install --no-cache-dir -e git+https://github.com/OCA/maintainer-tools@400ffa99242c8b225ab4d34de78721a68b292a61#egg=oca-maintainers-tools \ + && /ocamt/bin/pip install --no-cache-dir -e git+https://github.com/OCA/maintainer-tools@b2b2c72c23f1e2ba072993c331e568862abe5a9e#egg=oca-maintainers-tools \ && ln -s /ocamt/bin/oca-gen-addons-table /usr/local/bin/ \ && ln -s /ocamt/bin/oca-gen-addon-readme /usr/local/bin/ \ && ln -s /ocamt/bin/oca-gen-metapackage /usr/local/bin/ \ @@ -47,7 +49,7 @@ RUN set -x \ # isolate from system python libraries RUN set -x \ - && python3 -m venv /app \ + && python${PY} -m venv /app \ && /app/bin/pip install --no-cache-dir -U pip wheel ENV PATH=/app/bin:$PATH diff --git a/requirements.txt b/requirements.txt index f2683b39..894c0b69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ appdirs==1.4.4 attrs==23.2.0 billiard==4.2.0 celery==5.4.0 -certifi==2024.6.2 +certifi==2024.7.4 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 @@ -21,7 +21,7 @@ gidgethub==5.3.0 github3-py==4.0.1 humanize==4.9.0 idna==3.7 -importlib-metadata==7.2.1 +importlib-metadata==8.0.0 jaraco-classes==3.4.0 jaraco-context==5.3.0 jaraco-functools==4.0.1 @@ -37,7 +37,7 @@ multidict==6.0.5 nh3==0.2.17 odoorpc==0.10.1 packaging==24.1 -pkginfo==1.11.1 +pkginfo==1.10.0 prometheus-client==0.20.0 prompt-toolkit==3.0.47 pycparser==2.22 @@ -45,20 +45,20 @@ pygments==2.18.0 pyjwt==2.8.0 python-dateutil==2.9.0.post0 pytz==2024.1 -raven==6.10.0 readme-renderer==43.0 -redis==5.0.6 +redis==5.0.7 requests==2.32.3 requests-toolbelt==1.0.0 rfc3986==2.0.0 rich==13.7.1 secretstorage==3.3.3 -setuptools==70.1.1 +sentry-sdk==2.7.1 +setuptools==70.2.0 setuptools-odoo==3.3 setuptools-scm==8.1.0 six==1.16.0 tornado==6.4.1 -twine==5.1.0 +twine==5.1.1 tzdata==2024.1 uritemplate==4.1.1 urllib3==2.2.2 diff --git a/setup.py b/setup.py index d21a93db..52e13575 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ # Odoo "odoorpc", # Sentry - "raven", + "sentry-sdk[celery]", # twine to check and upload wheels "twine", # lxml for parsing PyPI index pages diff --git a/src/oca_github_bot/queue.py b/src/oca_github_bot/queue.py index a721e39a..5337901a 100644 --- a/src/oca_github_bot/queue.py +++ b/src/oca_github_bot/queue.py @@ -1,8 +1,6 @@ # Copyright (c) ACSONE SA/NV 2018 # Distributed under the MIT License (http://opensource.org/licenses/MIT). -import logging - import celery from celery.utils.log import get_task_logger @@ -16,15 +14,6 @@ if config.SENTRY_DSN: - from raven import Client - from raven.contrib.celery import register_logger_signal, register_signal - - client = Client(config.SENTRY_DSN) - - # register a custom filter to filter out duplicate logs - register_logger_signal(client, loglevel=logging.WARNING) + import sentry_sdk - # The register_signal function can also take an optional argument - # `ignore_expected` which causes exception classes specified in Task.throws - # to be ignored - register_signal(client, ignore_expected=True) + sentry_sdk.init(dsn=config.SENTRY_DSN)