Public bug reported:

LP buildlog: https://launchpadlibrarian.net/861245115/buildlog_ubuntu-
stonking-amd64.python-cobra_0.29.1-4_BUILDING.txt.gz

```
__________________________________ test_copy ___________________________________

model = <Model e_coli_core at 0x7d52e7f1c650>

    def test_copy(model: Model) -> None:
        """Test reaction copying."""
        PGI = model.reactions.PGI
>       copied = PGI.copy()
                 ^^^^^^^^^^

tests/test_core/test_core_reaction.py:393: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cobra/core/reaction.py:960: in copy
    new_reaction = deepcopy(self)
                   ^^^^^^^^^^^^^^
/usr/lib/python3.14/copy.py:138: in deepcopy
    y = copier(memo)
        ^^^^^^^^^^^^
cobra/core/reaction.py:273: in __deepcopy__
    cop = deepcopy(super(Reaction, self), memo)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/copy.py:157: in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/copy.py:234: in _reconstruct
    y = func(*args)
        ^^^^^^^^^^^
/usr/lib/python3.14/copy.py:233: in <genexpr>
    args = (deepcopy(arg, memo) for arg in args)
            ^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/copy.py:138: in deepcopy
    y = copier(memo)
        ^^^^^^^^^^^^
cobra/core/reaction.py:273: in __deepcopy__
    cop = deepcopy(super(Reaction, self), memo)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E   RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)
```

Upstream bug filed: https://github.com/opencobra/cobrapy/issues/1474

I have written a patch as a temporary fix. I will file a bug in debian
as well since this issue arises from the use of Python 3.14 and affects
debian as well (they have currently only built with Python 3.13)

I am creating another bug report for test failures arising after
patching this bug.

** Affects: python-cobra (Ubuntu)
     Importance: Undecided
     Assignee: Ujjwal Sarswat (vmpyr)
         Status: In Progress


** Tags: ftbfs

** Tags added: ftbfs

** Changed in: python-cobra (Ubuntu)
     Assignee: (unassigned) => Ujjwal Sarswat (vmpyr)

** Changed in: python-cobra (Ubuntu)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2154412

Title:
  RecursionError in Reaction.__deepcopy__ with Python 3.14

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-cobra/+bug/2154412/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to