Issue 8446: buildbot: DeprecationWarning not raised for icglue (test_py3kwarn.TestStdlibRemovals) (original) (raw)

Created on 2010-04-18 22:12 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue8446_icglue_webbrowser.diff flox,2010-05-17 22:53 Patch, apply to 2.x
Messages (7)
msg103537 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-18 22:12
http://www.python.org/dev/buildbot/builders/x86 Tiger trunk/builds/15/steps/test/logs/stdio test_py3kwarn test test_py3kwarn failed -- Traceback (most recent call last): File "/Users/db3l/buildarea/trunk.bolen-tiger/build/Lib/test/test_py3kwarn.py", line 387, in test_platform_specific_removals self.check_removal(module_name, optional=True) File "/Users/db3l/buildarea/trunk.bolen-tiger/build/Lib/test/test_py3kwarn.py", line 376, in check_removal .format(module_name)) AssertionError: DeprecationWarning not raised for icglue Re-running test 'test_py3kwarn' in verbose mode test_backquote (test.test_py3kwarn.TestPy3KWarnings) ... ok test_buffer (test.test_py3kwarn.TestPy3KWarnings) ... ok test_builtin_function_or_method_comparisons (test.test_py3kwarn.TestPy3KWarnings) ... ok test_cell_inequality_comparisons (test.test_py3kwarn.TestPy3KWarnings) ... ok test_code_inequality_comparisons (test.test_py3kwarn.TestPy3KWarnings) ... ok test_dict_inequality_comparisons (test.test_py3kwarn.TestPy3KWarnings) ... ok test_file_xreadlines (test.test_py3kwarn.TestPy3KWarnings) ... ok test_forbidden_names (test.test_py3kwarn.TestPy3KWarnings) ... ok test_frame_attributes (test.test_py3kwarn.TestPy3KWarnings) ... ok test_hash_inheritance (test.test_py3kwarn.TestPy3KWarnings) ... ok test_methods_members (test.test_py3kwarn.TestPy3KWarnings) ... ok test_object_inequality_comparisons (test.test_py3kwarn.TestPy3KWarnings) ... ok test_operator (test.test_py3kwarn.TestPy3KWarnings) ... ok test_paren_arg_names (test.test_py3kwarn.TestPy3KWarnings) ... ok test_slice_methods (test.test_py3kwarn.TestPy3KWarnings) ... ok test_softspace (test.test_py3kwarn.TestPy3KWarnings) ... ok test_sort_cmp_arg (test.test_py3kwarn.TestPy3KWarnings) ... ok test_sys_exc_clear (test.test_py3kwarn.TestPy3KWarnings) ... ok test_tuple_parameter_unpacking (test.test_py3kwarn.TestPy3KWarnings) ... ok test_type_inequality_comparisons (test.test_py3kwarn.TestPy3KWarnings) ... ok test_mutablestring_removal (test.test_py3kwarn.TestStdlibRemovals) ... ok test_optional_module_removals (test.test_py3kwarn.TestStdlibRemovals) ... ok test_os_path_walk (test.test_py3kwarn.TestStdlibRemovals) ... ok test_platform_independent_removals (test.test_py3kwarn.TestStdlibRemovals) ... ok test_platform_specific_removals (test.test_py3kwarn.TestStdlibRemovals) ... FAIL test_reduce_move (test.test_py3kwarn.TestStdlibRemovals) ... ok ====================================================================== FAIL: test_platform_specific_removals (test.test_py3kwarn.TestStdlibRemovals) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/trunk.bolen-tiger/build/Lib/test/test_py3kwarn.py", line 387, in test_platform_specific_removals self.check_removal(module_name, optional=True) File "/Users/db3l/buildarea/trunk.bolen-tiger/build/Lib/test/test_py3kwarn.py", line 376, in check_removal .format(module_name)) AssertionError: DeprecationWarning not raised for icglue ----------------------------------------------------------------------
msg103546 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-18 22:46
Mac/Modules/icgluemodule.c has a call to PyErr_WarnPy3k if (PyErr_WarnPy3k("In 3.x, the icglue module is removed.", 1)) return; Other modules check if the result is smaller than 0, but PyErr_WarnPy3k() possible results are only 0 or -1, so I don't understand the error.
msg105942 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-05-17 22:53
Maybe this is due to webbrowser dependency on "ic" module. Patch not tested.
msg106340 - (view) Author: Bill Janssen (janssen) * (Python committer) Date: 2010-05-23 19:41
Not sure I understand this patch. Either the icglue module is removed in python 3, in which case it should raise the deprecation warning, or it is not, in which case it should be removed from the list of modules checked in test_py3kwarn. Shouldn't the patch also address one of these two cases?
msg106344 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-05-24 06:33
The patch somewhat works, in that it makes test_py3kwarn pass but I'd add more filterwarning calls: filterwarnings("ignore", ".*the icglue module is removed", DeprecationWarning) filterwarnings("ignore", ".*the MacOS module is removed", DeprecationWarning) filterwarnings("ignore", ".*the macostools module is removed", DeprecationWarning) This ensures that importing webbrowser won't trigger py3k warnings. It is probably safe to remove the import of 'ic' and related code the block with guard "if sys.platform == 'darwin'" just below that overrides the IC based browser detection by one that doesn't use IC (that one is added to the front of the search list, which means the IC one never gets used).
msg106765 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-05-30 15:56
The root cause of this test failure is that test_macos runs before test_py3kwarn. That causes MacOS to be imported before test_py3k runs and that results in not raising the py3k warning by the time test_py3kwarn runs. I propose removing MacOS from the list of modules that test_py3kwarn tests for now.
msg108346 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-06-22 09:19
This should be fixed with r82149.
History
Date User Action Args
2022-04-11 14:57:00 admin set github: 52693
2010-08-08 21:15:30 flox link issue7772 dependencies
2010-06-27 12:55:23 ronaldoussoren set status: open -> closedresolution: fixedstage: patch review -> resolved
2010-06-22 09:19:08 ronaldoussoren set messages: +
2010-06-05 16:23:01 mark.dickinson set nosy: + mark.dickinson
2010-05-30 15:56:17 ronaldoussoren set messages: +
2010-05-24 06:33:48 ronaldoussoren set messages: +
2010-05-23 19:41:50 janssen set nosy: + janssenmessages: +
2010-05-17 22:53:18 flox set files: + issue8446_icglue_webbrowser.diffassignee: ronaldoussorenkeywords: + patchstage: patch reviewversions: + Python 2.7, - Python 3.2nosy: + ronaldoussoren, floxmessages: + components: + macOStype: behavior
2010-04-18 22:46:38 vstinner set messages: + components: + Tests
2010-04-18 22:12:36 vstinner create