Skip to content
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

REGR: codecs.open() is always opened in text mode #39253

Merged
merged 3 commits into from Jan 19, 2021

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein commented Jan 18, 2021

@simonjayhawkins
Copy link
Member

Thanks @twoertwein for the PR. can you add a release note to 1.2.1 for now. see #39239 (comment)

@simonjayhawkins simonjayhawkins added this to the 1.2.1 milestone Jan 18, 2021
@@ -34,6 +34,7 @@ Fixed regressions
- Fixed regression in repr of float-like strings of an ``object`` dtype having trailing 0's truncated after the decimal (:issue:`38708`)
- Fixed regression that raised ``AttributeError`` with PyArrow versions [0.16.0, 1.0.0) (:issue:`38801`)
- Fixed regression in :func:`pandas.testing.assert_frame_equal` raising ``TypeError`` with ``check_like=True`` when :class:`Index` or columns have mixed dtype (:issue:`39168`)
- Fixed regression in :meth:`~DataFrame.to_csv` opening `codecs.StreamReaderWriter` in binary mode instead of in text mode (:issue:`39247`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorisvandenbossche did a cleanup to re-order the regression fixes, #39246

can you move adjacent to the other IO regressions

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved it up to the other to_csv issue.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@twoertwein
Copy link
Member Author

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).

@jreback jreback merged commit edbd450 into pandas-dev:master Jan 19, 2021
@jreback
Copy link
Contributor

jreback commented Jan 19, 2021

thanks @twoertwein

@jreback
Copy link
Contributor

jreback commented Jan 19, 2021

@meeseeksdev backport 1.2.x

1 similar comment
@jreback
Copy link
Contributor

jreback commented Jan 19, 2021

@meeseeksdev backport 1.2.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 19, 2021

Something went wrong ... Please have a look at my logs.

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Jan 19, 2021
simonjayhawkins pushed a commit that referenced this pull request Jan 19, 2021
…#39271)

Co-authored-by: Torsten Wörtwein <twoertwein@users.noreply.github.com>
@twoertwein twoertwein deleted the codecs branch January 19, 2021 15:54
nofarm3 pushed a commit to nofarm3/pandas that referenced this pull request Jan 21, 2021
@twoertwein twoertwein mentioned this pull request Jan 27, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: V1.2 DataFrame.to_csv() fails to write a file with codecs
4 participants