Commit Graph

6105 Commits

Author SHA1 Message Date
Skip Montanaro 0679a73c0e remove unqualified excepts - catch ImportError when trying to import
readline and get rid of string exception fallback when showing syntax
errors.
see bug 411881
2002-03-25 21:44:07 +00:00
Skip Montanaro 0897f0c4f8 eliminate unqualified except when checking for presence of LC_MESSAGES
see bug 411881
2002-03-25 21:40:36 +00:00
Skip Montanaro a959a36288 tighten up unqualified except in currentframe()
see bug 411881
2002-03-25 21:37:54 +00:00
Walter Dörwald dbd2d2560c Add tests for the iterkeys, itervalues and iteritems
methods in dict-proxy objects.
2002-03-25 18:36:32 +00:00
Barry Warsaw 4b186aff48 SMTP.__init__(): Fixed minor typo in docstring. 2002-03-25 04:00:38 +00:00
Neil Schemenauer cddc1a0249 Quote href properly. 2002-03-24 23:11:21 +00:00
Neil Schemenauer d69711cb1e Remove unnecessary \b. It was causing the RE to miss the tailing
slash on strings like "http://www.python.org/ is good".
2002-03-24 23:02:07 +00:00
Neil Schemenauer 153cc0fddc If possible, set FD_CLOEXEC flag on file descriptors opened using
TemporaryFile.  This flag causes the fd to be closed on exec().
2002-03-24 22:21:48 +00:00
Skip Montanaro 1c90d7ab3c tighten up except - os.close only raises OSError
see bug 411881
2002-03-24 20:48:26 +00:00
Tim Peters 8e5fd53be0 SF bug 480215: softspace confused in nested print
This fixes the symptom, but PRINT_ITEM has no way to know what (if
anything) PyFile_WriteObject() writes unless the object being printed
is a string.  When the object isn't a string, this fix retains the
guess that softspace should be set after PyFile_WriteObject().
We might want to say that it's the job of filelike-object write methods
to leave the file's softspace in the correct state.  That would probably
be better -- but everyone relies on PRINT_ITEM to guess for them now.
2002-03-24 19:25:00 +00:00
Skip Montanaro f3f87f743e oops - export InvalidURL in __all__ 2002-03-24 16:56:45 +00:00
Skip Montanaro 74e77e89de add test for InvalidURL 2002-03-24 16:54:38 +00:00
Skip Montanaro 03ff86da25 add test of InvalidURL 2002-03-24 16:54:16 +00:00
Skip Montanaro 9d38997e8c add InvalidURL exception - raised if port is given but empty or non-numeric 2002-03-24 16:53:50 +00:00
Skip Montanaro 1ce0073a4e tighten up except - in this context, AttributeError is the only exception
that can be raised - do_help won't be called if arg is not a string
2002-03-24 16:34:21 +00:00
Neil Schemenauer 6730f26cb0 Add local_hostname option to SMTP.__init__. If supplied, it is used
as the fully qualified local hostname.
2002-03-24 15:30:40 +00:00
Neil Schemenauer 03f3ee6d89 Try /var/mail before trying /usr/mail. Most new systems use /var.
This in inside the test so it really doesn't matter much.  Closes
SF patch 497097.
2002-03-24 01:38:38 +00:00
Neil Schemenauer eff724490f Add more tests for built-in types. Add tests for buffer objects.
Closes SF patch 494871.
2002-03-24 01:24:54 +00:00
Neil Schemenauer f06f8530f1 Use linecache for loading source code. Closes SF patch 490374. 2002-03-23 23:51:04 +00:00
Neil Schemenauer dbab3e3178 Add namespace selection for rlcompleter. Closes SF patch 490026. 2002-03-23 23:44:51 +00:00
Neil Schemenauer d03c342b99 Flush stdout before reading next command. Closes SF bug 526357. 2002-03-23 20:43:59 +00:00
Skip Montanaro 91cc17d20e Only AttributeError can be raised in this situation - on systems without
getuid or getpid.  posix_getuid & posix_getpid never raise exceptions when
called with no args.
2002-03-23 05:58:52 +00:00
Skip Montanaro 3c4a629bdc import statements only raise ImportError, right? 2002-03-23 05:55:18 +00:00
Skip Montanaro db5d1444a1 tighten up except - only ValueError can be raised in this situation 2002-03-23 05:50:17 +00:00
Skip Montanaro 3c643d8db3 tighten up except - int() only raises ValueError 2002-03-23 05:47:31 +00:00
Skip Montanaro 6ec967d066 added RFC 2396 tests from Aaron Swartz included in bug # 450225.
converted to use unittest
2002-03-23 05:32:10 +00:00
Skip Montanaro b1ba6b0044 no longer needed - converted test_urlparse.py to use unittest 2002-03-23 05:29:59 +00:00
Tim Peters 0c2c8e77fb SF bug 533234: tm_isdst > 1 Passed to strftime.
One more time on this turkey, but duller instead of cleverer.

Curious:  The docs say __getslice__ has been deprecated since 2.0, but
list.__getitem__ still doesn't work if you pass it a slice.  This makes
it a lot clearer to emulate a list by *being* a list <wink>.

Bugfix candidate.  Michael, just pile this patch on top of the others
that went by -- no need to try to pick these apart.
2002-03-23 03:26:53 +00:00
Skip Montanaro 07c57d4e60 better solution for bug #533234 courtesy of Tim.
Michael: use this version as the bugfix candidate...
2002-03-22 18:35:51 +00:00
Skip Montanaro e8c6a3eef6 guarantee that the dst flag of synthetic "time" tuples passed to strftime
is always 0.  This closes bug #533234.
2002-03-22 18:07:49 +00:00
Walter Dörwald 92b48b739f use stat attributes instead of tuple entries
and remove the unneccessary "import stat" statement.
2002-03-22 17:30:38 +00:00
Andrew M. Kuchling b26ca9db2e Revert part of previous patch: several install_* subcommands expect
.compile to be None, and set it to true if it is.
    Caught by Pearu Peterson.

