Skip to content

Update QuantConnect.pythonnet to 2.0.66 - #9772

Merged
jhonabreul merged 1 commit into
QuantConnect:masterfrom
jhonabreul:feature-update-pythonnet-2.0.66
Sep 3, 2026
Merged

Update QuantConnect.pythonnet to 2.0.66#9772
jhonabreul merged 1 commit into
QuantConnect:masterfrom
jhonabreul:feature-update-pythonnet-2.0.66

Conversation

@jhonabreul

@jhonabreul jhonabreul commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Description

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

2.0.66 fixes del obj[key] on reflected .NET types crashing the process: QuantConnect/pythonnet#149. Deletion now works on IDictionary<K,V> and IList<T> implementers (Remove / RemoveAt, KeyError on a missing dictionary key) and raises TypeError on every other type, including arrays. Example that used to abort a Python algorithm: del self.runtime_statistics["MyKey"].

Companions: QuantConnect/LeanCloud.Services#257, QuantConnect/LeanCloud#1486.

Related Issue

N/A

Motivation and Context

Keeps LEAN on the latest QuantConnect.pythonnet and removes a process crash reachable from user Python algorithms.

Requires Documentation Change

No

How Has This Been Tested?

  • With the 2.0.66 Python.Runtime.dll from the published package injected over Lean's test output (mirroring pythonnet's Lean CI workflows): Python regression algorithms 324/324 passed; Python unit tests 16600 passed / 0 failed / 9 skipped.
  • A backtest doing del self.runtime_statistics[key] completes and removes the key.

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:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@jhonabreul
jhonabreul merged commit cfc7e8a into QuantConnect:master Sep 3, 2026
8 checks passed
@jhonabreul
jhonabreul deleted the feature-update-pythonnet-2.0.66 branch September 3, 2026 20:56
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.

2 participants