From 781058fd8eb8048ad490b34ee422013d5c834649 Mon Sep 17 00:00:00 2001 From: Peter Thomassen Date: Wed, 8 Jan 2025 16:59:19 +0100 Subject: [PATCH 1/4] fix(api): patch httpretty to work with urllib3 2.3.0 --- api/desecapi/tests/base.py | 15 +++++++++++++++ api/requirements.txt | 1 + 2 files changed, 16 insertions(+) diff --git a/api/desecapi/tests/base.py b/api/desecapi/tests/base.py index b0d3c1994..f462d6f69 100644 --- a/api/desecapi/tests/base.py +++ b/api/desecapi/tests/base.py @@ -3,9 +3,11 @@ import random import re import string +import urllib3 from contextlib import nullcontext from functools import partial, reduce from json import JSONDecodeError +from packaging.version import Version from unittest import mock from django.conf import settings @@ -27,6 +29,19 @@ ) +# patch httpretty against urllib3>=2.3.0 (https://github.com/gabrielfalcao/HTTPretty/issues/484) +# inspired by https://github.com/PyGithub/PyGithub/pull/3102/commits/10a7135a04f71e6101f8b013aded8a662d08fd1f +if Version(urllib3.__version__) >= Version("2.3.0"): + hr_core.fakesock.socket.__getattr__ = lambda self, name: ( + None + if ( + name == "shutdown" + and not (hr_core.httpretty.allow_net_connect or self.truesock) + ) + else hr_core.fakesock.socket.__getattr__(self, name) + ) + + class DesecAPIClient(APIClient): @staticmethod def _http_header_base64_conversion(content): diff --git a/api/requirements.txt b/api/requirements.txt index 0f362327b..f98c7e70b 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -11,6 +11,7 @@ django-pgtrigger~=4.13.3 django-prometheus~=2.3.1 dnspython~=2.7.0 httpretty~=1.0.5 # 1.1 breaks tests. Does not run in production, so stick to it. +packaging~=24.2 # for patching httpretty depending on urllib3 version pyotp~=2.9.0 psycopg~=3.2.3 psl-dns~=1.1.1 From 7d81bbff70de6612024eefb8caeed7b16815f24d Mon Sep 17 00:00:00 2001 From: Peter Thomassen Date: Wed, 8 Jan 2025 17:11:17 +0100 Subject: [PATCH 2/4] fix(api): typo in activate-account-with-override-token email template --- .../emails/activate-account-with-override-token/content.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/desecapi/templates/emails/activate-account-with-override-token/content.txt b/api/desecapi/templates/emails/activate-account-with-override-token/content.txt index 000032de2..ed73d22fa 100644 --- a/api/desecapi/templates/emails/activate-account-with-override-token/content.txt +++ b/api/desecapi/templates/emails/activate-account-with-override-token/content.txt @@ -5,7 +5,7 @@ By confirming, you will grant {{ action_serializer.instance.token.owner.email }} (the "authorized party") permission to manage your DNS. -This permission is limited to domains that the authorized will create in your account. They will have permission to both modify and delete the domains created by them. If you create additional domains in your account by hand, they will not be visible to the authorized party. +This permission is limited to domains that the authorized party will create in your account. They will have permission to both modify and delete the domains created by them. If you create additional domains in your account by hand, they will not be visible to the authorized party. If you ever would like to revoke this authorization, you can remove it in the "Token Management" section of our web interface. Authorization can also be withdrawn by the authorized party itself. From 56872396330161c720baee4a9bf65bba1172895e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 04:06:49 +0000 Subject: [PATCH 3/4] chore(deps-dev): bump unplugin-vue-components Bumps the npm-webapp group in /www/webapp with 1 update: [unplugin-vue-components](https://github.com/unplugin/unplugin-vue-components). Updates `unplugin-vue-components` from 0.27.5 to 0.28.0 - [Release notes](https://github.com/unplugin/unplugin-vue-components/releases) - [Commits](https://github.com/unplugin/unplugin-vue-components/compare/v0.27.5...v0.28.0) --- updated-dependencies: - dependency-name: unplugin-vue-components dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-webapp ... Signed-off-by: dependabot[bot] --- www/webapp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/webapp/package.json b/www/webapp/package.json index 1c5e2e26d..1739b339a 100644 --- a/www/webapp/package.json +++ b/www/webapp/package.json @@ -34,7 +34,7 @@ "eslint-plugin-vue-scoped-css": "^2.6.1", "eslint-plugin-vuetify": "^1.1.0", "sass": "~1.32.13", - "unplugin-vue-components": "^0.27.0", + "unplugin-vue-components": "^0.28.0", "vite": "^5.0.10", "vuetify-loader": "~1.9.1" } From ba486a033f30eae55db8e1062e1dfa3394db3a59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 04:37:15 +0000 Subject: [PATCH 4/4] chore(deps): update coverage requirement in /api Updates the requirements on [coverage](https://github.com/nedbat/coveragepy) to permit the latest version. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.6.9...7.6.10) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- api/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/requirements.txt b/api/requirements.txt index f98c7e70b..9c3fc4b7b 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,6 +1,6 @@ captcha~=0.6.0 celery~=5.4.0 -coverage~=7.6.9 +coverage~=7.6.10 cryptography~=44.0.0 Django~=5.1.4 django-cors-headers~=4.6.0