From f33cb3000746de69295cfe1ea53ba46ae7aaaacd Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 27 Oct 2025 20:13:49 -0500 Subject: [PATCH 1/2] generator: Sort annotation keys to make tests pass on Python 3.14 --- .../client/_support.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/generator/ni_measurement_plugin_sdk_generator/client/_support.py b/packages/generator/ni_measurement_plugin_sdk_generator/client/_support.py index b9d99ff2e..79b327d2e 100644 --- a/packages/generator/ni_measurement_plugin_sdk_generator/client/_support.py +++ b/packages/generator/ni_measurement_plugin_sdk_generator/client/_support.py @@ -137,6 +137,11 @@ def get_configuration_and_output_metadata_by_index( annotations_dict["ni/enum.values"] = _validate_and_transform_enum_annotations( configuration.annotations["ni/enum.values"] ) + + # In Python 3.13 and earlier, the ConfigurationParameter message sorted the annotation + # keys, but in Python 3.14, it started preserving order. Sort to keep tests passing. + annotations_dict = dict(sorted(annotations_dict.items())) + configuration_parameter_list.append( ParameterMetadata.initialize( display_name=configuration.name, @@ -171,6 +176,11 @@ def get_configuration_and_output_metadata_by_index( annotations_dict["ni/enum.values"] = _validate_and_transform_enum_annotations( output.annotations["ni/enum.values"] ) + + # In Python 3.13 and earlier, the ConfigurationParameter message sorted the annotation + # keys, but in Python 3.14, it started preserving order. Sort to keep tests passing. + annotations_dict = dict(sorted(annotations_dict.items())) + output_parameter_list.append( ParameterMetadata.initialize( display_name=output.name, From 41c3b40078aa042522219b6a34f2412afeabc467 Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 27 Oct 2025 20:14:53 -0500 Subject: [PATCH 2/2] tests: Run system tests on Python 3.14 --- packages/generator/tox.ini | 2 +- packages/service/tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/generator/tox.ini b/packages/generator/tox.ini index 6d445c3b0..ad01069cc 100644 --- a/packages/generator/tox.ini +++ b/packages/generator/tox.ini @@ -5,7 +5,7 @@ [tox] isolated_build = true -envlist = clean, py{39,310,311,312,313}, py39-{pb4,pb5,pb6} +envlist = clean, py{39,310,311,312,313,314}, py39-{pb4,pb5,pb6} [testenv] skip_install = true diff --git a/packages/service/tox.ini b/packages/service/tox.ini index d25ec655e..60bdab4d4 100644 --- a/packages/service/tox.ini +++ b/packages/service/tox.ini @@ -5,7 +5,7 @@ [tox] isolated_build = true -envlist = clean, py{39,310,311,312,313}-all-extras, py39-{pb4,pb5,pb6} +envlist = clean, py{39,310,311,312,313,314}-all-extras, py39-{pb4,pb5,pb6} [testenv] skip_install = true