nipy / nibabel

Python package to access a cacophony of neuro-imaging file formats
http://nipy.org/nibabel/
Other
649 stars 258 forks source link

RF: Prefer using `getlocale()` instead of `getdefaultlocale()` #1329

Closed jhlegarreta closed 3 months ago

jhlegarreta commented 3 months ago

Prefer using getlocale() instead of getdefaultlocale().

Fixes:

/home/runner/work/nibabel/nibabel/nibabel/cmdline/dicomfs.py:40:
 DeprecationWarning: 'locale.getdefaultlocale' is deprecated and
 slated for removal in Python 3.15. Use setlocale(), getencoding()
 and getlocale() instead.
      encoding = locale.getdefaultlocale()[1]

raised for example at: https://github.com/nipy/nibabel/actions/runs/9637811213/job/26577586721#step:7:164

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.20%. Comparing base (d18022d) to head (95e7c15).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1329 +/- ## ======================================= Coverage 92.20% 92.20% ======================================= Files 98 98 Lines 12400 12400 Branches 2557 2557 ======================================= Hits 11433 11433 Misses 644 644 Partials 323 323 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jhlegarreta commented 3 months ago

doctest build failures are unrelated.