From bcdcf3e06eddddad20871cc2de9eb8eb413958ce Mon Sep 17 00:00:00 2001 From: Ee Durbin Date: Wed, 26 Aug 2026 10:04:45 -0500 Subject: [PATCH 1/5] add a dependabot config --- .github/dependabot.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..bb22845 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,29 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 7 + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 7 + + - package-ecosystem: "docker-compose" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 7 + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + cooldown: + default-days: 7 From 4c067d4cb0a3ac272d20a6b258c909be0e9e2137 Mon Sep 17 00:00:00 2001 From: Ee Durbin Date: Wed, 26 Aug 2026 10:04:57 -0500 Subject: [PATCH 2/5] upgrade pip-tools --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6ae1ba1..822b46f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -146,7 +146,7 @@ pathspec==0.12.1 # via black pillow==11.1.0 # via django-markdownx -pip-tools==7.4.1 +pip-tools==7.6.1 # via -r requirements.in platformdirs==4.3.7 # via From 70af1d46d9fe2edc1b126d51718fab6d139e3edd Mon Sep 17 00:00:00 2001 From: Ee Durbin Date: Wed, 26 Aug 2026 10:10:42 -0500 Subject: [PATCH 3/5] remove debug tools (memray/pystack) --- requirements.in | 4 ---- requirements.txt | 35 +++++------------------------------ 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/requirements.in b/requirements.in index 6cb9a39..d766060 100644 --- a/requirements.in +++ b/requirements.in @@ -23,7 +23,3 @@ sentry_sdk servestatic stamina uvicorn - -# Debug -memray -pystack diff --git a/requirements.txt b/requirements.txt index 822b46f..1ba25b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # This file is autogenerated by pip-compile with Python 3.13 # by the following command: # -# pip-compile requirements.in +# pip-compile --output-file=requirements.txt requirements.in # anyio==4.9.0 # via httpx @@ -108,29 +108,16 @@ iniconfig==2.1.0 # via pytest isort==6.0.1 # via -r requirements.in -jinja2==3.1.6 - # via memray -linkify-it-py==2.0.3 - # via markdown-it-py markdown==3.7 # via django-markdownx -markdown-it-py[linkify,plugins]==3.0.0 - # via - # mdit-py-plugins - # rich - # textual -markupsafe==3.0.2 - # via jinja2 +markdown-it-py==3.0.0 + # via rich marshmallow==3.26.1 # via environs mccabe==0.7.0 # via flake8 -mdit-py-plugins==0.4.2 - # via markdown-it-py mdurl==0.1.2 # via markdown-it-py -memray==1.17.1 - # via -r requirements.in mypy-extensions==1.0.0 # via black oauthlib==3.2.2 @@ -149,9 +136,7 @@ pillow==11.1.0 pip-tools==7.6.1 # via -r requirements.in platformdirs==4.3.7 - # via - # black - # textual + # via black pluggy==1.5.0 # via pytest psycopg2-binary==2.9.10 @@ -180,8 +165,6 @@ pyproject-hooks==1.2.0 # via # build # pip-tools -pystack==1.4.1 - # via -r requirements.in pytest==8.3.5 # via # -r requirements.in @@ -196,10 +179,7 @@ python-dotenv==1.1.0 requests==2.32.3 # via -r requirements.in rich==13.9.4 - # via - # django-typer - # memray - # textual + # via django-typer sentry-sdk==2.25.1 # via -r requirements.in servestatic==3.0.1 @@ -216,8 +196,6 @@ stamina==25.1.0 # via -r requirements.in tenacity==9.1.2 # via stamina -textual==3.1.1 - # via memray twisted[tls]==24.11.0 # via daphne txaio==23.1.1 @@ -229,11 +207,8 @@ typing-extensions==4.13.0 # dj-database-url # django-stubs-ext # django-tasks - # textual # twisted # typer-slim -uc-micro-py==1.0.3 - # via linkify-it-py uritemplate==4.1.1 # via gidgethub urllib3==2.3.0 From 80cf5b9b20a18918a4a9ea7d7fd59da628eeb358 Mon Sep 17 00:00:00 2001 From: Ee Durbin Date: Wed, 26 Aug 2026 10:24:35 -0500 Subject: [PATCH 4/5] upgrade all dependencies --- clabot/github.py | 50 ------------ clabot/settings.py | 11 ++- clabot/urls.py | 2 +- manage.py | 1 + requirements.in | 2 +- requirements.txt | 190 ++++++++++++++++++++++++--------------------- 6 files changed, 109 insertions(+), 147 deletions(-) delete mode 100644 clabot/github.py diff --git a/clabot/github.py b/clabot/github.py deleted file mode 100644 index 303aa87..0000000 --- a/clabot/github.py +++ /dev/null @@ -1,50 +0,0 @@ -import asyncio -import logging - -from django.conf import settings -from django.http import HttpRequest, JsonResponse -from django_github_app._typing import override -from django_github_app.github import AsyncGitHubAPI as BaseAsyncGitHubAPI -from django_github_app.models import EventLog -from django_github_app.routing import GitHubRouter -from django_github_app.views import AsyncWebhookView as BaseAsyncWebhookView - - -class AsyncGitHubAPI(BaseAsyncGitHubAPI): - @override - async def sleep(self, seconds: float): - await asyncio.sleep(settings.GITHUB_API_SLEEP) - - -_router = GitHubRouter(*GitHubRouter.routers) - - -class AsyncWebhookView(BaseAsyncWebhookView): - github_api_class = AsyncGitHubAPI - - @override - @property - def router(self): - return _router - - @override - async def post(self, request: HttpRequest) -> JsonResponse: - logging.info("Handling GH Post") - event = self.get_event(request) - - found_callbacks = self.router.fetch(event) - logging.info(f"Callbacks found: {', '.join([str(f) for f in found_callbacks])}") - if found_callbacks: - logging.info("Creating EventLog") - event_log = await EventLog.objects.acreate_from_event(event) - logging.info("Dispatching callbacks") - await self.router.adispatch(event, None) - logging.info("Sending Response") - return self.get_response(event_log) - else: - logging.info("Sending shortcut response") - return JsonResponse( - { - "message": "ok", - } - ) diff --git a/clabot/settings.py b/clabot/settings.py index d1dfec0..91b57b2 100644 --- a/clabot/settings.py +++ b/clabot/settings.py @@ -59,7 +59,7 @@ "level": "INFO", "propagate": False, }, - "django_tasks.backends.database.db_worker": { + "django_tasks_db": { "handlers": ["console"], "level": "INFO", "propagate": False, @@ -85,9 +85,9 @@ "django.contrib.staticfiles", # Extensions "django_github_app", - "django_tasks", - "django_tasks.backends.database", + "django_tasks_db", "markdownx", + "servestatic", # Our Apps "clabot", "github_auth", @@ -129,7 +129,7 @@ DATABASES = {"default": env.dj_db_url("DATABASE_URL")} -TASKS = {"default": {"BACKEND": "django_tasks.backends.database.DatabaseBackend"}} +TASKS = {"default": {"BACKEND": "django_tasks_db.DatabaseBackend", "QUEUES": ["default"]}} LANGUAGE_CODE = "en-us" @@ -160,9 +160,8 @@ "NAME": env.str("GITHUB_NAME", default=None), "PRIVATE_KEY": env.str("GITHUB_PRIVATE_KEY", default=None), "WEBHOOK_SECRET": env.str("GITHUB_WEBHOOK_SECRET", default=None), - "WEBHOOK_TYPE": "async", + "LOG_ALL_EVENTS": False, } -GITHUB_API_SLEEP = env.float("GITHUB_API_SLEEP", 1.0) # GitHub oauth GITHUB_OAUTH_APPLICATION_ID = env.str("GITHUB_OAUTH_APPLICATION_ID", default=None) diff --git a/clabot/urls.py b/clabot/urls.py index 0b4974d..dd4b2ad 100644 --- a/clabot/urls.py +++ b/clabot/urls.py @@ -1,8 +1,8 @@ from django.contrib import admin from django.urls import include, path +from django_github_app.views import AsyncWebhookView from clabot import views -from clabot.github import AsyncWebhookView urlpatterns = [ path("admin/", admin.site.urls), diff --git a/manage.py b/manage.py index 345ca27..877b4d0 100755 --- a/manage.py +++ b/manage.py @@ -1,5 +1,6 @@ #!/usr/bin/env python """Django's command-line utility for administrative tasks.""" + import os import sys diff --git a/requirements.in b/requirements.in index d766060..a71a192 100644 --- a/requirements.in +++ b/requirements.in @@ -13,7 +13,7 @@ dj-database-url django django-github-app django-markdownx -django-tasks +django-tasks-db environs gunicorn oauthlib diff --git a/requirements.txt b/requirements.txt index 1ba25b5..8d68cb3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,59 +4,65 @@ # # pip-compile --output-file=requirements.txt requirements.in # -anyio==4.9.0 +annotated-doc==0.0.5 + # via typer +anyio==4.14.2 # via httpx -asgiref==3.8.1 +asgiref==3.12.1 # via # daphne # django # servestatic -attrs==25.3.0 +attrs==26.1.0 # via # service-identity # twisted -autobahn==24.4.2 +autobahn==26.7.1 # via daphne -automat==24.8.1 +automat==25.4.16 # via twisted -black==25.1.0 +black==26.5.1 # via -r requirements.in -build==1.2.2.post1 +build==1.5.0 # via pip-tools -cachetools==5.5.2 +cachetools==7.1.7 # via django-github-app -certifi==2025.1.31 +cbor2==6.1.4 + # via autobahn +certifi==2026.7.22 # via # httpcore # httpx # requests # sentry-sdk -cffi==1.17.1 - # via cryptography -charset-normalizer==3.4.1 +cffi==2.1.1 + # via + # autobahn + # cryptography +charset-normalizer==3.5.1 # via requests -click==8.1.8 +click==8.4.2 # via # black # django-typer # pip-tools - # typer-slim + # typer # uvicorn constantly==23.10.4 # via twisted -coverage[toml]==7.8.0 +coverage[toml]==7.15.4 # via pytest-cov -cryptography==44.0.2 +cryptography==50.0.1 # via # autobahn # pyjwt # pyopenssl # service-identity -daphne==4.1.2 +daphne==4.2.3 # via -r requirements.in -dj-database-url==2.3.0 +dj-database-url==3.1.2 # via -r requirements.in -django==5.2 +django==6.1 # via # -r requirements.in # dj-database-url @@ -64,30 +70,35 @@ django==5.2 # django-markdownx # django-stubs-ext # django-tasks + # django-tasks-db # django-typer -django-github-app==0.5.0 +django-github-app==0.11.0 # via -r requirements.in -django-markdownx==4.0.7 +django-markdownx==4.0.11 # via -r requirements.in -django-stubs-ext==5.1.3 - # via django-tasks -django-tasks==0.6.1 +django-stubs-ext==6.1.0 + # via + # django-tasks + # django-tasks-db +django-tasks==0.12.0 + # via django-tasks-db +django-tasks-db==0.12.0 # via -r requirements.in -django-typer[rich]==3.1.0 +django-typer[rich]==3.8.0 # via django-github-app -environs==14.1.1 +environs==15.1.0 # via -r requirements.in -flake8==7.2.0 +flake8==7.3.0 # via -r requirements.in -gidgethub==5.3.0 +gidgethub==5.4.0 # via django-github-app -gunicorn==23.0.0 +gunicorn==26.2.0 # via -r requirements.in -h11==0.14.0 +h11==0.16.0 # via # httpcore # uvicorn -httpcore==1.0.7 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via django-github-app @@ -95,131 +106,132 @@ hyperlink==21.0.0 # via # autobahn # twisted -idna==3.10 +idna==3.19 # via # anyio # httpx # hyperlink # requests # twisted -incremental==24.7.2 +incremental==24.11.0 # via twisted -iniconfig==2.1.0 +iniconfig==2.3.0 # via pytest -isort==6.0.1 +isort==8.0.1 # via -r requirements.in -markdown==3.7 +markdown==3.10.3 # via django-markdownx -markdown-it-py==3.0.0 +markdown-it-py==4.2.0 # via rich -marshmallow==3.26.1 +marshmallow==4.3.1 # via environs mccabe==0.7.0 # via flake8 mdurl==0.1.2 # via markdown-it-py -mypy-extensions==1.0.0 +msgpack==1.2.1 + # via autobahn +mypy-extensions==1.1.0 # via black -oauthlib==3.2.2 +oauthlib==3.3.1 # via -r requirements.in -packaging==24.2 +packaging==26.3 # via # black # build - # gunicorn - # marshmallow + # incremental # pytest -pathspec==0.12.1 + # wheel +pathspec==1.1.1 # via black -pillow==11.1.0 +pillow==12.3.0 # via django-markdownx pip-tools==7.6.1 # via -r requirements.in -platformdirs==4.3.7 +platformdirs==4.11.4 # via black -pluggy==1.5.0 - # via pytest -psycopg2-binary==2.9.10 - # via -r requirements.in -pyasn1==0.6.1 +pluggy==1.6.0 # via - # pyasn1-modules - # service-identity -pyasn1-modules==0.4.2 - # via service-identity -pycodestyle==2.13.0 + # pytest + # pytest-cov +psycopg2-binary==2.9.12 + # via -r requirements.in +pycodestyle==2.14.0 # via flake8 -pycparser==2.22 +pycparser==3.0 # via cffi -pyflakes==3.3.2 +pyflakes==3.4.0 # via flake8 -pygments==2.19.1 - # via rich -pyjwt[crypto]==2.10.1 +pygments==2.21.0 + # via + # pytest + # rich +pyjwt[crypto]==2.13.0 # via # gidgethub # pyjwt -pyopenssl==25.0.0 +pyopenssl==26.4.0 # via twisted pyproject-hooks==1.2.0 # via # build # pip-tools -pytest==8.3.5 +pytest==9.1.1 # via # -r requirements.in # pytest-cov # pytest-django -pytest-cov==6.1.1 +pytest-cov==7.1.0 # via -r requirements.in -pytest-django==4.11.1 +pytest-django==4.14.0 # via -r requirements.in -python-dotenv==1.1.0 +python-dotenv==1.2.3 # via environs -requests==2.32.3 +pytokens==0.4.1 + # via black +requests==2.34.2 # via -r requirements.in -rich==13.9.4 - # via django-typer -sentry-sdk==2.25.1 +rich==15.0.0 + # via typer +sentry-sdk==2.68.1 # via -r requirements.in -servestatic==3.0.1 +servestatic==4.3.1 # via -r requirements.in -service-identity==24.2.0 +service-identity==26.1.0 # via twisted shellingham==1.5.4 - # via django-typer -sniffio==1.3.1 - # via anyio -sqlparse==0.5.3 + # via typer +sqlparse==0.6.0 # via django -stamina==25.1.0 +stamina==26.1.0 # via -r requirements.in -tenacity==9.1.2 +tenacity==9.1.4 # via stamina -twisted[tls]==24.11.0 +twisted[tls]==26.4.0 # via daphne -txaio==23.1.1 +txaio==26.6.1 # via autobahn -typer-slim==0.15.2 +typer==0.25.1 # via django-typer -typing-extensions==4.13.0 +typing-extensions==4.16.0 # via - # dj-database-url # django-stubs-ext # django-tasks + # django-tasks-db # twisted - # typer-slim -uritemplate==4.1.1 +ujson==5.13.0 + # via autobahn +uritemplate==4.2.0 # via gidgethub -urllib3==2.3.0 +urllib3==2.7.0 # via # requests # sentry-sdk -uvicorn==0.34.0 +uvicorn==0.52.4 # via -r requirements.in -wheel==0.45.1 +wheel==0.48.0 # via pip-tools -zope-interface==7.2 +zope-interface==8.6 # via twisted # The following packages are considered to be unsafe in a requirements file: From ab16135880ee693dc913bc9f99466edd0a072259 Mon Sep 17 00:00:00 2001 From: Ee Durbin Date: Wed, 26 Aug 2026 10:40:38 -0500 Subject: [PATCH 5/5] bump python 3.13->3.14.7 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f94ad7..de2d294 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13 +FROM python:3.14.7 RUN apt install bash