summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Alas, roll back the definition of _XOPEN_SOURCE. It breaks the testsGuido van Rossum2002-07-193-12/+1
| | | | | | | | | | | 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).
* Remove a few lines that aren't used and cause problems on platformsGuido van Rossum2002-07-191-6/+0
| | | | | where recvfrom() on a TCP stream returns None for the address. This should address the remaining problems on FreeBSD.
* Pure Python strptime implementation by Brett Cannon. See SF patch 474274.Neal Norwitz2002-07-191-0/+1
|
* Doc patch from SF 474274 (pure Python strptime by Brett Cannon).Guido van Rossum2002-07-191-7/+0
|
* Patch to call the Pure python strptime implementation if there's noGuido van Rossum2002-07-191-3/+18
| | | | | | | | 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.)
* Pure Python strptime implementation by Brett Cannon. See SF patch 474274.Guido van Rossum2002-07-193-0/+779
| | | | Also adds tests.
* Silly typo. Not sure how that got in.Michael W. Hudson2002-07-191-1/+1
|
* Substantially flesh out extended slice section. I think this is probablyMichael W. Hudson2002-07-191-0/+83
| | | | done now.
* A few days ago, Guido said (in the thread "[Python-Dev] PythonMichael W. Hudson2002-07-193-1/+57
| | | | | | | | 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.
* Add test for previous core dump when sending on closed socket withGuido van Rossum2002-07-191-1/+10
| | | | | | | | timeout. Added small sleeps to _testAccept() and _testRecv() in NonBlockingTCPTests, to reduce race conditions (I know, this is not the solution!)
* Bail out early from internal_select() when socket file descriptorGuido van Rossum2002-07-191-0/+5
| | | | closed. Prevents core dump.
* More sort cleanup: Moved the special cases from samplesortslice intoTim Peters2002-07-191-65/+73
| | | | | | | | | | | 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.
* Land Patch [ 566100 ] Rationalize DL_IMPORT and DL_EXPORT.Mark Hammond2002-07-1912-256/+209
|
* Add description for _XOPEN_SOURCE_ - needed to allow autoheader to succeed.Mark Hammond2002-07-191-1/+1
|
* binarysort() cleanup: Documented the key invariants, explained why theyTim Peters2002-07-191-2/+13
| | | | imply this is a stable sort, and added some asserts.
* listreverse(): Don't call the new reverse_slice unless the listTim Peters2002-07-191-1/+2
| | | | has something in it (else ob_item may be a NULL pointer).
* Cleanup yielding a small speed boost: before rich comparisons wereTim Peters2002-07-191-50/+32
| | | | | | | | | | | | | | | | | | 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.
* Trimmed trailing whitespace.Tim Peters2002-07-191-22/+22
|
* Cleanup: Define one internal utility for reversing a list slice, andTim Peters2002-07-191-28/+20
| | | | use that everywhere.
* Anthony Baxter's cleanup patch. Python project SF patch # 583190,Barry Warsaw2002-07-182-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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 ;).
* Fix bug [ 549731 ] Unicode encoders appears to leak references.Mark Hammond2002-07-181-4/+10
| | | | Python 2.2.1 bugfix candidate.
* Define _XOPEN_SOURCE in configure and Python.h.Jeremy Hylton2002-07-183-7/+9
| | | | | | | | | | | | | | | | 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.
* A Python float is a C double; redeclare defaulttimeout as such; stopsTim Peters2002-07-181-1/+1
| | | | compiler wngs on Windows.
* Anthony Baxter's patch to expose the parser's `strict' flag in theseBarry Warsaw2002-07-181-5/+5
| | | | convenience functions. Closes SF # 583188 (python project).
* Silence warning about getdefaulttimeout in PyMethodDef.Guido van Rossum2002-07-181-1/+1
|
* Fix indentation.Jeremy Hylton2002-07-181-5/+5
|
* Use AC_FUNC_SETPGRP.Jeremy Hylton2002-07-182-85/+30
|
* Add clarifying comment.Guido van Rossum2002-07-181-0/+1
|
* Script to run the pystones "benchmark" under HotShot.Fred Drake2002-07-181-0/+35
|
* Simplify; the low-level log reader is now always a modern iterator,Fred Drake2002-07-181-6/+1
| | | | | 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.)
* Expose the fileno() method of the underlying profiler.Fred Drake2002-07-181-0/+4
|
* Expose the fileno() method of the underlying log reader.Fred Drake2002-07-181-6/+4
| | | | | Remove the crufty support for Python's that don't have StopIteration; the HotShot patch for Python 2.1 has not been maintained.
* - When the log reader detects end-of-file, close the file.Fred Drake2002-07-181-45/+84
| | | | | | | | - 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.
* Remove extraneous semicolon.Jeremy Hylton2002-07-181-1/+1
| | | | (Silences compiler warning for Compaq C++ 6.5 on Tru64.)
* Add default timeout functionality. This adds setdefaulttimeout() andGuido van Rossum2002-07-183-1/+97
| | | | | getdefaulttimeout() functions to the socket and _socket modules, and appropriate tests.
* Gave this a facelift: "/" vs "//", whrandom vs random, etc. BoostedTim Peters2002-07-181-35/+46
| | | | | | | | | | | | | | 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).
* Gave hotshot.LogReader a close() method, to allow users to close theTim Peters2002-07-182-4/+4
| | | | | file object that LogReader opens. Used it then in test_hotshot; the test passes again on Windows. Thank Guido for the analysis.
* We're no longer trying to support older Python versions with thisGuido van Rossum2002-07-181-7/+2
| | | | codebase, so get rid of the pre-2.2 contingency.
* test_hotshot fails on Windows now. Added XXX comment explaining why,Tim Peters2002-07-171-0/+4
| | | | and that I don't know how to fix it. Fred?
* (py-pychecker-run): Use the last pychecker invocation as the defaultBarry Warsaw2002-07-171-1/+3
| | | | contents of the next command.
* Added documentation for the buffer_text and related attributes of theFred Drake2002-07-171-0/+23
| | | | xmlparser object provided by pyexpat, new in Python 2.3.
* Mark the closed attribute of the profiler with PyDoc_STR(), and addedFred Drake2002-07-171-2/+3
| | | | a docstring for the info attribute of the logreader object.
* Added a docstring for the closed attribute.Fred Drake2002-07-171-4/+9
| | | | | | 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.
* SF patch 552161 - Py_AddPendingCall doesn't unlock on fail (DanielGuido van Rossum2002-07-171-1/+3
| | | | | | Dunbar) Can't test this, but looks correct to me.
* Removed more stray instances of statichere, but left _sre.c alone.Tim Peters2002-07-178-9/+9
|
* Change staticforward and statichere to just use static.Fred Drake2002-07-171-2/+2
| | | | Removed ^M from some line-ends.
* Remove now-obsolete staticforward/statichere discussion.Fred Drake2002-07-171-10/+2
|
* staticforward bites the dust.Jeremy Hylton2002-07-1761-222/+126
| | | | | | | | | | | | | | | 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.
* Some modernization. Get rid of the redundant next() method. AlwaysGuido van Rossum2002-07-171-66/+37
| | | | | assume tp_iter and later fields exist. Use PyObject_GenericGetAttr instead of providing our own tp_getattr hook.
* Add a test for the 'closed' attribute on the C-profiler object.Guido van Rossum2002-07-171-0/+3
|