This commit is contained in:
Leo Vasanko
2025-11-09 20:00:12 -06:00
parent f84ef727d3
commit f5430a6ad4
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: ...