Commit Graph

24165 Commits

Author SHA1 Message Date
Kurt B. Kaiser d8e20a0e6b Merge Py Idle changes:
Rev 1.6 doerwalter
(string methods)
2002-09-17 03:43:38 +00:00
Kurt B. Kaiser 7827e1707c Merge Py Idle changes:
Rev 1.7 loewis
Convert characters from the locale's encoding on output.
Reject characters outside the locale's encoding on input.
2002-09-17 03:40:47 +00:00
Guido van Rossum e5de77800e Back out the previous change. It doesn't save any space on 64-bit
platforms.
2002-09-17 03:27:02 +00:00
Guido van Rossum 73d66925d9 Rearrange the members of struct _node to put shorter fields towards
the end, in the hope of saving some bytes on 64-bit machines.  (Too
bad n_nchildren can't be made an unsigned short, but
test/test_longexp.py specifically tests for more than 2**16 subtrees
at one level.)

I don't expect any binary compatibility issues here, unless someone
has an old binary of parsermodule.so saved away.
2002-09-17 03:24:09 +00:00
Kurt B. Kaiser 33931ef1a6 Merge Py Idle changes:
Rev 1.4 tim_one
Convert a pile of obvious "yes/no" functions to return bool
2002-09-16 22:16:05 +00:00
Kurt B. Kaiser 6b06f29d09 Merge Py Idle changes:
Rev 1.5  doerwalter
string methods
2002-09-16 22:09:19 +00:00
Kurt B. Kaiser 01166da85a Merge Py Idle changes:
Rev 1.5 tim_one
Convert a pile of obvious "yes/no" functions to return bool.

Rev 1.6 gvanrossum
(partially merged previously, move line outside try: block)

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.

Rev 1.7 gvanrossum
(previously merged with modifications by Stephen M. Gava)

Add primitive printing support for Unix and Windows.

Rev 1.8 loewis
Patch #590913: PEP 263 support.

Rev 1.9 gvanrossum
(tempfile.py interface -- deferred)

Rev 1.10 tim_one
whitespace normalization

Rev 1.11 nnorwitz
(deferred pending 1.9 integration)
2002-09-16 22:03:37 +00:00
Just van Rossum 3c4dee4ca7 make sure the object browser can't crash because when the list data gets bigger than 32kB 2002-09-16 21:18:49 +00:00
Just van Rossum b7dd49453c add ./ to configure command so it actually works verbatim 2002-09-16 20:18:27 +00:00
Martin v. Löwis 3cba5c08f0 Patch #609700: Use $(CC) to link on Linux. 2002-09-16 17:50:59 +00:00
Martin v. Löwis 658009afdb Make BadPickleGet a class. Fixes #609164. 2002-09-16 17:26:24 +00:00
Guido van Rossum 258cba8442 When recursively attempting to find the modules imported by an
"import" statement, catch and ignore all exceptions.  add/fix some
comments about this.
2002-09-16 16:36:02 +00:00
Kurt B. Kaiser f1fe145d20 Merge Py Idle changes:
Rev 1.4 (string methods)

Rev 1.5 Remove unnecessary imports
2002-09-16 02:25:26 +00:00
Kurt B. Kaiser 75e379020e Merge Py Idle changes:
Rev 1.10 (string methods)
2002-09-16 02:22:19 +00:00
Kurt B. Kaiser 220ecbc731 Merge Py Idle changes:
Rev 1.39 GvR
Properly fix SF bug #507298 (Gregor Lingl): shellpython2.2 -Qnew smart
indent error

Use // where int division is intended.  (This breaks IDLE for use with
previous Python versions -- I don't care.)

Rev 1.40 tim_one
Convert a pile of obvious "yes/no" functions to return bool.

Rev 1.41 foffani/loewis
(already merged)  - MS html help

Rev 1.42
(skip, done differently in Idlefork)

Rev 1.43 tzot/rhettinger
Extended IDLE's open module menu item to handle hierarchical module names.
Will look at doing something similar in import.c so that the effort won't
have to be repeated elsewhere.
Closes SF patch 600152.

Rev 1.44 doerwalter
(string methods)
2002-09-16 02:13:15 +00:00
Guido van Rossum c0a0e0810b Since it tests both ntohl and ntohs, the test should not be called
testNtoHL but testNtoH.
2002-09-16 01:30:03 +00:00
Kurt B. Kaiser aae2094991 Merge Py Idle changes
Rev 1.16
(skip. The Edward K. Ream breakpoint fix has been added to bdb.py
and idlefork Debugger.py no longer overrides Bdb.set_break() )

