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

[Bug] [misc] Use sys.getfilesystemencoding() to prevent possible locale errors #1775

Merged
merged 10 commits into from
Aug 28, 2020

Conversation

archibate
Copy link
Collaborator

@archibate archibate commented Aug 25, 2020

Related issue = taichi-dev/taichi_three#13 #428

See https://www.python.org/dev/peps/pep-0529/#update-sys-getfilesystemencoding.

[Click here for the format server]


@k-ye Would you help me confirm this works on OS X for all locale combinations?

@archibate archibate changed the title [Misc] Use sys.getfilesystemencoding() to prevent possible locale errors [Bug] [misc] Use sys.getfilesystemencoding() to prevent possible locale errors Aug 25, 2020
@codecov
Copy link

codecov bot commented Aug 25, 2020

Codecov Report

Merging #1775 into master will increase coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1775      +/-   ##
==========================================
+ Coverage   42.60%   42.66%   +0.05%     
==========================================
  Files          44       44              
  Lines        6182     6174       -8     
  Branches     1071     1074       +3     
==========================================
  Hits         2634     2634              
+ Misses       3394     3385       -9     
- Partials      154      155       +1     
Impacted Files Coverage Δ
python/taichi/core/util.py 0.38% <0.00%> (-0.01%) ⬇️
python/taichi/code_format.py 12.00% <0.00%> (-0.38%) ⬇️
python/taichi/main.py 23.57% <0.00%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 139ff5d...985f68a. Read the comment docs.

python/taichi/core/util.py Outdated Show resolved Hide resolved
@archibate archibate added the P0 This issue is urgent to be solved and has highest priority label Aug 26, 2020
@archibate archibate marked this pull request as draft August 26, 2020 06:07
@archibate archibate marked this pull request as ready for review August 27, 2020 06:57
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM

Would you help me confirm this works on OS X for all locale combinations?

I actually tried. My locale looks the same as taichi-dev/taichi_three#13 (comment), but I don't have this problem. Do you know how I can repro this?

@k-ye k-ye added the LGTM label Aug 27, 2020
@archibate
Copy link
Collaborator Author

Do you know how I can repro this?

I'm not sure, what's your MacOS and Python version? And the one in taichi_three#13?

@archibate
Copy link
Collaborator Author

Locales are always international packages' headache yet no way to test against them at the time being. Let's try to merge this in given that CI passed and we used enough try-except's here and hopefully it can solve the hidden locale problems :)

but I don't have this problem.

Actually are you testing in master without this PR?

@archibate archibate merged commit 29e43b5 into taichi-dev:master Aug 28, 2020
@yuanming-hu yuanming-hu mentioned this pull request Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 This issue is urgent to be solved and has highest priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants