Skip to content

ExtendedPropertyDictionary._on_key_changed breaks pickle compatibility #234

@bkeryan

Description

@bkeryan

Bug Report

Unpickling an nitypes 1.0.0 DigitalWaveform or DigitalWaveformSignals fails because the unpickled ExtendedPropertyDictionary does not have _on_key_changed set

Repro or Code Sample

New regression tests

Expected Behavior

It works

Current Behavior

AttributeError: 'ExtendedPropertyDictionary' object has no attribute '_on_key_changed'

Possible Solution

Update DigitalWaveform to use hasattr to check whether _on_key_changed is present and initialize it if needed

Context

Reviewing #233

Your Environment

AB#3623937

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions