| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Py3K warnings are DeprecationWarning by default this was causing -3 to
essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not
used.
Closes issue #7700. Thanks Ezio Melotti and Florent Xicluna for patch help.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was originally suggested by Guido, discussed on the stdlib-sig mailing
list, and given the OK by Guido directly to me. What this change essentially
means is that Python has taken a policy of silencing warnings that are only
of interest to developers by default. This should prevent users from seeing
warnings which are triggered by an application being run against a new
interpreter before the app developer has a chance to update their code.
Closes issue #7319. Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin
for helping with the issue.
|
| |
|
|
|
|
|
|
| |
Was a DeprecationWarning for not supporting it since Python 2.6.
Closes issue #3652.
|
|
|
|
| |
test suite. Closes issue w.r.t. 2.6 (R: Brett Cannon)
|
|
|
|
|
|
|
|
| |
WarningsRecorder object. This makes the API simpler to use as no special object
must be learned.
Closes issue 3781.
Review by Benjamin Peterson.
|
|
|
|
|
| |
Closes issue 3776.
Review by Nick Coghlan.
|
|
|
|
|
|
|
|
|
|
|
| |
catch_warnings(), and clean up the API.
While expanding the test suite, a bug was found where a warning about the
'line' argument to showwarning() was not letting functions with '*args' go
without a warning.
Closes issue 3602.
Code review by Benjamin Peterson.
|
|
|
|
|
|
|
|
| |
bus errors or SystemError being raised. As a side effect of fixing this, a bad
DECREF that could be triggered when 'message' and 'category' were both None was
fixed.
Closes issue 3211. Thanks JP Calderone for the bug report.
|
| |
|
|
|
|
| |
implementation regarding non-callable showwarning
|
|
|
|
|
| |
showwarning API. Turns out 'inspect' uses 'operator' which is an extension
module. That's a problem when it has not been built yet by setup.py.
|
|
|
|
| |
that lacks support for the new 'line' argument.
|
|
|
|
|
|
|
|
|
| |
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.
Closes issue #1631171.
|
|
|
|
| |
Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
|
| |
|
|
|
|
|
|
|
| |
both a subclass of Warning and a subclass of types.ClassType. The latter is no
longer true thanks to new-style exceptions.
Closes bug #1510580. Thanks to AMK for the test.
|
|
|
|
| |
Occurences in email and compiler were ignored due to backwards compat requirements.
|
| |
|
|
|
|
|
| |
to work correctly with modules imported from zipfiles or via other PEP 302
__loader__ objects. Tests and doc updates are included.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
when it can't find out the module name it generates a warning for.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|