Rev 1.17
Remove unnecessary imports
2002-09-16 01:06:52 +00:00
Kurt B. Kaiser a287644204 Merge Py Idle changes
Rev 1.13 (string methods)
2002-09-15 22:09:16 +00:00
Kurt B. Kaiser 908aece9f7 Merge Py Idle changes
Rev 1.9
Improve handling of docstrings.  I had feared this was a case of
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>).

Rev 1.10
(already merged)

Rev 1.11
(whitespace normalization, skip this time)

Rev 1.12
Remove unnecessary imports
2002-09-15 22:02:58 +00:00
Kurt B. Kaiser e72f05d5fb Merge Py Idle changes
Rev 1.4
SF bug 546078:  IDLE calltips cause application error.
Assorted crashes on Windows and Linux when trying to display a very
long calltip, most likely a Tk bug.  Wormed around by clamping the
calltip display to a maximum of 79 characters (why 79? why not ...).

Bugfix candidate, for all Python releases.

Rev 1.5
Remove unnecessary imports
2002-09-15 21:43:13 +00:00
Kurt B. Kaiser c209b3dab5 Merge Py Idle's Rev 1.16 (string methods) 2002-09-15 21:38:20 +00:00
Kurt B. Kaiser 1b3c26998e Merge Py Idle's changes to AutoIndent.py into EditorWindow.py since
EditorWindow has incorporated AutoIndent

Rev 1.17
classifyws():  Fix a "/" to work under -Qnew (as well as without it).
Bugfix candidate!

Rev 1.18
(Already merged)

Rev 1.19
smart_backspace_event():  remove now-pointless int() call.
Bugfix candidate:  the current state of AutoIdent.py should be in 2.2.1.

Rev 1.20
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)
This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
2002-09-15 21:31:30 +00:00
Kurt B. Kaiser 87807a66c4 Merge Py Idle's Rev 1.5
Use string.ascii_letters instead of string.letters (SF bug #226706)
2002-09-15 20:50:02 +00:00
Guido van Rossum bd6be7aba5 I think it makes more sense that the pseudo filename used by fdopen()
be "<fdopen>" rather than "(fdopen)".
2002-09-15 18:45:46 +00:00
Neil Schemenauer 96aa0acef0 Use Py_GCC_ATTRIBUTE instead of __attribute__. Compilers other than GCC
might use __attribute__ in other ways (e.g. CodeWarrior).
2002-09-15 14:09:54 +00:00
Guido van Rossum 7f7c3d0a9c Address SF bug #577530: del __builtins__ breaks out of rexec
Using the suggestion there: add_module() forces __builtin__ back; this
fixes r_exec, r_eval, r_execfile.  The interactive console had to be
fixed separately, because it doesn't use r_exec, but relies on the
'locals' dict having the right __builtins__.  Fixed this by
subclassing InteractiveConsole and overriding runcode(), which does
the exec.  This changes the banner output slightly: instead of
starting with *** RESTRICTED ***, a subtler (RestrictedConsole) is
printed before the first >>> prompt.

Also import readline (if it exists) when the interactive console is
used, for more convenient input editing and history.

This does not mean that rexec is now considered safe!  But for those
willing to take the risk, it's safer than before.  (Note that a safety
analysis of the code module would be wise if you plan to use the
interactive console for real -- I've only ever used it to play with
restricted mode.)

This should be backported to 2.2 and 2.1.
2002-09-15 06:00:43 +00:00
Kurt B. Kaiser ad2bf5cb44 Initial revision 2002-09-14 23:25:29 +00:00
Martin v. Löwis 1ce4ae3268 Don't test whether surrogate sequences round-trip in UTF-8. 2.2.2 candidate. 2002-09-14 09:19:53 +00:00
Martin v. Löwis 766e300eaa Use integer above sys.maxunicode for range test. Fixes #608884.
2.2.2 candidate.
2002-09-14 09:10:04 +00:00
Kurt B. Kaiser 6622eecdaa Bump to reflect final cleanup of Config system and first pass GRPC
completed
2002-09-14 04:24:43 +00:00
Kurt B. Kaiser 3ae4eaab88 MERGE DS_RPC_BRANCH into MAIN
Removed Files:
 	AutoIndent.py IdleConf.py MultiScrolledLists.py Separator.py
 	config-unix.txt config-win.txt config.txt eventparse.py
 	keydefs.py
