DYN-9388 Make PythonNet3 default python engine as built-in package#16644
Conversation
This reverts commit 0389294.
…kage-does-not-load
cpython still present but does not load
…com/ivaylo-matov/Dynamo into DYN-9388-Net3-package-does-not-load
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9388
There was a problem hiding this comment.
Pull Request Overview
This PR transitions the default Python engine from CPython3 to PythonNet3 by loading it as a built-in package, addressing issues with CPython's null-reference exceptions when calling .NET methods. The update includes automatic node migration, user notifications, and test suite updates to reflect the new default engine.
- Replaces CPython3 with PythonNet3 as the default built-in Python engine
- Implements automatic migration of legacy CPython nodes to PythonNet3 with user notifications
- Updates all test graphs and test code to use PythonNet3 instead of CPython3
Reviewed Changes
Copilot reviewed 87 out of 100 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| global.json | Updates .NET SDK version to rc.1.25451.107 |
| src/DynamoCore/DynamoCore.csproj | Adds PythonNet3 package reference and build target to create built-in package structure |
| src/NodeServices/PythonServices.cs | Adds PythonNet3EngineName constant and removes CPython auto-loading logic |
| src/Libraries/PythonNodeModels/PythonNode.cs | Changes default engine from CPython3 to PythonNet3 and adds ShowAutoUpgradedBar property |
| src/PythonMigrationViewExtension/PythonMigrationViewExtension.cs | Implements CPython to PythonNet3 auto-upgrade logic with toast notifications |
| src/DynamoCoreWpf/Properties/Resources.resx | Adds localized strings for Python engine change notifications |
| test/Libraries/DynamoPythonTests/*.cs | Updates all test files to use PythonNet3Evaluator instead of CPythonEvaluator |
| test/core/python/*.dyn | Updates test graph files to use PythonNet3 engine |
| src/Libraries/DSCPython/* | Removes entire DSCPython library and related resource files |
Files not reviewed (4)
- src/DynamoCoreWpf/Properties/Resources.Designer.cs: Language not supported
- src/Libraries/DSCPython/Properties/Resources.Designer.cs: Language not supported
- src/Libraries/PythonNodeModels/Properties/Resources.Designer.cs: Language not supported
- src/PythonMigrationViewExtension/Properties/Resources.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)
src/PythonMigrationViewExtension/PythonMigrationViewExtension.cs:1
- Corrected spelling of 'sis' to 'is'.
src/PythonMigrationViewExtension/PythonMigrationViewExtension.cs:1 - Corrected spelling of 'toas' to 'toast'.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…s://github.com/ivaylo-matov/Dynamo into DYN-9388-Make-PythonNet3-default-in-4.0_251024
This reverts commit 6bde6d0.
|
@ivaylo-matov We have updated our build pipelines with RC2 for master, can you update this PR accordingly? Also, mark the 3 failing test as failure, and note them down so we can take a look at them later. |
Update DynamoCore.csproj
d12f49d to
1e56a28
Compare
|
@zeusongit, done! |
Changed the Python engine from CPython3 to PythonNet3 in Core_Math.dyn and Core_Python.dyn. Also updated output names, descriptions, group properties, and version metadata in Core_Python.dyn for improved clarity and compatibility.
…s://github.com/ivaylo-matov/Dynamo into DYN-9388-Make-PythonNet3-default-in-4.0_251024
|
Cherrypicked some changes from my other branch, which I created based off this PR. |
…ynamoDS#16644) Co-authored-by: Copilot <[email protected]> Co-authored-by: Ashish Aggarwal <[email protected]>
jasonstratton
left a comment
There was a problem hiding this comment.
I think it looks good. There's a lot in there.
Purpose
PR in response to DYN-9388.
This is re-submit of #16548 with one major change:
proposed upgrade to SDK
10.0.100-rc.2.25502.107Previous downgrade to preview.5 seems to be causing a bug where calling .NET methods from Python can throw odd null-ref exceptions.
With the proposed changes all but 2 DynamoPythonTests pass locally. The two failing test are caused by updates in python 3.11 and have been marked as failures for the time being.
Failing tests:
Test_With_Exception_IDisposeCheck_PythonTestListDecodingDeclarations
Check these if you believe they are true
Release Notes
Make PythonNet3 default python engine as built-in package
Reviewers
@zeusongit
@DynamoDS/eidos
FYIs
@dnenov
@achintyabhat