-
Notifications
You must be signed in to change notification settings - Fork 747
QuantConnect Update #1385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuantConnect Update #1385
Conversation
Thank you for taking this up again.
I'm still very much against doing these conversions without a way to shut them off (while I agree that they might be good defaults). We nowadays have a system to implement additional conversions and configure them at runtime, codecs for the types you listed would be appreciated: https://github.com/pythonnet/pythonnet/wiki/Codecs:-customizing-object-marshalling-between-.NET-and-Python
This might also be implementable as a codec. I'll have a closer look
This looks nice, needs a separate PR.
Also looks like a codec candidate.
This would definitely need a separate PR. You could start with a PR that adds the tests.
Could you give a concrete example of what is failing now? Can it be mitigated using the
This looks good, can you create a PR for this one? |
@filmor @C-SELLERS I sent an email to the pythonnet group about issues coming from #1240. @lostmsu suggested some things (here are 4 and 5 of his suggestions): " I think (4) is something like a revert. |
The old behavior (implicit conversions between numerical types like in the new test) should not be restored. I suggest you require explicit conversion via |
We also have a repository for community-contributed codecs: https://github.com/pythonnet/codecs |
Thank you guys for your feedback! I plan to look into these when permitted and hope to start PR'ing the changes individually that can work! I definitely need to take some time and look at the codec setup you guys have, I wasn't quite sure how it worked and I didn't really understand the wiki either. I'll search for some examples and test it out and see if our conversions can be done that way. |
What does this implement/fix? Explain your changes.
This PR seeks to bring QuantConnect/PythonNet 's changes to the root repo.
Since QuantConnect's fork was so distant from the root repo it required that I reapply all the needed changes in order to keep desired functionality. To denote this in the commits I referenced the PR I was trying to replicate. Please be aware that Github will link these to the root #n PR but they are all referencing QuantConnect/PythonNet PRs
Any other comments?
QuantConnect Changes Reflected (Reference QuantConnect/PythonNet for original PR):
Patches to address failures in Lean:
PyNumber_Long
but still keeps the use ofRuntime.PyLong_AsSignedSize_t
to finish the conversion. The bug that discovered this was trying to convert a Python float to int, this used to work but was failing until this refactor. Reference the added test in bd94e49. ( d87584b )Tests added:
Some tests had to be adjusted for behavior changes caused by our commits. I have adjusted enough to have all PythonNet embedded tests passing, but there are still some issues with PyTests that need to be addressed/resolved.
I'm aware this a huge collection of changes, so I don't expect this to be easy but would hope maybe there is a way to bring our branches together so we can help improve PythonNet in the future.
Also note this branch is also a pending PR to QuantConnect/PythonNet . Reference this PR at QuantConnect#47
Checklist
Check all those that are applicable and complete.
AUTHORS
CHANGELOG