quopri
uses conditional binascii
import, when it is always available
#133896
Labels
quopri
uses conditional binascii
import, when it is always available
#133896
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
This module is quite old, it uses a conditional import of
binascii
since times when it was possible to not have it whenzlib
was missing:cpython/Lib/quopri.py
Lines 12 to 17 in 13cb8ca
However, right now it is always available under all python implementations (like RustPython and PyPy).
So, we can simplify the implementation and remove a lot of duplicated code, example:
cpython/Lib/quopri.py
Lines 51 to 99 in 13cb8ca
There are also several helper functions with public names, which are not in
__all__
which will be unused after this. We can keep them and deprecate their use.Since
binascii
is always available, python implementation is never used anyway.So, the main pro:
There are several cons to my proposal:
I will open a draft PR, so people can see the amount of changes and decide better with that.
Should we do this?
Linked PRs
quopri
to always usebinascii
#133897The text was updated successfully, but these errors were encountered: