nipype uses the [`locale.getdefaultlocale()`](https://docs.python.org/3/library/locale.html#locale.getdefaultlocale) function [here](https://github.com/nipy/nipype/blob/eb779e6113074c2071830001eacdefca26518ce3/nipype/utils/subprocess.py#L34) and [here](https://github.com/nipy/nipype/blob/b3b3bf3c2aefa57e7f7d77868136d9cea090eb11/nipype/utils/filemanip.py#L696). However, this function was deprecated in Python 3.11 and will be removed in Python 3.13. It should be replaced with either [`locale.getpreferredencoding()`](https://docs.python.org/3/library/locale.html#locale.getpreferredencoding) or [`locale.getencoding()`](https://docs.python.org/3/library/locale.html#locale.getencoding).