summaryrefslogtreecommitdiff
path: root/Python/_warnings.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r--Python/_warnings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 87755e1edb..51c39e48d4 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -783,7 +783,7 @@ PyErr_WarnExplicit(PyObject *category, const char *text,
{
PyObject *res;
PyObject *message = PyUnicode_FromString(text);
- PyObject *filename = PyUnicode_FromString(filename_str);
+ PyObject *filename = PyUnicode_DecodeFSDefault(filename_str);
PyObject *module = NULL;
int ret = -1;