summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* * Converted test to unittest format.Raymond Hettinger2003-09-131-85/+158
| | | | * Expanded coverage.
* The previous change works much faster (one lookup per key) whenRaymond Hettinger2003-09-131-0/+9
| | | | iteritems() is defined.
* SF bug #804115: bad argument handling(unittest.py)Raymond Hettinger2003-09-131-2/+2
|
* Simplify doctest of tee().Raymond Hettinger2003-09-131-6/+2
|
* Patch #793021: Implement htmllib.HTMLParser.reset. Fixes #711632.Martin v. Löwis2003-09-121-0/+3
| | | | Backported to 2.3.
* Patch #790000: Allow os.access to handle Unicode file name.Martin v. Löwis2003-09-121-0/+1
|
* SF #662923Raymond Hettinger2003-09-122-7/+28
| | | | | | Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed.
* Oops. Really fix the indentation problem this time.Jeremy Hylton2003-09-101-13/+13
|
* Fix inconsistent mix of tabs and spaces that caused test to fail.Jeremy Hylton2003-09-101-5/+4
|
* display link to module docs when it looks like the object module is a coreSkip Montanaro2003-09-101-1/+47
| | | | module
* Python Bug 775061Kurt B. Kaiser2003-09-103-97/+2
| | | | | | 1. Remove "idle" script, it lives in Tools/scripts/ now. 2. Remove shebang from idle.py, should be called explicitly. 3. Remove obsolete test code from rpc.py; needs unit test.
* Add an example to address a common question of how to split iterators.Raymond Hettinger2003-09-081-4/+30
|
* Set the warnings stacklevel to two.Raymond Hettinger2003-09-081-2/+2
|
* SF bug 801631: file.truncate fault on windows.Tim Peters2003-09-071-0/+28
| | | | | | | | | | | | | | | | | file_truncate(): C doesn't define what fflush(fp) does if fp is open for update, and the preceding I/O operation on fp was input. On Windows, fflush() actually changes the current file position then. Because Windows doesn't support ftruncate() directly, this not only caused Python's file.truncate() to change the file position (contra our docs), it also caused the file not to change size. Repaired by getting the initial file position at the start, restoring it at the end, and tossing all the complicated micro-efficiency checks trying to avoid "provably unnecessary" seeks. file.truncate() can't be a frequent operation, and seeking to the current file position has got to be cheap anyway. Bugfix candidate.
* **kwds arg was missing from __init__ for Dict{Reader,Writer} classes.Skip Montanaro2003-09-062-4/+11
| | | | will backport.
* SF bug #801342: Bug (documentation or real, your choice) in random.sample.Raymond Hettinger2003-09-062-0/+14
| | | | | | | | | | | | random.sample() uses one of two algorithms depending on the ratio of the sample size to the population size. One of the algorithms accepted any iterable population argument so long as it defined __len__(). The other had a stronger requirement that the population argument be indexable. While it met the documentation specifications which insisted that the population argument be a sequence, it made random.sample() less usable with sets. So, the second algorithm was modified to coerce non-indexable iterables and dictionaries into a tuple before proceeding.
* SF bug #800796: Difference between hash() and __hash__()Raymond Hettinger2003-09-051-0/+5
| | | | slice(5).__hash__() now raises a TypeError.
* Patch #798145: Return correct information from nl_langinfo(RADIXCHAR).Martin v. Löwis2003-09-041-0/+34
| | | | Will backport to 2.3.
* Catch locale.error as well. Fixes #788378. Will backport to 2.3.Martin v. Löwis2003-09-031-1/+1
|
* test_get_param_with_semis_in_quotes(): Test case for SF bug #794466.Barry Warsaw2003-09-031-0/+7
| | | | Backport candidate.
* A fix for parsing parameters when there are semicolons inside theBarry Warsaw2003-09-031-1/+18
| | | | | | | | | | | quotes. Fixes SF bug #794466, with the essential patch provided by Stuart D. Gathman. Specifically, _parseparam(), _get_params_preserve(): Use the parsing function that takes quotes into account, as given (essentially) in the bug report's test program. Backport candidate.
* use the long names for re compilation options; this makes it easier toFred Drake2003-09-021-1/+1
| | | | figure out what the code is doing
* Modernize code a bit: use isinstance instead of type(); return True/FalseAndrew M. Kuchling2003-09-021-4/+7
|
* [Patch #759208] Fix has_key emulation to not raise KeyErrorAndrew M. Kuchling2003-09-021-1/+3
|
* Only apply case-insensitivity test on appropriate platforms.' test_filecmp.pyRaymond Hettinger2003-09-021-2/+6
|
* SF bug #453515: filecmp.dircmp case sensitivity bugRaymond Hettinger2003-09-022-8/+12
|
* SF 798269: bug fix for doctest (sf bug id: 798254Raymond Hettinger2003-09-021-2/+3
| | | | | | | | | | | (Contributed by Alexander Belopolsky.) Doctest would crash when encountering unbound methods: class A: def f(self): pass class C(A): g = A.f
* SF patch #736962: Port tests to unittest (Part 2)Raymond Hettinger2003-09-021-12/+90
| | | | | | | (Contributed by Walter Dörwald.) * Convert test_slice.py to unittest format * Expand the test coverage.
* SF patch #790443: add SafeConfigParser to __all__Raymond Hettinger2003-09-011-1/+1
| | | | (Contributed by George Yoshida.)
* SF bug #785222: zlib monotonic testRaymond Hettinger2003-08-311-11/+0
| | | | | | For smaller datasets, it is not always true the increasing the compression level always results in better compression. Removed the test which made this invalid assumption.
* SF patch #736962: Port tests to unittestRaymond Hettinger2003-08-305-33/+145
| | | | | | | | (Contributed by Walter Dörwald). * Convert three test modules to unittest format. * Expanded coverage in test_structseq.py. * Raymond added a new test in test_sets.py
* SF bug 797650: Infinite loop in textwrap.pyRaymond Hettinger2003-08-302-1/+11
| | | | | | When the indents were set to longer than the width and long word breaking was enabled, an infinite loop would result because the inner loop did not assure that at least one character was stripped off on every pass.
* Eliminate unnecessary eval() in testsRaymond Hettinger2003-08-301-19/+18
|
* SF bug #793826: using itertools.izip to mutate tuplesRaymond Hettinger2003-08-291-1/+32
| | | | Avoid Armin Rigo's dastardly exercise in re-entrancy.
* Rework previous fix slightly; the &0x20 test seems useless, and the ↵Andrew M. Kuchling2003-08-291-4/+2
| | | | isprint() check mustn't prevent the meta-bit check at the end
* Add tests for meta- bit setAndrew M. Kuchling2003-08-291-1/+4
|
* [Bug #790356] unctrl() doesn't work for full printable charset. Fix by Dave ↵Andrew M. Kuchling2003-08-291-0/+2
| | | | Cinege.
* Add simple unit test for ascii.unctrl() functionAndrew M. Kuchling2003-08-291-0/+13
|
* [Bug #776542] open_https() generates a bad Authorization header because it ↵Andrew M. Kuchling2003-08-291-1/+1
| | | | calls .putheader() wrongly. Reported by Steffen Ries.
* Make sure parentheses are escaped when used in the format string.Brett Cannon2003-08-292-1/+10
| | | | Closes bug #796149 . Will be backported.
* Support DBEnv.set_shm_key() to allow multi-threaded multi-processGregory P. Smith2003-08-281-0/+2
| | | | database environments to use shared memory on systems supporting it.
* Fix SF bug [ 788011 ] compiler.compileFile fails on csv.pyJeremy Hylton2003-08-281-1/+6
| | | | Bug fix candidate.
* Fix typo in docstring: The switch is '-x', not '-s'.Thomas Heller2003-08-271-1/+1
| | | | Will backport to 2.3 myself.
* Remove a typo. (Or is this some markup I don't understand? ;-)Thomas Heller2003-08-271-1/+1
|
* SF bug #795506: Wrong handling of string format code for float values.Raymond Hettinger2003-08-271-0/+1
| | | | | | Adding missing support for '%F'. Will backport to 2.3.1.
* test_largefile can leave its temp file open if one of many tests fail. OnJason Tishler2003-08-261-73/+81
| | | | | | | | | | | | | | | | | | | | platforms (e.g., Cygwin) that are "particular" about open files, this will cause other regression tests that use the same temp file to fail: $ ./python.exe -E -tt Lib/test/regrtest.py -l test_largefile test_mmap test_mutants test_largefile test test_largefile failed -- got -1794967295L, but expected 2500000001L test_mmap test test_mmap crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test' test_mutants test test_mutants crashed -- exceptions.IOError: [Errno 13] Permission denied: '@test' This patch solves the problem by adding missing "try/finally" blocks. Note that the "large" size of this patch is due to many white space changes -- otherwise, the patch is small. I tested this patch under Red Hat Linux 8.0 too.
* Bump the version number for the standalone mimelib package.Barry Warsaw2003-08-191-1/+1
|
* test_rfc2231_no_language_or_charset_in_filename(),Barry Warsaw2003-08-191-0/+37
| | | | | | | | | test_rfc2231_no_language_or_charset_in_boundary(), test_rfc2231_no_language_or_charset_in_charset(): New tests for proper decoding of some RFC 2231 headers. Backport candidate (as was the Utils.py 1.25 change) to both Python 2.3.1 and 2.2.4 -- will do momentarily.
* get_param(): Update the docstring to explain how CHARSET and LANGUAGEBarry Warsaw2003-08-191-7/+12
| | | | | | | | | | can be None, and what to do in that situation. get_filename(), get_boundary(), get_content_charset(): Make sure these handle RFC 2231 headers without a CHARSET field. Backport candidate (as was the Utils.py 1.25 change) to both Python 2.3.1 and 2.2.4 -- will do momentarily.
* decode_rfc2231(): We need to urllib.unquote() the value even if theBarry Warsaw2003-08-191-1/+1
| | | | | | charset and language fields are not present, e.g. as in: title*0="This%20is%20encoded"