diff --git a/CHANGELOG.md b/CHANGELOG.md index 11064e709b..4444d79d1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -190,6 +190,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2113](https://github.com/Pycord-Development/pycord/issues/2113)) - Fixed `Option` not working on bridge commands because `ext.commands.Command` doesn't recognize them. ([#2256](https://github.com/Pycord-Development/pycord/pull/2256)) +- Fixed offset-aware tasks causing `TypeError` when being prepared. + ([#2271](https://github.com/Pycord-Development/pycord/pull/2271)) - Fixed `AttributeError` when serializing commands with `Annotated` type hints. ([#2243](https://github.com/Pycord-Development/pycord/pull/2243)) diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 81d39ab8d1..638bd831c6 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -619,9 +619,9 @@ def _prepare_time_index(self, now: datetime.datetime = MISSING) -> None: now if now is not MISSING else datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0) - ).timetz() + ) for idx, time in enumerate(self._time): - if time >= time_now: + if time >= time_now.astimezone(time.tzinfo).timetz(): self._time_index = idx break else: diff --git a/requirements/dev.txt b/requirements/dev.txt index 525873d774..f77e9309c2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,5 +1,5 @@ -r _.txt -pylint~=2.17.5 +pylint~=3.0.2 pytest~=7.4.3 pytest-asyncio~=0.21.1 # pytest-order~=1.0.1