Skip to content

Pickles are Bad, JSON is Good #446

@coreyostrove

Description

@coreyostrove

While it happens that I also dislike pickles of the cucumber variety, I am of course referring to serialized objects produced using the pickle module. The issue is often due to backwards compatibility issues that arise that make it very difficult to unpickle things produced using prior versions of pygsti in the newest environment. This is all stuff that we know already, and was the impetus for spinning up our own bespoke json-based serialization routines.

I bring this up because there are still a bunch of pickles floating around the repository, notably in the testing modules, which themselves are just as susceptible to breaking (as happened recently with the changes made on PR #445). While it wasn't a big deal to update the pickle file in this one instance, I suspect we should be able to nix most instances of these in the codebase and substitute them with natively serialized equivalents. (Also, pickles are notoriously insecure and we probably should avoid having them in the repository as much as possible to begin with).

Not a high priority, but I wanted to bookmark this as something to work on the next time we take a dive into the testing infrastructure.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for a new feature or a change to an existing featurelow priorityDevelopers should be aware of this issue, but it need not be addressed imminently

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions