Commit Graph

23243 Commits

Author SHA1 Message Date
Jeremy Hylton
825e47b655 Put checks for error returns in the right place. 2002-07-25 16:37:51 +00:00
Fred Drake
ead36d7874 - Make number in comment match the targets in that section of the
Makefile.
- Update the Python version number so we're using the library built
  from the current working sources.
2002-07-25 16:23:21 +00:00
Skip Montanaro
186bec2f8d typo 2002-07-25 16:10:38 +00:00
Skip Montanaro
3a48ed9481 * runctx - fix a couple typos
* globaltrace_lt - handle case where inspect.getmodulename doesn't return
  anything useful
* localtrace_trace - handle case where inspect.getframeinfo doesn't return
  any context info

I think both of the last two are caused by exec'd or eval'd code
2002-07-25 16:09:35 +00:00
Jeremy Hylton
f20fcf9fed Complain if __len__() returns < 0, just like classic classes.
Fixes SF bug #575773.

Bug fix candidate.
2002-07-25 16:06:15 +00:00
Jeremy Hylton
c075e197d6 Extended socket.htonl and ntohl to accept longs.
Fixes SF bug #568322.

The code should raise an OverflowError if the long is > 32 bits, even
on platforms where sizeof(long) > 4.
2002-07-25 16:01:12 +00:00
Jeremy Hylton
b8a690d42a Remove test that was none too picky about whether attributes exist. 2002-07-25 15:37:23 +00:00
Skip Montanaro
21ee37c94e remove spurious SET_LINENO from com_list_for and com_list_if. All they do
is slow things down unnecessarily and make tracing much more verbose.
Something like

    def f(n):
	return [i for i in range(n) if i%2]

should have at most two SET_LINENO instructions, not four.  When tracing,
the current line number should be printed once, not 2*n+1 times.
2002-07-25 06:18:42 +00:00
Guido van Rossum
f8c8cf8a9d Get rid of _expand() altogether - the match object supports m.expand(). 2002-07-24 19:13:08 +00:00
Jeremy Hylton
403e351dfc Flesh out description of getlogin() and recommend against using it. 2002-07-24 15:32:25 +00:00
Guido van Rossum
77f6ccd1f7 The test for re.engine was misfiring because re.engine is no longer
defined and the default was "pre" instead of "sre".  Give up on 1.5.2
compatibility, hardcode the sre solution.  However, this XXX comment
still applies, AFAIK:
        # XXX This code depends on internals of the regular expression
        # engine!  There's no standard API to do a substitution when you
        # have already found the match.  One should be added.
