| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* Expanded coverage.
|
|
|
|
| |
iteritems() is defined.
|
| |
|
| |
|
|
|
|
| |
Backported to 2.3.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
module
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
will backport.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
slice(5).__hash__() now raises a TypeError.
|
|
|
|
| |
Will backport to 2.3.
|
| |
|
|
|
|
| |
Backport candidate.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
figure out what the code is doing
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(Contributed by Alexander Belopolsky.)
Doctest would crash when encountering unbound methods:
class A:
def f(self): pass
class C(A):
g = A.f
|
|
|
|
|
|
|
| |
(Contributed by Walter Dörwald.)
* Convert test_slice.py to unittest format
* Expand the test coverage.
|
|
|
|
| |
(Contributed by George Yoshida.)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Avoid Armin Rigo's dastardly exercise in re-entrancy.
|
|
|
|
| |
isprint() check mustn't prevent the meta-bit check at the end
|
| |
|
|
|
|
| |
Cinege.
|
| |
|
|
|
|
| |
calls .putheader() wrongly. Reported by Steffen Ries.
|
|
|
|
| |
Closes bug #796149 . Will be backported.
|
|
|
|
| |
database environments to use shared memory on systems supporting it.
|
|
|
|
| |
Bug fix candidate.
|
|
|
|
| |
Will backport to 2.3 myself.
|
| |
|
|
|
|
|
|
| |
Adding missing support for '%F'.
Will backport to 2.3.1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
charset and language fields are not present, e.g. as in:
title*0="This%20is%20encoded"
|