Skip to content

nitypes: Add support for Python 3.15 and remove support for Python 3.9 and 3.10 - #293

Merged
bkeryan merged 19 commits into
mainfrom
users/bkeryan/update-python
Oct 29, 2026
Merged

bkeryan merged 19 commits into
mainfrom
users/bkeryan/update-python

Conversation

@bkeryan

@bkeryan bkeryan commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

What does this Pull Request accomplish?

Add support for Python 3.15.

Remove support for Python 3.9 and 3.10.

Update minimum required NumPy version to 1.23.2 because NumPy 1.22 does not have binary wheels for Python 3.11 and the tests crash when using NumPy 1.22 with Python 3.11.

Update documentation and tests accordingly.

Why should this Pull Request be merged?

Python 3.15 has been released.

Python 3.9 has been EOL for about a year.

Python 3.10 is EOL as of this month.

What testing has been done?

PR build

@bkeryan
bkeryan requested a review from csjall as a code owner October 12, 2026 17:55
@bkeryan
bkeryan force-pushed the users/bkeryan/update-python branch from 191fe2d to c4fb6e8 Compare October 12, 2026 17:58
@bkeryan bkeryan closed this Oct 12, 2026
@bkeryan bkeryan reopened this Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    50 files  ± 0      50 suites  ±0   18m 0s ⏱️ - 1m 51s
 2 313 tests  - 13   2 313 ✅  - 13  0 💤 ± 0  0 ❌ ±0 
59 628 runs  ± 0  59 628 ✅ +12  0 💤  - 12  0 ❌ ±0 

Results for commit aceb79a. ± Comparison against base commit 9360561.

This pull request removes 13 tests.
tests.unit.waveform.test_digital_state ‑ test___char___from_char___returns_state[0-DigitalState.FORCE_DOWN]
tests.unit.waveform.test_digital_state ‑ test___char___from_char___returns_state[H-DigitalState.COMPARE_HIGH]
tests.unit.waveform.test_digital_state ‑ test___char___from_char___returns_state[X-DigitalState.COMPARE_UNKNOWN]
tests.unit.waveform.test_digital_state ‑ test___invalid_state___test___raises_value_error[8-DigitalState.COMPARE_UNKNOWN]
tests.unit.waveform.test_digital_state ‑ test___invalid_state___test___raises_value_error[DigitalState.FORCE_DOWN--1]
tests.unit.waveform.test_digital_state ‑ test___state___to_char___returns_char[DigitalState.COMPARE_HIGH-H]
tests.unit.waveform.test_digital_state ‑ test___state___to_char___returns_char[DigitalState.COMPARE_UNKNOWN-X]
tests.unit.waveform.test_digital_state ‑ test___state___to_char___returns_char[DigitalState.FORCE_DOWN-0]
tests.unit.waveform.test_digital_waveform ‑ test___default_value___create___creates_waveform_with_default_value[0]
tests.unit.waveform.test_digital_waveform ‑ test___default_value___create___creates_waveform_with_default_value[1]
…

♻️ This comment has been updated with latest results.

@bkeryan bkeryan changed the title nitypes: Add support for Python 3.15 and remove support for Python 3.9 nitypes: Add support for Python 3.15 and remove support for Python 3.9 and 3.10 Oct 21, 2026
@bkeryan

bkeryan commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

@csjall @mshafer-NI In light of the fact that Python 3.10 is also EOL now and our internal packages and test suites are being updated to stop using 3.10, I have updated this PR to drop Python 3.10 as well.

@bkeryan
bkeryan requested a review from csjall October 21, 2026 21:27
@bkeryan
bkeryan force-pushed the users/bkeryan/update-python branch from b6ebc78 to 172a5fb Compare October 29, 2026 02:02
@bkeryan bkeryan closed this Oct 29, 2026
@bkeryan bkeryan reopened this Oct 29, 2026
@bkeryan

bkeryan commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

NumPy 1.22 with Python 3.11:

Run poetry run pytest ./tests/unit -v --cov=nitypes --junitxml=test_results/nitypes-oldest-deps-windows-latest-py3.11.xml -k "not test___pickled_value___unpickle___is_compatible"
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\a\nitypes-python\nitypes-python\.venv\Scripts\pytest.exe\__main__.py", line 7, in <module>
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\config\__init__.py", line 253, in _console_main
    code = _main(prog=_get_prog_name(sys.argv))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\config\__init__.py", line 223, in _main
    config = _prepareconfig(new_args, plugins, prog=prog)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\config\__init__.py", line 410, in _prepareconfig
    config: Config = pluginmanager.hook.pytest_cmdline_parse(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pluggy\_hooks.py", line 512, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pluggy\_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pluggy\_callers.py", line 167, in _multicall
    raise exception
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pluggy\_callers.py", line 139, in _multicall
    teardown.throw(exception)
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\helpconfig.py", line 124, in pytest_cmdline_parse
    config = yield
             ^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pluggy\_callers.py", line 121, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\config\__init__.py", line 1232, in pytest_cmdline_parse
    self.parse(args)
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\config\__init__.py", line 1583, in parse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pluggy\_manager.py", line 416, in load_setuptools_entrypoints
    plugin = ep.load()
             ^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\importlib\metadata\__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\assertion\rewrite.py", line 188, in exec_module
    exec(co, module.__dict__)
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pytest_doctestplus\plugin.py", line 27, in <module>
    from .output_checker import (FIX, IGNORE_WARNINGS, REMOTE_DATA, SHOW_WARNINGS,
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\_pytest\assertion\rewrite.py", line 188, in exec_module
    exec(co, module.__dict__)
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\pytest_doctestplus\output_checker.py", line 293, in <module>
    import numpy
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\numpy\__init__.py", line 229, in <module>
    core.getlimits._register_known_types()
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\numpy\core\getlimits.py", line 226, in _register_known_types
    float128_ma = MachArLike(ld,
                  ^^^^^^^^^^^^^^
  File "D:\a\nitypes-python\nitypes-python\.venv\Lib\site-packages\numpy\core\getlimits.py", line 52, in __init__
    self.precision = int(-log10(self.eps))
                     ^^^^^^^^^^^^^^^^^^^^^
OverflowError: cannot convert longdouble infinity to integer
Error: Process completed with exit code 1.

@bkeryan

bkeryan commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

With the updated NumPy, pyright is now inferring literals instead of ints for some array shapes.

  c:\Dev\nitypes-python\tests\unit\complex\test_conversion.py:158:17 - error: "assert_type" mismatch: expected "ndarray[tuple[int, int], dtype[void]]" but received "ndarray[tuple[Literal[4], Literal[5]], dtype[void]]" (reportAssertTypeFailure)
  c:\Dev\nitypes-python\tests\unit\complex\test_conversion.py:159:17 - error: "assert_type" mismatch: expected "ndarray[tuple[int, int, int], dtype[complexfloating[_32Bit, _32Bit]]]" but received "ndarray[tuple[Literal[6], Literal[7], Literal[8]], dtype[complexfloating[_32Bit, _32Bit]]]" (reportAssertTypeFailure)

@bkeryan
bkeryan merged commit ce6c511 into main Oct 29, 2026
39 checks passed
@bkeryan
bkeryan deleted the users/bkeryan/update-python branch October 29, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants