From aeff1d64cd226b4454a45f0eba6c5aee4492e779 Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Fri, 24 Mar 2023 12:18:11 -0500 Subject: [PATCH 1/2] Add Python 3.11 Support --- .travis.yml | 3 ++- CHANGELOG.md | 1 + build/templates/tox-system_tests.ini.mako | 4 ++-- generated/nidcpower/tox-system_tests.ini | 4 ++-- generated/nidigital/tox-system_tests.ini | 4 ++-- generated/nidmm/tox-system_tests.ini | 4 ++-- generated/nifake/tox-system_tests.ini | 4 ++-- generated/nifgen/tox-system_tests.ini | 4 ++-- generated/nimodinst/tox-system_tests.ini | 4 ++-- generated/niscope/tox-system_tests.ini | 4 ++-- generated/nise/tox-system_tests.ini | 4 ++-- generated/niswitch/tox-system_tests.ini | 4 ++-- generated/nitclk/tox-system_tests.ini | 4 ++-- tools/run_python_system_tests.py | 6 +++--- tox-travis.ini | 16 ++++++++-------- tox.ini | 16 ++++++++-------- 16 files changed, 44 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8998cbe23..686ee6e17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,11 @@ matrix: include: # We run tests on the latest supported version of Python first. # This is where additional tests are run so we give it more time. - - python: "3.10" + - python: "3.11" - python: "3.7" - python: "3.8" - python: "3.9" + - python: "3.10" install: - travis_retry sudo apt-get -y install python3-pip diff --git a/CHANGELOG.md b/CHANGELOG.md index f766ae384..fc7bb3073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file. ## Unreleased * ### ALL * #### Added + * Support for Python 3.11 * #### Changed * Fix [#1888](https://github.com/ni/nimi-python/issues/1888): Deadlock on multithreaded usage due to UnlockSession always being called with callerHasLock=False. * #### Removed diff --git a/build/templates/tox-system_tests.ini.mako b/build/templates/tox-system_tests.ini.mako index 0bc08bd44..b994c4a3f 100644 --- a/build/templates/tox-system_tests.ini.mako +++ b/build/templates/tox-system_tests.ini.mako @@ -26,7 +26,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/${module_name}) [tox] -envlist = ${wheel_env}py{37,38,39,310}-${module_name}-system_tests, py310-${module_name}-coverage +envlist = ${wheel_env}py{37,38,39,310,311}-${module_name}-system_tests, py311-${module_name}-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -90,7 +90,7 @@ deps = ${module_name}-coverage: codecov depends = - ${module_name}-coverage: py{37,38,39,310}-${module_name}-system_tests + ${module_name}-coverage: py{37,38,39,310,311}-${module_name}-system_tests % if uses_other_wheel: ${module_name}-system_tests: ${wheel_env} % endif diff --git a/generated/nidcpower/tox-system_tests.ini b/generated/nidcpower/tox-system_tests.ini index c03df43ce..a9a9fecff 100644 --- a/generated/nidcpower/tox-system_tests.ini +++ b/generated/nidcpower/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nidcpower) [tox] -envlist = py{37,38,39,310}-nidcpower-system_tests, py310-nidcpower-coverage +envlist = py{37,38,39,310,311}-nidcpower-system_tests, py311-nidcpower-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -48,7 +48,7 @@ deps = nidcpower-coverage: codecov depends = - nidcpower-coverage: py{37,38,39,310}-nidcpower-system_tests + nidcpower-coverage: py{37,38,39,310,311}-nidcpower-system_tests passenv = GIT_BRANCH diff --git a/generated/nidigital/tox-system_tests.ini b/generated/nidigital/tox-system_tests.ini index 13878ed61..7510d8e40 100644 --- a/generated/nidigital/tox-system_tests.ini +++ b/generated/nidigital/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nidigital) [tox] -envlist = py3-nidigital-wheel_dep,py{37,38,39,310}-nidigital-system_tests, py310-nidigital-coverage +envlist = py3-nidigital-wheel_dep,py{37,38,39,310,311}-nidigital-system_tests, py311-nidigital-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -55,7 +55,7 @@ deps = nidigital-coverage: codecov depends = - nidigital-coverage: py{37,38,39,310}-nidigital-system_tests + nidigital-coverage: py{37,38,39,310,311}-nidigital-system_tests nidigital-system_tests: py3-nidigital-wheel_dep, passenv = diff --git a/generated/nidmm/tox-system_tests.ini b/generated/nidmm/tox-system_tests.ini index 03daae598..03901db74 100644 --- a/generated/nidmm/tox-system_tests.ini +++ b/generated/nidmm/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nidmm) [tox] -envlist = py{37,38,39,310}-nidmm-system_tests, py310-nidmm-coverage +envlist = py{37,38,39,310,311}-nidmm-system_tests, py311-nidmm-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -48,7 +48,7 @@ deps = nidmm-coverage: codecov depends = - nidmm-coverage: py{37,38,39,310}-nidmm-system_tests + nidmm-coverage: py{37,38,39,310,311}-nidmm-system_tests passenv = GIT_BRANCH diff --git a/generated/nifake/tox-system_tests.ini b/generated/nifake/tox-system_tests.ini index a952cc79c..5d4c9fc99 100644 --- a/generated/nifake/tox-system_tests.ini +++ b/generated/nifake/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nifake) [tox] -envlist = py3-nifake-wheel_dep,py{37,38,39,310}-nifake-system_tests, py310-nifake-coverage +envlist = py3-nifake-wheel_dep,py{37,38,39,310,311}-nifake-system_tests, py311-nifake-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -55,7 +55,7 @@ deps = nifake-coverage: codecov depends = - nifake-coverage: py{37,38,39,310}-nifake-system_tests + nifake-coverage: py{37,38,39,310,311}-nifake-system_tests nifake-system_tests: py3-nifake-wheel_dep, passenv = diff --git a/generated/nifgen/tox-system_tests.ini b/generated/nifgen/tox-system_tests.ini index b5c958e25..5c2361723 100644 --- a/generated/nifgen/tox-system_tests.ini +++ b/generated/nifgen/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nifgen) [tox] -envlist = py3-nifgen-wheel_dep,py{37,38,39,310}-nifgen-system_tests, py310-nifgen-coverage +envlist = py3-nifgen-wheel_dep,py{37,38,39,310,311}-nifgen-system_tests, py311-nifgen-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -55,7 +55,7 @@ deps = nifgen-coverage: codecov depends = - nifgen-coverage: py{37,38,39,310}-nifgen-system_tests + nifgen-coverage: py{37,38,39,310,311}-nifgen-system_tests nifgen-system_tests: py3-nifgen-wheel_dep, passenv = diff --git a/generated/nimodinst/tox-system_tests.ini b/generated/nimodinst/tox-system_tests.ini index 48468efa4..92132e18b 100644 --- a/generated/nimodinst/tox-system_tests.ini +++ b/generated/nimodinst/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nimodinst) [tox] -envlist = py{37,38,39,310}-nimodinst-system_tests, py310-nimodinst-coverage +envlist = py{37,38,39,310,311}-nimodinst-system_tests, py311-nimodinst-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -46,7 +46,7 @@ deps = nimodinst-coverage: codecov depends = - nimodinst-coverage: py{37,38,39,310}-nimodinst-system_tests + nimodinst-coverage: py{37,38,39,310,311}-nimodinst-system_tests passenv = GIT_BRANCH diff --git a/generated/niscope/tox-system_tests.ini b/generated/niscope/tox-system_tests.ini index e332e0d32..0096076df 100644 --- a/generated/niscope/tox-system_tests.ini +++ b/generated/niscope/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/niscope) [tox] -envlist = py3-niscope-wheel_dep,py{37,38,39,310}-niscope-system_tests, py310-niscope-coverage +envlist = py3-niscope-wheel_dep,py{37,38,39,310,311}-niscope-system_tests, py311-niscope-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -55,7 +55,7 @@ deps = niscope-coverage: codecov depends = - niscope-coverage: py{37,38,39,310}-niscope-system_tests + niscope-coverage: py{37,38,39,310,311}-niscope-system_tests niscope-system_tests: py3-niscope-wheel_dep, passenv = diff --git a/generated/nise/tox-system_tests.ini b/generated/nise/tox-system_tests.ini index 97f195cf5..a5336c8da 100644 --- a/generated/nise/tox-system_tests.ini +++ b/generated/nise/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nise) [tox] -envlist = py{37,38,39,310}-nise-system_tests, py310-nise-coverage +envlist = py{37,38,39,310,311}-nise-system_tests, py311-nise-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -46,7 +46,7 @@ deps = nise-coverage: codecov depends = - nise-coverage: py{37,38,39,310}-nise-system_tests + nise-coverage: py{37,38,39,310,311}-nise-system_tests passenv = GIT_BRANCH diff --git a/generated/niswitch/tox-system_tests.ini b/generated/niswitch/tox-system_tests.ini index 1db78775a..95e0cb6f3 100644 --- a/generated/niswitch/tox-system_tests.ini +++ b/generated/niswitch/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/niswitch) [tox] -envlist = py{37,38,39,310}-niswitch-system_tests, py310-niswitch-coverage +envlist = py{37,38,39,310,311}-niswitch-system_tests, py311-niswitch-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -48,7 +48,7 @@ deps = niswitch-coverage: codecov depends = - niswitch-coverage: py{37,38,39,310}-niswitch-system_tests + niswitch-coverage: py{37,38,39,310,311}-niswitch-system_tests passenv = GIT_BRANCH diff --git a/generated/nitclk/tox-system_tests.ini b/generated/nitclk/tox-system_tests.ini index 511c83121..c8871f315 100644 --- a/generated/nitclk/tox-system_tests.ini +++ b/generated/nitclk/tox-system_tests.ini @@ -3,7 +3,7 @@ # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/nitclk) [tox] -envlist = py3-nitclk-wheel_dep,py{37,38,39,310}-nitclk-system_tests, py310-nitclk-coverage +envlist = py3-nitclk-wheel_dep,py{37,38,39,310,311}-nitclk-system_tests, py311-nitclk-coverage skip_missing_interpreters=True ignore_basepython_conflict=True # We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo @@ -53,7 +53,7 @@ deps = nitclk-coverage: codecov depends = - nitclk-coverage: py{37,38,39,310}-nitclk-system_tests + nitclk-coverage: py{37,38,39,310,311}-nitclk-system_tests nitclk-system_tests: py3-nitclk-wheel_dep, passenv = diff --git a/tools/run_python_system_tests.py b/tools/run_python_system_tests.py index 799b90753..b8c5d3d63 100644 --- a/tools/run_python_system_tests.py +++ b/tools/run_python_system_tests.py @@ -14,7 +14,7 @@ choices=[x.name for x in src_dir.iterdir() if x.is_dir()]) parser.add_argument('-pv', '--python-version', required=False, type=str, help='Python version to be run. This is used to invoke the appropriate tox environment.', - choices=['py37', 'py38', 'py39', 'py310'], default='py310') + choices=['py37', 'py38', 'py39', 'py310', 'py311'], default='py311') parser.add_argument('-pb', '--python-bitness', required=False, type=str, help=""" Python bitness to be run. "32" means pass "--32" to tox, which @@ -32,8 +32,8 @@ drivers_using_other_driver = ['niscope', 'nifgen', 'nidigital', 'nitclk', ] if args.module in drivers_using_other_driver: - # Creating the wheel for the other required module only uses Python 3.9 - command += ['-e', 'py310-{0}-wheel_dep,'.format(args.module)] + # Creating the wheel for the other required module only uses Python 3.11 + command += ['-e', 'py311-{0}-wheel_dep,'.format(args.module)] command += ['-e', '{0}-{1}-system_tests'.format(args.python_version, args.module)] command += ['-c', 'tox-system_tests.ini'] diff --git a/tox-travis.ini b/tox-travis.ini index 76291fdc5..4bf325acc 100644 --- a/tox-travis.ini +++ b/tox-travis.ini @@ -7,9 +7,9 @@ # tox-travis.ini will have pyXX-clean and all pyXX-installers in the default envlist, while the developer tox.ini # does not have clean and only has one pyXX-installers # Uncomment this line for tox.ini -# envlist = py310-build_test,py310-codegen,py310-installers,py{37,38,39,310}-test,py310-flake8,py310-docs,py310-pkg +# envlist = py311-build_test,py311-codegen,py311-installers,py{37,38,39,310,311}-test,py311-flake8,py311-docs,py311-pkg # Uncomment this line for tox-travis.ini -envlist = py310-clean,py310-build_test,py310-codegen,py{37,38,39,310}-installers,py{37,38,39,310}-test,py310-flake8,py310-docs,py310-pkg +envlist = py311-clean,py311-build_test,py311-codegen,py{37,38,39,310,311}-installers,py{37,38,39,310,311}-test,py311-flake8,py311-docs,py311-pkg skip_missing_interpreters=True ignore_basepython_conflict=True skipsdist = true @@ -149,12 +149,12 @@ deps = pkg: twine depends = - codegen: py310-clean - installers: py310-codegen - flake8: py310-codegen - docs: py310-codegen - test: py310-installers - pkg: py310-installers + codegen: py311-clean + installers: py311-codegen + flake8: py311-codegen + docs: py311-codegen + test: py311-installers + pkg: py311-installers whitelist_externals = build_test: mv diff --git a/tox.ini b/tox.ini index b1333c6b1..5b41ea86c 100644 --- a/tox.ini +++ b/tox.ini @@ -7,9 +7,9 @@ # tox-travis.ini will have pyXX-clean and all pyXX-installers in the default envlist, while the developer tox.ini # does not have clean and only has one pyXX-installers # Uncomment this line for tox.ini -envlist = py310-build_test,py310-codegen,py310-installers,py{37,38,39,310}-test,py310-flake8,py310-docs,py310-pkg +envlist = py311-build_test,py311-codegen,py311-installers,py{37,38,39,310,311}-test,py311-flake8,py311-docs,py311-pkg # Uncomment this line for tox-travis.ini -# envlist = py310-clean,py310-build_test,py310-codegen,py{37,38,39,310}-installers,py{37,38,39,310}-test,py310-flake8,py310-docs,py310-pkg +# envlist = py311-clean,py311-build_test,py311-codegen,py{37,38,39,310,311}-installers,py{37,38,39,310,311}-test,py311-flake8,py311-docs,py311-pkg skip_missing_interpreters=True ignore_basepython_conflict=True skipsdist = true @@ -149,12 +149,12 @@ deps = pkg: twine depends = - codegen: py310-clean - installers: py310-codegen - flake8: py310-codegen - docs: py310-codegen - test: py310-installers - pkg: py310-installers + codegen: py311-clean + installers: py311-codegen + flake8: py311-codegen + docs: py311-codegen + test: py311-installers + pkg: py311-installers whitelist_externals = build_test: mv From 63e60b5da6acbf210f0d2b2f6ba173cfe2a168ba Mon Sep 17 00:00:00 2001 From: Jay Fitzgerald <34140133+ni-jfitzger@users.noreply.github.com> Date: Mon, 10 Apr 2023 20:13:01 -0500 Subject: [PATCH 2/2] Exclude grpcio 1.53 from deps to fix win32 system test failures --- build/templates/tox-system_tests.ini.mako | 2 +- generated/nidcpower/tox-system_tests.ini | 2 +- generated/nidigital/tox-system_tests.ini | 2 +- generated/nidmm/tox-system_tests.ini | 2 +- generated/nifake/tox-system_tests.ini | 2 +- generated/nifgen/tox-system_tests.ini | 2 +- generated/niscope/tox-system_tests.ini | 2 +- generated/niswitch/tox-system_tests.ini | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/templates/tox-system_tests.ini.mako b/build/templates/tox-system_tests.ini.mako index 44d78c5e5..2f3e2d5ad 100644 --- a/build/templates/tox-system_tests.ini.mako +++ b/build/templates/tox-system_tests.ini.mako @@ -82,7 +82,7 @@ deps = ${module_name}-system_tests: fasteners ${module_name}-system_tests: pytest-json % if grpc_supported: - ${module_name}-system_tests: grpcio + ${module_name}-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel ${module_name}-system_tests: protobuf % endif diff --git a/generated/nidcpower/tox-system_tests.ini b/generated/nidcpower/tox-system_tests.ini index a706bd20b..12f5559a3 100644 --- a/generated/nidcpower/tox-system_tests.ini +++ b/generated/nidcpower/tox-system_tests.ini @@ -41,7 +41,7 @@ deps = nidcpower-system_tests: hightime nidcpower-system_tests: fasteners nidcpower-system_tests: pytest-json - nidcpower-system_tests: grpcio + nidcpower-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel nidcpower-system_tests: protobuf nidcpower-coverage: coverage diff --git a/generated/nidigital/tox-system_tests.ini b/generated/nidigital/tox-system_tests.ini index f833ca36a..8e9681eb9 100644 --- a/generated/nidigital/tox-system_tests.ini +++ b/generated/nidigital/tox-system_tests.ini @@ -48,7 +48,7 @@ deps = nidigital-system_tests: hightime nidigital-system_tests: fasteners nidigital-system_tests: pytest-json - nidigital-system_tests: grpcio + nidigital-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel nidigital-system_tests: protobuf nidigital-coverage: coverage diff --git a/generated/nidmm/tox-system_tests.ini b/generated/nidmm/tox-system_tests.ini index 1346ad772..c89f55d99 100644 --- a/generated/nidmm/tox-system_tests.ini +++ b/generated/nidmm/tox-system_tests.ini @@ -41,7 +41,7 @@ deps = nidmm-system_tests: hightime nidmm-system_tests: fasteners nidmm-system_tests: pytest-json - nidmm-system_tests: grpcio + nidmm-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel nidmm-system_tests: protobuf nidmm-coverage: coverage diff --git a/generated/nifake/tox-system_tests.ini b/generated/nifake/tox-system_tests.ini index bb4b5acb8..5d6c45052 100644 --- a/generated/nifake/tox-system_tests.ini +++ b/generated/nifake/tox-system_tests.ini @@ -48,7 +48,7 @@ deps = nifake-system_tests: hightime nifake-system_tests: fasteners nifake-system_tests: pytest-json - nifake-system_tests: grpcio + nifake-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel nifake-system_tests: protobuf nifake-coverage: coverage diff --git a/generated/nifgen/tox-system_tests.ini b/generated/nifgen/tox-system_tests.ini index 57341429c..1e86f82b2 100644 --- a/generated/nifgen/tox-system_tests.ini +++ b/generated/nifgen/tox-system_tests.ini @@ -48,7 +48,7 @@ deps = nifgen-system_tests: hightime nifgen-system_tests: fasteners nifgen-system_tests: pytest-json - nifgen-system_tests: grpcio + nifgen-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel nifgen-system_tests: protobuf nifgen-coverage: coverage diff --git a/generated/niscope/tox-system_tests.ini b/generated/niscope/tox-system_tests.ini index 575ecffa5..5868e25d8 100644 --- a/generated/niscope/tox-system_tests.ini +++ b/generated/niscope/tox-system_tests.ini @@ -48,7 +48,7 @@ deps = niscope-system_tests: hightime niscope-system_tests: fasteners niscope-system_tests: pytest-json - niscope-system_tests: grpcio + niscope-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel niscope-system_tests: protobuf niscope-coverage: coverage diff --git a/generated/niswitch/tox-system_tests.ini b/generated/niswitch/tox-system_tests.ini index 7480b1af1..7a9e83c05 100644 --- a/generated/niswitch/tox-system_tests.ini +++ b/generated/niswitch/tox-system_tests.ini @@ -41,7 +41,7 @@ deps = niswitch-system_tests: hightime niswitch-system_tests: fasteners niswitch-system_tests: pytest-json - niswitch-system_tests: grpcio + niswitch-system_tests: grpcio != 1.53 # no Python 3.7 win32 wheel niswitch-system_tests: protobuf niswitch-coverage: coverage