2002-09-14 03:30:46 +00:00
Kurt B. Kaiser 9ef8f428a3 MERGE DS_RPC_BRANCH into MAIN:
config-keys.def
    AutoIndent merged 21Jul
2002-09-14 03:18:43 +00:00
Kurt B. Kaiser a9f8cbc3bd MERGE DS_RPC_BRANCH into MAIN
configHandler.py
    AutoIndent merged 21Jul
2002-09-14 03:17:01 +00:00
Kurt B. Kaiser c7273a3832 MERGE DS_RPC_BRANCH into MAIN:
config-extensions.def
    AutoIndent merged 21Jul
2002-09-14 03:15:06 +00:00
Kurt B. Kaiser 39df7c440b MERGE DS_RPC_BRANCH into MAIN:
configDialog.py
    AutoIndent merged 21Jul
2002-09-14 02:58:07 +00:00
Kurt B. Kaiser b3705a3dd1 MERGE DS_RPC_BRANCH into MAIN
ToolTip.py
    cleanup 05Aug
2002-09-14 02:56:04 +00:00
Kurt B. Kaiser 2def78bddb MERGE DS_RPC_BRANCH into MAIN
ReplaceDialog
    (missed a change Py Idle 04Apr2002, Booleans, pick up later)
    track Py Idle: GvR drops 1.5.2 re support 24 Jul
2002-09-14 02:53:05 +00:00
Kurt B. Kaiser ee7afca550 MERGE DS_RPC_BRANCH into MAIN
PyShell.py
    don't track Py Idle patch 543222 - disable script bindings in shell
    since it was done differently in MAIN

    Remove "binding comments" 05 Aug 1.13.2.2 to 1.13.2.3
2002-09-14 02:50:56 +00:00
Kurt B. Kaiser 8c11f7e3bf MERGE DS_RPC_BRANCH into MAIN
ParenMatch.py
    Remove last dependencies to old config backend 06Aug
2002-09-14 02:46:19 +00:00
Kurt B. Kaiser 12b9f340ce MERGE DS_RPC_BRANCH into MAIN
EditorWindow.py
    don't track Py Idle patch 543222 - disable script bindings in shell
    since it was done differently in MAIN

    Remove "binding comments" 05 Aug 1.23.2.3 to 1.23.2.4
    Remove last dependencies to old config backend 06Aug to 1.23.2.5
2002-09-14 02:40:17 +00:00
Kurt B. Kaiser cb7a383bad MERGE DS_RPC_BRANCH into MAIN
EditorWindow.py
    AutoIndent merged 21Jul
    Comment out debug messages 21Jul
2002-09-14 02:34:23 +00:00
Fred Drake 583db0d92b Fix a couple of minor markup glitches. 2002-09-14 02:03:25 +00:00
Guido van Rossum a2627afe37 Maybe this fixes test_socket on 64-bit Linux. 2002-09-14 00:58:46 +00:00
Kurt B. Kaiser 92cfaf68c7 MERGE DS_RPC_BRANCH into MAIN
CallTips
    track Py Idle loewis: Use ascii_letters to avoid UnicodeErrors 06Aug
2002-09-14 00:55:21 +00:00
Kurt B. Kaiser 0c9b61738b Bindings.py
AutoIndent merged 21Jul
    cleanup and remove references to config backend 06Aug
2002-09-14 00:50:44 +00:00
Andrew M. Kuchling dcfd825c11 Add two items 2002-09-13 22:21:42 +00:00
Guido van Rossum 3cda93ebf6 Add a bunch of sys.stdout.flush() calls that will hopefully improve
the usability of the output of the Xenofarm builds.
2002-09-13 21:28:03 +00:00
Neal Norwitz bcf9f9eb3b SF # 602108 ensure string is null terminated after strncpy 2002-09-13 14:35:56 +00:00
Guido van Rossum 12e9668989 Fiddle with compact_traceback().
More whitespace cleanup.
2002-09-13 14:09:26 +00:00
Neal Norwitz a0378e1eda Fix part of SF bug # 544248 gcc warning in unicodeobject.c
When --enable-unicode=ucs4, need to cast Py_UNICODE to a char
2002-09-13 13:47:06 +00:00