Skip to content

Commit 0bb9cab

Browse files
authored
Drop support for Python 3.7 (#452)
* Drop Python 3.7 support Signed-off-by: Brad Keryan <[email protected]> * Update poetry.lock * tests: Drop Python 3.7 * tests: Update call to pykka.get_all() The timeout argument is now keyword-only. jodal/pykka@f4617a0 * codegen: Update pyi stubs * README.rst: Update minimum Python version * Update CHANGELOG.md * pyproject.toml: Remove Python 3.7 trove classifier --------- Signed-off-by: Brad Keryan <[email protected]>
1 parent a78be0c commit 0bb9cab

File tree

9 files changed

+3247
-1793
lines changed

9 files changed

+3247
-1793
lines changed

.github/workflows/run_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest, windows-latest]
14-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1515
# Fail-fast skews the pass/fail ratio and seems to make pytest produce
1616
# incomplete JUnit XML results.
1717
fail-fast: false

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
2727
`nidaqmx.errors.DaqFunctionNotSupportedError` are now public exceptions.
2828
* Consistently return `nidaqmx.errors.DaqNotFoundError` on all platforms when the NI-DAQmx
2929
driver is not installed.
30+
* Updated supported Python versions to 3.8, 3.9, 3.10, and 3.11
3031
* ### Known Issues
3132
* ...
3233

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ driver is supported. Refer to
2727
for which versions of the driver support your hardware on a given operating
2828
system.
2929

30-
**nidaqmx** supports CPython 3.7+ and PyPy3.
30+
**nidaqmx** supports CPython 3.8+ and PyPy3.
3131

3232
Installation
3333
============

generated/nidaqmx/_stubs/nidaqmx_pb2_grpc.pyi

Lines changed: 2366 additions & 786 deletions
Large diffs are not rendered by default.

generated/nidaqmx/_stubs/session_pb2_grpc.pyi

Lines changed: 52 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,22 @@
33
isort:skip_file
44
"""
55
import abc
6+
import collections.abc
67
import grpc
8+
import grpc.aio
79
from nidaqmx._stubs import session_pb2
10+
import typing
11+
12+
_T = typing.TypeVar('_T')
13+
14+
class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
15+
...
16+
17+
class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore
18+
...
819

920
class SessionUtilitiesStub:
10-
def __init__(self, channel: grpc.Channel) -> None: ...
21+
def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
1122
EnumerateDevices: grpc.UnaryUnaryMultiCallable[
1223
session_pb2.EnumerateDevicesRequest,
1324
session_pb2.EnumerateDevicesResponse,
@@ -36,43 +47,72 @@ class SessionUtilitiesStub:
3647
]
3748
"""Resets the server to a default state with no open sessions"""
3849

50+
class SessionUtilitiesAsyncStub:
51+
EnumerateDevices: grpc.aio.UnaryUnaryMultiCallable[
52+
session_pb2.EnumerateDevicesRequest,
53+
session_pb2.EnumerateDevicesResponse,
54+
]
55+
"""Provides a list of devices or chassis connected to server under localhost"""
56+
Reserve: grpc.aio.UnaryUnaryMultiCallable[
57+
session_pb2.ReserveRequest,
58+
session_pb2.ReserveResponse,
59+
]
60+
"""Reserve a set of client defined resources for exclusive use"""
61+
IsReservedByClient: grpc.aio.UnaryUnaryMultiCallable[
62+
session_pb2.IsReservedByClientRequest,
63+
session_pb2.IsReservedByClientResponse,
64+
]
65+
"""Determines if a set of client defined resources is currently reserved by a
66+
specific client
67+
"""
68+
Unreserve: grpc.aio.UnaryUnaryMultiCallable[
69+
session_pb2.UnreserveRequest,
70+
session_pb2.UnreserveResponse,
71+
]
72+
"""Unreserves a previously reserved resource"""
73+
ResetServer: grpc.aio.UnaryUnaryMultiCallable[
74+
session_pb2.ResetServerRequest,
75+
session_pb2.ResetServerResponse,
76+
]
77+
"""Resets the server to a default state with no open sessions"""
78+
3979
class SessionUtilitiesServicer(metaclass=abc.ABCMeta):
4080
@abc.abstractmethod
4181
def EnumerateDevices(
4282
self,
4383
request: session_pb2.EnumerateDevicesRequest,
44-
context: grpc.ServicerContext,
45-
) -> session_pb2.EnumerateDevicesResponse:
84+
context: _ServicerContext,
85+
) -> typing.Union[session_pb2.EnumerateDevicesResponse, collections.abc.Awaitable[session_pb2.EnumerateDevicesResponse]]:
4686
"""Provides a list of devices or chassis connected to server under localhost"""
4787
@abc.abstractmethod
4888
def Reserve(
4989
self,
5090
request: session_pb2.ReserveRequest,
51-
context: grpc.ServicerContext,
52-
) -> session_pb2.ReserveResponse:
91+
context: _ServicerContext,
92+
) -> typing.Union[session_pb2.ReserveResponse, collections.abc.Awaitable[session_pb2.ReserveResponse]]:
5393
"""Reserve a set of client defined resources for exclusive use"""
5494
@abc.abstractmethod
5595
def IsReservedByClient(
5696
self,
5797
request: session_pb2.IsReservedByClientRequest,
58-
context: grpc.ServicerContext,
59-
) -> session_pb2.IsReservedByClientResponse:
98+
context: _ServicerContext,
99+
) -> typing.Union[session_pb2.IsReservedByClientResponse, collections.abc.Awaitable[session_pb2.IsReservedByClientResponse]]:
60100
"""Determines if a set of client defined resources is currently reserved by a
61101
specific client
62102
"""
63103
@abc.abstractmethod
64104
def Unreserve(
65105
self,
66106
request: session_pb2.UnreserveRequest,
67-
context: grpc.ServicerContext,
68-
) -> session_pb2.UnreserveResponse:
107+
context: _ServicerContext,
108+
) -> typing.Union[session_pb2.UnreserveResponse, collections.abc.Awaitable[session_pb2.UnreserveResponse]]:
69109
"""Unreserves a previously reserved resource"""
70110
@abc.abstractmethod
71111
def ResetServer(
72112
self,
73113
request: session_pb2.ResetServerRequest,
74-
context: grpc.ServicerContext,
75-
) -> session_pb2.ResetServerResponse:
114+
context: _ServicerContext,
115+
) -> typing.Union[session_pb2.ResetServerResponse, collections.abc.Awaitable[session_pb2.ResetServerResponse]]:
76116
"""Resets the server to a default state with no open sessions"""
77117

78-
def add_SessionUtilitiesServicer_to_server(servicer: SessionUtilitiesServicer, server: grpc.Server) -> None: ...
118+
def add_SessionUtilitiesServicer_to_server(servicer: SessionUtilitiesServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...

0 commit comments

Comments
 (0)