Commit Graph

8406 Commits

Author SHA1 Message Date
Jack Jansen 39c5d666c9 Give default _elemdict and _propdict attributes to OSA classes, so
we don't get infinite recursion for suites that don't have an application
class.

Also got rid of some tabs.
2003-06-18 14:19:08 +00:00
Jack Jansen 2cf9b956f7 An indenting error in the code made it miss some suites that have an application
class.
2003-06-18 14:17:34 +00:00
Raymond Hettinger be9715398b SF bug #753451: classmethod abuse --> SystemError
Check the argument to classmethod for callability.

Backport candidate.
2003-06-18 01:13:41 +00:00
Greg Ward 9b15878369 Remove debug print on filename with NUL byte. 2003-06-18 00:54:28 +00:00
Greg Ward 8e36d28f3c SF patch #755987 (Jim Ahlstrom):
This is a patch for Bug 755031: If a null byte appears in
a file name, Python zipfile.py retains it, but InfoZip
terminates the name. Null bytes in file names are used
as a trick by viruses. I tested WinZip, and it also
truncates the file name at the null byte.

The patch also fixes a buglet: If a zipfile incorrectly
uses a directory separator other than '/', there was an
invalid complaint that the central directory name does
not match the file header name.

I also removed my name from the top of the file. It was
there for legal reasons which I believe no longer apply.
Many people have worked on this file besides me.
2003-06-18 00:53:06 +00:00
Brett Cannon 783eaf4774 Change all header strings to be as if they were capitalize()'ed. Also call
capitalize in AbstractHTTPHandler before inserting headers into HTTP instance.

Closes bug #649742, again.
2003-06-17 21:52:34 +00:00
Walter Dörwald e8049befdf Use _PyEval_SliceIndex to handle list.index() calls with
huge start and stop arguments. Add tests.
2003-06-17 19:27:39 +00:00
Raymond Hettinger 0887c732e7 Fix docstring 2003-06-17 16:53:25 +00:00
Guido van Rossum 2743d87d79 Fix sloppy index() implementation:
- don't use min() and max()
- interpret negative start/stop argument like negative slice indices
2003-06-17 14:25:14 +00:00
Walter Dörwald 77cdeaff55 Modernize Lib/posixpath.py: Use startswith(), endswith(), rstrip(),
struct_passwd attributes and +=.

From SF patch #755245.
2003-06-17 13:13:40 +00:00
Skip Montanaro 364ca40c2a SF Patch 569574 - enhancements to cgitb for plain text display 2003-06-17 12:58:31 +00:00
Raymond Hettinger d05abdec7b SF #754014: list.index() should accept optional start, end arguments
Also, modified UserList.index() to match and expanded the related tests.
2003-06-17 05:05:49 +00:00
Raymond Hettinger c8106e1f1d test_posixpath.py now uses unittest. The output file is no longer needed. 2003-06-17 04:19:59 +00:00
Neal Norwitz 98a379eda1 Add test for bug #751998. 2003-06-16 22:51:22 +00:00
Brett Cannon b47243ae45 Complete rewrite of tests by Walter Dorwald as unittest tests. 2003-06-16 21:54:50 +00:00
Kurt B. Kaiser 7345375771 Add ':' after IDLE version, fix spacing on a couple of lines I missed 2003-06-16 18:46:42 +00:00
Gustavo Niemeyer d5b8090e4c Made DateTime's constructor accept a time.struct_time class,
besides plain tuples.
2003-06-16 02:49:42 +00:00
Tim Peters f545baa0cc Whitespace normalization. 2003-06-15 23:26:30 +00:00
Brett Cannon 4a671fe634 Return None to signal that the module the object was defined in was not found when object has no __name__ attr but is needed to figure out location of object. 2003-06-15 22:33:28 +00:00
Martin v. Löwis 424a415951 Make CREDITS.txt a Latin-1 file. Extend ViewFile to support file encodings. 2003-06-15 22:28:05 +00:00
Tim Peters 04b9d47941 choose_boundary(): This no longer uses random, so stop importing it. 2003-06-15 22:12:23 +00:00
Tim Peters 080da28bdb choose_boundary(): Incorporated a threadsafe incrementing counter, so that
unique boundary strings within a program run are guaranteed.  On Windows,
duplicates were pretty likely, due to the coarse granularity of time.time.
Toned down the absurdly optimistic claims in the docstring.

