Point the OWID submodule at the date range fix - #70
Merged
Conversation
owid-python moves from 0944322 to 0a77e39e, the merged commit on main of the 51Degrees fork. That commit refuses a version 2 or 3 minute count above 4,197,074,399, which is a date past the end of the year 9999 where datetime stops, before the arithmetic, so a read reports IMPLEMENTATION_CAPACITY_EXCEEDED instead of raising OverflowError. Nothing else changed in the library since the previous pin. The copy under fiftyone_pipeline_did/_owid is made by ci/copy-owid-source.ps1 and is not tracked, so the pin is the only library change here. FodIdParseStatus and the package readme now say that IMPLEMENTATION_CAPACITY_EXCEEDED also covers such a date. The member already carried the same name and value, so the vocabulary test and the public API are unchanged. test_fodid proves that a 51Did envelope with minute count 0xFFFFFFFF reports that status through FodId.try_from_base64 and FodId.try_from_byte_array, with the OWID reader's own status checked first, and that FodId.from_base64 and FodId.from_byte_array raise OwidError naming the status for the same bytes.
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.
What changed
The
owid-pythonsubmodule moves from 0944322 to 0a77e39e, the merged commit on main of the 51Degrees fork. That commit (SWAN-community/owid-python#3) refuses a version 2 or 3 minute count above 4,197,074,399 before the arithmetic, so a date past the end of the year 9999, wheredatetimestops, reportsIMPLEMENTATION_CAPACITY_EXCEEDEDinstead of raisingOverflowError. The four byte minute count of the wire format runs to 15 February 10186, and the same bytes read fine where the date type is wider, so the status is the runtime's limit and not a fault in the data. Nothing else changed in the library since the previous pin, which the hardening change (#68) set. The copy underfiftyone_pipeline_did/src/fiftyone_pipeline_did/_owidis made byci/copy-owid-source.ps1at build time and is not tracked, so the pin is the only library change in this repository.In this repository:
FodIdParseStatus.IMPLEMENTATION_CAPACITY_EXCEEDEDand the status table infiftyone_pipeline_did/readme.mdnow say the status also covers such a date. The member already carried the same name and value as the OWID one, so the vocabulary test needed no change and the public API is unchanged.tests/test_fodid.pygains two tests. A signed envelope whose minute count is 0xFFFFFFFF reportsIMPLEMENTATION_CAPACITY_EXCEEDEDthroughFodId.try_from_base64andFodId.try_from_byte_array, with the OWID reader's own status checked first so the test shows where the status comes from, andFodId.from_base64andFodId.from_byte_arrayraiseOwidErrornaming the status for the same bytes.Verification
ci/copy-owid-source.ps1copied the source at 0a77e39e into the package.tox -e pyinfiftyone_pipeline_did: 143 passed, 2 skipped, no failures.Produced with AI assistance under James Rosewell's direction and needs human review.