Repository navigation
build!: replace dill with pickle and allow python 3.15 - #680
Merged
Merged
Conversation
Sqlite3MutableMapping used dill to serialize values. Nothing in the library needs dill's by-value pickling: enref/deref only stores VRS models, which pickle by reference. The only dependent was test_classes, which stored a class defined inside the test function. Move that class to module level, switch to pickle, and drop the dill dependency. dill 0.3.x also fails on Python 3.15, where code objects no longer have co_lnotab. Values written by dill for importable classes contain no dill references and load with pickle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The <3.15 cap was only needed for dill compatibility, and dill is no longer a dependency. Add 3.15 to the classifiers and CI matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
korikuzma
approved these changes
Oct 27, 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.
Targets #677. Instead of capping Python at
<3.15, this removes the reason for the cap.Background
The 3.15 failure in #677's CI (run) came from dill 0.3.9 reading
code.co_lnotab, which Python 3.15 removed. dill pickles a class by value only when it can't be imported, and only then does it serialize code objects. In this repo the only such class was intest_classes, where it was defined inside the test function. VRS models stored throughvrs_enref/vrs_derefpickle by reference and never reach the failing path. The fix isn't in any dill release yet (0.4.1 is the latest), and our~=0.3.7pin would block it anyway.Sqlite3MutableMappingis the only user of dill, and the store is the only reason dill is in the dependency tree. Nothing in the library, notebooks or docs, and nothing GitHub code search finds elsewhere, depends on dill's by-value pickling.Changes
dill.dumps/dill.loadstopickle, and dropsdill~=0.3.7from theextrasextra. Breaking because the dependency is removed, and because a store holding values that only dill can read (classes pickled by value) would no longer load. Values dill wrote for importable classes, such as VRS models, contain no dill references and load fine withpickle.<3.15cap, adds the 3.15 classifier, and puts 3.15 back in the CI matrix. The dev Python version stays at 3.14.Testing
Ran the full suite locally with
.[tests,extras](as in CI): 253 passed on each of 3.11.16, 3.12.14, 3.13.7, 3.14.7 and 3.15.0rc2.Open question
Sqlite3MutableMappinghas no known users. It may be worth deprecating or removing it in v3, separately from this PR.Sqlite3MutableMappingis provided as a way to use vrs_enref/deref using disk, so thatdictis not the only option. However it may be worth considering whether we need this.