File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ Extensions
8383Library
8484-------
8585
86+ - Issue #9605: posix.getlogin() decodes the username with file filesystem
87+ encoding and surrogateescape error handler. Patch written by David Watson.
88+
8689- Issue #9604: posix.initgroups() encodes the username using the fileystem
8790 encoding and surrogateescape error handler. Patch written by David Watson.
8891
@@ -317,7 +320,7 @@ Core and Builtins
317320 Fix a crash if an empty directory called "encodings" exists in sys.path.
318321
319322- Issue #8589: Decode PYTHONWARNINGS environment variable with the file system
320- encoding and surrogateespace error handler instead of the locale encoding to
323+ encoding and surrogateescape error handler instead of the locale encoding to
321324 be consistent with os.environ. Add PySys_AddWarnOptionUnicode() function.
322325
323326- PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
Original file line number Diff line number Diff line change @@ -4354,13 +4354,12 @@ posix_getlogin(PyObject *self, PyObject *noargs)
43544354 name = getlogin ();
43554355 if (name == NULL ) {
43564356 if (errno )
4357- posix_error ();
4357+ posix_error ();
43584358 else
4359- PyErr_SetString (PyExc_OSError ,
4360- "unable to determine login name" );
4359+ PyErr_SetString (PyExc_OSError , "unable to determine login name" );
43614360 }
43624361 else
4363- result = PyUnicode_FromString (name );
4362+ result = PyUnicode_DecodeFSDefault (name );
43644363 errno = old_errno ;
43654364
43664365 return result ;
You can’t perform that action at this time.
0 commit comments