Commit Graph

11332 Commits

Author SHA1 Message Date
Georg Brandl f102fc5f86 Add test_main() methods. These three tests were never run
by regrtest.py.

We really need a simpler testing framework.
2006-07-27 15:05:36 +00:00
Andrew M. Kuchling 9aed98feb2 Reformat docstring; fix typo 2006-07-27 12:18:20 +00:00
Martin v. Löwis 997ceffe07 Bump distutils version to 2.5, as several new features
have been introduced since 2.4.
2006-07-27 06:38:16 +00:00
Tim Peters 95621b25dc Whitespace normalization. 2006-07-26 23:23:15 +00:00
Phillip J. Eby eb26ea3f83 Allow the 'onerror' argument to walk_packages() to catch any Exception, not
just ImportError.  This allows documentation tools to better skip unimportable
packages.
2006-07-26 19:48:27 +00:00
Martin v. Löwis 9298eff5f9 Bug #978833: Really close underlying socket in _socketobject.close.
Fix httplib.HTTPConnection.getresponse to not close the
socket if it is still needed for the response.
2006-07-26 12:12:56 +00:00
Georg Brandl 5f135787ec Part of bug #1523610: fix miscalculation of buffer length.
Also add a guard against NULL in converttuple and add a test case
(that previously would have crashed).
2006-07-26 08:03:10 +00:00
Georg Brandl 0619a329e8 Bug #1459963: properly capitalize HTTP header names. 2006-07-26 07:40:17 +00:00
Barry Warsaw d92ae78bdb Forward port some fixes that were in email 2.5 but for some reason didn't make
it into email 4.0.  Specifically, in Message.get_content_charset(), handle RFC
2231 headers that contain an encoding not known to Python, or a character in
the data that isn't in the charset encoding.  Also forward port the
appropriate unit tests.
2006-07-26 05:54:46 +00:00
Tim Peters 91343075dc Whitespace normalization. 2006-07-25 22:30:24 +00:00
Ronald Oussoren 3075e16c51 Fix bug #1517990: IDLE keybindings on OSX
This adds a new key definition for OSX, which is slightly different from the
classic mac definition.

Also add NEWS item for a couple of bugfixes I added recently.
2006-07-25 20:28:55 +00:00
Armin Rigo b62efad943 Document the crashers that will not go away soon as "won't fix",
and explain why.
2006-07-25 18:38:39 +00:00
Armin Rigo 5a9a2a3fe1 Added another crasher, which hit me today (I was not intentionally
writing such code, of course, but it took some gdb time to figure out
what my bug was).
2006-07-25 18:11:07 +00:00
Armin Rigo 4df7c0a55b Document why is and is not a good way to fix the gc_inspection crasher. 2006-07-25 18:09:57 +00:00
Brett Cannon 813669f911 Fix a bug in the messages for an assert failure where not enough arguments to a string
were being converted in the format.
2006-07-25 17:34:36 +00:00
Georg Brandl 69b9b677b0 Patch #1525766: correctly pass onerror arg to recursive calls
of pkg.walk_packages. Also improve the docstrings.
2006-07-25 10:22:34 +00:00
Martin v. Löwis 0b48303f28 Bug #1525817: Don't truncate short lines in IDLE's tool tips. 2006-07-25 09:53:12 +00:00
Tim Peters 0c4a3b330d current_frames_with_threads(): There's actually no way
to guess /which/ line the spawned thread is in at the time
sys._current_frames() is called:  we know it finished
enter_g.set(), but can't know whether the instruction
counter has advanced to the following leave_g.wait().
The latter is overwhelming most likely, but not guaranteed,
and I see that the "x86 Ubuntu dapper (icc) trunk" buildbot
found it on the other line once.  Changed the test so it
passes in either case.
2006-07-25 04:07:22 +00:00
Greg Ward 4d16b915aa Don't use standard assert: want tests to fail even when run with -O.
Delete cruft.
2006-07-25 02:11:12 +00:00
Tim Peters 0bbfd83250 Whitespace normalization. 2006-07-24 21:02:15 +00:00
Georg Brandl afb44f47d9 Repair accidental NameError. 2006-07-24 20:11:35 +00:00
Kurt B. Kaiser a2946a437e - EditorWindow.test() was failing. Bug 1417598
M    EditorWindow.py
M    ScriptBinding.py
M    NEWS.txt
2006-07-24 18:05:51 +00:00
Kurt B. Kaiser b3c4d16e68 EditorWindow failed when used stand-alone if sys.ps1 not set.
Bug 1010370 Dave Florek

