Message387233
I reopen the issue since there is bpo-43228 regression, caused by this issue, which is still under discussion, and Mark also proposed to add a new builtins parameter to the function constructor (FunctionType).
I wrote PR 24564 to help fixing bpo-43228 regression: with this change, functions now inherit the current builtins if the globals namespace is overriden, but the new globals has no "__builtins__" key. This change is backward incompatible on purpose. If someone really wants to run a function in a different builtins namespace, globals['__builtins__'] must be set explicitly.
Once PR 24564 will be merged, I plan to write a 3rd PR to add an optional builtins keyword-only parameter to the function constructor (FunctionType). |
|
| Date |
User |
Action |
Args |
| 2021-02-18 14:26:25 | vstinner | set | recipients:
+ vstinner, gvanrossum, brett.cannon, rhettinger, petr.viktorin, Mark.Shannon, serhiy.storchaka, yselivanov |
| 2021-02-18 14:26:24 | vstinner | set | messageid: <[email protected]> |
| 2021-02-18 14:26:24 | vstinner | link | issue42990 messages |
| 2021-02-18 14:26:24 | vstinner | create | |
|