Last active
September 6, 2016 09:53
-
-
Save RonnyPfannschmidt/f85f6b9cba46e9052fe70e0bb5adbd99 to your computer and use it in GitHub Desktop.
examples to show the issues detected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class WarningsRelpathFilter(logging.Filter): | |
| """filter to modify warnings messages, to use relative paths in the project""" | |
| def filter(self, record): | |
| if record.args: | |
| new_record = record.args[0].replace(project_path.strpath, '.') | |
| record.args = (new_record,) + record.args[1:] | |
| return True | |
| def _configure_warnings(): | |
| # Capture warnings | |
| warnings.simplefilter('once') | |
| logging.captureWarnings(True) | |
| wlog = logging.getLogger('py.warnings') | |
| wlog.addFilter(WarningsRelpathFilter()) | |
| file_handler = RotatingFileHandler( | |
| str(log_path.join('py.warnings.log')), encoding='utf8') | |
| wlog.addHandler(file_handler) | |
| wlog.propagate = False | |
| _configure_warnings() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./.cfme_tests/lib/python2.7/site-packages/oslo_i18n/_message.py:21: ImportWarning: Not importing directory './.cfme_tests/lib/python2.7/site-packages/oslo_i18n/locale': missing __init__.py | |
| import locale | |
| /nix/store/89y9ampqdlwn1w0m4x9hsbwjd7r0pnsm-python-2.7.12-env/lib/python2.7/site-packages/cryptography/x509/__init__.py:32: PendingDeprecationWarning: CRLExtensionOID has been renamed to CRLEntryExtensionOID | |
| from cryptography.x509.oid import ( | |
| ./cfme/tests/configure/test_server_name.py:16: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.force_navigate()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| flash_msg = 'Configuration settings saved for CFME Server "{}' | |
| ./fixtures/browser.py:34: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 | |
| val = safe_string(call.excinfo.value.message).decode('utf-8', 'ignore') | |
| ./fixtures/browser.py:67: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.take_screenshot()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| screenshot = take_screenshot() | |
| ./.cfme_tests/lib/python2.7/site-packages/oslo_i18n/_message.py:21: ImportWarning: Not importing directory './.cfme_tests/lib/python2.7/site-packages/oslo_i18n/locale': missing __init__.py | |
| import locale | |
| ./.cfme_tests/lib/python2.7/site-packages/yaycl/__init__.py:270: ConfigInvalid: Unable to parse configuration file at ./conf/cfme_data.yaml | |
| warn('Unable to parse configuration file at {}'.format(filename), ConfigInvalid) | |
| ./.cfme_tests/lib/python2.7/site-packages/yaycl/__init__.py:214: ConfigNotFound: Unable to load configuration "./conf/cfme_data.yaml" | |
| warn(msg, ConfigNotFound) | |
| ./.cfme_tests/lib/python2.7/site-packages/oslo_i18n/_message.py:21: ImportWarning: Not importing directory './.cfme_tests/lib/python2.7/site-packages/oslo_i18n/locale': missing __init__.py | |
| import locale | |
| /nix/store/89y9ampqdlwn1w0m4x9hsbwjd7r0pnsm-python-2.7.12-env/lib/python2.7/site-packages/cryptography/x509/__init__.py:32: PendingDeprecationWarning: CRLExtensionOID has been renamed to CRLEntryExtensionOID | |
| from cryptography.x509.oid import ( | |
| ./cfme/tests/configure/test_server_name.py:16: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.force_navigate()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| flash_msg = 'Configuration settings saved for CFME Server "{}' | |
| ./cfme/fixtures/pytest_selenium.py:986: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.execute_script()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| ver = execute_script("return MiqQE_version") | |
| ./cfme/fixtures/pytest_selenium.py:983: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.force_navigate()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| force_navigate(page_name, _tries, *args, **kwargs) | |
| ./cfme/fixtures/pytest_selenium.py:1021: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.is_displayed()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| is_displayed("//div[@id='blocker_div' or @id='notification']", _no_deeper=True) | |
| ./cfme/fixtures/pytest_selenium.py:409: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| e = element(loc, **kwargs) | |
| ./cfme/fixtures/pytest_selenium.py:263: DeprecationWarning: Using function/method 'multimethods.MultiMethod()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| matches = elements(o, **kwargs) | |
| ./cfme/login.py:65: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.ajax_timeout()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| with sel.ajax_timeout(90): | |
| ./cfme/login.py:66: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_ajax()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.wait_for_ajax() # This is called almost everywhere, protects from spinner | |
| ./cfme/fixtures/pytest_selenium.py:324: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.in_flight()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| running = in_flight() | |
| ./cfme/login.py:67: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.is_displayed()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.is_displayed(dashboard.page.user_dropdown) | |
| ./cfme/web_ui/__init__.py:1490: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_ajax()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.wait_for_ajax() | |
| ./cfme/web_ui/__init__.py:1497: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.wait_for_element(loc, timeout=10) | |
| ./cfme/fixtures/pytest_selenium.py:460: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_until()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| **kwargs | |
| ./cfme/fixtures/pytest_selenium.py:407: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.move_to_element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| e = move_to_element(loc, **kwargs) | |
| ./cfme/fixtures/pytest_selenium.py:647: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_ajax()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| wait_for_ajax() | |
| ./cfme/web_ui/__init__.py:1205: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.tag()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| @multimethod(lambda loc, value: (sel.tag(loc), sel.get_attribute(loc, 'type'))) | |
| ./cfme/web_ui/__init__.py:1205: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.get_attribute()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| @multimethod(lambda loc, value: (sel.tag(loc), sel.get_attribute(loc, 'type'))) | |
| ./cfme/web_ui/__init__.py:1268: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.set_text()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| prev_state = action(loc, content) | |
| ./cfme/fixtures/pytest_selenium.py:1281: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.send_keys()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| send_keys(el, text) | |
| ./cfme/fixtures/pytest_selenium.py:809: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.tag()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| if tag(loc) == 'input': | |
| ./cfme/fixtures/pytest_selenium.py:810: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.get_attribute()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| type_attr = get_attribute(loc, 'type') | |
| ./cfme/web_ui/__init__.py:1269: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.detect_observed_field()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.detect_observed_field(loc) | |
| ./cfme/login.py:60: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.execute_script()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.execute_script('miqAjaxAuth();') | |
| ./cfme/web_ui/flash.py:119: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_ajax()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.wait_for_ajax() # Just in case | |
| ./cfme/web_ui/flash.py:87: DeprecationWarning: Using function/method 'multimethods.MultiMethod()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return map(message, [e for e in sel.elements(area.message) if sel.is_displayed(e)]) | |
| ./cfme/login.py:165: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.text()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.text(dashboard.page.user_dropdown).split('|')[0].strip() | |
| ./cfme/web_ui/menu.py:400: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.get_attribute()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| href = sel.get_attribute(el, 'href') | |
| ./cfme/web_ui/menu.py:415: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.execute_script()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.execute_script('document.location.href = arguments[0];', href) | |
| ./cfme/web_ui/menu.py:416: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_ajax()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.wait_for_ajax() | |
| ./cfme/web_ui/accordion.py:74: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| class_att = sel.get_attribute(sel.element(locate(name)), 'class').split(" ") | |
| ./cfme/web_ui/accordion.py:74: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.get_attribute()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| class_att = sel.get_attribute(sel.element(locate(name)), 'class').split(" ") | |
| ./cfme/web_ui/__init__.py:1705: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| el = sel.element(self.locator) | |
| ./cfme/web_ui/__init__.py:1778: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.execute_script()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| by_id) | |
| ./cfme/web_ui/__init__.py:1814: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.text()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| logger.info("Path %r yielded menuitem %r", path, sel.text(leaf)) | |
| ./cfme/web_ui/__init__.py:1817: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.click()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.click(leaf) | |
| ./cfme/web_ui/tabstrip.py:34: DeprecationWarning: Using function/method 'multimethods.MultiMethod()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.elements(_entry_loc) | |
| ./cfme/web_ui/tabstrip.py:93: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| ".//li/a[contains(normalize-space(text()), '{}')]".format(ident_string), root=_root()) | |
| ./cfme/web_ui/tabstrip.py:106: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.click()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.click(get_clickable_tab(ident_string)) | |
| ./cfme/tests/configure/test_server_name.py:16: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.value()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| flash_msg = 'Configuration settings saved for CFME Server "{}' | |
| ./cfme/configure/configuration/__init__.py:794: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.force_navigate()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.force_navigate("cfg_settings_currentserver_server") | |
| ./cfme/web_ui/__init__.py:1310: DeprecationWarning: Using function/method 'multimethods.MultiMethod()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| prev_sel = sel.select(slist, val) | |
| ./cfme/fixtures/pytest_selenium.py:1440: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.detect_observed_field()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| detect_observed_field(self._loc) | |
| ./cfme/configure/configuration/__init__.py:796: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.click()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.click(form_buttons.save) | |
| ./cfme/web_ui/form_buttons.py:94: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.is_displayed()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.is_displayed(locator) | |
| ./cfme/web_ui/form_buttons.py:113: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.wait_for_element()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| sel.wait_for_element(self, timeout=5) | |
| ./cfme/web_ui/form_buttons.py:114: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.click()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.click(self, no_custom_handler=True, wait_ajax=wait_ajax) | |
| ./cfme/web_ui/flash.py:87: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.is_displayed()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return map(message, [e for e in sel.elements(area.message) if sel.is_displayed(e)]) | |
| ./cfme/web_ui/flash.py:70: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.text()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| return sel.text(el) | |
| ./cfme/web_ui/flash.py:52: DeprecationWarning: Using function/method 'cfme.fixtures.pytest_selenium.get_attribute()' is deprecated and will be removed in version 'framework 3.0': it is replaced by the browser endpoint api | |
| _class = sel.get_attribute(el, "class") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import warnings | |
| from debtcollector.removals import remove | |
| warnings.simplefilter('once', category=DeprecationWarning) | |
| removed_in_fw30 = remove( | |
| removal_version="framework 3.0", | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [('ignore', 'numpy.ndarray size changed', <type 'exceptions.Warning'>, '', 0), | |
| ('ignore', 'numpy.ufunc size changed', <type 'exceptions.Warning'>, '', 0), | |
| ('ignore', 'numpy.dtype size changed', <type 'exceptions.Warning'>, '', 0), | |
| ('always', None, <class 'numpy.lib.polynomial.RankWarning'>, None, 0), | |
| ('once', None, <type 'exceptions.DeprecationWarning'>, None, 0), | |
| ('ignore', | |
| None, | |
| <class 'requests.packages.urllib3.exceptions.HTTPWarning'>, | |
| None, | |
| 0), | |
| ('once', None, <type 'exceptions.Warning'>, None, 0), | |
| ('ignore', | |
| None, | |
| <class 'requests.packages.urllib3.exceptions.DependencyWarning'>, | |
| None, | |
| 0), | |
| ('ignore', | |
| None, | |
| <class 'parsedatetime.warns.pdtPendingDeprecationWarning'>, | |
| None, | |
| 0), | |
| ('default', | |
| None, | |
| <class 'parsedatetime.warns.pdtDeprecationWarning'>, | |
| None, | |
| 0), | |
| ('ignore', | |
| 'sys.exc_clear', | |
| <type 'exceptions.DeprecationWarning'>, | |
| 'threading', | |
| 0), | |
| ('ignore', None, <type 'exceptions.DeprecationWarning'>, None, 0), | |
| ('ignore', None, <type 'exceptions.PendingDeprecationWarning'>, None, 0), | |
| ('ignore', None, <type 'exceptions.ImportWarning'>, None, 0), | |
| ('ignore', None, <type 'exceptions.BytesWarning'>, None, 0), | |
| ('ignore', '', <class 'pkg_resources.PEP440Warning'>, '', 0), | |
| ('always', | |
| None, | |
| <class 'requests.packages.urllib3.exceptions.SecurityWarning'>, | |
| None, | |
| 0), | |
| ('default', | |
| None, | |
| <class 'requests.packages.urllib3.exceptions.SubjectAltNameWarning'>, | |
| None, | |
| 0), | |
| ('default', | |
| None, | |
| <class 'requests.packages.urllib3.exceptions.InsecurePlatformWarning'>, | |
| None, | |
| 0), | |
| ('default', | |
| None, | |
| <class 'requests.packages.urllib3.exceptions.SNIMissingWarning'>, | |
| None, | |
| 0), | |
| ('default', None, <class 'requests.exceptions.FileModeWarning'>, None, 0), | |
| ('always', '', <class 'Crypto.pct_warnings.ClockRewindWarning'>, '', 0)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment