Skip to content

build!: replace dill with pickle and allow python 3.15 - #680

Merged
theferrit32 merged 2 commits into
issue-477from
kf/issue-477-drop-dill
Oct 27, 2026
Merged

theferrit32 merged 2 commits into
issue-477from
kf/issue-477-drop-dill

Conversation

@theferrit32

@theferrit32 theferrit32 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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 in test_classes, where it was defined inside the test function. VRS models stored through vrs_enref/vrs_deref pickle 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.7 pin would block it anyway.

Sqlite3MutableMapping is 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

  1. build!: replace dill with stdlib pickle in object store. Moves the test class to module level, switches dill.dumps/dill.loads to pickle, and drops dill~=0.3.7 from the extras extra. 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 with pickle.
  2. build: allow python 3.15. Removes the <3.15 cap, 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

Sqlite3MutableMapping has no known users. It may be worth deprecating or removing it in v3, separately from this PR.

Sqlite3MutableMapping is provided as a way to use vrs_enref/deref using disk, so that dict is not the only option. However it may be worth considering whether we need this.

theferrit32 and others added 2 commits October 27, 2026 14:54
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>
@theferrit32
theferrit32 requested review from a team as code owners October 27, 2026 18:59

@korikuzma korikuzma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small thing

Comment thread pyproject.toml
@theferrit32
theferrit32 merged commit 7d01f9b into issue-477 Oct 27, 2026
18 checks passed
@theferrit32
theferrit32 deleted the kf/issue-477-drop-dill branch October 27, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants