From 79ac7e1c4bba1d8c195f1e4be31d229195fa024c Mon Sep 17 00:00:00 2001 From: Mark Final Date: Fri, 3 Jul 2026 09:29:25 +0100 Subject: [PATCH 1/4] [Build] Version up PyYaml from 6.0.0 to 6.0.3 This to support Python versions greater than 3.11 - v6.0.0 is no longer needed as it was for compatibility with older versions of Conan that no longer have the restriction - v6.0.0 does not build from source - v6.0.3 is the current latest version published, that supports up to Python 3.14 I chose to use exact pinning rather than the freer form in Conan of any 6.0.x, for consistency. I'm unsure whether the requirements.txt file is needed, as the dependencies in the pyproject.toml needed to be updated during testing, but have updated both for consistency. Closes #136 Signed-off-by: Mark Final --- RELEASE_NOTES.md | 9 +++++++++ pyproject.toml | 2 +- requirements.txt | 2 +- tests/ctest-requirements.txt | 2 +- tests/requirements.txt | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 384f40a..f70fdbb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,15 @@ Release Notes ============= +v1.0.0-alpha.14 +-------------- + +### Bug fixes + +- Bumped `pyyaml` version from `6.0.0` to `6.0.3` since Conan restrictions + first added in v1.0.0-alpha.7 are no longer present and 6.0.0 is not + compatible with Python 3.12+. + v1.0.0-alpha.13 -------------- diff --git a/pyproject.toml b/pyproject.toml index 41fe9d8..1e702ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta" name = "openassetio-traitgen" version = "1.0.0a13" requires-python = ">=3.10" -dependencies = ["jinja2==3.1.6", "pyyaml==6.0.0", "jsonschema==4.7.2"] +dependencies = ["jinja2==3.1.6", "pyyaml==6.0.3", "jsonschema==4.7.2"] authors = [ { name = "Contributors to the OpenAssetIO project", email = "openassetio-discussion@lists.aswf.io" } diff --git a/requirements.txt b/requirements.txt index a8be526..a622a82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,5 @@ # This allows them to be collected/installed prior to build if # required. jinja2==3.1.6 -pyyaml==6.0.0 # We are currently constrained to pyyaml=6.0.0 exactly due to conan 1.60.1 +pyyaml==6.0.3 jsonschema==4.7.2 diff --git a/tests/ctest-requirements.txt b/tests/ctest-requirements.txt index ce9fb42..3601352 100644 --- a/tests/ctest-requirements.txt +++ b/tests/ctest-requirements.txt @@ -1,5 +1,5 @@ cmake==3.25.2 # Configure/build C++ tests -conan==1.60.1 # Install dependencies for C++ tests. +conan==1.62.0 # Install dependencies for C++ tests. cmakelang==0.6.13 # Lint CMake cpplint==1.6.1 # Basic linting of C++ files. clang-tidy==15.0.2.1 # Static analysis of C++ files diff --git a/tests/requirements.txt b/tests/requirements.txt index 3927e63..2b62995 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,5 @@ pytest==9.0.3 -pyyaml==6.0.0 # We are currently constrained to pyyaml=6.0.0 exactly due to conan 1.60.1 +pyyaml==6.0.3 pylint==2.15.5 # Guard against warn/error changes jsonschema==4.7.2 tree-sitter==0.20.1 # For parsing C++ AST to assert on comment text. From ce285f2c8236c772ecd88ef9c9818a73a0ead2b9 Mon Sep 17 00:00:00 2001 From: Mark Final Date: Fri, 3 Jul 2026 09:40:46 +0100 Subject: [PATCH 2/4] [CI]: Enable testing against Python 3.12 This required updating the OpenAssetIO version to the latest, which has wheels for these Python versions. Python 3.13 was not tested, even though it is specified in VFX26, because there were missing wheels for some of the test dependencies. Note that 3.14 is not tested, as there is no current VFX reference platform using this versiony yet. Part of #136 Signed-off-by: Mark Final --- .github/workflows/code-quality.yml | 2 +- .github/workflows/test.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index d2a1859..34a2fb5 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -25,7 +25,7 @@ jobs: # tests/requirements.txt specifies a range. Also see # build_openassetio action. run: | - python -m pip install openassetio==1.0.0rc1.rev0 + python -m pip install openassetio==1.0.2 python -m pip install -r requirements.txt python -m pip install -r tests/requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1234f25..7446778 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: ['windows-2022', 'ubuntu-22.04', 'macos-15-intel'] - python: ["3.10", "3.11"] + python: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v7 @@ -29,7 +29,7 @@ jobs: # tests/requirements.txt specifies a range. Also see # build_openassetio action. - run: | - python -m pip install openassetio==1.0.0rc1.rev0 + python -m pip install openassetio==1.0.2 python -m pip install -r tests/requirements.txt python -m pip install . - name: Test From be89675281b497a49019e771dd81af965f8d8a1e Mon Sep 17 00:00:00 2001 From: Mark Final Date: Fri, 3 Jul 2026 09:53:53 +0100 Subject: [PATCH 3/4] [CI]: Switch to macOS Apple silicon testing Since there are only wheels for the latest OpenAssetIO for this architecture. Part of #136 Signed-off-by: Mark Final --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7446778..789695b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['windows-2022', 'ubuntu-22.04', 'macos-15-intel'] + os: ['windows-2022', 'ubuntu-22.04', 'macos-15'] python: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v7 From 36569cc62ba99186a2e1c05f120c294f5dfca307 Mon Sep 17 00:00:00 2001 From: Mark Final Date: Fri, 3 Jul 2026 10:03:21 +0100 Subject: [PATCH 4/4] [Tests] tree-sitter and related version updates Update to tree-sitter 0.21.3 and tree-sitter-languages 1.10.2. This is for wheels for Python 3.12, but also that distutils was removed from Python 3.12 and was seeing this error ________________ ERROR collecting tests/generators/test_cpp.py _________________ ImportError while importing test module '/Users/runner/work/OpenAssetIO-TraitGen/OpenAssetIO-TraitGen/tests/generators/test_cpp.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py:90: in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/generators/test_cpp.py:33: in from tree_sitter_languages import get_parser, get_language /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tree_sitter_languages/__init__.py:4: in from .core import get_language, get_parser tree_sitter_languages/core.pyx:4: in init tree_sitter_languages.core ??? /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/tree_sitter/__init__.py:4: in from distutils.ccompiler import new_compiler E ModuleNotFoundError: No module named 'distutils' Note there are no wheels for newer Python versions at this time. The tree-sitter version is not the latest, as I found that going to the latest caused incompatibilities with tree-sitter-language. Also, there were some required fixes to the predicates, which omitted the required # prefix as described in the documentation https://tree-sitter.github.io/tree-sitter/using-parsers/queries/3-predicates-and-directives.html Errors were of the form NameError: Invalid node type eq? Note that Copilot helped discover the issues in the tests. The theory was that the older tree-sitter version tolerated the missing prefix. Part of #136 Signed-off-by: Mark Final --- tests/generators/test_cpp.py | 4 ++-- tests/requirements.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/generators/test_cpp.py b/tests/generators/test_cpp.py index 937c555..d936a98 100644 --- a/tests/generators/test_cpp.py +++ b/tests/generators/test_cpp.py @@ -841,7 +841,7 @@ def fn( (function_definition declarator: ( function_declarator - declarator: (field_identifier) @func_name (eq? @func_name "{func}") + declarator: (field_identifier) @func_name (#eq? @func_name "{func}") ) @func_decl ) )""") @@ -867,7 +867,7 @@ def fn( query = cpp_language.query("""(parameter_list ( parameter_declaration declarator: ( reference_declarator (identifier) @var_name - (eq? @var_name "defaultValue") )))""") + (#eq? @var_name "defaultValue") )))""") first_has_default = bool(query.captures(first_decl)) second_has_default = bool(query.captures(second_decl)) diff --git a/tests/requirements.txt b/tests/requirements.txt index 2b62995..ffa1254 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -2,8 +2,8 @@ pytest==9.0.3 pyyaml==6.0.3 pylint==2.15.5 # Guard against warn/error changes jsonschema==4.7.2 -tree-sitter==0.20.1 # For parsing C++ AST to assert on comment text. -tree-sitter-languages==1.5.0 +tree-sitter==0.21.3 # For parsing C++ AST to assert on comment text. +tree-sitter-languages==1.10.2 # Do not pin openassetio to a specific version, so that pip will not # complain when testing against future openassetio versions (e.g. # OpenAssetIO integration test CI).