From 224da029d51c2d14111f7280935e1ab649f5b0da Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 7 Oct 2025 12:28:47 -0500 Subject: [PATCH] MOTOR-1477 Add workaround for missing compression.zstd (#353) --- test/asyncio_tests/test_aiohttp_gridfs.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/asyncio_tests/test_aiohttp_gridfs.py b/test/asyncio_tests/test_aiohttp_gridfs.py index 2fcc21d7..b7df59b5 100644 --- a/test/asyncio_tests/test_aiohttp_gridfs.py +++ b/test/asyncio_tests/test_aiohttp_gridfs.py @@ -18,10 +18,22 @@ import asyncio import datetime import email import logging +import sys import test import time from test.asyncio_tests import AsyncIOTestCase, asyncio_test +import pytest + +# MOTOR-1477 - after libzstd is supported on build hosts +# we can remove this guard. +if sys.version_info >= (3, 14): + try: + import compression.zstd # noqa: F401 + except ModuleNotFoundError: + pytest.skip(allow_module_level=True) + + import aiohttp import aiohttp.web import gridfs