Bugfix candidate.
2003-06-15 22:05:58 +00:00
Guido van Rossum 8b76351934 Add a missing 'self,' to a super call in recently checked-in code.
This was reported in the IDLEFORK bug tracker as #754971.
2003-06-15 19:08:57 +00:00
Kurt B. Kaiser 7de3772b28 Forwardport Patch from IDLEfork SF 615312
Convert characters from the locale's encoding on output
2003-06-15 17:49:59 +00:00
Kurt B. Kaiser 9e8b828f07 Support testing in .../Lib/idlelib when calling <python PyShell.py>
by providing other modules access to globals set up in PyShell.main()
2003-06-15 17:38:45 +00:00
Kurt B. Kaiser f35092c3d4 Move to Version 1.0b2 2003-06-15 17:12:25 +00:00
Greg Ward 523008c6cf Update copyright dates.
Define True and False (if necessary) so this module can be copied as-is
to other projects (eg. Optik, Docutils) that don't depend on Python 2.3.
2003-06-15 15:37:18 +00:00
Martin v. Löwis 1ef23657c4 Patch #751107: Slant must be 'roman', not 'normal'. 2003-06-14 21:40:04 +00:00
Martin v. Löwis d6efae500c Properly deal with tuples in Open._fixresult. Fixes bug reported in
follow-up to #621891.
2003-06-14 21:34:32 +00:00
Kurt B. Kaiser 61e2c9a402 Forwardport Patch from IDLEfork SF 610329
Remove deprecated tempfile usage
2003-06-14 17:56:25 +00:00
Martin v. Löwis 1867f24416 Always unwrap _socketobj in socket.ssl. Revert httplib.py 1.25.
Fixes #754447.
2003-06-14 13:30:53 +00:00
Martin v. Löwis b8c084e82c Support keyword and topics help in cli(). Fixes #715782. 2003-06-14 09:03:46 +00:00
Martin v. Löwis 17fb50790d Treat empty dat/dir pairs as dumbdbm. Fixes #744687. 2003-06-14 08:16:34 +00:00
Martin v. Löwis ba8f5ff76c Copy builtin functions as atomic. Fixes #746304. Will backport to 2.2. 2003-06-14 07:10:06 +00:00
Martin v. Löwis e3b67bcb7e Patch #754340: Fix typo in redirect_request. Will backport to 2.2. 2003-06-14 05:51:25 +00:00
Kurt B. Kaiser b3a0a666f2 Remove the 2.2 compatibility module boolcheck.py and related code
M PyShell.py
R boolcheck.py
M run.py
2003-06-14 03:33:20 +00:00
Kurt B. Kaiser ae8bbff231 Remove reference to IDLEfork 2003-06-14 03:23:56 +00:00
Kurt B. Kaiser 76bcb5cb6d Update NEWS.txt and move info on release 0.8.1 and earlier to HISTORY.txt
M HISTORY.txt
M NEWS.txt
2003-06-14 02:51:06 +00:00
Greg Ward 52ae0a596f Remove comment about Unicode: SF #622831 was fixed loooong ago! 2003-06-14 00:26:39 +00:00
Brett Cannon 91012fe9b5 Cause calling interrupt_main in main thread raise KeyboardInterrupt instantly. 2003-06-13 23:56:32 +00:00
Brett Cannon 4e64d78bbb dummy_thread modified to have interrupt_main and to behave appropriately when
called.

Added announcement in Misc/NEWS for thread.interrupt_main and mention of
dummy_thread's change.
2003-06-13 23:44:35 +00:00
Kurt B. Kaiser 93e8e54924 Interrupt module has been folded into the thread module
Modified Files:
 	run.py
 Removed Files:
 	interruptmodule.c
