*: keep using func_code and not yet __code__ with scripts
On Zope2, python scripts do not have __code__, they only have func_code (and same for __defauls__/func_defaults). We tried to backport the support of __code__ from Zope4 as a Zope2 patch - it was SlapOS patch 4fa33dfc6 (erp5: py3: `func_{code,defaults}` was replaced in Python3 by `__{code,defaults}__`., 2022-04-25), but this patch was incomplete. We tried to backport more, but then realized that we don't need to use __code__ on ERP5 master yet, because ERP5 master branch is still supporting Zope2 only. This patch revert a small part of a17bb910 (py2/py3: Make Products code compatible with both python2 and python3., 2022-04-13), the part where we use f.__code__ where f might be a python script. For now, we'll apply this patch only on the Zope4 branch. A few places where f.func_code was used and f was a for sure not a python script but a simple class method or function are kept here, as __code__ support is missing only on in ZODB scripts.
Status | Job ID | Name | Coverage | ||||||
---|---|---|---|---|---|---|---|---|---|
External | |||||||||
passed |
#473568
external
|
ERP5.CodingStyleTest-Master |
03:50:16
|
||||||
passed |
#473566
external
|
ERP5.CodingStyleTest-TestRunner2 |
03:38:46
|
||||||
passed |
#473641
external
|
ERP5.PerformanceTest-Master |
00:27:04
|
||||||
failed |
#473569
external
|
ERP5.UnitTest-TestRunner2 |
01:55:54
|
||||||
passed |
#473599
external
|
SlapOS.Eggs.UnitTest-Master.Python2 |
00:20:40
|
||||||
passed |
#473670
external
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:26:04
|
||||||
passed |
#473579
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:15:18
|
||||||
passed |
#473635
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:14:19
|
||||||
passed |
#473656
external
retried
|
SlapOS.Eggs.UnitTest-Master.Python3 |
00:24:12
|
||||||