New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildbot: DeprecationWarning not raised for icglue (test_py3kwarn.TestStdlibRemovals) #52693
Comments
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 ====================================================================== 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 |
Mac/Modules/icgluemodule.c has a call to PyErr_WarnPy3k if (PyErr_WarnPy3k("In 3.x, the icglue module is removed.", 1)) 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. |
Maybe this is due to webbrowser dependency on "ic" module. Patch not tested. |
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? |
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). |
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. |
This should be fixed with r82149. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: