Repository navigation
smarkets: parse nanosecond timestamps on Python 3.10 - #34
Merged
Merged
Conversation
Smarkets sends up to nine fraction digits. The digit scan also picked up the time zone's digits, and Python 3.10's fromisoformat takes only three or six fraction digits, so every timestamp came back as None there. Take the leading digits only and pad them to six. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YukiC0804
added a commit
that referenced
this pull request
Oct 21, 2026
Sync main into the experimental line (#34)
YukiC0804
pushed a commit
that referenced
this pull request
Oct 21, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YukiC0804
pushed a commit
that referenced
this pull request
Oct 21, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Python 3.10 CI failure on main after #33. Three tests failed:
test_quotes_last_price_and_volume,test_results_from_a_settled_fixtureandtest_fetch_trades_oldest_first_from_the_recent_tape.Smarkets timestamps carry up to nine fraction digits.
iso_msscanned every digit after the dot, the time zone's included, and Python 3.10'sfromisoformataccepts only three or six fraction digits. The result wasNoneon 3.10, while 3.12 and 3.13 passed. The fix takes the leading digits only and pads them to six.Checked on Python 3.10: the full suite passes, as do the Betfair and Smarkets tests (182).
🤖 Generated with Claude Code