My plan is to use _pycodecs.py in Grumpy, propose it to be used on RustPython and look for others and their interest (Micropython and Transcrypt to start).
Micropython for example support only utf-8, is not extensible and have codecs.py as a dummy. Having codecs.py importable in this environment would fix someissues on their side.
In fact, I already started hacking a _pycodecs.py.
Side question:
Is there a performance reason for this to be a tuple or I can replace with a bare old object to simplify some code? Assuming backwards compatibility and tests passing, of course.
That first part pretty much guarantees you shouldnât change it without a really good reason. That doesnât mean you canât open an issue on bugs.python.org to discuss changing it, though.
Right. I will keep the changes on the existing stuff as minimal, if any. Will mute about this for a while until I have a draft of _codecs.py.
I can see this as an understanding of stdlib being intentionally useful for other Python implementations. And also as a hook to bring back the main question here, that I may had hijacked on the way :
Should we start creating suggestions on how it could work better than today?
More that we donât want people submitting a backport for something they decided to do some weekend for fun. We are after in-use code that has been tested and is being relied upon already.