From a4d8fce2e9ae451c3bb089cc4846feaebd1784fa Mon Sep 17 00:00:00 2001 From: Lucas Brown <54835354+imlucasbrown@users.noreply.github.com> Date: Fri, 13 Feb 2026 11:54:12 -0600 Subject: [PATCH 1/2] * Python 3.14 compatibility * Skip non-.py files in plugin loader to avoid crashes on stale .pyc bytecode * Use class-defined _NodeSpec for INTERNAL_ATTRS.BUILTINS so __firstlineno__ and __static_attributes__ (added in Python 3.12+) are properly filtered * Bump python_requires upper bound from <3.12 to <3.15 Co-Authored-By: Claude Opus 4.6 --- nxt/nxt_node.py | 4 +++- nxt/plugin_loader.py | 2 ++ setup.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nxt/nxt_node.py b/nxt/nxt_node.py index 394b9f6..5ea9b68 100644 --- a/nxt/nxt_node.py +++ b/nxt/nxt_node.py @@ -40,7 +40,9 @@ class INTERNAL_ATTRS(object): CACHED_CODE = _prefix + 'cached_code' # List of python attrs that a node will have but we don't want to parse or # considering in our composite logic - BUILTINS = tuple(dir(type('NodeSpec', (object,), {}))) + class _NodeSpec(object): + pass + BUILTINS = tuple(dir(_NodeSpec)) # A list of node attrs that are used internally in our composite logic but # tracked and like user attrs with a `_source__nxt` meta attr TRACKED = (COMPUTE, EXECUTE_IN, COMMENT, START_POINT, ENABLED, diff --git a/nxt/plugin_loader.py b/nxt/plugin_loader.py index 836e8cf..18d75ad 100644 --- a/nxt/plugin_loader.py +++ b/nxt/plugin_loader.py @@ -20,6 +20,8 @@ def load_plugins(): if not os.path.isdir(plugin_dir): continue for file_name in os.listdir(plugin_dir): + if not file_name.endswith('.py'): + continue mod_name, _ = os.path.splitext(file_name) if mod_name in _nxt_loaded_plugin_module_names: continue diff --git a/setup.py b/setup.py index 71e5eb9..dd72e7d 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ long_description_content_type="text/markdown", url="https://github.com/nxt-dev/nxt", packages=setuptools.find_packages(), - python_requires='>=3.7, <3.12', + python_requires='>=3.7, <3.15', entry_points={ 'console_scripts': [ 'nxt=nxt.cli:main', From 4f88df58bafe5a9f9e167a7b893e41aedbe85fc7 Mon Sep 17 00:00:00 2001 From: Lucas Brown <54835354+imlucasbrown@users.noreply.github.com> Date: Fri, 13 Feb 2026 12:00:36 -0600 Subject: [PATCH 2/2] + Add Python 3.14 to CI test matrix Co-Authored-By: Claude Opus 4.6 --- .github/workflows/unittests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 7d60645..f0d2712 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.14'] fail-fast: true runs-on: ${{ matrix.os }}