There's one major and one minor category still unfixed:
doctests are the major category (and I hope to be able to augment the
refactoring tool to refactor bona fide doctests soon);
other code generating print statements in strings is the minor category.
(Oh, and I don't know if the compiler package works.)
cPickle cannot be imported. This was necessary because my last mass
checkin broke cPickle and I don't feel like debugging it right now;
but it seems a good idea in general not to require cPickle when
pickle.py is also there. A few unrelated fixes for issues while
debigging various test failures.
setup.py: disable building of cPickle until I've fixed it
Objects/...
genobject.c: disallow raising string exceptions
Lib/...
Cookie.py: fix doctest not to fail if cPickle is missing
ctypes/macholib/dyld.py: fix relative imports
sqlite3/__init__.py: fix relative import
xml/dom/__init__.py: fix relative import
Lib/test/...
regrtest.py: reduce list of skipped items on darwin
test_generators.py: don't test string exceptions; test throw() errors
test_traceback.py: don't test string exceptions
pickletester.py: don't fail if cPickle is missing
test_datetime.py: don't fail if cPickle is missing
test_descr.py: don't fail if cPickle is missing (still some other failures)
test_exceptions.py: don't fail if cPickle is missing
test_re.py: don't fail if cPickle is missing
test_array.py: use pickle, not cPickle
test_bool.py: don't fail if cPickle is missing
test_deque.py: use pickle, not cPickle
test_logging.py: use pickle, not cPickle
and test_support.run_classtests() into run_unittest()
and use it wherever possible.
Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.
From SF patch #662807.
This problem is related to a wrong behavior from mark_save/restore(),
which don't restore the mark_stack_base before restoring the marks.
Greg's suggestion was to change the asserts, which happen to be
the only recursive ops that can continue the loop, but the problem would
happen to any operation with the same behavior. So, rather than
hardcoding this into asserts, I have changed mark_save/restore() to
always restore the stackbase before restoring the marks.
Both solutions should fix these two cases, presented by Greg:
>>> re.match('(a)(?:(?=(b)*)c)*', 'abb').groups()
('b', None)
>>> re.match('(a)((?!(b)*))*', 'abb').groups()
('b', None, None)
The rest of the bug and patch in #725149 must be discussed further.
within repeats of alternatives. The only change to the original
patch was to convert the tests to the new test_re.py file.
This patch fixes cases like:
>>> re.match('((a)|b)*', 'abc').groups()
('b', '')
Which is wrong (it's impossible to match the empty string),
and incompatible with other regex systems, like the following
examples show:
% perl -e '"abc" =~ /^((a)|b)*/; print "$1 $2\n";'
b a
% echo "abc" | sed -r -e "s/^((a)|b)*/\1 \2|/"
b a|c
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.
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".
This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).
Now Tim and Jack can have at it. :)
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.