Commit Graph

8551 Commits

Author SHA1 Message Date
Neal Norwitz c556722f09 remove unused import math 2003-06-29 04:18:15 +00:00
Neal Norwitz 9b924c690e remove extra parameter from _java_getprop, remove duplicate imports 2003-06-29 04:17:45 +00:00
Neal Norwitz 77290f25f3 use == like all the other conditionals 2003-06-29 04:16:49 +00:00
Neal Norwitz 732911fd1e fix problems found by pychecker 2003-06-29 04:16:28 +00:00
Tim Peters 275abbd525 Missed a spot where the new optional optionflags argument needed to get
passed on.
2003-06-29 03:11:20 +00:00
Jack Jansen c5991b0c02 Use http://www.python.org/packman as the base URL. Also upped the version
number because of this.
2003-06-29 00:09:18 +00:00
Raymond Hettinger 2dd1ed69b4 SF 662923: iterator for dbm keys
When shelve and the bsdbm where expanded to a full mapping interface,
this module was missed.
2003-06-28 07:08:39 +00:00
Raymond Hettinger 3567a876c7 Add take() to examples. Tighten the islice() example 2003-06-28 05:44:36 +00:00
Raymond Hettinger c0fac96c29 SF patch #756996: Bare except in ZipFile.testzip()
(Contributed by Steven Taschuk)

Replaces a bare except that caused all errors to be mis-reported as
archive errors.

Added a related NEWS item.
2003-06-27 22:25:03 +00:00
Raymond Hettinger 6f3eaa67e5 SF patch #761519: Fixes for bugs 760703 and 757821
SF bug #760703: SocketHandler and LogRecord don't work well together
SF bug #757821: logging module docs

Applied Vinay Sajip's patch with a few minor fixups and a NEWS item.

Patched __init__.py - added new function
makeLogRecord (for bug report 760703).

Patched handlers.py - updated some docstrings and
deleted some old commented-out code.

Patched test_logging.py to make use of makeLogRecord.

Patched liblogging.tex to fill documentation gaps (both
760703 and bug 757821).
2003-06-27 21:43:39 +00:00
Tim Peters 6ebe61fa80 A hack to ease compatibility with pre-2.3 Pythons: by default, doctest
now accepts "True" when a test expects "1", and similarly for "False"
versus "0".  This is un-doctest-like, but on balance makes it much
more pleasant to write doctests that pass under 2.2 and 2.3.  I expect
it to go away again, when 2.2 is forgotten.  In the meantime, there's
a new doctest module constant that can be passed to a new optional
argument, if you want to turn this behavior off.

Note that this substitution is very simple-minded:  the expected and
actual outputs have to consist of single tokens.  No attempt is made,
e.g., to accept [True, False] when a test expects [1, 0].  This is a
simple hack for simple tests, and I intend to keep it that way.
2003-06-27 20:48:05 +00:00
Gustavo Niemeyer 6cf26195c6 Do not add extra "\n" after bang line. 2003-06-27 19:33:38 +00:00
Fred Drake 01c623b1a3 fix typo 2003-06-27 19:22:11 +00:00
Skip Montanaro a7b8ac6613 add mention of -l, --listfuncs to usage() small part of 542562 2003-06-27 19:09:33 +00:00
Jeremy Hylton c4bf5edc3a Add a trivial test of getargspec() with a method. 2003-06-27 18:43:12 +00:00
Jeremy Hylton ab91902f6f A bit o' reformatting and removal of non-_getframe currentframe(). 2003-06-27 18:41:20 +00:00
Jeremy Hylton 6496788e7a Fix for SF bug 620190: getargspec() doesn't work with methods. 2003-06-27 18:14:39 +00:00
Jeremy Hylton 7ff55e6bc5 Add tests for __nonzero__() problems. 2003-06-27 17:40:16 +00:00
Jeremy Hylton f8ecde5de0 Revert previous checkin and just add a comment about constructor_ob.
There's no point to passing it anymore, but there's a test that
expects the call to fail if you pass a non-callable object.
2003-06-27 16:58:43 +00:00
Skip Montanaro 0fe8fce7e3 (HTML|Text)Repr.repr1: Guard against objects whos types have no __name__
attribute. Patch and bug report from Geoff Talvola. Closes patch #672855.
2003-06-27 15:45:41 +00:00
Michael W. Hudson 896e5164bb Jacob Hallen cornered me here at EuroPython and got me to look at
patch:

