On Fri, Sep 05, 2025 at 06:15:45PM +0000, Santiago Vila wrote:
Package: src:black
Version: 25.1.0-3
Severity: serious
Tags: ftbfs forky sid
[...]
Building `wheel` version `standard`
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", 
line 389, in <module>
   main()
   ~~~~^^
 File 
"/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", 
line 373, in main
   json_out["return_val"] = hook(**hook_input["kwargs"])
                            ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
 File 
"/usr/lib/python3/dist-packages/pyproject_hooks/_in_process/_in_process.py", 
line 280, in build_wheel
   return _build_backend().build_wheel(
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
       wheel_directory, config_settings, metadata_directory
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   )
   ^
 File "/usr/lib/python3/dist-packages/hatchling/build.py", line 58, in 
build_wheel
   return os.path.basename(next(builder.build(directory=wheel_directory, 
versions=['standard'])))
                           
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/hatchling/builders/plugin/interface.py", 
line 147, in build
   build_hook.initialize(version, build_data)
   ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
 File "/usr/lib/python3/dist-packages/hatch_mypyc/plugin.py", line 338, in 
initialize
   raise Exception(f'Error while invoking 
Mypyc:\n{process.stdout.decode("utf-8")}')
Exception: Error while invoking Mypyc:
src/blib2to3/pgen2/parse.py:103: error: Argument 1 to "_addtoken" of "Parser" has incompatible type 
"*list[object]"; expected "int"  [arg-type]
src/blib2to3/pgen2/parse.py:103: error: Argument 1 to "_addtoken" of "Parser" has incompatible type 
"*list[object]"; expected "str"  [arg-type]
src/blib2to3/pgen2/parse.py:103: error: Argument 1 to "_addtoken" of "Parser" has incompatible type 
"*list[object]"; expected "tuple[str, tuple[int, int]]"  [arg-type]
src/blib2to3/pgen2/parse.py:103: error: Argument 1 to "addtoken" of "Parser" has incompatible type 
"*list[object]"; expected "int"  [arg-type]
src/blib2to3/pgen2/parse.py:103: error: Argument 1 to "addtoken" of "Parser" has incompatible type 
"*list[object]"; expected "str"  [arg-type]
src/blib2to3/pgen2/parse.py:103: error: Argument 1 to "addtoken" of "Parser" has incompatible type 
"*list[object]"; expected "tuple[str, tuple[int, int]]"  [arg-type]

There are two possible approaches to fixing this: we could cherry-pick https://github.com/psf/black/pull/4671 and https://github.com/psf/black/pull/4745/commits/c696b9d80c3bbbf7849515f082e1542f58add52a, or we could upgrade to black 25.9.0 now that python3-pytokens has made it through NEW. I prefer the latter option on general principles.

However, in either case, I found that I needed to temporarily disable building black with mypyc (by commenting out `export HATCH_BUILD_HOOKS_ENABLE=1` in debian/rules), because both the patched 25.1.0 and black 25.9.0 have many test failures with mypy 1.18.2 in testing/unstable, to the extent that I suspect the resulting package would be broken.

I see somebody seems to have started working on upgrading to a new mypy upstream (https://github.com/psf/black/pull/4749), but the commits so far don't seem relevant to this. I haven't exhaustively checked the upstream main branch, but I don't immediately see anything relevant there either.

Michael, do you think it would be acceptable to disable building with mypyc for now, or do you have any better ideas? Let me know if you need me to push my work in progress somewhere.

Thanks,

--
Colin Watson (he/him)                              [[email protected]]

Reply via email to