Commit Graph

5838 Commits

Author SHA1 Message Date
Neal Norwitz 28bb572ab4 Use attributes appropriately 2002-04-01 19:00:50 +00:00
Neal Norwitz b1295da59e There is no TestError, use TestFailed appropriately 2002-04-01 18:59:20 +00:00
Tim Peters de14a30d1d We expect to skip the new test_mpz on Windows. 2002-04-01 05:04:46 +00:00
Neal Norwitz 02098fa56b Get rid of all METH_OLDARGS & PyArg_Parse.
Fix floating point exception if mpz.powm(10, 1, 0) (modulus == 0).
Add a test.
2002-04-01 01:37:14 +00:00
Tim Peters 496563a514 Remove some now-obsolete generator future statements.
I left the email pkg alone; I'm not sure how Barry would like to handle
that.
2002-04-01 00:28:59 +00:00
Neal Norwitz 62f5a9d6c2 Convert file.readinto() to stop using METH_OLDARGS & PyArg_Parse.
Add test for file.readinto().
2002-04-01 00:09:00 +00:00
Guido van Rossum b955d6c41e Hopeful fix for SF bug 503031: urllib.py: open_http() host problem.
I really can't test this, but from reading the discussion in that bug
report, it's likely that this works.  It may also close a whole bunch
of other bug reports related to urllib and proxies on Windows, but who
knows.
2002-03-31 23:38:48 +00:00
Neal Norwitz 93cf79fde4 Use docstrings for exception classes 2002-03-31 14:06:41 +00:00
Neal Norwitz f74e46cf47 Derive exception classes from Exception 2002-03-31 13:59:18 +00:00
Neal Norwitz 27a353020b Stop using string exceptions 2002-03-31 13:58:20 +00:00
Andrew M. Kuchling f4a4fb9a11 [Patch #536769] Add -Xcompiler flag for adding arguments and switches for
the compiler
2002-03-29 18:00:19 +00:00
Andrew M. Kuchling eddd68d56c As part of fixing bug #536241, add a test case for string.zfill() with Unicode 2002-03-29 16:21:44 +00:00
Andrew M. Kuchling 102d1208a8 [Bug #536241] string.zfill() produces mangled output for a Unicode string.
Walter Doerwald provided a patch, which I've modified in two ways:

1) (Uncontroversial) Removed code to make module work in earlier versions of
   Python without the unicode() built-in

2) (Poss. controversial) Instead of making string.zfill take the repr()
   of non-string objects, take the str().

Should a warning be added to this branch of the code so that the automatic
str() can be deprecated?

2.2.2 bugfix candidate, assuming the repr()->str() change is deemed OK.
2002-03-29 16:20:33 +00:00
Andrew M. Kuchling c6c9c4a10f Add two tests for string.zfill 2002-03-29 16:00:13 +00:00
Jeremy Hylton b4c17c8992 Fix getcomments() so that it doesn't fail with TypeErrors.
It appears that getcomments() can get called for classes defined in
C.  Since these don't have source code, it can't do anything useful.
A function buried many levels deep was raising a TypeError that was
not caught.

Who knows why this broke...
2002-03-28 23:01:56 +00:00
Tim Peters d4ce758505 test_trashcan: reword obscure code.
Bugfix candidate.
2002-03-28 21:22:25 +00:00
Tim Peters d222559cdb New test_traschcan() test in test_gc, which reliably provokes segfaults
under 2.0, 2.1 and 2.2.

Bugfix candidate.
2002-03-28 21:08:30 +00:00
Martin v. Löwis 0c0d56a22f Reindent. 2002-03-28 16:26:40 +00:00
Fred Drake f841aa6fc0 Add a simple test of the METH_CLASS and METH_STATIC flags for type methods. 2002-03-28 15:49:54 +00:00
Martin v. Löwis 4157ffbb96 Patch #536117: Typo in turtle.py.
2.2.2 candidate.
2002-03-28 15:45:57 +00:00
Martin v. Löwis 4208d4f757 Destroy and unlink deleted NoteBook panes. Fixes #516703.
2.2.2 candidate.
2002-03-27 17:59:17 +00:00
Martin v. Löwis f2041b8aa6 Ignore widgets with unknown names in winfo_children. Fixes #518283.
2.2.2 candidate.
2002-03-27 17:15:57 +00:00
Steven M. Gava 1d46e40f58 further work on new config system;
recent files menu
2002-03-27 08:40:46 +00:00
Steven M. Gava 0c5bc8c951 further work on new config system;
user defined help items
2002-03-27 02:25:44 +00:00
Steven M. Gava cedd30b030 _finally_ tracked down and eliminated a major problem
in PyShell.py that was causing extreme headaches in
working on EditorWindow.py
2002-03-27 00:51:53 +00:00
Neil Schemenauer 908632a6a6 Implement iterator protocol. 2002-03-26 20:28:40 +00:00
Barry Warsaw 13e34f7a19 __init__(): We'll try to be more RFC 2821 compliant by providing for a
better local_hostname default.  According to RFC 2821, it is
recommended that the fqdn hostname be provided in the EHLO/HELO verb
and if that can't be calculated, to use a domain literal.

The rationale for this change is documented in SF patch #497736 which
also had privacy concerns about leaking the fqdn in the EHLO/HELO.  We
decided this wasn't a big concern because no user data is leaked, and
the IP will always be leaked.  The local_hostname argument is provided
for those clients that are super paranoid.

Using localhost.localdomain may break some strict smtp servers so we
decided against using it as the default.
2002-03-26 20:27:35 +00:00
Neal Norwitz aad1849e25 time and socket were already imported in the module, no need to re-import 2002-03-26 16:25:01 +00:00
Neal Norwitz 1ae2875336 re was already imported in the module, no need to re-import 2002-03-26 16:23:28 +00:00
Neal Norwitz f261223ccd os was already imported in the module, no need to re-import 2002-03-26 16:21:52 +00:00
Neal Norwitz e98d16e8a4 Cleanup x so it is not left in module 2002-03-26 16:20:26 +00:00
Guido van Rossum 85ee491b3a Fix for SF 502085.
Don't die when issubclass(t, TypeType) fails.

Bugfix candidate (but I think it's too late for 2.2.1).
2002-03-26 00:51:56 +00:00
Skip Montanaro acb29aed67 make default banner match what the real interpreter displays 2002-03-25 22:04:23 +00:00
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