M    EditorWindow.py
M    PyShell.py
M    NEWS.txt
2006-07-24 17:13:23 +00:00
Georg Brandl c13c34c39d Patch #1515343: Fix printing of deprecated string exceptions with a
value in the traceback module.
2006-07-24 14:09:56 +00:00
Martin v. Löwis bda0dde1c4 Patch #1448199: Release GIL around ConnectRegistry. 2006-07-24 10:26:33 +00:00
Greg Ward 48fae7acd2 Resync optparse with Optik 1.5.3: minor tweaks for/to tests. 2006-07-23 16:05:51 +00:00
Andrew MacIntyre afa358fabf Get mailbox module working on OS/2 EMX port. 2006-07-23 13:04:00 +00:00
Ronald Oussoren 8133f9da17 Fix for bug #1517996: Class and Path browsers show Tk menu
This patch replaces the menubar that is used by AquaTk for windows without a
menubar of their own by one that is more appropriate for IDLE.
2006-07-23 09:46:11 +00:00
Ronald Oussoren 17db495445 Without this patch CMD-W won't close EditorWindows on MacOS X. This solves
part of bug #1517990.
2006-07-23 09:41:09 +00:00
Kurt B. Kaiser c6bacd5606 Tooltips failed on new-syle class __init__ args. Bug 1027566 Loren Guthrie 2006-07-23 04:19:49 +00:00
Greg Ward 7802af426e Be a lot smarter about whether this test passes: instead of assuming
that a 2.93 sec audio file will always take 3.1 sec (as it did on the
hardware I had when I first wrote the test), expect that it will take
2.93 sec +/- 10%, and only fail if it's outside of that range.
Compute the expected
2006-07-23 02:25:53 +00:00
Neal Norwitz cde0fa9c61 Don't fail if the directory already exists 2006-07-22 17:00:57 +00:00
Georg Brandl 4085f1499c Fix check for empty list (vs. None). 2006-07-21 17:36:31 +00:00
Barry Warsaw b110bad2d9 More RFC 2231 improvements for the email 4.0 package. As Mark Sapiro rightly
points out there are really two types of continued headers defined in this
RFC (i.e. "encoded" parameters with the form "name*0*=" and unencoded
parameters with the form "name*0="), but we were were handling them both the
same way and that isn't correct.

This patch should be much more RFC compliant in that only encoded params are
%-decoded and the charset/language information is only extract if there are
any encoded params in the segments.  If there are no encoded params then the
RFC says that there will be no charset/language parts.

Note however that this will change the return value for Message.get_param() in
some cases.  For example, whereas before if you had all unencoded param
continuations you would have still gotten a 3-tuple back from this method
(with charset and language == None), you will now get just a string.  I don't
believe this is a backward incompatible change though because the
documentation for this method already indicates that either return value is
possible and that you must do an isinstance(val, tuple) check to discriminate
between the two.  (Yeah that API kind of sucks but we can't change /that/
without breaking code.)

Test cases, some documentation updates, and a NEWS item accompany this patch.
2006-07-21 14:51:07 +00:00
Vinay Sajip dc57936b63 Addressed SF#1524081 by using a dictionary to map level names to syslog priority names, rather than a string.lower(). 2006-07-20 23:20:12 +00:00
Kurt B. Kaiser 43476e009b Avoid occasional failure to detect closing paren properly.
Patch 1407280 Tal Einat

