Skip to content

Update QuantConnect.pythonnet to 2.0.65 - #9660

Closed
jhonabreul wants to merge 1 commit into
QuantConnect:masterfrom
jhonabreul:feature-update-pythonnet-2.0.65
Closed

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

Conversation

@jhonabreul

Copy link
Copy Markdown
Collaborator

Description

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

2.0.65 makes .NET DateTime values converted to Python support subtraction and ordering against pure datetime.date operands (coerced via the datetime's date part), removing the unsupported operand type(s) for -: 'datetime.datetime' and 'datetime.date' / can't compare datetime.datetime to datetime.date failures from user algorithms' DTE-style math: QuantConnect/pythonnet#143.

Do not merge until QuantConnect/pythonnet#143 is merged and 2.0.65 is indexed on NuGet — restore fails before then. Companion (no merge-order dependency): #9659 improves the error messages for the datetime/date mixes pythonnet cannot coerce.

Related Issue

N/A

Motivation and Context

DTE filtering ((contract.id.date - self.time.date()).days) is the most repeated runtime arithmetic failure in user Python algorithms; 2.0.65 removes it.

Requires Documentation Change

No

How Has This Been Tested?

  • With the 2.0.65 Python.Runtime.dll injected over Lean's test output (mirroring pythonnet's Lean CI workflows): Python unit tests 16045 passed / 0 failed / 9 skipped; Python regression algorithms 324/324 passed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • 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.

@jhonabreul

Copy link
Copy Markdown
Collaborator Author

Superseded: the version bump moved into #9659 alongside the datetime/date error-message improvements.

@jhonabreul jhonabreul closed this Aug 10, 2026
@jhonabreul
jhonabreul deleted the feature-update-pythonnet-2.0.65 branch August 10, 2026 16:57
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