Bugfix candidate, if the previous change is accepted for
release22-maint.
2002-03-22 15:35:17 +00:00
Andrew M. Kuchling 76fffd81e9 Add a simple test suite for netrc.py, and remove it from test_sundry 2002-03-22 02:48:57 +00:00
Andrew M. Kuchling 366a1df7f1 [Bug #532115] netrc module was broken
* 'macdef' (macro definition) wasn't parsed correctly
   * account value not reset for a subsequent 'default' line
   * typo: 'whitepace' -> 'whitespace'

Bugfix candidate.
2002-03-22 02:46:41 +00:00
Andrew M. Kuchling 3f1822b468 Add missing Boolean options
Remove unused no_compile flag
Initialize the Boolean attribute .compile to 0 instead of None

Bugfix candidate.
2002-03-21 23:46:54 +00:00
Andrew M. Kuchling da9f0bf4dd Add unlisted Boolean options. Thomas H., can you please check that I
got this right?

Bugfix candidate, unless Thomas notes a problem.
2002-03-21 23:44:01 +00:00
Andrew M. Kuchling 5de82a855e [Bug #517451] bdist_rpm didn't list all of its Boolean options.
(Someone should check the other commands for this same error.)

Bugfix candidate.
2002-03-21 23:27:54 +00:00
Walter Dörwald b25c2b0a4a [Apply SF patch #504943]
This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
2002-03-21 10:38:40 +00:00
Martin v. Löwis 047c05ebc4 Do not insert characters for unicode-escape decoders if the error mode
is "ignore". Fixes #529104.
2002-03-21 08:55:28 +00:00
Andrew M. Kuchling bdf1f19fee [Apply patch #500457 from the PyXML tracker]
Add iterator support to pulldom.DOMEventStream

New feature, so not a bugfix candidate (though it should be safe for inclusion)
2002-03-20 23:56:34 +00:00
Tim Peters bcc2c125f8 Change raw "except:" constructs to pass on KeyboardInterrupt.
Bugfix candidate?  Don't know -- never bothered me, but it's minor
either way.
2002-03-20 19:32:03 +00:00
Neil Schemenauer cacbdf6229 Make GzipFile an iterator. Closes bug #532621. 2002-03-20 18:36:00 +00:00
Andrew M. Kuchling c63a396c5f A faster version of the find_prefix_at_end() function (that I found in the
last Medusa release)

Should be safe as a bugfix candidate, though it's not fixing a bug.
2002-03-20 02:22:58 +00:00
Andrew M. Kuchling a3c0b9334e [Bug #531616] Make HTTPS work again by adding a sendall method to the
FakeSocket class.  Without it, the sendall() call got the method on
the underlying socket object, and that messed up SSL.

Does httplib use other methods of sockets that FakeSocket doesn't support?
Someone should take a look...  (I'll try to give it a once-over.)

2.2.1 bugfix candidate.
2002-03-18 22:51:48 +00:00
Andrew M. Kuchling 56a42356b7 To make 'urllib.py -t' run again, change FTP URL to a file that actually
exists.
2002-03-18 22:18:46 +00:00
Michael W. Hudson bd3e771a97 amk's fix attached to
[ 516299 ] urlparse can get fragments wrong
2002-03-18 13:06:00 +00:00
Martin v. Löwis 5c137c2251 Patch #495598: add an -q (quiet) option to pycompile. 2002-03-18 12:44:08 +00:00
Martin v. Löwis 73f570ba08 Correctly set default entry in all cases. 2002-03-18 10:43:18 +00:00
Martin v. Löwis d22368ffb3 Patch #499513: use readline() instead of readlines(). Removed the
unnecessary redirection limit code which is already in FancyURLopener.
2002-03-18 10:41:20 +00:00
Martin v. Löwis 9d3eba87d6 Patch #525870: Avoid duplicate stat calls, use st_ attributes. 2002-03-18 08:37:19 +00:00
Guido van Rossum 7e30548285 Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault
The proper fix is not quite what was submitted; it's really better to
take the class of the object passed rather than calling PyMethod_New
with NULL pointer args, because that can then cause other core dumps
later.

I also added a testcase for the fix to classmethods() in test_descr.py.

I've already applied this to the 2.2 branch.
2002-03-18 03:09:06 +00:00
Skip Montanaro c99475e7a0 dump the string exception fallback for anydbm.error. 2002-03-18 03:07:20 +00:00
Skip Montanaro 4894a97e22 initial test_anydbm module - based on test_dumbdbm.py 2002-03-18 03:00:37 +00:00
Steven M. Gava dbfe92cd27 further work on dynamic reconfiguration;
keybindings
2002-03-18 02:38:44 +00:00
Paul Prescod b845f3b4dd netrc will now raise a more predictable exception when $HOME is not set
(as it is often not on Windows). The code was always designed so that it
would raise an IOError if there was no .netrc. But if there was no $HOME
it would return a KeyError which would be somewhat unexpected for code
that didn't know the algorithm it used to find .netrc. The particular
code that triggered this problem for me was ftpmirror.py which handled
the IOError gracefully, but not the KeyError.
2002-03-18 02:13:48 +00:00
Skip Montanaro c08fe82b32 restructure a bit to not rely on test case execution ordering
add test case for bug #482460
2002-03-17 23:03:42 +00:00
Jack Jansen 03d3e33af9 Regenerated for Irix 6.5. 2002-03-17 21:49:20 +00:00
Jack Jansen 5ae73c8f75 Patch by Michael Pruett: make regen work on Irix 6.0 and 6.5. 2002-03-17 21:46:48 +00:00
Tim Peters 2400831773 SF patch 530070: pydoc regression, from Martin and Guido.
Change the way __doc__ is handled, to avoid blowing up on non-string
__doc__ values.
2002-03-17 18:56:20 +00:00
Martin v. Löwis 587c98c863 Patch #430706: Persistent connections in BaseHTTPServer. 2002-03-17 18:37:22 +00:00
Fred Drake 15b6893d95 Wrap a couple of long lines. 2002-03-15 14:37:23 +00:00
Skip Montanaro 1b9c177c5d Corrected _localized_name.__getitem__ based on code in patch 503202 (which I
thought was just a bug report, so didn't notice - doh!).  This handles
slicing, which v 1.23 didn't.
2002-03-15 13:52:43 +00:00
Martin v. Löwis 95700f7cde Patch #527427: minidom fails to use NodeList sometimes. 2002-03-15 13:51:59 +00:00
Jack Jansen e89f128a60 Skip test_longexp for MacPython on Mac OS X. It triggers a pathological realloc slowdown. Some tests with shorter expressions lead me to the conclusion that it will eventually finish, but it may take a few weeks:-)
2.2.1 candidate.
2002-03-15 13:50:54 +00:00
Jack Jansen ff0a7b8ca2 If no webbrowsers were found _tryorder would be empty, cmd would never be set and the "del cmd" would fail. Fixed.
2.2.1 candidate.
2002-03-15 13:47:32 +00:00
Michael W. Hudson e5363b7de5 .... 2002-03-15 10:21:59 +00:00
Michael W. Hudson ce00b735cd Fix
[ 530236 ] os.py assumes existence of statvfs_resul

This was pretty dense of me.  Sorry.

2.2.1 candidate.
2002-03-15 10:18:58 +00:00
Skip Montanaro 4c8349592d make _localized_name instances work more like the tuples they replaced. In
particular, negative indexes work and they are limited by the actual length
of the names they represent (weekday and month names).  This closes bug
#503202.
2002-03-15 04:08:38 +00:00
Skip Montanaro 693c6c44c4 added test case to catch index errors with _localized_name class 2002-03-15 03:57:04 +00:00
Skip Montanaro b32302176e first cut at skip-list for hp-ux 11 based upon input from Bill Lawler at HP. 2002-03-15 02:54:03 +00:00
Neal Norwitz 9672901742 Remove duplicate "import os" 2002-03-14 23:48:18 +00:00
Guido van Rossum 8c84255316 "Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__.  This is done by adding a bozo __getstate__
that always raises TypeError.

Bugfix candidate (also the checkin to typeobject.c, of course).
2002-03-14 23:05:54 +00:00
Neal Norwitz 8a11f5dc7b SF #515015, raise exception if code not found in findsource() 2002-03-13 03:14:26 +00:00
Guido van Rossum d70356729f Test for the fix I just checked in to moduleobject.c.
Bugfix candidate.
2002-03-12 20:43:31 +00:00
Skip Montanaro 57fd45ea07 back out spurious change from 1.22 2002-03-12 19:48:03 +00:00
Skip Montanaro 59b40c0828 Popen3 and Popen4 should be in __all__ 2002-03-12 19:16:19 +00:00
Fred Drake 8b68862680 Set/update self.cwd properly. 2002-03-12 14:26:37 +00:00
Tim Peters 8f01b680c8 Change Windows file.truncate() to (a) restore the original file position,
and (b) stop trying to prevent file growth.

Beef up the file.truncate() docs.

Change test_largefile.py to stop assuming that f.truncate() moves the
file pointer to the truncation point, and to verify instead that it leaves
the file position alone.  Remove the test for what happens when a
specified size exceeds the original file size (it's ill-defined, according
to the Single Unix Spec).
2002-03-12 03:04:44 +00:00
Steven M. Gava 9d142adfce fixes to tabwidth code removal 2002-03-12 02:33:52 +00:00
Steven M. Gava 63f6714c3a remove tabwidth (for tabs) config stuff,
because of the way the tk text widget handles
tabs they must remain a fixed size in idle
2002-03-12 00:52:42 +00:00
Steven M. Gava b1585417d1 further work on dynamic config changes;
editor font
2002-03-12 00:21:56 +00:00
Neal Norwitz 1af5e35a98 Fix typo 2002-03-11 14:44:12 +00:00
Guido van Rossum c9e9e40b7b Add a check that SF bug 516727 is really fixed. 2002-03-11 13:21:25 +00:00
Martin v. Löwis db04489953 Patch #443899: Check modes on files before performing operations.
Use IOErrors where file objects use them.
2002-03-11 06:46:52 +00:00
Tim Peters fb05db2cae file_truncate(): provide full "large file" support on Windows, by
dropping MS's inadequate _chsize() function.  This was inspired by
SF patch 498109 ("fileobject truncate support for win32"), which I
rejected.

libstdtypes.tex:  Someone who knows should update the availability
blurb.  For example, if it's available on Linux, it would be good to
say so.

test_largefile:  Uncommented the file.truncate() tests, and reworked to
do more.  The old comment about "permission errors" in the truncation
tests under Windows was almost certainly due to that the file wasn't open
for *write* access at this point, so of course MS wouldn't let you
truncate it.  I'd be appalled if a Unixish system did.

CAUTION:  Someone should run this test on Linux (etc) too.  The
truncation part was commented out before.  Note that test_largefile isn't
run by default.
2002-03-11 00:24:00 +00:00
Guido van Rossum 15d529aec5 Bugfix candidate.
Adapter from SF patch 528038; fixes SF bug 527816.

The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.
2002-03-11 00:07:13 +00:00
Martin v. Löwis b5255114d1 Access the exception argument to see whether it starts with '500'.
Fixes #527855.
2002-03-10 15:59:58 +00:00
Tim Peters d674e17e96 SF patch 499062: Minor typo in test_generators.py.
There's no actual patch there.  It's an objection that Guido's example
doesn't actually generator "leaves", so change the comment that says
it does.
2002-03-10 07:59:13 +00:00
Jeremy Hylton 3921ff675e Fix SF bug 525520.
Don't automatically add a Host: header if the headers passed to
request() already has a Host key.
2002-03-09 06:07:23 +00:00
Jeremy Hylton 547a3167be Fix pyclbr test of httplib without really understanding pyclbr.
It seems that the new class HTTP11 in httplib.test() isn't
discoverable by pyclbr, which causes this test to fail.
2002-03-08 21:31:59 +00:00
Jeremy Hylton 8acf1e0e01 SF bug report #405939: wrong Host header with proxy
In August, Greg said this looked good, so I'm going ahead with it.

The fix is different from the one in the bug report.  Instead of using
a regular expression to extract the host from the url, I use
urlparse.urlsplit.

Martin commented that the patch doesn't address URLs that have basic
authentication username and password in the header.  I don't see any
code anywhere in httplib that supports this feature, so I'm not going
to address it for this fix.

Bug fix candidate.
2002-03-08 19:35:51 +00:00
Andrew M. Kuchling 7dd5f3cf69 [Bug #491820] Define two abstract methods to shut up Pychecker, and for
documentation purposes.  These implementations are the same as the
    ones suggested by Skip in the bug report.
2002-03-08 18:27:11 +00:00
Andrew M. Kuchling cc5f5b2686 [Bug #517554] When a signal happens during the select call in
asyncore.poll, the select fails with EINTR, which the
	code catches. However, the code fails to clear the
	r/w/e arrays (like poll3 does), which means it acts as
	if every descriptor had received all possible events.

Bug report and patch by Cesar Eduardo Barros
2002-03-08 18:19:59 +00:00
Andrew M. Kuchling 1bf71172f8 As part of fixing bug #523301, add a simple test of ConfigParser.write() 2002-03-08 18:10:12 +00:00
Andrew M. Kuchling 00824ed733 [Bug #523301] ConfigParser.write() produces broken output for values that
were originally rfc822-like line continuations.
   Modified version of a patch from Matthias Ralfs.
2002-03-08 18:08:47 +00:00
Piers Lauder 95f8495de8 fixed missing IMAP4_SSL_PORT 2002-03-08 09:05:12 +00:00
Tim Peters c9ffa068d1 SF bug 515943: searching for data with \0 in mmap.
mmap_find_method():  this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.

Someone please run on Linux too (the extended test_mmap works on Windows).

Bugfix candidate.
2002-03-08 05:43:32 +00:00
Skip Montanaro 31fd86c4f1 add Content-Type header to error responses
this closes patch 502080
2002-03-08 02:36:18 +00:00
Piers Lauder a4f8313cbb add SSL class submitted by Tino Lange 2002-03-08 01:53:24 +00:00
Skip Montanaro df708788b6 add repr_str as alias for repr_string in both HTMLRepr and TextRepr classes
- reflects the change in type("").__name__ between 2.1 and 2.2.  The
__name__ field is used to find a method to call for particular types.
2002-03-07 22:58:02 +00:00
Michael W. Hudson 02b28ec316 Test for
[ 526039 ] devious code can crash structseqs

Bugfix candidate.
2002-03-06 17:18:15 +00:00
Michael W. Hudson 0e02530a79 Special support for pickling os.stat and os.stat_vfs results portably
(the types come from different modules on different platforms).

Added tests for pickling these types.

May be a bugfix candidate.
2002-03-06 17:11:18 +00:00
Martin v. Löwis b786e61b1c Set default value for readlines.sizehint to None. Change needed for 2.2.1
as well.
2002-03-05 15:46:38 +00:00
Michael W. Hudson 7bb466a1a5 A fix & test for
[ 496873 ] structseqs unpicklable

by adding a __reduce__ method to structseqs.

Will also commit this to the 2.2.1 branch momentarily.
2002-03-05 13:27:58 +00:00
Steven M. Gava dfd0b296d7 remove debug cruft 2002-03-05 00:31:43 +00:00
Steven M. Gava f31eec0e2e further work on new config system 2002-03-05 00:25:58 +00:00
Barry Warsaw 5833baa309 Removed two unused imports. Closes patch #525225.
2.2.1 candidate (but not terribly important).
2002-03-03 22:46:46 +00:00
Neal Norwitz 290d31e2fc SF #506611, fix sys.setprofile(), sys.settrace() core dumps
when no arguments are passed
2002-03-03 15:12:58 +00:00
Andrew MacIntyre 54e0eabc2d OS/2 more program behaves like Win32 more
(see patch #514490, by Stefan Schwarzer)
2002-03-03 03:12:30 +00:00
Steven M. Gava b77d343bc8 First work on making config changes dynamic,
dynamic theme changes
2002-03-02 07:16:21 +00:00
Tim Peters 5329cdb3ce _PyLong_Copy(): was creating a copy of the absolute value, but should
copy the sign too.  Added a test to test_descr to ensure that it does.

Bugfix candidate.
2002-03-02 04:18:04 +00:00
Barry Warsaw ffd05ee90d Added PortableUnixMailbox to the __all__ variable, and in the __main__
section use this class instead of UnixMailbox as per the comments in
the latter's class.

Bug fix candidate for 2.2.1.
2002-03-01 22:39:14 +00:00
Guido van Rossum 2eb0b87d14 SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects
Due to the bizarre definition of _PyLong_Copy(), creating an instance
of a subclass of long with a negative value could cause core dumps
later on.  Unfortunately it looks like the behavior of _PyLong_Copy()
is quite intentional, so the fix is more work than feels comfortable.

This fix is almost, but not quite, the code that Naofumi Honda added;
in addition, I added a test case.
2002-03-01 22:24:49 +00:00
Martin v. Löwis 9986633609 Patch 520694: arraymodule.c improvements:
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
2002-03-01 10:27:01 +00:00
Guido van Rossum 88b666ca3f SF patch 518765 (Derek Harland): Bug in copy.py when used through
rexec.

When using a restricted environment, imports of copy will fail with an
AttributeError when trying to access types.CodeType.

Bugfix candidate (all the way back to 1.5.3, but at least 2.1.3 and
2.2.1).
2002-02-28 23:19:52 +00:00
Martin v. Löwis 51e234aa68 Patch #522279: transformer.py nodes shadows global. 2002-02-28 17:48:48 +00:00
Martin v. Löwis 1c63f6e489 Correct various errors:
- Use substring search, not re search for user-agent and paths.
- Consider * entry last. Unquote, then requote URLs.
- Treat empty Disallow as "allow everything".
Add test cases. Fixes #523041
2002-02-28 15:24:47 +00:00
Marc-André Lemburg bbea4717bc Allow shebang's which use versioned Python binaries. Fixes
bug #521526.
2002-02-28 09:16:21 +00:00
Guido van Rossum 06ee2531a8 SF patch #523169, by Samuele Pedroni.
There were never tests for the fact that list() always returns a *new*
list object, even when the argument is a list, while tuple() may
return a reference to the argument when it is a tuple.  Now there are.
2002-02-26 22:39:23 +00:00
Steven M. Gava 67716b5f53 bugfix for the problem where EditorWindow instances
would appear to freeze for a few seconds on closing
in some cases when running under X
2002-02-26 02:31:03 +00:00
Guido van Rossum bdba32051b canonic(): Fix by Edward K Ream to make breakpoints work better on
Windows: apply normcase() as well as abspath().  (Note: this isn't
needed to make IDLE work, but it's a good idea anyway.)

Bugfix candidate -- both 2.2.1 and 2.1.3.
2002-02-25 23:23:24 +00:00
Guido van Rossum 16ac99a959 Fix by Edward K Ream to make breakpoints work on Windows: insert a
missing call to self.canonic().
2002-02-25 23:22:08 +00:00
Martin v. Löwis 4ca196dd8d Set TCL_LIBRARY before import _tkinter. Suggested by Kirill Simonov.
Fixes #418173 and #219960. 2.2.1 candidate.
2002-02-24 16:51:45 +00:00
Martin v. Löwis 3356766abf Accept Unicode strings as SMTP TO addresses. Fixes #521270.
2.2.1 candidate.
2002-02-24 15:07:24 +00:00
Andrew MacIntyre 5cef57131f OS/2 EMX port Library and regression test changes:
Lib/
    os.py
    os2emxpath.py   // added - OS/2 EMX specific path manipulation routines
    popen2.py
    site.py
  Lib/test/
    test_fcntl.py
    test_longexp.py
2002-02-24 05:32:32 +00:00
Steven M. Gava 75a8e65873 tracking changes to python idle:
python Patch #520483: Make IDLE OutputWindow handle Unicode.
2002-02-23 23:27:08 +00:00
Martin v. Löwis 0ac16ec149 Patch #521714: fix pychecker warnings in ast.py. 2002-02-23 22:35:33 +00:00
Martin v. Löwis 9d51fc8972 Patch #521670: Remove unused sys import. 2002-02-23 22:31:53 +00:00
Andrew MacIntyre f47d60ffec Create and populate OS/2 EMX port platform specific library directory:
Lib/plat-os2emx/
    IN.py
    SOCKET.py
    grp.py
    pwd.py       // pwd module that can process real passwd files
    regen
2002-02-22 11:06:30 +00:00
Piers Lauder f2d7d15805 moved command logging routines into IMAP4 class: thread safe/faster 2002-02-22 01:15:17 +00:00
Thomas Heller d2d58e0496 First version which runs an install-script (specified by the
--install-script ... command line option to bdist_wininst) at the end
of the installation and at the start of deinstallation.  Output
(stdout, stderr) of the script (if any) is displayed in the last
screen at installation, or in a simple message box at deinstallation.

sys.argv[1] for the script will contain '-install' at installation
time or '-remove' at deinstallation time.

The installation script runs in an environment (embedded by the
bdist_wininst runtime) where an additional function is available as
builtin:

create_shortcut(path, description, filename,
	        [arguments[, workdir[, iconpath, iconindex]]])

Recreated this file after source changes.
2002-02-20 08:01:19 +00:00
Tim Peters 8044055d82 Somebody made list.__dict__ grow a '__doc__' key, but apparently didn't
run the test suite afterwards.  Either that, or whether '__doc__' shows
up is platform-dependent!
2002-02-19 04:25:19 +00:00
Neal Norwitz 45bec8c7fc SF #515023. Make _DummyThread.join() signature match base class (Thread) 2002-02-19 03:01:36 +00:00
Steven M. Gava 82c6682bb7 further work on config system 2002-02-18 01:45:43 +00:00
Steven M. Gava 4974575609 handle user theme and key set deletion 2002-02-18 01:43:11 +00:00
Tim Peters 18e6778bcd Repair so that importing socket doesn't blow up on platforms that lack
SSL support.  test_socket.py passes again on Windows.

Added an XXX about adding _ssl exports to the __all__ list (it doesn't
appear to be doing anything about that now, but since I don't have SSL
on this box I can't really tell).
2002-02-17 04:25:24 +00:00
Martin v. Löwis b4779c3496 Patch #515598: removed unused import of os. 2002-02-16 23:16:53 +00:00
Martin v. Löwis e12454f44a The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.
Replaces calls to socket.send() (which isn't guaranteed to send all data)
with the new socket.sendall() method.
2002-02-16 23:06:19 +00:00
Marc-André Lemburg a5d2b4cb18 Break SSL support out of _socket module and place it into a new
helper module _ssl.

The support for the RAND_* APIs in _ssl is now only enabled
for OpenSSL 0.9.5 and up since they were added in that
release.

Note that socketmodule.* should really be renamed to _socket.* --
unfortunately, this seems to lose the CVS history of the file.

Please review and test... I was only able to test the header file
chaos in socketmodule.c/h on Linux. The test run through fine
and compiles don't give errors or warnings.

WARNING: This patch does *not* include changes to the various
non-Unix build process files.
2002-02-16 18:23:30 +00:00
Tim Peters e4418609f7 Whitespace normalization. 2002-02-16 07:34:19 +00:00
Tim Peters 20882dd174 SF bug #516372: test_thread: unhandled exc. in thread
Fix exit races in test_thread.py and test_threaded_import.py.
I suspect the bug is provokable only under Linux (where child threads
seem to get lots of cycles before they get killed after the main thread
exits), or on multi-processor machines running other OSes.
Bugfix candidate.
2002-02-16 07:26:27 +00:00
Greg Ward 2e250b4378 Fix bug #511786 (2.2.1 candidate): ensure that custom-supplied headers
are preserved for redirected requests.
2002-02-11 20:46:10 +00:00
Neal Norwitz 34172d5316 SF #515020, delete global variables which are used only for temporary
values in for loops (dircase, prefix, sitedir).
2002-02-11 18:34:41 +00:00
Neal Norwitz 83bd70a7fa SF #515005, change "1 + ''" (which pychecker warns about being invalid)
into "raise Exception".
2002-02-11 18:26:02 +00:00
Neal Norwitz f7fdedc320 SF #515022 remove unused variable 2002-02-11 18:18:29 +00:00
Neal Norwitz aa38aa5435 SF #515009, delete global variable that was apparently used only
in a for loop.
2002-02-11 18:14:22 +00:00
Neal Norwitz d5ba4aeab0 SF #515018, delete global variable that was apparently used only
in a list comprehension.
2002-02-11 18:12:06 +00:00
Neal Norwitz f963b45dfd SF #515026, delete global variable that was apparently used only
in a for loop.
2002-02-11 18:11:09 +00:00
Neal Norwitz bc9bc187aa SF #515024 remove unused variable 2002-02-11 18:06:21 +00:00
Neal Norwitz f151625b59 SF #515021, print the refused list to the DEBUGSTREAM, so the parameter is used
Note:  There is a TBD (aka FIXME) for how best to handle the refused addresses
2002-02-11 18:05:05 +00:00
Neal Norwitz 4212ea4d7a SF #515012, cleanup: remove unused variable 2002-02-11 18:01:32 +00:00
Neal Norwitz 22c5d77d47 SF #515011, cleanup: remove "or 0" condition 2002-02-11 17:59:51 +00:00
Neal Norwitz 7fd41ccdb1 SF #515006, remove unnecessary import 2002-02-11 17:57:55 +00:00
Neal Norwitz 086ac007a3 SF #515004 cleanup
- remove unnecessary imports
  - rename dum -> dummy
2002-02-11 17:56:27 +00:00
Neal Norwitz 9fb289d826 SF #515000, print result of f.tell() in test() instead of ignoring 2002-02-11 17:52:18 +00:00
Marc-André Lemburg a0af63b242 Corrected import behaviour for codecs which live outside the encodings
package.
2002-02-11 17:43:46 +00:00
Just van Rossum 005dbb219e on MacOSX/Darwin, use ranlib when building static libs. 2002-02-11 15:31:50 +00:00
Steven M. Gava e28ee754b0 improvement to keybinding re-use check 2002-02-11 03:45:22 +00:00
Steven M. Gava 9f25e67dd7 base GetHighlight on GetThemeDict for better defaults 2002-02-11 02:51:18 +00:00
Steven M. Gava 46fa7bf86c further work on config saving 2002-02-11 02:28:19 +00:00
Steven M. Gava 052937f0b5 further work on config saving 2002-02-11 02:20:53 +00:00
Marc-André Lemburg 462004e90a Add IANA character set aliases to the encodings alias dictionary
and make alias lookup lazy.

Note that only those IANA character set aliases were added for which
we actually have codecs in the encodings package.
2002-02-10 21:36:20 +00:00
Fred Drake 4a02f9542f Added regression test for start()/stop() returning bogus NULL. 2002-02-08 21:29:22 +00:00
Guido van Rossum 5ff8cb4f1b Whitespace cleanup. 2002-02-08 20:41:34 +00:00
Neal Norwitz af64263afc Fix typo 2002-02-08 20:13:53 +00:00
Fred Drake 63cd9bf488 Python 10 was a success, commemorate it\! 2002-02-08 20:13:47 +00:00
Thomas Heller 745b4609cb Make it 1.5.2 compatible again. 2002-02-08 14:41:31 +00:00
Marc-André Lemburg bd3be8f0ca Fix to the UTF-8 encoder: it failed on 0-length input strings.
Fix for the UTF-8 decoder: it will now accept isolated surrogates
(previously it raised an exception which causes round-trips to
fail).

Added new tests for UTF-8 round-trip safety (we rely on UTF-8 for
marshalling Unicode objects, so we better make sure it works for
all Unicode code points, including isolated surrogates).

Bumped the PYC magic in a non-standard way -- please review. This
was needed because the old PYC format used illegal UTF-8 sequences
for isolated high surrogates which now raise an exception.
2002-02-07 11:33:49 +00:00
Marc-André Lemburg 9273ec726c Forgot to add the new emxccompiler.py from Andrew I. MacIntyre's
distutils patch for OS/2.

Here it is...
2002-02-06 18:22:48 +00:00
Marc-André Lemburg 3688a882d3 Fix for the UTF-8 memory allocation bug and the UTF-8 encoding
bug related to lone high surrogates.
2002-02-06 18:09:02 +00:00
Steven M. Gava 085eb1b372 further work on config system and config saving 2002-02-05 04:52:32 +00:00
Andrew M. Kuchling 3b388ec8b3 [Bug #220993; may also fix bug #479469] Fix flakiness when old
installations are present, by always unlinking the destination file
  before copying to it.  Without the unlink(), the copied file remains
  owned by its previous UID, causing the subsequent chmod() to fail.

Bugfix candidate, though it may cause changes on platforms where
  file ownership behaves differently.
2002-02-01 18:29:34 +00:00
Guido van Rossum 8cb6540652 Wesley Chun's SF patch 511380: add CGIHTTPServer error supt for Win32
This uses os.popen3 (if it exists) to ensure that errors from a
non-Python CGI script are logged.

Bugfix candidate.
2002-02-01 16:27:59 +00:00
Thomas Heller 0c350bfad0 package_dir must be converted from the distutils path conventions to
local conventions before being used by build_py.

Fixes SF bug #509288, probably a candidate for 2.2.1
2002-02-01 09:44:09 +00:00
Steven M. Gava 7cff66d469 improve user config dir handling 2002-02-01 03:02:37 +00:00
Steven M. Gava a498af269c more work on configuration saving 2002-02-01 01:33:36 +00:00
Andrew M. Kuchling b24231e088 Restrict the mode to the lowest four octal positions; higher positions
contain the type of the file (regular file, socket, link, &c.).
   This means that install_scripts will now print
   "changing mode of <file> to 775" instead of "... to 100775".

2.2 bugfix candidate, I suppose, though this isn't actually fixing a bug.
2002-01-31 22:08:38 +00:00
Marc-André Lemburg 2544f51036 OS/2 patches by Andrew I MacIntyre for distutils.
Closes patch #435381.
2002-01-31 18:56:00 +00:00
Fred Drake 1453754fcd string.split() docstring described the interpretation of the maxsplit
argument incorrectly.
This closes SF bug #505997.
2002-01-30 16:15:13 +00:00
Tim Peters 40915bf8dd Thanks to Detlef Lannert for pointing out a typo in the code that
uses _DummyMutex on platforms without threads.
2002-01-30 09:11:42 +00:00
Tim Peters c7349ee2c6 New TemporaryFile implementation for Windows: this doesn't need a
TemproraryFileWrapper wrapper anymore, and should be immune from the
problem that a temp file inherited by a spawned process caused an
attempt to close the temp file in the spawning process to blow
up (the unlink in TemporaryFileWrapper.close() blew up with a
"Permission denied" error because, despite that the temp file got
closed in the spawning process, the spawned process still had it open
by virtue of C-level file descriptor inheritance).  In context,
that bug took days to figure out <wink/sigh>.
2002-01-30 07:47:51 +00:00
Tim Peters d9fbf353a1 This test left a new set of 3 junk files behind each time it was run. 2002-01-30 07:32:53 +00:00
Martin v. Löwis 9635d0bd1f Encode MSVC paths as mbcs. Fixes #509117. 2.2.1 candidate. 2002-01-29 10:23:42 +00:00
Steven M. Gava 2d7bb3fa66 further work on config saving 2002-01-29 08:35:29 +00:00
Tim Peters 4fd5a06580 SF bug #509805 tempfile.gettempdir not threadsafe
This is an ancient race when multiple threads call gettempdir() (or
anything relying on it) for the first time.

Fixed x-platform via the Big Hammer of rearranging the code to serialize
the first calls.  Subsequent calls are as fast as before.

Note that the Python test suite can't provoke this bug:  it requires
setting up multiple threads making the very first calls into tempfile,
but the test suite uses tempfile several times before getting to
test_threadedtempfile.

Bugfix candidate.
2002-01-28 23:11:23 +00:00
Barry Warsaw 6423f8b884 Test case of a singleton multipart; i.e. a multipart/* with only one
subpart.
2002-01-27 06:49:26 +00:00
Barry Warsaw 763af4173d test_multipart_one_part(): Idempotency test case for a multipart/*
with only one subpart.
2002-01-27 06:48:47 +00:00
Barry Warsaw 15e9dc9eac _parsebody(): When adding subparts to a multipart container, make sure
that the first subpart added makes the payload a list object.
Otherwise, a multipart/* with only one subpart will not have the
proper structure.
2002-01-27 06:48:02 +00:00
Steven M. Gava f9bb90e453 further work on saving configs 2002-01-24 06:02:50 +00:00
Steven M. Gava 813b56e387 dialog for getting a new config file section name 2002-01-24 05:59:05 +00:00
Steven M. Gava 8cf2704a59 staying current with python idle fixes 2002-01-23 23:56:41 +00:00
Steven M. Gava d91b0d6a65 fix for python2.2 -Qnew division error,
thanks Tim!
2002-01-23 05:15:17 +00:00
Steven M. Gava bbf5ef552f more on config saving 2002-01-22 11:35:50 +00:00
Steven M. Gava c112cd880a further work on config saving 2002-01-22 05:56:40 +00:00
Steven M. Gava 5f28e8fbfb extension config reading by configDialog and
beginning of configuration saving
2002-01-21 06:38:21 +00:00
Steven M. Gava 72c3bf076f changeover to new keybinding configuration implementation 2002-01-19 10:41:51 +00:00
Steven M. Gava c628a06c70 further work on keybinding configuration 2002-01-19 10:33:21 +00:00
Steven M. Gava 68d7336cb0 keybinding configuration 2002-01-19 01:30:56 +00:00
Steven M. Gava facfc09352 keybinding configuration 2002-01-19 00:29:54 +00:00
Thomas Heller 5cba76df7b SWIGing a source file <name>.i silently overwrites <name>.c if it is
present - at least the swigged file should be named <name>_wrap.c as
this is also SWIG's default. (Even better would be to generate the
wrapped sources in a different location, but I'll leave this for
later).

Newer versions of SWIG don't accept the -dnone flag any more.

Since virtually nobody uses SWIG with distutils, this should do no
harm.

Suggested be Martin Bless on c.l.p.
2002-01-18 20:30:53 +00:00
Mark Hammond f717f0500c Allow abspath to still do something sensisble if the nt module can not be imported. 2002-01-17 00:44:26 +00:00
Guido van Rossum eaa0a22f43 Disable code intended for PEP 277. 2002-01-15 21:25:51 +00:00
Fred Drake 5e99731ab9 Only test ntpath.abspath() on Windows. This allows the rest of the module to
be tested regardless of the host platform.
2002-01-15 03:46:43 +00:00
Martin v. Löwis 9668b933e3 Patch #414775: Add --skip-build option to bdist command. 2002-01-12 11:27:42 +00:00
Steven M. Gava edb60a7ba9 key binding handling dialog 2002-01-12 09:48:02 +00:00
Martin v. Löwis a55ffaeee9 Add a per-message fallback mechanism for translations. 2002-01-11 06:58:49 +00:00
Martin v. Löwis 1be6419871 Add fallback argument to translation(). Request fallbacks on install.
Fixes #500595.
2002-01-11 06:33:28 +00:00
Fred Drake 925f144274 Fix webbrowser.py security bug: be more careful about what we pass to
os.system().
This closes Python bug #500401, Debian bug #127507.
2002-01-07 15:29:01 +00:00
Mark Hammond e843e482ce Ensure Unicode filenames work with glob - they already do, but the test seems worth keeping. 2002-01-07 02:11:43 +00:00
Marc-André Lemburg f853be980e Restore Python 2.1 StringIO.py behaviour: support concatenating
Unicode string snippets to larger Unicode strings.

This fix should also go into Python 2.2.1.
2002-01-06 17:15:05 +00:00
Fred Drake db519205a2 Time2Internaldate(): Call isinstance() once for each of the type tests
instead of possibly twice by using a sequence of types to check for.
Add a message to the ValueError that can be raised.
2002-01-05 17:17:09 +00:00
Fred Drake 1e2fb57b5f Remove unused imports, clean up trailing whitespace. 2002-01-05 17:12:57 +00:00
Martin v. Löwis ea752fbb86 Check for time.struct_time in addition to tuples. Use 3 characters
for zone hours. Fixes #499169.
2002-01-05 11:31:49 +00:00
Steven M. Gava 0cae01c496 loading core keybindings via new config system plus
further devel of highlight handling
2002-01-04 07:53:06 +00:00
Steven M. Gava c597640515 move core functionality of SearchBindings.py into EditorWindow.py proper
adjust configuration sources accordingly
move SearchBindings.py into the attic now
2002-01-04 03:06:08 +00:00
Steven M. Gava ad4f532f65 further development of highlighting and editor preference handling,
plus misc fixes cleanups for new config system
2002-01-03 12:05:17 +00:00
Steven M. Gava 767a7ee9ad remove futzing with text font 2002-01-03 12:04:01 +00:00
Steven M. Gava 361cfcd69b fixups and improvements 2002-01-03 12:02:37 +00:00
Steven M. Gava dc72f48e26 moving to new config system 2002-01-03 11:51:07 +00:00
Andrew M. Kuchling 1142d595ee Fix typo in label 2002-01-02 16:38:19 +00:00
Neal Norwitz 653d85fc86 SF Patch #494867 test file methods
Test that the file methods raise ValueError when called on a closed file.
Test .isatty()
Test name, closed attributes
2002-01-01 19:11:13 +00:00
Martin v. Löwis 85f98143b7 Print encoded versions of the file names in test application. Fixes #496084 2001-12-30 14:43:56 +00:00
Tim Peters 77902970c5 test_support: add a docstring to vereq().
test_complex:  repair new test's usage of vereq().
2001-12-29 17:34:57 +00:00
Neal Norwitz 5a0f010c67 SF Patch #497487 add test to compare conjugate of a complex number 2001-12-29 14:31:46 +00:00
Neal Norwitz fc37af85bf SF Patch #494873 add tests for complex numbers including calls to int()/long() 2001-12-29 01:02:21 +00:00
Neal Norwitz 32f41536cb SF Patch #494874 add tests for int()/long() invalid parameters 2001-12-29 00:35:20 +00:00
Neal Norwitz 707690132f SF Patch #494872 test repr() of a built-in module 2001-12-29 00:25:42 +00:00
Neal Norwitz 26e5341c00 SF Patch #494876, test invalid parameters to pow() 2001-12-29 00:16:09 +00:00
Guido van Rossum f21b2aafa9 Thread.__bootstrap(): ignore exceptions in the self.__delete() call in
the finally clause.  An exception here could happen when a daemon
thread exits after the threading module has already been trashed by
the import finalization, and there's not much of a point in trying to
insist doing the cleanup in that stage.

This should fix SF bug ##497111: active_limbo_lock error at program
exit.

2.1.2 and 2.2.1 Bugfix candidate!
2001-12-28 22:07:09 +00:00
Guido van Rossum 2764a3a50e Fix for SF bug ##497426: can't deepcopy recursive new objects
deepcopy(), _reconstruct(): pass the memo to the other function, so
that recursive data structures built out of new-style objects may be
deeply copied correctly.

2.2.1 bugfix!
2001-12-28 21:39:03 +00:00
Guido van Rossum 1e91c1444a Fix for SF bug ##497426: can't deepcopy recursive new objects
deepcopy(), _reconstruct(): pass the memo to the other function, so
that recursive data structures built out of new-style objects may be
deeply copied correctly.

2.2.1 bugfix!
2001-12-28 21:33:22 +00:00
Guido van Rossum 24a643416d Update the docstring too. :-) 2001-12-28 20:54:55 +00:00
Guido van Rossum c33e077838 SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password
Instead of sending the real user and host, use "anonymous@" (i.e. no
host name at all!) as the default anonymous FTP password.  This avoids
privacy violations.
2001-12-28 20:54:28 +00:00
Guido van Rossum 2a6f5b38ac _reduce(): Avoid infinite recursion in the pickler when self.__class__
doesn't have the _HEAPTYPE flag set, e.g. for time.struct_time and
posix.stat_result.

This fixes the immediate symptoms of SF bug #496873 (cPickle /
time.struct_time loop), replacing the infinite loop with an exception.
2001-12-27 16:27:28 +00:00
Guido van Rossum 2826fade49 Don't set passiveserver to 0 in connect(). See SF bug #495693.
This should definitely be backported to 2.2.1.  I'll leave it to Jack
to decide whether he wants to fix this in MacPython 2.2.
2001-12-23 13:54:19 +00:00
Martin v. Löwis fe7286c252 Regenerated for Linux 2.2.4. 2001-12-22 15:23:50 +00:00
Barry Warsaw 52acb49298 Merge of the release22 branch changes back into the trunk. 2001-12-21 20:04:22 +00:00
Andrew M. Kuchling 3d2d980f50 Suggested by Pete Shinners: treat .m and .mm files as source code.
Question for Jack Jansen: is this reasonable?

Candidate for 2.2 release branch (if Jack thinks it's OK).
2001-12-21 15:34:17 +00:00
Anthony Baxter ed9057083b forward-patch from release21-maint branch:
Make dumbdbm merely "dumb", rather than "terminally broken". Without this
  patch, it's almost impossible to use dumbdbm _without_ causing horrible
  datalossage. With this patch, dumbdbm passes my own horrible torture test,
  as well as the roundup test suite.

  dumbdbm really could do with a smidgin of a rewrite or two, but that's not
  suitable for the release21-maint branch.
2001-12-21 05:13:37 +00:00
Barry Warsaw eae36ac5c3 test_parseaddr_empty(): New test for assuring that
Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty
string.  Built on rfc822, this used to return None.
2001-12-20 16:37:27 +00:00
Guido van Rossum f830a52996 SF patch #495358 (Artur Zaprzala): rfc822.AddressList and "<>" address
rfc822.AddressList incorrectly handles empty address.
    "<>" is converted to None and should be "".
    AddressList.__str__() fails on None.
    I got an email with such an address and my program
    failed processing it.

    Example:
    >>> import rfc822

    >>> rfc822.AddressList("<>").addresslist
    [('', None)]
    >>> str(rfc822.AddressList("<>"))
    Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/lib/python2.1/rfc822.py", line 753, in __str__
    return ", ".join(map(dump_address_pair,
    self.addresslist))
    TypeError: sequence item 0: expected string, None found

[His solution: in the internal routine AddrlistClass.getrouteaddr(),
initialize adlist to "".]
2001-12-20 15:54:48 +00:00
Tim Peters 2b26a8627b Whitespace normalization. 2001-12-20 06:18:15 +00:00
Fredrik Lundh b6ab93f433 partial merge with current pythonware codebase:
- use repr instead of implied str for doubles
- updated version number to 1.0.0 (for 2.2 final)
2001-12-19 21:40:04 +00:00
Guido van Rossum 04a866170d Add test for pickling new-style class with custom metaclass. 2001-12-19 16:58:54 +00:00
Guido van Rossum f048a8f6d7 Pickler.save(): Fix for SF bug #494904: Cannot pickle a class with a
metaclass, reported by Dan Parisien.

Objects that are instances of custom metaclasses, i.e. whose class is
a subclass of 'type', should be pickled the same as new-style classes
(objects whose class is 'type').  This can't be done through a
dispatch table entry, and the __reduce__ trick doesn't work for these,
since it finds the unbound __reduce__ for instances of the class
(inherited from 'object').  So check explicitly using issubclass().
2001-12-19 16:55:02 +00:00
Fred Drake 5935ff07be Add some additional tests that check more proxy behaviors. 2001-12-19 16:54:23 +00:00
Fred Drake 694ed091af Fix the test control support for the pickle & cPickle tests so the tests run
under regrtest.
2001-12-19 16:42:15 +00:00
Guido van Rossum 1444f67fa0 The test using class initarg failed, because it was lacking a
__safe_for_unpickling__ attribute.
2001-12-19 16:38:29 +00:00
Fred Drake 4f5b49fb56 Make the module docstring agree with reality: the module prvides the
"handler()" function, not the "handle()" function.
2001-12-19 14:27:41 +00:00
Tim Peters 81b61bdc1a TemporaryFileWrapper: fixed typo in new comment. 2001-12-18 23:22:01 +00:00
Tim Peters a255a72f0a TemporaryFileWrapper: cache the value of os.unlink for use by __del__,
to prevent mysterious errors at shutdown due to "os.unlink" turning into
"None.unlink".
2001-12-18 22:32:40 +00:00
Guido van Rossum 99d2fbb823 Move the helper class _closedsocket *into* the _socketobject class.
This way, when a socket object is deleted after the socket module has
already been zapped by module shutdown, we don't get annoying warnings
about exceptions in __del__ methods.
2001-12-18 22:22:25 +00:00
Thomas Heller f499b030bd Recreated after source changes. 2001-12-18 21:08:15 +00:00
Thomas Heller c7cb9ed35f Second part of fix for bug [#483982] Python 2.2b2 bdist_wininst
crashes.

If no external zip-utility is found, the archive is created by the
zipfile module, which behaves different now than in 2.1: if the
zip-file is created in the root directory if the distribution, it will
contain an (empty) version of itself.

This triggered the above bug - so it's better to create the zip-file
far away in the TMP directory.
2001-12-18 20:13:40 +00:00
Guido van Rossum facf24bdc7 Don't use Latex \code{...} in docstrings. 2001-12-17 16:07:06 +00:00
Barry Warsaw 6e1c576a4e Get rid of the stupid backslash in front of the column zero open
paren.  This was there to worm around a stupid XEmacs bug, but since I
can't tickle the bug in newer XEmacsen (just tried w/21.4.5) it's
possible the problem has been fixed.  We shouldn't have to be working
around editor bugs anyway.

If it crops up again, I'll report it (again) to the XEmacs crowd.
2001-12-17 15:40:24 +00:00
Steve Purcell ca9aaf36e1 Synch with pyunit CVS:
- Adds Fred's patch 487662: "Better error message for assertEqual"
 - Removed small portion of code unused after Guido's patch
   490119: "Don't treat ^C as error"
2001-12-17 10:13:17 +00:00
Tim Peters 1422e9dc60 SF patch 493739 2 Bugfixes for 2.2c1 (RISC OS specific), from
Dietmar Schwertberger.
Bugfix candidate.
"""
RISCOS/Modules/getpath_riscos.c:
Include trailing '\0' when using strncpy [copy
strlen(...)+1 characters].

Lib/plat-riscos/riscospath.py:
Use riscosmodule.expand for os.path.abspath.
[fixes problems with site.py where
abspath("<Python$Dir>") returned
join(os.getcwd(), "<Python$Dir>") as e.g.
"SCSI::SCSI4.$.<Python$Dir>" because "<Python$Dir>"
wasn't recognised as an absolute path.]
"""
2001-12-15 22:12:47 +00:00
Guido van Rossum 796e1e0b30 Don't call resetwarnings(). Be more restrictive in what we filter out
instead.
2001-12-15 18:04:10 +00:00
Jack Jansen f839c27027 Added test_socketserver and test_unicode_file to tests expected to be
skipped on Mac OS X. Not sure yet about test_locale.py: this may be
due to my copy of Mac OS X (although it talks english fine enough).
2001-12-14 21:28:53 +00:00
Barry Warsaw 7675097d78 send(), ehlo(): Integrate patch #487310 by Fazal Majid. Consistently
call self.close() just before raising SMTPServerDisconnected.  This
allows you to, e.g. reconnect after a server timeout.

Merged from the 2.2c1 branch.
2001-12-14 20:34:20 +00:00
Jeremy Hylton 2a05bc72d6 Partial fix for problem in SF buf #487458
Rev 1.20 introduced a call to getpeername() in the dispatcher
constructor.  This only works for a connected socket.  Apparently
earlier versions of the code worked with un-connected sockets, e.g. a
listening socket.

It's not clear that the code is supposed to accept these sockets,
because it sets self.connected = 1 when passed a socket.  But it's
also not clear that it should be a fatal error to pass a listening
socket.

The solution, for now, is to put a try/except around the getpeername()
call and continue if it fails.  The self.addr attribute is used
primarily (only?) to produce a nice repr for the object, so it hardly
matters.  If there is a real error on a connected socket, it's likely
that subsequent calls will fail too.
2001-12-14 16:15:11 +00:00
Guido van Rossum e54616cb6f (Merge into trunk.)
Fix for SF bug #492345.  (I could've sworn I checked this in, but
apparently I didn't!)

This code:

    class Classic:
        pass

    class New(Classic):
        __metaclass__ = type

attempts to create a new-style class with only classic bases -- but it
doesn't work right.  Attempts to fix it so it works caused problems
elsewhere, so I'm now raising a TypeError in this case.
2001-12-14 04:19:56 +00:00
Jeremy Hylton f36cfef1ae Undo inadvertent change to test_scope in previous checkin 2001-12-13 20:00:26 +00:00
Fred Drake 68773e779a Add a comment explaining what these tests are for, and where to look for
tests of complex().
2001-12-13 19:57:53 +00:00
Fred Drake 526c7a0101 Ensure that complex() only accepts a string argument as the first arg,
and only if there is no second arg.
This closes SF patch #479551.
2001-12-13 19:52:22 +00:00
Jeremy Hylton 3095a4c228 Update output generated by test_scope 2001-12-13 19:47:51 +00:00
Jeremy Hylton ccae8377a3 Add test for SF bug [ #492403 ] exec() segfaults on closure's func_code 2001-12-13 19:45:04 +00:00
Fred Drake 723293cb49 Make tix_configure() work the same way configure() works for the basic
Tkinter classes.
Adjust a lot of docstrings.
Convert a few type checks to use isinstance() instead of type().
This is part of SF patch #485959.
2001-12-13 04:53:07 +00:00
Guido van Rossum 1990943095 Fix for SF #491953 (Andrew Dalke): ScrolledText.py has TabError
Untabified.
2001-12-12 12:47:57 +00:00
Fred Drake 1e7dfd3745 Wrapped a long line.
Converted to use "".startswith() to avoid slicing (& temp string creation).
2001-12-12 06:20:34 +00:00
Fred Drake d077ca1e7c Very small test suite for the calendar module, mostly to check a constraint
on the return values from isleap().  Also checks firstweekday() and
setfirstweekday().
2001-12-12 05:38:08 +00:00
Marc-André Lemburg 90294d01be Joe VanAndel wrote:
>
> When using 'distutils' (shipped with Python 2.1) I've found that my
> Python scripts installed with a first line of:
>
> #!/usr/bin/python2.1None
>
> This is caused by distutils trying to patch the first line of the python
> script to use the current interpreter.
2001-12-11 20:44:42 +00:00
Tim Peters 017052152b Fiddle test_class so it passes with -Qnew. 2001-12-11 19:28:47 +00:00
Tim Peters e93e477215 Fiddle test_augassign so it passes under -Qnew. 2001-12-11 19:20:15 +00:00
Martin v. Löwis df8adcd7ba Ignore SIGXFSZ. Fixes #490453. 2001-12-11 17:57:26 +00:00
Fred Drake d15db5c711 When using GCC, use the right option to add a directory to the list of dirs
searched for a dependency for runtime linking.
This closes SF bug #445902.
2001-12-11 05:04:24 +00:00
Guido van Rossum 29d260670e Additional coverage tests by Neil Norwitz.
(SF patch #491418, #491420, #491421.)
2001-12-11 04:37:34 +00:00
Fred Drake 2a64f4693d Regression test for SF bug #478534 -- exceptions could "leak" into a weakref
callback.
2001-12-10 23:46:02 +00:00
Finn Bock 2b29cb2593 Skipping some tests by adding the usual jython conditional test around:
- the repr of unicode. Jython only add the u'' if the string contains char
  values > 255.
- A unicode arg to unicode() is perfectly valid in jython.
- A test buffer() test. No buffer() on Jython

This closes patch "[ #490920 ] Jython and test_unicode".
2001-12-10 20:57:34 +00:00
Guido van Rossum 61d3637ff8 SF patch #491183 (Jeff Epler): ScrolledText.grid() doesn't work
Using grid methods on ScrolledText widgets does not
work as expected. It either fails to pack a widget, or
can even cause Tk to lock up.

The problem is that the .grid method is being called on
the text widget, not the frame widget. This can lead
to the well-known lockup in Tk when a frame's children
are managed by both the pack and grid managers. Even
if it doesn't lock up, the frame is never placed within
the intended widget.

Program fragment:
>>> import ScrolledText
>>> s = ScrolledText.ScrolledText()
>>> s.grid(row=0, column=0, rowspan=2)

The following patch uses the same hack to copy the
'grid' and 'place' geometry manager methods to the
ScrolledText instance as is already used for the 'pack'
manager.
2001-12-10 16:42:43 +00:00
Michael W. Hudson fb173cd471 Fix for
[ #409430 ] pydoc install broken
2001-12-10 16:15:44 +00:00
Michael W. Hudson 49bdaede1b Fix for
[ #477371 ] build_scripts can use wrong #! line

scripts now get "built" into a directory

build/scripts-$(PYTHON_VERSION)/
2001-12-10 15:28:30 +00:00
Finn Bock 793ead5696 A workaround for the missing buffer() builtin in jython.
This closes patch "[ #490850 ] Jython and test_StringIO".
2001-12-09 20:06:32 +00:00
Fredrik Lundh 82b230732f bug #133283, #477728, #483789, #490573
backed out of broken minimal repeat patch from July

also fixed a couple of minor potential resource leaks in pattern_subx
(Guido had already fixed the big one)
2001-12-09 16:13:15 +00:00
Finn Bock ed69aeedb9 test(): Avoid a UnboundLocalError when a method is missing from both the string
module and from string methods.

This closes patch "[ #490811 ] Jython and test_string".
2001-12-09 16:06:29 +00:00
Finn Bock d08011a0e1 Moved a print statement outside the jython platform test. Otherwise
the output fails to compare correctly for jython. This change was part
of the original patch #403666.
2001-12-09 10:19:25 +00:00
Finn Bock 4ab7adbd94 The initial patch #468662 was not applied quite verbatim. This should one
will fix the remaining Jython issues.

This closes patch "[ #490411 ] Jython and test_grammar.py".
2001-12-09 09:12:34 +00:00
Finn Bock ada1983950 Refcounting isn't available in Jython. Putting the jython test around it.
This closes patch "[ #490414 ] Jython and test_socket".
2001-12-09 08:57:46 +00:00
Guido van Rossum 146483964e Patch supplied by Burton Radons for his own SF bug #487390: Modifying
type.__module__ behavior.

This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this).  Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right.  Apologies if they're
not.  This also touches the weakref docs, which contains a sample type
object initializer.  It also touches the mmap test output, because the
mmap type's repr is included in that output.  It touches object.h to
put the correct description in a comment.
2001-12-08 18:02:58 +00:00
Guido van Rossum b931bf3c55 SF patch #490515 (Joe A) urllib.open_https() protocol issue
open_http():
    In urllib.py library module, URLopener.open_https()
    returns a class instance of addinfourl() with its
    self.url property missing the protocol.

    Instead of "https://www.someurl.com", it becomes
    "://www.someurl.com".
2001-12-08 17:09:07 +00:00
Finn Bock aa3dc45658 Enable support for jython:
1. Acknowledge the welknown difference that jython
allows continue in the finally clause.

2. Avoid using _testcapi when running with jython.

This closes patch "[ #490417 ] Jython and test_exceptions"
2001-12-08 10:15:48 +00:00
Guido van Rossum baefcebb55 Remove erroneous and confusing comment -- sre patterns *can* be
pickled and we do *not* expect exceptions from either pickle or
cPickle.
2001-12-08 05:11:15 +00:00
Fred Drake 2c8373bc23 Honor the mode argument to dumbdbm.open(); there is not good reason not to,
especially since the documentation described it in detail.
This partially closes SF bug #490098.
2001-12-07 21:54:46 +00:00
Tim Peters cbfc0343fc SF patch 490393: test___all__ and Jython; from Finn Bock.
Don't even try to import _socket when running under Jython.
2001-12-07 21:35:42 +00:00
Guido van Rossum 78f0dd3397 I found that when run as a script, this test suite ran its tests
twice!  Fixed this by avoiding the import of test_email, which loads
the module a second time in that situation, and fiddled the __main__
section to resemble other test suites using unittest.
2001-12-07 21:07:08 +00:00
Finn Bock 71be984b80 Align the number of %s with the number of format arguments.
This closes patch "[ #490330 ] String format bug in test_b2."
2001-12-07 18:21:56 +00:00
Guido van Rossum a35e2cee32 Move import dbhash out of test_sundry and into test_bsddb,
so that test_sundry won't fail if the bsddb module is absent.
2001-12-07 16:43:19 +00:00
Guido van Rossum 202dd1ef42 In unconditional except clauses, don't catch KeyboardInterrupt -- it's
annoying that often you have to hit ^C numerous times before it
works.  The solution: before the "except:" clause, insert "except
KeyboardInterrupt: raise".  This propagates KeyboardInterrupt out,
stopping the test in its tracks.
2001-12-07 03:39:34 +00:00
Fred Drake 9028d0a525 Visious hackery to solve a build-control problem related to our use of
distutils for the library modules built as shared objects.  A better solution
appears possible, but with the threat that the distutils becomes more
magical ("complex").
This closes SF bug #458343.
2001-12-06 22:59:54 +00:00
Andrew M. Kuchling 3ecc1ce529 [Bug #475009] Tighten the pattern for the first line, so we don't
adjust it when a versioned interpreter is supplied (#!.../python2 ...)
2001-12-06 21:29:28 +00:00
Fred Drake 21d45356b8 Whitespace normalization. 2001-12-06 21:01:19 +00:00
Fred Drake b94b849d65 Whitespace normalization. 2001-12-06 20:51:35 +00:00
Thomas Heller bcd8975740 Use a version number of 0.0.0 instead of ???. The latter leads to
invalid filenames on Windows when building without specifying a
version number in the setup script.

See also
http://mail.python.org/pipermail/distutils-sig/2001-November/002656.html

Bugfix candidate.
2001-12-06 20:44:19 +00:00
Fred Drake 2998a55f2d Attribute nodes did not always get their ownerDocument and ownerElement
properly set.  This fixes that.
2001-12-06 18:27:48 +00:00
Fred Drake 6b04ffe9e5 Be more careful about accessing attributes of the parent: if Tk has not been
initialized, this will be None, but the functions will still work (there will
simply be a bogus parent on the screen).  Allowing the parent to be None
is useful when testing the functions from an interactive interpreter.

Add an optional keyword paramter "show" to the _QueryString class; when given
it is used to set the -show option to the entry widget.  This allows passing
show="*" or the like to askstring(), making it useful for requesting
passwords/passphrases from the user.
This closes SF bug #438517.

Changed a docstring to be less font-lock-hostile.
2001-12-06 16:51:41 +00:00
Andrew M. Kuchling d303b61eb4 [Bug #459270] Fix incorrect docstring 2001-12-06 16:32:05 +00:00
Tim Peters 3caca2326e SF bug #488514: -Qnew needs work
Big Hammer to implement -Qnew as PEP 238 says it should work (a global
option affecting all instances of "/").

pydebug.h, main.c, pythonrun.c:  define a private _Py_QnewFlag flag, true
iff -Qnew is passed on the command line.  This should go away (as the
comments say) when true division becomes The Rule.  This is
deliberately not exposed to runtime inspection or modification:  it's
a one-way one-shot switch to pretend you're using Python 3.

ceval.c:  when _Py_QnewFlag is set, treat BINARY_DIVIDE as
BINARY_TRUE_DIVIDE.

test_{descr, generators, zipfile}.py:  fiddle so these pass under
-Qnew too.  This was just a matter of s!/!//! in test_generators and
test_zipfile.  test_descr was trickier, as testbinop() is passed
assumptions that "/" is the same as calling a "__div__" method; put
a temporary hack there to call "__truediv__" instead when the method
name is "__div__" and 1/2 evaluates to 0.5.

Three standard tests still fail under -Qnew (on Windows; somebody
please try the Linux tests with -Qnew too!  Linux runs a whole bunch
of tests Windows doesn't):
    test_augassign
    test_class
    test_coercion
I can't stay awake longer to stare at this (be my guest).  Offhand
cures weren't obvious, nor was it even obvious that cures are possible
without major hackery.

Question:  when -Qnew is in effect, should calls to __div__ magically
change into calls to __truediv__?  See "major hackery" at tail end of
last paragraph <wink>.
2001-12-06 06:23:26 +00:00
Fred Drake e50959a58e Fix appendChild() and insertBefore() (and replaceChild() indirectly) when
the node being added is a fragment node.
This closes SF bug #487929.
2001-12-06 04:32:18 +00:00
Jack Jansen 8a97f4a380 sys.platform on Mac OS X is now "darwin", without any version number appended.
This should probably go into NEWS (who's responsible for that?).
2001-12-05 23:27:32 +00:00
Guido van Rossum 33bab01da6 Fix SF bug #489581: __slots__ leak.
It was easier than I thought, assuming that no other things contribute
to the instance size besides slots -- a pretty good bet.  With a test
suite, no less!
2001-12-05 22:45:48 +00:00
Fred Drake a16433b14e Re-enabled debugging prints in poplib & documented the set_debuglevel()
method.
This closes SF patch #486079.
2001-12-05 22:37:21 +00:00
Fred Drake ee836445d1 Added a missing period at the end of an error message. 2001-12-05 22:27:47 +00:00
Guido van Rossum d331cb5502 At the PythonLabs meeting someone mentioned it would make Jim really
happy if one could delete the __dict__ attribute of an instance.  I
love to make Jim happy, so here goes...

- New-style objects now support deleting their __dict__.  This is for
  all intents and purposes equivalent to assigning a brand new empty
  dictionary, but saves space if the object is not used further.
2001-12-05 19:46:42 +00:00
Fred Drake 698da02d3b Separate the script portion from the library portion; everything that
pertains to the script is now in the if __name__ == "__main__" block.
This is in response to a commenton python-dev from Neal Norwitz.
2001-12-05 15:58:29 +00:00
Steven M. Gava 2d4e03b092 changes to use new tabpages classes 2001-12-05 07:54:07 +00:00
Steven M. Gava 34b8851c5f remove cruft from other project 2001-12-05 06:39:18 +00:00
Steven M. Gava 5b357b977a cleaner tabbed-page mini implementation through classes 2001-12-05 06:32:46 +00:00
Tim Peters 6d30c3e391 Change new tests to use integer division (// instead of /). 2001-12-05 00:30:09 +00:00
Tim Peters a3c01ce696 SF bug #488480: integer multiply to return -max_int-1.
int_mul():  new and vastly simpler overflow checking.  Whether it's
faster or slower will likely vary across platforms, favoring boxes
with fast floating point.  OTOH, we no longer have to worry about
people shipping broken LONG_BIT definitions <0.9 wink>.
2001-12-04 23:05:10 +00:00
Ka-Ping Yee fa78d0fbe4 Add "file" argument to Hook constructor.
By default, save sys.stdout in self.file when a Hook instance is created
    (e.g. when cgitb.enable() is called).
2001-12-04 18:45:17 +00:00
Guido van Rossum 4b402f2074 Address SF patch #485789 (Stefan Schwarzer).
$BROWSER should be split on os.pathsep, not on ":".
2001-12-04 17:43:22 +00:00
Guido van Rossum 6b70599450 Fix SF bug #486144: Uninitialized __slot__ vrbl is None.
There's now a new structmember code, T_OBJECT_EX, which is used for
all __slot__ variables (except __weakref__, which has special behavior
anyway).  This new code raises AttributeError when the variable is
NULL rather than converting NULL to None.
2001-12-04 16:23:42 +00:00
Guido van Rossum bb8f59a371 unpack_iterable(): Add a missing DECREF in an error case. Reported by
Armin Rigo (SF bug #488477).  Added a testcase to test_unpack_iter()
in test_iter.py.
2001-12-03 19:33:25 +00:00
Barry Warsaw c44d2c52c9 decode(), encode(): Accepting the minor optimizations from SF patch
#486375, but not the rest of it, since that changes the documented
semantics of encode().
2001-12-03 19:26:40 +00:00
Fred Drake 248b04383f Convert to using string methods instead of the string module.
In goahead(), use a bound version of rawdata.startswith() since we use the
same method all the time and never change the value of rawdata.  This can
save a lot of bound method creation.
2001-12-03 17:09:50 +00:00
Fred Drake 073148c4ef Add a test that makes sure unclosed entity references are handled consitently. 2001-12-03 16:44:09 +00:00
Guido van Rossum dbb53d9918 Fix of SF bug #475877 (Mutable subtype instances are hashable).
Rather than tweaking the inheritance of type object slots (which turns
out to be too messy to try), this fix adds a __hash__ to the list and
dict types (the only mutable types I'm aware of) that explicitly
raises an error.  This has the advantage that list.__hash__([]) also
raises an error (previously, this would invoke object.__hash__([]),
returning the argument's address); ditto for dict.__hash__.

The disadvantage for this fix is that 3rd party mutable types aren't
automatically fixed.  This should be added to the rules for creating
subclassable extension types: if you don't want your object to be
hashable, add a tp_hash function that raises an exception.

Also, it's possible that I've forgotten about other mutable types for
which this should be done.
2001-12-03 16:32:18 +00:00
Guido van Rossum cb33165ca2 _tryorder should always be a list, then the problem Jack had to fix in
1.24 wouldn't have occurred in the first place.

Remove a debug print command accidentally inserted by Martin in 1.23.
2001-12-03 15:51:31 +00:00
Jack Jansen 55c5abb52f Missing comma in tuple initializer caused webbrowser.open() not to work at
all in MacPython. (why did noone ever notice this?)
2001-12-03 15:44:17 +00:00
Guido van Rossum 5b443c6282 Address SF patch #480716 as well as related issues.
SF patch #480716 by Greg Chapman fixes the problem that super's
__get__ method always returns an instance of super, even when the
instance whose __get__ method is called is an instance of a subclass
of super.

Other issues fixed:

- super(C, C()).__class__ would return the __class__ attribute of C()
  rather than the __class__ attribute of the super object.  This is
  confusing.  To fix this, I decided to change the semantics of super
  so that it only applies to code attributes, not to data attributes.
  After all, overriding data attributes is not supported anyway.

- While super(C, x) carefully checked that x is an instance of C,
  super(C).__get__(x) made no such check, allowing for a loophole.
  This is now fixed.
2001-12-03 15:38:28 +00:00
Steven M. Gava 17d0154097 further work on new configuration system, specifically,
on keybinding configuration
2001-12-03 00:37:28 +00:00
Jack Jansen 398c236c1b Added tests expected to be skipped on Mac OS X. 2001-12-02 21:41:36 +00:00
Martin v. Löwis 95b057e3ea Patch #487784: Support Unicode commands in popen3/4 handling on UNIX. 2001-12-02 13:32:15 +00:00
Martin v. Löwis 79d802d58c Patch #487275: Add windows-1251 charset alias. 2001-12-02 12:24:19 +00:00
Martin v. Löwis 8b6bd42e08 Patch #487455: make types.StringTypes a tuple. 2001-12-02 12:08:06 +00:00
Tim Peters 82285dad8e Whitespace normalization. 2001-12-01 04:11:16 +00:00
Fred Drake 7fd173bfc4 Synchronize with pulldom from PyXML (revision 1.18). 2001-11-30 22:22:26 +00:00
Fred Drake 49a5d03ab4 Synchronize with minidom from PyXML (revision 1.35). 2001-11-30 22:21:58 +00:00
Fred Drake bd34b6bc3d Added the convenience constants that are present in PyXML to make these
more similar.
2001-11-30 15:37:33 +00:00
Jack Jansen b3be216b41 Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
changes from start of branch upto r22b2 were already merged, of course).
2001-11-30 14:16:36 +00:00
Guido van Rossum 42f5332f6d canonic(): don't use abspath() for filenames looking like <...>; this
fixes the problem reported in SF bug #477023 (Jonathan Mark): "pdb:
unexpected path confuses Emacs".
2001-11-29 02:50:15 +00:00
Tim Peters d15f8bbe32 SF bug 486480: zipfile __del__ is broken
ZipFile.__del__():  call ZipFile.close(), like its docstring says it does.
ZipFile.close():  allow calling more than once (as all file-like objects
in Python should support).
2001-11-28 23:16:40 +00:00
Marc-André Lemburg 41f01994c4 Adding test for Unicode repr()-output. 2001-11-28 14:03:14 +00:00
Barry Warsaw 00859c0538 __format(): Applied SF patch #482003 by Skip to fix multiline dict
output.

Patch includes additional test case test_basic_line_wrap().

This patch is a candidate for Python 2.1.2.
2001-11-28 05:49:39 +00:00
Jeremy Hylton 57911ae35a Fix [ #484645 ] little bug in pycodegen.py 2001-11-27 23:35:10 +00:00
Barry Warsaw e274864004 test_formatdate(): Integrating Jack's 22b2 branch fix for Mac epoch:
More changes to the formatdate epoch test: the Mac epoch is in
    localtime, so east of GMT it falls in 1903:-( Changed the test to
    obtain the epoch in both local time and GMT, and do the right
    thing in the comparisons. As a sanity measure also check that
    day/month is Jan 1.
2001-11-27 07:12:35 +00:00
Tim Peters dc47a89ff1 SF patch 483059: Avoid use of eval() in random.py, from Finn Bock.
_verify():  Pass in the values of globals insted of eval()ing their
names.  The use of eval() was obscure and unnecessary, and the patch
claimed random.py couldn't be used in Jython applets because of it.
2001-11-25 21:12:43 +00:00
Martin v. Löwis 652e1917c6 Properly set static options for tixBalloon and tixResizeHandle.
Expose Tix.ResizeHandle.{detach_widget,hide,show}.
Update Tix demos.
2001-11-25 14:50:56 +00:00
Martin v. Löwis 3a89b2b131 Patch #484847: Default to netscape.exe on OS/2. 2001-11-25 14:35:58 +00:00