| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
WarningsRecorder object. This makes the API simpler to use as no special object
must be learned.
Closes issue 3781.
Review by Benjamin Peterson.
|
|
|
|
|
|
|
|
|
|
| |
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
mechanism. In the process, fix a bug where isinstance() and issubclass(),
when given a tuple of classes as second argument, were looking up
__instancecheck__ / __subclasscheck__ on the tuple rather than on each
type object.
Reviewed by Benjamin Peterson and Raymond Hettinger.
|
| |
|
|
|
|
| |
make sure that PyErr_ExceptionMatches returns 0 when an exception occurs there.
|
|
|
|
| |
bypassing the instance dictionary when looking up __unicode__ on new-style classes
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
test.test_support.catch_warning is more full-featured and provides the same
functionality.
Since guard_warnings_filter was added in 2.6 there is no
backwards-compatibility issues.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
not the posix error code; with test.
Fixes #1576174.
Will backport to release25-maint.
|
|
|
|
| |
number of arguments, as was the case in Python 2.4.
|
|
|
|
|
|
|
| |
on exception classes. Would require introducing a tp_unicode slot to make it
work otherwise.
Fixes bug #1551432 and will be backported.
|
|
|
|
|
| |
Also make sure that every exception class has __module__ set to
'exceptions'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem of checking too eagerly for recursive calls is the
following: if a RuntimeError is caused by recursion, and if code needs
to normalize it immediately (as in the 2nd test), then
PyErr_NormalizeException() needs a call to the RuntimeError class to
instantiate it, and this hits the recursion limit again... causing
PyErr_NormalizeException() to never finish.
Moved this particular recursion check to slot_tp_call(), which is not
involved in instantiating built-in exceptions.
Backport candidate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from ?iga Seilnacht (sorry about the name, but Firefox
on my box can't display the first character of the name --
the SF "Unix name" is zseil).
This appears to cure the oddball intermittent leaks across
runs when running test_exceptions under -R. I'm not sure
why, but I'm too sleepy to care ;-)
The thrust of the SF patch was to remove randomness in the
pickle protocol used. I changed the patch to use
range(pickle.HIGHEST_PROTOCOL + 1), to try both pickle and
cPickle, and randomly mucked with other test lines to put
statements on their own lines.
Not a bugfix candidate (this is fiddling new-in-2.5 code).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
subclasses of Exception can be supplied keyword args
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
added message attribute compared to the previous version of Exception. It is
also a new-style class, making all exceptions now new-style. KeyboardInterrupt
and SystemExit inherit from BaseException directly. String exceptions now
raise DeprecationWarning.
Applies patch 1104669, and closes bugs 1012952 and 518846.
|
|
|
|
|
|
|
| |
happen in 2.3, but nobody noticed it still was getting generated (the
warning was disabled by default). OverflowWarning and
PyExc_OverflowWarning should be removed for 2.5, and left notes all over
saying so.
|
|
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
order in which the tests are normally run.
|
|
|
|
|
|
|
|
|
| |
1. Acknowledge the welknown difference that jython
allows continue in the finally clause.
2. Avoid using _testcapi when running with jython.
This closes patch "[ #490417 ] Jython and test_exceptions"
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add raise_exception() to the _testcapi module. It isn't a test, but
the C API exists only to support test_exceptions. raise_exception()
takes two arguments -- an exception class and an integer specifying
how many arguments it should be called with.
test_exceptions uses BadException() to test the interpreter's behavior
when there is a problem instantiating the exception. test_capi1()
calls it with too many arguments. test_capi2() causes an exception to
be raised in the Python code of the constructor.
|
|
|
|
| |
OverflowError test succeed.
|
|
|
|
| |
just like reload(sys). Test that this is so. Closes SF bug #422004.
|
|
|
|
| |
SF patch 102989 by Thomas Wouters
|
| |
|
|
|
|
| |
various illegal uses of "continue".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python test suite. Specifically,
- import time instead of strop in test_b1
- test for ClassType of exceptions using isinstance instead of
equality in test_exceptions
- remove __builtins__ from dir() output in test_pkg
test_pkg output needs to be regenerated.
|
|
|
|
|
|
|
| |
used for indentation related errors. This patch includes Ping's
improvements for indentation-related error messages.
Closes SourceForge patches #100734 and #100856.
|
|
|
|
| |
raised, caught, and converted to a string.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|