REGR: codecs.open() is always opened in text mode
- [x] closes #39247
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

Thanks @twoertwein for the PR. can you add a release note to 1.2.1 for now. see https://github.com/pandas-dev/pandas/pull/39239#issuecomment-762448465 technically there are cases where `codecs.StreamReaderWriter` is expecting bytes: https://docs.python.org/3/library/codecs.html#binary-transforms but these cases didn't work with <1.2 (and do not work with 1.2). thanks @twoertwein  @meeseeksdev backport 1.2.x @meeseeksdev backport 1.2.x Something went wrong ... Please have  a look at my logs.