2003-06-13 22:03:43 +00:00
Barry Warsaw efad5880ba AddressList.__str__(): Get rid of useless, and broken method. Closes
SF #753617.  Back port candidate (but low priority).
2003-06-13 21:16:06 +00:00
Guido van Rossum 99d2c251df SF patch 707900, fixing bug 702858, by Steven Taschuk.
Copying a new-style class that had a reference to itself didn't work.
(The same thing worked fine for old-style classes.)
2003-06-13 19:28:47 +00:00
Jack Jansen 8475d0256a Re-gegernated with the new gensuitemodule. 2003-06-13 14:31:19 +00:00
Jack Jansen c8882b10c4 - Allow access to poperties of the "application" OSA class directly from
the toplevel package. This already worked for elements, but now for
properties too. Fixes #753925.
- Even better, the toplevel class (such as Finder.Finder) now inherits
the element and property dictionaries of its application class and has
the necessary glue to allow you to say
  f = Finder.Finder()
  f.get(f.name)
2003-06-13 14:27:35 +00:00
Raymond Hettinger fdbe5223b7 SF bug #753602: random.sample not properly documented
The docs were fine but the "int=int" in the function call was both
ugly and confusing.  Moved it inside the body of the function definition.
2003-06-13 07:01:51 +00:00
Brett Cannon 43e559a155 When calling tarname with an argument (and thus not use testtar.tar) return a
path for the file in the temp directory for the platform.
2003-06-12 19:16:58 +00:00
Thomas Heller cd494adc3b Fix for sf # 749210, wininst isn't build correctly after building zip.
The problem was that subcommands were not reinitialized.

Bugfix candidate, will backport myself.
2003-06-12 17:23:58 +00:00
Brett Cannon 455ea53d0e Make creation of temporary file and directory more portable. Also made cleanup
code use proper functions to get paths.

Changed the name of tar file that is searched for to be absolute (i.e., not use
os.extsep) since filename is locked in based on name of file in CVS
(testtar.tar).

Closes bug #731403 .
2003-06-12 08:01:06 +00:00
Kurt B. Kaiser a4e5c4da4d No longer needed. 2003-06-12 04:38:13 +00:00
Kurt B. Kaiser 09cb74ba20 aboutDialog.py:
1. Add additional buttons for Python Copyright and Credits
2. Use the Python LICENSE file instead of the old IDLE LICENSE.txt
3. Add additional buttons for IDLE's README and NEWS
4. Implement a method to read text from a _Printer object
5. Rename the Ok button to Close
6. Clean up to conform to Python code formatting standards

textView.py:
1. Change background to white on all platforms
2. Increase height of frame
3. Add an optional parameter to textViewer to allow inserting text into
   the viewer instead of reading a file.
4. Rename the Ok button to Close
 Modified Files:
 	aboutDialog.py textView.py
2003-06-12 04:20:56 +00:00
Raymond Hettinger f31cb0cbcf One more multiple exception catch should be in a tuple. 2003-06-12 04:05:00 +00:00
Kurt B. Kaiser d78b23025c 1. Remove the Readme entry on the Help Menu, now in About dialog.
2. Change title on About dialog.
 Modified Files:
 	Bindings.py EditorWindow.py
2003-06-12 04:03:49 +00:00
Raymond Hettinger abe14e6f04 The multiple exception catch should be in a tuple. 2003-06-12 03:59:17 +00:00
Kurt B. Kaiser fe04afc629 Direct readers to CVS logs. 2003-06-12 03:57:23 +00:00
Kurt B. Kaiser 31dea4cf43 It /is/ a package... 2003-06-12 03:55:24 +00:00
Kurt B. Kaiser 1821056002 Updated for IDLEfork re-integration 2003-06-12 03:51:27 +00:00
Kurt B. Kaiser b67e13d278 Will use the Python LICENSE file instead. 2003-06-12 03:45:55 +00:00
Kurt B. Kaiser d5407da4bc Remove setup file, no longer needed. 2003-06-12 03:44:01 +00:00
Kurt B. Kaiser a00d7bd41c Remove unneeded MANIFEST template. 2003-06-12 03:41:01 +00:00
Kurt B. Kaiser a737bb378b Remove unneeded installation instructions. 2003-06-12 03:39:08 +00:00
Kurt B. Kaiser a8f22d711c Update version. 2003-06-12 03:15:47 +00:00
Raymond Hettinger 39a5592001 SF Patch #744104: Remove eval() from csv
Eliminates the eval() step in the csv module resulting in better
security, more clarity, and a little speed.

