This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author meador.inge
Recipients eric.snow, meador.inge, pitrou
Date 2012-07-16.05:42:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342417349.55.0.821069275525.issue15352@psf.upfronthosting.co.za>
In-reply-to
Content
Hmmm, I guess the idempotency issue is no worse than it already is -- the
same thing can still happen with trivial changes to the other prerequisites 
for importlib.h.

Consider this small example (you might have to run sample program multiple 
times to see a difference):

$ cat dis-closure.py
import dis

def adder(a, b):
    def add():
        return a + b
    return add

print(dis.dis(adder(1, 2).__code__))

$  ./python.exe dis-closure.py
  5           0 LOAD_DEREF               0 (a) 
              3 LOAD_DEREF               1 (b) 
              6 BINARY_ADD           
              7 RETURN_VALUE         
None
$  ./python.exe dis-closure.py
  5           0 LOAD_DEREF               1 (a) 
              3 LOAD_DEREF               0 (b) 
              6 BINARY_ADD           
              7 RETURN_VALUE         
None

The order of 'co_cellvars', 'co_varnames', and 'co_freevars' can be
different from compile to compile, thus the bytecode can be different
from compile to compile (I am not sure if this is worth fixing).

Thus there may be times where importlib.h is regenerated, but the changes 
in the bytecode aren't significant.

I will just commit this patch as is.
History
Date User Action Args
2012-07-16 05:42:29meador.ingesetrecipients: + meador.inge, pitrou, eric.snow
2012-07-16 05:42:29meador.ingesetmessageid: <1342417349.55.0.821069275525.issue15352@psf.upfronthosting.co.za>
2012-07-16 05:42:29meador.ingelinkissue15352 messages
2012-07-16 05:42:28meador.ingecreate