summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add module-wide "__metaclass__ = type", as requested by Jim Fulton.Steve Purcell2002-08-081-1/+4
| | | | (Synched from pyunit CVS)
* Added info about highwater heap-memory use for the sortperf.py tests; + aTim Peters2002-08-081-3/+31
| | | | couple of minor edits elsewhere.
* PyList_Reverse(): This was leaking a reference to Py_None on every call.Tim Peters2002-08-081-1/+4
| | | | | I believe I introduced this bug when I refactored the reversal code so that the mergesort could use it too. It's not a problem on the 2.2 branch.
* Major restructuring of _fileobject. Hopefully several things now workGuido van Rossum2002-08-081-61/+111
| | | | | | | | correctly (the test at least succeed, but they don't test everything yet). Also fix a performance problem in read(-1): in unbuffered mode, this would read 1 byte at a time. Since we're reading until EOF, that doesn't make sense. Use the default buffer size if _rbufsize is <= 1.
* Replace docstrings on test functions witrh comments -- then unittestGuido van Rossum2002-08-081-31/+50
| | | | | | | | | | | | | prints function and module names, which is more informative now that we repeat some tests in slightly modified subclasses. Add a test for read() until EOF. Add test suites for line-buffered (bufsize==1) and a small custom buffer size (bufsize==2). Restructure testUnbufferedRead() somewhat to avoid a potentially infinite loop.
* Added info about the right way to leave the body of a trashcan-protectedTim Peters2002-08-071-0/+5
| | | | destructor early.
* Fix a subtle bug in the trashcan code I added yesterday toGuido van Rossum2002-08-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | subtype_dealloc(). When call_finalizer() failed, it would return without going through the trashcan end macro, thereby unbalancing the trashcan nesting level counter, and thereby defeating the test case (slottrash() in test_descr.py). This in turn meant that the assert in the GC_UNTRACK macro wasn't triggered by the slottrash() test despite a bug in the code: _PyTrash_destroy_chain() calls the dealloc routine with an object that's untracked, and the assert in the GC_UNTRACK macro would fail on this; but because of an earlier test that resurrects an object, causing call_finalizer() to fail and the trashcan nesting level to be unbalanced, so _PyTrash_destroy_chain() was never called. Calling the slottrash() test in isolation *did* trigger the assert, however. So the fix is twofold: (1) call the GC_UnTrack() function instead of the GC_UNTRACK macro, because the function is safe when the object is already untracked; (2) when call_finalizer() fails, jump to a label that exits through the trashcan end macro, keeping the trashcan nesting balanced.
* GvR pointed out that only enclosing function bodies are part of nested scopes.Raymond Hettinger2002-08-071-5/+5
|
* Add -E and -tt options to the python invocations, as for the Unix tests.Guido van Rossum2002-08-071-2/+2
| | | | | The -tt means modules that mix tabs and spaces will be rejected. The -E refuses to believe Python options in the environment.
* Replace tabs with spaces. (Sorry!)Guido van Rossum2002-08-071-3/+3
|
* Tighten the unbuffered readline test to distinguish between the two lines.Guido van Rossum2002-08-071-4/+4
|
* Simplify heapreplace() -- there's no need for an explicit test forGuido van Rossum2002-08-071-7/+4
| | | | empty heap, since heap[0] raises the appropriate IndexError already.
* Document that heappop() and heapreplace() raise IndexError if the heapGuido van Rossum2002-08-071-1/+2
| | | | is empty.
* Apply character{} markup.Raymond Hettinger2002-08-071-16/+17
|
* Replace abort with Py_FatalError.Martin v. Löwis2002-08-072-2/+2
|
* Described responsibilty of weakly referenced extension types to initializeRaymond Hettinger2002-08-071-2/+23
| | | | | the weakreflist to NULL in the constructor and to fill the tp_flags slot with Py_TPFLAGS_HAVE_WEAKREFS. Closes SF bug 586583.
* Describe nested scopes in the tutorial. Closes SF bug 500704.Raymond Hettinger2002-08-071-6/+11
|
* Oops. I accidentally commented out some tests.Guido van Rossum2002-08-071-4/+4
|
* Regenerated with OSA class inheritance and fix for non-ascii chars.Jack Jansen2002-08-0742-818/+2217
|
* Fixed incorrect logic in determining whether we should initializeJack Jansen2002-08-071-2/+1
| | | | the classes' attribute list.
* Documented os.fsync and os.fdatasync. Closes SF bug 584695.Raymond Hettinger2002-08-071-0/+11
|
* "Unbuffered" mode of class _fileobject wasn't actually unbuffered,Guido van Rossum2002-08-072-8/+40
| | | | | | | | | | and this broke a Zope "pipelining" test which read multiple responses from the same connection (this attaches a new file object to the socket for each response). Added a test for this too. (I want to do some code cleanup too, but I thought I'd first fix the problem with as little code as possible, and add a unit test for this case. So that's what this checkin is about.)
* - If an OSA identifier is a Python reserved word we now append an _Jack Jansen2002-08-071-8/+10
| | | | | | in stead of prepending it, which messes up "import * from". - A few ascii()s added again. - Changed the getbaseclasses a little, but it still isn't perfect.
* Clarify that the bool instances are acceptable return values fromFred Drake2002-08-071-4/+5
| | | | __nonzero__(), in response to SF bug #579991.
* Use Py_FatalError instead of abort.Martin v. Löwis2002-08-072-4/+6
|
* Don't be over-enthusiastic with the ascii() calls: we don't need it ifJack Jansen2002-08-071-19/+19
| | | | the result passes through backticks.
* Donovan Preston's patch #538395, with some mods by me.Jack Jansen2002-08-074-50/+183
| | | | | | | | | | | | This patch makes inheritance for OSA classes work. The implementation is a bit convoluted, but I don't immedeately see a simpler way of doing it. I added calls to ascii() everywhere we output strings that may contain non-ascii characters (Python has gotten very picky since the encoding patch:-). I also removed Donovan's different way of opening resource files: I don't seem to need it.
* Quote the arguments, they may contain strings.Jack Jansen2002-08-071-1/+1
|
* Fix up some more markup problems.Fred Drake2002-08-071-8/+9
|
* Change the markup a bit more; the parameter was not marked as \var in theFred Drake2002-08-071-4/+8
| | | | sample code, and the note was marked as a logical thing.
* Fix PEP 263 code --without-unicode. Fixes #591943.Martin v. Löwis2002-08-072-0/+28
|
* Fix markup errors.Steve Holden2002-08-071-3/+3
|
* Expanded the unittests for the new width sensitive PyUnicode_Contains().Raymond Hettinger2002-08-061-0/+6
|
* Document handling of raw-unicode-escapes. Closes SF bug 587087.Raymond Hettinger2002-08-061-0/+8
|
* internal_connect(): Windows. When sock_timeout > 0 and connect() yieldsTim Peters2002-08-061-6/+14
| | | | | | | WSAEWOULDBLOCK, the second connect() attempt appears to yield WSAEISCONN on Win98 but WSAEINVAL on Win2K. So accept either as meaning "yawn, fine". This allows test_socket to succeed on my Win2K box (which it already did on my Win98SE box).
* Added a note about the inability to specify a pathname to a non-existingJack Jansen2002-08-061-1/+7
| | | | file in unix-Python.
* Changed a sentence that confused some people.Jack Jansen2002-08-061-2/+2
|
* Make more functions staticNeal Norwitz2002-08-061-2/+2
|
* Make readahead functions staticNeal Norwitz2002-08-061-5/+8
|
* Fix SF bug 574207 (chained __slots__ dealloc segfault).Guido van Rossum2002-08-061-10/+52
| | | | | | | | | | | This is inspired by SF patch 581742 (by Jonathan Hogg, who also submitted the bug report, and two other suggested patches), but separates the non-GC case from the GC case to avoid testing for GC several times. Had to fix an assert() from call_finalizer() that asserted that the object wasn't untracked, because it's possible that the object isn't GC'ed!
* Fix the markup so it doesn't break formatting.Fred Drake2002-08-061-4/+4
|
* Add testcase for SF bug 574207 (chained __slots__ dealloc segfault).Guido van Rossum2002-08-061-0/+14
| | | | Fix forthcoming.
* Added references to the email package.Fred Drake2002-08-063-2/+11
| | | | Closes SF bug #586937.
* Added a test for PyUnicode_Contains() taking into account the width ofBarry Warsaw2002-08-061-0/+1
| | | | Py_UNICODE.
* PyUnicode_Contains(): The memcmp() call didn't take into account theBarry Warsaw2002-08-061-1/+1
| | | | width of Py_UNICODE. Good catch, MAL.
* get rid of GETNAMEV macro - use GETITEM directlySkip Montanaro2002-08-061-12/+11
| | | | same idea as getting rid of GETCONST & GETNAME (see patch #506436)
* Add a coding cookie, because of the møøse quote.Guido van Rossum2002-08-061-0/+1
|
* Update the URL for getting zlib, and update the minimal requiredGuido van Rossum2002-08-061-4/+4
| | | | | version to 1.1.4 (because of the 1.1.3 security problem). Also replace a funny use of line.find() with line.startswith().
* Bump the LOOPS count. 50,000 iterations takes about 5 seconds on myGuido van Rossum2002-08-061-1/+1
| | | | machine -- that feels just right.
* Add some fine points: METH_KEYWORDS implies METH_VARARGS, and ob_sizeGuido van Rossum2002-08-061-6/+10
| | | | is no longer unused in type objects.