Describe the bug
When upgrading to black==25.9.0 (from 25.1.0), I get the following error for every file when running flake8:
BLK900 Failed to load file: decode_bytes() missing 1 required positional argument: 'mode'
To Reproduce
$ pip install black==25.9.0
$ flake8 src/
<for every file in src/> BLK900 Failed to load file: decode_bytes() missing 1 required positional argument: 'mode'
$ pip install black<25.9.0
<Installs 25.1.0>
$ flake8 src/
<no errors>
flake8 and flake8-black (and flake8-*) installed in each scenario are the same, 7.3.0 and 0.3.6 respectively.
Running with a fresh install from black main (pip install -e .[d]) does not fix the issue. (All black tests passed.)
Expected behavior
No errors.
Environment
- Black's version: 25.9.0
- OS and Python version: MacOS Sequoia 15.5/15.7, Tahoe 26.0, Python 3.11-3.13
Additional context
Just started yesterday when unpinned black dependencies started installing 25.9.0 instead of 25.1.0.