| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Removed the entire __name__ == '__main__' block.
|
|
|
|
| |
From SF patch #852334.
|
|
|
|
|
|
|
|
|
| |
Add API function simplefilter() that does not create or install
regular expressions to match message or module. Extend the filters
data structure to store None as an alternative to re.compile("").
Move the _test() function to test_warnings and add some code to try
and avoid disturbing the global state of the warnings module.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
x in string.whitespace => x.isspace()
type(x) in types.StringTypes => isinstance(x, basestring)
isinstance(x, types.StringTypes) => isinstance(x, basestring)
type(x) is types.StringType => isinstance(x, str)
type(x) == types.StringType => isinstance(x, str)
string.split(x, ...) => x.split(...)
string.join(x, y) => y.join(x)
string.zfill(x, ...) => x.zfill(...)
string.count(x, ...) => x.count(...)
hasattr(types, "UnicodeType") => try: unicode except NameError:
type(x) != types.TupleTuple => not isinstance(x, tuple)
isinstance(x, types.TupleType) => isinstance(x, tuple)
type(x) is types.IntType => isinstance(x, int)
Do not mention the string module in the rlcompleter docstring.
This partially applies SF patch http://www.python.org/sf/562373
(with basestring instead of string). (It excludes the changes to
unittest.py and does not change the os.stat stuff.)
|
| |
|
|
|
|
|
| |
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
|
| |
|
| |
|
|
|
|
|
|
|
| |
actually does. Note that the description in the Library Reference
manual is already accurate.
Bugfix candidate.
|
|
|
|
|
|
| |
This patch makes it possible to pass Warning instances as the first
argument to warnings.warn. In this case the category argument
will be ignored. The message text used will be str(warninginstance).
|
|
|
|
|
| |
substitute "<string>" for the module name in that case. This actually
occurred when running test_descr.py with -Dwarn.
|
|
|
|
|
|
|
|
| |
python -Wdefault
or
python -Wdefault::OverflowWarning
|
|
|
|
| |
giving it a slight facelift
|
|
|
|
| |
moved).
|
|
|
|
|
|
|
|
|
| |
warn_explicit(message, category, filename, lineno, module, registry)
The regular warn() call calculates a bunch of values and calls
warn_explicit() with these.
This will be used to issue better syntax warnings.
|
| |
|
|
|
|
|
|
|
| |
appends to list of filters instead of inserting at the front. This
is useful to add a filter with a lower priority than -W options.
- Cosmetic improvements to a docstring and an error message.
|
|
|
|
| |
exceptions but always print a warning message.
|
|
|