Closed Delgan closed 1 year ago
@delgan does this supercede #69?
@Delgan does this supercede #69?
@Qix- There is definitely overlap between #88 and #69, but #69 tried to go further by removing a bunch of hacky functions used for Python 2 compatibility with colorama
.
Re-reading what I commented on the PR at that time, it seems this was mostly personal convictions about how encoding should be done. This did not solve any actual issue, so it's ok to merge #88 and reject #69 (I could simply re-implement the changes in the future if needed).
Sounds good :)
PEP597 Encoding Warnings gives warnings about locale preferred encoding if you have the warnings enabled. What needs to happen to get this PR merged?
Just a rebase on top of current master. I'm out of the country at the moment so my capacity for code changes is low. If @Delgan does a rebase or if you submit a new PR that is rebased I'll accept it, though it'll be a little bit before I can do a release.
Hey there. :)
I just rebased the PR. :+1: It's quite old, but I first glance, it seems the proposed workaround is still relevant.
It's going to be a little bit before I can push a release, sorry in advance. @Delgan if you're interested in being added as a pypi maintainer just let me know what your pypi username is.
@Qix- Thank you for your trust, but I honestly prefer not to handle the administrative part. Let me know if you need help with other developments, though. I would be happy to contribute. :+1:
Hi.
This is intended to fix #53, finally. :)
As discussed, I replaced
locale.getpreferredencoding()
withSTREAM.encoding
. Just in case, I added a fallback toascii
ifSTREAM
has no or invalidencoding
attribute. For the tests, the encoding can be configured with thePYTHONIOENCODING
environment variable in place ofLANG
andLC_ALL
. Also, I had to removeencoding.py
and include it directly intocolor.py
to avoid circular dependency.Hopefully, this should solve reported encoding issues. ;)