summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* We don't really need the name of the test in the "test skipped" msg, andTim Peters2002-08-041-1/+1
| | | | having it there causes the line to wrap.
* Oops! Forgot the closing paren.Tim Peters2002-08-041-1/+1
|
* Finally got around to figuring out and documenting why this test failsTim Peters2002-08-041-2/+10
| | | | | | | | on Windows. The test_sequence() ERROR is easily repaired if we're willing to add an os.unlink() line to mhlib's updateline(). The test_listfolders FAIL I gave up on -- I don't remember enough about Unix link esoterica to recall why a link count of 2 is something a well- written program should be keenly interested in <wink>.
* Add encoding declaration.Martin v. Löwis2002-08-042-1/+2
|
* Add encoding declaration.Martin v. Löwis2002-08-042-0/+2
|
* I don't know what's going on with this test, but the last change fromTim Peters2002-08-041-1/+1
| | | | | Piers obviously couldn't have passed on any platform. Fiddling it so it works (for a meaning of "works" no stronger than "doesn't fail" <wink>).
* - comment improvementAndrew MacIntyre2002-08-041-1/+25
| | | | - implement viable library search routine for EMX
* add parameter missing following Jeremy's compiler class refactoringAndrew MacIntyre2002-08-041-1/+1
|
* _siftup(): __le__ is now the only comparison operator used on arrayTim Peters2002-08-031-1/+1
| | | | elements.
* revert to version 1.2Piers Lauder2002-08-031-5/+6
|
* Added new heapreplace(heap, item) function, to pop (and return) theTim Peters2002-08-032-3/+20
| | | | | currently-smallest value, and add item, in one gulp. See the second N-Best algorithm in the test suite for a natural use.
* Large code rearrangement to use better algorithms, in the sense of needingTim Peters2002-08-031-39/+79
| | | | | | | | | | | | substantially fewer array-element compares. This is best practice as of Kntuh Volume 3 Ed 2, and the code is actually simpler this way (although the key idea may be counter-intuitive at first glance! breaking out of a loop early loses when it costs more to try to get out early than getting out early saves). Also added a comment block explaining the difference and giving some real counts; demonstrating that heapify() is more efficient than repeated heappush(); and emphasizing the obvious point thatlist.sort() is more efficient if what you really want to do is sort.
* Remove cut 'n paste silliness.Tim Peters2002-08-031-2/+0
|
* Minor fiddling, including a simple class to implement a heap iteratorTim Peters2002-08-032-10/+23
| | | | | in the test file. I have docs for heapq.heapify ready to check in, but Jack appears to have left behind a stale lock in the Doc/lib directory.
* Augment credits.Guido van Rossum2002-08-021-1/+1
|
* Hmm! I thought I checked this in before! Oh well.Tim Peters2002-08-022-10/+48
| | | | | | | | | | | | Added new heapify() function, which transforms an arbitrary list into a heap in linear time; that's a fundamental tool for using heaps in real life <wink>. Added heapyify() test. Added a "less naive" N-best algorithm to the test suite, and noted that this could actually go much faster (building on heapify()) if we had max-heaps instead of min-heaps (the iterative method is appropriate when all the data isn't known in advance, but when it is known in advance the tradeoffs get murkier).
* Add a PEP-263-style encoding turd^H^H^H^Hdeclaration, because there'sGuido van Rossum2002-08-021-0/+2
| | | | a c-cedilla in one of the docstrings.
* heappop(): Added comments; simplified and sped the code.Tim Peters2002-08-021-21/+19
|
* heappop(): Use "while True" instead of "while 1".Tim Peters2002-08-021-1/+1
|
* check_invariant(): Use the same child->parent "formula" used by heapq.py.Tim Peters2002-08-021-2/+2
|
* Don't use true division where int division was intended. For that matter,Tim Peters2002-08-022-2/+2
| | | | don't use division at all.
* Adding the heap queue algorithm, per discussion in python-dev lastGuido van Rossum2002-08-021-0/+48
| | | | week.
* catch the situation where Berkeley DB is used to emulate dbm(3) librarySkip Montanaro2002-08-021-3/+24
| | | | | functions. In this case, calling dbm.open("foo", "c") actually creates a file named "foo.db".
* regression test for the whichdb moduleSkip Montanaro2002-08-021-0/+63
|
* Add Kevin O'Connor, author of the heapq code.Guido van Rossum2002-08-021-0/+2
|
* Adding the heap queue algorithm, per discussion in python-dev lastGuido van Rossum2002-08-021-0/+176
| | | | week.
* testGetServByName shouldn't check for getservbyname - the socket moduleSkip Montanaro2002-08-021-18/+17
| | | | should always have it.
* New test %sort. This takes a sorted list, picks 1% of the list positionsTim Peters2002-08-021-1/+7
| | | | | | | | | | | | | | | | at random, and replaces the elements at those positions with new random values. I was pleasantly surprised by how fast this goes! It's hard to conceive of an algorithm that could special-case for this effectively. Plus it's exactly what happens if a burst of gamma rays corrupts your sorted database on disk <wink>. i 2**i *sort ... %sort 15 32768 0.18 ... 0.03 16 65536 0.24 ... 0.04 17 131072 0.53 ... 0.08 18 262144 1.17 ... 0.16 19 524288 2.56 ... 0.35 20 1048576 5.54 ... 0.77
* modify testGetServByName so it tries a few different protocols. In this daySkip Montanaro2002-08-021-5/+17
| | | | | | and age of rampant computer breakins I imagine there are plenty of systems with telnet disabled. Successful check of at least one getservbyname() call is required for success
* Fix for SF bug 570678 (can't flush read-only file on Mac OS X).Guido van Rossum2002-08-011-1/+0
|
* SF patch 588728 (Nathan Srebro).Guido van Rossum2002-08-011-4/+11
| | | | | | | | The __delete__ method wrapper for descriptors was not supported (I added a test, too.) 2.2 bugfix candidate.
* New test for sorting sanity. Note that this will fail in earlier Pythons,Tim Peters2002-08-011-0/+124
| | | | | | | | | | | | | | | | | | | | in the stability tests. Bizarre: this takes 11x longer to run if and only if test_longexp is run before it, on my box. The bigger REPS is in test_longexp, the slower this gets. What happens on your box? It's not gc on my box (which is good, because gc isn't a plausible candidate here). The slowdown is massive in the parts of test_sort that implicitly invoke a new-style class's __lt__ or __cmp__ methods. If I boost REPS large enough in test_longexp, even the test_sort tests on an array of size 64 visibly c-r-a-w-l. The relative slowdown is even worse in a debug build. And if I reduce REPS in test_longexp, the slowdown in test_sort goes away. test_longexp does do horrid things to Win98's management of user address space, but I thought I had made that a whole lot better a month or so ago (by overallocating aggressively in the parser).
* Restore a full arglist to the socket wrapper, so it supports keywordTim Peters2002-07-311-2/+2
| | | | arguments correctly too.
* For platforms (like Windows) that wrap _socket.socket:Tim Peters2002-07-311-2/+3
| | | | | | + Don't change the arglist requirements. + Give the wrapper the same docstring as _socket.socket (it didn't have any docstring).
* Reverting this to rev 1.3. It's apparently broken everywhere at revTim Peters2002-07-311-5/+5
| | | | 1.6, and pierslauder didn't respond to email about it on Monday.
* Enable test_socket again, if only to prevent mistakes like JeremyGuido van Rossum2002-07-311-2/+2
| | | | | thinking that he was running his new test by running "make test". Also, I can't get this to fail any more. Your turn. :-)
* Repair testNtoH for large long arguments.Jeremy Hylton2002-07-311-9/+8
| | | | | | If the long is large enough, the return value will be a negative int. In this case, calling the function a second time won't return the original value passed in.
* Complete the absolute import patch for the test suite. All relativeBarry Warsaw2002-07-3046-60/+79
| | | | | | | | imports of test modules now import from the test package. Other related oddities are also fixed (like DeprecationWarning filters that weren't specifying the full import part, etc.). Also did a general code cleanup to remove all "from test.test_support import *"'s. Other from...import *'s weren't changed.
* Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000).Thomas Heller2002-07-301-0/+3
| | | | | | | | | See there for a description. Added test case. Bugfix candidate for 2.2.x, not sure about previous versions: probably low priority, because virtually no one runs debug builds.
* Fix forMichael W. Hudson2002-07-292-0/+6
| | | | | | [ 587875 ] crash on deleting extended slice The array code got simpler, always a good thing!
* Revert #571603 since it is ok to import codecs that are not subdirectoriesMartin v. Löwis2002-07-291-9/+12
| | | | of encodings. Skip modules that don't have a getregentry function.
* Recompiled the exe and updated bdist_wininst.py.Thomas Heller2002-07-291-334/+343
|
* Add 'engine' back. IDLE used this, others might have copied it fromGuido van Rossum2002-07-281-0/+2
| | | | there.
* Patch #586999: Fix multiline string in sendmail example.Martin v. Löwis2002-07-281-1/+1
|
* Fix the problem of not raising a TypeError exception when doing:Neal Norwitz2002-07-281-1/+7
| | | | | | | | '%g' % '1' '%d' % '1' Add a test for these conditions Fix the test so that if not exception is raise, this is a failure
* Patch #571603: Refer to encodings package explicitly.Martin v. Löwis2002-07-281-1/+1
|
* Patch #543498: Use License: field instead of Copyright:.Martin v. Löwis2002-07-281-1/+1
|
* Patch #581705: Catch OSError, termios.error in spawn. 2.2 bugfix candidate.Martin v. Löwis2002-07-281-4/+9
|
* Reset the Python execution server environment to its initial value priorKurt B. Kaiser2002-07-282-4/+14
| | | | | | | to executing Run/F5 from an EditorWindow. M ScriptBinding.py : add call to clear_the_environment() M run.py : implemented Executive.clear_the_environment()
* remove redundant importPiers Lauder2002-07-271-1/+0
|