flake8-plugin-utils icon indicating copy to clipboard operation
flake8-plugin-utils copied to clipboard

Support Python 3.14

Open webknjaz opened this issue 2 months ago • 3 comments

  File "~/.cache/pre-commit/repookdnxb7e/py_env-python3.14/lib/python3.14/site-packages/flake8/checker.py", line 428, in run_ast_checks
    for line_number, offset, text, _ in runner:
                                        ^^^^^^
  File "~/.cache/pre-commit/repookdnxb7e/py_env-python3.14/lib/python3.14/site-packages/flake8_plugin_utils/plugin.py", line 71, in run
    visitor.visit(self._tree)
    ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "~/.pyenv/versions/3.14.0/lib/python3.14/ast.py", line 506, in visit
    return visitor(node)
  File "~/.pyenv/versions/3.14.0/lib/python3.14/ast.py", line 514, in generic_visit
    self.visit(item)
    ~~~~~~~~~~^^^^^^
  File "~/.pyenv/versions/3.14.0/lib/python3.14/ast.py", line 506, in visit
    return visitor(node)
  File "~/.pyenv/versions/3.14.0/lib/python3.14/ast.py", line 514, in generic_visit
    self.visit(item)
    ~~~~~~~~~~^^^^^^
  File "~/.pyenv/versions/3.14.0/lib/python3.14/ast.py", line 506, in visit
    return visitor(node)
  File "~/.cache/pre-commit/repookdnxb7e/py_env-python3.14/lib/python3.14/site-packages/flake8_pytest_style/visitors/fail.py", line 30, in visit_Assert
    if is_falsy_constant(node.test):
       ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "~/.cache/pre-commit/repookdnxb7e/py_env-python3.14/lib/python3.14/site-packages/flake8_pytest_style/utils.py", line 265, in is_falsy_constant
    if is_none(node) or is_false(node):
       ~~~~~~~^^^^^^
  File "~/.cache/pre-commit/repookdnxb7e/py_env-python3.14/lib/python3.14/site-packages/flake8_plugin_utils/utils/constants.py", line 9, in is_none
    return _is(node, None)
  File "~/.cache/pre-commit/repookdnxb7e/py_env-python3.14/lib/python3.14/site-packages/flake8_plugin_utils/utils/constants.py", line 5, in _is
    return isinstance(node, ast.NameConstant) and node.value is value
                            ^^^^^^^^^^^^^^^^
AttributeError: module 'ast' has no attribute 'NameConstant'

webknjaz avatar Oct 13 '25 13:10 webknjaz

We're running into the same issue.

kwk avatar Nov 12 '25 10:11 kwk

@kwk flake8-pytest-style that uses it, has already patched this on their side.

webknjaz avatar Nov 12 '25 14:11 webknjaz

@kwk flake8-pytest-style that uses it, has already patched this on their side.

@webknjaz, yes I saw that and we updated to 2.2.0 of flake8-pytest-style.

kwk avatar Nov 12 '25 15:11 kwk