Skip to content

Commit 8c58899

Browse files
authored
[releases/1.0] Add support for Python 3.13 (#650)
* nidaqmx: Fix installation with Python 3.13 (#645) * tests: Fix OverflowError: Python integer 36767 out of bounds for int16 * tests: Skip more examples * nidaqmx: Update dependency versions for Python 3.13 support * Update poetry.lock * GitHub: Enable unit tests on Python 3.13 * tests: Reformat with black * tests: Fix E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` * nidaqmx: Allow newer types-protobuf * nidaqmx: Update poetry.lock (cherry picked from commit ee791a3) * tox: Enable Python 3.13 (#646) (cherry picked from commit dab722c) * nidaqmx: Add Python 3.13 trove classifier and update changelog (#649) * nidaqmx: Add Python 3.13 trove classifier * nidaqmx: Update changelog (cherry picked from commit ba8a962)
1 parent f4698e3 commit 8c58899

File tree

9 files changed

+959
-725
lines changed

9 files changed

+959
-725
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.8", "3.9", "3.10", "3.11", "3.12"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22
* [1.1.0](#110)
3+
* [1.0.2](#102)
34
* [1.0.1](#101)
45
* [1.0.0](#100)
56
* [0.9.0](#090)
@@ -31,6 +32,16 @@ All notable changes to this project will be documented in this file.
3132
* ### Known Issues
3233
* ...
3334

35+
## 1.0.2
36+
* ### Merged Pull Requests
37+
* [Full changelog: 1.0.1...1.0.2](https://github.com/ni/nidaqmx-python/compare/1.0.1...1.0.2)
38+
39+
* ### Resolved Issues
40+
* [644: nidaqmx doesn't support Python 3.13+](https://github.com/ni/nidaqmx-python/issues/644)
41+
42+
* ### Known Issues
43+
* ...
44+
3445
## 1.0.1
3546
* ### Merged Pull Requests
3647
* [Full changelog: 1.0.0...1.0.1](https://github.com/ni/nidaqmx-python/compare/1.0.0...1.0.1)

poetry.lock

Lines changed: 930 additions & 713 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2627
"Programming Language :: Python :: Implementation :: CPython",
2728
"Programming Language :: Python :: Implementation :: PyPy",
2829
"Topic :: System :: Hardware :: Hardware Drivers"
@@ -35,6 +36,7 @@ python = "^3.8"
3536
numpy = [
3637
{version = ">=1.22", python = ">=3.8,<3.12"},
3738
{version = ">=1.26", python = ">=3.12,<3.13"},
39+
{version = ">=2.1", python = "^3.13"},
3840
]
3941
deprecation = ">=2.1"
4042
# Documentation, must be in main dependencies (but optional) list for
@@ -43,7 +45,7 @@ deprecation = ">=2.1"
4345
Sphinx = {version=">=5.0", optional=true}
4446
sphinx_rtd_theme = {version=">=1.0", optional=true}
4547
grpcio = {version=">=1.49.0,<2.0", optional=true}
46-
protobuf = {version="^4.21", optional=true}
48+
protobuf = {version=">=4.21", optional=true}
4749
hightime = "^0.2.2"
4850
toml = {version=">=0.10.2", optional=true}
4951
tzlocal = "^5.0"
@@ -62,7 +64,8 @@ click = "^8.1"
6264
Mako = "^1.2"
6365
grpcio-tools = [
6466
{version = "1.49.1", python = ">=3.8,<3.12"},
65-
{version = "1.59.0", python = "^3.12"},
67+
{version = "1.59.0", python = ">=3.12,<3.13"},
68+
{version = "1.67.0", python = "^3.13"},
6669
]
6770
mypy-protobuf = ">=3.4"
6871

@@ -77,7 +80,7 @@ nptdms = ">=1.9.0"
7780
[tool.poetry.group.lint.dependencies]
7881
ni-python-styleguide = ">=0.4.1"
7982
mypy = ">=1.0"
80-
types-protobuf = "^4.21"
83+
types-protobuf = ">=4.21"
8184
types-requests = ">=2.25.0"
8285
grpc-stubs = "^1.53"
8386

tests/acceptance/test_examples.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ def test___shipping_example___run___no_errors(example_path: Path, system):
2828
pytest.skip(
2929
f"Device {device_name} does not have physical channel {physical_channel_name}"
3030
)
31-
if example_path.name == "read_pulse_freq.py":
31+
if example_path.name in ["read_freq.py", "read_pulse_freq.py"]:
3232
pytest.skip("Example times out if there is no signal.")
33-
if example_path.name == "voltage_acq_int_clk_dig_start_ref.py":
33+
if example_path.name in [
34+
"voltage_acq_int_clk_dig_start_ref.py",
35+
"voltage_acq_int_clk_dig_ref.py",
36+
]:
3437
pytest.skip("Example times out if there is no trigger signal.")
3538
if re.search(r"\binput\(|\bKeyboardInterrupt\b", example_source):
3639
pytest.skip("Example waits for keyboard input.")

tests/component/system/test_device_properties.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test___module___get_chassis___shared_interpreter(device: Device):
115115
def test___ext_cal_last_date_and_time___no_errors(real_x_series_device: Device) -> None:
116116
last_date_and_time = real_x_series_device.ext_cal_last_date_and_time
117117

118-
assert type(last_date_and_time) == datetime
118+
assert type(last_date_and_time) is datetime
119119
assert last_date_and_time.year > 2009
120120
assert last_date_and_time.month >= 1
121121
assert last_date_and_time.day > 0
@@ -126,7 +126,7 @@ def test___ext_cal_last_date_and_time___no_errors(real_x_series_device: Device)
126126
def test___self_cal_last_date_and_time___no_errors(real_x_series_device: Device) -> None:
127127
last_date_and_time = real_x_series_device.self_cal_last_date_and_time
128128

129-
assert type(last_date_and_time) == datetime
129+
assert type(last_date_and_time) is datetime
130130
assert last_date_and_time.year > 2009
131131
assert last_date_and_time.month >= 1
132132
assert last_date_and_time.day > 0

tests/component/task/test_in_stream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
SINE_VOLTAGE_MIN = -2.5
1616
SINE_RAW_MAX = 16383
1717
SINE_RAW_MIN = -16384
18-
FULLSCALE_RAW_MAX = 36767
19-
FULLSCALE_RAW_MIN = -36768
18+
FULLSCALE_RAW_MAX = 32767
19+
FULLSCALE_RAW_MIN = -32768
2020

2121

2222
@pytest.fixture()

tests/component/test_task_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ def test___event_callback_that_raises_exceptions___run_finite_acquisition___exce
613613

614614

615615
def _exception_matches(e1: BaseException, e2: BaseException) -> bool:
616-
return type(e1) == type(e2) and e1.args == e2.args
616+
return type(e1) is type(e2) and e1.args == e2.args
617617

618618

619619
def _get_exception(record: LogRecord) -> BaseException:

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[tox]
77
isolated_build = true
8-
envlist = clean, py{38,39,310,311,312}-base, py{38,39,310,311,312}-grpc, py39-base-nicaiu, py39-base-nicai_utf8, report, docs
8+
envlist = clean, py{38,39,310,311,312,313}-base, py{38,39,310,311,312,313}-grpc, py39-base-nicaiu, py39-base-nicai_utf8, report, docs
99

1010
[testenv]
1111
skip_install = true

0 commit comments

Comments
 (0)