Coverage for cuda/core/_utils/pycompat.py: 0.00%

5 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-16 01:23 +0000

1# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 

2# 

3# SPDX-License-Identifier: Apache-2.0 

4 

5""" 

6Compatibility shims for differences between supported Python versions. 

7""" 

8 

9import sys 

10 

11__all__ = ["BufferProtocol"] 

12 

13 

14if sys.version_info >= (3, 12): 

15 from collections.abc import Buffer as BufferProtocol 

16else: 

17 BufferProtocol = object