Skip to content

[pull] main from python:main#978

Merged
pull[bot] merged 3 commits intotj-python:mainfrom
python:main
Apr 20, 2026
Merged

[pull] main from python:main#978
pull[bot] merged 3 commits intotj-python:mainfrom
python:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Apr 20, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )


📚 Documentation preview 📚: https://cpython-previews--978.org.readthedocs.build/

ByteFlowing1337 and others added 3 commits April 20, 2026 12:22
`IO` is purported to be the type of the file objects returned by `open`.
However, all methods on those objects take positional-only arguments, while
`IO`'s methods are declared with regular arguments. As such, the file objects
cannot actually be considered to implement `IO`. The same thing applies to
`BinaryIO`.

Fix this by adjusting the definition of these ABCs to match the file objects.

This is technically a breaking change, but it is unlikely to actually break
anything:

* These methods should never be called at runtime, since they are abstract.
  Therefore, this should not cause any runtime errors.

* In typeshed these arguments are already positional-only, so this should
  not cause any errors during typechecking either.
Correct the description of the default state of test module compilation.
@pull pull bot locked and limited conversation to collaborators Apr 20, 2026
@pull pull bot added the ⤵️ pull label Apr 20, 2026
@pull pull bot merged commit d206d42 into tj-python:main Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants