Skip to content

Conversation

jhlegarreta
Copy link
Contributor

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

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
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@           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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhlegarreta
Copy link
Contributor Author

doctest build failures are unrelated.

@effigies effigies merged commit 8fb25a0 into nipy:master Jun 27, 2024
@jhlegarreta jhlegarreta deleted the FixGettingLocale branch June 27, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants