-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(robot-server): Pin pickle protocol version to v4 (#13466)
- Loading branch information
1 parent
238d13f
commit 816eaa7
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
23 changes: 23 additions & 0 deletions
23
robot-server/robot_server/persistence/pickle_protocol_version.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# noqa: D100 | ||
|
||
|
||
from typing_extensions import Final | ||
|
||
|
||
PICKLE_PROTOCOL_VERSION: Final = 4 | ||
"""The version of Python's pickle protocol that we should use for serializing new objects. | ||
We set this to v4 because it's the least common denominator between all of our environments. | ||
At the time of writing (2023-09-05): | ||
* Flex: Python 3.8, pickle protocol v5 by default | ||
* OT-2: Python 3.7, pickle protocol v4 by default | ||
* Typical local dev environments: Python 3.7, pickle protocol v4 by default | ||
For troubleshooting, we want our dev environments be able to read pickles created by any robot. | ||
""" | ||
|
||
|
||
# TODO(mm, 2023-09-05): Delete this when robot-server stops pickling new objects | ||
# (https://opentrons.atlassian.net/browse/RSS-98), or when we upgrade the Python version | ||
# in our dev environments. |
This file contains 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