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

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

Merged
merged 1 commit into from
Jun 27, 2024

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
48 of 49 checks passed
@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