| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
by Thomas Heller (patch 459442).
|
|
|
|
| |
generating Waste.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(With slight cosmetic improvements to shorten lines and a grammar fix
to a docstring.)
This addes -X and -E options to freeze. From the docstring:
-X module Like -x, except the module can never be imported by
the frozen binary.
-E: Freeze will fail if any modules can't be found (that
were not excluded using -x or -X).
|
| |
|
| |
|
|
|
|
|
|
|
| |
The strerror attribute contained only partial information about the
exception and produced some very confusing error messages. By passing
err (the exception object itself) and letting it convert itself to a
string, the error messages are better.
|
|
|
|
|
| |
not other control characters string.rstrip() got rid of. This caters to
the \f thingies Barry likes putting in Python source files.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
restores the 2.1 ability of Tools/scripts/ndiff.py to start producing
output before the entire comparison is complete.
|
| |
|
|
|
|
|
|
| |
library.
Update README.
|
| |
|
|
|
|
| |
Remove all these files. All except astgen.py are moved to Lib/compiler.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compile() becomes replacement for builtin compile()
compileFile() generates a .pyc from a .py
both are exported in __init__
compiler.parse() gets optional second argument to specify compilation
mode, e.g. single, eval, exec
Add AbstractCompileMode as parent class and Module, Expression, and
Interactive as concrete subclasses. Each corresponds to a compilation
mode.
THe AbstractCompileMode instances in turn delegate to CodeGeneration
subclasses specialized for their particular functions --
ModuleCodeGenerator, ExpressionCodeGeneration,
InteractiveCodeGenerator.
|
| |
|
|
|
|
|
|
|
|
|
| |
The argument properties are ordered from easiest to hardest. The
harder the arg, the more complicated that code that must be generated
to return it from getChildren() and/or getChildNodes(). The old
calculation routine was bogus, because it always set hardest_arg to
the hardness of the last argument. Now use max() to always set it to
the hardness of the hardest argument.
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the only test in the syntax module. It ends up that the
transformer must handle this error case.
In the transformer, check for a list compression in com_assign_list()
by looking for a list_for node where a comma is expected.
In pycodegen.compile() re-raise the SyntaxError rather than catching
it and exiting
|
| |
|
|
|
|
|
| |
If passed a .py file as an argument, try to find its accompanying
.pyc.
|
|
|
|
|
|
|
|
| |
Invoke compiler.syntax.check() after building AST. If a SyntaxError
occurs, print the error and exit without generating a .pyc file.
Refactor code to use compiler.misc.set_filename() rather than passing
filename argument around to each CodeGenerator instance.
|
| |
|
| |
|
|
|
|
|
|
| |
introspection incompatibility, but in fact it's just that calltips
always gave up on a docstring that started with a newline (but
didn't realize they were giving up <wink>).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
bound.
When a Yield() node is visited, assign to the generator attribute of
the scope, not the visitor.
|
| |
|
| |
|
| |
|
|
|
|
| |
Shuts up another couple of gcc warnings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
operators per line or statement are now on by default, and -m turns
these warnings off.
- Change the way multiple / operators are reported; a regular
recommendation is always emitted after the warning.
- Report ambiguous warnings (both int|long and float|complex used for
the same operator).
- Update the doc string again to clarify all this and describe the
possible messages more precisely.
|
| |
|
|
|
|
|
| |
division, and this makes sense. Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
|
| |
|
|
|
|
|
| |
treated the same as single ones by default. Added -m option to issue
a warning for this case instead.
|
|
|
|
|
|
|
| |
percolated out, and some general cleanup. The output is still the
same, except it now prints "Index: <file>" instead of "Processing:
<file>", so that the output can be used as input for patch (but only
the diff-style parts of it).
|
| |
|
|
|
|
|
| |
to be change to //. The code is pretty gross so far, and I promise
I'll work on this more, but I have to go eat now! :-)
|
|
|
|
|
|
|
|
|
| |
Fix list comp code generation -- emit GET_ITER instead of Const(0)
after the list.
Add CO_GENERATOR flag to generators.
Get CO_xxx flags from the new module
|
| |
|
|
|
|
|
|
|
|
| |
try/except or try/finally.
Previous versions had only track SETUP_LOOP blocks and ignored the
exception part. This meant that it allowed continue inside a
try/except but generated buggy code. Now it does the right thing.
|
|
|
|
| |
Add CONTINUE_LOOP to the list of unconditional transfers
|
| |
|
|
|
|
|
|
|
| |
starts a new line.
Also fix undetected typo in visitDict() -- uncovered by recent change
to add lineno attrs to atoms.
|
| |
|