Skip to content

Implement support for DLR get/set#2706

Open
filmor wants to merge 2 commits intomasterfrom
dlr
Open

Implement support for DLR get/set#2706
filmor wants to merge 2 commits intomasterfrom
dlr

Conversation

@filmor
Copy link
Copy Markdown
Member

@filmor filmor commented Apr 18, 2026

Implements #72 and should thus fix #2696.

@spkl Could you try out this branch?

@filmor filmor requested a review from lostmsu April 18, 2026 13:51
@filmor filmor force-pushed the dlr branch 2 times, most recently from 0a27223 to 34eff30 Compare April 18, 2026 16:35
@filmor filmor marked this pull request as ready for review April 20, 2026 07:23
@spkl
Copy link
Copy Markdown

spkl commented Apr 20, 2026

@filmor If I understand this correctly, one wouldn't even need the dynamic.py script anymore for DynamicObject access to work, correct? That seems great :)
To test this in our setup, can you point me to a wheel that I can install, or provide documentation how to build it?

@filmor
Copy link
Copy Markdown
Member Author

filmor commented Apr 20, 2026

@spkl Yes, the dynamic support would be integrated. To build a wheel, the simplest way is to get uv and the .NET SDK installed on your machine, check out the repo and run uv build. That builds the wheel in dist/.

@spkl
Copy link
Copy Markdown

spkl commented Apr 20, 2026

OK so I did a little digging and found out that I can pip install . in the root directory of the pythonnet repository to install this version into my venv.
Edit: Is this wrong? Should I try again with uv?

Getting the value of dynamic properties seems to work, but I encountered a problem when setting dynamic properties. This is what I observed when running a script like this:

x = obj.MyProp
obj.MyProp = None
y = obj.MyProp

For line 1, TryGetMember is called for name "MyProp" and x will correctly be assigned the value returned from there.
For line 2, TrySetMember is NOT called.
For line 3, TryGetMember is NOT called, y will be assigned the value from line 2 (None), but that value is unknown to the .NET implementation.

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.

DynamicObject support script no longer working since version 3.1.0rc0

2 participants