Package: src:rpyc
Version: 6.0.2-1
User: [email protected]
Usertags: python3.15
Tags: patch, ftbfs, forky, sid
Severity: important

Hi!

While rebuilding the python related packages against the Python 3.15rc2 version 
we found that rpyc fails to build from source [1].

The error is: AttributeError: cannot access 'MyClass'

This is caused by using deprecated co_lnotab, and can be solved by migrating to 
co_linetable. I have created a patch for this.

I've applied the fix in the sandbox [2] to verify that it builds successfully, 
please consider applying the patch to support the upcoming 3.15 version.

Setting the severity to important for now. Once Python 3.15 is released, it 
will be added to python3-defaults and this bug will become release critical.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/4855987/
[2]: 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 /\/\ /\ >< `/
Description: Use co_linetable in test_compat, co_lnotab was removed in Python 3.15
Author: Maximiliano Curia <[email protected]>
Forwarded: no
Last-Update: 2026-09-28
---
Index: rpyc/tests/test_teleportation.py
===================================================================
--- rpyc.orig/tests/test_teleportation.py
+++ rpyc/tests/test_teleportation.py
@@ -1,6 +1,6 @@
 from __future__ import with_statement
 from rpyc.utils.classic import teleport_function
-from rpyc.lib.compat import is_py_3k, is_py_gte38, is_py_gte311
+from rpyc.lib.compat import is_py_3k, is_py_gte38, is_py_gte310, is_py_gte311
 from rpyc.utils.teleportation import export_function, import_function
 import subprocess
 import sys
@@ -99,23 +99,26 @@ class TeleportationTest(unittest.TestCas
 
     def test_compat(self):  # assumes func has only brineable types
 
+        def lines(cobj):  # co_lnotab was removed in 3.15
+            return cobj.co_linetable if is_py_gte310 else cobj.co_lnotab
+
         def get37_schema(cobj):
             return (cobj.co_argcount, 0, cobj.co_nlocals, cobj.co_stacksize,
                     cobj.co_flags, cobj.co_code, cobj.co_consts, cobj.co_names, cobj.co_varnames,
-                    cobj.co_filename, cobj.co_name, cobj.co_firstlineno, cobj.co_lnotab,
+                    cobj.co_filename, cobj.co_name, cobj.co_firstlineno, lines(cobj),
                     cobj.co_freevars, cobj.co_cellvars)
 
         def get38_schema(cobj):
             return (cobj.co_argcount, 2, cobj.co_kwonlyargcount, cobj.co_nlocals,
                     cobj.co_stacksize, cobj.co_flags, cobj.co_code, cobj.co_consts, cobj.co_names,
-                    cobj.co_varnames, cobj.co_filename, cobj.co_name, cobj.co_firstlineno, cobj.co_lnotab,
+                    cobj.co_varnames, cobj.co_filename, cobj.co_name, cobj.co_firstlineno, lines(cobj),
                     cobj.co_freevars, cobj.co_cellvars)
 
         def get311_schema(cobj):
             return (cobj.co_argcount, 2, cobj.co_kwonlyargcount, cobj.co_nlocals,
                     cobj.co_stacksize, cobj.co_flags, cobj.co_code, cobj.co_consts, cobj.co_names,
                     cobj.co_varnames, cobj.co_filename, cobj.co_name, cobj.co_qualname,
-                    cobj.co_firstlineno, cobj.co_lnotab, cobj.co_exceptiontable,
+                    cobj.co_firstlineno, lines(cobj), cobj.co_exceptiontable,
                     cobj.co_freevars, cobj.co_cellvars)
 
         if is_py_gte38:

Reply via email to