Package: src:dill
Version: 0.4.1-1
User: [email protected]
Usertags: python3.15
Tags: patch, forky, sid

Hi!

While rebuilding the python related packages against the Python 3.15rc1
version we found that dill causes a bug in other packages (in this case
pylint [1]).
The error is that dill tries to access co_lntab which is removed in
3.15, upstream already has a fix for this [2].

I applied the upstream fix in the sandbox [3] to be able to have working
packages that depend on dill, please consider applying the patch to
support the upcoming 3.15 version.

Happy hacking,

[1]: 
https://debusine.debian.net/debian/r-python-python3.15/work-request/1124193/
[2]: 
https://github.com/uqfoundation/dill/commit/37d2bf717ac7ac110f06be5210f989847959c2cd
[3]: https://debusine.debian.net/debian/r-python-python3.15/

--
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/
From 37d2bf717ac7ac110f06be5210f989847959c2cd Mon Sep 17 00:00:00 2001
From: Mike McKerns <[email protected]>
Date: Sat, 23 May 2026 17:57:03 -0400
Subject: [PATCH] handle missing co_lntab in 3.15.0b1 (#755)

---
 dill/_dill.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dill/_dill.py b/dill/_dill.py
index 27ab56c..da8aee2 100644
--- a/dill/_dill.py
+++ b/dill/_dill.py
@@ -1187,8 +1187,8 @@ def save_code(pickler, obj):
         with warnings.catch_warnings():
             if not OLD312a7: # issue 597
                 warnings.filterwarnings('ignore', category=DeprecationWarning)
-            args = (
-                obj.co_lnotab, # for < python 3.10 [not counted in args]
+            args = (                            # [not counted in args]
+                getattr(obj, 'co_lnotab', b''), # for < python 3.10; 3.15.0b1+
                 obj.co_argcount, obj.co_posonlyargcount,
                 obj.co_kwonlyargcount, obj.co_nlocals, obj.co_stacksize,
                 obj.co_flags, obj.co_code, obj.co_consts, obj.co_names,
-- 
2.53.0

Reply via email to