Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "pypy3.10", "pypy3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "pypy3.10", "pypy3.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: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ All notable changes to this project will be documented in this file.
* [862: docs tox env fails on rdss-nidaqmxbot-win-10-py32](https://github.com/ni/nidaqmx-python/issues/862)

* ### Major Changes
* Removed support for Python 3.9.
* (IN PROGRESS behind "WAVEFORM_SUPPORT" feature toggle) Added support for reading and writing Waveform data through gRPC using [NI gRPC Device Server](https://github.com/ni/grpc-device).

* ### Known Issues
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ system.
Python Version Support
----------------------

**nidaqmx** supports CPython 3.10+.
**nidaqmx** supports CPython 3.9+.

**nidaqmx** supports PyPy3 for non-gRPC use cases. For the status of PyPy support for gRPC,
see `PyPy support (grpc/grpc#4221) <https://github.com/grpc/grpc/issues/4221>`_.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
3. Log data from multiple tasks to a single TDMS file
"""

from __future__ import annotations

import os
import queue
import threading
Expand Down
7 changes: 2 additions & 5 deletions generated/nidaqmx/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""The NI-DAQmx API for Python."""

from importlib.metadata import version

from nidaqmx.errors import (
DaqError,
DaqReadError,
Expand All @@ -12,11 +14,6 @@
from nidaqmx.task import Task
from nidaqmx.types import CtrFreq, CtrTick, CtrTime

try:
from importlib.metadata import version
except ImportError:
from importlib_metadata import version # type: ignore[no-redef]

__version__ = version(__name__)

__all__ = [ # noqa: F405 - 'errors' may be undefined, or defined from star imports: nidaqmx.grpc_session_options (auto-generated noqa)
Expand Down
17 changes: 16 additions & 1 deletion generated/nidaqmx/_dotenvpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,27 @@ def _get_caller_path() -> Path | None:
for frame, _ in traceback.walk_stack(inspect.currentframe()):
if frame.f_code.co_filename:
module_path = Path(frame.f_code.co_filename)
if module_path.exists() and not module_path.is_relative_to(package_path):
if _exists(module_path) and not module_path.is_relative_to(package_path):
return module_path

return None


# Path.exists() throws OSError when the path has invalid file characters.
# https://github.com/python/cpython/issues/79487
if sys.version_info >= (3, 10):

def _exists(path: Path) -> bool:
return path.exists()

else:

def _exists(path: Path) -> bool:
import os

return os.path.exists(path)


def _get_package_path() -> Path:
"""Get the path of this package."""
module = sys.modules[__package__]
Expand Down
8 changes: 1 addition & 7 deletions generated/nidaqmx/_feature_toggles.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

import functools
import sys
from collections.abc import Callable
from enum import Enum
from typing import TYPE_CHECKING, TypeVar
Expand All @@ -14,12 +13,7 @@
from nidaqmx.errors import FeatureNotSupportedError

if TYPE_CHECKING:
from typing import ParamSpec

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self
from typing_extensions import ParamSpec, Self

_P = ParamSpec("_P")
_T = TypeVar("_T")
Expand Down
2 changes: 1 addition & 1 deletion generated/nidaqmx/_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)

if TYPE_CHECKING:
from typing import TypeAlias
from typing_extensions import TypeAlias


_DAQ_NOT_FOUND_MESSAGE = (
Expand Down
2 changes: 1 addition & 1 deletion generated/nidaqmx/_library_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from nitypes.waveform import AnalogWaveform, DigitalWaveform, SampleIntervalMode, Timing, ExtendedPropertyDictionary

if TYPE_CHECKING:
from typing import TypeAlias
from typing_extensions import TypeAlias

_logger = logging.getLogger(__name__)
_was_runtime_environment_set = None
Expand Down
2 changes: 2 additions & 0 deletions generated/nidaqmx/system/physical_channel.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Do not edit this file; it was automatically generated.

from __future__ import annotations

import ctypes
import numpy
import pathlib
Expand Down
7 changes: 6 additions & 1 deletion generated/nidaqmx/system/system.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Do not edit this file; it was automatically generated.

from __future__ import annotations

import collections
import ctypes
import deprecation
Expand All @@ -23,6 +25,9 @@
import nidaqmx.types
from nidaqmx.system.device import _DeviceAlternateConstructor

if typing.TYPE_CHECKING:
from typing_extensions import TypeAlias

__all__ = ['System']


Expand Down Expand Up @@ -72,7 +77,7 @@ def devices(self):
return DeviceCollection(self._interpreter)


DriverVersion: typing.TypeAlias = nidaqmx.types.DriverVersion
DriverVersion: TypeAlias = nidaqmx.types.DriverVersion

@property
def driver_version(self):
Expand Down
2 changes: 2 additions & 0 deletions generated/nidaqmx/task/_in_stream.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Do not edit this file; it was automatically generated.

from __future__ import annotations

from typing import Type, Optional, Union

import numpy
Expand Down
Loading