Skip to content

Commit 14e4291

Browse files
authored
Add support for Python 3.12 (#453)
* pyproject.toml: Use a newer grpcio-tools for Python 3.12 Continue using 1.49.1 for older versions, to avoid affecting codegen. * Update poetry.lock * pyproject.toml: NumPy doesn't support 3.8 and 3.12 with a single version * Update poetry.lock * tests: Run tests with Python 3.12 * Update CHANGELOG.md * pyproject.toml: Add Python 3.12 trove classifier
1 parent 0bb9cab commit 14e4291

File tree

5 files changed

+120
-6
lines changed

5 files changed

+120
-6
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"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +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
30+
* Updated supported Python versions to 3.8, 3.9, 3.10, 3.11, and 3.12
3131
* ### Known Issues
3232
* ...
3333

poetry.lock

Lines changed: 108 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.9",
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
2526
"Programming Language :: Python :: Implementation :: CPython",
2627
"Programming Language :: Python :: Implementation :: PyPy",
2728
"Topic :: System :: Hardware :: Hardware Drivers"
@@ -31,7 +32,10 @@ packages = [{ include = "nidaqmx", from = "generated" }]
3132

3233
[tool.poetry.dependencies]
3334
python = "^3.8"
34-
numpy = ">=1.22"
35+
numpy = [
36+
{version = ">=1.22", python = ">=3.8,<3.12"},
37+
{version = ">=1.26", python = ">=3.12,<3.13"},
38+
]
3539
deprecation = ">=2.1"
3640
# Documentation, must be in main dependencies (but optional) list for
3741
# readthedocs integration.
@@ -49,7 +53,10 @@ grpc = ["grpcio", "protobuf"]
4953
[tool.poetry.group.codegen.dependencies]
5054
click = "^8.1"
5155
Mako = "^1.2"
52-
grpcio-tools = "1.49.1"
56+
grpcio-tools = [
57+
{version = "1.49.1", python = ">=3.8,<3.12"},
58+
{version = "1.59.0", python = "^3.12"},
59+
]
5360
mypy-protobuf = ">=3.4"
5461

5562
[tool.poetry.group.lint.dependencies]

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}-base, py{38,39,310,311}-grpc, report, docs
8+
envlist = clean, py{38,39,310,311,312}-base, py{38,39,310,311,312}-grpc, report, docs
99

1010
[testenv]
1111
skip_install = true

0 commit comments

Comments
 (0)