Repository navigation
Tron 2293: Clean up relics from Python 2 migration - #1132
Open
asolorioatyelp wants to merge 4 commits into
Open
asolorioatyelp wants to merge 4 commits into
asolorioatyelp wants to merge 4 commits into
Conversation
asolorioatyelp
marked this pull request as ready for review
October 26, 2026 18:01
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.
Back in #426
maybe_decode/maybe_encodecalls were added throughout Tron, plus a customPy2Shelf, to handle the bytes/str differences between Python 2 and Python 3. We only run Python 3 now, so this PR removes them.Changes
maybe_decode/maybe_encode. Most call sites already receive astr, so the wrapper is simply dropped. A few places do deal with bytes, and those now use an explicit.encode()/.decode().Py2ShelfwithBsdDbShelf. This is a small subclass of the standardshelve.Shelfthat is still backed bybsddb3, so existing state files keep opening.__nonzero__(we already have__bool__) and the(object)bases in docstrings.Known risks
Py2Shelfand reading it back with the new class.strordatetimevalues will no longer load. Production uses DynamoDB/JSON, so I don't think this would be a big issue (maybe just notify others).Ticket: TRON-2293