summaryrefslogtreecommitdiffstats
path: root/Tools
Commit message (Collapse)AuthorAgeFilesLines
* backport gvanrossum's patch:Anthony Baxter2002-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Backport (if there's ever a 2.1.3 release) of a useful trunk fix:Guido van Rossum2002-02-251-0/+1
| | | | | Fix by Edward K Ream to make breakpoints work on Windows: insert a missing call to self.canonic().
* Add stack depth info for FOR_LOOP opcodeJeremy Hylton2001-12-191-0/+1
|
* Backport changes from the 2.2 trunkJeremy Hylton2001-12-191-9/+32
|
* Backport bugfixes since rev 1.39 from the trunk.Jeremy Hylton2001-12-181-67/+147
| | | | | | | | | | 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.
* Backport bugfixes since rev 1.5 from the trunk.Jeremy Hylton2001-12-181-18/+40
| | | | | | | 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.
* Backport bugfixes from the trunk.Jeremy Hylton2001-12-171-0/+26
| | | | | Add __getitem__() to a stack to support visitContinue(). Move mangle() here and define correctly.
* Backport bugfixes from the trunk.Jeremy Hylton2001-12-171-4/+6
| | | | Only real change is to track movement of CO_ consts to here.
* Backport bugfixes since rev 1.19 on the trunk.Jeremy Hylton2001-12-171-51/+101
| | | | | | | | | | 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.
* Backport Tim's checkin 1.20:Thomas Wouters2001-06-271-17/+14
| | | | | | | | 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.
* Backport Guido's checkin 1.4:Thomas Wouters2001-06-271-6/+20
| | | | | Quick update to the extension mechanism (extend.py is gone, long live config.txt).
* Pop loop off the loop stack before handling the loop's else clause.Jeremy Hylton2001-04-121-4/+4
| | | | | | Otherwise, continue/break will attempt to affect the wrong loop. A few more fiddles to get the SET_LINENOs consistent across compilers.
* Use new _implicitNameOp() to generate name op code for list comprehensions.Jeremy Hylton2001-04-121-4/+17
| | | | | | | | | 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.
* Add support for visitAssAttr to findOp().Jeremy Hylton2001-04-121-1/+1
|
* pyassem.py:Jeremy Hylton2001-04-122-14/+111
| | | | | | | | | | | | | | | | 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.)
* Revise handling of tuple arguments so that the variables names matchJeremy Hylton2001-04-122-8/+8
| | | | those used by compile.c. (test_grammar now depends on the names)
* Only treat an AugAssign as def if its the target is a Name.Jeremy Hylton2001-04-121-2/+4
| | | | Fixes last bug found with test_scope.py.
* Fix unpackSequence() to use _nameOp() rather than LOAD_FASTJeremy Hylton2001-04-121-1/+2
|
* Inside a class scope always use LOAD_NAME, STORE_NAME, DEL_NAMEJeremy Hylton2001-04-121-0/+3
|
* Preliminary support for nested scopesJeremy Hylton2001-04-123-89/+396
| | | | | XXX Still doesn't work right for classes XXX Still doesn't do sufficient error checking
* Define constants for types of scopesJeremy Hylton2001-04-121-0/+5
|
* typoJeremy Hylton2001-04-111-4/+8
|
* [finishing fix from earlier checkins]Jeremy Hylton2001-04-111-0/+1
| | | | | | | Call set_lineno() in visitDiscard(), which will generate linenos for discard statements, e.g. the statement "1/0" Fixes SF bug #409587
* Add support for extra (*) arguments to preorder.Jeremy Hylton2001-04-111-3/+3
| | | | Change default dispatch to use extended call syntax in place of apply.
* Generate docstrings.Jeremy Hylton2001-04-111-3/+26
| | | | | | | Fixes SF buf #217004 Add method fixDocstring() to CodeGenerator. It converts the Discard node containing the docstring into an assignment to __doc__.
* Add lineno attributes to Discard nodesJeremy Hylton2001-04-111-1/+3
|
* Make sure the docstring is always entered as the first element in theJeremy Hylton2001-04-111-11/+1
| | | | | | consts, even if it is None. Simplify _lookupName() by removing lots of redundant tests.
* Append the revision number for each file to the output.Guido van Rossum2001-04-101-1/+1
| | | | | | (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.)
* Add globals to list of names returned by get_names().Jeremy Hylton2001-04-091-7/+13
| | | | | Fix func arg processing to handle args in tuples. In test code, skip names beginning with '.'.
* Add two arguments to Scope constructor, module scope and class nameJeremy Hylton2001-04-091-24/+92
| | | | | | | 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
* Add preliminary module symbol table constructorJeremy Hylton2001-04-091-0/+193
|
* Add support for future statementsJeremy Hylton2001-04-092-6/+98
|
* Fix "import as" (has always skipping the as name)Jeremy Hylton2001-04-091-9/+15
| | | | | | 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
* typoJeremy Hylton2001-04-091-1/+1
|
* Added more link attributes based on additonal information from ChrisFred Drake2001-04-051-1/+13
| | | | | | | McCafferty <christopher.mccafferty@csg.ch>, and a bit of experimentation with Navigator 4.7. HTML-as-deployed is evil!
* A number of improvements based on a discussion with Chris McCaffertyFred Drake2001-04-041-2/+24
| | | | | | | | | <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.
* Initialize new save_warnings_filters data member in ↵Tim Peters2001-03-291-0/+1
| | | | | | | | 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).
* Turn SyntasWarning into SyntaxError for all code enteredGuido van Rossum2001-03-261-1/+12
| | | | interactively.
* Script for starting pydoc with a GUI in Windows.Ka-Ping Yee2001-03-231-0/+2
|
* Make this IDLE version 0.8. (We have to skip 0.7 because that was aGuido van Rossum2001-03-221-1/+1
| | | | | CNRI release in a corner of the basement of a government building on a planet circling Aldebaran.)
* Don't use __debug__ as if it were some module global. Use DEBUGGuido van Rossum2001-03-221-15/+15
| | | | instead.
* Patch #409504: Fix regex problems, consider \-continuation lines in MakefileMartin v. Löwis2001-03-212-2/+15
| | | | and Setup.
* Lawrence Hudson, SF #401702: Modify co_filename in frozen programsGuido van Rossum2001-03-202-3/+42
| | | | | | | | | | | | | | | 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
* Teach Tools/freeze/makeconfig.py and Tools/freeze/parsesetup.py to useEric S. Raymond2001-03-182-10/+12
| | | | the re package rather than the obsolete regex.
* Get rid of hardcoded Python path (can't guess where the user installedTim Peters2001-03-101-1/+1
| | | | IDLE, and it likely changes across releases anyway).
* Added -o/--output-file option as per GNU msgfmt to specify the outputBarry Warsaw2001-03-021-9/+18
| | | | file instead of using inputfilename.mo
* Put current date into POT-Creation-Date; leave PO-Revision-Date forMartin v. Löwis2001-03-011-2/+3
| | | | for the translator to update; that is compatible with xgettext 0.10.35.
* Call main routine in pydoc module (pydoc.cli).Ka-Ping Yee2001-03-011-76/+2
|
* Add script form of pydoc so that it's present in beta1. CurrentlyAndrew M. Kuchling2001-02-281-0/+78
| | | | | | 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.
* Dialog and Window objects are (finally) different beasts.Jack Jansen2001-02-271-2/+1
|