[GH-ISSUE #1219] flake8-string-format fails with Python 3.14 #709

Closed
opened 2026-02-28 00:01:05 +03:00 by kerem · 1 comment
Owner

Originally created by @dieser-niko on GitHub (Nov 26, 2025).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1219

Describe the bug
Related issue: https://github.com/xZise/flake8-string-format/issues/25

Expected behavior
Working CI/CD

Output

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
                    ~~~~^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8/checker.py", line 82, in _mp_run
    ).run_checks()
      ~~~~~~~~~~^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8/checker.py", line 526, in run_checks
    self.run_ast_checks()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8/checker.py", line 428, in run_ast_checks
    for line_number, offset, text, _ in runner:
                                        ^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 162, in run
    visitor.visit(self.tree)
    ~~~~~~~~~~~~~^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/ast.py", line 506, in visit
    return visitor(node)
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 79, in visit_Module
    self._visit_body(node)
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 70, in _visit_body
    self.visit(sub_node)
    ~~~~~~~~~~^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/ast.py", line 506, in visit
    return visitor(node)
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 83, in visit_ClassDef
    self._visit_definition(node)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 55, in _visit_definition
    self._visit_body(node)
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 65, in _visit_body
    self.is_base_string(node.body[0].value)):
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 37, in is_base_string
    typ = (ast.Str,)
           ^^^^^^^
AttributeError: module 'ast' has no attribute 'Str'

Environment:

  • OS: ubuntu 22.04.5
  • Python version 3.14.0
Originally created by @dieser-niko on GitHub (Nov 26, 2025). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1219 **Describe the bug** Related issue: https://github.com/xZise/flake8-string-format/issues/25 **Expected behavior** Working CI/CD **Output** ```python Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) ~~~~^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8/checker.py", line 82, in _mp_run ).run_checks() ~~~~~~~~~~^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8/checker.py", line 526, in run_checks self.run_ast_checks() ~~~~~~~~~~~~~~~~~~~^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8/checker.py", line 428, in run_ast_checks for line_number, offset, text, _ in runner: ^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 162, in run visitor.visit(self.tree) ~~~~~~~~~~~~~^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/ast.py", line 506, in visit return visitor(node) File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 79, in visit_Module self._visit_body(node) ~~~~~~~~~~~~~~~~^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 70, in _visit_body self.visit(sub_node) ~~~~~~~~~~^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/ast.py", line 506, in visit return visitor(node) File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 83, in visit_ClassDef self._visit_definition(node) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 55, in _visit_definition self._visit_body(node) ~~~~~~~~~~~~~~~~^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 65, in _visit_body self.is_base_string(node.body[0].value)): ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^ File "/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/flake8_string_format.py", line 37, in is_base_string typ = (ast.Str,) ^^^^^^^ AttributeError: module 'ast' has no attribute 'Str' ``` **Environment:** - OS: ubuntu 22.04.5 - Python version 3.14.0
kerem 2026-02-28 00:01:05 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@stephanebruckert commented on GitHub (Nov 30, 2025):

Fixed in github.com/spotipy-dev/spotipy@9119b6a070

<!-- gh-comment-id:3593372635 --> @stephanebruckert commented on GitHub (Nov 30, 2025): Fixed in https://github.com/spotipy-dev/spotipy/commit/9119b6a07036febd8d2f007758c52ee639829168
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#709
No description provided.