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.
* Relaxed the argument restrictions for non-operator methods. They now
allow any iterable instead of requiring a set. This makes the module
a little easier to use and paves the way for an efficient C
implementation which can take better advantage of iterable arguments
while screening out immutables.
* Deprecated Set.update() because it now duplicates Set.union_update()
* Adapted the tests and docs to include the above changes.
* Added more test coverage including testing identities and checking
to make sure non-restartable generators work as arguments.
Will backport to Py2.3.1 so that the interface remains consistent
across versions. The deprecation of update() will be changed to
a FutureWarning.
[ 784825 ] fix obscure crash in descriptor handling
Should be applied to release23-maint and in all likelyhood
release22-maint, too.
Certainly doesn't apply to release21-maint.
The default seed is time.time().
Multiplied by 256 before truncating so that fractional seconds are used.
This way, two successive calls to random.seed() are much more likely
to produce different sequences.
Also remove now unnecessary property attributes for thread safety
(no longer have lazy attributes) and code simplicity reasons.
Timezone storage has been reworked to be simpler and more flexible. All values
in LocaleTime instances are lower-cased. This is all done to simplify the
module.
The module now assumes nothing beyond the strptime function will be exposed for
general use beyond providing functionality for strptime.
caught when executing test_strptime, test_logging, and test_time in that order
when the testing of "%c" occured. Suspect the cache was not being recreated
(the test passed when test_logging was forced to re-establish the locale).
Obtain the original locale in the documented way. This way actually
works for me.
Restore the original locale at the end, instead of forcing to "C".
Move the locale fiddling into the test driver instead of doing it as a
side effect of merely importing the module. I don't know why the test
is mucking with locale (and also added a comment saying so), but it
surely has no justification for doing that as an import side-effect.
Now whenever the locale-changing code executes, the locale-restoring code
will also get run.
arbitrary bytes before the actual zip compatible archive. Zipfiles
containing comments at the end of the file are still not supported.
Add a testcase to test_zipimport, and update NEWS.
This closes sf #775637 and sf #669036.
are satisfied in a case-insensitive manner, the attempt to import (the
non-existent) fcntl gets satisfied by FCNTL.py instead, and the tempfile
module defines a Unix-specific _set_cloexec() function in that case. As
a result, temp files can't be created then (blows up with an AttributeError
trying to reference fcntl.fcntl). This just popped up in the spambayes
project, where there is no apparent workaround (which is why I'm pushing
this in now).
If this doesn't happen, it leaves the locale in a state that can cause
other tests to fail. For example, running test_strptime,
test_logging, and test_time in that order.
skip over functions with private names (as indicated by the underscore
naming convention). The old default created too much of a risk that
user tests were being skipped inadvertently. Note, this change could
break code in the unlikely case that someone had intentionally put
failing tests in the docstrings of private functions. The breakage
is easily fixable by specifying the old behavior when calling testmod()
or Tester(). The more likely case is that the silent failure was
unintended and that the user needed to be informed so the test could be
fixed.
Extensions must still be configured manually and there is currently one
set of extension key bindings for all platforms.
Bring NEWS.txt up to date.
Update CREDITS.txt and idlever.py for release.
M NEWS.txt
M config-extensions.def
M extend.txt
M help.txt
M idlever.py
* It ran fine under "python regrtest.py test_warnings" but failed under
"python regrtest.py" presumably because other tests would add to
filtered warnings and not reset them at the end of the test.
* Converted to a unittest format for better control. Renamed
monkey() and unmonkey() to setUp() and tearDown().
* Increased coverage by testing all warnings in __builtin__.
* Increased coverage by testing regex matching of specific messages.
reported consistently with the *nix world. 'Lib/test/test_warnings.py'
came out as 'lib\test\test_warnings.py'. The basename is all we care
about so I used that.