This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, nnorwitz
Date 2007-10-09.19:53:17
SpamBayes Score 0.005879959
Marked as misclassified No
Message-id <>
I figured out why the tests are all failing; the C code does not call
back into the Python 'warnings' wrapper.

For instance, warn_explicit in the C code does not ever try to use a
user-provided showwarning() function.  This causes the tests to fail as
they rely on this functionality.

There is also the issue of the filters and once_registry also only be
referenced in the C code and not in the Python code.  So while the list
and dict, respectively, are assigned in from _warnings.c,
the C code never checks to see if the attributes in the Python code were
changed.  This is an issue as a lot of times code does::

  warnings.filter = []
  ... code ...
  warnings.filter = original_filter

That will not work with how it is implemented now as the C code only
works off of the object it created and never one that a user may have

Could a descriptor be written so that when the Python code has the
filter, once_registry, or showwarnings set it actually gets set in the C
code?  That way the C code can continue to be fully independent of the
Python code and not have to import it unless a specific change was
attempted upon 'warnings'?
Date User Action Args
2007-10-09 19:53:18brett.cannonsetspambayes_score: 0.00587996 -> 0.005879959
recipients: + brett.cannon, nnorwitz
2007-10-09 19:53:18brett.cannonsetspambayes_score: 0.00587996 -> 0.00587996
messageid: <>
2007-10-09 19:53:18brett.cannonlinkissue1631171 messages
2007-10-09 19:53:17brett.cannoncreate