| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
character set, which we'll convert to a Charset instance. Sigh.
|
|
|
|
| |
will return as the charset if implicit us-ascii is used.
|
|
|
|
| |
Return the selected item, if there is any.
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
opened on top of the shell instead of in a new window.
|
| |
|
|
|
|
| |
It's a little better than average for our sort.
|
|
|
|
| |
'en' in teardown(). This way hopefully test_time.py won't fail.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
| |
mimelib-devel list is that non-strict parsing should be the default.
Make it so.
|
|
|
|
| |
non-strict parsing should be the default. Make it so.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
to print>> the structure to. Defaults to sys.stdout.
|
|
|
|
| |
out on the mimelib-devel list.
|
|
|
|
| |
also drop the output file.
|
|
|
|
|
| |
where recvfrom() on a TCP stream returns None for the address.
This should address the remaining problems on FreeBSD.
|
|
|
|
| |
Also adds tests.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
timeout.
Added small sleeps to _testAccept() and _testRecv() in
NonBlockingTCPTests, to reduce race conditions (I know, this is not
the solution!)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;).
|
|
|
|
| |
convenience functions. Closes SF # 583188 (python project).
|
| |
|
| |
|
|
|
|
|
| |
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.)
|
| |
|
|
|
|
|
| |
Remove the crufty support for Python's that don't have StopIteration;
the HotShot patch for Python 2.1 has not been maintained.
|
|
|
|
|
| |
getdefaulttimeout() functions to the socket and _socket modules, and
appropriate tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
file object that LogReader opens. Used it then in test_hotshot; the
test passes again on Windows. Thank Guido for the analysis.
|
|
|
|
| |
codebase, so get rid of the pre-2.2 contingency.
|
|
|
|
| |
and that I don't know how to fix it. Fred?
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation now stores all the lines of the request in a buffer
and makes a single send() call when the request is finished,
specifically when endheaders() is called.
This appears to improve performance. The old code called send() for
each line. The sends are all short, so they caused bad interactions
with the Nagle algorithm and delayed acknowledgements. In simple
tests, the second packet was delayed by 100s of ms. The second send was
delayed by the Nagle algorithm, waiting for the ack. The delayed ack
strategy delays the ack in hopes of piggybacking it on a data packet,
but the server won't send any data until it receives the complete
request.
This change minimizes the problem that Nagle + delayed ack will cause
a problem, although a request large enough to be broken into two
packets will still suffer some delay. Luckily the MSS is large enough
to accomodate most single packets.
XXX Bug fix candidate?
|
|
|
|
|
| |
Some persistent picklers (well, probably, the *only* persistent
pickler) would like to pickle some classes in a special way.
|
|
|
|
|
|
|
|
|
|
|
| |
existed at the time atexit first got imported. That's a bug, and this
fixes it.
Also reworked test_atexit.py to test for this too, and to stop using
an "expected output" file, and to test what actually happens at exit
instead of just simulating what it thinks atexit will do at exit.
Bugfix candidate, but it's messy so I'll backport to 2.2 myself.
|
|
|
|
|
|
| |
nodes (in Parser/node.c) resolves the gross memory consumption
exhibited by the EMX runtime on OS/2, so the test should be exercised
on this platform.
|
|
|
|
|
|
|
|
| |
The test of httplib makes it difficult to maintain httplib. There are
two many idioms that pyclbr doesn't seem to understand, and I don't
understand how to update these tests to make them work.
Also remove commented out test of urllib2.
|
| |
|
|
|
|
| |
Client code could create responses explicitly.
|
|
|
|
|
|
|
| |
more spaces only crashed pdb.
While I was at it, cleaned up some style nits (spaces between function
and parenthesis, and redundant parentheses in if statement).
|
|
|
|
|
|
| |
calling Python was installed was so complicated, so I simplified it.
This should get the snake-farm's build scripts working again.
|