mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Merge 3.2: sys.getfilesystemencoding() raises a RuntimeError if
initfsencoding() was not called yet: detect bootstrap (startup) issues earlier.
This commit is contained in:
commit
dd810ddb65
2 changed files with 6 additions and 2 deletions
|
@ -87,6 +87,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not
|
||||||
|
called yet: detect bootstrap (startup) issues earlier.
|
||||||
|
|
||||||
- Issue #11393: Add the new faulthandler module.
|
- Issue #11393: Add the new faulthandler module.
|
||||||
|
|
||||||
- Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows.
|
- Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows.
|
||||||
|
|
|
@ -259,8 +259,9 @@ sys_getfilesystemencoding(PyObject *self)
|
||||||
{
|
{
|
||||||
if (Py_FileSystemDefaultEncoding)
|
if (Py_FileSystemDefaultEncoding)
|
||||||
return PyUnicode_FromString(Py_FileSystemDefaultEncoding);
|
return PyUnicode_FromString(Py_FileSystemDefaultEncoding);
|
||||||
Py_INCREF(Py_None);
|
PyErr_SetString(PyExc_RuntimeError,
|
||||||
return Py_None;
|
"filesystem encoding is not initialized");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(getfilesystemencoding_doc,
|
PyDoc_STRVAR(getfilesystemencoding_doc,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue