Bug 2479741 - python-dill fails to build with Python 3.15: AttributeError: 'code' object has no attribute 'co_lnotab'. Did you mean '.co_linetable' instead of '.co_lnotab'?
Summary: python-dill fails to build with Python 3.15: AttributeError: 'code' object ha...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: python-dill
Version: 45
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Pascual
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.15
TreeView+ depends on / blocked
 
Reported: 2026-05-19 08:00 UTC by Karolina Surma
Modified: 2026-08-17 14:41 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github uqfoundation dill issues 753 0 None open co_lnotab triggers error on code object in Python 3.15.0b1 2026-05-21 20:48:22 UTC

Description Karolina Surma 2026-05-19 08:00:25 UTC
python-dill fails to build with Python 3.15.0b1.

+ /usr/bin/python3 dill/tests/__main__.py
<weakref at 0x7fcadd0de6b0; to '_class' at 0x7fcadcbee7b0>:
  'code' object has no attribute 'co_lnotab'
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-dill-0.4.1-build/dill-0.4.1/dill/tests/test_weakref.py", line 69, in <module>
    test_weakref()
    ~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/dill-0.4.1/dill/tests/test_weakref.py", line 56, in test_weakref
    assert not res
           ^^^^^^^
AssertionError
FTraceback (most recent call last):
  File "/builddir/build/BUILD/python-dill-0.4.1-build/dill-0.4.1/dill/tests/test_threads.py", line 44, in <module>
    test_new_thread()
    ~~~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/dill-0.4.1/dill/tests/test_threads.py", line 15, in test_new_thread
    t_ = dill.copy(t)
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 249, in copy
    return loads(dumps(obj, *args, **kwds), ignore=ignore)
                 ~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 289, in dumps
    dump(obj, file, protocol, byref, fmode, recurse, **kwds)#, strictio)
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 261, in dump
    Pickler(file, protocol, **_kwds).dump(obj)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 429, in dump
    StockPickler.dump(self, obj)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 514, in dump
    self.save(obj)
    ~~~~~~~~~^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 423, in save
    StockPickler.save(self, obj, save_persistent_id)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 631, in save
    self.save_reduce(obj=obj, *rv)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 777, in save_reduce
    save(state)
    ~~~~^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 423, in save
    StockPickler.save(self, obj, save_persistent_id)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 588, in save
    f(self, obj)  # Call unbound method with explicit self
    ~^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 1266, in save_module_dict
    StockPickler.save_dict(pickler, obj)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 1074, in save_dict
    self._batch_setitems(obj.items(), obj)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 1100, in _batch_setitems
    save(v)
    ~~~~^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 423, in save
    StockPickler.save(self, obj, save_persistent_id)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 588, in save
    f(self, obj)  # Call unbound method with explicit self
    ~^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 2046, in save_function
    _save_with_postproc(pickler, (_create_function, (
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            obj.__code__, globs, obj.__name__, obj.__defaults__,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            closure
            ^^^^^^^
    ), state), obj=obj, postproc_list=postproc_list)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 1135, in _save_with_postproc
    pickler.save_reduce(*reduction, obj=obj)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 748, in save_reduce
    save(args)
    ~~~~^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 423, in save
    StockPickler.save(self, obj, save_persistent_id)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 588, in save
    f(self, obj)  # Call unbound method with explicit self
    ~^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 992, in save_tuple
    save(element)
    ~~~~^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 423, in save
    StockPickler.save(self, obj, save_persistent_id)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.15/pickle.py", line 588, in save
    f(self, obj)  # Call unbound method with explicit self
    ~^^^^^^^^^^^
  File "/builddir/build/BUILD/python-dill-0.4.1-build/BUILDROOT/usr/lib/python3.15/site-packages/dill/_dill.py", line 1191, in save_code
    obj.co_lnotab, # for < python 3.10 [not counted in args]
    ^^^^^^^^^^^^^
AttributeError: 'code' object has no attribute 'co_lnotab'. Did you mean '.co_linetable' instead of '.co_lnotab'?

https://docs.python.org/3.15/whatsnew/3.15.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.15-b1/fedora-rawhide-x86_64/10477919-python-dill/

For all our attempts to build python-dill with Python 3.15, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/package/python-dill/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.15:
https://copr.fedorainfracloud.org/coprs/g/python/python3.15-b1/

Let us know here if you have any questions.

Python 3.15 is planned to be included in Fedora 45.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.15.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Tomáš Hrnčiar 2026-05-25 11:18:00 UTC
PR: https://src.fedoraproject.org/rpms/python-dill/pull-request/8

Comment 2 Aoife Moloney 2026-08-17 14:41:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.


Note You need to log in before you can comment on or make changes to this bug.