[ 750008 ] 'compiler' module bug with 'import foo.bar as baz'

which I'm now checking in.

after import foo.bar as baz, baz would refer to foo.
2003-06-27 12:32:39 +00:00
Raymond Hettinger f69d9f6818 SF bug #761337: datetime.strftime fails on trivial format string
The interning of short strings violates the refcnt==1 assumption for
_PyString_Resize().

A simple fix is to boost the initial value of "totalnew" by 1.
Combined with an NULL argument to PyString_FromStringAndSize(),
this assures that resulting format string is not interned.
This will remain true even if the implementation of
PyString_FromStringAndSize() changes because only the uninitialized
strings that can be interned are those of zero length.

Added a test case.
2003-06-27 08:14:17 +00:00
Jeremy Hylton 7567822838 Don't call constructor() from pickle().
The constructor() call only made sense when it registered the
constructor as safe for unpickling.  We should probably remove the
module-global function, but need to worry about backwards
compatibility.
2003-06-26 23:20:20 +00:00
Raymond Hettinger f6fe4eda6e Portion of SF patch #761104. Fixes a minor docstring error.
_TemporarilyImmutableSet is in fact a subclass of BaseSet
2003-06-26 18:49:28 +00:00
Jeremy Hylton 546e34b654 Enable tracing of multi-threaded applications.
Fix bug in computation of coverage percentage: Only count a line if it
was executed or if we print the >>>>>> marker.
2003-06-26 14:56:17 +00:00
Raymond Hettinger 5f078ff7f0 SF bug #759889: Pickling of Random is broken
* Implement __reduce__() to support pickling.
* Add a test case to prove a successful roundtrip through pickle.
2003-06-24 20:29:04 +00:00
Barry Warsaw 663219a8cc _make_boundary(): A minor optimization suggested by the Timbot. 2003-06-24 20:19:34 +00:00
Greg Stein 616a58d79a Deal with a couple XXX comments which asked questions.
In response to "shouldn't the client close the file?", the answer is
"no". The original design behind HTTPConnection is that the client did
not have to worry about it. The response would close itself when you
read the last of the data from it. This closing also dealt with
allowing the connection to perform another request/response (if it was
a persistent connection).

However... the auto-close behavior broke compatibility with the
classic httplib.HTTP class' behavior when a zero-length response body
was present. In that situation, the HTTPResponse object was
auto-closing it since there was no data present, and for an HTTP/1.0
connection-close socket (or an HTTP/0.9 request) connection, that also
ended up closing the socket. When an httplib.HTTP user went to read
the socket... boom. A patch to correct the auto-close (for compat with
old httplib users) was added in rev 1.22.

