A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-July/067198.html below:

[Python-Dev] Add new PyErr_WarnEx() to 2.5?

[Python-Dev] Add new PyErr_WarnEx() to 2.5? [Python-Dev] Add new PyErr_WarnEx() to 2.5?Tim Peters tim.peters at gmail.com
Mon Jul 10 20:23:11 CEST 2006
As noted in

   http://mail.python.org/pipermail/python-dev/2006-May/065478.html

it looks like we need a new Python C API function to make new warnings
from the struct module non-useless.  For example, runnning
test_zipfile on Windows now yields

"""
test_zipfile
C:\Code\python\lib\struct.py:63: DeprecationWarning: struct integer
overflow masking is deprecated
  return o.pack(*args)
"""

This is useless because the message points _into_ struct.py, not to
the code calling struct.pack().  Consequently I have no idea where the
offending pack() call is, and neither do you ;-)

The current PyErr_Warn() doesn't allow for passing a non-zero
`stacklevel` argument to warnings.warn(), so there's little the C code
in _struct.c can do to make the warning more useful.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4