| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
where recvfrom() on a TCP stream returns None for the address.
This should address the remaining problems on FreeBSD.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
Also adds tests.
|
| |
|
|
|
|
| |
done now.
|
|
|
|
|
|
|
|
| |
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!)
|
|
|
|
| |
closed. Prevents core dump.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
imply this is a stable sort, and added some asserts.
|
|
|
|
| |
has something in it (else ob_item may be a NULL pointer).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
use that everywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 ;).
|
|
|
|
| |
Python 2.2.1 bugfix candidate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
compiler wngs on Windows.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
(Silences compiler warning for Compaq C++ 6.5 on Tru64.)
|
|
|
|
|
| |
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?
|
|
|
|
| |
contents of the next command.
|
|
|
|
| |
xmlparser object provided by pyexpat, new in Python 2.3.
|
|
|
|
| |
a docstring for the info attribute of the logreader object.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Dunbar)
Can't test this, but looks correct to me.
|
| |
|
|
|
|
| |
Removed ^M from some line-ends.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
assume tp_iter and later fields exist. Use PyObject_GenericGetAttr
instead of providing our own tp_getattr hook.
|
| |
|