Skip to content

Update QuantConnect.pythonnet to 2.0.64#9623

Draft
jhonabreul wants to merge 1 commit into
QuantConnect:masterfrom
jhonabreul:feature-update-pythonnet-2.0.64
Draft

Update QuantConnect.pythonnet to 2.0.64#9623
jhonabreul wants to merge 1 commit into
QuantConnect:masterfrom
jhonabreul:feature-update-pythonnet-2.0.64

Conversation

@jhonabreul

Copy link
Copy Markdown
Collaborator

Description

Updates the QuantConnect.pythonnet package reference to 2.0.64 in the 11 csproj that consume it.

Related Issue

N/A — routine dependency update. Brings in QuantConnect/pythonnet#141.

Motivation and Context

pythonnet 2.0.64 fixes two property-assignment bugs surfaced by a user algorithm report:

  • Failed Python-to-CLR conversions at silent Converter.ToManagedValue exits now raise a proper TypeError: '<type>' value cannot be converted to <T> instead of leaving the error indicator unset, which manifested in Lean as the opaque SystemError: error return without exception set during algorithm initialization.
  • C# properties with private setters are now read-only from Python (TypeError: property is read-only); previously a Python assignment like self.universe_manager = ... silently overwrote QCAlgorithm.UniverseManager { get; private set; } through reflection, corrupting engine state.

NOTE: opened as draft — QuantConnect/pythonnet#141 is not merged yet, so 2.0.64 is not on NuGet; will mark ready once the package is indexed.

Requires Documentation Change

No.

How Has This Been Tested?

  • pythonnet 2.0.64: full embed test suite green on Python 3.8–3.14 (PR Open source user Interface #141 CI) and the pytest suite green.
  • End-to-end against Lean master with the 2.0.64 Python.Runtime.dll: a Python algorithm assigning a non-convertible object to self.universe_manager now fails with a clear TypeError: property is read-only at the offending line instead of error return without exception set.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

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.

1 participant