Public bug reported:

```
tests/test_summary/test_reaction_summary.py:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cobra/core/reaction.py:1659: in summary
    return ReactionSummary(
cobra/summary/reaction_summary.py:73: in __init__
    self._reaction = reaction.copy()
                     ^^^^^^^^^^^^^^^
cobra/core/reaction.py:966: in copy
    new_reaction = deepcopy(self)
                   ^^^^^^^^^^^^^^
/usr/lib/python3.14/copy.py:138: in deepcopy
    y = copier(memo)
        ^^^^^^^^^^^^
cobra/core/reaction.py:279: in __deepcopy__
    setattr(cop, k, deepcopy(v, memo))
                    ^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/copy.py:157: in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

x = cobra.core.gene.GPR('b3916 or b1723')
memo = {133461221447936: [{}, {'bigg.reaction': 'PFK'}], 133461249907728: 
<Reaction PFK at 0x7961de646ed0>, 133461266794368: {}, 133461266805696: 
{'bigg.reaction': 'PFK'}}
func = <class 'cobra.core.gene.GPR'>
args = <generator object _reconstruct.<locals>.<genexpr> at 0x7961e274b880>
state = {'_genes': {'b1723', 'b3916'}, 'body': BoolOp(op=Or(), 
values=[Name(id='b3916', ctx=Load()), Name(id='b1723', ctx=Load())]), 
'type_ignores': []}
listiter = None, dictiter = None

    def _reconstruct(x, memo, func, args,
                     state=None, listiter=None, dictiter=None,
                     *, deepcopy=deepcopy):
        deep = memo is not None
        if deep and args:
            args = (deepcopy(arg, memo) for arg in args)
>       y = func(*args)
            ^^^^^^^^^^^
E       TypeError: GPR.__init__() takes from 1 to 2 positional arguments but 3 
were given
```

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

Patching (LP: #2154412) causes this issue to crop up. Full details in
the upstream bug report.

I have written a patch for this bug as well, and will create a debian
bug report as well. We should be able to drop the patch after a sync
down the line.

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


** Tags: ftbfs

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

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

** Tags added: ftbfs

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

Title:
  GPR.__deepcopy__ missing: deepcopy(reaction) raises TypeError on
  Python 3.14

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


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

Reply via email to