Eryk Sun <eryk...@gmail.com> added the comment:

> I think it would be best to replace the two calls with 
> PyErr_SetFromWindowsErr(0) (for now).

For now it can at least be implemented inline. For example:

    if (handle == NULL) {
        PyObject *temp = name ? PyUnicode_FromWideChar(name, -1) : NULL;
        PyErr_SetExcFromWindowsErrWithFilenameObjects(PyExc_OSError,
            0, temp, NULL);
        Py_XDECREF(temp);
        handle = INVALID_HANDLE_VALUE;
    }

I think undeprecating the two PyErr_ functions with a modified signature in 3.8 
is okay since they were never in the documented API, never in the stable 
(limited) API, and Py_UNICODE has been a typedef for wchar_t since 3.3.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36935>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to