-
Notifications
You must be signed in to change notification settings - Fork 372
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
Add stdin_bytes to skip encoding #915
base: main
Are you sure you want to change the base?
Conversation
@bitprophet Not sure what you pushed, but seems to have added a bunch of unrelated changes to the diff. |
I should still have the original branch, if you just want me to force push it back? |
Yea looks like the typing updates made github lose its mind. if you can rebase and force-push that'd probably be ideal - you'll probably want to make sure you copy over any type hints from From skimming what looks like the two commits actually relevant: my off the cuff thoughts:
|
Ah, it looks like I made the changes through Github, not locally. I'll try cherry picking to a new branch. |
That's a different issue, so not sure that function has anything to do with this one.
To be honest, I never fully understood the reason for decoding to a str and back again. So, you'll probably just have to make a decision on this one. The only related thing I can think of is charset-normalizer, which can guess the encoding used. I'm still not sure I'd use it to try and detect if something is binary or not though. It's always going to be an estimate, so you'll likely still have edge cases that cause problems on occasion. |
Let me know if you want to continue this way, and I'll sort out the typing. It'll be a little tricky now, as the data being passed around is |
Fixes #818.