2002-07-24 01:49:16 +00:00
Barry Warsaw
9e4e050c59 Use full package paths in imports. 2002-07-23 20:35:58 +00:00
Tim Peters
78e30fb32c Taught the Windows installer about changes in the structure of the email
package, and the loss of the test/data directory.
2002-07-23 19:56:30 +00:00
Barry Warsaw
10d0d595e0 Added a couple of more tests for Header charset handling. 2002-07-23 19:46:35 +00:00
Barry Warsaw
b5da606dfd Oops, missed an import of test_support. 2002-07-23 19:23:22 +00:00
Barry Warsaw
1bfab7bc01 A few updates about how/where to import test_support from. 2002-07-23 19:13:45 +00:00
Barry Warsaw
04f357cffe Get rid of relative imports in all unittests. Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
2002-07-23 19:04:11 +00:00
Mark Hammond
62b1ab1b31 Replace DL_IMPORT with PyMODINIT_FUNC and remove "/export:init..." link
command line for Windows builds.  This should allow MSVC to import and
build the Python MSVC6 project files without error.
2002-07-23 06:31:15 +00:00
Barry Warsaw
92825a9a52 append(): Bite the bullet and let charset be the string name of a
character set, which we'll convert to a Charset instance.  Sigh.
2002-07-23 06:08:10 +00:00
Barry Warsaw
15d3739446 make_header(): Watch out for charset is None, which decode_header()
will return as the charset if implicit us-ascii is used.
2002-07-23 04:29:54 +00:00
Guido van Rossum
2d5389c08f News about StopIteration as a "sink state". 2002-07-23 03:44:35 +00:00
Guido van Rossum
79f0a106e6 Add news about strptime and socket.setdefaulttimeout(). 2002-07-23 03:32:08 +00:00
Neal Norwitz
58b63bf4e3 SF patch #581396, Canvas "select_item" always returns None
Return the selected item, if there is any.
2002-07-23 02:52:58 +00:00
Andrew M. Kuchling
ef5d06bd3f [Bug #580462] Mention changes to GC API
Mention portable strptime()
Move C-level sections farther down in the file
2002-07-22 19:21:06 +00:00
Andrew M. Kuchling
a982eb1eb5 Sort changed modules into alphabetical order; no other changes 2002-07-22 18:57:36 +00:00
Andrew M. Kuchling
3c305d966d Rewrite a paragraph, and use correct mark-up 2002-07-22 18:50:11 +00:00
Mark Hammond
2795dae20d Remove a strange single quote that didn't seem to upset the compilers! 2002-07-22 13:28:21 +00:00
Mark Hammond
e407e2ac42 Nuke the only DL_* in this directory. 2002-07-22 13:26:41 +00:00
Neal Norwitz
1389f3e059 Move DL_IMPORT/DL_EXPORT to Build section, I think this is the correct place 2002-07-22 13:21:10 +00:00
Neal Norwitz
bba23a897e SF bug #583894, add doc for DL_IMPORT/DL_EXPORT deprecation 2002-07-22 13:18:59 +00:00
Mark Hammond
a5083ec3b3 Add note about DL_IMPORT deprecation.
[ 583894 ] doc DL_IMPORT/DL_EXPORT changes
2002-07-22 12:53:16 +00:00
Jack Jansen
603e76e882 Fixed potential refcount problems with interned strings, adapted comments, added a bit more trace output if verbose > 1. 2002-07-22 12:35:22 +00:00
Jack Jansen
66e794d743 Finally found out why te cf project sometimes worked and someimes didn't. Fixed it. 2002-07-22 12:32:31 +00:00
Tim Peters
7ea39b135a New test "+sort", tacking 10 random floats on to the end of a sorted
array.  Our samplesort special-cases the snot out of this, running about
12x faster than *sort.  The experimental mergesort runs it about 8x
faster than *sort without special-casing, but should really do better
than that (when merging runs of different lengths, right now it only
does something clever about finding where the second run begins in
the first and where the first run ends in the second, and that's more
of a temp-memory optimization).
2002-07-21 17:37:03 +00:00
Tim Peters
53d019cf5a Changed import from
from test.test_support import TestSkipped, run_unittest
to
    from test_support import TestSkipped, run_unittest

Otherwise, if the Japanese codecs aren't installed, regrtest doesn't
believe the TestSkipped exception raised by this test matches the

    except (ImportError, test_support.TestSkipped), msg:

it's looking for, and reports the skip as a crash failure instead of
as a skipped test.

I suppose this will make it harder to run this test outside of
regrtest, but under the assumption only Barry does that, better to
make it skip cleanly for everyone else.
2002-07-21 06:06:30 +00:00
Kurt B. Kaiser
1bf4c2d2c9 Bug: clearing the shell undo list after a prompt was allowing files to be
opened on top of the shell instead of in a new window.
2002-07-21 01:24:28 +00:00
Neal Norwitz
d69030db4f Get popen test to work even if python is not in the path 2002-07-20 20:35:13 +00:00
Martin v. Löwis
6f18a3c124 Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
available in the configure tests already.
2002-07-20 08:51:52 +00:00
Tim Peters
0a30e648e0 Added new test "3sort". This is sorted data but with 3 random exchanges.
It's a little better than average for our sort.
2002-07-20 04:21:51 +00:00
Neal Norwitz
1cfcafceb6 add versionadded to doc 2002-07-20 00:46:12 +00:00
Guido van Rossum
0b624f69b5 unpack_string(): avoid a compiler warning (about a real bug!) by
copying the result of fgetc() into an int variable before testing it
for EOF.
2002-07-20 00:38:01 +00:00
Guido van Rossum
65692578b7 Move the setting of os.environ['LANGUAGE'] to setup(), and reset it to
'en' in teardown().  This way hopefully test_time.py won't fail.
2002-07-20 00:36:38 +00:00
Barry Warsaw
d33d47401d Shut the test up and add a missing import 2002-07-19 22:44:23 +00:00
Barry Warsaw
190390b026 The email package's tests live much better in a subpackage
(i.e. email.test), so move the guts of them here from Lib/test.  The
latter directory will retain stubs to run the email.test tests using
Python's standard regression test.

test_email_torture.py is a torture tester which will not run under
Python's test suite because I don't want to commit megs of data to
that project (it will fail cleanly there).  When run under the mimelib
project it'll stress test the package with megs of message samples
collected from various locations in the wild.
2002-07-19 22:31:10 +00:00
Barry Warsaw
629038093c The email package's tests live much better in a subpackage
(i.e. email.test), so move the guts of them here from Lib/test.  The
latter directory will retain stubs to run the email.test tests using
Python's standard regression test.

test_email_torture.py is a torture tester which will not run under
Python's test suite because I don't want to commit megs of data to
that project (it will fail cleanly there).  When run under the mimelib
project it'll stress test the package with megs of message samples
collected from various locations in the wild.

email/test/data is a copy of Lib/test/data.  The fate of the latter is
still undecided.
2002-07-19 22:29:49 +00:00
Barry Warsaw
d8e8e54c2b message_from_string(), message_from_file(): The consensus on the
mimelib-devel list is that non-strict parsing should be the default.
Make it so.
2002-07-19 22:26:01 +00:00
Barry Warsaw
bb26b4530b Parser.__init__(): The consensus on the mimelib-devel list is that
non-strict parsing should be the default.  Make it so.
2002-07-19 22:25:34 +00:00
Barry Warsaw
c10686426e To better support default content types, fix an API wart, and preserve
backwards compatibility, we're silently deprecating get_type(),
get_subtype() and get_main_type().  We may eventually noisily
deprecate these.  For now, we'll just fix a bug in the splitting of
the main and subtypes.

get_content_type(), get_content_maintype(), get_content_subtype(): New
methods which replace the above.  These /always/ return a content type
string and do not take a failobj, because an email message always at
least has a default content type.

set_default_type(): Someday there may be additional default content
types, so don't hard code an assertion about the value of the ctype
argument.
2002-07-19 22:24:55 +00:00
Barry Warsaw
d43857455e _structure(): Take an optional `fp' argument which would be the object
to print>> the structure to.  Defaults to sys.stdout.
2002-07-19 22:21:47 +00:00
Barry Warsaw
1cecdc6bcb _dispatch(): Use the new Message.get_content_type() method as hashed
out on the mimelib-devel list.
2002-07-19 22:21:02 +00:00