Closed gogela closed 3 years ago
Wow... good catch. It never occurred to me that the change would affect other bits of code but that's indeed problematic.
This change was caused by a fix for this issue because some people had issues otherwise: https://github.com/WoLpH/numpy-stl/issues/52 I'll add this to my todo list :)
sorry, closed by mistake.
I found the issue... it was rather subtle. The code that was supposed to restore the locale was actually broken but nobody ever noticed because it was never executed. The code had a return
a bit higher up and the restoring of the locale was not part of the finally
clause.
In any case, I'll create a new release fixing this :)
Running functions that use _speedups.ascii_read() - ie. Mesh.from_file() causes change of locale settings: typically:
The problem apparently lies in:
where the old_locale var gets populated from new_locale and furthermore never changed back
Suggested change: LINE #21 (add):
locale_t LC_GLOBAL_LOCALE
LINES #109,110