summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization. test_difflib passes again.Tim Peters2004-08-293-101/+101
|
* SF patch 936813: fast modular exponentiationTim Peters2004-08-294-22/+91
| | | | | | | | | | | | | | | | | | This checkin is adapted from part 1 (of 3) of Trevor Perrin's patch set. x_mul() - sped a little by optimizing the C - sped a lot (~2X) if it's doing a square; note that long_pow() squares often k_mul() - more cache-friendly now if it's doing a square KARATSUBA_CUTOFF - boosted; gradeschool mult is quicker now, and it may have been too low for many platforms anyway KARATSUBA_SQUARE_CUTOFF - new - since x_mul is a lot faster at squaring now, the point at which Karatsuba pays for squaring is much higher than for general mult
* Reverting whitespace normalization. test_difflib fails with it -- theTim Peters2004-08-292-47/+47
| | | | | test depends on invisible trailing whitespace in .py files. The author will have to repair that.
* Whitespace normalization.Tim Peters2004-08-294-52/+52
|
* Patch #727483: Add AUTH_TYPE and REMOTE_USER.Martin v. Löwis2004-08-291-2/+15
|
* Patch #973204: Use -rpath instead of -R on Irix and Tru64.Martin v. Löwis2004-08-292-1/+7
|
* Patch #914575: difflib side by side diff support, diff.py s/b/s HTML option.Martin v. Löwis2004-08-297-7/+1412
|
* Centralize WITH_TSC processing.Martin v. Löwis2004-08-291-37/+3
|
* Patch #934711: Expose platform-specific entropy.Martin v. Löwis2004-08-295-1/+126
|
* SF feature request #992967: array.array objects should support sequences.Raymond Hettinger2004-08-294-13/+63
| | | | Made the constructor accept general iterables.
* Whitespace normalization.Tim Peters2004-08-292-10/+10
|
* Added an __iter__ method for test suites.Jim Fulton2004-08-282-0/+34
|
* setUp and tearDown functions are now passed the test objectJim Fulton2004-08-281-2/+2
|
* - setUp and tearDown functions are now passed the test objectJim Fulton2004-08-282-22/+235
| | | | | - Added a set_unittest_reportflags to set default reporting flags used when running doctests under unittest control.
* PyUnicode_Join(): Bozo Alert. While this is chugging along, it mayTim Peters2004-08-271-0/+12
| | | | | | | | | need to convert str objects from the iterable to unicode. So, if someone set the system default encoding to something nasty enough, the conversion process could mutate the input iterable as a side effect, and PySequence_Fast doesn't hide that from us if the input was a list. IOW, can't assume the size of PySequence_Fast's result is invariant across PyUnicode_FromObject() calls.
* PyUnicode_Join(): Rewrote to use PySequence_Fast(). This doesn't doTim Peters2004-08-271-126/+96
| | | | | | | | much to reduce the size of the code, but greatly improves its clarity. It's also quicker in what's probably the most common case (the argument iterable is a list). Against it, if the iterable isn't a list or a tuple, a temp tuple is materialized containing the entire input sequence, and that's a bigger temp memory burden. Yawn.
* Removed old "if 0:" block for leak detection; wouldn't work anymore anyway.Tim Peters2004-08-271-8/+1
|
* Don't really need ellipsis doctests for the syntax errors, becauseTim Peters2004-08-271-12/+12
| | | | | | this module imports itself explicitly from test (so the "file names" current doctest synthesizes for examples don't vary depending on how test_generators is run).
* Removed outdated commentEdward Loper2004-08-271-2/+0
|
* Fixed 6 failures due to doctest changes.Tim Peters2004-08-271-16/+16
|
* test_bug1001011(): Verify thatTim Peters2004-08-271-5/+33
| | | | | | | | | s.join([t]) is t for (s, t) in (str, str), (unicode, unicode), and (str, unicode). For (unicode, str), verify that it's *not* t (the result is promoted to unicode instead). Also verify that when t is a subclass of str or unicode that "the right thing" happens.
* PyUnicode_Join(): Missed a spot where I intended a cast from size_t toTim Peters2004-08-271-1/+1
| | | | | int. I sure wish MS would gripe about that! Whatever, note that the statement above it guarantees that the cast loses no info.
* Fix the spelling of Fredrik Lundh's last name (unless there really is aBrett Cannon2004-08-271-1/+1
| | | | "Fredrik Lund" who contributed the code in question).
* Remove unused method _OutputRedirectingPdb.resumeEdward Loper2004-08-271-3/+0
|
* - Removed redundant call to expandtabs in DocTestParesr.Edward Loper2004-08-272-67/+175
| | | | | | | | | | | | | | - Improvements to interactive debugging support: - Changed the replacement pdb.set_trace to redirect stdout to the real stdout *only* during interactive debugging; stdout from code continues to go to the fake stdout. - When the interactive debugger gets to the end of an example, automatically continue. - Use a replacement linecache.getlines that will return source lines from doctest examples; this makes the source available to the debugger for interactive debugging. - In test_doctest, use a specialized _FakeOutput class instead of a temporary file to fake stdin for the interactive interpreter.
* PyUnicode_Join(): Two primary aims:Tim Peters2004-08-271-40/+120
| | | | | | | | 1. u1.join([u2]) is u2 2. Be more careful about C-level int overflow. Since PySequence_Fast() isn't needed to achieve #1, it's not used -- but the code could sure be simpler if it were.
* - Added DocTestParser.parse(), which parses a docstring into ExamplesEdward Loper2004-08-262-145/+137
| | | | | | | | | and intervening text strings. - Removed DocTestParser.get_program(): use script_from_examples() instead. - Fixed bug in DocTestParser._INDENT_RE - Fixed bug in DocTestParser._min_indent - Moved _want_comment() to the utility function section
* Move test_bug1001011() to string_tests.MixinStrUnicodeTest so thatWalter Dörwald2004-08-264-24/+23
| | | | | | it can be used for str and unicode. Drop the test for "".join([s]) is s because this is an implementation detail (and doesn't work for unicode)
* Correct incorrect "it's" to "its".Johannes Gijsbers2004-08-261-1/+1
|
* output_difference(): In fancy-diff cases, the way this split expected &Tim Peters2004-08-262-9/+5
| | | | | | | | actual output into lines created spurious empty lines at the ends of each. Those matched, but the fancy diffs had surprising line counts (1 larger than expected), and tests kept having to slam <BLANKLINE> into the expected output to account for this. Using the splitlines() string method with keepends=True instead accomplishes what was intended directly.
* Add missing executable option to DummyCommand.Martin v. Löwis2004-08-261-1/+3
|
* Whitespace normalization.Tim Peters2004-08-264-34/+33
|
* _do_a_fancy_diff(): Pay no attention to the ellipses behind the curtain.Tim Peters2004-08-261-7/+11
| | | | | | | | | While a fancy diff can be confusing in the presence of ellipses, so far I'm finding (2-0-0) that it's much more a major aid in narrowing down the possibilities when an ellipsis-slinging test fails. So we no longer refuse to do a fancy diff just because of ellipses. This isn't ideal; it's just better.
* Fine tune a word.Tim Peters2004-08-261-1/+1
|
* Thinko repair.Tim Peters2004-08-261-1/+1
|
* Reorg of exception section. Now that there are fewer details needingTim Peters2004-08-261-22/+45
| | | | | explanation, it's easier to push the remaining insufferably anal details into a "fine print" section at the bottom.
* Remove unnecessary line.Raymond Hettinger2004-08-261-1/+0
|
* Small wording fixups.Raymond Hettinger2004-08-261-5/+5
|
* Changed OutputChecker.output_difference to expect an Example object,Edward Loper2004-08-261-6/+6
| | | | | | rather than an expected output string. This gives the output_difference method access to more information, such as the indentation of the example, which might be useful.
* Added REPORT_ONLY_FIRST_FAILURE flag, which supresses output after theEdward Loper2004-08-263-12/+116
| | | | first failing example in each test.
* When building with --disable-toolbox-glue under Darwin, skip building anyBrett Cannon2004-08-262-2/+7
| | | | | | | | Mac-specific modules. Before all modules were compiled but would fail thanks to a dependence on the code included when Python was built without the compiler flag. Closes bug #991962.
* Renamed UNIFIED_DIFF->REPORT_UDIFF; CONTEXT_DIFF->REPORT_CDIFF; andEdward Loper2004-08-263-28/+28
| | | | | | | NDIFF_DIFF->REPORT_NDIFF. This establishes the naming convention that all reporting options should begin with "REPORT_" (since reporting options are a different class from output comparison options; but they are both set in optionflags).
* Shortened diff output for unified & context diffsEdward Loper2004-08-262-12/+8
|
* - Changed the output of report_start() and report_unexpected_exception()Edward Loper2004-08-262-58/+64
| | | | | | | to be more consistent with report_failure() - If `want` or `got` is empty, then print "Expected nothing\n" or "Got nothing\n" rather than "Expected:\n" or "Got:\n" - Got rid of _tag_msg
* Restored half of a \versionadded only half of which should have beenTim Peters2004-08-261-0/+3
| | | | deleted.
* Patch #1015012. Improve markup and punctuation in libsocket.texDave Cole2004-08-262-5/+5
|
* Patch #1014930. Expose current parse location to XMLParser.Dave Cole2004-08-264-0/+76
|
* Minor improvements to the template code.Raymond Hettinger2004-08-261-18/+15
| | | | | | | | * Add comment bars segregating this code from the rest. * Improve readability of the re pattern with indentation and comments on the same line. * Replace the groupdict() and get() pair with a direct call to group() which does the same thing.
* Added an "exc_msg" attribute to Example (containing the expectedEdward Loper2004-08-262-59/+139
| | | | | | | | | exception message, or None if no exception is expected); and moved exception parsing from DocTestRunner to DocTestParser. This is architecturally cleaner, since it moves all parsing work to DocTestParser; and it should make it easier for code outside DocTestRunner (notably debugging code) to properly handle expected exceptions.
* Re-generate configure with recent configure.in change (for patch #1016224).Trent Mick2004-08-251-219/+431
|