Brett Cannon [EMAIL PROTECTED] added the comment:
Committed in revision 62303.
--
resolution: - accepted
status: pending - closed
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
Brett Cannon [EMAIL PROTECTED] added the comment:
After all the threats about checking in code that break stuff, I am not
about to check this in. =)
I will get to the changes when I can and then commit after the alpha.
--
assignee: nnorwitz - brett.cannon
Brett Cannon [EMAIL PROTECTED] added the comment:
Neal's issues are addressed in this patch. I also finally filled out
warnings.h. The only thing that I didn't deal with is Neal's worry of
exposing _PyWarnings_Init(). It is not explicitly exported anywhere as
part of the API so I am not sure
Changes by Brett Cannon [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9761/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Changes by Brett Cannon [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9917/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Brett Cannon [EMAIL PROTECTED] added the comment:
Attached should have everything, including a pure Python fallback. As soon
as the next alpha is out I will apply.
--
status: open - pending
Added file: http://bugs.python.org/file9920/c_warnings.diff
Neal Norwitz [EMAIL PROTECTED] added the comment:
On Tue, Apr 1, 2008 at 6:14 AM, Brett Cannon [EMAIL PROTECTED] wrote:
Brett Cannon [EMAIL PROTECTED] added the comment:
Neal's issues are addressed in this patch. I also finally filled out
warnings.h. The only thing that I didn't deal
Brett Cannon [EMAIL PROTECTED] added the comment:
On another note, the warnings module should be made to work with or
without _warnings. that way IronPython, Jython, and PyPy won't have to re-
implement stuff. This also means that test cases need to be changed to
test this.
--
Neal Norwitz [EMAIL PROTECTED] added the comment:
I didn't realize this was waiting for me. You should have just checked
it in, that would have gotten me to review faster. :-)
pythonrun.c:
* Should PyModule_GetWarningsModule() return a valid pointer?
* The code below crashes. Need to
Changes by Brett Cannon [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9490/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Changes by Brett Cannon [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file9667/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Brett Cannon [EMAIL PROTECTED] added the comment:
Attached is what I think is a completely working version of warnings
implemented in a mixture of C and Python. I am not worrying about
documenting the new C APIs I had to add since they are pretty specific
to internal stuff. Probably should
Brett Cannon [EMAIL PROTECTED] added the comment:
Add tests for the 'line' argument to formatwarning() and showwarning().
Added file: http://bugs.python.org/file9667/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
Brett Cannon added the comment:
Patch that has been brought up-to-date with r60968. No new work, though.
Added file: http://bugs.python.org/file9490/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file7708/c-warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file7709/_warnings.c
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8495/_warnings.c
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8496/c_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8557/_warnings.c
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8565/_warnings.c
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8772/test_warnings.py
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8783/warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list
Changes by Brett Cannon:
Removed file: http://bugs.python.org/file8858/_warnings.diff
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list
Brett Cannon added the comment:
I see two ways of implementing the fetching of a source code line from
__loader__.get_source().
One is to do it in Python. We have a function provided that can
suppress the second line of output from a warning and just handle it in
Python code. That has the
Brett Cannon added the comment:
Implementing warn_explicit() is going to be troublesome with the new
module_globals argument. It requires not only to go through the hassle
of looking for a loader and calling get_source(), but it will most
likely require reworking the traceback function
Brett Cannon added the comment:
This version of test_warnings has tests for _warnings.c. It currently
is failing as the second line of output for warnings has not been
implemented yet for _warnings.c.
But all the specified tests in my last comment have now been implemented.
Added file:
Changes by Brett Cannon:
--
assignee: nnorwitz - brett.cannon
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing list
Brett Cannon added the comment:
Regression test suite now passes. =) Had to add the support for when
warnings.showwarning() is set and a bug in PyErr_WarnExplicit() where a
NULL value for the module name was not being allowed.
Couple things still left to implement. One is the second output
Neal Norwitz added the comment:
I think this is good enough for now. The approach will probably stand
even if the details change. Go for it!
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
Changes by Neal Norwitz:
--
assignee: nnorwitz - brett.cannon
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing list
Brett Cannon added the comment:
Attached is a new version of _warnings.c that checks to see if
'warnings' has been imported, and if so, uses the attributes from that
module for onceregistry and 'filters'. I did it in such a way so that
'warnings' is in no way required nor imported through
Brett Cannon added the comment:
So the descriptor idea didn't work.
Another idea is to have the C code that relies on attributes on warnings
that are allowed to change have an initial check for warnings, and if
that fails to fall back on C code. That way the module can still be
completely
Brett Cannon added the comment:
I just tried Neal's version of _warnings.c and it has the same failures,
so they are not my fault. =)
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
Brett Cannon added the comment:
I have uploaded my touched up version of _warnings.c . I also have a
new diff since the old one did not apply cleanly (test_warnings didn't
get patched nor did PCbuild8). It also lacked the changes needed to
Modules/config.c .
It is still not complete, though.
Changes by Brett Cannon:
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Brett Cannon:
--
assignee: - brett.cannon
nosy: +brett.cannon
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1631171
_
___
Python-bugs-list mailing
36 matches
Mail list logo