-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Fix encoding for Stata format 118 files #21279
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
BUG: Fix encoding for Stata format 118 files #21279
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21279 +/- ##
=======================================
Coverage 91.85% 91.85%
=======================================
Files 153 153
Lines 49549 49549
=======================================
Hits 45512 45512
Misses 4037 4037
Continue to review full report at Codecov.
|
bc2d45e
to
dcbbb32
Compare
Hello @bashtage! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on June 05, 2018 at 07:20 Hours UTC |
461dd94
to
4bdb2c4
Compare
doc/source/whatsnew/v0.23.1.txt
Outdated
@@ -23,7 +23,7 @@ New features | |||
Deprecations | |||
~~~~~~~~~~~~ | |||
|
|||
- | |||
- :func:`read_stata` and :class:`StataReader` have deprecated the ``encoding`` parameter. Stata files only support a single encoding and so this input has no effect. (:issue:`21244`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you say it didn't have any effect before, but still, we should not introduce deprecation warnings in a bug fix release. So would either move this to 0.24.0 or split the PR
4bdb2c4
to
c285003
Compare
I removed the deprecation. |
Ensure that Stata 118 files always use utf-8 encoding
c285003
to
ac8c2c2
Compare
@bashtage so the fix looks good. can your restore the encoding paramater then can merge into 0.23.1 (and then come back with another PR to deprecate it)? thxs |
I removed the deprecation warning but encoding is now a no-op, which is the correct behavior. I'd rather not restore the (potentially) broken behavior where users are allowed to set an invalid encoding (e.g. latin-1 for more recent file formats), and this can wait to 24 if you think this is too much change for a bug fix release. |
Yes, we should not remove the keyword for 0.23.1, even when it was a no-op, because that breaks people code who inadvertently used it. So I would add it back here, but then a next PR to deprecate it if you want. |
The keyword is still available in read_Stata and Stata Reader and so code
won't break.
…On Wed, Jun 6, 2018, 13:54 Joris Van den Bossche ***@***.***> wrote:
I'd rather not restore the (potentially) broken behavior where users are
allowed to set an invalid encoding (e.g. latin-1 for more recent file
formats), and this can wait to 24 if you think this is too much change for
a bug fix release.
Yes, we should not remove the keyword for 0.23.1, even when it was a
no-op, because that breaks people code who inadvertently used it. So I
would add it back here, but then a next PR to deprecate it if you want.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21279 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFU5Rahuwy53qij-xodhPX9G9cdjgDq3ks5t59DugaJpZM4UV4zG>
.
|
Ah, sorry, missed that you only removed the internal passing through of the keyword. That's fine then! |
@bashtage Thanks! |
Ensure that Stata 118 files always use utf-8 encoding
Ensure that Stata 118 files always use utf-8 encoding
read_stata
always uses 'utf8' #21244git diff upstream/master -u -- "*.py" | flake8 --diff