Repository navigation
Disable automatic use of pickle in ComponentUID - #4105
Merged
Merged
Conversation
mrmundt
reviewed
Nov 18, 2026
Comment on lines
+819
to
+821
| # Note that the pickle string for namedtuple changes between | ||
| # Python 2, 3, and pypy, so we will just check the non-pickle | ||
| # data part |
Contributor
There was a problem hiding this comment.
I will NOT let this hold anything up but are we sure any of this nonsense is still accurate given changes in Python 3 and pypy and the overall Python ecosystem? References to Python 2 make me suspicious
mrmundt
approved these changes
Nov 18, 2026
mrmundt
left a comment
Contributor
There was a problem hiding this comment.
We love deferred imports!
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4105 +/- ##
=======================================
Coverage 90.29% 90.30%
=======================================
Files 920 920
Lines 109601 109616 +15
=======================================
+ Hits 98969 98988 +19
+ Misses 10632 10628 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
blnicho
approved these changes
Nov 19, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes # .
NOTE: this is not backwards compatible: users who put custom types into indices and then use ComponentUID will need to either re-enable pickle, or register their own serializer/deserializer.
Summary/Motivation:
This PR disables the automatic use of pickle when generating / restoring string representations of
ComponentUIDobjects. We still support arbitrary classes in component indexes, however users will need to register callback functions to handle the serialization / deserialization action.Users can restore previous behavior by setting
ComponentUID.EnablePickle = TrueChanges proposed in this PR:
ComponentUID.EnablePickleto control if ComponentUID string representations can use pickle for unknown typesComponentUID.Serializerso users can register custom string serialization / deserialization functionsAI-Use Disclosure
or
AI tools contributed to the development of this PR
Review process (select ONE):
Notes for reviewers (optional):
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: