Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop inheriting from StreamReaderProtocol? #210

Open
pepoluan opened this issue Nov 22, 2020 · 3 comments
Open

Stop inheriting from StreamReaderProtocol? #210

pepoluan opened this issue Nov 22, 2020 · 3 comments
Labels
compatibility in progress Someone has started working on the issue but no PR yet tech-debt Things that needs to be tidied up to avoid being bitten in the future...
Milestone

Comments

@pepoluan
Copy link
Collaborator

I was in the process of eyeballing the docs and fixing things when I came upon a :ref: that steadfastly refused to resolve:

:class:`asyncio.StreamReaderProtocol`

After hunting around, apparently that class was last documented in Python 3.6: https://docs.python.org/3.6/library/asyncio-stream.html#streamreaderprotocol

It's gone since Python 3.7, that's why the :ref: won't resolve.

Digging deeper, I found bpo-37639 with comment from @asvetlov (I'm assuming the same person, apologies if not):

We are striving to remove it from public API step by step: documentation-deprecation-removal.

If you really need the class -- please copy-paste the source lines into your project and use the copy on your own.

So, will we stop inheriting from that class and as suggested, just copy-and-paste the source lines?

I fear that one day things will blow up if this class's definition got removed and/or remade... which is why I'm adding the [tech-debt] label there.

@pepoluan pepoluan added compatibility tech-debt Things that needs to be tidied up to avoid being bitten in the future... labels Nov 22, 2020
@asvetlov
Copy link
Member

Correct.
The removal process can take long (many years) but still.
For Python 3.8 I tried to make a deep refactoring of async stream classes.
The PR was reverted because it produced too many incompatibilities with private-but-used-by-third-party internal details.

@pepoluan
Copy link
Collaborator Author

pepoluan commented Jan 7, 2021

I'll earmark this for 2.0, because there's a remote possibility of things breaking (e.g., if aiosmtpd is implemented by someone that expected SMTP to inherit from StreamReaderProtocol)

@pepoluan pepoluan added this to the 2.0 milestone Jan 7, 2021
@pepoluan pepoluan added the in progress Someone has started working on the issue but no PR yet label Feb 22, 2021
@pepoluan
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility in progress Someone has started working on the issue but no PR yet tech-debt Things that needs to be tidied up to avoid being bitten in the future...
Projects
None yet
Development

No branches or pull requests

2 participants