Repository navigation
fix(dumpkit): write plist dates to whole seconds so plistlib reads them (#1448) - #1450
Conversation
6c20e67 to
4a2d70c
Compare
4a2d70c to
4029129
Compare
4029129 to
5403616
Compare
|
Verdict: GOOD TO GO at
Conflict with #1445: both PRs edit |
|
Coverage: 89.51% (unit tier, Python 3.14,
Per-file detail: the |
|
resolve conflicts |
|
On it. The worker is rebasing onto |
5403616 to
11e7876
Compare
…em (#1448) dictdumper's PLIST._append_date writes '%Y-%m-%dT%H:%M:%S.%fZ', which the property list <date> grammar does not admit, so plistlib.load failed on the plist/xml report of every capture. - Override _append_date in make_dumper for PLIST writers: convert an aware value to UTC, take a naive one as UTC, truncate to whole seconds, and zero-pad the year, as plistlib.dump does. - The exact value is kept by the sibling field every reported timestamp already has (time_epoch / timestamp_epoch, or the MH option's raw ntp_timestamp / pmip_timestamp), so no key is added. - Un-skip PlistRoundTripTests in tests/integration/test_output_formats.py and add tests/dumpkit/test_plist_date_unit.py. - Read the #772 regression's plist report back with plistlib.load, and update the note in docs/source/contributing/pep.rst. - Drop the #1448 row from KNOWN_FAILURES in tests/dumpkit/test_capture_dump_runtime.py, which now passes. json and tree output is unchanged.
11e7876 to
2ab8bbe
Compare
|
Verdict: GOOD TO GO at
|
Searched for similar pull requests
Followed the coding style — pylint, mypy and isort run on the changed files; no new findings
make testpasses, and a test case covers the change —dumpkitleg 232/0,foundationleg 528/0,tests/integration/test_output_formats.py14 passed,tests/project419 passed; the three touched plist modules also pass on Python 3.10 (23 passed)Changelog entry — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657
fix— corrects a defectCloses #1448
dictdumper'sPLIST._append_datewrites.%fZ, which plist<date>does not admit.make_dumpernow overrides it forPLISTwriters, so thexmloutput (alsoPLIST) changes too. Aware values are converted to UTC and the fraction of the already microsecond-rounded datetime is dropped, asplistlib.dumpdoes.Precision: no key is added. Every reported timestamp already has an exact sibling:
time_epoch/timestamp_epoch(a Decimal), or the rawntp_timestamp/pmip_timestampfor the MH options. Checked over all 1660 dates in the 23 captures.plistlib.loadon the 23 captures: 0/23 before → 23/23 after.<date>lines change.test_plist_date_unit.py,test_plist_report_round_trips_through_plistlib(now un-skipped), and the dictdumper PLIST writer does not escape angle brackets, so a pseudo-member makes the dump unparseable #772 testtest_the_plist_report_of_a_bytes_keyed_mapping_parses(now reads viaplistlib.load). Thepep.rstnote is updated.KNOWN_FAILURESrow for fix(dumpkit): plist output is unreadable by plistlib because timestamps carry fractional seconds #1448 intests/dumpkit/test_capture_dump_runtime.pyis removed, and that module passes.