[Python-ideas] Isolated (?transactional) exec (?subinterpreter) calls
anatoly techtonik
techtonik at gmail.com
Fri Jun 8 10:16:34 CEST 2012
Hi,
Having a lot of ideas is a curse, because I can barely follow up on
them, but I try -
I really read replies, just don't have enough energy to answer
immediately (as it
usually requires some time for research). Here is another one that
ripes too long
to become rotten:
Make exec(code[, globals[, locals]]) calls consistent, optionally
isolated from parent environment and transactional.
Consistent:
- it should not matter if the code is executed with command line
interpreter or from exec(),
code should not be modified to successfully run in exec if it
successfully runs in intepreter session
http://bugs.python.org/issue13557
http://bugs.python.org/issue14049
http://bugs.python.org/issue1167300
http://bugs.python.org/issue991196
Optionally isolated from parent environment:
- a feature to execute user script in a snapshot of current
environment and have
a choice whenever to merge its modifications back to environment or not
real user story - read system configuration settings, where
optional detection
rules are written in Python (Blender/SCons build scripts) -
autodetection probes
can affect environment while detection takes place and it can lead to more
problems later
(think of virtualenv on Python process level with defined data
exchange protocol
through globals/locals variables)
Transactional:
- well, if it is isolated - it is already transactional - an ability
to discard results if an
error or an exception inside exec() occurs - getting back to the
state right before exec.
--
anatoly t.
More information about the Python-ideas
mailing list