From 9d6ef338f232d7c2b37080bfa6b1ac09315f9996 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:51:33 +0100 Subject: [PATCH 1/6] ci(deps): bump crowdin/github-action from 2.5.1 to 2.5.2 in the patch-version-bumps group (#2701) ci(deps): bump crowdin/github-action in the patch-version-bumps group Bumps the patch-version-bumps group with 1 update: [crowdin/github-action](https://github.com/crowdin/github-action). Updates `crowdin/github-action` from 2.5.1 to 2.5.2 - [Release notes](https://github.com/crowdin/github-action/releases) - [Commits](https://github.com/crowdin/github-action/compare/v2.5.1...v2.5.2) --- updated-dependencies: - dependency-name: crowdin/github-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patch-version-bumps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docs-localization-download.yml | 2 +- .github/workflows/docs-localization-upload.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-localization-download.yml b/.github/workflows/docs-localization-download.yml index 56df23c833..e815d100a1 100644 --- a/.github/workflows/docs-localization-download.yml +++ b/.github/workflows/docs-localization-download.yml @@ -40,7 +40,7 @@ jobs: working-directory: ./docs - name: "Crowdin" id: crowdin - uses: crowdin/github-action@v2.5.1 + uses: crowdin/github-action@v2.5.2 with: upload_sources: false upload_translations: false diff --git a/.github/workflows/docs-localization-upload.yml b/.github/workflows/docs-localization-upload.yml index 9b62a2ec83..32803d8d4c 100644 --- a/.github/workflows/docs-localization-upload.yml +++ b/.github/workflows/docs-localization-upload.yml @@ -44,7 +44,7 @@ jobs: sphinx-intl update -p ./build/locales ${{ vars.SPHINX_LANGUAGES }} working-directory: ./docs - name: "Crowdin" - uses: crowdin/github-action@v2.5.1 + uses: crowdin/github-action@v2.5.2 with: upload_sources: true upload_translations: false From f51e8829884950acc80a8b702c554b3024071d61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:57:57 +0100 Subject: [PATCH 2/6] chore(deps-dev): bump codespell from 2.3.0 to 2.4.0 in the minor-version-bumps group (#2697) chore(deps-dev): bump codespell in the minor-version-bumps group Bumps the minor-version-bumps group with 1 update: [codespell](https://github.com/codespell-project/codespell). Updates `codespell` from 2.3.0 to 2.4.0 - [Release notes](https://github.com/codespell-project/codespell/releases) - [Commits](https://github.com/codespell-project/codespell/compare/v2.3.0...v2.4.0) --- updated-dependencies: - dependency-name: codespell dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-version-bumps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index c4c2dd56b3..6f6c6f9018 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -6,6 +6,6 @@ pytest-asyncio~=0.23.8 mypy~=1.14.1 coverage~=7.6 pre-commit==4.1.0 -codespell==2.3.0 +codespell==2.4.0 bandit==1.8.2 flake8==7.1.1 From afba897dd221b33c14de612b9a06bff6fca0b984 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Mon, 27 Jan 2025 11:12:29 +0100 Subject: [PATCH 3/6] fix(docs): Fix linkcheck, ignore old changelogs and migrating Signed-off-by: Lala Sabathil --- docs/conf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index e0bdfa834a..6bb6a03b45 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -487,6 +487,12 @@ def write_new(): r"https://packages.debian.org/.*", ] +linkcheck_exclude_documents = [ + r"migrating_to_v1.rst", + r"migrating_to_v2.rst", + r"old_changelog.rst" +] + linkcheck_anchors_ignore_for_url = [r"https://github.com/Delitefully/DiscordLists"] modindex_common_prefix = ["discord."] From 74f7e74ce1c3bff46d43045848d7368403ac43ba Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Mon, 27 Jan 2025 11:21:37 +0100 Subject: [PATCH 4/6] fix(docs): you shall be damned sphinx Signed-off-by: Lala Sabathil --- docs/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6bb6a03b45..d709f6338e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -488,9 +488,9 @@ def write_new(): ] linkcheck_exclude_documents = [ - r"migrating_to_v1.rst", - r"migrating_to_v2.rst", - r"old_changelog.rst" + r"*migrating_to_v1*", + r"*migrating_to_v2*", + r"*old_changelog*" ] linkcheck_anchors_ignore_for_url = [r"https://github.com/Delitefully/DiscordLists"] From ad2ccade30f5c7fd2e503fa9520fff087307550d Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Mon, 27 Jan 2025 11:26:15 +0100 Subject: [PATCH 5/6] fix(docs): I'm going back to sleep Signed-off-by: Lala Sabathil --- docs/conf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index d709f6338e..63e72488fc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -488,9 +488,12 @@ def write_new(): ] linkcheck_exclude_documents = [ - r"*migrating_to_v1*", - r"*migrating_to_v2*", - r"*old_changelog*" + r".*/migrating_to_v1.*", + r".*/migrating_to_v2.*", + r".*/old_changelog.*", + r"migrating_to_v1.*", + r"migrating_to_v2.*", + r"old_changelog.*" ] linkcheck_anchors_ignore_for_url = [r"https://github.com/Delitefully/DiscordLists"] From dbd9f1bcc75524d757cce45fbc43009e53aed251 Mon Sep 17 00:00:00 2001 From: DaBlumer <30708312+DaBlumer@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:11:38 +0100 Subject: [PATCH 6/6] fix: reset exponential backoff after task runs successfully in tasks extension (#2700) * [tasks] reset exponential backoff after task runs successfully The current behaviour of the _loop method (when the reconnect attribute is set to True) is to have the same ExponentialBackoff instance for all of its lifetime. A task that has failed n times over its life-time will thus wait 2**n seconds before retrying, no matter how many successful instances of happened between the failures. With this commit, the behaviour is to reset the exponential backoff after a succesful execution of the task, so that the backoff only takes place after successive failures. * Update CHANGELOG.md Signed-off-by: DaBlumer <30708312+DaBlumer@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: DaBlumer <30708312+DaBlumer@users.noreply.github.com> --------- Signed-off-by: DaBlumer <30708312+DaBlumer@users.noreply.github.com> Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> --- CHANGELOG.md | 2 ++ discord/ext/tasks/__init__.py | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f213fbcfc2..78d6fac416 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,8 @@ These changes are available on the `master` branch, but have not yet been releas - Fixed attachment metadata being set incorrectly in interaction responses causing the metadata to be ignored by Discord. ([#2679](https://github.com/Pycord-Development/pycord/pull/2679)) +- Fixed unexpected backoff behavior in the handling of task failures + ([#2700](https://github.com/Pycord-Development/pycord/pull/2700)). ### Changed diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 638bd831c6..af34cc6844 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -168,6 +168,7 @@ async def _loop(self, *args: Any, **kwargs: Any) -> None: try: await self.coro(*args, **kwargs) self._last_iteration_failed = False + backoff = ExponentialBackoff() except self._valid_exception: self._last_iteration_failed = True if not self.reconnect: