Skip to content
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

Issues with Python 3.8 #4928

Closed
The-Compiler opened this issue Jul 23, 2019 · 12 comments
Closed

Issues with Python 3.8 #4928

The-Compiler opened this issue Jul 23, 2019 · 12 comments

Comments

@The-Compiler
Copy link
Member

@The-Compiler The-Compiler commented Jul 23, 2019

Python 3.8 is scheduled for 2019-10-21.

Time to check what it breaks!

@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

Warnings due to collections.abc

13:03:22 WARNING: /home/florian/proj/qutebrowser/git/.venv-38/lib/python3.8/site-packages/jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  from collections import MutableMapping

13:03:22 WARNING: /home/florian/proj/qutebrowser/git/.venv-38/lib/python3.8/site-packages/jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  from collections import Mapping

See pallets/jinja#867 - it looks like the message changed in Python 3.8 so we'll need to update our filters.

Note the message will slightly change again with python/cpython#14915

@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

Warnings about implicit int conversions

From Qt::Alignment / Qt::State

13:03:26 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:837: DeprecationWarning: an integer is required (got type Alignment).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self._style.drawItemText(p, layouts.text, alignment, opt.palette,

13:03:26 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/statusbar/textbase.py:89: DeprecationWarning: an integer is required (got type Alignment).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  painter.drawText(0, 0, geom.width(), geom.height(),

13:03:23 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/statusbar/textbase.py:89: DeprecationWarning: an integer is required (got type Alignment).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  painter.drawText(0, 0, geom.width(), geom.height(),

13:03:23 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:837: DeprecationWarning: an integer is required (got type Alignment).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self._style.drawItemText(p, layouts.text, alignment, opt.palette,

13:03:26 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:837: DeprecationWarning: an integer is required (got type State).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self._style.drawItemText(p, layouts.text, alignment, opt.palette,

13:03:23 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:837: DeprecationWarning: an integer is required (got type State).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self._style.drawItemText(p, layouts.text, alignment, opt.palette,

From float

3:03:23 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:513: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self.setIconSize(QSize(size, size))

13:03:23 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:972: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  icon_rect = QRect(QPoint(text_rect.left(), icon_top), tab_icon_size)

13:03:25 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/completion/completionwidget.py:363: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  return QSize(-1, height)

13:03:26 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/tabwidget.py:972: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  icon_rect = QRect(QPoint(text_rect.left(), icon_top), tab_icon_size)

From sip.voidptr

13:03:27 WARNING: /home/florian/proj/qutebrowser/git/qutebrowser/misc/crashsignal.py:337: DeprecationWarning: an integer is required (got type sip.voidptr).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  os.close(rfd)
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

pytest-bdd failing

Traceback (most recent call last):
  File "/usr/lib64/python3.8/runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.8/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pytest.py", line 102, in <module>
    raise SystemExit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/config/__init__.py", line 55, in main
    config = _prepareconfig(args, plugins)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/config/__init__.py", line 199, in _prepareconfig
    return pluginmanager.hook.pytest_cmdline_parse(
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/helpconfig.py", line 89, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/config/__init__.py", line 661, in pytest_cmdline_parse
    self.parse(args)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/config/__init__.py", line 869, in parse
    self._preparse(args, addopts=addopts)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/config/__init__.py", line 815, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pluggy/manager.py", line 292, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/importlib/metadata/__init__.py", line 72, in load
    module = import_module(match.group('module'))
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 149, in exec_module
    exec(co, module.__dict__)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pytest_bdd/plugin.py", line 27, in <module>
    def trace():
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pytest_bdd/steps.py", line 188, in decorator
    contribute_to_module(
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pytest_bdd/steps.py", line 261, in contribute_to_module
    func = recreate_function(func, module=module)
  File "/home/florian/proj/qutebrowser/git/.tox/py38-pyqt513/lib/python3.8/site-packages/pytest_bdd/steps.py", line 245, in recreate_function
    set_code(func, CodeType(*args))
TypeError: an integer is required (got type bytes)
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

Unable to convert KeyboardModifiers

tests/unit/keyinput/test_keyutils.py:196: in <module>
    class TestKeySequence:
tests/unit/keyinput/test_keyutils.py:429: in TestKeySequence
    ???
qutebrowser/keyinput/keyutils.py:397: in __init__
    sequence = QKeySequence(*sub)
E   TypeError: unable to convert a Python 'KeyboardModifiers' object to a C++ 'Qt::KeyboardModifiers' instance
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

PyQt int/float issues

tab bar

    def _set_icon_size(self):
        """Set the tab bar favicon size."""
        size = self.fontMetrics().height() - 2
        size *= config.val.tabs.favicons.scale
>       self.setIconSize(QSize(size, size))
E       TypeError: arguments did not match any overloaded call:
E         QSize(): too many arguments
E         QSize(int, int): argument 1 has unexpected type 'float'
E         QSize(QSize): argument 1 has unexpected type 'float'

statusbar textbase

  File "/home/florian/proj/qutebrowser/git/qutebrowser/mainwindow/statusbar/textbase.py", line 89, in paintEvent
    painter.drawText(0, 0, geom.width(), geom.height(),
TypeError: arguments did not match any overloaded call:
  drawText(self, Union[QPointF, QPoint], str): argument 1 has unexpected type 'int'
  drawText(self, QRectF, int, str): argument 1 has unexpected type 'int'
  drawText(self, QRect, int, str): argument 1 has unexpected type 'int'
  drawText(self, QRectF, str, option: QTextOption = QTextOption()): argument 1 has unexpected type 'int'
  drawText(self, QPoint, str): argument 1 has unexpected type 'int'
  drawText(self, int, int, int, int, int, str): argument 5 has unexpected type 'Alignment'
  drawText(self, int, int, str): argument 3 has unexpected type 'int'

fullscreen notification

self = <qutebrowser.misc.miscwidgets.FullscreenNotification object at 0x7fbda50814c0>, parent = None

    def __init__(self, parent=None):
        super().__init__(parent)
        self.setStyleSheet("""
            background-color: rgba(50, 50, 50, 80%);
            color: white;
            border-radius: 20px;
            padding: 30px;
        """)
    
        all_bindings = config.key_instance.get_reverse_bindings_for('normal')
        bindings = all_bindings.get('fullscreen --leave')
        if bindings:
            key = bindings[0]
            self.setText("Press {} to exit fullscreen.".format(key))
        else:
            self.setText("Page is now fullscreen.")
    
        self.resize(self.sizeHint())
        if config.val.content.windowed_fullscreen:
            geom = self.parentWidget().geometry()
        else:
            geom = QApplication.desktop().screenGeometry(self)
>       self.move((geom.width() - self.sizeHint().width()) / 2, 30)
E       TypeError: arguments did not match any overloaded call:
E         move(self, QPoint): argument 1 has unexpected type 'float'
E         move(self, int, int): argument 1 has unexpected type 'float'

rect_on_view

Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webengine/webenginetab.py", line 632, in _js_cb_multiple
    callback(elems)
  File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/hints.py", line 616, in _start_cb
    label = HintLabel(elem, self._context)
  File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/hints.py", line 81, in __init__
    self._move_to_elem()
  File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/hints.py", line 123, in _move_to_elem
    rect = self.elem.rect_on_view(no_js=no_js)
  File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webengine/webengineelem.py", line 193, in rect_on_view
    rect = QRect(left * zoom, top * zoom,
TypeError: arguments did not match any overloaded call:
  QRect(): too many arguments
  QRect(int, int, int, int): argument 1 has unexpected type 'float'
  QRect(QPoint, QPoint): argument 1 has unexpected type 'float'
  QRect(QPoint, QSize): argument 1 has unexpected type 'float'
  QRect(QRect): argument 1 has unexpected type 'float'

completion widget

Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/qutebrowser/completion/completionwidget.py", line 363, in sizeHint
    return QSize(-1, height)
TypeError: arguments did not match any overloaded call:
  QSize(): too many arguments
  QSize(int, int): argument 2 has unexpected type 'float'
  QSize(QSize): argument 1 has unexpected type 'int'

font configtype

cls = <class 'test_configtypes.Font'>, desc = FontDesc(style=0, weight=37.5, pt=10, px=None, family='Foobar Neue')

    @classmethod
    def fromdesc(cls, desc):
        """Get a Font based on a font description."""
        f = cls()
        f.setStyle(desc.style)
>       f.setWeight(desc.weight)
E       TypeError: setWeight(self, int): argument 1 has unexpected type 'float'

quteproc

    def _wait_for_new(self, timeout, do_skip, **kwargs):
        """Wait for a log message which doesn't exist yet.
    
        Called via wait_for.
        """
        __tracebackhide__ = lambda e: e.errisinstance(WaitForTimeout)
        message = kwargs.get('message', None)
        if message is not None:
            elided = quteutils.elide(repr(message), 100)
            self._log("\n----> Waiting for {} in the log".format(elided))
    
        spy = QSignalSpy(self.new_data)
        elapsed_timer = QElapsedTimer()
        elapsed_timer.start()
    
        while True:
            # Skip if there are pending messages causing a skip
            self._maybe_skip()
>           got_signal = spy.wait(timeout)
E           TypeError: wait(self, timeout: int = 5000): argument 1 has unexpected type 'float'
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

URL pattern parsing issues

_____________________________________________ test_invalid_patterns[http://foo:com/-Invalid port: invalid literal for int() with base 10: 'com'] ______________________________________________
qutebrowser/utils/urlmatch.py:225: in _init_port
    self._port = parsed.port
/usr/lib64/python3.8/urllib/parse.py:174: in port
    raise ValueError(message) from None
E   ValueError: Port could not be cast to integer value as 'com'

During handling of the above exception, another exception occurred:
tests/unit/utils/test_urlmatch.py:103: in test_invalid_patterns
    urlmatch.UrlPattern(pattern)
qutebrowser/utils/urlmatch.py:100: in __init__
    self._init_port(parsed)
qutebrowser/utils/urlmatch.py:227: in _init_port
    raise ParseError("Invalid port: {}".format(e))
E   qutebrowser.utils.urlmatch.ParseError: Invalid port: Port could not be cast to integer value as 'com'

During handling of the above exception, another exception occurred:
tests/unit/utils/test_urlmatch.py:103: in test_invalid_patterns
    urlmatch.UrlPattern(pattern)
E   AssertionError: Pattern 'Invalid\ port:\ invalid\ literal\ for\ int\(\)\ with\ base\ 10:\ 'com'' not found in 'Invalid port: Port could not be cast to integer value as 'com''

tests/unit/utils/test_urlmatch.py .F

________________________________________ test_invalid_patterns[http://foo:80:80/monkey-Invalid port: invalid literal for int() with base 10: '80:80'] _________________________________________
qutebrowser/utils/urlmatch.py:225: in _init_port
    self._port = parsed.port
/usr/lib64/python3.8/urllib/parse.py:174: in port
    raise ValueError(message) from None
E   ValueError: Port could not be cast to integer value as '80:80'

During handling of the above exception, another exception occurred:
tests/unit/utils/test_urlmatch.py:103: in test_invalid_patterns
    urlmatch.UrlPattern(pattern)
qutebrowser/utils/urlmatch.py:100: in __init__
    self._init_port(parsed)
qutebrowser/utils/urlmatch.py:227: in _init_port
    raise ParseError("Invalid port: {}".format(e))
E   qutebrowser.utils.urlmatch.ParseError: Invalid port: Port could not be cast to integer value as '80:80'

During handling of the above exception, another exception occurred:
tests/unit/utils/test_urlmatch.py:103: in test_invalid_patterns
    urlmatch.UrlPattern(pattern)
E   AssertionError: Pattern 'Invalid\ port:\ invalid\ literal\ for\ int\(\)\ with\ base\ 10:\ '80:80'' not found in 'Invalid port: Port could not be cast to integer value as '80:80''

tests/unit/utils/test_urlmatch.py ..........x..F

______________________________________ test_invalid_patterns[http://[fc2e:bb88:edac::2]:2a2-Invalid port: invalid literal for int() with base 10: '2a2'] ______________________________________
qutebrowser/utils/urlmatch.py:225: in _init_port
    self._port = parsed.port
/usr/lib64/python3.8/urllib/parse.py:174: in port
    raise ValueError(message) from None
E   ValueError: Port could not be cast to integer value as '2a2'

During handling of the above exception, another exception occurred:
tests/unit/utils/test_urlmatch.py:103: in test_invalid_patterns
    urlmatch.UrlPattern(pattern)
qutebrowser/utils/urlmatch.py:100: in __init__
    self._init_port(parsed)
qutebrowser/utils/urlmatch.py:227: in _init_port
    raise ParseError("Invalid port: {}".format(e))
E   qutebrowser.utils.urlmatch.ParseError: Invalid port: Port could not be cast to integer value as '2a2'

During handling of the above exception, another exception occurred:
tests/unit/utils/test_urlmatch.py:103: in test_invalid_patterns
    urlmatch.UrlPattern(pattern)
E   AssertionError: Pattern 'Invalid\ port:\ invalid\ literal\ for\ int\(\)\ with\ base\ 10:\ '2a2'' not found in 'Invalid port: Port could not be cast to integer value as '2a2''
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

pylint issues

syntax errors

Lots of: scripts/importer.py:35:0: E0001: Cannot import 'string' due to syntax error 'invalid syntax (<unknown>, line 109)' (syntax-error)

Probably also other errors (not-context-manager, no-name-in-module) because of it.

exception

************* Module scripts.importer
scripts/importer.py:35:0: E0001: Cannot import 'string' due to syntax error 'invalid syntax (<unknown>, line 109)' (syntax-error)
Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/__init__.py", line 91, in _inference_tip_cached
    return iter(_cache[func, node])
KeyError: (<function infer_named_tuple at 0x7fe42487b430>, <Call l.245 at 0x7fe422b5a040>)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.8/runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib64/python3.8/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/__main__.py", line 8, in <module>
    pylint.run_pylint()
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/__init__.py", line 20, in run_pylint
    Run(sys.argv[1:])
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/lint.py", line 1628, in __init__
    linter.check(args)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/lint.py", line 943, in check
    self._do_check(files_or_modules)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/lint.py", line 1075, in _do_check
    self.check_astroid_module(ast_node, walker, rawcheckers, tokencheckers)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/lint.py", line 1158, in check_astroid_module
    walker.walk(ast_node)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/utils.py", line 1303, in walk
    self.walk(child)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/utils.py", line 1303, in walk
    self.walk(child)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/utils.py", line 1303, in walk
    self.walk(child)
  [Previous line repeated 3 more times]
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/utils.py", line 1300, in walk
    cb(astroid)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/checkers/base.py", line 2162, in visit_compare
    self._check_callable_comparison(node)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/checkers/base.py", line 2144, in _check_callable_comparison
    sum(
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/checkers/base.py", line 2147, in <genexpr>
    if isinstance(utils.safe_infer(operand), bare_callables)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/pylint/checkers/utils.py", line 1066, in safe_infer
    value = next(inferit)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/inference.py", line 279, in infer_attribute
    for owner in self.expr.infer(context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/inference.py", line 219, in infer_call
    yield from callee.infer_call_result(caller=self, context=callcontext)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/scoped_nodes.py", line 1664, in infer_call_result
    yield from returnnode.value.infer(context)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/inference.py", line 219, in infer_call
    yield from callee.infer_call_result(caller=self, context=callcontext)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/scoped_nodes.py", line 1664, in infer_call_result
    yield from returnnode.value.infer(context)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/bases.py", line 137, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 92, in wrapped
    generator = _func(node, context, **kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/inference.py", line 832, in infer_assign
    stmts = list(self.assigned_stmts(context=context))
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/bases.py", line 137, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/bases.py", line 137, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/inference.py", line 219, in infer_call
    yield from callee.infer_call_result(caller=self, context=callcontext)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/scoped_nodes.py", line 2091, in infer_call_result
    self.is_subtype_of("%s.type" % (BUILTINS,), context)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/scoped_nodes.py", line 2048, in is_subtype_of
    for anc in self.ancestors(context=context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/scoped_nodes.py", line 2195, in ancestors
    for baseobj in stmt.infer(context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/bases.py", line 137, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
    yield from islice(iterator, size)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
    for result in generator:
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 131, in raise_if_nothing_inferred
    yield next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/decorators.py", line 95, in wrapped
    res = next(generator)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/bases.py", line 137, in _infer_stmts
    for inferred in stmt.infer(context=context):
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/node_classes.py", line 348, in infer
    return self._explicit_inference(self, context, **kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/__init__.py", line 93, in _inference_tip_cached
    result = func(*args, **kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/brain/brain_namedtuple_enum.py", line 173, in infer_named_tuple
    rename = next(call_site.infer_argument(func, "rename", context)).bool_value()
  File "/home/florian/proj/qutebrowser/git/.tox/pylint/lib/python3.8/site-packages/astroid/arguments.py", line 160, in infer_argument
    if len(self.positional_arguments) > len(funcnode.args.args):
TypeError: object of type 'Uninferable' has no len()
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

lxml building issues

Tons of:

  building 'lxml.etree' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/src
  creating build/temp.linux-x86_64-3.8/src/lxml
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DOPENSSL_NO_SSL2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.8/src/lxml/etree.o -w
  src/lxml/etree.c: In function ‘__Pyx_InitCachedConstants’:
  src/lxml/etree.c:411:11: error: too many arguments to function ‘PyCode_New’
    411 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
        |           ^~~~~~~~~~
  src/lxml/etree.c:228068:34: note: in expansion of macro ‘__Pyx_PyCode_New’
  228068 |   __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getitem, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 95, __pyx_L1_error)
         |                                  ^~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.8/compile.h:5,
                   from /usr/include/python3.8/Python.h:138,
                   from src/lxml/etree.c:97:
  /usr/include/python3.8/code.h:122:28: note: declared here
    122 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
        |                            ^~~~~~~~~~
  src/lxml/etree.c:411:11: error: too many arguments to function ‘PyCode_New’
    411 |           PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
        |           ^~~~~~~~~~
  src/lxml/etree.c:228080:34: note: in expansion of macro ‘__Pyx_PyCode_New’
  228080 |   __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_setitem, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 98, __pyx_L1_error)
         |                                  ^~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.8/compile.h:5,
                   from /usr/include/python3.8/Python.h:138,
                   from src/lxml/etree.c:97:
  /usr/include/python3.8/code.h:122:28: note: declared here
    122 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
        |                            ^~~~~~~~~~
@The-Compiler

This comment was marked as resolved.

Copy link
Member Author

@The-Compiler The-Compiler commented Jul 23, 2019

flake8 issues

✔️ flake8-string-format

Traceback (most recent call last):
  File "/usr/lib64/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib64/python3.8/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/florian/proj/qutebrowser/git/.tox/flake8/lib/python3.8/site-packages/flake8/checker.py", line 669, in _run_checks
    return checker.run_checks()
  File "/home/florian/proj/qutebrowser/git/.tox/flake8/lib/python3.8/site-packages/flake8/checker.py", line 608, in run_checks
    self.run_ast_checks()
  File "/home/florian/proj/qutebrowser/git/.tox/flake8/lib/python3.8/site-packages/flake8/checker.py", line 504, in run_ast_checks
    for (line_number, offset, text, check) in runner:
  File "/home/florian/proj/qutebrowser/git/.tox/flake8/lib/python3.8/site-packages/flake8_string_format.py", line 251, in run
    assert not (set(visitor.calls) - set(visitor.nodes))
AssertionError

changed mccabe values?

tests/unit/config/test_configinit.py:119:5: C901 'TestEarlyInit.test_autoconfig_yml' is too complex (13)
The-Compiler added a commit that referenced this issue Aug 17, 2019
The-Compiler added a commit that referenced this issue Aug 18, 2019
This also fixes some calls to utils.KeySequence with a string.

See #4928
The-Compiler added a commit that referenced this issue Aug 18, 2019
The-Compiler added a commit that referenced this issue Aug 18, 2019
See #4928
@The-Compiler

This comment has been minimized.

Copy link
Member Author

@The-Compiler The-Compiler commented Aug 18, 2019

Got most issues with our code fixed in the py38 branch (likely going to merge it tomorrow).

As for pytest-bdd: pytest-dev/pytest-bdd#316

The-Compiler added a commit that referenced this issue Aug 18, 2019
The-Compiler added a commit that referenced this issue Aug 18, 2019
The-Compiler added a commit that referenced this issue Oct 20, 2019
@The-Compiler

This comment has been minimized.

Copy link
Member Author

@The-Compiler The-Compiler commented Oct 21, 2019

All up and running now, and Travis is running with Python 3.8!

@The-Compiler

This comment has been minimized.

Copy link
Member Author

@The-Compiler The-Compiler commented Nov 16, 2019

Some of the issues in #5013 (comment) are probably due to Python 3.8 as well.

The-Compiler added a commit that referenced this issue Nov 18, 2019
The-Compiler added a commit that referenced this issue Nov 19, 2019
See #4928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.