From 2bee53f286ee6ade5cbd09aecfa89ad5471d1ddd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 03:17:57 +0000 Subject: [PATCH 1/3] build(deps-dev): bump django-stubs in the stub-packages group Bumps the stub-packages group with 1 update: [django-stubs](https://github.com/typeddjango/django-stubs). Updates `django-stubs` from 5.0.0 to 5.1.0 - [Release notes](https://github.com/typeddjango/django-stubs/releases) - [Commits](https://github.com/typeddjango/django-stubs/compare/5.0.0...5.1.0) --- updated-dependencies: - dependency-name: django-stubs dependency-type: direct:development update-type: version-update:semver-minor dependency-group: stub-packages ... Signed-off-by: dependabot[bot] --- poetry.lock | 21 +++++++++++---------- pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1e972477..50922854 100644 --- a/poetry.lock +++ b/poetry.lock @@ -809,35 +809,36 @@ sftp = ["paramiko (>=1.15)"] [[package]] name = "django-stubs" -version = "5.0.0" +version = "5.1.0" description = "Mypy stubs for Django" optional = false python-versions = ">=3.8" files = [ - {file = "django_stubs-5.0.0-py3-none-any.whl", hash = "sha256:084484cbe16a6d388e80ec687e46f529d67a232f3befaf55c936b3b476be289d"}, - {file = "django_stubs-5.0.0.tar.gz", hash = "sha256:b8a792bee526d6cab31e197cb414ee7fa218abd931a50948c66a80b3a2548621"}, + {file = "django_stubs-5.1.0-py3-none-any.whl", hash = "sha256:b98d49a80aa4adf1433a97407102d068de26c739c405431d93faad96dd282c40"}, + {file = "django_stubs-5.1.0.tar.gz", hash = "sha256:86128c228b65e6c9a85e5dc56eb1c6f41125917dae0e21e6cfecdf1b27e630c5"}, ] [package.dependencies] asgiref = "*" django = "*" -django-stubs-ext = ">=5.0.0" +django-stubs-ext = ">=5.1.0" types-PyYAML = "*" -typing-extensions = "*" +typing-extensions = ">=4.11.0" [package.extras] -compatible-mypy = ["mypy (>=1.10.0,<1.11.0)"] +compatible-mypy = ["mypy (>=1.11.0,<1.12.0)"] +oracle = ["oracledb"] redis = ["redis"] [[package]] name = "django-stubs-ext" -version = "5.0.0" +version = "5.1.0" description = "Monkey-patching and extensions for django-stubs" optional = false python-versions = ">=3.8" files = [ - {file = "django_stubs_ext-5.0.0-py3-none-any.whl", hash = "sha256:8e1334fdf0c8bff87e25d593b33d4247487338aaed943037826244ff788b56a8"}, - {file = "django_stubs_ext-5.0.0.tar.gz", hash = "sha256:5bacfbb498a206d5938454222b843d81da79ea8b6fcd1a59003f529e775bc115"}, + {file = "django_stubs_ext-5.1.0-py3-none-any.whl", hash = "sha256:a455fc222c90b30b29ad8c53319559f5b54a99b4197205ddbb385aede03b395d"}, + {file = "django_stubs_ext-5.1.0.tar.gz", hash = "sha256:ed7d51c0b731651879fc75f331fb0806d98b67bfab464e96e2724db6b46ef926"}, ] [package.dependencies] @@ -2260,4 +2261,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "e57df7375dbe44fb36bc02dead35e3c3b8b10a43ddac849315495294f55a1a20" +content-hash = "de38f628b4bcf6a5e914f4828aaf450928842fb69caf0c974aa53c16156b67a7" diff --git a/pyproject.toml b/pyproject.toml index d5ff1703..52d0394b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ pylint = "^2.16.1" wheel = "^0.44.0" pre-commit = "^3.8.0" flynt = "^0.77" -django-stubs = "^5.0.0" +django-stubs = "^5.1.0" types-requests = "^2.32.0.20240523" types-redis = "^4.6.0.2" ipython = "^8.27.0" From ebf2691b5589fa9d9d884feb7a2abd88fa53c8e1 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Wed, 2 Oct 2024 00:24:52 -0400 Subject: [PATCH 2/3] feat(pre-commit): Updates django-stubs to match pyproject.toml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3911719..a2a3e2e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: django-hcaptcha==0.2.0, django-htmx==1.17.3, django-rq==2.10.2, - django-stubs==5.0.0, + django-stubs==5.1.0, "django-tailwind[reload]==3.8.0", "Mastodon.py[cryptography]==1.8.0", pillow==10.3.0, From d6a81eb26d9f991ee5cca0fd03a53e1726dc8ea5 Mon Sep 17 00:00:00 2001 From: Eduardo Rosendo Date: Wed, 2 Oct 2024 00:28:56 -0400 Subject: [PATCH 3/3] feat(users): Tweaks password_change view to address mypy errors --- bc/users/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bc/users/views.py b/bc/users/views.py index 80cbc244..2c772933 100644 --- a/bc/users/views.py +++ b/bc/users/views.py @@ -312,7 +312,7 @@ def password_change(request: AuthenticatedHttpRequest) -> HttpResponse: form.save() msg = message_dict["pwd_changed_successfully"] messages.add_message(request, msg["level"], msg["message"]) - update_session_auth_hash(request, form.user) + update_session_auth_hash(request, request.user) return HttpResponseRedirect(reverse("password_change")) else: form = PasswordChangeForm(user=request.user)