I'm +0 on removing again the flag, but I would prefer to not endorse the responsibility. I am already responsible for enough incompatible changes in Python 3.10 :-D
Some context on this "U" open mode. The flag is accepted by many functions opening files. It is deprecated (emit DeprecationWarning) for 9 years (Python 3.3, 2012).
The flag is currently ignored and is basically only kept for backward compatibility with Python 2, whereas Python 2.7 support ended in January 2020 (1 year ago).
I removed the flag in Python 3.9:
The removal broke the Waf build system used by the Samba project. Waf code is copied into Samba source code (as Python copies autoconf/automake files). So even if Waf and then the Waf copy in Samba are updated to not pass the "U" flag, trying to build an old Samba version will fail if the flag is removed. Andrew Bartlett explained that it's a practical issue when bisecting a bug in Samba. It's annoying, but likely easy to workaround (fix the local waf copy temporarily).
Moreover, the removal broke 11 packages in Fedora:
* aubio * openvswitch * python-SALib * python-altgraph * python-apsw * python-magic-wormhole-mailbox-server * python-munch * python-parameterized * python-pylibmc * python-sphinx-testing * veusz
Miro Hrončok and me proposed to revert the removal in Python 3.9: https://email@example.com/thread/EYLXCGGJO...
The removal was reverted (accept again the flag) in Python 3.9:
LWN article summarizing the issue: https://lwn.net/Articles/811369/
I added a section at the very beginning of What's New in Python 3.9 to request developers to check for DeprecationWarning in their project: https://docs.python.org/dev/whatsnew/3.9.html#you-should-check-for-deprecati...
The idea was that Python 3.9 is the last version supporting the flag, developers are now warned, and so the flag should be removed from Python 3.10.
That being said, I'm kind of cautious. Each time I introduce a minor incompatible change breaking a few projects (say 5 projects or less), many people get angry and complain without trying to understand the rationale. Moreover, they are silent when I say that there was a DeprecationWarning for 9 years.
I didn't check if the 11 projects + waf + samba have been updated to no longer pass the deprecated "U" flag.