]> granicus.if.org Git - python/commit
Various sundry changes for 2.2 compatibility
authorJeremy Hylton <jeremy@alum.mit.edu>
Fri, 14 Sep 2001 22:49:08 +0000 (22:49 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Fri, 14 Sep 2001 22:49:08 +0000 (22:49 +0000)
commit1e99a77120d7bf3509eb283dde871b89ad7f6007
treeb770bd191fa0f98e1e5be46cd3cff16cb63959fc
parent652a22437a973dddef7f82d0cc8271d60da7de36
Various sundry changes for 2.2 compatibility

Remove the option to have nested scopes or old LGB scopes.  This has a
large impact on the code base, by removing the need for two variants
of each CodeGenerator.

Add a get_module() method to CodeGenerator objects, used to get the
future features for the current module.

Set CO_GENERATOR, CO_GENERATOR_ALLOWED, and CO_FUTURE_DIVISION flags
as appropriate.

Attempt to fix the value of nlocals in newCodeObject(), assuming that
nlocals is 0 if CO_NEWLOCALS is not defined.
Lib/compiler/pyassem.py
Lib/compiler/pycodegen.py
Tools/compiler/compiler/pyassem.py
Tools/compiler/compiler/pycodegen.py