The idea is to make successive attempts to coerce the string to
a python type:
    int(s), long(s), float(s), etc.

As a by-product, eliminates a bare 'except' statement.
2003-06-12 03:01:55 +00:00
Skip Montanaro 1546bc43fe add a couple test cases which involve longs and floats in 'e' format. 2003-06-12 02:40:22 +00:00
Brett Cannon 28a4f0f965 Have pydoc try handling an object as "other" if the object does not act the way
it expects based on what inspect classifies it as.

Closes bug #729103 .
2003-06-11 23:38:55 +00:00
Barry Warsaw 6754d52521 get_payload(): Improve the TypeError message when the payload isn't of
the expected type.  In response to SF #751451.
2003-06-10 16:31:55 +00:00
Barry Warsaw 9caa0d1642 guess_all_extensions(): Return the empty list instead of None when
there are no matching types.  Updated the docs and docstrings.  Added
some unit tests.
2003-06-09 22:27:41 +00:00
Raymond Hettinger af81c2e887 SF bug #685773: 2 (more) bugs in turtle
The docs recommend filling by fill(1), drawing commands, fill(0).
However, the filling did not actually take place until the next
draw command.  Fixed by issuing a null draw command at the end
of the fill method.
2003-06-09 08:50:57 +00:00
Kurt B. Kaiser 9067c8d85c SF 748975 Printing unsaved shell fails
M IOBinding.py
2003-06-09 03:12:42 +00:00
Raymond Hettinger 7f2d302a16 For the context and unified diff functions:
* Simplified test for visible changes
* Improved variable names and line spacing
* Replaced dict(a=3) style with Py2.2 compatable {'a':3}
2003-06-08 19:38:42 +00:00
Neal Norwitz e2fdc61004 Fix SF #749831, copy raises SystemError when getstate raises exception 2003-06-08 13:19:58 +00:00
Raymond Hettinger f0b1a1fca9 Added functions for creating context diffs and unified diffs.
Documentation update and NEWS item are forthcoming.
2003-06-08 11:07:08 +00:00
Martin v. Löwis d02879d620 Revert 1.25, as overloaded __repr__ is not considered. 2003-06-07 20:47:37 +00:00
Martin v. Löwis e57000338f Patch #750542: Use issubclass instead of type identity. 2003-06-07 20:17:11 +00:00
Martin v. Löwis 502ba46303 Patch #750595: Refer to type complex using builtin. Fixes #595837.
Backported to 2.2.
2003-06-07 20:10:54 +00:00
Martin v. Löwis 56f88113b7 Patch #746801: FreeBSD 4 expected failures, by Charles Swiger. 2003-06-07 20:01:37 +00:00
Martin v. Löwis 0f9e525bdf Patch #749191: Delete commands in after_cancel. Will backport to 2.2. 2003-06-07 19:52:38 +00:00
Gustavo Niemeyer 9556fba685 - urllib2.py now knows how to order proxy classes, so the user doesn't
have to insert it in front of other classes, nor do dirty tricks like
  inserting a "dummy" HTTPHandler after a ProxyHandler when building an
  opener with proxy support.
2003-06-07 17:53:08 +00:00
Kurt B. Kaiser ef58adf8d6 1. Find in Files Dialog shows text selection if there is one
2. Remove obsolete comment associated with Window menu updating

M EditorWindow.py
M GrepDialog.py
2003-06-07 03:21:17 +00:00
Kurt B. Kaiser 260cb9034c 1. Update WindowList registry when filename changes so that
Window menu updates.
2. Display Python Shell window in Window menu
3. Remove some dead code in FileList.py

