| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provisional fix for writefile() [SF bug # 541730].
The problem was that an exception can occur in the text.get() call or
in the write() call, when the text buffer contains non-ASCII
characters. This causes the previous contents of the file to be lost.
The provisional fix is to call str(self.text.get(...)) *before*
opening the file, so that if the exception occurs, we never open the
file.
Two orthogonal better solutions have to wait for policy decisions:
1. We could try to encode the data as Latin-1 or as UTF-8; but that
would require IDLE to grow a notion of file encoding which requires
more thought.
2. We could make backups before overwriting a file. This requires
more thought because it needs to be fast and cross-platform and
configurable.
Original patches were:
python/dist/src/Tools/idle/IOBinding.py:1.6
|
| |
|
|
|
| |
Fix by Edward K Ream to make breakpoints work on Windows: insert a
missing call to self.canonic().
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Add is_constant_false(), rev 1.41.
Fixed print handling, rev. 1.41.
Handle private names, 1.42.
Make sure JUMP_ABS and POP_BLOCK blocks are contiguous, rev. 1.44.
Make sure class object has no co_varnames, rev. 1.45.
Fix typo in visitDict(), rev. 1.46.
Generate correct code for continue in try/except, rev. 1.47.
|
| |
|
|
|
|
|
| |
Fix for sibling nodes that define the same free variable, rev. 1.6.
Handle private names, rev. 1.7.
Fix bug in handling of statements like "l[x:y] = 2", reb. 1.8.
Fix symbol problem with slice assignment, rev. 1.9.
|
| |
|
|
|
| |
Add __getitem__() to a stack to support visitContinue().
Move mangle() here and define correctly.
|
| |
|
|
| |
Only real change is to track movement of CO_ consts to here.
|
| |
|
|
|
|
|
|
|
|
| |
Brief summary:
Improve stack depth calculation, 1.24, 1.25, 1.28
Wrong co_lntob, 1.20.
XXX_NMAE ops should affect varnames, 1.21.
Fix list comp code gen, 1.26.
Fix _convert_NAME() for class bodies, 1.26.
|
| |
|
|
|
|
|
|
| |
SF bug 430991: wrong co_lnotab
Armin Rigo pointed out that the way the line-# table got built didn't work
for lines generating more than 255 bytes of bytecode. Fixed as he
suggested, plus corresponding changes to pyassem.py, plus added some long
overdue docs about this subtle table to compile.c.
|
| |
|
|
|
| |
Quick update to the extension mechanism (extend.py is gone, long live
config.txt).
|
| |
|
|
|
|
| |
Otherwise, continue/break will attempt to affect the wrong loop.
A few more fiddles to get the SET_LINENOs consistent across compilers.
|
| |
|
|
|
|
|
|
|
| |
Always emit a SET_LINENO 0 at the beginning of the module. The
builtin compiler does this, and it's much easier to compare bytecode
generated by the two compilers if they both do.
Move the SET_LINENO inside the FOR_LOOP block for list
comprehensions. Also for compat. with builtin compiler.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix annoying bugs in flow graph layout code. In some cases the
implicit control transfers weren't honored. In other cases,
JUMP_FORWARD instructions jumped backwards.
Remove unused arg from nextBlock().
pycodegen.py
Add optional force kwarg to set_lineno() that will emit a
SET_LINENO even if it is the same as the previous lineno.
Use explicit LOAD_FAST and STORE_FAST to access list comp implicit
variables. (The symbol table doesn't know about them.)
|
| |
|
|
| |
those used by compile.c. (test_grammar now depends on the names)
|
| |
|
|
| |
Fixes last bug found with test_scope.py.
|
| | |
|
| | |
|
| |
|
|
|
| |
XXX Still doesn't work right for classes
XXX Still doesn't do sufficient error checking
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Call set_lineno() in visitDiscard(), which will generate linenos for
discard statements, e.g. the statement "1/0"
Fixes SF bug #409587
|
| |
|
|
| |
Change default dispatch to use extended call syntax in place of apply.
|
| |
|
|
|
|
|
| |
Fixes SF buf #217004
Add method fixDocstring() to CodeGenerator. It converts the Discard
node containing the docstring into an assignment to __doc__.
|
| | |
|
| |
|
|
|
|
| |
consts, even if it is None.
Simplify _lookupName() by removing lots of redundant tests.
|
| |
|
|
|
|
| |
(Yes, this is a new feature right before the 2.1 release. No, I can't
imagine this would seriously break anybody's code. In fact, most
users of this script are probably *happy* to see this addition.)
|
| |
|
|
|
| |
Fix func arg processing to handle args in tuples.
In test code, skip names beginning with '.'.
|
| |
|
|
|
|
|
| |
Add mangling support
Add get_children() and add_child() methods to Scope
Skip nodes when If test is a false constant
Add test code that checks results against symtable module
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Fix com_NEWLINE() so that is accepts arguments, which occurs for lines like:
stmt; # note trailing semicolon
Add XXX about checking for assignment to list comps
|
| | |
|
| |
|
|
|
|
|
| |
McCafferty <christopher.mccafferty@csg.ch>, and a bit of experimentation
with Navigator 4.7.
HTML-as-deployed is evil!
|
| |
|
|
|
|
|
|
|
| |
<christopher.mccafferty@csg.ch>:
Add javascript: and telnet: to the types of URLs we ignore.
Add support for several additional URL-valued attributes on the BODY,
FRAME, IFRAME, LINK, OBJECT, and SCRIPT elements.
|
| |
|
|
|
|
|
|
| |
ModifiedInterpreter.__init__.
Was getting mystery
ModifiedInterpreter instance has no attribute 'save_warnings_filters'
errors at odd times (for sure in a fresh IDLE, fresh file, then Run Script).
|
| |
|
|
| |
interactively.
|
| | |
|
| |
|
|
|
| |
CNRI release in a corner of the basement of a government building on a
planet circling Aldebaran.)
|
| |
|
|
| |
instead.
|
| |
|
|
| |
and Setup.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was developed primarily to reduce the size of the
frozen binary. It is particularly useful when freezing for 'small'
platforms, such as Palm OS, where you really want to save that
last miserable byte.
A limitation of this patch is that it does not provide any feedback
about the replacements being made. As the path matching
is case-sensitive this may lead to unexpected behaviour for DOS
and Windows people, eg
> freeze.py -r C:\Python\Lib\=py\ goats.py
should probably be:
> freeze.py -r c:\python\lib\=py\ goats.py
|
| |
|
|
| |
the re package rather than the obsolete regex.
|
| |
|
|
| |
IDLE, and it likely changes across releases anyway).
|
| |
|
|
| |
file instead of using inputfilename.mo
|
| |
|
|
| |
for the translator to update; that is compatible with xgettext 0.10.35.
|
| | |
|
| |
|
|
|
|
| |
this just copies the __name__=='__main__' logic from pydoc.py.
?!ng can decide whether he wants to create a main() in pydoc, or rip
it out of pydoc.py completely.
|
| | |
|