Skip to content

Conversation

@asvetlov
Copy link
Contributor

These methods return True if reader/writer was previously set, False otherwise.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau
Copy link
Collaborator

We should also change the return type in AbstractEventLoop.

@asvetlov
Copy link
ContributorAuthor

Correct, thanks. Fixed.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

tornado (https://github.com/tornadoweb/tornado) + tornado/platform/asyncio.py:641: error: Return type "None" of "remove_reader" incompatible with return type "bool" in supertype "AbstractEventLoop"+ tornado/platform/asyncio.py:645: error: Return type "None" of "remove_writer" incompatible with return type "bool" in supertype "AbstractEventLoop"

@asvetlov
Copy link
ContributorAuthor

asvetlov commented Jan 26, 2022

Tornado is slightly incompatible with the reference asyncio implementation, sorry.
The boolean was returned from these methods starting from the very first asyncio release, please trust me :)

@srittausrittau merged commit 98afaa4 into python:masterJan 26, 2022
@asvetlovasvetlov deleted the fix-remove-reader-writer branch January 26, 2022 14:37
@AlexWaygoodAlexWaygood mentioned this pull request Mar 9, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@asvetlov@srittau