Skip to content

Commit 95e7c15

Browse files
committed
RF: Prefer using getlocale() instead of getdefaultlocale()
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
1 parent d18022d commit 95e7c15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/cmdline/dicomfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class dummy_fuse:
3737
import nibabel as nib
3838
import nibabel.dft as dft
3939

40-
encoding = locale.getdefaultlocale()[1]
40+
encoding = locale.getlocale()[1]
4141

4242
fuse.fuse_python_api = (0, 2)
4343

0 commit comments

Comments
 (0)