[issue2519] Typing 'modules' in the interactive help system fails when imports fail
New submission from Dennis Kaarsemaker [EMAIL PROTECTED]: If a certain module cannot be imported, this error is not caught and warned about by pydoc, but will cause 'modules' to fail. This could be considered a bug in the module but it would still be nice if 3rd party modules cannot break pydoc. Example: [EMAIL PROTECTED]:~$ python Python 2.5.2 (r252:60911, Mar 12 2008, 13:36:25) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu4)] on linux2 Type help, copyright, credits or license for more information. help() Welcome to Python 2.5! This is the online help utility. [... snip ...] help modules Please wait a moment while I gather a list of all available modules... Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python2.5/site.py, line 342, in __call__ return pydoc.help(*args, **kwds) File /usr/lib/python2.5/pydoc.py, line 1649, in __call__ self.interact() File /usr/lib/python2.5/pydoc.py, line 1667, in interact self.help(request) File /usr/lib/python2.5/pydoc.py, line 1683, in help elif request == 'modules': self.listmodules() File /usr/lib/python2.5/pydoc.py, line 1804, in listmodules ModuleScanner().run(callback) File /usr/lib/python2.5/pydoc.py, line 1855, in run for importer, modname, ispkg in pkgutil.walk_packages(): File /usr/lib/python2.5/pkgutil.py, line 125, in walk_packages for item in walk_packages(path, name+'.', onerror): [... snip -- the actual error isn't important ...] OperationalError: no such table: falcon_configurationkey I think it would be relatively easy to work around such bugs in 3rd party modules by passing a callable to walk_packages that will give a warning when an import fails instead of breaking. -- components: Library (Lib) messages: 64778 nosy: dennis severity: normal status: open title: Typing 'modules' in the interactive help system fails when imports fail __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2519 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2519] Typing 'modules' in the interactive help system fails when imports fail
Changes by Dennis Kaarsemaker [EMAIL PROTECTED]: -- versions: +Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2519 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Christoph Burgmer [EMAIL PROTECTED] added the comment: To be more precise: I see no way to convert the encapsulated non-ASCII data from the string in an easy way. Taking e from my last post none of the following will work: str(e) # UnicodeDecodeError e.__str__() # UnicodeDecodeError e.__unicode__() # AttributeError unicode(e) # UnicodeDecodeError unicode(e, 'utf8') # TypeError My solution around this right now is raising an exception with an already converted string (see the link I provided). But as the tutorials speak of simply print e I guess the behaviour described above is some kind of a bug. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1631171] implement warnings module in C
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. -- priority: normal - high _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1631171 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Peter Poeml [EMAIL PROTECTED]: -- nosy: +poeml _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2513] 64bit cross compilation on windows
Changes by Christian Heimes [EMAIL PROTECTED]: -- nosy: +tiran __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2513 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Benjamin Peterson [EMAIL PROTECTED] added the comment: Use: print unicode(e.message).encode(utf-8) __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Christoph Burgmer [EMAIL PROTECTED] added the comment: Thanks, this does work. But, where can I find the piece of information you just gave to me in the docs? I couldn't find any interface definition for Exceptions. Further more will this be regarded as a bug? From [1] I understand that unicode(e) and unicode(e, 'utf8') are supposed to work. No limitations are made on the type of the object. And I suppose that unicode() is the exact equivalent of str() in that it copes with unicode strings. Not expecting the string representation of an Exception to return a Unicode string when its content is non-ASCII where as this kind of behaviour of simple string conversion is wished for with ASCII text seems unlikely cumbersome. Please reopen if my report does have a point. [1] http://docs.python.org/lib/built-in-funcs.html __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2520] macerrors.py cannot be imported due to non-ascii characters in comments
New submission from John Buckley [EMAIL PROTECTED]: Cannot import macerrors due to non-ascii characters appearing in comments. Patch attached. -- components: Library (Lib), Macintosh files: macerrors.patch keywords: patch messages: 64783 nosy: thecube severity: normal status: open title: macerrors.py cannot be imported due to non-ascii characters in comments type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file9911/macerrors.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2520 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2521] ABC caches should use weak refs
New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]: The following function seems to 8 references each time it is run: import io, gc def f(): class C: pass c=C() assert isinstance(c, io.StringIO) is False gc.collect();gc.collect();gc.collect() This is because io.StringIO._abc_negative_cache contains a strong reference to each class C, as soon as isinstance() is called. These are never released. Python3.0 does use WeakSet for these caches, and does not leak. This is the (deep) reason why test_io.IOTest.test_destructor() leaks in the following report: http://mail.python.org/pipermail/python-checkins/2008-March/067918.html (The test derives from io.FileIO, and it is the call to the base class' method which calls isinstance() and put the class in the cache) -- components: Interpreter Core keywords: 26backport messages: 64784 nosy: amaury.forgeotdarc severity: normal status: open title: ABC caches should use weak refs versions: Python 2.6 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2521 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2016] Crash when modifying the **kwargs passed to a function.
Alexander Belopolsky [EMAIL PROTECTED] added the comment: I am attaching my fix along the lines of a solution suggested by Amaury at http://mail.python.org/pipermail/python-dev/2008- February/076747.html: Or is the proper fix to incref the values going into the kw array and decref them upon exit? Yet Another Kind Of Tuple... However this seems the correct thing to do. I did not do any performance tests with this patch. -- keywords: +patch Added file: http://bugs.python.org/file9912/issue2016.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2016 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Note the interpreter cannot print the exception either: raise Exception(u'Error when printing ü') Traceback (most recent call last): File stdin, line 1, in module Exception -- nosy: +amaury.forgeotdarc __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2522] locale.format() problems with decimal separator
New submission from Andrii V. Mishkovskyi [EMAIL PROTECTED]: locale.format() doesn't insert correct decimal separator to string representation when 'format' argument has '\r' or '\n' symbols in it. This bug has been reproduced on Python 2.5.2 and svn-trunk. Python 2.4.5 (#2, Mar 12 2008, 14:42:24) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu4)] on linux2 Type help, copyright, credits or license for more information. import locale locale.setlocale(locale.LC_ALL, ru_RU.UTF-8) 'ru_RU.UTF-8' a = 1.234 print locale.format(%f, a) 1,234000 print locale.format(%f\n, a) 1,234000 print locale.format(%f\r, a) 1,234000 Python 2.6a1+ (trunk:62083, Mar 31 2008, 19:24:56) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu6)] on linux2 Type help, copyright, credits or license for more information. import locale locale.setlocale(locale.LC_ALL, ru_RU.UTF-8) 'ru_RU.UTF-8' a = 1.234 print locale.format(%f, a) 1,234000 print locale.format(%f\n, a) 1.234000 print locale.format(%f\r, a) 1.234000 Python 2.5.2 (r252:60911, Mar 12 2008, 13:36:25) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu4)] on linux2 Type help, copyright, credits or license for more information. import locale locale.setlocale(locale.LC_ALL, ru_RU.UTF-8) 'ru_RU.UTF-8' a = 1.234 print locale.format(%f, a) 1,234000 print locale.format(%f\n, a) 1.234000 print locale.format(%f\r, a) 1.234000 -- messages: 64787 nosy: mishok13 severity: normal status: open title: locale.format() problems with decimal separator type: behavior versions: Python 2.5, Python 2.6 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2522 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2152] make sqlite.Row hashable correctly
Thomas Heller [EMAIL PROTECTED] added the comment: Here's a patch against trunk that implements tp_richcompare. It does apply to and work also in the py3k branch. I have only implemented the '__eq__' and '__ne__' comparisons. Added file: http://bugs.python.org/file9913/sqliterow-richcmp.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2152 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2513] 64bit cross compilation on windows
Changes by Thomas Heller [EMAIL PROTECTED]: -- nosy: +theller __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2513 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2523] binary buffered reading is quadratic
New submission from Antoine Pitrou [EMAIL PROTECTED]: In py3k, buffered binary IO can be quadratic when e.g. reading a whole file. This is a small test on 50KB, 100KB and 200KB files: - py3k with buffering: ./python -m timeit -s f = open('50KB', 'rb') f.seek(0); f.read() 1000 loops, best of 3: 286 usec per loop ./python -m timeit -s f = open('100KB', 'rb') f.seek(0); f.read() 1000 loops, best of 3: 1.07 msec per loop ./python -m timeit -s f = open('200KB', 'rb') f.seek(0); f.read() 100 loops, best of 3: 4.85 msec per loop - py3k without buffering (just the raw FileIO layer): ./python -m timeit -s f = open('50KB', 'rb', buffering=0) f.seek(0); f.read() 1 loops, best of 3: 46 usec per loop ./python -m timeit -s f = open('100KB', 'rb', buffering=0) f.seek(0); f.read() 1 loops, best of 3: 88.7 usec per loop ./python -m timeit -s f = open('200KB', 'rb', buffering=0) f.seek(0); f.read() 1 loops, best of 3: 156 usec per loop - for comparison, Python 2.5: python -m timeit -s f = open('50KB', 'rb') f.seek(0); f.read() 1 loops, best of 3: 34.4 usec per loop python -m timeit -s f = open('100KB', 'rb') f.seek(0); f.read() 1 loops, best of 3: 62.3 usec per loop python -m timeit -s f = open('200KB', 'rb') f.seek(0); f.read() 1 loops, best of 3: 119 usec per loop I'm posting this issue as a reminder, but perhaps someone is already working on this, or the goal is to translate it to C ultimately? -- components: Library (Lib) messages: 64788 nosy: pitrou severity: normal status: open title: binary buffered reading is quadratic type: performance versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2523 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2513] 64bit cross compilation on windows
Thomas Heller [EMAIL PROTECTED] added the comment: I had to make additional changes to PCBuild\pcbuild.sln to create a 64-bit wininst-9.0-amd64.exe (but I was not able to try out if it works or not). Added file: http://bugs.python.org/file9914/pcbuild.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2513 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2524] IDLE 3.0
Changes by Kurt B. Kaiser [EMAIL PROTECTED]: -- components: IDLE nosy: kbk severity: normal status: open title: IDLE 3.0 versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2524 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2524] IDLE 3.0
New submission from Kurt B. Kaiser [EMAIL PROTECTED]: oops -- assignee: - kbk components: +None -IDLE priority: - low resolution: - invalid status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2524 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2515] Segfault while operating on closed sqlite3 cursor.
Ralf Schmitt [EMAIL PROTECTED] added the comment: this works with python 2.6. for python 2.5.1 I get the following gdb backtrace: (gdb) bt #0 0x2b0d95118e2d in cursor_iternext (self=0x2b0d93bae870) at /root/src/Python-2.5.1/Modules/_sqlite/cursor.c:854 #1 0x2b0d93dd1769 in wrap_next (self=0x2b0d94085b50, args=0x2b0d93b5f468, wrapped=0x2b0d95118d90) at Objects/typeobject.c:3897 #2 0x2b0d93d7e0e3 in PyObject_Call (func=0x2b0d94085b50, arg=0x2b0d93b5f468, kw=0x2b0d95118d90) at Objects/abstract.c:1860 #3 0x2b0d93df9549 in PyEval_EvalFrameEx (f=0x664430, throwflag=value optimized out) at Python/ceval.c:3775 #4 0x2b0d93dfe308 in PyEval_EvalCodeEx (co=0x2b0d93ba8300, globals=value optimized out, locals=value optimized out, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2831 #5 0x2b0d93dfe422 in PyEval_EvalCode (co=0x2b0d94085b50, globals=0x2b0d93b5f468, locals=0x2b0d95118d90) at Python/ceval.c:494 #6 0x2b0d93e20f01 in PyRun_FileExFlags (fp=0x601010, filename=0x7fff16f87a77 sqlite_segfault.py, start=value optimized out, globals=0x6246d0, locals=0x6246d0, closeit=1, flags=0x7fff16f86600) at Python/pythonrun.c:1271 #7 0x2b0d93e2119b in PyRun_SimpleFileExFlags (fp=0x601010, filename=0x7fff16f87a77 sqlite_segfault.py, closeit=1, flags=0x7fff16f86600) at Python/pythonrun.c:877 #8 0x2b0d93e29f2a in Py_Main (argc=value optimized out, argv=value optimized out) at Modules/main.c:523 -- nosy: +schmir __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2515 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue815646] thread unsafe file objects cause crash
Changes by Jeffrey Yasskin [EMAIL PROTECTED]: -- nosy: +jyasskin Tracker [EMAIL PROTECTED] http://bugs.python.org/issue815646 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Benjamin Peterson [EMAIL PROTECTED] added the comment: I am going to reopen this issue for Py3k. The recommended encoding for Python source files in 2.x is ASCII; I wouldn't say correctly dealing with non-ASCII exceptions is fully supported. In 3.x, however, the recommended encoding is UTF-8, so this should work. In Py3k, str(e) # str is unicode in Py3k does work correctly, and that'll have to be used because the message attribute is gone is 3.x. However, the problem Amaury pointed out is not fixed. Exceptions that cannot encoding into ASCII are silently not printed. I think a warning should at least be printed. -- priority: - normal resolution: invalid - status: closed - open versions: +Python 3.0 -Python 2.4, Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Christoph Burgmer [EMAIL PROTECTED] added the comment: Though I welcome the reopening of the bug for Python 3.0 I must say that plans of not fixing a core element rather surprises me. I never believed Python to be a programming language with good Unicode integration. Several points were missing that would've been nice or even essential to have for good development with Unicode, most ignored for the sake of maintaining backward compatibility. This though is not the fault of the Unicode class itself and supporting packages. Some modules like the one for CSV are lacking full Unicode support. But nevertheless the basic Python would always give you the possibility to use Unicode in (at least) a consistent way. For me raising exceptions does count as basic support like this. So I still hope to see this solved for the 2.x versions which I read will be maintained even after the release of 3.0. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Benjamin Peterson [EMAIL PROTECTED] added the comment: I never believed Python to be a programming language with good Unicode integration. Several points were missing that would've been nice or even essential to have for good development with Unicode, most ignored for the sake of maintaining backward compatibility. This though is not the fault of the Unicode class itself and supporting packages. Many (including myself) agree with you. That's pretty much the whole point of Py3k. We want to fix the Python warts which can only be fixed by breaking backwards compatibility. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2152] make sqlite.Row hashable correctly
Gerhard Häring [EMAIL PROTECTED] added the comment: Thanks a lot! I will review and apply this after the next releases. Don't want to rush things in now that the next alphas are so close. Btw. I don't find forward-porting to py3k particularly easy. The diffs between the 2.6 version and th 3.0 version in the sqlite3 module are quite large. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2152 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Even in 2.5, __str__ is allowed to return a Unicode object; we could change BaseException_str this way: Index: exceptions.c === --- exceptions.c(revision 61957) +++ exceptions.c(working copy) @@ -108,6 +104,11 @@ break; case 1: out = PyObject_Str(PyTuple_GET_ITEM(self-args, 0)); +if (out == NULL PyErr_ExceptionMatches(PyExc_UnicodeEncodeError)) +{ +PyErr_Clear(); +out = PyObject_Unicode(PyTuple_GET_ITEM(self-args, 0)); +} break; default: out = PyObject_Str(self-args); Then str(e) still raises UnicodeEncodeError, but unicode(e) returns the original message. But I would like the opinion of an experimented core developer... __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2517] Error when printing an exception containing a Unicode string
Benjamin Peterson [EMAIL PROTECTED] added the comment: After thinking some more, I'm going to add 2.6 to this. I'm attaching a patch for the trunk (it can be merged in Py3k, and maybe 2.5) which displays a UnicodeWarning when an Exception cannot be displayed due to encoding issues. Georg, can you review Amaury's and my patches? Also, would mine be a candidate for 2.5 backporting? -- assignee: - georg.brandl keywords: +patch nosy: +georg.brandl versions: +Python 2.5, Python 2.6 Added file: http://bugs.python.org/file9915/unicode_exception_warning.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2517 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2519] Typing 'modules' in the interactive help system fails when imports fail
Benjamin Peterson [EMAIL PROTECTED] added the comment: Would you like to work on a patch? -- nosy: +benjamin.peterson __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2519 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2519] Typing 'modules' in the interactive help system fails when imports fail
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- type: - feature request __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2519 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date
New submission from Guido van Rossum [EMAIL PROTECTED]: The USTimeZone example class hasn't been updated for the new US DST rules that went into effect in 2007. For a description of the new rules, see: http://wwp.greenwichmeantime.com/daylight-saving-time/usa/dst-2007.htm -- assignee: georg.brandl components: Documentation keywords: easy messages: 64800 nosy: georg.brandl, gvanrossum priority: high severity: normal status: open title: class USTimeZone in Doc/includes/tzinfo-examples.py is out of date versions: Python 2.6, Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2525 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1631171] implement warnings module in C
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 XDECREF, not DECREF (or similar). +PyObject *warnings_module = PyImport_ImportModule(warnings); +if (!warnings_module) +PyErr_Clear(); +Py_DECREF(warnings_module); Python/_warnings.c: * Remove // XXX(nnorwitz): need to parse -W cmd line flags Include/pythonrun.h * init_warnings has the wrong name (not prefixed with _Py). I'm not sure it should be exported at all. test_support/frozen: did you want the captured_std{out,err} change in this patch? Changes to Makefile.pre.in other than adding _warnings.o? I think this is good enough if it's working. How about checking it in after 1) the alpha is released Wed and 2) fixing up the nits? _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1631171 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com