This commit is contained in:
2025-11-10 08:00:12 +00:00
parent df1acadb1f
commit c6e77cac66
3 changed files with 14 additions and 21 deletions
+2 -5
View File
@@ -11,12 +11,9 @@ from ._loader import ffi
__all__ = ["new_aligned_struct", "aligned_address", "Buffer", "nonce_increment", "wipe"]
try:
from collections.abc import Buffer as _Buffer # type: ignore[misc]
class Buffer(_Buffer, Protocol): # type: ignore[misc]
pass
from collections.abc import Buffer # type: ignore
except ImportError:
# Fallback for Python < 3.12
class Buffer(Protocol):
def __buffer__(self, flags: int) -> memoryview: ...