aiosmtpd
aiosmtpd copied to clipboard
Stop inheriting from `StreamReaderProtocol`?
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.
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.
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)
So ... I made a branch: https://github.com/pepoluan/aiosmtpd/tree/embed-streamreaderprotocol