But for non-zero-length *chunked* bodies, we should keep the
auto-close behavior. The library user is not reading the socket (they
can't cuz of the chunked response we just got done handling), so they
should be immune to the response closing the socket. In fact, I would
like to see (one day) the auto-close restored, and the HTTP subclass
would simply have a flag to disable that behavior (for back-compat
purposes).
2003-06-24 06:35:19 +00:00
Raymond Hettinger 8a99b50239 SF patch #736962. Converted test_compile to unittest format. 2003-06-23 13:36:57 +00:00
Martin v. Löwis bcc651a1f9 Idlefork patch #682347: convert Unicode strings from readline to
IOBinding.encoding. Also set sys.std{in,out,err}.encoding, for both
the local and the subprocess case.
2003-06-22 07:52:56 +00:00
Just van Rossum ac8657bb0e some old changes to this unused module 2003-06-21 14:49:14 +00:00
Just van Rossum 35b50e2683 changed 8-space indentation to 4 2003-06-21 14:41:32 +00:00
Martin v. Löwis 5b8bfdf67c Patch #755087: Deal with emptied dumbdbm files correctly. 2003-06-21 13:54:55 +00:00
Just van Rossum dc31dc02f7 - do the right thing with symlinks inside directories we're copying
- move the normpath stuff around a bit
- added dubious special case to addPythonFramework()
2003-06-20 21:43:36 +00:00
Just van Rossum 6a55242685 make sure paths to dirs don't end in a / 2003-06-20 21:26:55 +00:00
Just van Rossum 00a0b97dc5 Reworked --strip option: it will now look at _any_ file that's marked
executable in the bundle. Therefore got rid of the "binaries" attribute.
2003-06-20 21:18:22 +00:00
Just van Rossum 9e50023898 register the library inside Python.framework as eligable for stripping 2003-06-20 20:05:40 +00:00
Just van Rossum 3166f59d2a Add initial standalone support for Python.framework 2003-06-20 18:56:10 +00:00
Raymond Hettinger 4327521688 Added regression test for SF #757818 2003-06-20 18:41:26 +00:00
Gustavo Niemeyer 25fe0bf91a Many new tests, based on gcov's coverage information.
From gcov's output (based on a locally changed _sre.c):

  82.07% of 1372 source lines executed in file ./Modules/_sre.c
2003-06-20 00:25:14 +00:00
Walter Dörwald a9da5ae07a Use find() instead of looping over the string in expanduser().
From SF patch #757058.
2003-06-19 10:21:14 +00:00
Tim Peters 76ca1d428f randrange(): Repaired my overly optimistic rewrite, and added comments
explaining what's wrong with the two simpler variants.
2003-06-19 03:46:46 +00:00
Tim Peters afb8979771 randrange(): 2.3 can no longer raises OverflowError on an int() call, so
some of this code because useless, and (worse) could return a long
instead of int (in Zope that's important, because a long can't be used
as a key in an IOBTree or IIBTree).
2003-06-19 03:23:06 +00:00
Raymond Hettinger befa37dd05 Minor updates:
* Updated comment on design of imap()
* Added untraversed object in izip() structure
* Replaced the pairwise() example with a more general window() example
2003-06-18 19:25:37 +00:00
Walter Dörwald 5edd785bbb Port test_complex.py to unittest.
Move the constructor tests from test_builtin to test_complex.

Add a bunch of tests (code coverage is a 94%).

From SF patch #736962.
2003-06-18 14:26:18 +00:00
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
Kurt B. Kaiser e394ef8b4a Update for release
Modified Files:
 	CREDITS.txt INSTALL.txt LICENSE.txt aboutDialog.py setup.py
2003-05-30 02:42:02 +00:00
Jack Jansen 9f0c5754a6 - Get the database from a different place.
- Added support for multi-line descriptions. Doesn't look nice
yet in Package Manager.
2003-05-29 22:07:27 +00:00
Barry Warsaw db6888b7df _make_boundary(): Fix for SF bug #745478, broken boundary calculation
in some locales.  This code simplifies the boundary algorithm to use
randint() which is what we wanted anyway.

Bump package version to 2.5.3.

Backport candidate for Python 2.2.3
2003-05-29 19:39:33 +00:00
Guido van Rossum 65f8cedd4a I saw errors from _fileobject.__del__ about missing self._sock. This
can happen if __init__ doesn't complete.  Fix it by adding a
try/except to __del__.
2003-05-29 14:36:57 +00:00
Guido van Rossum bb1861a996 Remove debug code from weakref_segfault(). 2003-05-29 14:30:49 +00:00
Guido van Rossum aabe0b3e34 Add testcase for SF 742911. 2003-05-29 14:26:57 +00:00
Raymond Hettinger b25a52aac0 Fix typo so that the test actually calls the tested function. 2003-05-29 07:20:29 +00:00
Raymond Hettinger f0fa1c03a0 Test ability to handle various type of iterators. 2003-05-29 07:18:57 +00:00
Greg Ward 29a1deff3a Test script changed. 2003-05-29 01:29:28 +00:00
Greg Ward 4f12d4652d Renamed test_errors() to test_setparameters() and completely rewrote it
to test the new setparameters() interface.

Modified play_sound_file() to print the elapsed time taken to play the
test sample (to the nearest 0.1 sec).
2003-05-29 01:27:39 +00:00
Greg Ward 080c110172 Order and number of arguments to setparameters() has changed.
Rename 'a' (the audio device) to 'dsp' everywhere.
2003-05-29 00:23:17 +00:00
Jack Jansen b789a060ee - Added a scheme whereby pimp can update itself, by importing a module
pimp_update if it exists. Upped the version number to indicate this.
  Fixes #731626.
- Added -V (print version) and -u (specify database URL) options when run
  as a command line tool.
2003-05-28 18:56:30 +00:00
Raymond Hettinger e8b0f0461b * Beefed-up tests
* Allow tuple re-use
* Call tp_iternext directly
2003-05-28 14:05:34 +00:00
Gregory P. Smith bc6e94a0fa Wrap the cursor functions with dbutils.DeadlockWrap to deal with the
expected DBLockDeadLockErrors.
2003-05-28 08:26:43 +00:00
Kurt B. Kaiser 62df044885 Added a config-main General option to delete sys.exitfunc. The default
is not to do that.  VPython and student environment support.

M PyShell.py
M config-main.def
M run.py
2003-05-28 01:47:46 +00:00
Jeremy Hylton 893801efb6 Add more tests from RFC 2202. 2003-05-27 16:16:41 +00:00
Raymond Hettinger 68dcd34c0a Fixup bare try/except. 2003-05-27 06:30:52 +00:00
Kurt B. Kaiser 8d1f11b0ef Whitespace Normalization
Modified Files:	PyShell.py ScriptBinding.py buildapp.py
2003-05-26 22:20:34 +00:00
Kurt B. Kaiser 053916959a 1. SF Bug 661676
The default font is not highlighted in the Options dialog when
   IDLEfork is first installed.

2. Reduce default font to 10 pt and increase default window height to give
   a better initial impression on Windows.

M config-main.def
M configDialog.py
2003-05-26 20:35:53 +00:00
Neal Norwitz 54f871e193 Fix SF bug #735694, Pydoc.py fixes links
Modified the patch some.  Fixed invalid link in UNICODE (to STRING).
Also updates some references.
2003-05-26 13:49:54 +00:00
Kurt B. Kaiser 6c638b6755 Bruce Sherwood RFE/Patch
SF 661318

Adds autosave capability to IDLE and IDLE configuration dialog.

User can Run/F5 without explicit save dialog.

The default is to require the user to confirm the save.

M ScriptBinding.py
M config-main.def
M configDialog.py
2003-05-26 06:23:10 +00:00
Jack Jansen 8ba0e80117 Added a --python option, which sets the python to be used in the #! line
in the bootstrap script of the applet.
2003-05-25 22:00:17 +00:00
Tim Peters 50d8b8b6ae Fleshed out WeakKeyDictionary.__delitem__ NEWS to cover issues raised on
Python-Dev.  Fixed typos in test comments.  Added some trivial new test
guts to show the parallelism (now) among __delitem__, __setitem__ and
__getitem__ wrt error conditions.

Still a bugfix candidate for 2.2.3 final, but waiting for Fred to get a
chance to chime in.
2003-05-25 17:44:31 +00:00
Tim Peters 886128f4f8 SF 742860: WeakKeyDictionary __delitem__ uses iterkeys
Someone review this, please!  Final releases are getting close, Fred
(the weakref guy) won't be around until Tuesday, and the pre-patch
code can indeed raise spurious RuntimeErrors in the presence of
threads or mutating comparison functions.

See the bug report for my confusions:  I can't see any reason for why
__delitem__ iterated over the keys.  The new one-liner implementation
is much faster, can't raise RuntimeError, and should be better-behaved
in all respects wrt threads.

New tests test_weak_keyed_bad_delitem and
test_weak_keyed_cascading_deletes fail before this patch.

Bugfix candidate for 2.2.3 too, if someone else agrees with this patch.
2003-05-25 01:45:11 +00:00
Kurt B. Kaiser 6f80594229 Improved the RESTART annotation in the shell window when the user
restarts the shell while it is generating output.  Also improved
annotation when user repeatedly hammers the Ctrl-F6 restart.
2003-05-24 21:12:46 +00:00
Kurt B. Kaiser 36364be3bf Fix a bug in Rev 1.10 - Windows can't handle a leading ':' if the
user's PYTHONPATH is empty (though Linux can).
Modified Files:
	idle idle.py idle.pyw
2003-05-24 21:01:39 +00:00
Kurt B. Kaiser 67fd0ea46d 1. Stake Freddy.
e.g. further improve subprocess interrupt, exceptions, and termination.
2. Remove the workarounds in PyShell.py and ScriptBinding.py involving
   interrupting the subprocess prior to killing it, not necessary anymore.
3. Fix a bug introduced at PyShell Rev 1.66: was getting extra shell menu
   every time the shell window was recreated.

M PyShell.py
M ScriptBinding.py
M rpc.py
M run.py
2003-05-24 20:59:15 +00:00
Tim Peters e87568dd9a SF bug 705231: Assertion failed, python aborts.
float_pow():  Don't let the platform pow() raise -1.0 to an integer power
anymore; at least glibc gets it wrong in some cases.  Note that
math.pow() will continue to deliver wrong (but platform-native) results
in such cases.
2003-05-24 20:18:24 +00:00
Raymond Hettinger b98154e424 'sum' is no longer a good variable name. Use 'total' instead. 2003-05-24 17:26:02 +00:00
Martin v. Löwis 5489597f56 Convert tcl_version to str before comparing. Fixes #729317. 2003-05-24 11:37:15 +00:00
Raymond Hettinger 4ec4fa208e iteritems() should not have been used for self.timeout which changes during the loop. 2003-05-23 08:51:51 +00:00
Walter Dörwald 8891021229 Port test_mimetools.py to PyUnit and add various tests.
From SF patch #736962.
2003-05-22 17:32:40 +00:00
Andrew M. Kuchling b1f8bab654 [Bug #741171] pdb crashes when enabling a non-existing breakpoint
Check the supplied breakpoint number more carefully.
(Incompatibility: before this patch, "enable -1" would enable
the last breakpoint on the list; now -1 is not a legal ID.  Not sure
anyone would ever use negative indices...)

2.2 bugfix candidate, assuming making -1 illegal isn't considered a problem.
2003-05-22 14:46:12 +00:00
Neal Norwitz 35c6cd0905 Walter's last checkin also needs to work on doubles.
* Move new test_byteswap into FPTest.
 * Remove extra lines at end of file.
2003-05-22 13:29:15 +00:00
Walter Dörwald cf99b0afb6 test_byteswap() fails on alphas, because treating the byte swapped bit
patterns as floats/doubles results in floating point exceptions.

Fix this by implementing a separate test_byteswap() for the floating
point tests. This new test compares the tostring() values of both arrays
instead of the arrays themselves.

Discovered by Neal Norwitz.
2003-05-22 13:15:31 +00:00
Jeremy Hylton 4d508adae3 Fix for SF [ 734869 ] Lambda functions in list comprehensions
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module.  Repair by move tmpname into the symtable entry.

Bugfix candidate.
2003-05-21 17:34:50 +00:00
Barry Warsaw e960e22579 Added a test for the fix of SF bug #658233, where continuation lines
in .po metadata caused a crash.

Also, removed some unnecessary code.

Backport candidate.
2003-05-20 17:28:54 +00:00
Barry Warsaw 7de63f57c8 GNUTranslations._parse(): Fix SF bug #658233, where continuation lines
in .po metadata caused a crash.

Backport candidate.
2003-05-20 17:26:48 +00:00
Just van Rossum 5d6ad75d50 'Progress' doesn't exists, causing 'from EasyDialogs import *' to fail 2003-05-20 12:07:19 +00:00
Raymond Hettinger 092b2a97d2 SF 740055: optional argument protocol in shelve.open is ignored
* added the missing parameter
* put optional parameters in correct positional order
2003-05-20 05:15:55 +00:00
Raymond Hettinger 22952a3efc SF bug 735293: Command line timeit.py sets sys.path badly
Paul Moore's patch to have timeit.py check the current directory for
imports (instead of the directory for Lib/timeit.py).
2003-05-20 04:59:56 +00:00
Kurt B. Kaiser 88957d8d0d Fix race exposed by 2.4 GHz XP box: Don't tear down PyShell until
subprocess polling has terminated.  Tk callit gets unhappy if it can't
find the function 'after' scheduled to run.

M PyShell.py
2003-05-19 23:11:51 +00:00
Skip Montanaro 7789237331 * Correct Sniffer doc to correspond to the implementation.
* Add optional delimiters arg to Sniffer.sniff() which restricts the set of
  candidate field delimiters.
2003-05-19 15:33:36 +00:00
Kurt B. Kaiser c626658a28 Let Python inform the user what went wrong with the import.
Modified Files:
 	idle idle.py idle.pyw
2003-05-19 02:07:44 +00:00
Martin v. Löwis 9a3a9f7791 Consider \U-escapes in raw-unicode-escape. Fixes #444514. 2003-05-18 12:31:09 +00:00
Walter Dörwald 9e46abed50 Fix array.array.insert(), so that it treats negative indices as
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
2003-05-18 03:15:10 +00:00
Brett Cannon df0d87a922 To be on the safe side, backed out any questionable iteritem changes and set back to item calls. 2003-05-18 02:25:07 +00:00
Kurt B. Kaiser 476740142d Whitespace Normalization 2003-05-18 02:24:32 +00:00
Kurt B. Kaiser 282f122250 Whitespace Normalization
Modified Files:
 	config-extensions.def config-highlight.def config-keys.def
 	config-main.def
2003-05-18 02:21:55 +00:00
Walter Dörwald ba39d9c168 Add another error case to the insert test. 2003-05-18 01:56:25 +00:00
Walter Dörwald 7fd9424230 Port test_array and test_winsound to PyUnit. Enhance tests for array
(code coverage for Modules/arraymodule.c is at 91%)

From SF patch #736962.
2003-05-18 00:47:47 +00:00
Kurt B. Kaiser a2792bec1d Show Freddy the mirror
i.e. improve subprocess exit paths and exeception reporting
2003-05-17 21:04:10 +00:00
Raymond Hettinger 74e67661a6 User cStringIO instead of StringIO. 2003-05-17 20:44:12 +00:00
Brett Cannon c8b188a9e2 Revert some changes back to dict.items made in a previous patch. 2003-05-17 19:51:26 +00:00
Tim Peters b0c854d6a7 datetime.timedelta is now subclassable in Python. The new test shows
one good use:  a subclass adding a method to express the duration as
a number of hours (or minutes, or whatever else you want to add).  The
native breakdown into days+seconds+us is often clumsy.  Incidentally
moved a large chunk of object-initialization code closer to the top of
the file, to avoid worse forward-reference trickery.
2003-05-17 15:57:00 +00:00