Skip to content

Conversation

@bkeryan
Copy link
Collaborator

@bkeryan bkeryan commented Dec 12, 2025

What does this Pull Request accomplish?

Add tests for unpickling nitypes objects from previous releases.

I used the REPL to get the pickled_values, e.g.:

>>> pickle.dumps(DigitalWaveform(3, 2, extended_properties={"NI_LineNames": "port0/line1, port0/line0"}).signals[1])
b'\x80\x04\x95\xfa\x01\x00\x00\x00\x00\x00\x00\x8c\x10nitypes.waveform\x94\x8c\x15DigitalWaveformSignal\x94\x93\x94\x8c\x08builtins\x94\x8c\x07getattr\x94\x93\x94h\x00\x8c\x0fDigitalWaveform\x94\x93\x94\x8c\t_unpickle\x94\x86\x94R\x94K\x03K\x02\x8c\x05numpy\x94\x8c\x05dtype\x94\x93\x94\x8c\x02u1\x94\x89\x88\x87\x94R\x94(K\x03\x8c\x01|\x94NNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00t\x94b\x87\x94}\x94(\x8c\x04data\x94\x8c\x16numpy._core.multiarray\x94\x8c\x0c_reconstruct\x94\x93\x94h\x0b\x8c\x07ndarray\x94\x93\x94K\x00\x85\x94C\x01b\x94\x87\x94R\x94(K\x01K\x03K\x02\x86\x94h\x10\x89C\x06\x00\x00\x00\x00\x00\x00\x94t\x94b\x8c\x13extended_properties\x94h\x00\x8c\x1aExtendedPropertyDictionary\x94\x93\x94)\x81\x94N}\x94\x8c\x0b_properties\x94}\x94\x8c\x0cNI_LineNames\x94\x8c\x18port0/line1, port0/line0\x94ss\x86\x94b\x8c\x18copy_extended_properties\x94\x89\x8c\x06timing\x94h\x05h\x00\x8c\x06Timing\x94\x93\x94h\x08\x86\x94R\x94(h\x00\x8c\x12SampleIntervalMode\x94\x93\x94K\x00\x85\x94R\x94NNNNt\x94}\x94\x86\x94R\x94u\x86\x94R\x94K\x01\x86\x94R\x94.'

Why should this Pull Request be merged?

Running https://pypi.org/project/griffe/ against 1.0.0 identified some changes that break pickle compatiblity.

What testing has been done?

Ran tests

@bkeryan bkeryan requested a review from csjall as a code owner December 12, 2025 20:55
@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

Test Results

    56 files  ±  0      56 suites  ±0   26m 15s ⏱️ +31s
 2 294 tests + 18   2 292 ✅ + 16   2 💤 + 2  0 ❌ ±0 
65 656 runs  +486  65 602 ✅ +432  54 💤 +54  0 ❌ ±0 

Results for commit 15ec9ac. ± Comparison against base commit 34019c6.

♻️ This comment has been updated with latest results.

@bkeryan bkeryan merged commit 3991b93 into main Dec 15, 2025
40 checks passed
@bkeryan bkeryan deleted the users/bkeryan/pickle-compatiblity-tests branch December 15, 2025 20:07
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.

3 participants