Skip to content

Commit

Permalink
Drop support for Python 3.7 (#452)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
bkeryan authored Oct 5, 2023
1 parent a78be0c commit 0bb9cab
Show file tree
Hide file tree
Showing 9 changed files with 3,247 additions and 1,793 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
# Fail-fast skews the pass/fail ratio and seems to make pytest produce
# incomplete JUnit XML results.
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
`nidaqmx.errors.DaqFunctionNotSupportedError` are now public exceptions.
* Consistently return `nidaqmx.errors.DaqNotFoundError` on all platforms when the NI-DAQmx
driver is not installed.
* Updated supported Python versions to 3.8, 3.9, 3.10, and 3.11
* ### Known Issues
* ...

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ driver is supported. Refer to
for which versions of the driver support your hardware on a given operating
system.

**nidaqmx** supports CPython 3.7+ and PyPy3.
**nidaqmx** supports CPython 3.8+ and PyPy3.

Installation
============
Expand Down
3,152 changes: 2,366 additions & 786 deletions generated/nidaqmx/_stubs/nidaqmx_pb2_grpc.pyi

Large diffs are not rendered by default.

64 changes: 52 additions & 12 deletions generated/nidaqmx/_stubs/session_pb2_grpc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@
isort:skip_file
"""
import abc
import collections.abc
import grpc
import grpc.aio
from nidaqmx._stubs import session_pb2
import typing

_T = typing.TypeVar('_T')

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta):
...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext): # type: ignore
...

class SessionUtilitiesStub:
def __init__(self, channel: grpc.Channel) -> None: ...
def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
EnumerateDevices: grpc.UnaryUnaryMultiCallable[
session_pb2.EnumerateDevicesRequest,
session_pb2.EnumerateDevicesResponse,
Expand Down Expand Up @@ -36,43 +47,72 @@ class SessionUtilitiesStub:
]
"""Resets the server to a default state with no open sessions"""

class SessionUtilitiesAsyncStub:
EnumerateDevices: grpc.aio.UnaryUnaryMultiCallable[
session_pb2.EnumerateDevicesRequest,
session_pb2.EnumerateDevicesResponse,
]
"""Provides a list of devices or chassis connected to server under localhost"""
Reserve: grpc.aio.UnaryUnaryMultiCallable[
session_pb2.ReserveRequest,
session_pb2.ReserveResponse,
]
"""Reserve a set of client defined resources for exclusive use"""
IsReservedByClient: grpc.aio.UnaryUnaryMultiCallable[
session_pb2.IsReservedByClientRequest,
session_pb2.IsReservedByClientResponse,
]
"""Determines if a set of client defined resources is currently reserved by a
specific client
"""
Unreserve: grpc.aio.UnaryUnaryMultiCallable[
session_pb2.UnreserveRequest,
session_pb2.UnreserveResponse,
]
"""Unreserves a previously reserved resource"""
ResetServer: grpc.aio.UnaryUnaryMultiCallable[
session_pb2.ResetServerRequest,
session_pb2.ResetServerResponse,
]
"""Resets the server to a default state with no open sessions"""

class SessionUtilitiesServicer(metaclass=abc.ABCMeta):
@abc.abstractmethod
def EnumerateDevices(
self,
request: session_pb2.EnumerateDevicesRequest,
context: grpc.ServicerContext,
) -> session_pb2.EnumerateDevicesResponse:
context: _ServicerContext,
) -> typing.Union[session_pb2.EnumerateDevicesResponse, collections.abc.Awaitable[session_pb2.EnumerateDevicesResponse]]:
"""Provides a list of devices or chassis connected to server under localhost"""
@abc.abstractmethod
def Reserve(
self,
request: session_pb2.ReserveRequest,
context: grpc.ServicerContext,
) -> session_pb2.ReserveResponse:
context: _ServicerContext,
) -> typing.Union[session_pb2.ReserveResponse, collections.abc.Awaitable[session_pb2.ReserveResponse]]:
"""Reserve a set of client defined resources for exclusive use"""
@abc.abstractmethod
def IsReservedByClient(
self,
request: session_pb2.IsReservedByClientRequest,
context: grpc.ServicerContext,
) -> session_pb2.IsReservedByClientResponse:
context: _ServicerContext,
) -> typing.Union[session_pb2.IsReservedByClientResponse, collections.abc.Awaitable[session_pb2.IsReservedByClientResponse]]:
"""Determines if a set of client defined resources is currently reserved by a
specific client
"""
@abc.abstractmethod
def Unreserve(
self,
request: session_pb2.UnreserveRequest,
context: grpc.ServicerContext,
) -> session_pb2.UnreserveResponse:
context: _ServicerContext,
) -> typing.Union[session_pb2.UnreserveResponse, collections.abc.Awaitable[session_pb2.UnreserveResponse]]:
"""Unreserves a previously reserved resource"""
@abc.abstractmethod
def ResetServer(
self,
request: session_pb2.ResetServerRequest,
context: grpc.ServicerContext,
) -> session_pb2.ResetServerResponse:
context: _ServicerContext,
) -> typing.Union[session_pb2.ResetServerResponse, collections.abc.Awaitable[session_pb2.ResetServerResponse]]:
"""Resets the server to a default state with no open sessions"""

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

0 comments on commit 0bb9cab

Please sign in to comment.