M    ParenMatch.py
M    NEWS.txt
M    CREDITS.txt
2006-07-20 22:22:52 +00:00
Georg Brandl 13cf38c0cf Guard for _active being None in __del__ method. 2006-07-20 16:28:39 +00:00
Phillip J. Eby 1a2959cfa8 Fix SF#1516184 (again) and add a test to prevent regression.
(There was a problem with empty filenames still causing recursion)
2006-07-20 15:54:16 +00:00
Martin v. Löwis cfe3128cd5 Revert r50706 (Whitespace normalization) and
r50697: Comments and docs cleanups, and some little fixes
per recommendation from Raymond Hettinger.
2006-07-19 17:18:32 +00:00
Tim Peters 112aad3630 SF bug 1524317: configure --without-threads fails to build
Moved the code for _PyThread_CurrentFrames() up, so it's no longer
in a huge "#ifdef WITH_THREAD" block (I didn't realize it /was/ in
one).

Changed test_sys's test_current_frames() so it passes with or without
thread supported compiled in.

Note that test_sys fails when Python is compiled without threads,
but for an unrelated reason (the old test_exit() fails with an
indirect ImportError on the `thread` module).  There are also
other unrelated compilation failures without threads, in extension
modules (like ctypes); at least the core compiles again.

Do we really support --without-threads?  If so, there are several
problems remaining.
2006-07-19 00:03:19 +00:00
Tim Peters 73a9eade1c Whitespace normalization. 2006-07-18 21:55:15 +00:00
Martin v. Löwis 426f4a1c65 Patch #1524429: Use repr instead of backticks again. 2006-07-18 17:46:31 +00:00
Facundo Batista ac4ae4baf7 Comments and docs cleanups, and some little fixes, provided by Santiágo Peresón 2006-07-18 12:16:13 +00:00
Brett Cannon caebe22038 Fix bug #1520914. Starting in 2.4, time.strftime() began to check the bounds
of values in the time tuple passed in.  Unfortunately people came to rely on
undocumented behaviour of setting unneeded values to 0, regardless of if it was
within the valid range.  Now those values force the value internally to the
minimum value when 0 is passed in.
2006-07-18 04:41:36 +00:00
Kurt B. Kaiser 4b7e35b530 Rebinding Tab key was inserting 'tab' instead of 'Tab'. Bug 1179168. 2006-07-18 04:03:16 +00:00
Barry Warsaw 18d2f39af7 decode_rfc2231(): Be more robust against buggy RFC 2231 encodings.
Specifically, instead of raising a ValueError when there is a single tick in
the parameter, simply return that the entire string unquoted, with None for
both the charset and the language.  Also, if there are more than 2 ticks in
the parameter, interpret the first three parts as the standard RFC 2231 parts,
then the rest of the parts as the encoded string.

Test cases added.

Original fewer-than-3-parts fix by Tokio Kikuchi.

Resolves SF bug # 1218081.  I will back port the fix and tests to Python 2.4
(email 3.0) and Python 2.3 (email 2.5).

Also, bump the version number to email 4.0.1, removing the 'alpha' moniker.
2006-07-17 23:07:51 +00:00
Kurt B. Kaiser a2f60a47b5 Patch 1479219 - Tal Einat
1. 'as' highlighted as builtin in comment string on import line
2. Comments such as "#False identity" which start with a keyword immediately
   after the '#' character aren't colored as comments.
3. u or U beginning unicode string not correctly highlighted

Closes bug 1325071
2006-07-17 21:59:27 +00:00
Georg Brandl 7b71bf3872 Remove usage of sets module (patch #1500609). 2006-07-17 13:23:46 +00:00
Neal Norwitz 84be93b2db Bug #1512814, Fix incorrect lineno's when code within a function
had more than 255 blank lines.  Byte codes need to go first, line #s second.
2006-07-16 01:50:38 +00:00
Bob Ippolito 5ea4bf1c58 Patch #1220874: Update the binhex module for Mach-O. 2006-07-15 16:53:15 +00:00