Fix tests on 3.8 and 3.7, hopefully

pull/419/head
halcy 2025-08-16 17:05:30 +03:00
rodzic abc25a0f3e
commit 95e64ddfec
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ import datetime
import copy
import warnings
from mastodon.errors import MastodonAPIError, MastodonIllegalArgumentError, MastodonNotFoundError
from mastodon.errors import MastodonAPIError, MastodonIllegalArgumentError, MastodonNotFoundError, MastodonVersionError
from mastodon.compat import IMPL_HAS_BLURHASH, blurhash
from mastodon.internals import Mastodon as Internals
@ -52,6 +52,8 @@ class Mastodon(Internals):
found_api_version = True
except MastodonNotFoundError:
pass
except MastodonVersionError:
pass
self.__version_check_tried = True
if not found_api_version and self.verify_minimum_version("4.3.0", cached=True):
warnings.warn("Mastodon version is detected as >= 4.3.0, but no API version found. Please report this.")