(no author) [Tue, 23 Jul 2002 20:35:58 +0000 (23 20:35 +0000)]
This commit was manufactured by cvs2svn to create tag
'email_Release_2_2'.
git-svn-id: http://svn.python.org/projects/python/tags/email_Release_2_2@27758 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 20:35:58 +0000 (23 20:35 +0000)]
Use full package paths in imports.
git-svn-id: http://svn.python.org/projects/python/trunk@27757 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Tue, 23 Jul 2002 19:56:30 +0000 (23 19:56 +0000)]
Taught the Windows installer about changes in the structure of the email
package, and the loss of the test/data directory.
git-svn-id: http://svn.python.org/projects/python/trunk@27756 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 19:46:35 +0000 (23 19:46 +0000)]
Added a couple of more tests for Header charset handling.
git-svn-id: http://svn.python.org/projects/python/trunk@27755 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 19:23:22 +0000 (23 19:23 +0000)]
Oops, missed an import of test_support.
git-svn-id: http://svn.python.org/projects/python/trunk@27754 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 19:13:45 +0000 (23 19:13 +0000)]
A few updates about how/where to import test_support from.
git-svn-id: http://svn.python.org/projects/python/trunk@27753 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 19:04:11 +0000 (23 19:04 +0000)]
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. :)
git-svn-id: http://svn.python.org/projects/python/trunk@27752 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Tue, 23 Jul 2002 06:31:15 +0000 (23 06:31 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27751 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 06:08:10 +0000 (23 06:08 +0000)]
append(): Bite the bullet and let charset be the string name of a
character set, which we'll convert to a Charset instance. Sigh.
git-svn-id: http://svn.python.org/projects/python/trunk@27750 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Tue, 23 Jul 2002 04:29:54 +0000 (23 04:29 +0000)]
make_header(): Watch out for charset is None, which decode_header()
will return as the charset if implicit us-ascii is used.
git-svn-id: http://svn.python.org/projects/python/trunk@27749 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Tue, 23 Jul 2002 03:44:35 +0000 (23 03:44 +0000)]
News about StopIteration as a "sink state".
git-svn-id: http://svn.python.org/projects/python/trunk@27748 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Tue, 23 Jul 2002 03:32:08 +0000 (23 03:32 +0000)]
Add news about strptime and socket.setdefaulttimeout().
git-svn-id: http://svn.python.org/projects/python/trunk@27747 6015fed2-1504-0410-9fe1-9d1591cc4771
nnorwitz [Tue, 23 Jul 2002 02:52:58 +0000 (23 02:52 +0000)]
SF patch #581396, Canvas "select_item" always returns None
Return the selected item, if there is any.
git-svn-id: http://svn.python.org/projects/python/trunk@27745 6015fed2-1504-0410-9fe1-9d1591cc4771
akuchling [Mon, 22 Jul 2002 19:21:06 +0000 (22 19:21 +0000)]
[Bug #580462] Mention changes to GC API
Mention portable strptime()
Move C-level sections farther down in the file
git-svn-id: http://svn.python.org/projects/python/trunk@27744 6015fed2-1504-0410-9fe1-9d1591cc4771
akuchling [Mon, 22 Jul 2002 18:57:36 +0000 (22 18:57 +0000)]
Sort changed modules into alphabetical order; no other changes
git-svn-id: http://svn.python.org/projects/python/trunk@27743 6015fed2-1504-0410-9fe1-9d1591cc4771
akuchling [Mon, 22 Jul 2002 18:50:11 +0000 (22 18:50 +0000)]
Rewrite a paragraph, and use correct mark-up
git-svn-id: http://svn.python.org/projects/python/trunk@27742 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Mon, 22 Jul 2002 13:28:21 +0000 (22 13:28 +0000)]
Remove a strange single quote that didn't seem to upset the compilers!
git-svn-id: http://svn.python.org/projects/python/trunk@27741 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Mon, 22 Jul 2002 13:26:41 +0000 (22 13:26 +0000)]
Nuke the only DL_* in this directory.
git-svn-id: http://svn.python.org/projects/python/trunk@27740 6015fed2-1504-0410-9fe1-9d1591cc4771
nnorwitz [Mon, 22 Jul 2002 13:21:10 +0000 (22 13:21 +0000)]
Move DL_IMPORT/DL_EXPORT to Build section, I think this is the correct place
git-svn-id: http://svn.python.org/projects/python/trunk@27739 6015fed2-1504-0410-9fe1-9d1591cc4771
nnorwitz [Mon, 22 Jul 2002 13:18:59 +0000 (22 13:18 +0000)]
SF bug #583894, add doc for DL_IMPORT/DL_EXPORT deprecation
git-svn-id: http://svn.python.org/projects/python/trunk@27738 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Mon, 22 Jul 2002 12:53:16 +0000 (22 12:53 +0000)]
Add note about DL_IMPORT deprecation.
[ 583894 ] doc DL_IMPORT/DL_EXPORT changes
git-svn-id: http://svn.python.org/projects/python/trunk@27737 6015fed2-1504-0410-9fe1-9d1591cc4771
jackjansen [Mon, 22 Jul 2002 12:35:22 +0000 (22 12:35 +0000)]
Fixed potential refcount problems with interned strings, adapted comments, added a bit more trace output if verbose > 1.
git-svn-id: http://svn.python.org/projects/python/trunk@27736 6015fed2-1504-0410-9fe1-9d1591cc4771
jackjansen [Mon, 22 Jul 2002 12:32:31 +0000 (22 12:32 +0000)]
Finally found out why te cf project sometimes worked and someimes didn't. Fixed it.
git-svn-id: http://svn.python.org/projects/python/trunk@27735 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Sun, 21 Jul 2002 17:37:03 +0000 (21 17:37 +0000)]
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).
git-svn-id: http://svn.python.org/projects/python/trunk@27728 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Sun, 21 Jul 2002 06:06:30 +0000 (21 06:06 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27727 6015fed2-1504-0410-9fe1-9d1591cc4771
kbk [Sun, 21 Jul 2002 01:24:28 +0000 (21 01:24 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27726 6015fed2-1504-0410-9fe1-9d1591cc4771
nnorwitz [Sat, 20 Jul 2002 20:35:13 +0000 (20 20:35 +0000)]
Get popen test to work even if python is not in the path
git-svn-id: http://svn.python.org/projects/python/trunk@27725 6015fed2-1504-0410-9fe1-9d1591cc4771
loewis [Sat, 20 Jul 2002 08:51:52 +0000 (20 08:51 +0000)]
Define _XOPEN_SOURCE and _GNU_SOURCE in pyconfig.h, to have them
available in the configure tests already.
git-svn-id: http://svn.python.org/projects/python/trunk@27724 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Sat, 20 Jul 2002 04:21:51 +0000 (20 04:21 +0000)]
Added new test "3sort". This is sorted data but with 3 random exchanges.
It's a little better than average for our sort.
git-svn-id: http://svn.python.org/projects/python/trunk@27723 6015fed2-1504-0410-9fe1-9d1591cc4771
nnorwitz [Sat, 20 Jul 2002 00:46:12 +0000 (20 00:46 +0000)]
add versionadded to doc
git-svn-id: http://svn.python.org/projects/python/trunk@27722 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Sat, 20 Jul 2002 00:38:01 +0000 (20 00:38 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27721 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Sat, 20 Jul 2002 00:36:38 +0000 (20 00:36 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27720 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:44:23 +0000 (19 22:44 +0000)]
Shut the test up and add a missing import
git-svn-id: http://svn.python.org/projects/python/trunk@27719 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:31:10 +0000 (19 22:31 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27718 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:29:49 +0000 (19 22:29 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27717 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:26:01 +0000 (19 22:26 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27716 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:25:34 +0000 (19 22:25 +0000)]
Parser.__init__(): The consensus on the mimelib-devel list is that
non-strict parsing should be the default. Make it so.
git-svn-id: http://svn.python.org/projects/python/trunk@27715 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:24:55 +0000 (19 22:24 +0000)]
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.
git-svn-id: http://svn.python.org/projects/python/trunk@27714 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:21:47 +0000 (19 22:21 +0000)]
_structure(): Take an optional `fp' argument which would be the object
to print>> the structure to. Defaults to sys.stdout.
git-svn-id: http://svn.python.org/projects/python/trunk@27713 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Fri, 19 Jul 2002 22:21:02 +0000 (19 22:21 +0000)]
_dispatch(): Use the new Message.get_content_type() method as hashed
out on the mimelib-devel list.
git-svn-id: http://svn.python.org/projects/python/trunk@27712 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Fri, 19 Jul 2002 22:16:41 +0000 (19 22:16 +0000)]
Follow PyXML: Remove all prints from successful tests. This means we can
also drop the output file.
git-svn-id: http://svn.python.org/projects/python/trunk@27711 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Fri, 19 Jul 2002 22:03:03 +0000 (19 22:03 +0000)]
Return NULL instead of 0 from function with a pointer return value.
git-svn-id: http://svn.python.org/projects/python/trunk@27710 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 19:32:30 +0000 (19 19:32 +0000)]
Alas, roll back the definition of _XOPEN_SOURCE. It breaks the tests
for the time module, because somehow configure won't define the
symbols HAVE_STRUCT_TM_TM_ZONE, HAVE_TM_ZONE, and HAVE_TZNAME in this
case.
I've got no time to research this further, so I leave it in Jeremy and
Martin's capable hands to find a different solution for True64 (or to
devise a way to get the time tests to succeed while defining
_XOPEN_SOURCE).
git-svn-id: http://svn.python.org/projects/python/trunk@27709 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 19:23:54 +0000 (19 19:23 +0000)]
Remove a few lines that aren't used and cause problems on platforms
where recvfrom() on a TCP stream returns None for the address.
This should address the remaining problems on FreeBSD.
git-svn-id: http://svn.python.org/projects/python/trunk@27708 6015fed2-1504-0410-9fe1-9d1591cc4771
nnorwitz [Fri, 19 Jul 2002 18:38:25 +0000 (19 18:38 +0000)]
Pure Python strptime implementation by Brett Cannon. See SF patch 474274.
git-svn-id: http://svn.python.org/projects/python/trunk@27707 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 17:09:36 +0000 (19 17:09 +0000)]
Doc patch from SF 474274 (pure Python strptime by Brett Cannon).
git-svn-id: http://svn.python.org/projects/python/trunk@27706 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 17:06:47 +0000 (19 17:06 +0000)]
Patch to call the Pure python strptime implementation if there's no
C implementation. See SF patch 474274, by Brett Cannon.
(As an experiment, I'm adding a line that #undefs HAVE_STRPTIME,
so that you'll always get the Python version. This is so that it
gets some good exercise. We should eventually delete that line.)
git-svn-id: http://svn.python.org/projects/python/trunk@27705 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 17:04:46 +0000 (19 17:04 +0000)]
Pure Python strptime implementation by Brett Cannon. See SF patch 474274.
Also adds tests.
git-svn-id: http://svn.python.org/projects/python/trunk@27704 6015fed2-1504-0410-9fe1-9d1591cc4771
mwh [Fri, 19 Jul 2002 15:52:38 +0000 (19 15:52 +0000)]
Silly typo. Not sure how that got in.
git-svn-id: http://svn.python.org/projects/python/trunk@27703 6015fed2-1504-0410-9fe1-9d1591cc4771
mwh [Fri, 19 Jul 2002 15:48:56 +0000 (19 15:48 +0000)]
Substantially flesh out extended slice section. I think this is probably
done now.
git-svn-id: http://svn.python.org/projects/python/trunk@27702 6015fed2-1504-0410-9fe1-9d1591cc4771
mwh [Fri, 19 Jul 2002 15:47:06 +0000 (19 15:47 +0000)]
A few days ago, Guido said (in the thread "[Python-Dev] Python
version of PySlice_GetIndicesEx"):
> OK. Michael, if you want to check in indices(), go ahead.
Then I did what was needed, but didn't check it in. Here it is.
git-svn-id: http://svn.python.org/projects/python/trunk@27701 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 12:46:46 +0000 (19 12:46 +0000)]
Add test for previous core dump when sending on closed socket with
timeout.
Added small sleeps to _testAccept() and _testRecv() in
NonBlockingTCPTests, to reduce race conditions (I know, this is not
the solution!)
git-svn-id: http://svn.python.org/projects/python/trunk@27700 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Fri, 19 Jul 2002 12:44:59 +0000 (19 12:44 +0000)]
Bail out early from internal_select() when socket file descriptor
closed. Prevents core dump.
git-svn-id: http://svn.python.org/projects/python/trunk@27699 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Fri, 19 Jul 2002 07:05:44 +0000 (19 07:05 +0000)]
More sort cleanup: Moved the special cases from samplesortslice into
listsort. If the former calls itself recursively, they're a waste of
time, since it's called on a random permutation of a random subset of
elements. OTOH, for exactly the same reason, they're an immeasurably
small waste of time (the odds of finding exploitable order in a random
permutation are ~= 0, so the special-case loops looking for order give
up quickly). The point is more for conceptual clarity.
Also changed some "assert comments" into real asserts; when this code
was first written, Python.h didn't supply assert.h.
git-svn-id: http://svn.python.org/projects/python/trunk@27698 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Fri, 19 Jul 2002 06:55:41 +0000 (19 06:55 +0000)]
Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.
git-svn-id: http://svn.python.org/projects/python/trunk@27697 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Fri, 19 Jul 2002 06:31:24 +0000 (19 06:31 +0000)]
Add description for _XOPEN_SOURCE_ - needed to allow autoheader to succeed.
git-svn-id: http://svn.python.org/projects/python/trunk@27696 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Fri, 19 Jul 2002 06:12:32 +0000 (19 06:12 +0000)]
binarysort() cleanup: Documented the key invariants, explained why they
imply this is a stable sort, and added some asserts.
git-svn-id: http://svn.python.org/projects/python/trunk@27695 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Fri, 19 Jul 2002 04:04:16 +0000 (19 04:04 +0000)]
listreverse(): Don't call the new reverse_slice unless the list
has something in it (else ob_item may be a NULL pointer).
git-svn-id: http://svn.python.org/projects/python/trunk@27694 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Fri, 19 Jul 2002 03:30:57 +0000 (19 03:30 +0000)]
Cleanup yielding a small speed boost: before rich comparisons were
introduced, list.sort() was rewritten to use only the "< or not <?"
distinction. After rich comparisons were introduced, docompare() was
fiddled to translate a Py_LT Boolean result into the old "-1 for <,
0 for ==, 1 for >" flavor of outcome, and the sorting code was left
alone. This left things more obscure than they should be, and turns
out it also cost measurable cycles.
So: The old CMPERROR novelty is gone. docompare() is renamed to islt(),
and now has the same return conditinos as PyObject_RichCompareBool. The
SETK macro is renamed to ISLT, and is even weirder than before (don't
complain unless you want to maintain the sort code <wink>).
Overall, this yields a 1-2% speedup in the usual (no explicit function
passed to list.sort()) case when sorting arrays of floats (as sortperf.py
does). The boost is higher for arrays of ints.
git-svn-id: http://svn.python.org/projects/python/trunk@27693 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Fri, 19 Jul 2002 02:35:45 +0000 (19 02:35 +0000)]
Trimmed trailing whitespace.
git-svn-id: http://svn.python.org/projects/python/trunk@27692 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Fri, 19 Jul 2002 02:33:08 +0000 (19 02:33 +0000)]
Cleanup: Define one internal utility for reversing a list slice, and
use that everywhere.
git-svn-id: http://svn.python.org/projects/python/trunk@27691 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Thu, 18 Jul 2002 23:09:09 +0000 (18 23:09 +0000)]
Anthony Baxter's cleanup patch. Python project SF patch # 583190,
quoting:
in non-strict mode, messages don't require a blank line at the end
with a missing end-terminator. A single newline is sufficient now.
Handle trailing whitespace at the end of a boundary. Had to switch
from using string.split() to re.split()
Handle whitespace on the end of a parameter list for Content-type.
Handle whitespace on the end of a plain content-type header.
Specifically,
get_type(): Strip the content type string.
_get_params_preserve(): Strip the parameter names and values on both
sides.
_parsebody(): Lots of changes as described above, with some stylistic
changes by Barry (who hopefully didn't screw things up ;).
git-svn-id: http://svn.python.org/projects/python/trunk@27690 6015fed2-1504-0410-9fe1-9d1591cc4771
mhammond [Thu, 18 Jul 2002 23:06:17 +0000 (18 23:06 +0000)]
Fix bug [ 549731 ] Unicode encoders appears to leak references.
Python 2.2.1 bugfix candidate.
git-svn-id: http://svn.python.org/projects/python/trunk@27689 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Thu, 18 Jul 2002 22:39:34 +0000 (18 22:39 +0000)]
Define _XOPEN_SOURCE in configure and Python.h.
This gets compilation of posixmodule.c to succeed on Tru64 and does no
harm on Linux. We may need to undefine it on some platforms, but
let's wait and see.
Martin says:
> I think it is generally the right thing to define _XOPEN_SOURCE on
> Unix, providing a negative list of systems that cannot support this
> setting (or preferably solving whatever problems remain).
>
> I'd put an (unconditional) AC_DEFINE into configure.in early on; it
> *should* go into confdefs.h as configure proceeds, and thus be active
> when other tests are performed.
git-svn-id: http://svn.python.org/projects/python/trunk@27688 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Thu, 18 Jul 2002 22:38:44 +0000 (18 22:38 +0000)]
A Python float is a C double; redeclare defaulttimeout as such; stops
compiler wngs on Windows.
git-svn-id: http://svn.python.org/projects/python/trunk@27687 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Thu, 18 Jul 2002 21:29:17 +0000 (18 21:29 +0000)]
Anthony Baxter's patch to expose the parser's `strict' flag in these
convenience functions. Closes SF # 583188 (python project).
git-svn-id: http://svn.python.org/projects/python/trunk@27686 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Thu, 18 Jul 2002 21:11:26 +0000 (18 21:11 +0000)]
Silence warning about getdefaulttimeout in PyMethodDef.
git-svn-id: http://svn.python.org/projects/python/trunk@27685 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Thu, 18 Jul 2002 20:58:57 +0000 (18 20:58 +0000)]
Fix indentation.
git-svn-id: http://svn.python.org/projects/python/trunk@27684 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Thu, 18 Jul 2002 20:25:46 +0000 (18 20:25 +0000)]
Use AC_FUNC_SETPGRP.
git-svn-id: http://svn.python.org/projects/python/trunk@27683 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Thu, 18 Jul 2002 19:48:46 +0000 (18 19:48 +0000)]
Add clarifying comment.
git-svn-id: http://svn.python.org/projects/python/trunk@27682 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Thu, 18 Jul 2002 19:47:05 +0000 (18 19:47 +0000)]
Script to run the pystones "benchmark" under HotShot.
git-svn-id: http://svn.python.org/projects/python/trunk@27681 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Thu, 18 Jul 2002 19:20:23 +0000 (18 19:20 +0000)]
Simplify; the low-level log reader is now always a modern iterator,
and should never return None. (It only did this for an old version of
HotShot that was trying to still work with a patched Python 2.1.)
git-svn-id: http://svn.python.org/projects/python/trunk@27680 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Thu, 18 Jul 2002 19:17:54 +0000 (18 19:17 +0000)]
Expose the fileno() method of the underlying profiler.
git-svn-id: http://svn.python.org/projects/python/trunk@27679 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Thu, 18 Jul 2002 19:17:20 +0000 (18 19:17 +0000)]
Expose the fileno() method of the underlying log reader.
Remove the crufty support for Python's that don't have StopIteration;
the HotShot patch for Python 2.1 has not been maintained.
git-svn-id: http://svn.python.org/projects/python/trunk@27678 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Thu, 18 Jul 2002 19:11:44 +0000 (18 19:11 +0000)]
- When the log reader detects end-of-file, close the file.
- The log reader now provides a "closed" attribute similar to the
profiler.
- Both the profiler and log reader now provide a fileno() method.
- Use METH_NOARGS where possible, allowing simpler code in the method
implementations.
git-svn-id: http://svn.python.org/projects/python/trunk@27677 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Thu, 18 Jul 2002 18:49:52 +0000 (18 18:49 +0000)]
Remove extraneous semicolon.
(Silences compiler warning for Compaq C++ 6.5 on Tru64.)
git-svn-id: http://svn.python.org/projects/python/trunk@27676 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Thu, 18 Jul 2002 17:08:35 +0000 (18 17:08 +0000)]
Add default timeout functionality. This adds setdefaulttimeout() and
getdefaulttimeout() functions to the socket and _socket modules, and
appropriate tests.
git-svn-id: http://svn.python.org/projects/python/trunk@27675 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Thu, 18 Jul 2002 15:53:32 +0000 (18 15:53 +0000)]
Gave this a facelift: "/" vs "//", whrandom vs random, etc. Boosted
the default range to end at 2**20 (machines are much faster now).
Fixed what was quite a arguably a bug, explaining an old mystery: the
"!sort" case here contructs what *was* a quadratic-time disaster for
the old quicksort implementation. But under the current samplesort, it
always ran much faster than *sort (the random case). This never made
sense. Turns out it was because !sort was sorting an integer array,
while all the other cases sort floats; and comparing ints goes much
quicker than comparing floats in Python. After changing !sort to chew
on floats instead, it's now slower than the random sort case, which
makes more sense (but is just a few percent slower; samplesort is
massively less sensitive to "bad patterns" than quicksort).
git-svn-id: http://svn.python.org/projects/python/trunk@27674 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Thu, 18 Jul 2002 14:54:28 +0000 (18 14:54 +0000)]
Gave hotshot.LogReader a close() method, to allow users to close the
file object that LogReader opens. Used it then in test_hotshot; the
test passes again on Windows. Thank Guido for the analysis.
git-svn-id: http://svn.python.org/projects/python/trunk@27673 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Thu, 18 Jul 2002 14:33:14 +0000 (18 14:33 +0000)]
We're no longer trying to support older Python versions with this
codebase, so get rid of the pre-2.2 contingency.
git-svn-id: http://svn.python.org/projects/python/trunk@27672 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Wed, 17 Jul 2002 23:52:58 +0000 (17 23:52 +0000)]
test_hotshot fails on Windows now. Added XXX comment explaining why,
and that I don't know how to fix it. Fred?
git-svn-id: http://svn.python.org/projects/python/trunk@27671 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Wed, 17 Jul 2002 21:25:43 +0000 (17 21:25 +0000)]
(py-pychecker-run): Use the last pychecker invocation as the default
contents of the next command.
git-svn-id: http://svn.python.org/projects/python/trunk@27670 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 20:31:52 +0000 (17 20:31 +0000)]
Added documentation for the buffer_text and related attributes of the
xmlparser object provided by pyexpat, new in Python 2.3.
git-svn-id: http://svn.python.org/projects/python/trunk@27669 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 19:38:05 +0000 (17 19:38 +0000)]
Mark the closed attribute of the profiler with PyDoc_STR(), and added
a docstring for the info attribute of the logreader object.
git-svn-id: http://svn.python.org/projects/python/trunk@27668 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 18:54:20 +0000 (17 18:54 +0000)]
Added a docstring for the closed attribute.
write_header(): When we encounter a non-string object in sys.path, record
a fairly mindless placeholder rather than dying. Possibly could record
the repr of the object found, but not clear whether that matters.
git-svn-id: http://svn.python.org/projects/python/trunk@27667 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Wed, 17 Jul 2002 16:57:13 +0000 (17 16:57 +0000)]
SF patch 552161 - Py_AddPendingCall doesn't unlock on fail (Daniel
Dunbar)
Can't test this, but looks correct to me.
git-svn-id: http://svn.python.org/projects/python/trunk@27666 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Wed, 17 Jul 2002 16:49:03 +0000 (17 16:49 +0000)]
Removed more stray instances of statichere, but left _sre.c alone.
git-svn-id: http://svn.python.org/projects/python/trunk@27665 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 16:42:48 +0000 (17 16:42 +0000)]
Change staticforward and statichere to just use static.
Removed ^M from some line-ends.
git-svn-id: http://svn.python.org/projects/python/trunk@27664 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 16:40:39 +0000 (17 16:40 +0000)]
Remove now-obsolete staticforward/statichere discussion.
git-svn-id: http://svn.python.org/projects/python/trunk@27663 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Wed, 17 Jul 2002 16:30:39 +0000 (17 16:30 +0000)]
staticforward bites the dust.
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure. Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers. (In
fact, we expect that the compilers are all fixed eight years later.)
I'm leaving staticforward and statichere defined in object.h as
static. This is only for backwards compatibility with C extensions
that might still use it.
XXX I haven't updated the documentation.
git-svn-id: http://svn.python.org/projects/python/trunk@27662 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Wed, 17 Jul 2002 16:15:35 +0000 (17 16:15 +0000)]
Some modernization. Get rid of the redundant next() method. Always
assume tp_iter and later fields exist. Use PyObject_GenericGetAttr
instead of providing our own tp_getattr hook.
git-svn-id: http://svn.python.org/projects/python/trunk@27661 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Wed, 17 Jul 2002 16:12:53 +0000 (17 16:12 +0000)]
Add a test for the 'closed' attribute on the C-profiler object.
git-svn-id: http://svn.python.org/projects/python/trunk@27660 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Wed, 17 Jul 2002 15:56:55 +0000 (17 15:56 +0000)]
Add missing comma.
git-svn-id: http://svn.python.org/projects/python/trunk@27659 6015fed2-1504-0410-9fe1-9d1591cc4771
jhylton [Wed, 17 Jul 2002 15:55:09 +0000 (17 15:55 +0000)]
Add test_zlib and test_struct to list of slow tests
git-svn-id: http://svn.python.org/projects/python/trunk@27658 6015fed2-1504-0410-9fe1-9d1591cc4771
tim_one [Wed, 17 Jul 2002 15:32:40 +0000 (17 15:32 +0000)]
Windows has no actual need for BAD_STATIC_FORWARD, so got rid of it.
git-svn-id: http://svn.python.org/projects/python/trunk@27657 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Wed, 17 Jul 2002 15:08:24 +0000 (17 15:08 +0000)]
Add a rather generous set of tests allowed to be skipped on sunos5.
git-svn-id: http://svn.python.org/projects/python/trunk@27656 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 14:45:33 +0000 (17 14:45 +0000)]
Remove RCSId; this produces annoying warnings.
This is already removed from Expat 1.95.4, so the problem will not
recur when we update.
git-svn-id: http://svn.python.org/projects/python/trunk@27655 6015fed2-1504-0410-9fe1-9d1591cc4771
gvanrossum [Wed, 17 Jul 2002 14:33:34 +0000 (17 14:33 +0000)]
Wipe out some warnings about non-ANSI code and an unsafe arg to
isdigit().
git-svn-id: http://svn.python.org/projects/python/trunk@27654 6015fed2-1504-0410-9fe1-9d1591cc4771
fdrake [Wed, 17 Jul 2002 13:55:33 +0000 (17 13:55 +0000)]
reduce(): Clarified what is returned in the case of a sequence 1 item long and
initial/default value.
git-svn-id: http://svn.python.org/projects/python/trunk@27652 6015fed2-1504-0410-9fe1-9d1591cc4771
bwarsaw [Wed, 17 Jul 2002 13:45:00 +0000 (17 13:45 +0000)]
We need to (require 'compile) to guarantee that compile-internal is
defined. /Really/ closes SF # 580631.
git-svn-id: http://svn.python.org/projects/python/trunk@27651 6015fed2-1504-0410-9fe1-9d1591cc4771