M EditorWindow.py
M FileList.py
M WindowList.py
2003-06-06 21:58:38 +00:00
Kurt B. Kaiser 24d7e0cbb8 Avoid problem resolving 'localhost'
M PyShell.py
M rpc.py
M run.py
2003-06-05 23:51:29 +00:00
Guido van Rossum 852f35bbeb Change to <<open-module>>: always pop up the dialog, using the current
selection as the default value.  This is easier to use habitually.
2003-06-05 11:36:55 +00:00
Kurt B. Kaiser 3f8ace9a0f SF 747667 Error Doesn't Decolorize
Also improved error notification if Tabnanny detects a TokenError.

M ScriptBinding
2003-06-05 02:38:32 +00:00
Kurt B. Kaiser d2f4861a0b SF 748973 Guido van Rossum patch
New Window should save in the directory of the Editor Window
from which it was selected.

M EditorWindow.py
M FileList.py
M IOBinding.py
2003-06-05 02:34:04 +00:00
Jack Jansen 470b0c0e1f In an OSX framework build Python could fail if HOME wasn't set, fixed.
Fixes #747954.
2003-06-03 10:55:35 +00:00
Greg Ward 8a709b3049 Factor endian-ness check out of play_sound_file(), and fix
test_setparameters() to use it -- don't assume AFMT_S16_NE is always
defined!
2003-06-03 00:32:44 +00:00
Guido van Rossum 3800ef7ae2 When a previous call to poll() has already seen the process status,
wait() should not call waitpid() again.

Should be backported to 2.2.4.
2003-06-02 19:12:01 +00:00
Raymond Hettinger bf68c78a6f Fix SF bug #747348 docstring mistake in BaseHTTPServer.py. \n\nBackport Candidate 2003-06-02 14:25:43 +00:00
Kurt B. Kaiser 01e3273164 Eliminate the Revert to Default Settings submenu of Option menu.
Not implemented and not needed.
2003-06-02 01:51:38 +00:00
Kurt B. Kaiser 9f36609720 Modify the remote stack viewer to work in the threaded subprocess.
M PyShell.py
M run.py
2003-06-02 01:50:19 +00:00
Jack Jansen 5da131b2df Added two keys to database format: User-install-skips is an array of pathname
prefixes, any file that is skipped during a per-user install that matches
this set is *not* an error; Systemwide-only is a boolean that says the
package cannot be installer per-user.
2003-06-01 20:57:12 +00:00
Jack Jansen 2a97dcce09 Use splitlines() in stead of split() to split lines, and added a method
shortdescription() so the code to split off the first line of the
description isn't all over the place.
2003-06-01 20:03:43 +00:00
Jack Jansen 19c0d943e9 Fixed indentation error. Closes bug #746953. 2003-06-01 19:27:40 +00:00
Kurt B. Kaiser 5ddef75fcf Update for release
Modified Files:
 	NEWS.txt README.txt TODO.txt
2003-06-01 01:11:14 +00:00
Kurt B. Kaiser 6c8579ed4d Set the default for delete-exitfunc in config-main.def to True to handle
abnormal exit situations cleanly, especially stuck user threads.  Future
plan is to intercept the user's atexit functions and run them under
IDLE's control.
2003-06-01 01:08:32 +00:00
Kurt B. Kaiser ce5b6d55b8 SF 745525
Excecution environment and residual shell has cwd set to the directory of
the module being run.

M ScriptBinding.py
2003-05-31 23:44:18 +00:00
Martin v. Löwis b71bcb6322 Patch #740301: Add +s when linking shared libraries on HP-UX, use -L
for the library path.
2003-05-31 08:09:21 +00:00
Martin v. Löwis 3c120debef Patch #744041: Use only first two elements of address to support IPv6. 2003-05-31 07:55:43 +00:00
Raymond Hettinger 40174c358f SF bug #733667: kwargs handled incorrectly
The fast_function() inlining optimization only
applies when there are zero keyword arguments.
2003-05-31 07:04:16 +00:00